query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
generate the output schedule
сгенерировать расписание вывода
public function generateSchedule() { $specialistregulations = Specialistregulation::getList(); $turns = Turn::getAvailableTurns(); $turn = Turn::findOrFail(Session::get('overview_schedule_turn')); $specialistregulation = Specialistregulation::findOrFail(Session::get('overview_schedule_specialistregulation')); $semester = Session::get('overview_schedule_semester'); $output = $this->generate(); $this->layout->content = View::make('overviews.schedule', compact('output','specialistregulation', 'specialistregulations', 'turns', 'semester', 'turn')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function schedule_generate($classes_arr, $options,$bChkIns) {\r\n\t\tif ( intval($options[\"row_interval\"]) == 0 ) $options[\"row_interval\"] = 30;\t\r\n\r\n\t\t// define start time as 8am if not set\r\n\t\tif ( ! isset($options[\"start_time\"]) ) {\r\n\t\t\t$options[\"start_time\"] = 800;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// change to the nearest row interval hour down.\r\n\t\t\t$time_hour = ($options[\"start_time\"] - $options[\"start_time\"] % 100) / 100; \r\n\t\t\t$time_min = $options[\"start_time\"] % 100;\r\n\t\t\t\r\n\t\t\t$time_totalmins = $time_hour * 60 + $time_min;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif ( $time_totalmins % $options[\"row_interval\"] > 0) \r\n\t\t\t\t$time_totalmins = $time_totalmins - $time_totalmins % $options[\"row_interval\"];\r\n\t\t\t\t$options[\"start_time\"] = ($time_totalmins - $time_totalmins % 60) / 60 * 100 + $time_totalmins % 60;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// define end time as 10pm if not set\r\n\t\tif ( ! isset($options[\"end_time\"]) ) {\r\n\t\t\t$options[\"end_time\"] = 2200;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// change to the nearest row interval hour down.\r\n\t\t\t$time_hour = ($options[\"end_time\"] - $options[\"end_time\"] % 100) / 100; \r\n\t\t\t$time_min = $options[\"end_time\"] % 100;\r\n\t\t\t\r\n\t\t\t$time_totalmins = $time_hour * 60 + $time_min;\r\n\t\t\t\r\n\t\t\tif ( $time_totalmins % $options[\"row_interval\"] > 0) $time_totalmins = $time_totalmins - $time_totalmins % $options[\"row_interval\"];\r\n\t\t\t$options[\"end_time\"] = ($time_totalmins - $time_totalmins % 60) / 60 * 100 + $time_totalmins % 60;\r\n\t\t\r\n\t\t}\r\n\r\n\t\t$days_arr = array(\"จันทร์\",\"อังคาร\",\"พุธ\",\"พฤหัส\",\"ศุกร์\",\"เสาร์\",\"อาทิตย์\");\r\n\t\t$days_norow = array(0, 0, 0, 0, 0, 0, 0);\r\n\r\n\t\t\r\n\t\t$html = \"<table width=\\\"100%\\\" bgcolor=\\\"#000000\\\" cellspacing=\\\"1\\\" cellpadding=\\\"0\\\">\\n\";\r\n\t\t\r\n\t\t// output title if set in $options.\r\n\t\tif ( isset($options[\"title\"]) ) {\r\n\t\t\t$cell_style = \"background-color: #000000; color: #ffffff;\"; // default title style \r\n \t\t\t$cell_style .= $options[\"title_style\"];\r\n\t\t\t\r\n\t\t\t$html .= \"\t<tr>\\n\t\t<th colspan=\\\"8\\\" style=\\\"$cell_style\\\">\".$options[\"title\"].\"</th>\\n\t</tr>\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t$cell_style = \"background-color: #c0c0c0; color: #000000;\"; // default day header style\r\n\t\t$cell_style .= $options[\"dayheader_style\"];\r\n\t\t\r\n\t\t$html .= \"\t<tr style=\\\"$cell_style\\\">\\n\t\t<th>&nbsp;</th>\\n\";\r\n\t\tforeach ($days_arr as $day){\r\n\t\t\t$html .= \"\t\t<th>$day</th>\\n\";\r\n\t\t}\r\n\t\t$html .= \"\t</tr>\\n\";\r\n\t\t\r\n\t\t$cur_time = $options[\"start_time\"];\r\n\t\twhile ($cur_time < $options[\"end_time\"]) {\r\n\t\t\t$format_time = date(\"G:i\", strtotime(substr($cur_time, 0, strlen($cur_time) - 2).\":\".substr($cur_time, -2, 2)));\r\n\t\t\t\r\n\t\t\t$cell_style = \"background-color: #c0c0c0; color: #000000;\"; // default time cell style\r\n\t\t\t$cell_style .= $options[\"time_style\"];\t\t\t\r\n\t\t\t\t\r\n\t\t\t$html .= \"\t<tr bgcolor=\\\"#ffffff\\\" class='ajaxInnerTR'>\\n\t\t<td align=\\\"right\\\" width=\\\"2%\\\" style=\\\"$cell_style\\\"><b>$format_time</b></td>\\n\";\r\n\t\t\t\r\n\t\t\tfor ($cur_day = 0; $cur_day < 7; $cur_day++) {\r\n\t\t\t\r\n\t\t\t\t// if flag is set not to print any row for the next\r\n\t\t\t\t// row (since a class spans more than one row), then\r\n\t\t\t\t// continue.\r\n\t\t\t\tif ($days_norow[$cur_day] > 0) {\r\n\t\t\t\t\t$days_norow[$cur_day]--;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t // check if there is a class during this day/time\r\n\t\t\t\tif ( isset($classes_arr[$cur_day][$cur_time]) ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$class_interval = intval($classes_arr[$cur_day][$cur_time][\"interval\"]);\r\n\t\t\t\t\t\tif ( $class_interval == 0 ) $class_interval = 60; // default interval is 60mins\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// round to nearest interval\r\n\t\t\t\t\t\t$class_span = intval($class_interval / $options[\"row_interval\"]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// flag that for the next $class_span rows, we should not print a cell\r\n\t\t\t\t\t\t$days_norow[$cur_day] += $class_span - 1;\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t if ( isset($classes_arr[$cur_day][$cur_time][\"style\"]) )\r\n\t\t\t\t\t\t\t$cell_style = $options[\"class_globalstyle\"].\"; \".$classes_arr[$cur_day][$cur_time][\"style\"];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$cell_style = $options[\"class_globalstyle\"];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= \"<td width=\\\"14%\\\" rowspan=\\\"$class_span\\\" style=\\\"$cell_style\\\" class='ajaxInnerTD'><div style='position:relative;'><strong style='background:#FFFFCC none repeat scroll 0 0;\r\nheight:20px;\r\npadding:5px 10px 0 6px;\r\nposition:absolute;\r\nright:0;\r\ntop:0px;\r\n' id=\".$classes_arr[$cur_day][$cur_time][\"sec_day_id\"].\" class='rdel'>x</strong></div><div style='text-align:center;' >\".$classes_arr[$cur_day][$cur_time][\"html\"].\"</div></div></td>\\n\";\r\n\t\t\t\t\t\t}\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(!$bChkIns)\r\n\t\t\t\t\t\t$html .= \"<td width=\\\"14%\\\" align='center'><input type='checkbox' class='range' title = '$cur_time' alt='$cur_day' value='1'></td>\\n\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$html .= \"<td width=\\\"14%\\\" align='center'></td>\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$html .= \"\t</tr>\\n\";\r\n\t\t\t$cur_time += $options[\"row_interval\"]; // increment to next row interval\r\n\t\t\tif ($cur_time % 100 >= 60) $cur_time = $cur_time - $cur_time % 100 + 100;\r\n\t\t};\r\n\t\t$html .= \"</table>\\n\";\r\n\t\treturn $html;\t\r\n\t\r\n}", "public function run()\n {\n $data = [\n \t\t\t['name'=>'Morning Shift','from_time'=>'9:30 AM','to_time'=>'4:00 PM'],\n \t\t\t['name'=>'Evening Shift','from_time'=>'4:00 PM','to_time'=>'10:00 PM'],\n \t\t\t['name'=>'Night Shift','from_time'=>'11:00 PM','to_time'=>'8:00 AM']\n \t\t\t\n \t\t];\n\n foreach ($data as $key => $value) {\n\t\t\tShift::create($value);\n\t\t}\n }", "protected function generateNextRun() {\n $now = time();\n\n /* Min */\n $my_minute = $this->minute;\n if ($my_minute == '*')\n $my_minute = '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60';\n $mins = preg_split('/,/', $my_minute);\n sort($mins);\n\n /* Hour */\n $my_hour = $this->hour;\n if ($my_hour == '*')\n $my_hour = '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24';\n $hours = preg_split('/,/', $my_hour);\n sort($hours);\n\n /* t_day_of_month */\n $my_month_day = $this->month_day;\n if ($my_month_day == '*')\n $my_month_day = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32';\n $days = preg_split('/,/', $my_month_day);\n sort($days);\n\n /* month */\n $my_month = $this->month;\n if ($my_month == '*')\n $my_month = '1,2,3,4,5,6,7,8,9,10,11,12,13';\n $months = preg_split('/,/', $my_month);\n sort($months);\n\n /* year */\n $t_year = date('Y');\n\n /* Generate next run */\n $minute = date('i');\n $hour = date('H');\n $day = date('d');\n $month = date('m');\n\n /* init */\n $i_minute=0;$i_hour=0;$i_day=0;$i_month=0;\n for ($i = 0; ($mins[$i_minute] <= $minute && $i < count($mins)); $i++) {\n $i_minute = $i;\n }\n if($mins[$i_minute]<$minute) $i_minute=0;\n\n\n for ($i = 0; ($hours[$i_hour] < $hour && $i < count($hours)); $i++) {\n $i_hour = $i;\n }\n \n if($hours[$i_hour]<$hour) $i_hour=0;\n \n\n for ($i = 0; ($days[$i_day] < $day && $i < count($days)); $i++) {\n $i_day = $i;\n }\n if($days[$i_day]<$day) $i_day=0;\n\n for ($i = 0; ($months[$i_month] < $month && $i < count($months)); $i++) {\n $i_month = $i;\n }\n if($months[$i_month]<$month) $i_month=0;\n /* init */\n\n $nextRun=mktime($hours[$i_hour], $mins[$i_minute], 0, $months[$i_month], $days[$i_day], $t_year);\n\n $i=0;\n while($nextRun<$now && $i<4)\n {\n \n if($i==0){ // hour\n if($this->hour=='*') {\n $i_minute=0;\n $i_hour++;\n }\n }\n\n if($i==1){ // day\n if($this->month_day=='*') {\n $i_hour=0;\n $i_day++;\n }\n\n }\n\n if($i==2){ // month\n if($this->month=='*') {\n $i_day=0;\n $i_month++;\n }\n }\n\n if($i==3) {\n $i_month=0;\n $t_year++;\n }\n //echo $months[$i_month]; echo ' i:'.$i.'<br />';\n $nextRun=mktime($hours[$i_hour], $mins[$i_minute], 0, $months[$i_month], $days[$i_day], $t_year); \n $i++;\n \n }\n \n return $nextRun;\n }", "public function generate()\n\t{\n\t\t#currently handles all logic for ading nursery time -SH\n\t\tif($this->_nursery)\n\t\t{\n\t\t\t$this->generate_schedule(NULL,$this->get_tasks($this->_taskgroup_cat,'_nusery_tasks'));\n\t\t}\n\n\t\t#generates all the normal timestamp/tasks, will use the offset if a nursery space has calculated the new offset -SH\n\t\t$this->generate_schedule($this->_nursery_offset);\n\n\t\treturn $this;\n\t}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('orders:generate-tmpl-orders')\n ->cron('0 0 * * 2')->sendOutputTo($this->_logFile('generate-tmpl-orders'));\n\n $schedule->command('orders:update-main-basket-form-tmp-orders')\n ->cron('5 0 * * *')->sendOutputTo($this->_logFile('update-main-basket-form-tmp-orders'));\n\n $schedule->command('orders:process-tmp-orders-for-current-week')\n ->cron('0 * * * 2-'.variable('stop_ordering_date'))->sendOutputTo($this->_logFile('process-tmp-orders-for-current-week'));\n\n $time = $this->_getProcessPaidOrdersTime();\n\n if ($time) {\n $schedule->command('orders:process-paid-orders-for-current-week')\n ->cron($time)->sendOutputTo($this->_logFile('process-paid-orders-for-current-week'));\n }\n\n $time = $this->_getFinalisingOrdersTime();\n if ($time) {\n $schedule->command('orders:remove-unsuccessful-orders-for-current-week')\n ->cron($time)->sendOutputTo($this->_logFile('remove-unsuccessful-orders-for-current-week'));\n\n $schedule->command('orders:generate-reports-for-current-week')\n ->cron($time)->sendOutputTo($this->_logFile('generate-reports-for-current-week'));\n }\n\n $schedule->command('orders:archive-completed-orders')\n ->cron('0 0 * * 1,2')->sendOutputTo($this->_logFile('archive-completed-orders'));\n \n $schedule->command('reports:clear-tmp')\n ->cron('0 * * * *')->sendOutputTo($this->_logFile('clear-tmp'));\n }", "public function generateshifttableAction() {\n\n //get data\n $data = $this->getRequest()->getParams();\n $model = $this->_getModel();\n\n\n //Locations\n $locations = $model->getAllLocations();\n //Events\n $events = $model->getAllEvents();\n\n echo \"<table style=\\\"border:solid 1px #000000; cellpadding:0px; cellspacing:0px; empty-cells:show; border-collapse:collapse;\\\">\";\n echo \"<tr>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">Raum</font></td>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">Programmpunkt</font></td>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">Ansprechpartner</font></td>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">Benötigte Mitarbeiter</font></td>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">gebuchte Mitarbeiter</font></td>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">Differenz Mitarbeiter</font></td>\";\n echo \"<td bgcolor=\\\"#000000\\\"><font color=\\\"#FFFFFF\\\">Schichten</font></td>\";\n $starttime = 20;\n $endtime = 21;\n for ($i = 0; $i < 15; $i++) {\n echo \"<td bgcolor=\\\"#000000\\\" style=\\\"border:solid 1px #FFFFFF;border-left:solid 2px #FFFFFF; \\\" colspan=\\\"4\\\"><font color=\\\"#FFFFFF\\\" size=\\\"-3\\\">\" . $starttime . \":00- \" . $endtime . \":00</font></td>\";\n $starttime = $endtime;\n $endtime = $endtime + 1;\n if ($endtime >= 24)\n $endtime = 0;\n }\n\n echo \"</tr>\";\n foreach ($locations as $location) {\n echo \"<tr>\";\n echo \"<td bgcolor=\\\"\" . $location ['color'] . \"\\\" colspan=\\\"67\\\">\" . $location ['name'] . \"</td>\";\n echo \"</tr>\";\n\n\n foreach ($events as $event) {\n\n if ($event['location_name'] == $location['name']) {\n\n\n $shifts = $model->getShiftsByEventid($event['ID']);\n $shift_event = \"\";\n $reqstaff = 0;\n $staff = 0;\n $start_h = 0;\n $start_m = 0;\n $end_h = 0;\n $end_m = 0;\n\n for ($i = 0; $i < 60; $i++)\n $shift_mark[$i] = 0;\n foreach ($shifts as $shift) {\n\n $start_h = 0;\n $start_m = 0;\n $end_h = 0;\n $end_m = 0;\n $anfang = 0;\n $ende = 0;\n $shift_event .= $shift['name'] . \"::\" . $shift['start'] . \":\" . $shift['end'] . \" \";\n //benötigte MA\n $reqstaff = $reqstaff + $shift['reqstaff'];\n $user_shifts = $model->getUsersOfShift($shift['ID']);\n //vorhandene MA\n $staff = $staff + count($user_shifts);\n //Schichten 2009-06-26 20:30:00\n $shiftstart_tmp = explode(' ', $shift['start']);\n $shiftstart = explode(':', $shiftstart_tmp['1']);\n\n if ($shiftstart[0] > 18)\n $anfang = ($shiftstart[0] - 20) * 4 + ($shiftstart[1] - $shiftstart[1] % 15) / 15;\n else\n $anfang = 16 + ($shiftstart[0]) * 4 + ($shiftstart[1] - $shiftstart[1] % 15) / 15;\n $shiftend_tmp = explode(' ', $shift['end']);\n $shiftend = explode(':', $shiftend_tmp['1']);\n if ($shiftend[0] > 18)\n $ende = ($shiftend[0] - 20) * 4 + ($shiftend[1] - $shiftend[1] % 15) / 15;\n else\n $ende = 16 + ($shiftend[0]) * 4 + ($shiftend[1] - $shiftend[1] % 15) / 15;\n for ($i = $anfang; $i < $ende; $i++)\n $shift_mark[$i] = 1;\n }\n $diff_stuff = $reqstaff - $staff;\n echo \"<tr>\";\n echo \"<td bgcolor=\\\"\" . $location ['color'] . \"\\\" width=\\\"20px\\\"></td>\";\n echo \"<td>\" . $event['name'] . \"</td>\";\n echo \"<td>\" . $event['user_lname'] . \"</td>\";\n echo \"<td>\" . $reqstaff . \"</td>\";\n echo \"<td>\" . $staff . \"</td>\";\n echo \"<td \";\n if ($diff_stuff > 0)\n echo \"bgcolor=\\\"#FF0000\\\"\";\n echo \">\" . $diff_stuff . \"</td>\";\n echo \"<td>\" . $shift_event . \"</td>\";\n for ($i = 0; $i < 60; $i++) {\n\n echo \"<td style=\\\"border:solid 1px #000000;\";\n if (($i % 4) == 0)\n echo \" border-left:solid 2px #000000;\";\n if ($shift_mark[$i] == 1)\n echo \" background:\" . $location ['color'] . \";\";\n echo \"\\\" width=\\\"25px\\\"></td>\";\n }\n echo \"</tr>\";\n }\n }\n }\n echo \"</table>\";\n }", "public function pilles_cron_tests()\n\t{\n\t\t$output = '';\n\t\t$output .= '<pre>wp_get_schedule - vca_asm_check_outbox<br /><br /><br />'\n\t\t\t. htmlspecialchars( print_r( wp_get_schedule( 'vca_asm_check_outbox' ), TRUE ), ENT_QUOTES, 'utf-8', FALSE )\n\t\t\t. \"</pre><br /><br /><br />\\n\";\n\t\t$output .= '<pre>Cronjobs:<br /><br /><br />'\n\t\t\t. htmlspecialchars( print_r( _get_cron_array(), TRUE ), ENT_QUOTES, 'utf-8', FALSE )\n\t\t\t. \"</pre>\\n\";\n\n\t\treturn $output;\n\t}", "function getSchedules (){\n\t\t\n\t\t// if user presses the Generate Schedule button in frontend\n\t\t// we force recalculation of the teachers schedule via python\n\t\tif ( isset ($_POST['random_schedule']) && $_POST['random_schedule'] == 1 ){\n\t\t\t\n\t\t\t// create new random students schedule alongwith the respective students schedule count\n\t\t\t// $this->createRandomStudentsSchedule();\n\n\t\t\t// Calculate new teachers schedule via python script\n\t\t\t// $this->pythonDoTeachersSchedule();\n\t\t}\n\t\t// if user presses the Save Schedule button in frontend\n\t\t// we force recalculation of the teachers schedule via python\n\t\telseif ( isset ($_POST['save_schedule']) && $_POST['save_schedule'] == 1 ){\n\t\t\t// saave students schedule alongwith the respective students schedule count\n\t\t\t$this->saveNewStudentsSchedule();\n\t\t}\n\t\telse{\n\t\t\t// get existing students schedule and students schedule count data\n\t\t\t$this->getStudentsSchedule();\n\t\t\t\n\t\t\t// Attempt to find existing teachers schedule\n\t\t\t$json_result = getJSONFile ( $this->json_teachers_schedule );\n\t\t\tif ( $json_result ){\n\t\t\t\t$this->teachers_schedule_json = json_encode($json_result);\n\t\t\t}\n\t\t}\n\t\t// always force new calculation\n\t\t// Calculate new teachers schedule via python script\n\t\t$this->pythonDoTeachersSchedule();\n\t\t\n }", "public function run()\n {\n // el caso Homero como leticia\n $materias = [\n 12, // 'intro'\n 13, // 'elementos'\n 30, // 'tis'\n 31, // 'arquitecturas de computadoras'\n 33 // 'algoritmos avanzados'\n ];\n\n $groups = [\n 2, // 'intro'\n 2, // 'elementos'\n 3, // 'elementos'\n 2, // 'arquitecturas de computadoras'\n 2, // 'tis'\n 1, // algoritmos avanzados en informatica\n ];\n\n $data = [\n ['group' => 2, 'asignature_id' => 12],\n ['group' => 2, 'asignature_id' => 13], ['group' => 3, 'asignature_id' => 13],\n ['group' => 2, 'asignature_id' => 31],\n ['group' => 2, 'asignature_id' => 30],\n ['group' => 1, 'asignature_id' => 33],\n ];\n\n foreach ($data as $group) {\n $group = AsignatureGroup::create($group);\n $schedule = null;\n switch ($group->asignature_id) {\n case 12:\n $schedule = ['teacher' => self::USER_AS_TEACHER_ID, 'from' => '17:15', 'to' => '18:45', 'day' => 'MA'];\n break;\n case 13:\n $schedule = ['teacher' => self::USER_AS_TEACHER_ID, 'from' => '12:45', 'to' => '14:15', 'day' => 'LU'];\n break;\n case 31:\n $schedule = ['teacher' => self::USER_AS_TEACHER_ID, 'from' => '15:45', 'to' => '17:15', 'day' => 'MA'];\n break;\n case 30:\n $schedule = ['teacher' => self::USER_AS_TEACHER_ID, 'from' => '08:15', 'to' => '09:45', 'day' => 'MA'];\n break;\n case 33:\n $schedule = ['teacher' => self::USER_AS_TEACHER_ID, 'from' => '06:45', 'to' => '08:15', 'day' => 'MA'];\n break;\n }\n $group->teachers()->createMany([$schedule]);\n }\n }", "public function generateSchedule() {\n $PARAMS = $_POST;\n if (isset($PARAMS['year'])) {\n $year = $PARAMS['year'];\n //die($year);\n // first we need to process every section\n $sql = \"select s.subject_id,s.section_id from schedule_restriction_info sri, subject s where sri.subject_id = s.subject_id AND sri.year='$year' AND s.school_id='\".$this->session->userdata('school_id').\"'\";\n $data = $this->db->query($sql)->result_array();\n //pre($sql);die;\n $sections = array();\n $section_map = array();\n foreach ($data as $row) {\n $subject_id = $row['subject_id'];\n $section_id = $row['section_id'];\n $section_map[$subject_id] = $section_id;\n $sections[$section_id] = array();\n }\n\n $sql = \"SELECT subject_id, time_step, nBlocks, block_size FROM schedule_restriction_info WHERE year='$year' AND school_id='\".$this->session->userdata('school_id').\"'\";\n $data = $this->db->query($sql)->result_array();\n //pre($sql);\n $subject = array();\n foreach ($data as $row) {\n $subject_id = $row['subject_id'];\n $time_step = $row['time_step'];\n $nBlocks = $row['nBlocks'];\n $block_size = $row['block_size'];\n\n $subject[$subject_id] = array('time_step' => $time_step, 'nBlocks' => $nBlocks, 'block_size' => $block_size, 'blocks' => array());\n }\n\n $sql = \"SELECT subject_id, sum(sr.end_time-sr.start_time) time FROM schedule_restriction sr, schedule_restriction_info sri WHERE sri.year='$year' AND sr.schedule_id = sri.schedule_id AND sri.school_id='\".$this->session->userdata('school_id').\"' group by (subject_id) order by time\";\n $data = $this->db->query($sql)->result_array();\n\n $order = array(); // processing order\n foreach ($data as $row) {\n array_push($order, $row['subject_id']);\n }\n\n $mintime = 60 * 24;\n $maxtime = 0;\n\n $sql = \"SELECT sri.subject_id, day , sr.start_time, sr.end_time FROM schedule_restriction sr, schedule_restriction_info sri WHERE sri.year='$year' AND sr.schedule_id = sri.schedule_id AND sri.school_id='\".$this->session->userdata('school_id').\"'\";\n $data = $this->db->query($sql)->result_array();\n foreach ($data as $row) {\n $subject_id = $row['subject_id'];\n $day = $row['day'];\n $start_time = $row['start_time'];\n $end_time = $row['end_time'];\n if ($start_time < $mintime)\n $mintime = $start_time;\n if ($end_time > $maxtime)\n $maxtime = $end_time;\n array_push($subject[$subject_id]['blocks'], array('day' => $day, 'start_time' => $start_time, 'end_time' => $end_time)\n );\n }\n \n foreach ($order as $subject_id) {\n $section_id = $section_map[$subject_id];\n $days = array(array(), array(), array(), array(), array(), array());\n foreach ($subject[$subject_id]['blocks'] as $entry) {\n array_push($days[$entry['day']], $entry);\n }\n //print_r($days);\n //return;\n $data = array('subject_id' => $subject_id, 'data' => $days); //$subject[$subject_id]['blocks']);\n array_push($sections[$section_id], $data);\n //echo \"$subject_id: $section_id\\n\";\n //print_r();\n }\n \n $sql = \"SELECT DISTINCT(time_step) FROM schedule_restriction_info WHERE year='$year' AND school_id='\".$this->session->userdata('school_id').\"'\";\n $time_steps = $this->db->query($sql)->result_array();\n\n if (count($time_steps) == 1)\n $time_step = $time_steps[0]['time_step'];\n else\n $time_step = 30; // TODO: compute GCD\n\n $totaltime = $maxtime - $mintime;\n $rows = $totaltime / $time_step;\n\n $tt = array(); // the time table\n for ($i = 0; $i < $rows; $i++) {\n $tt[$i] = array(array(), array(), array(), array(), array(), array());\n }\n\n //pre($sections);die;\n //return;\n\n foreach ($sections as $section_id => $section) {\n foreach ($section as $subject_row) {\n $subject_id = $subject_row['subject_id'];\n $blocks = $subject_row['data'];\n\n $nBlocks = $subject[$subject_id]['nBlocks'];\n $block_size = $subject[$subject_id]['block_size'];\n $time_step0 = $subject[$subject_id]['time_step'];\n\n $block_size0 = $nBlocks;\n\n $block_size *= $time_step0 / $time_step;\n\n //\techo \"$subject_id $nBlocks $block_size $block_size0 $time_step $time_step0\\n\";\n //return;\n //print_r($blocks);die;\n // get a random permutation of days\n\n $day_perm = array(0, 1, 2, 3, 4, 5);\n for ($i = 0; $i < count($this->_daysArr); $i++) {\n $other = rand($i + 1, 5);\n $tmp = @$day_perm[$other];\n $day_perm[$other] = $day_perm[$i];\n $day_perm[$i] = $tmp;\n }\n\n //print_r($day_perm);\n\n foreach ($day_perm as $day) {\n if ($nBlocks == 0)\n break; // subject is done!\n $day_blocks = @$subject_row['data'][$day];\n if(!empty($day_blocks)){\n foreach ($day_blocks as $block) {\n if ($nBlocks == 0)\n break;\n $start_time = $block['start_time'];\n $end_time = $block['end_time'];\n $i0 = ($start_time - $mintime) / $time_step;\n $i1 = ($end_time - $mintime) / $time_step;\n //echo \"$subject_id $i0 $i1 $mintime $start_time $end_time\\n\";\n\n $blockAssigned = false;\n for ($i = $i0; $i < $i1; $i++) {\n // find a free block\n $subjects_in_slot = $tt[$i][$day];\n if (!$this->subject_section_in($subjects_in_slot, $section_id)) {\n $n = 0;\n while ($i < $i1 && !$this->subject_section_in($subjects_in_slot, $section_id) && $n < $block_size) {\n $i++;\n $n++;\n $subjects_in_slot = @$tt[$i][$day];\n }\n if ($n == $block_size) {\n $init = $i - $n;\n for ($j = 0; $j < $n; $j++){\n $rsTeacherPriority=array();\n $sqlTeacherPriority=\"SELECT t.teacher_id,t.name FROM teacher_preference AS tp JOIN teacher as t ON(tp.teacher_id=t.teacher_id) WHERE tp.section_id='$section_id' AND tp.subject_id='$subject_id' ORDER BY tp.priority ASC LIMIT 0,1\";\n generate_log($sqlTeacherPriority,\"att_schedule_time_table.log\");\n $rsTeacherPriority=$this->db->query($sqlTeacherPriority)->result_array();\n //pre($rsTeacherPriority);die;\n if(!empty($rsTeacherPriority)){\n array_push($tt[$init + $j][$day], array('section_id' => $section_id, 'subject_id' => $subject_id,'teacher_id'=>$rsTeacherPriority[0]['teacher_id'],'teacher_name'=>$rsTeacherPriority[0]['name']));\n }else{\n array_push($tt[$init + $j][$day], array('section_id' => $section_id, 'subject_id' => $subject_id,'teacher_id'=>0,'teacher_name'=>'No teacher set'));\n generate_log(\"no teacher find for section_id : $section_id with subject_id : $subject_id in priority table\",\"att_schedule_time_table.log\");\n }\n }\n\n //\techo \"block found ($init) for $section_id $subject_id! Day: $day\\n\";\n //print_r($tt);\n $nBlocks--;\n $i = $init;\n $blockAssigned = true;\n break;\n //print_r($tt);\n //return;\n }\n }\n }\n if ($blockAssigned)\n break; // next day!\n }\n }\n }\n\n //print_r($block);\n\n /*\n foreach($blocks as $block)\n {\n if($nBlocks == 0) break; // subject is done!\n if($block['day'] != $lastDay) // cannot assign two blocks on the same day\n {\n print_r($block);\n\n $start_time = $block['start_time'];\n $end_time = $block['end_time'];\n\n //\t$i0 = $start_time\n\n }\n } */\n }\n }\n\n $tt = array('min' => $mintime, 'max' => $maxtime, 'time_step' => $time_step, 'data' => $tt);\n\n print_r(json_encode($tt));\n\n //echo \"$mintime $maxtime $totaltime $rows\\n\";\n //print_r($tt);\n }\n else {\n $this->missing();\n }\n }", "public function run()\n {\n for ($i = 0; $i < 100; $i++) {\n $this->createTimeRecord(1, new DateTime('-3 hours'), new DateTime('-2 hours'));\n $this->createTimeRecord(2, new DateTime('-1 hours'), new DateTime('+2 hours'));\n $this->createTimeRecord(4, new DateTime('+3 hours'), new DateTime('+5 hours'));\n\n $this->createTimeRecord(2, new DateTime('-3 hours'), new DateTime('-2 hours'));\n $this->createTimeRecord(5, new DateTime('-1 hours'), new DateTime('+2 hours'));\n $this->createTimeRecord(1, new DateTime('+3 hours'), new DateTime('+5 hours'));\n\n $this->createTimeRecord(6, new DateTime('-3 hours'), new DateTime('-2 hours'));\n $this->createTimeRecord(2, new DateTime('-1 hours'), new DateTime('+2 hours'));\n $this->createTimeRecord(1, new DateTime('+3 hours'), new DateTime('+5 hours'));\n }\n }", "public function produceTimeSchdule($departureStation, $endStation, $departureTime, $endTime): schedule\\TimeSchedule\n {\n # produce time schdule without Time restriction..\n $this->timeSchdule = new schedule\\TimeSchedule($departureStation, $endStation, NULL, NULL);\n $sql = \"SELECT ID, name from trains\";\n $stmt =$this->connect()->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll();\n foreach ($results as $value) {\n $trainID = strtolower($value[\"ID\"]);\n $sqlQ =\"SELECT *\n FROM $trainID\n WHERE station IN ('$departureStation','$endStation')\n ORDER BY orderStation\";\n $stmtQ =$this->connect()->prepare($sqlQ);\n $stmtQ->execute();\n $trainDetails = $stmtQ->fetchAll();\n if($trainDetails && $stmtQ->rowCount() == 2){\n if ($trainDetails[0][\"station\"] == $departureStation && $trainDetails[1][\"station\"] == $endStation) {\n $amount = explode(\",\",$trainDetails[1][\"ticketPrice\"])[$trainDetails[0][\"orderStation\"] - 1];\n $this->timeSchdule->addTrain(new schedule\\TrainSchdule($trainID, $value[\"name\"],$amount, $trainDetails[0][\"arrivalTime\"], $trainDetails[1][\"arrivalTime\"]));\n }\n }\n $trainIDReturn = strtolower($value[\"ID\"]).\"returns\";\n $sqlQ =\"SELECT *\n FROM $trainIDReturn\n WHERE station IN ('$departureStation','$endStation')\n ORDER BY orderStation\";\n $stmtQ =$this->connect()->prepare($sqlQ);\n $stmtQ->execute();\n $trainDetails = $stmtQ->fetchAll();\n if($trainDetails && $stmtQ->rowCount() == 2){\n if ($trainDetails[0][\"station\"] == $departureStation && $trainDetails[1][\"station\"] == $endStation) {\n $amount = explode(\",\",$trainDetails[1][\"ticketPrice\"])[$trainDetails[0][\"orderStation\"] - 1];\n $this->timeSchdule->addTrain(new schedule\\TrainSchdule($trainID, $value[\"name\"],$amount, $trainDetails[0][\"arrivalTime\"], $trainDetails[1][\"arrivalTime\"]));\n }\n }\n }\n return $this->timeSchdule;\n }", "protected function schedule(Schedule $schedule){\n// $schedule->command('report:creditCheckDaily')->dailyAt('12:00');\n $schedule->command('report:creditCheckDaily')->dailyAt('16:00');\n $schedule->command('report:creditCheckDaily')->dailyAt('19:30');\n \n// $schedule->command('report:movein')->dailyAt('12:00');\n $schedule->command('report:movein')->dailyAt('16:00');\n $schedule->command('report:movein')->dailyAt('19:30');\n \n $schedule->command('report:moveout')->dailyAt('16:00');\n $schedule->command('report:moveout')->dailyAt('19:30');\n \n $schedule->command('report:vacancy')->dailyAt('7:00');\n $schedule->command('report:violation')->dailyAt('7:00');\n \n $schedule->command('tenant:massiveBilling')->monthlyOn('27', '23:50');\n $schedule->command('tenant:statementByGroup')->dailyAt('5:00');\n $schedule->command('tenant:updateStatus')->dailyAt('01:00');\n $schedule->command('general:RefreshTenantRent')->dailyAt('02:00');\n \n ##### CASHIER CHECK PRINTING #####\n// $schedule->command('accoutPayable:cashierCheck')->everyFiveMinutes();\n \n \n ##### REINDEX ALL DATA IN ELASTIC #####\n// $schedule->command('general:elasticReindex')->monthlyOn('27', '21:50');\n ##### FOR TESTING SECTION #####\n// $schedule->command('report:vacancy')->everyMinute();\n \n ##### FOR ONE TIME RUN ONLY #####\n// $schedule->command('general:elasticReindex credit_check_view')->monthlyOn('22', '2:50');\n }", "public function schedule()\n {\n $string = '';\n $from = Carbon::createFromFormat('Y-m-d', $this->startDate()->format('Y-m-d'));\n $to = Carbon::createFromFormat('Y-m-d', $this->endDate()->format('Y-m-d'));\n\n $start = $this->startDate()->setTimeZone(new DateTimeZone('Europe/Amsterdam'));\n $end = $this->endDate()->setTimeZone(new DateTimeZone('Europe/Amsterdam'));\n\n $string .= $start->format('d');\n\n // Display month and year only twice if necessary\n if ($from->month != $to->month) {\n $string .= $start->format(' F');\n }\n\n // Check if the end date is different\n if ($from->format('Y-m-d') != $to->format('Y-m-d')) {\n $string .= ' - ' . $end->format('d F');\n } else {\n $string .= $end->format(' F');\n }\n\n // Show time if the activity isn't on the whole day\n if ($this->startDate()->format('H:i') !== '00:00') {\n $string .= ' at ' . $start->format('H:i');\n }\n\n return $string;\n }", "public function exportshifttableAction() {\n //locale Timoutzeit auf 60sek erhoeht\n //get data\n $data = $this->getRequest()->getParams();\n $model = $this->_getModel();\n\n //Locations\n $locations = $model->getAllLocations();\n //Events\n $events = $model->getAllEvents();\n\n //Variablen\n $time = time(); //Zur Zeitberechnung\n $zeit_begin = 20; //Um wie viel Uhr sollder Schichtplan beginnen\n $zeit_stunden = 15; //Wie viele Stunden\n $akt_zeile = 2;\n $event_zeile = 0;\n $location_zeile = 0;\n $begin_zelle_schichten = 12;\n $masterplan = array();\n //$masterplan[zeile][spalten]\n //\t0 1\t 2 3 4 5 6 7 8 9 10 11 12-\n //\tid, raum, farbe, eventname, kat, ansprechpartner, ma bedarf, ma bedarf ist, MA diff, anmerkung, name, anmerkungen, schichtuebersicht\n //Daten holen\n foreach ($locations as $location) {\n\n //schwarze Zeile\n //for($i=0;$i<$begin_zelle_schichten+$zeit_stunden*4;$i++) $masterplan[$akt_zeile][$i]=0;\n //$masterplan[$akt_zeile][1]=\"black_row\";\n //$akt_zeile=$akt_zeile+1;\n for ($i = 0; $i < $begin_zelle_schichten + $zeit_stunden * 4; $i++)\n $masterplan[$akt_zeile][$i] = 0;\n\n $location_zeile = $akt_zeile;\n\n $masterplan[$akt_zeile][0] = $location ['ID'];\n $masterplan[$akt_zeile][1] = $location ['name'];\n $color = preg_split('//', $location['color'], -1, PREG_SPLIT_NO_EMPTY);\n $masterplan[$akt_zeile][2] = \"FF\" . $color[1] . \"\" . $color[2] . \"\" . $color[3] . \"\" . $color[4] . \"\" . $color[5] . \"\" . $color[6];\n\n\n foreach ($events as $event) {\n\n if ($event['location_name'] == $location['name']) {\n\n $shifts = $model->getShiftsByEventid($event['ID']);\n\n $akt_zeile = $akt_zeile + 1;\n for ($i = 0; $i < $begin_zelle_schichten + $zeit_stunden * 4; $i++)\n $masterplan[$akt_zeile][$i] = 0;\n $event_zeile = $akt_zeile;\n\n $masterplan[$akt_zeile][0] = $masterplan[$location_zeile][0];\n $masterplan[$akt_zeile][1] = $masterplan[$location_zeile][1];\n $masterplan[$akt_zeile][2] = $masterplan[$location_zeile][2];\n\n $masterplan[$akt_zeile][3] = $event['name']; //Eventname\n $masterplan[$akt_zeile][9] = $event['note']; //Eventnotiz\n $masterplan[$akt_zeile][5] = $event['user_fname'] . \" \" . $event['user_lname']; //Event verantwortlicher\n\n $reqstaff = 0;\n $staff = 0;\n\n foreach ($shifts as $shift) {\n\n for ($i = 0; $i < $zeit_stunden * 4; $i++)\n $shift_mark[$i] = 0; //Schichtmarkierung leeren\n\n $start_h = 0;\n $start_m = 0;\n $end_h = 0;\n $end_m = 0;\n $anfang = 0;\n $ende = 0;\n\n\n $akt_zeile = $akt_zeile + 1;\n for ($i = 0; $i < $begin_zelle_schichten + $zeit_stunden * 4; $i++)\n $masterplan[$akt_zeile][$i] = 0;\n\n $masterplan[$akt_zeile][0] = $masterplan[$location_zeile][0];\n $masterplan[$akt_zeile][1] = $masterplan[$location_zeile][1];\n $masterplan[$akt_zeile][2] = $masterplan[$location_zeile][2];\n $masterplan[$akt_zeile][3] = $masterplan[$event_zeile][3];\n $masterplan[$akt_zeile][5] = $masterplan[$event_zeile][5];\n\n $masterplan[$akt_zeile][10] = $shift['name'];\n\n //benötigte MA\n $regstaff_shift = $shift['reqstaff'];\n $reqstaff = $reqstaff + $regstaff_shift;\n $masterplan[$akt_zeile][6] = $regstaff_shift;\n\n //vorhandene MA\n $user_shifts = $model->getUsersOfShift($shift['ID']);\n $user_shifts = count($user_shifts);\n $staff = $staff + $user_shifts;\n $masterplan[$akt_zeile][7] = $user_shifts;\n\n //Differenz MA\n $staff_diff = $regstaff_shift - $user_shifts;\n $masterplan[$akt_zeile][8] = $staff_diff;\n\n //Schichtanmerkung\n $masterplan[$akt_zeile][9] = $shift['note'];\n\n //Schichtzeiten 2009-06-26 20:30:00\n $shiftstart_tmp = explode(' ', $shift['start']);\n $shiftstart = explode(':', $shiftstart_tmp['1']);\n $shiftend_tmp = explode(' ', $shift['end']);\n $shiftend = explode(':', $shiftend_tmp['1']);\n //Schichtanfang\n if ($shiftstart[0] >= $zeit_begin - 4)\n $anfang = ($shiftstart[0] - $zeit_begin) * 4 + ($shiftstart[1] - $shiftstart[1] % 15) / 15;\n else\n $anfang = (24 - $zeit_begin) * 4 + ($shiftstart[0]) * 4 + ($shiftstart[1] - $shiftstart[1] % 15) / 15;\n\n //Schichtende\n if ($shiftend[0] >= $zeit_begin)\n $ende = ($shiftend[0] - $zeit_begin) * 4 + ($shiftend[1] - $shiftend[1] % 15) / 15;\n else\n $ende = (24 - $zeit_begin) * 4 + ($shiftend[0]) * 4 + ($shiftend[1] - $shiftend[1] % 15) / 15;\n\n for ($i = 0; $i < $zeit_stunden * 4; $i++)\n if ($i >= $anfang && $i < $ende) {\n $masterplan[$akt_zeile][$i + $begin_zelle_schichten] = 1;\n $masterplan[$event_zeile][$i + $begin_zelle_schichten] = 1;\n } else {\n $masterplan[$akt_zeile][$i + $begin_zelle_schichten] = 0;\n //$masterplan[$event_zeile][$i]=$masterplan[$event_zeile][$i];\n }\n }\n //foreach ( $shifts as $shift )\n\n $masterplan[$event_zeile][6] = $reqstaff; //Gesamt MA benötigt\n $masterplan[$event_zeile][7] = $staff; //gesamt MA\n $masterplan[$event_zeile][8] = $reqstaff - $staff; //gesamt MA diff\n }\n //if($event['location_name']==$location['name'])\n }\n //foreach ( $events as $event )\n\n $akt_zeile = $akt_zeile + 1;\n }\n //foreach ( $locations as $location )\n\n echo \"Zeit für Daten:\" . (time() - $time) . \"<br>\";\n\n //EXCEL Daten\n require(\"../Excel/PHPExcel.php\");\n\n //$workbook = new PHPExcel();\n $workbook = PHPExcel_IOFactory::load('excel/templates/masterplan.xls');\n\n\n // Das worksheet anwaehlen und Namen aendern\n $worksheet = $workbook->setActiveSheetIndex(0);\n $worksheet->setTitle(\"Raum-Aktionen-Schichten 2010\");\n\n $col_names = Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AO', 'AP', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AV', 'AW', 'AX', 'AY', 'AZ', 'BA', 'BB', 'BC', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BK', 'BL', 'BM', 'BN', 'BO', 'BP', 'BQ', 'BR', 'BS', 'BT', 'BU', 'BV', 'BW', 'BX', 'BY', 'BZ');\n\n $akt_zeile = 1;\n\n\n //Formatierung\n $format_header = array(\n 'font' => array(\n 'bold' => true,\n 'color' => array('argb' => 'FFFFFFFF',),),\n 'alignment' => array('wrap' => true,),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'startcolor' => array('argb' => 'FF000000',),),\n );\n $format_black_row = array(\n 'font' => array(\n 'color' => array('argb' => 'FFFFFFFF',),\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'startcolor' => array('argb' => 'FF000000',),\n ),\n );\n\n $location = \"\";\n $location_color = \"\";\n $location_zeile = \"1\";\n $event = \"\";\n $event_zeile = \"2\";\n\n foreach ($masterplan as $master) {\n $akt_zeile = $akt_zeile + 1;\n\n if ($master[0] != $location) {\n\n if ($akt_zeile > 1) {\n if ($akt_zeile > 2 && $event_zeile < ($akt_zeile - 1)) {\n //für das letzte Event der vorherigen Schicht\n //Zellen verbinden senkrecht\n $zellen = $col_names[2] . \"\" . $event_zeile . \":\" . $col_names[2] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[3] . \"\" . $event_zeile . \":\" . $col_names[3] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[4] . \"\" . $event_zeile . \":\" . $col_names[4] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[5] . \"\" . $event_zeile . \":\" . $col_names[5] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[6] . \"\" . $event_zeile . \":\" . $col_names[6] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n\n $zellen = \"C\" . $event_zeile . \":\" . $col_names[$begin_zelle_schichten + $zeit_stunden * 4] . \"\" . $event_zeile;\n $worksheet->getStyle($zellen)->getBorders()->getTop()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);\n }\n\n if ($akt_zeile > 2) {\n //Schwarze Zeile\n for ($i = 0; $i < $begin_zelle_schichten + 1; $i++) {\n $zellen = $col_names[$i] . \"\" . $akt_zeile;\n //$worksheet->getStyle($zellen)->applyFromArray($format_black_row);\n $worksheet->getStyle($zellen)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n $worksheet->getStyle($zellen)->getFill()->getStartColor()->setARGB('FF000000');\n $worksheet->getStyle($zellen)->getFont()->getColor()->setARGB('FFFFFFFF');\n $worksheet->setCellValue($zellen, \"=\" . $col_names[$i] . \"1\");\n }\n for ($i = 0; $i < $zeit_stunden * 4; $i++) {\n if (($i % 4) == 0) {\n $zellen = $col_names[$begin_zelle_schichten + $i + 1] . \"\" . $akt_zeile . \":\" . $col_names[$begin_zelle_schichten + $i + 3 + 1] . \"\" . $akt_zeile;\n $worksheet->mergeCells($zellen);\n $worksheet->getStyle($zellen)->applyFromArray($format_black_row);\n $zellen = $col_names[$begin_zelle_schichten + $i + 1] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, \"=\" . $col_names[$begin_zelle_schichten + $i + 1] . \"1\");\n }\n }\n //$zellen = $col_names[$i+1].\"\".$akt_zeile;\n //$zellen = \"B\".$akt_zeile.\":\".$col_names[$begin_zelle_schichten+($zeit_stunden)*4-1+1].\"\".$akt_zeile;\n //$worksheet->mergeCells($zellen);\n //$worksheet->getStyle($zellen)->applyFromArray($format_black_row);\n } else {\n $zellen = \"B\" . $akt_zeile . \":\" . $col_names[$begin_zelle_schichten + ($zeit_stunden) * 4 - 1 + 1] . \"\" . $akt_zeile;\n $worksheet->mergeCells($zellen);\n $worksheet->getStyle($zellen)->applyFromArray($format_black_row);\n }\n\n\n //Zellen verbinden senkrecht farbigeLocation\n $zellen = $col_names[1] . \"\" . $location_zeile . \":\" . $col_names[1] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n\n $zellen = $col_names[1] . \"\" . $location_zeile;\n $worksheet->getStyle($zellen)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n $worksheet->getStyle($zellen)->getFill()->getStartColor()->setARGB($location_color);\n\n\n $akt_zeile = $akt_zeile + 1; //Neue Location\n\n $location = $master[0];\n $location_zeile = $akt_zeile;\n $location_color = $master[2];\n $event_zeile = $location_zeile + 1;\n $event = \"\";\n\n $zellen = $col_names[1] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[1]);\n\n //Zellen verbinden waagerecht\n $zellen = \"C\" . $location_zeile . \":\" . $col_names[$begin_zelle_schichten - 1 + 1] . \"\" . $location_zeile;\n $worksheet->mergeCells($zellen); //Zellen verbinden\n $worksheet->getStyle($zellen)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n $worksheet->getStyle($zellen)->getFill()->getStartColor()->setARGB($location_color);\n }\n } else {\n\n if ($master[3] != $event) {\n //Eventzeile\n if ($event_zeile != $akt_zeile) {\n //Zellen verbinden senkrecht\n $zellen = $col_names[2] . \"\" . $event_zeile . \":\" . $col_names[2] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[3] . \"\" . $event_zeile . \":\" . $col_names[3] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[4] . \"\" . $event_zeile . \":\" . $col_names[4] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[5] . \"\" . $event_zeile . \":\" . $col_names[5] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n //Zellen verbinden senkrecht\n $zellen = $col_names[6] . \"\" . $event_zeile . \":\" . $col_names[6] . \"\" . ($akt_zeile - 1);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n\n $zellen = \"C\" . $event_zeile . \":\" . $col_names[$begin_zelle_schichten + $zeit_stunden * 4] . \"\" . $event_zeile;\n $worksheet->getStyle($zellen)->getBorders()->getTop()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);\n }\n $event_zeile = $akt_zeile;\n $event = $master[3];\n\n $zellen = $col_names[2] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[3]);\n if ($master[4] != \"0\") {\n $zellen = $col_names[3] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[4]);\n }\n if ($master[5] != \"0\") {\n $zellen = $col_names[4] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[5]);\n }\n $zellen = $col_names[5] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[6]);\n $zellen = $col_names[6] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[7]);\n $ma_diff = $master[6] - $master[7];\n $zellen = $col_names[9] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $ma_diff);\n if ($ma_diff > 0)\n $worksheet->getStyle($zellen)->getFont()->getColor()->setARGB('FFFF0000');\n $zellen = $col_names[10] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[9]);\n }\n else {\n //Einzelne Schichten\n $zellen = $col_names[5] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[6]);\n $zellen = $col_names[6] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[7]);\n $ma_diff = $master[6] - $master[7];\n $zellen = $col_names[9] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $ma_diff);\n $zellen = $col_names[12] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[9]);\n $zellen = $col_names[11] . \"\" . $akt_zeile;\n $worksheet->setCellValue($zellen, $master[10]);\n $worksheet->getRowDimension($akt_zeile)->setVisible(false);\n }\n\n\n //Schichtplan\n $schicht_tmp = 0;\n for ($i = $begin_zelle_schichten; $i < $begin_zelle_schichten + $zeit_stunden * 4; $i++) {\n $zellen = $col_names[$i + 1] . \"\" . $akt_zeile;\n\n if ($master[$i] != \"0\") {\n\n $worksheet->getStyle($zellen)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n $worksheet->getStyle($zellen)->getFill()->getStartColor()->setARGB($location_color);\n //$worksheet->setCellValue($zellen, $master[$i]);print\n\n if ($i % 4 == 0) {\n //$zellen = $col_names[$begin_zelle_schichten+$i+1].\"1:\".$col_names[$begin_zelle_schichten+$i+1].\"\".$akt_zeile;\n //$zellen = \"N1:N\".$akt_zeile;\n $worksheet->getStyle($zellen)->getBorders()->getLeft()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);\n }\n } else {\n if ($i % 4 == 0) {\n $worksheet->getStyle($zellen)->getBorders()->getLeft()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);\n }\n }\n\n $schicht_tmp = $master[$i];\n }\n }\n }\n\n //Zellen verbinden senkrecht farbigeLocation für das letztes event\n $location_color = $master[2];\n $zellen = $col_names[1] . \"\" . $location_zeile . \":\" . $col_names[1] . \"\" . ($akt_zeile);\n $worksheet->mergeCells($zellen); //Zellen verbinden\n $worksheet->getStyle($zellen)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n $worksheet->getStyle($zellen)->getFill()->getStartColor()->setARGB($location_color);\n\n //druckbereich festlegen\n $zellen = \"B1:\" . $col_names[$begin_zelle_schichten + $zeit_stunden * 4] . \"\" . $akt_zeile;\n //echo $zellen;\n $worksheet->getPageSetup()->setPrintArea($zellen);\n //und das ganze speichern\n $writer = PHPExcel_IOFactory::createWriter($workbook, \"Excel5\");\n //$writer=PHPExcel_IOFactory::createWriter($workbook,\"Excel2007\");\n $writer->save(\"excel/test.xls\");\n\n $time = time() - $time;\n echo \"Zeit komplett:\" . ($time) . \"<br>\";\n echo \"<a href=\\\"../excel/test.xls\\\">download XLS</a>\";\n }", "private function generate()\n\t{\n\t\t$semester = Session::get('overview_schedule_semester');\n\t\t$specialistregulationId = Session::get('overview_schedule_specialistregulation');\n\t\t$turnId = Session::get('overview_schedule_turn');\n\n\t\t$coursetypes = CourseType::lists('short','id');\n\t\t// Get all lectures\n\t\tif ($semester > 0) {\n\t\t\t// for specific semester of a degree course\n\t\t\t$events = DB::table('planning_room')\n\t\t\t\t\t->join('plannings','plannings.id', '=', 'planning_room.planning_id')\n\t\t\t\t\t->join('courses', 'courses.id', '=', 'plannings.course_id')\n\t\t\t\t\t->join('module_specialistregulation','module_specialistregulation.module_id','=','courses.module_id')\n\t\t\t\t\t->join('modules', 'modules.id','=','module_specialistregulation.module_id')\n\t\t\t\t\t->join('rooms', 'rooms.id', '=','planning_room.room_id')\n\t\t\t\t\t->select('plannings.group_number', 'modules.short', 'rooms.name AS rname', 'courses.name AS cname', 'plannings.course_number', 'courses.coursetype_id', 'planning_room.weekday', 'planning_room.start_time', 'planning_room.end_time','module_specialistregulation.section')\n\t\t\t\t\t->where('plannings.turn_id','=',$turnId)\n\t\t\t\t\t->where('module_specialistregulation.specialistregulation_id','=', $specialistregulationId)\n\t\t\t\t\t->where('module_specialistregulation.semester','=', $semester)\n\t\t\t\t\t->where('courses.coursetype_id', '=', 1)\n\t\t\t\t\t->get();\n\t\t} else {\n\t\t\t// for all semesters of a degree course\n\t\t\t$events = DB::table('planning_room')\n\t\t\t\t\t->join('plannings','plannings.id', '=', 'planning_room.planning_id')\n\t\t\t\t\t->join('courses', 'courses.id', '=', 'plannings.course_id')\n\t\t\t\t\t->join('module_specialistregulation','module_specialistregulation.module_id','=','courses.module_id')\n\t\t\t\t\t->join('modules', 'modules.id','=','module_specialistregulation.module_id')\n\t\t\t\t\t->join('rooms', 'rooms.id', '=','planning_room.room_id')\n\t\t\t\t\t->select('plannings.group_number', 'modules.short', 'rooms.name AS rname', 'courses.name AS cname', 'plannings.course_number', 'courses.coursetype_id', 'planning_room.weekday', 'planning_room.start_time', 'planning_room.end_time','module_specialistregulation.section')\n\t\t\t\t\t->where('plannings.turn_id','=',$turnId)\n\t\t\t\t\t->where('module_specialistregulation.specialistregulation_id','=', $specialistregulationId)\n\t\t\t\t\t->where('courses.coursetype_id', '=', 1)\n\t\t\t\t\t->groupBy('planning_room.id') // Important\n\t\t\t\t\t->get();\n\t\t}\n\t\t// generate the output\n\t\t$output = array();\n\t\tforeach ($events as $event) {\n\t\t\t$e = array();\n\t\t\t$e['title'] = $event->course_number. ' '.$coursetypes[$event->coursetype_id].' '.$event->short.' ('.$event->rname.')';\n\t\t\t$day = $this->getWeekdayDate($event->weekday);\n\t\t\t$e['start'] = $day.'T'.$event->start_time;\n\t\t\t$e['end'] = $day.'T'.$event->end_time;\n\t\t\tif ($event->section == 1) {\n\t\t\t\tif ($event->coursetype_id == 1) {\n\t\t\t\t\t$e['backgroundColor'] = '#32CD32';\n\t\t\t\t\t$e['borderColor'] = '#228B22';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$e['backgroundColor'] = '#BA55D3';\n\t\t\t\t$e['borderColor'] = '#4B0082';\n\t\t\t}\n\t\t\tarray_push($output, $e);\n\t\t}\n\t\t// get all course types except lectures\n\t\tif ($semester > 0)\n\t\t{\n\t\t\t// for a specific semester of a degree course\n\t\t\t$events = DB::table('planning_room')\n\t\t\t\t->join('plannings','plannings.id', '=', 'planning_room.planning_id')\n\t\t\t\t->join('courses', 'courses.id', '=', 'plannings.course_id')\n\t\t\t\t->join('module_specialistregulation','module_specialistregulation.module_id','=','courses.module_id')\n\t\t\t\t->join('modules', 'modules.id','=','module_specialistregulation.module_id')\n\t\t\t\t->join('rooms', 'rooms.id', '=','planning_room.room_id')\n\t\t\t\t->select('plannings.group_number', 'modules.short', 'rooms.name AS rname', 'courses.name AS cname', 'plannings.course_number', 'courses.coursetype_id', 'planning_room.weekday', 'planning_room.start_time', 'planning_room.end_time','module_specialistregulation.section')\n\t\t\t\t->where('plannings.turn_id','=',$turnId)\n\t\t\t\t->where('module_specialistregulation.specialistregulation_id','=', $specialistregulationId)\n\t\t\t\t->where('module_specialistregulation.semester','=', $semester)\n\t\t\t\t->whereNotIn('courses.coursetype_id', array(1))\n\t\t\t\t->orderBy('module_specialistregulation.module_id', 'ASC')\n\t\t\t\t->orderBy('plannings.course_number','ASC')\n\t\t\t\t->orderBy('plannings.group_number','ASC')\n\t\t\t\t->get();\n\t\t} else {\n\t\t\t// for all semesters of a degree course\n\t\t\t$events = DB::table('planning_room')\n\t\t\t\t->join('plannings','plannings.id', '=', 'planning_room.planning_id')\n\t\t\t\t->join('courses', 'courses.id', '=', 'plannings.course_id')\n\t\t\t\t->join('module_specialistregulation','module_specialistregulation.module_id','=','courses.module_id')\n\t\t\t\t->join('modules', 'modules.id','=','module_specialistregulation.module_id')\n\t\t\t\t->join('rooms', 'rooms.id', '=','planning_room.room_id')\n\t\t\t\t->select('plannings.group_number', 'modules.short', 'rooms.name AS rname', 'courses.name AS cname', 'plannings.course_number', 'courses.coursetype_id', 'planning_room.weekday', 'planning_room.start_time', 'planning_room.end_time','module_specialistregulation.section')\n\t\t\t\t->where('plannings.turn_id','=',$turnId)\n\t\t\t\t->where('module_specialistregulation.specialistregulation_id','=', $specialistregulationId)\n\t\t\t\t->whereNotIn('courses.coursetype_id', array(1))\n\t\t\t\t->orderBy('module_specialistregulation.module_id', 'ASC')\n\t\t\t\t->orderBy('plannings.course_number','ASC')\n\t\t\t\t->orderBy('plannings.group_number','ASC')\n\t\t\t\t->get();\n\t\t}\n\t\t$module_short = \"\";\n\t\t$weekday = \"\";\n\t\t$starttime = \"\";\n\t\t$group_number = \"\";\n\t\t$e = array();\n\t\tforeach ($events as $event) {\n\t\t\t// check if it's the course id, group number\n\t\t\tif (\n\t\t\t\t$event->short != $module_short || \n\t\t\t\t(\n\t\t\t\t\t$weekday != $event->weekday || \n\t\t\t\t\t$starttime != $event->start_time\n\t\t\t\t) || \n\t\t\t\t$event->group_number != $group_number\n\t\t\t) {\n\t\t\t\tif (sizeof($e) > 0) {\n\t\t\t\t\tif ($event->section == 2) {\n\t\t\t\t\t\t$e['backgroundColor'] = '#BA55D3';\n\t\t\t\t\t\t$e['borderColor'] = '#4B0082';\n\t\t\t\t\t}\n\t\t\t\t\tarray_push($output, $e);\n\t\t\t\t}\n\n\t\t\t\t$module_short = $event->short;\n\t\t\t\t$weekday = $event->weekday;\n\t\t\t\t$starttime = $event->start_time;\n\t\t\t\t$group_number = $event->group_number;\n\t\t\t\t$e = array();\n\t\t\t\t$e['title'] = $event->course_number. ' '.$coursetypes[$event->coursetype_id].'-'.$event->group_number.' '.$event->short.' '.$event->rname;\n\t\t\t\t$day = $this->getWeekdayDate($event->weekday);\n\t\t\t\t$e['start'] = $day.'T'.$event->start_time;\n\t\t\t\t$e['end'] = $day.'T'.$event->end_time;\n\t\t\t} else {\n\t\t\t\t$e['title'] .= ', '.$event->rname;\n\t\t\t}\n\t\t}\n\n\t\tif (sizeof($e) > 0) {\n\t\t\tif ($event->section == 2) {\n\t\t\t\t$e['backgroundColor'] = '#BA55D3';\n\t\t\t\t$e['borderColor'] = '#4B0082';\n\t\t\t}\n\t\t\tarray_push($output, $e); // to push the last exercise group in the array\n\t\t}\n\n\t\treturn $output;\n\t}", "function PrintSchedule($assignedJobs, $flatmates, $weekNumber, $newLineString)\n{\n//go through each flat mate and tell them of their new duties\n foreach ($assignedJobs as $flatmateIndex => $jobsToDo)\n {\n $flatemate = $flatmates[$flatmateIndex];\n $message = \"\";\n\n foreach ($jobsToDo as $loopedJob)\n {\n $message .= $loopedJob->Title;\n\n if ($loopedJob->SpecialWeekOffset != -1 && $weekNumber % 2 ==$loopedJob->SpecialWeekOffset)\n {\n $message .= \", \" . $loopedJob->SpecialWeekText;\n }\n\n $message .= $newLineString;\n }\n\n echo \"<h2>\" . $flatemate->Name . \"</h2>\";\n echo $message;\n }\n}", "protected function schedule(Schedule $schedule)\n {\n //1. 產生 教育訓練資格 通過<每30分鐘檢查>\n //$schedule->command('httc:coursepass')->hourlyAt('15')->between('5:00', '23:00')->withoutOverlapping();\n //2. 產生 教育訓練 過期<每天 00:10>\n //$schedule->command('httc:courseoverdate')->dailyAt('00:10')->withoutOverlapping();\n //3. 產生 工程身份 過期<每天 00:15>\n //$schedule->command('httc:identityoverdate')->dailyAt('00:15')->withoutOverlapping();\n //4. 產生 工程案件 過期<每天 00:20>\n //$schedule->command('httc:projectoverdate')->dailyAt('00:20')->withoutOverlapping();\n\n\n //100. 通知 當日工作許可證尚未審查 <每天 15:00>\n //$schedule->command('httc:permitworkpush1')->dailyAt('15:00')->withoutOverlapping();\n //101. 通知 當日工作許可證尚未啟動 <每天 10:00>\n //$schedule->command('httc:permitworkpush2')->dailyAt('10:00')->withoutOverlapping();\n //102. 通知 當日工作許可證定期氣體偵測 <每天 一個小時>\n $schedule->command('httc:permitworkpush3')->hourly()->between('00:00', '23:00')->unlessBetween('12:00','13:00')->unlessBetween('17:00','18:00')->withoutOverlapping();\n //104. 通知 當日工作許可證定期離場通知 <每天 一個小時>\n $schedule->command('httc:permitworkpush4')->hourly()->between('00:00', '23:00')->unlessBetween('12:00','13:00')->unlessBetween('17:00','18:00')->withoutOverlapping();\n \n // 修正門禁進出紀錄資料\n $schedule->command('httc:fixlogdoorinout')->hourlyAt('0')->withoutOverlapping();\n }", "public function OutputSchedule($RETURN=false)\n {\n \n $date = ($this->existing_records_date) ? $this->existing_records_date : date('Y-m-d');\n $date = $this->datefmt($date, 'yyyy-mm-dd', \"l, M j, Y\");\n \n $OUTPUT = <<<OUTPUT\n <div style='display:none;'>\n <div id=\"result_send\" style='border:1px solid blue;'></div>\n <div id=\"result_receive\" style='border:1px solid green;'></div>\n </div>\n \n <div style=\"clear:both;\"></div>\n \n <div style='font-size:16px; font-weight:bold; padding:10px; background-color:#f9f9f9;'>Date: {$date}</div>\n <div id=\"master\">\n {$this->rowData}\n </div>\n <div id=\"course_details_all\" style=\"display:none;\">\n {$this->courseDetailsData}\n </div>\n \n <script type='text/javascript'>\n SetInstructorPictures('900001|900003|900005|900007');\n </script>\n \nOUTPUT;\n//<script type='text/javascript'>ReapplyJqueryFunctionalityToObjects();</script>\n\n if ($RETURN) {\n return $OUTPUT;\n } else {\n echo $OUTPUT;\n }\n }", "public function run()\n {\n $schedules = [\n 'Prospecting' => 'standard',\n 'Email Only' => 'standard',\n 'Qualified' => 'standard',\n 'Interested'=> 'standard',\n 'Dnc' => 'support',\n 'Custom Step' => 'support',\n 'Completed' => 'support',\n ];\n\n foreach ($schedules as $name => $value) {\n Schedule::create([\n 'name' => $name,\n 'type' => $value\n ]);\n };\n }", "protected function schedule(Schedule $schedule)\n {\n //Current\n $schedule->command('summit:json-generator')->everyFiveMinutes()->withoutOverlapping();\n /**\n * REMARK : remember to add new summit ids before they start officially\n */\n $summit_ids = [\n 6, //Austin\n 7, //BCN\n 22, //Boston\n 23, //Sydney\n 24, //Vancouver BC\n 25, //Berlin\n 26, //Denver,\n 27, //Shanghai\n ];\n\n foreach ($summit_ids as $summit_id)\n $schedule->command('summit:json-generator',[$summit_id])->everyFiveMinutes()->withoutOverlapping();\n\n // list of available summits\n $schedule->command('summit-list:json-generator')->everyFiveMinutes()->withoutOverlapping();\n\n // Calendar Sync Jobs\n\n // Admin Actions\n $schedule->command('summit:admin-schedule-action-process')->withoutOverlapping();\n // Member Actions\n // Google Calendar\n $schedule->command('summit:member-schedule-action-process', [CalendarSyncInfo::ProviderGoogle, 1000])->withoutOverlapping();\n // Outlook\n $schedule->command('summit:member-schedule-action-process', [CalendarSyncInfo::ProviderOutlook, 1000])->withoutOverlapping();\n // iCloud\n $schedule->command('summit:member-schedule-action-process', [CalendarSyncInfo::ProvideriCloud, 1000])->withoutOverlapping();\n\n // redeem code processor\n\n //$schedule->command('summit:promo-codes-redeem-processor', [end($summit_ids)])->daily()->withoutOverlapping();\n\n // bookable rooms\n\n $schedule->command('summit:room-reservation-revocation')->everyFiveMinutes()->withoutOverlapping();\n // external schedule ingestion task\n\n $schedule->command(\"summit:external-schedule-feed-ingestion-process\")->everyFifteenMinutes()->withoutOverlapping();\n\n // registration orders\n\n $schedule->command('summit:order-reservation-revocation')->everyFiveMinutes()->withoutOverlapping();\n\n // reminder emails\n\n $schedule->command('summit:registration-order-reminder-action-email')->everyThirtyMinutes()->timezone(new \\DateTimeZone('UTC'))->withoutOverlapping();\n }", "function schedule ($data){\n // An associate array to insert any course scheduled \n $assigned = [];\n // A two demensional array report table cell status true/taken false/free\n // A 7 x 17 grid \n $status = array_fill(0, 17 , array_fill(0, 7, 0));\n //data array size\n $size = count($data);\n\n \n function sectionAssign($courseInfo,&$assigned)\n {\n global $data;\n if(count($assigned) == 0)\n {\n // array contains weekdays \n $assignedProperties = [];\n foreach($courseInfo as $arr){\n array_push($assignedProperties,$arr);\n }\n\n array_push($assigned,$assignedProperties);\n }\n $courseInfoSize = count($courseInfo);\n // for($i = 0; $i < $courseInfoSize; ++$i)\n // {\n // $section = strval(rand(7,23));\n // if (strlen($section) == 1 || strlen($section) == 2) {\n // $section = (strlen($section) < 2 && strlen($section) >= 1) ?\n // '0'.$section.$data[i][3].rand(0,7) :\n // $section.$data[i][3].rand(0,7);\n // } else {\n // echo \"Invalid section number creation\";\n // }\n \n // $section = $section.rand(0,7).rand(1,2);\n \n // array_push($data[$i],$section);\n // }\n }\n\n // if breakdown days is one\n // function breakDownToOneDay($courseInfo)\n // {\n // return -1;\n // }\n\n // // if breakdow days is two\n // function breakDownToOneDay($courseInfo)\n // {\n // return -1;\n // }\n\n\n // //implementation\n // for($i = 0; $i < size; ++$i)\n // {\n\n // }\n \n foreach($data as $i){\n sectionAssign($i,$assigned);\n }\n echo \"<pre>\";\n print_r($assigned);\n echo \"</pre>\";\n}", "private function parse_schedule(){\n\n }", "function HandleSchedule()\n {\n $this->ReadSubmissions();\n if ($this->CGI_GETOrPOSTint(\"Latex\")==1)\n {\n $this->ApplicationObj()->LatexMode=TRUE;\n $edit=0;\n }\n\n \n $edit=0;\n if (preg_match('/^EditSchedule$/',$this->CGI_GET(\"Action\"))) { $edit=1; }\n \n $start=$end=\"\";\n if ($edit==1)\n {\n $start=$this->StartForm();\n $end=\n $this->MakeHidden(\"Save\",1).\n $this->EndForm().\n \"\";\n }\n\n if ($this->ApplicationObj()->LatexMode)\n {\n $tables=$this->DatesSchedulesTables(0);\n\n $latex=\"\";\n foreach ($tables as $rtables)\n {\n foreach ($rtables as $rlatex)\n {\n $latex.=\n $rlatex.\n \"\\n\\n\\\\clearpage\\n\\n\".\n \"\";\n }\n }\n\n $latex=\n $this->GetLatexSkel(\"Head.Land.tex\").\n $latex.\n $this->GetLatexSkel(\"Tail.tex\").\n \"\";\n \n\n //$this->ShowLatexCode($latex);\n $this->RunLatexPrint\n (\n \"Presences.\".\n //$this->Text2Sort($texfile).\".\".\n $this->MTime2FName().\n \".tex\",\n $latex\n );\n\n exit();\n }\n \n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Schedule_Title\")).\n $this->Html_Table\n (\n \"\",\n array\n (\n $this->HandleScheduleSelectsForm().\n $start.\n join\n (\n $this->BR(),\n $this->DatesSchedulesTables($edit)\n ).\n $end\n )\n ).\n \"\";\n \n }", "protected function generate()\n {\n $this->description = 'Wereld Pi dag';\n\n $this->setupDateTimeObjects($this->generateDateTime($this->year, 3, 14));\n\n $this->totalLength = 1;\n }", "public function handle()\n {\n //every week\n /** @var $task \\App\\Console\\Tasks\\TaskController */\n $task=new \\App\\Console\\Tasks\\TaskController();\n //every month\n $timestamp = time(); \n $now_time = strtotime(date('Y-m-d', strtotime(\"this week Tuesday\", $timestamp))); \n // $end_time = strtotime(date('Y-m-d'),time()); //\n //周报刷新\n $first_time = strtotime(\"-6 month\", $now_time);\n $first_time = strtotime(date('Y-m-d',strtotime(\"this week Tuesday\",$first_time)));\n\n for($i = $first_time; $i <= $now_time;){\n $end_time = $i;\n $start_time = $end_time - 7 * 86400;;\n $start_month = date(\"Y-m\",$start_time);\n $end_month = date(\"Y-m\",$end_time);\n $cur_start = strtotime(date('Y-m-01',$start_time));\n $cur_month = strtotime(date('Y-m-01',$end_time));\n $last_month = strtotime(date('Y-m-01',$cur_start-100));\n $create_time_range = date('Y-m-d H:i:s',$cur_month).'~'.date('Y-m-d H:i:s',$end_time); \n if($start_month == $end_month){ //周报\n $type = 2;\n $create_time = $end_time;//\n $create_time_range = date('Y-m-d H:i:s',$start_time).'~'.date('Y-m-d H:i:s',$end_time);\n }else{//跨月报\n $type = 3;\n $create_time = $end_time;\n $create_time_range = date('Y-m-d H:i:s',$start_time).'~'.date('Y-m-d H:i:s',$end_time);\n } \n if(true){\n $arr = '';\n //C2-计划内续费学生数量 //C4-实际续费学生数量 ////C7-月续费率//C8-月预警续费率\n $warning_list = $task->t_cr_week_month_info->get_student_list_new($type,$start_time);//进入续费预警的学员\n $renew_student_list = $task->t_order_info->get_renew_student_list($cur_month,$now_time);//往后6个月的合同学生数量\n $month_renew_student_list = $task->t_order_info->get_renew_student_list($cur_month,$end_time);//往后1个月的合同学生数量\n $warning_num = 0;\n if($warning_list != 0){\n $warning_list = explode(\",\",$warning_list);\n $warning_num = empty($warning_list) ? 0 : count($warning_list);\n }\n $arr['real_renew_num'] = empty($renew_student_list)?0: count($renew_student_list); // 实际续费学生数量\n if($arr['real_renew_num'] == 0){\n $arr['plan_renew_num'] = 0; //计划内续费学生数量\n $month_plan_renew_num = 0; //计划内续费学生数量\n }else{\n $month_plan_renew_num = 0;\n $arr['plan_renew_num'] = 0;\n if(!empty( $warning_list)){\n foreach($warning_list as $key => $value){\n if(!empty($renew_student_list[$value])){\n ++$arr['plan_renew_num'];\n }\n }\n $month_plan_renew_num = $arr['plan_renew_num'];\n foreach ($month_renew_student_list as $key => $value) {\n if(!empty($warning_list[$value['userid']])){\n ++$month_plan_renew_num;\n }\n }\n }\n }\n $arr['renew_per'] = $warning_num == 0 ? 0:round(100*$month_plan_renew_num/$warning_num,2);// 月续费率\n $arr['finish_renew_per'] = $warning_num == 0 ? 0:round(100*$arr['plan_renew_num']/$warning_num,2);// 月预警续费率\n ////D4-月转介绍至CC签单率\n $month_tranfer_data = $task->t_order_info->get_cr_to_cc_order_num($cur_month,$end_time); //月初至今\n $month_tranfer = $task->t_seller_student_new->get_tranfer_phone_num_new($cur_month,$end_time);\n //$tranfer_total_month = $task->t_seller_student_new->get_tranfer_phone_num_month(strtotime($end_month),$end_time);\n $tranfer_total_month['total_orderid'] = $month_tranfer_data['total_num'];\n $tranfer_total_month['total_num'] = $month_tranfer;\n\n //$tranfer_total_month = $task->t_seller_student_new->get_tranfer_phone_num_month($cur_month,$end_time);\n if($tranfer_total_month['total_num']){\n $arr['tranfer_success_per'] = round(100*$tranfer_total_month['total_orderid']/$tranfer_total_month['total_num'],2); //D4-月转介绍至CC签单率\n }else{\n $arr['tranfer_success_per'] = 0;\n }\n /*$tranfer = $task->t_seller_student_new->get_tranfer_phone_num($cur_month,$end_time);\n $month_tranfer_data = $task->t_order_info->get_cr_to_cc_order_num($cur_month,$now_time); //签单数量(分配例子当月1号到6个月)\n $arr['month_tranfer_total_num'] = $month_tranfer_data['total_num'];\n if($arr['month_tranfer_total_num']){\n $arr['tranfer_success_per'] = round(100*$arr['month_tranfer_total_num']/$tranfer,2); //D4-月转介绍至CC签单率\n }else{\n $arr['tranfer_success_per'] = 0;\n }*/\n //E5-月扩课成功率\n $month_kk = $task->t_test_lesson_subject_sub_list->tongji_kk_data($cur_month,$end_time) ;\n $month_success_num = $task->t_test_lesson_subject_sub_list->tongji_success_order($cur_month,$end_time);\n $arr['month_total_test_lesson_num'] = $month_kk['total_test_lesson_num']; //E1-扩课试听数量\n $arr['month_success_num'] = $month_success_num; //E2-扩课成单数量\n if($arr['month_total_test_lesson_num']){\n $arr['kk_success_per'] = round(100*$arr['month_success_num']/$arr['month_total_test_lesson_num'],2);//E5-月扩课成功率\n }else{\n $arr['kk_success_per'] = 0;\n }\n $insert_data = [\n \"create_time\" => $create_time, //存档时间\n \"create_time_range\" => $create_time_range, //存档时间范围\n \"type\" => 4, //存档类型\n \"plan_renew_num\" => $arr['plan_renew_num'], //C2-计划内续费学生数量\n \"real_renew_num\" => $arr['real_renew_num'], //C4-实际续费学生数量\n \"renew_per\" => intval($arr['renew_per']*100), //C7-月续费率\n \"finish_renew_per\" => intval($arr['finish_renew_per']*100),//C8-月预警续费率\n \"tranfer_success_per\" => intval($arr['tranfer_success_per']*100),//D4-月转介绍至CC签单率\n \"kk_success_per\" => intval($arr['kk_success_per']*100), //E5-月扩课成功率\n ];\n $ret_id = $task->t_cr_week_month_info->get_info_by_type_and_time(4,$create_time);\n if($ret_id>0){\n $task->t_cr_week_month_info->field_update_list($ret_id,$insert_data);\n }else{\n $task->t_cr_week_month_info->row_insert($insert_data);\n }\n }\n $i = strtotime(\"+7 days\",$i);\n }\n }", "protected function schedule(Schedule $schedule)\n {\n\n /*开奖调度任务*/\n $schedule->call(function () {\n// $list1 = DrawResultChongqing::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $list2 = DrawResultBeijingpk::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $list3 = DrawResultXyft::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n $list5 = DrawResultJnd::query()->where('res_status',1)\n ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $list6 = DrawResultTenxun::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $list7 = DrawResultJisussc::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $list4 = DrawResultJisupk::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $list9 = DrawResultfucai::query()->where('res_status',1)\n// ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'));\n// $draw_list = DrawResultPcdd::query()\n $draw_list = DrawResultPcdd::query()\n// ->union($list1)\n// ->union($list2)\n// ->union($list3)\n// ->union($list4)\n ->union($list5)\n// ->union($list6)\n// ->union($list7)\n// ->union($list9)\n ->where('res_status',1)\n ->where('kaijiang_time', '<=', date('Y-m-d H:i:s'))->get()->toArray();\n\n foreach ($draw_list as $item) {\n if (Cache::store('redisCache')->get('GetDrawResult'.$item['game_id'].$item['periods'])) {\n continue;\n }\n Cache::store('redisCache')->add('GetDrawResult'.$item['game_id'].$item['periods'], 1, 4);\n dispatch(new GetDrawResult($item['periods'],$item['game_id'],$item['kaijiang_time']))->onQueue('game'.$item['game_id']);;\n }\n return true;\n })->cron('* * * * *');\n\n /*生成游戏的明日期数*/\n $schedule->call(function(){\n /*获取用户表所有用户信息*/\n $config_list = GameConfig::query()->whereIn('id',[4,5])->get()->toArray();\n foreach ($config_list as $configList) {\n if (Cache::store('redisCache')->get('GameConfigTomorrows'.$configList['id'])) {\n continue;\n }\n Cache::store('redisCache')->add('GameConfigTomorrows'.$configList['id'], 1, 5);\n dispatch(new GamePeriod($configList));\n }\n return true;\n })->dailyAt('16:06')->when(function () {\n if (Cache::store('redisCache')->get('GameConfig'.date('Y-m-d'))) return false;\n Cache::store('redisCache')->add('GameConfig'.date('Y-m-d'), 1, 5);\n return true;\n });\n\n// /*生成加拿大28期数*/\n// $schedule->call(function(){\n// $list = DrawResultJnd::query()->where('kaijiang_time','=',Carbon::now()->toDateString().' 20:00:00')->first();\n// if($list['res_status']==1){\n// return true;\n// }\n// elseif($list['res_status']==2&&$list['result']!=null){\n// if (Cache::store('redisCache')->get('Jnd28')){\n// return true;\n// }\n// Cache::store('redisCache')->add('Jnd28', 1, 1);\n// Log::info('Jnd进入准备生成期数了,开奖时间:'.$list['update_at'].'/当前时间:'.Carbon::now()->toDateTimeString());\n// dispatch(new Jnd28Periods($list['update_at']));\n// }\n// return true;\n// })->cron('* * * * *')->when(function () {\n// //return false;\n// if(Cache::store('redisCache')->get('Jnd28s')) return false;\n// if(Carbon::now()->hour<20) return false;\n// return true;\n// });\n\n /*生成每日盈利表 脚本進入*/\n $schedule->call(function(){\n if (Cache::store('redisCache')->get('UsertDailySette')) return true;\n Cache::store('redisCache')->add('UsertDailySette', 1, 5);\n /*获取用户表所有用户信息*/\n $Userlist = BuyUser::query()->get()->toArray();\n foreach ($Userlist as $users) {\n dispatch(new UserDailyJob($users));\n }\n return true;\n })->dailyAt('23:55');\n /*生成进入所有期数*/\n $schedule->call(function(){\n $Userli=DrawResultJnd::query();\n $Userlist = $Userli\n ->whereDate('start_time',Carbon::tomorrow()->toDateString())\n ->get()\n ->toArray();\n Log::info(\"123456456456465897\");\n// Log::info($Userlist);\n if($Userlist[0]['result']){\n return true;\n\n }\n foreach ($Userlist as $k=>$users) {\n $numbers = [];\n for ($i=0; $i<3; $i++) {\n $numbers[] = mt_rand(0, 9);\n }\n $draw_number = implode(',', $numbers);\n $code = $draw_number;\n $Userlist2=DrawResultJnd::query();\n if(empty($Userlist[$k]['result'])){\n $result = $Userlist2->where('periods',$Userlist[$k]['periods'])->update([\n 'res_status'=>1,\n 'result'=> $code\n// 'update_at' => now()->toDateTimeString()\n ]);\n }\n\n }\n return true;\n })->dailyAt('20:30');\n /*生成进入所有期数*/\n $schedule->call(function(){\n $Userli=DrawResultPcdd::query();\n $Userlist = $Userli\n ->whereDate('start_time',Carbon::tomorrow()->toDateString())\n ->get()\n ->toArray();\n Log::info(\"123456456456465897\");\n// Log::info($Userlist);\n if($Userlist[0]['result']){\n return true;\n\n }\n foreach ($Userlist as $k=>$users) {\n $numbers = [];\n for ($i=0; $i<3; $i++) {\n $numbers[] = mt_rand(0, 9);\n }\n $draw_number = implode(',', $numbers);\n $code = $draw_number;\n $Userlist2=DrawResultPcdd::query();\n if(empty($Userlist[$k]['result'])){\n $result = $Userlist2->where('periods',$Userlist[$k]['periods'])->update([\n 'res_status'=>1,\n 'result'=> $code\n// 'update_at' => now()->toDateTimeString()\n ]);\n }\n\n }\n return true;\n })->dailyAt('20:33');\n }", "public function run()\n {\n Workout::create([\n 'athlete_id' => 1,\n 'name' => 'Workout 1',\n 'start_date' => Carbon::now()->subMonth(),\n 'end_date' => Carbon::now()->addMonth(),\n 'type_id' => 1\n ]);\n Workout::create([\n 'athlete_id' => 1,\n 'name' => 'Workout 2',\n 'start_date' => Carbon::now()->subYear(),\n 'end_date' => Carbon::now()->subMonth(11),\n 'type_id' => 1\n ]);\n }", "private function generate_schedule($start_offset=NULL,$main_tasks=NULL)\n\t{\n\n\n\t\t$aux_args = (!is_null($start_offset))? array('n_trans_date'=>$start_offset) : NULL;\n\n\t\t#default action grab all the current phases tasks\n\t\tif(is_null($main_tasks)) $main_tasks = $this->get_tasks($this->_taskgroup_cat);\n\n\t\tforeach ($main_tasks as $t_id => $task)\n\t\t{\n\t\t\t$allowed_date_types = array(REL_NA,REL_TASK);\n\n\t\t\tif((intval($task->rel_cond_type_id)>0) && in_array($task->date_type,$allowed_date_types))\n\t\t\t{\n\t\t\t\t$temp_cond = \\Arr::get($this->_conditions,$task->rel_cond_type_id,NULL);\n\n\t\t\t\tif(is_null($temp_cond)) continue;\n\n\t\t\t\tif(intval($temp_cond['cc_status'])>0)\n\t\t\t\t{\n\t\t\t\t\tif(($t_stamps = $this->fetch($task,$aux_args)) !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->set_dependant($task,$t_stamps); //check and set dependency\n\t\t\t\t\t\t$this->process_timestamps($t_stamps,$task,TASK_TYPE);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_logger->handle_error('Warning: (Task Related/Semi-Hardcoded Logic) ID#'.$task->rel_cond_type_id.' did not return a value from the lookup list.',1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse //generic tasks\n\t\t\t{\n\t\t\t\tif(($t_stamps = $this->make_timestamps($task)) !== false)\n\t\t\t\t{\n\t\t\t\t\t$this->set_dependant($task,$t_stamps); //check and set dependency\n\t\t\t\t\t$this->process_timestamps($t_stamps,$task,TASK_TYPE);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_logger->handle_error('Warning: (Task Related/Semi-Hardcoded Logic) ID(Task)#'.$task->id.' did not return a value from the lookup list.',1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\n\n\t\t\t\t#any non-task linked conditions need adding to the timestamps go below -SH\n\t\t\t\t$non_task_conds = array();\n\t\t\t\t$non_task_conds = $non_task_conds + $this->get_space_conditions();\n\n\t\t\t\tforeach ($non_task_conds as $nt_id)\n\t\t\t\t{\n\t\t\t\t\t$temp_non_task_cond = \\Arr::get($this->_conditions,$nt_id,NULL);\n\n\t\t\t\t\tif(is_null($temp_non_task_cond)) continue;\n\n\t\t\t\t\tif(intval($temp_non_task_cond['cc_status'])>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$task = new \\Model_Scheduler_Task();\n\t\t\t\t\t\t$task->id = $task->rel_cond_type_id = $nt_id;\n\n\t\t\t\t\t\tif(($t_stamps = $this->fetch($task)) !== false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->process_timestamps($t_stamps,$task,COND_TYPE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_logger->handle_error('Warning: (Non Task/ Purely Hardcoded) ID#'.$task->rel_cond_type_id.' did not return a useable value.',1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t}", "public function getKoGoalsSchedule() {\n\t\t$tmp = array();\n\t\tforeach($this->koGoals as $k => $v) {\n\t\t\t$minute = ($v->minute < 1 ? 1 : ($v->minute - 1));\n\t\t\t$key = \"\".floor($minute / 10);\n\t\t\tif (! array_key_exists($key,$tmp))\n\t\t\t\t$tmp[$key] = array();\n\t\t\t$tmp[$key][] = $v;\n\t\t}\n\t\t\n\t\tksort($tmp);\n\t\t// On calcule le résultat trié :\n\t\t$result = \"\";\n\t\t//var_dump($this->team);\n\t\t//var_dump($tmp);\n\t\tforeach($tmp as $k => $array) {\n\t\t\t\n\t\t\t$from = ($k*10)+1;\n\t\t\t$to = $from + 9;\n\t\t\t\n\t\t\t$inside = 0; $outside = $neutral = 0; $total = 0;\n\t\t\tforeach($array as $v) {\n\t\t\t\tif ($v->ground == -1 or $v->ground == 3)\n\t\t\t\t\t$neutral += 1;\n\t\t\t\telse if ($v->ground == 1)\n\t\t\t\t\t$inside += 1;\n\t\t\t\telse\n\t\t\t\t\t$outside += 1;\n\t\t\t}\n\t\t\t$total = $inside + $outside + $neutral;\n\n\t\t\t$teamTotal = $this->team->koGoalsTotal;\n\t\t\t$teamInside = $this->team->koGoalsInside;\n\t\t\t$teamOutside = $this->team->koGoalsOutside;\n\t\t\t$teamNeutral = $this->team->koGoalsNeutral;\n\n\t\t\t$totalPercent = \n\t\t\t\t$this->computePercent($total,$teamTotal);\n\t\t\t\n\t\t\t$insidePercent = \n\t\t\t\t$this->computePercent($inside,$teamInside);\n\t\t\t$outsidePercent = \n\t\t\t\t$this->computePercent($outside,$teamOutside);\n\t\t\t$neutralPercent = \n\t\t\t\t$this->computePercent($neutral,$teamNeutral);\n\t\t\t\t\n\t\t\t$result .= <<<EOS\n<tr> \n\t<td> ${from}' </td> <td> à </td> <td> ${to}'</td>\n\t<th> ${total} </th> <td> ${totalPercent} </td>\n\t<th> ${inside} </th> <td> ${insidePercent} </td>\n\t<th> ${outside} </th> <td> ${outsidePercent} </td>\n\t<th> ${neutral} </th> <td> ${neutralPercent} </td>\n\n</tr>\nEOS;\n\t\t}\n\t\treturn str_replace(\" 0 \",\"-\",$result);\n\t}", "public function run()\n {\n $data = [\n [\n 'doctor_id' => 4,\n 'day' => \"MON,WED,FRI\",\n 'start_time' => '9:00',\n 'end_time' => '12:00',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'doctor_id' => 4,\n 'day' => 'TUE,THU',\n 'start_time' => '13:00',\n 'end_time' => '17:00',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]\n ];\n doctor_schedule::insert($data);\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('nsdkhulna:suppliers')\n ->dailyAt('04:00'); \n $schedule->command('bsdkhulna:suppliers')\n ->dailyAt('04:00');\n $schedule->command('nsddhaka:suppliers')\n ->dailyAt('04:00'); \n $schedule->command('bsddhaka:suppliers')\n ->dailyAt('04:00');\n $schedule->command('nsddgdp:suppliers')\n ->dailyAt('04:00');\n $schedule->command('bsddhaka:items')\n ->dailyAt('04:00');\n $schedule->command('bsdkhulna:items')\n ->dailyAt('04:00');\n $schedule->command('nsddgdp:items')\n ->dailyAt('04:00');\n $schedule->command('nsddhaka:items')\n ->dailyAt('04:00');\n $schedule->command('nsdkhulna:items')\n ->dailyAt('04:00');\n // Tneder \n $schedule->command('bsddhaka:tenders')\n ->dailyAt('04:00');\n $schedule->command('bsdkhulna:tenders')\n ->dailyAt('04:00');\n $schedule->command('nsddgdp:tenders')\n ->dailyAt('04:00');\n $schedule->command('nsddhaka:tenders')\n ->dailyAt('04:00');\n $schedule->command('nsdkhulna:tenders')\n ->dailyAt('04:00');\n // Item To Tneder \n $schedule->command('nsdkhulna:itemtotenders')\n ->dailyAt('04:00');\n $schedule->command('bsddhaka:itemtotenders')\n ->dailyAt('04:00');\n $schedule->command('bsdkhulna:itemtotenders')\n ->dailyAt('04:00');\n $schedule->command('nsddgdp:itemtotenders')\n ->dailyAt('04:00');\n $schedule->command('nsddhaka:itemtotenders')\n ->dailyAt('04:00'); \n }", "function generateWorker($task, $i) {\n global $period;\n global $jitter;\n global $periodicity;\n global $WCET;\n\n $period_i = $period+3*$i;\n\n echo \"\\n\";\n?>\n <runnable type=\"worker\" periodicity=\"<?php echo $periodicity; ?>\" task=\"<?php echo $task; ?>\">\n <period value=\"<?php echo $period_i; ?>\" units=\"ms\" />\n<?php\n if($periodicity===\"periodic_jitter\") {\n echo \" <jitter value=\\\"$jitter\\\" units=\\\"ms\\\" />\\n\";\n }\n if($task===\"busy_wait\") {\n echo \" <wcet value=\\\"$WCET\\\" units=\\\"ms\\\" />\\n\";\n }\n \n echo \" <relative_deadline value=\\\"$period_i\\\" units=\\\"ms\\\" /> \";\n echo \" </runnable>\\n\";\n}", "public function run()\n {\n $values = [];\n\n $values[] = $this->getTemplate(1,'01-06 19:00:00', true, false);\n $values[] = $this->getTemplate(4,'01-06 20:00:00', true, false);\n $values[] = $this->getTemplate(3,'01-07 20:00:00', true, false);\n $values[] = $this->getTemplate(2,'01-07 19:45:00', false, false);\n $values[] = $this->getTemplate(1,'01-08 19:00:00', true, false);\n $values[] = $this->getTemplate(4,'01-08 20:00:00', true, false);\n $values[] = $this->getTemplate(3,'01-09 20:00:00', true, false);\n $values[] = $this->getTemplate(2,'01-09 19:45:00', false, false);\n\n $values[] = $this->getTemplate(1,'01-13 19:00:00', true, false);\n $values[] = $this->getTemplate(4,'01-13 20:00:00', true, false);\n $values[] = $this->getTemplate(3,'01-14 20:00:00', true, false);\n $values[] = $this->getTemplate(2,'01-14 19:45:00', false, false);\n $values[] = $this->getTemplate(1,'01-15 19:00:00', true, false);\n $values[] = $this->getTemplate(4,'01-15 20:00:00', true, false);\n $values[] = $this->getTemplate(3,'01-16 20:00:00', true, false);\n $values[] = $this->getTemplate(2,'01-16 19:45:00', false, false);\n\n $values[] = $this->getTemplate(1,'01-20 19:00:00', true, false);\n $values[] = $this->getTemplate(4,'01-20 20:00:00', true, false);\n $values[] = $this->getTemplate(3,'01-21 20:00:00', true, false);\n $values[] = $this->getTemplate(2,'01-21 19:45:00', false, false);\n $values[] = $this->getTemplate(1,'01-22 19:00:00', true, false);\n $values[] = $this->getTemplate(4,'01-22 20:00:00', true, false);\n $values[] = $this->getTemplate(3,'01-23 20:00:00', true, false);\n $values[] = $this->getTemplate(2,'01-23 19:45:00', false, false);\n\n $values[] = $this->getTemplate(1,'01-27 19:00:00', true, true);\n $values[] = $this->getTemplate(4,'01-27 20:00:00', true, true);\n $values[] = $this->getTemplate(3,'01-28 20:00:00', true, true);\n $values[] = $this->getTemplate(2,'01-28 19:45:00', false, true);\n $values[] = $this->getTemplate(1,'01-29 19:00:00', true, true);\n $values[] = $this->getTemplate(4,'01-29 20:00:00', true, true);\n $values[] = $this->getTemplate(3,'01-30 20:00:00', true, true);\n $values[] = $this->getTemplate(2,'01-30 19:45:00', false, true);\n\n $values[] = $this->getTemplate(1,'02-03 19:00:00', true, true);\n $values[] = $this->getTemplate(4,'02-03 20:00:00', true, true);\n $values[] = $this->getTemplate(3,'02-04 20:00:00', true, true);\n $values[] = $this->getTemplate(2,'02-04 19:45:00', false, true);\n $values[] = $this->getTemplate(1,'02-05 19:00:00', true, true);\n $values[] = $this->getTemplate(4,'02-05 20:00:00', true, true);\n $values[] = $this->getTemplate(3,'02-06 20:00:00', true, true);\n $values[] = $this->getTemplate(2,'02-06 19:45:00', false, true);\n\n DB::table('lesson_announces')->insert($values);\n }", "public function OutputSchedule($RETURN=false)\n {\n \n $date = ($this->existing_records_date) ? $this->existing_records_date : date('Y-m-d');\n $date = $this->datefmt($date, 'yyyy-mm-dd', \"l, M j, Y\");\n \n $OUTPUT = <<<OUTPUT\n <div id=\"result_send\" style='border:1px solid blue;'></div><br />\n <div id=\"result_receive\" style='border:1px solid green;'></div><br />\n <div style=\"clear:both;\"></div>\n \n <h2>Date: {$date}</h2>\n <div id=\"master\">\n {$this->rowData}\n </div>\n \n <script type='text/javascript'>ReapplyJqueryFunctionalityToObjects();</script>\nOUTPUT;\n if ($RETURN) {\n return $OUTPUT;\n } else {\n echo $OUTPUT;\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n // Define our list of lookup values\n $schedulePrograms = [\n [ 'name' => 'Weekday' ],\n [ 'name' => 'Weekend' ]\n ];\n $trains = [\n [ 'name' => 'Red Line', 'color' => 'red' ],\n [ 'name' => 'Blue Line', 'color' => 'blue' ],\n [ 'name' => 'Green Line', 'color' => 'green' ],\n [ 'name' => 'Orange Line', 'color' => 'orange' ]\n ];\n $directions = [\n 'North',\n 'South'\n ];\n $scheduledStopDataSources = [\n 'Weekday' => [\n 'North' => [\n 'Red Line' => 'http://www.dart.org/schedules/w600no.htm',\n 'Blue Line' => 'http://www.dart.org/schedules/w601no.htm',\n 'Green Line' => 'http://www.dart.org/schedules/w602no.htm',\n 'Orange Line' => 'http://www.dart.org/schedules/w603no.htm'\n ],\n 'South' => [\n 'Red Line' => 'http://www.dart.org/schedules/w600so.htm',\n 'Blue Line' => 'http://www.dart.org/schedules/w601so.htm',\n 'Green Line' => 'http://www.dart.org/schedules/w602so.htm',\n 'Orange Line' => 'http://www.dart.org/schedules/w603so.htm'\n ]\n ],\n 'Weekend' => [\n 'North' => [\n 'Red Line' => 'http://www.dart.org/schedules/s600no.htm',\n 'Blue Line' => 'http://www.dart.org/schedules/s601no.htm',\n 'Green Line' => 'http://www.dart.org/schedules/s602no.htm',\n 'Orange Line' => 'http://www.dart.org/schedules/s603no.htm'\n ]\n ,\n 'South' => [\n 'Red Line' => 'http://www.dart.org/schedules/s600so.htm',\n 'Blue Line' => 'http://www.dart.org/schedules/s601so.htm',\n 'Green Line' => 'http://www.dart.org/schedules/s602so.htm',\n 'Orange Line' => 'http://www.dart.org/schedules/s603so.htm'\n ]\n ]\n ];\n\n\n // Add schedule programs\n \\DB::table('schedule_programs')->delete();\n foreach ( $schedulePrograms as $scheduleProgram ) {\n Entities\\ScheduleProgram::create( $scheduleProgram );\n }\n $scheduleProgramEntities = Entities\\ScheduleProgram::all();\n\n // Add trains and train trips\n \\DB::table( 'train_trips' )->delete();\n \\DB::table( 'trains' )->delete();\n \\DB::table( 'scheduled_stop_data_sources' )->delete();\n\n foreach ( $trains as $train ) {\n\n $trainRecord = Entities\\Train::create( $train );\n\n foreach ( $directions as $direction ) {\n\n // Add a train trip for each direction\n $trainTripProgram = Entities\\TrainTripProgram::create( [\n 'train_id' => $trainRecord->id,\n 'name' => \"{$trainRecord->name} {$direction}\",\n 'direction' => $direction\n ] );\n\n // Add schedule/stop data sources for each program, trip direction, and train name.\n foreach ( $scheduleProgramEntities as $scheduleProgramEntity ) {\n Entities\\ScheduledStopDataSource::create( [\n 'train_trip_program_id' => $trainTripProgram->id,\n 'schedule_program_id' => $scheduleProgramEntity->id,\n 'base_url' => $scheduledStopDataSources[ $scheduleProgramEntity->name ][ $trainTripProgram->direction ][ $trainRecord->name ]\n ] );\n }\n }\n }\n\n\n\n // The \"stations\" table is automatically populated from the web schedules.\n }", "private function _get_course_generate() {\r\n try {\r\n $course_seq = $this->uri->segment(5);\r\n if ($course_seq != \"\") {\r\n $building = $this->schedule_model->get_building_by_course($course_seq);\r\n $building_seq = $building['data']->building_seq;\r\n $get_rooms = $this->schedule_model->get_room_by_building($building_seq);\r\n $rooms = $get_rooms['data'];\r\n $check_free_day_hour = $this->schedule_model->check_dh_schedule();\r\n // print_r($check_free_day_hour);\r\n // exit();\r\n foreach ($rooms as $room) {\r\n unset($check_schedule_data);\r\n foreach ($check_free_day_hour['data'] as $each) {\r\n $check_schedule = $this->schedule_model->check_room_dh_schedule($each->dh_seq, $room->seq);\r\n if ($check_schedule['data'] == 'YES') {\r\n $check_schedule_tmp = $this->schedule_model->check_room_dh_schedule_tmp($each->dh_seq, $room->seq);\r\n if ($check_schedule_tmp['data'] == 'YES') {\r\n $check_schedule_data[] = array(\r\n 'dh_seq' => $each->dh_seq,\r\n 'room_seq' => $room->seq,\r\n 'day' => $each->day_name,\r\n 'hour' => $each->hour_name,\r\n 'duration' => $each->start_hour . ':' . $each->start_min . '-' . $each->end_hour . ':' . $each->end_min,\r\n 'availability' => $check_schedule['data']);\r\n }\r\n }\r\n }\r\n $free_schedule[] = array('room_seq' => $room->seq, 'room_name' => $room->name, 'room_free_schedule' => $check_schedule_data);\r\n }\r\n $ready = [];\r\n // print_r($free_schedule);\r\n // exit();\r\n foreach ($free_schedule as $each) {\r\n foreach ($each['room_free_schedule'] as $free) {\r\n $array = array('dh_seq' => $free['dh_seq'],\r\n 'room_seq' => $free['room_seq'],\r\n 'room_name' => $each['room_name'],\r\n 'day' => $free['day'],\r\n 'hour' => $free['hour'],\r\n 'duration' => $free['duration'],\r\n );\r\n array_push($ready, $array);\r\n }\r\n }\r\n // print_r($ready);\r\n // exit();\r\n $free = array(\"free_schedule\" => $ready);\r\n $get_course = $this->schedule_model->get_course($course_seq);\r\n $course_sks = $get_course['data']->sks;\r\n $get_class = $this->schedule_model->get_class($course_seq);\r\n $count_pick_schedule_total = $course_sks * count($get_class['data']);\r\n $slice = array_slice($free['free_schedule'], 0, $count_pick_schedule_total);\r\n foreach ($get_class['data'] as $class) {\r\n $pick_free_schedule = array_slice($slice, 0, $course_sks);\r\n unset($new_class_schedule);\r\n foreach ($pick_free_schedule as $each) {\r\n $new_class_schedule[] = array(\r\n 'dh_seq' => $each['dh_seq'],\r\n 'room_seq' => $each['room_seq'],\r\n 'room_name' => $each['room_name'],\r\n 'day' => $each['day'],\r\n 'hour' => $each['hour'],\r\n 'duration' => $each['duration'],\r\n 'class_seq' => $class->seq,\r\n 'class_sks' => $course_sks);\r\n }\r\n $slice = array_slice($slice, $course_sks);\r\n $schedule_class[] = array(\"class_label\" => $class->label, \"class_schedule\" => $new_class_schedule);\r\n }\r\n // Insert to schedule_tmp\r\n // print_r($schedule_class);exit();\r\n foreach ($schedule_class as $each) {\r\n foreach ($each['class_schedule'] as $params)\r\n $insert = $this->schedule_model->add_schedule_tmp($params['dh_seq'], $params['room_seq'], $params['class_seq']);\r\n }\r\n $ready_schedule = array(\"class_generate_schedule\" => $schedule_class);\r\n $data = get_success($ready_schedule);\r\n } else {\r\n $data = response_fail();\r\n }\r\n } catch (Exception $e) {\r\n $data = response_fail();\r\n }\r\n return $data;\r\n }", "public function run()\n {DB::table('shifts')->insert([\n 'shiftName' => 'Default',\n 'shiftStart' => 9 . ':' . 0,\n 'shiftEnd' => 18 . ':' . 0,\n 'workTime' => ((strtotime(\"18:00\") - strtotime(\"09:00\")) / 60)\n ]);\n for ($x = 0; $x <= 5; $x++) {\n $m = rand(1, 9) . ':' . rand(0, 59);\n $n = rand(10, 24) . ':' . rand(0, 59);\n DB::table('shifts')->insert([\n 'shiftName' => Str::random(5),\n 'shiftStart' => $m,\n 'shiftEnd' => $n,\n 'workTime' => ((strtotime($n) - strtotime($m)) / 60),\n ]);\n }\n }", "public function getSchedule();", "private function outputCalendar() {\n $output = '\n <table width=\"100%\">\n <tr>\n <td valign=\"top\" colspan=\"3\"><br /><br />'.$this->BoxCalendarHeader().'</td>\n </tr>\n </table>\n <br />';\n return $output;\n }", "function display_schedule($schedule){\n echo \"<table border='1'>\";\n echo \"</table>\";\n}", "function output()\n\t{\n\t\tglobal $id;\n\n\t\t//Initialize output html and write header to variable\n\t\t$html = <<<WAT\n\t\t<div class=\"hdr btxt\">Meeting Date</div>\n\t\t<div class=\"head\">When are you free?</div>\nWAT;\n\n\t\t//Initialize empty set of day columns for the table\n\t\t$days = \"\";\n\n\t\tfor($x = 1; $x <= 7; $x++) //Loop through the next seven days\n\t\t{\n\t\t\t$day_of_week = date(\"l\", strtotime(\"+\" . $x . \" day\")); //Calculate the day of week\n\t\t\t$date = date(\"n/j\", strtotime(\"+\" . $x . \" day\")); \t\t//Calculate the date\n\t\t\t$days .= \"<td>$day_of_week<span>$date</span></td>\";\t\t//Write html and append to the master date header\n\t\t}\n\n\t\t//Initialize empty set of time cells\n\t\t$times = \"\";\n\n\t\t//Get the information for this exchange\n\t\t$thisExchange = new Exchange(array(\"action\"=>\"get\", \"id\"=>$id));\n\t\t$exchangeInfo = $thisExchange->run();\n\n\t\t//Decode the available dates between users\n\t\t$availableArray = json_decode($exchangeInfo[0][\"availability\"], true);\n\n\t\t//If there is no date array currently on the server...\n\t\tif(!is_array($availableArray))\n\t\t{\n\t\t\t$availableArray = array(); //Initialize an empty arreay\n\t\t}\n\n\t\t//Loop through the next 13 hours, starting at 9 AM\n\t\tfor($i = 9; $i<22; $i++)\n\t\t{\n\n\t\t\t$class = (($i%2)==0) ? \"odd\" : \"even\"; //Allows for alternating row colors\n\n\t\t\t$time_str = date(\"g A\", strtotime($i . \":00\")); //Calculate a 12-hour time string based on index\n\n\t\t\t//Begin html for each row, beginning with a time header\n\t\t\t$times .= <<<EOF\n\t\t\t\t\t\t<tr class=\"$class\">\n\t\t\t\t\t\t\t<td class=\"time_hcell\">$time_str</td>\nEOF;\n\t\t\n\t\t\t//Loop through the next seven days (again) per row\n\t\t\tfor($j = 1; $j <= 7; $j++)\n\t\t\t{\n\t\t\t\t//Generate a string in the form Y-m-d H:i:s using the given date/time information\n\t\t\t\t$calculated_timestring = date(\"Y-m-d\", strtotime(\"+\" . $j . \"day\")) . \" \" . date(\"H:i:s\", strtotime($i . \":00\"));\n\n\t\t\t\t//Generate a timestamp from that string\n\t\t\t\t$calculated_timestamp = strtotime($calculated_timestring);\n\n\t\t\t\t$cell_class = \"\"; //By default, the cell will have no additional classes\n\n\t\t\t\t$visited_dates = array(); //An array of dates that the iterator has gone through\n\n\t\t\t\tforeach($availableArray as $user=>$dates) //Iterate through all available dates\n\t\t\t\t{\n\t\t\t\t\tforeach($dates as $d) //Iterates through the set of dates per user\n\t\t\t\t\t{\n\t\t\t\t\t\tif($d==$exchangeInfo[0][\"date\"]) //If the date is the meeting date...\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cell_class = \"selected\"; //...select it\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($d==$calculated_timestamp) //If not...\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Make it bright if it belongs to the current user,\n\t\t\t\t\t\t\t//and dull if it belongs to the other user\n\t\t\t\t\t\t\t$cell_class = ($user==$_SESSION[\"userid\"]) ? \"bright\" : \"faded\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$dt_cell = \"<td data-timestamp=\\\"$calculated_timestamp\\\" class=\\\"timecell $cell_class\\\"></td>\"; //Write an html string for the cell\n\t\t\t\t$times .= $dt_cell; //Append it to the times row\n\n\t\t\t}\n\n\t\t\t$times .= \"</tr>\"; //End the times row\n\t\t}\n\n\t\t//Finish writing the HTML\n\t\t$html .= <<<EOD\n\t\t\t\t<table class=\"btxt\" style=\"font-size:12px;border-spacing:0px;\">\n\t\t\t\t\t<tr style=\"text-align:center;\">\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t$days\n\t\t\t\t\t</tr>\n\t\t\t\t\t$times\n\t\t\t\t</table>\n\t\t\t\t<script>\n\t\t\t\t</script> \nEOD;\n\t\techo $html; //Output the HTML\n\t\treturn; //Return null\n\t}", "function gen() {\n$this->_gen_time = round($this->_stop_time - $this->_start_time,$this->round_to);\nreturn $this->_gen_time;// show the generation time\n}", "function create_plan($start, $end)\n{\n $dienstplan = new Dienstplan();\n $plan = array();\n //echo \"Der aktuelle Dienstplan fuer den Zeitraum $start bis $end wird nun erstellt. Bitte haben Sie einen Moment Geduld...\";\n\n // simulated Database entries\n \n \n \n $workdays = array(\"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\"); // DB-Eintrag --> SQL-Abfrage\n $spec_times_business_off = $dienstplan->get_spec_times_business_off();\n $spec_times_business_on = $dienstplan->get_spec_times_business_on();\n \n if($spec_times_business_off == NULL)\n {\n $spec_times_business_off[] = 0;\n \n }\n if($spec_times_business_on == NULL)\n {\n $spec_times_business_on[] = 0;\n \n }\n\n \n $emp_db = $dienstplan->get_emp_ids(); \n \n \n $emp_db_vac = orderDates(\"vacation\");//array(\"300_0\" => \"16.04.2012\", \"925_0\" => \"18.04.2012\");\n $emp_db_times_missed = orderDates(\"missed_times\");//array(\"315_0\" => \"19.04.2012\", \"316_0\" => \"04.04.2012\"); \n \n // $emp_db_spec_times = array(228 => \"FS\", 809 => \"NS\");\n $emp_db_spec_times = $dienstplan->get_emp_spec_times(); \n \n // $emp_db_hours = array(300 => 20, 809 => 1, 953 => -1, 316 => -17); // DB-Eintrag --> SQL-Abfrage\n \n // print_r(array_values($emp_db_hours));\n \n //$shifts = array(0 => \"FS\", 1 => \"MS\", 2 => \"NS\");\n $shifts = $dienstplan->get_all_shifts(); \n \n //$shift_must = array(\"FS\" => 3, \"MS\" => 2, \"NS\" => 1);\n $shift_must = $dienstplan->get_shifts_must(); \n \n // Variables\n // $all_plans = array(0 => \"\", 1 => \"\", 2 => \"\", 3 => \"\", 4 => \"\");\n \n // days of timespan\n $timespan_dates = get_dates($start, $end);\n \n /*foreach($all_plans as $single_plan)\n {\n $single_plan = ; // 5 different plans\n }*/\n \n foreach($timespan_dates as $timespan_date)\n {\n $emp_available = $emp_db;\n $day = get_weekday($timespan_date);\n //echo $day;\n \n if(in_array($day, $workdays) && \n !in_array($timespan_date, $spec_times_business_off) || \n in_array($timespan_date, $spec_times_business_on))\n {\n //echo \"<br />$timespan_date: Arbeitstag<br />\";\n \n if(in_array($timespan_date, $emp_db_vac)) // wenn Mitarbeiter Urlaub, dann aus array gelöscht\n {\n $key = array_search($timespan_date, $emp_db_vac);\n $key = explode(\"_\", $key);\n //echo \"Mitarbeiter $key[0] hat Urlaub.<br />\";\n $key = array_search($key[0], $emp_available);\n unset($emp_available[$key]);\n }\n if(in_array($timespan_date, $emp_db_times_missed)) // wenn Mitarbeiter besondere Ausfallzeiten, dann aus array gelöscht\n {\n $key = array_search($timespan_date, $emp_db_times_missed);\n $key = explode(\"_\", $key);\n //echo \"Mitarbeiter $key[0] hat Sondertag.<br />\";\n $key = array_search($key[0], $emp_available);\n unset($emp_available[$key]);\n } \n \n foreach($shifts as $shift)\n {\n $shift_have = 0;\n $shift_dates[$timespan_date][] = $shift; // jedem verfügbaren Datum werden jeweils schihcten zugeteilt\n \n $av_emps = $emp_available;\n \n if($shift_must[$shift] > 0)\n {\n //echo \"$shift: \".$shift_must[$shift] .\"<br />\"; // Ausgabe der Arbeitstage mit schichten und schichtsoll\n // echo $shift;\n // deleting employees with special times\n if(in_array($shift, $emp_db_spec_times))\n {\n $key = array_search($shift, $emp_db_spec_times);\n //echo \"Mitarbeiter $key hat fuer Schicht $shift eine Sonderzeit.<br />\";\n $key = array_search($key, $av_emps);\n unset($av_emps[$key]);\n }\n \n /*echo \"Fuer $timespan_date und Schicht $shift verfuegbare Mitarbeiter sind: <br />\";*/\n $available_workers = array();\n // Ruhezeiten\n foreach($av_emps as $av_emp)\n {\n //echo $av_emp .\"<br />\";\n $time_difference = restingTime($timespan_date, $av_emp, $shift, $plan);\n if($time_difference < 11)\n {\n //echo \"Bei $av_emp sind Ruhestunden NICHT eingehalten.<br />\";\n }else\n {\n //echo \"Bei $av_emp sind Ruhestunden eingehalten.<br />\";\n \n $available_workers[] = $av_emp;\n \n }\n }\n // print_r($available_workers);\n // put employees into shifts\n do{\n \n $worker = array_rand($available_workers, 1);\n\n $plan[$timespan_date][$shift][] = $available_workers[$worker];\n\n unset($available_workers[$worker]); \n $shift_have += 1;\n }while($shift_have < $shift_must[$shift]);\n \n \n // var_dump($av_emp);\n }\n }\n\n }\n \n }\n //var_dump($shift_dates); // alle schichten für jeden verfügbaren Tag\n //var_dump($emp_db); // alle verfügbaren Mitarbeiter sind enthalten in $emp_db\n \n // Ausgabe erstellter Plan!!!\n /*\n echo \"<br /><br />Dienstplan von $start bis $end:<br />\";\n foreach($plan as $date => $shift)\n {\n echo \"Datum: $date<br />\";\n \n foreach($shifts as $shift)\n {\n echo \"Schicht: $shift: <br />\";\n foreach($plan[$date][$shift] as $key => $emp)\n {\n $key += 1;\n echo \"$key. Mitarbeiter: $emp<br />\";\n }\n }\n }\n */\n return $plan;\n}", "public function run()\n {\n $times = [\n \t[\n \t\t'id' => 1,\n \t\t'name' => '07.00'\n \t],\n \t[\n \t\t'id' => 2,\n \t\t'name' => '08.00'\n \t],\n \t[\n \t\t'id' => 3,\n \t\t'name' => '09.00'\n \t],\n \t[\n \t\t'id' => 7,\n \t\t'name' => '10.00'\n \t],\n \t[\n \t\t'id' => 8,\n \t\t'name' => '11.00'\n \t],\n \t[\n \t\t'id' => 9,\n \t\t'name' => '12.00'\n \t],\n \t[\n \t\t'id' => 10,\n \t\t'name' => '13.00'\n \t],\n \t[\n \t\t'id' => 11,\n \t\t'name' => '14.00'\n \t],\n \t[\n \t\t'id' => 12,\n \t\t'name' => '15.00'\n \t],\n \t[\n \t\t'id' => 13,\n \t\t'name' => '16.00'\n \t],\n \t[\n \t\t'id' => 14,\n \t\t'name' => '17.00'\n \t],\n ];\n\n foreach ($times as $time) {\n \tTime::create([\n \t\t'id' => $time['id'],\n \t\t'name' => $time['name']\n \t]);\n }\n }", "function print_table($timetable, $dayoff)\n{\n if ($dayoff)\n {\n // 08:30~11:30\n // 12:30~15:00\n // 15:00~17:30\n // 18:30~21:00\n $rtimes = array(\n [\n 'sh' => '08',\n 'sm' => '30',\n 'eh' => '11',\n 'em' => '30'\n ],\n [\n 'sh' => '12',\n 'sm' => '30',\n 'eh' => '15',\n 'em' => '00'\n ],\n [\n 'sh' => '15',\n 'sm' => '00',\n 'eh' => '17',\n 'em' => '30'\n ],\n [\n 'sh' => '18',\n 'sm' => '30',\n 'eh' => '21',\n 'em' => '00'\n ]\n );\n }\n else\n {\n //18:00~19:30\n //19:30~21:00\n $rtimes = array(\n [\n 'sh' => '18',\n 'sm' => '00',\n 'eh' => '19',\n 'em' => '30'\n ],\n [\n 'sh' => '19',\n 'sm' => '30',\n 'eh' => '21',\n 'em' => '00'\n ]\n );\n }\n $pc_num = 8;\n\n $nh = intval(date('H'));\n $nm = intval(date('i')) + 10;\n\n //$nh = 23; // 여기 삭제해야됨..\n //$nm = 50; // 여기 삭제해야됨..\n\n if ($nm >= 60)\n {\n $nh += 1;\n $nm -= 60;\n }\n\n for($i = 1; $i <= count($rtimes); $i++)\n {\n for($j = 1; $j <= $pc_num; $j++)\n {\n $sh = $rtimes[$i-1]['sh'];\n $sm = $rtimes[$i-1]['sm'];\n $eh = $rtimes[$i-1]['eh'];\n $em = $rtimes[$i-1]['em'];\n\n echo '<tr>';\n if ($j == 1)\n {\n $_ = $sh.\":\".$sm.\"~\".$eh.\":\".$em;\n echo '<td rowspan=\"'.$pc_num.'\">'.$_.'</td>';\n }\n echo '<td>PC'.$j.'</td>';\n\n if (empty($timetable[$i][$j]))\n {\n if ($nh < $sh || ($nh == $sh && $nm < $sm))\n echo '<td class=\"disable\">준비중...</td>';\n else{\n $_ = \"'reserve.php?rtime=\".$i.\"&rpc=\".$j.\"'\";\n echo '<td class=\"enable\">';\n if(isset($_SESSION['idx']) && isset($_SESSION['id']) && isset($_SESSION['name']))\n echo '<div onclick=\"location.replace('.$_.')\";>';\n echo '사용 가능';\n if(isset($_SESSION['idx']) && isset($_SESSION['id']) && isset($_SESSION['name']))\n echo '</div>';\n echo '</td>';\n }\n }\n else{\n echo '<td>'.$timetable[$i][$j][1].'</td>';\n }\n echo '</tr>';\n }\n }\n}", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n //$schedule->command('testconsole')->everyMinute();\n //$schedule->command('caiji')->hourly();\n\n\n $schedule->command('xingyunfeiting')->everyFiveMinutes()->timezone('Asia/Shanghai');\n $schedule->command('xinjiangshishicai')->everyFiveMinutes()->timezone('Asia/Shanghai');\n $schedule->command('beijingsaiche')->everyFiveMinutes()->timezone('Asia/Shanghai');\n $schedule->command('chongqingshishicai')->everyFiveMinutes()->timezone('Asia/Shanghai');\n $schedule->command('xianggangliuhecai')->hourly()->timezone('Asia/Shanghai');\n $schedule->command('jiangsukuaisan')->everyFiveMinutes()->timezone('Asia/Shanghai');\n $schedule->command('guangdongshiyixuanwu')->everyFiveMinutes()->timezone('Asia/Shanghai');\n\n //$schedule->command('test')->everyMinute();\n\n\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n $schedule->command('enviar:correocumple')\n ->timezone('America/Mexico_City')\n ->dailyAt('08:00')\n ->runInBackground();\n\n $schedule->command('enviar:correoaniversario')\n ->timezone('America/Mexico_City')\n ->dailyAt('08:00')\n ->runInBackground();\n\n $schedule->command('enviar:recordatorio')\n ->timezone('America/Mexico_City')\n ->dailyAt('08:30')\n // ->appendOutputTo('public/test2.txt');\n ->runInBackground();\n\n /* $schedule->command('enviar:correoruns')\n ->timezone('America/Mexico_City')\n ->thursdays()\n ->at('16:00')\n ->runInBackground(); */\n }", "private function buildSchedule()\n {\n $halfTeamCount = count($this->_teams) / 2;\n\n $rounds = $this->_rounds ?? count($this->_teams) - 1;\n\n for ($round = 1; $round <= $rounds; $round += 1) {\n foreach ($this->_teams as $key => $team) {\n if ($key >= $halfTeamCount) {\n break;\n }\n $team1 = $team;\n $team2 = $this->_teams[$key + $halfTeamCount];\n //Home-away swapping\n $matchup = $round % 2 === 0 ? [$team1, $team2] : [$team2, $team1];\n $this->_schedule[$round][] = $matchup;\n }\n $this->rotate();\n }\n\n return $this;\n }", "public function run()\n {\n for($i=0;$i<7;++$i) {\n \tWorkDay::create([\n \t\t'day' => $i,\n\t\t\t\t'active' => ($i==3),\n\n\t\t\t\t'morning_start' => ($i==3? '8:00:00':'5:00:00'),\n\t\t\t\t'morning_end' => ($i==3? '11:00:00':'5:00:00'),\n\n\t\t\t\t'afternoon_start' => ($i==3?'15:00:00':'13:00:00'),\n\t\t\t\t'afternoon_end' => ($i==3?'18:00:00':'13:00:00'),\n\n\t\t\t\t'user_id' => 3 //médico de teste\n \t]);\n }\n }", "public function scheduleScans() {\n\t\t$this->unscheduleAllScans();\n\t\tif (!$this->isEnabled()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($this->schedulingMode() == wfScanner::SCAN_SCHEDULING_MODE_MANUAL) {\n\t\t\t//Generate a two-week schedule\n\t\t\t$manualType = $this->manualSchedulingType();\n\t\t\t$preferredHour = $this->manualSchedulingStartHour();\n\t\t\tswitch ($manualType) {\n\t\t\t\tcase self::MANUAL_SCHEDULING_ONCE_DAILY:\n\t\t\t\t\t$schedule = array_fill(0, 14, array_fill(0, 24, 0));\n\t\t\t\t\tforeach ($schedule as $dayNumber => &$day) {\n\t\t\t\t\t\t$day[$preferredHour] = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MANUAL_SCHEDULING_TWICE_DAILY:\n\t\t\t\t\t$schedule = array_fill(0, 14, array_fill(0, 24, 0));\n\t\t\t\t\tforeach ($schedule as $dayNumber => &$day) {\n\t\t\t\t\t\t$day[$preferredHour] = 1;\n\t\t\t\t\t\t$day[($preferredHour + 12) % 24] = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MANUAL_SCHEDULING_EVERY_OTHER_DAY:\n\t\t\t\t\t$baseDay = floor(time() / 86400);\n\t\t\t\t\t$schedule = array_fill(0, 14, array_fill(0, 24, 0));\n\t\t\t\t\tforeach ($schedule as $dayNumber => &$day) {\n\t\t\t\t\t\tif (($baseDay + $dayNumber) % 2) {\n\t\t\t\t\t\t\t$day[$preferredHour] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MANUAL_SCHEDULING_WEEKDAYS:\n\t\t\t\t\t$schedule = array_fill(0, 14, array_fill(0, 24, 0));\n\t\t\t\t\tforeach ($schedule as $dayNumber => &$day) {\n\t\t\t\t\t\tif ($dayNumber > 0 && $dayNumber < 6) {\n\t\t\t\t\t\t\t$day[$preferredHour] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MANUAL_SCHEDULING_WEEKENDS:\n\t\t\t\t\t$schedule = array_fill(0, 14, array_fill(0, 24, 0));\n\t\t\t\t\tforeach ($schedule as $dayNumber => &$day) {\n\t\t\t\t\t\tif ($dayNumber == 0 || $dayNumber == 6) {\n\t\t\t\t\t\t\t$day[$preferredHour] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MANUAL_SCHEDULING_ODD_DAYS_WEEKENDS:\n\t\t\t\t\t$schedule = array_fill(0, 14, array_fill(0, 24, 0));\n\t\t\t\t\tforeach ($schedule as $dayNumber => &$day) {\n\t\t\t\t\t\tif ($dayNumber == 0 || $dayNumber == 6 || ($dayNumber % 2)) {\n\t\t\t\t\t\t\t$day[$preferredHour] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::MANUAL_SCHEDULING_CUSTOM:\n\t\t\t\t\t$oneWeekSchedule = $this->customSchedule();\n\t\t\t\t\t$schedule = array();\n\t\t\t\t\tforeach ($oneWeekSchedule as $day) { $schedule[] = $day; }\n\t\t\t\t\tforeach ($oneWeekSchedule as $day) { $schedule[] = $day; }\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$now = time();\n\t\t\t$tzOffset = wfUtils::formatLocalTime('Z', $now);\n\t\t\t\n\t\t\t//Apply the time zone shift so the start times align to the server's time zone\n\t\t\t$shiftedSchedule = array_fill(0, 14, array());\n\t\t\tforeach ($schedule as $dayNumber => $day) {\n\t\t\t\tforeach ($day as $hourNumber => $enabled) {\n\t\t\t\t\tif ($enabled) {\n\t\t\t\t\t\t$effectiveHour = round(($hourNumber * 3600 - $tzOffset) / 3600, 2); //round() rather than floor() to account for fractional time zones\n\t\t\t\t\t\t$wrappedHour = ($effectiveHour + 24) % 24;\n\t\t\t\t\t\tif ($effectiveHour < 0) {\n\t\t\t\t\t\t\tif ($dayNumber > 0) {\n\t\t\t\t\t\t\t\t$shiftedSchedule[$dayNumber - 1][$wrappedHour] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($effectiveHour > 23) {\n\t\t\t\t\t\t\tif ($dayNumber < count($schedule) - 1) {\n\t\t\t\t\t\t\t\t$shiftedSchedule[$dayNumber + 1][$wrappedHour] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$shiftedSchedule[$dayNumber][$effectiveHour] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$schedule = $shiftedSchedule;\n\t\t\t\n\t\t\t//Trim out all but an 8-day period\n\t\t\t$currentDayOfWeekUTC = date('w', $now);\n\t\t\t$currentHourUTC = date('G', $now);\n\t\t\t$periodStart = floor($now / 86400) * 86400 - $currentDayOfWeekUTC * 86400;\n\t\t\t$schedule = array_slice($schedule, $currentDayOfWeekUTC, null, true);\n\t\t\t$schedule = array_slice($schedule, 0, 8, true);\n\t\t\t\n\t\t\t//Schedule them\n\t\t\tforeach ($schedule as $dayNumber => $day) {\n\t\t\t\tforeach ($day as $hourNumber => $enabled) {\n\t\t\t\t\tif ($enabled) {\n\t\t\t\t\t\tif ($dayNumber == $currentDayOfWeekUTC && $currentHourUTC > $hourNumber) { //It's today and we've already passed its hour, skip it\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($dayNumber > 6 && ($dayNumber % 7) == $currentDayOfWeekUTC && $currentHourUTC <= $hourNumber) { //It's one week from today but beyond the current hour, skip it this cycle\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$scanTime = $periodStart + $dayNumber * 86400 + $hourNumber * 3600 + wfWAFUtils::random_int(0, 3600);\n\t\t\t\t\t\twordfence::status(4, 'info', \"Scheduled time for day {$dayNumber} hour {$hourNumber} is: \" . wfUtils::formatLocalTime('l jS \\of F Y h:i:s A P', $scanTime));\n\t\t\t\t\t\t$this->scheduleSingleScan($scanTime);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$noc1ScanSchedule = wfConfig::get_ser('noc1ScanSchedule', array());\n\t\t\tforeach ($noc1ScanSchedule as $timestamp) {\n\t\t\t\t$timestamp = wfUtils::denormalizedTime($timestamp);\n\t\t\t\tif ($timestamp > time()) {\n\t\t\t\t\t$this->scheduleSingleScan($timestamp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $schedules = [\n [\n 'SeasonId' => '1',\n 'DivisionId' => '1',\n 'VenueId' => '1',\n 'Status' => 'Played',\n 'DateTime' => Carbon::createFromDate(2016,02,31)->toDateTimeString(),\n 'HomeTeamId' => '3',\n 'GoalsHomeTeam' => '1',\n 'AwayTeamId' => '5',\n 'GoalsAwayTeam' => '5',\n 'IsHidden' => false\n \n ],\n [\n 'SeasonId' => '1',\n 'DivisionId' => '2',\n 'VenueId' => '2',\n 'Status' => 'Played',\n 'DateTime' => Carbon::createFromDate(2017,02,31)->toDateTimeString(),\n 'HomeTeamId' => '2',\n 'GoalsHomeTeam' => '10',\n 'AwayTeamId' => '3',\n 'GoalsAwayTeam' => '1',\n 'IsHidden' => false\n ],\n [\n 'SeasonId' => '2',\n 'DivisionId' => '3',\n 'VenueId' => '3',\n 'Status' => 'Forfeited',\n 'DateTime' => Carbon::createFromDate(2017,03,31)->toDateTimeString(),\n 'HomeTeamId' => '1',\n 'GoalsHomeTeam' => '1',\n 'AwayTeamId' => '2',\n 'GoalsAwayTeam' => '0',\n 'IsHidden' => false\n ]\n ];\n\n foreach ($schedules as $schedule) {\n Schedule::create($schedule);\n }\n }", "function schedulePractice()\r\n {\r\n \r\n }", "public function run()\n {\n \n\n \\DB::table('day_schedule')->delete();\n \n \\DB::table('day_schedule')->insert(array (\n 0 => \n array (\n 'schedule_id' => '1',\n 'day_id' => '2',\n 'starts_at' => '05:00',\n 'ends_at' => '07:00',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 1 => \n array (\n 'schedule_id' => '5',\n 'day_id' => '2',\n 'starts_at' => '07:00',\n 'ends_at' => '08:00',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 2 => \n array (\n 'schedule_id' => '6',\n 'day_id' => '2',\n 'starts_at' => '08:00',\n 'ends_at' => '10:00',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 3 => \n array (\n 'schedule_id' => '7',\n 'day_id' => '2',\n 'starts_at' => '10:00',\n 'ends_at' => '11:00',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 4 => \n array (\n 'schedule_id' => '8',\n 'day_id' => '2',\n 'starts_at' => '11:00',\n 'ends_at' => '12:00',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n ));\n \n \n }", "public function run()\n {\n /*$faker=Faker::create('id_ID');\n $academic=array(\"MAT\",\"FIS\",\"KIM\",\"BIO\",\"BIND\",\"BING\",\"MAT2\",\"FIS2\",\"KIM2\",\"BIO2\",\"BIND2\",\"BING2\");\n $grade=array(\"XIPA1\",\"XIPA2\",\"XIPA3\",\"XIIPA1\",\"XIIPA2\",\"XIIPA3\",\"XIIIPA1\",\"XIIIPA2\",\"XIIIPA3\");\n for($i=0;$i<40;$i++){\n $ka = array_rand($academic);\n $kg = array_rand($grade);\n $start=$faker->time($format = 'H:i', $max = 'now');\n $end=Carbon::parse($start)->addHour(2)->format('H:i');\n \\DB::table('schedules')->insert([\n 'academic_code'=>$academic[$ka],\n 'grade_code'=>$grade[$kg],\n 'teacher_id'=>$faker->randomDigitNot(0),\n 'day'=>$faker->dayOfWeek($max = 'now'),\n 'start'=>$start,\n 'end'=>$end,\n 'status'=>\"Belum dimulai\",\n ]);\n };*/\n \\App\\Models\\Schedule::factory(20)->create();\n }", "function output_start() {\n\t}", "private function populateSchedule() {\n while(count($this->schedule) <= round(self::AVERAGE_NUMBER_OF_GAMES_PER_ROUND * 1.2) ) {\n for ($i = 0; $i < 3; $i++) {\n foreach($this->matchUpsPerCombination as $matchUps) {\n $game = new Game();\n $teamRepo = $this->em->getRepository('AppBundle:Team');\n $teamA = $teamRepo->findByPlayers(array_pop($matchUps[$i]), array_pop($matchUps[$i]));\n $teamB = $teamRepo->findByPlayers(array_pop($matchUps[$i]), array_pop($matchUps[$i]));\n $game->setTeamA($teamA);\n $game->setTeamB($teamB);\n $this->schedule->add($game);\n }\n }\n }\n }", "protected function defineConsoleSchedule()\n {\n $this->app->singleton(Schedule::class, function () {\n return new Schedule();\n });\n\n $schedule = $this->app->make(Schedule::class);\n\n $this->schedule($schedule);\n }", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//$schedule->command('inspire')->everyFiveMinutes();\n\t\t//$schedule->command('neonservice')->everyMinute();\n\n // $schedule->exec('cmd')->daily();\n //$schedule->exec('sippyaccountusage')->hourly();\n\n }", "public function autogenerate(){\n\t\t\t/*\n\t\t\tif(date('H') != 6){\n\t\t\t\texit();\n\t\t\t}\n\t\t\t*/\n\t\t\t//if cli\n\t\t\tif(!is_cli()){\n\t\t\t\texit();\n\t\t\t}\n\t\t\twrite_file('./genreports/file.log', date('Y-m-d').'Fetch : ', \"a+\");\n\t\t\t$monitoring_contract = date('Y-m-d', strtotime('+'.$this->months_end.' month'));\n\t\t\t//echo $monitoring_contract;\n\t\t\t$where = array(\n\t\t\t\t'employee.status' => 'active',\n\t\t\t\t'employee.employee_status' => 2,\n\t\t\t\t'employee.contract_end <=' => $monitoring_contract\n\t\t\t);\n\t\t\t$fetch = $this->employee_model->get_emp($where);\n\t\t\t$data = array();\n\t\t\tif(!empty($fetch))\n\t\t\t{\n\t\t\t\t// Write log generate to file\n\t\t\t\twrite_file('./genreports/file.log', 'exist'.\"\\n\", \"a+\");\n\t\t\t\tforeach($fetch as $key=> $value)\n\t\t\t\t{\n\t\t\t\t\t// set data\n\t\t\t\t\t$temp = array(); // initialize\n\t\t\t\t\t$temp = array(\n\t\t\t\t\t\t\t$value['name'],\n\t\t\t\t\t\t\t$value['address'],\n\t\t\t\t\t\t\t$value['email'],\n\t\t\t\t\t\t\t$value['employee_status_name'],\n\t\t\t\t\t\t\t$value['join_date'],\n\t\t\t\t\t\t\t$value['contract_start'],\n\t\t\t\t\t\t\t$value['contract_end']\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\tarray_push($data,$temp);\n\t\t\t\t}\n\t\t\t\t$this->generate_report($data,date('d M Y'));\t\t\t\t\n\t\t\t}else{\n\t\t\t\twrite_file('./genreports/file.log', 'empty'.\"\\n\", \"a+\");\n\t\t\t}\n\t\t}", "protected function schedule(Schedule $schedule)\n {\n $filePath = '/var/log/apollo/schedule.log';\n $schedule->command('lottery:send dlt xidiancc@gmail.com wliu.way@foxmail.com')\n ->cron('0 21 * * 1,3,6')\n ->appendOutputTo($filePath);\n\n $schedule->command('lottery:send ssq xidiancc@gmail.com wliu.way@foxmail.com')\n ->cron('0 22 * * 2,4,7')\n ->appendOutputTo($filePath);\n }", "private static function buildTimeTable(Collection $schedule)\n\t{\n\t\t$requiredTimes = [];\n\t\tforeach($schedule as $entry) {\n\t\t\t$requiredTimes[] = $entry->start_time;\n\t\t\t// remove the seconds portion (looks ugly on frontend)\n\t\t\t$entry->start_time = Carbon::createFromTimeString($entry->start_time)->format('H:i');\n\t\t\t$entry->end_time = Carbon::createFromTimeString($entry->end_time)->format('H:i');\n\t\t}\n\n\t\t$requiredTimes = array_diff(TimeTable::$timeSlots, $requiredTimes);\n\t\t$requiredTimes = array_values($requiredTimes);\n\n\t\tforeach($requiredTimes as $time) {\n\t\t\tif($time == TimeTable::$breakHour) {\n\t\t\t\t$courseName = 'Break';\n\t\t\t\t$endTime = Carbon::createFromTimeString($time)->addHour();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$courseName = 'Free Slot';\n\t\t\t\t$endTime = Carbon::createFromTimeString($time)->addMinutes(TimeTable::$classMinutes);\n\t\t\t}\n\t\t\t$time = Carbon::createFromTimeString($time);\n\t\t\t$schedule->push((object)[\n\t\t\t\t'start_time' => $time->format('H:i'),\n\t\t\t\t'end_time' => $endTime->format('H:i'),\n\t\t\t\t'course_name' => $courseName,\n\t\t\t\t'faculty_name' => null,\n\t\t\t\t'room_name' => null,\n\t\t\t\t'location' => null\n\t\t\t]);\n\t\t}\n\t\t$schedule = $schedule->sortBy('start_time');\n\t\treturn $schedule->values();\n\t}", "protected function schedule(Schedule $schedule)\n\t{\n\t\t$schedule->command('rentalrequests:expire')->hourly()->appendOutputTo(storage_path('logs/console_output.log'));\n\t\t$schedule->command('rentals:charge')->hourly()->appendOutputTo(storage_path('logs/console_output.log'));\n\t\t$schedule->command('rentals:shippinglabels')->hourly()->appendOutputTo(storage_path('logs/console_output.log'));\n\t\t$schedule->command('rentals:shippingstatus')->hourly()->appendOutputTo(storage_path('logs/console_output.log'));\n\t\t$schedule->command('calcscores')->hourlyAt(30)->appendOutputTo(storage_path('logs/console_output.log'));\n\t\t$schedule->command('notify:rental-request')->hourly()->appendOutputTo(storage_path('logs/console_output.log'));\n\t\t$schedule->command('notify:shipping')->dailyAt('11:00')->appendOutputTo(storage_path('logs/console_output.log'));\n\t}", "public function run()\n {\n $schedules = [\n [\n 'client_id' => 1,\n 'subject' => 'Revision de pruebas',\n 'date_time' => '2020-09-18 12:00',\n 'status' => 'Programada'\n ],\n [\n 'client_id' => 2,\n 'subject' => 'Revision de examenes',\n 'date_time' => '2020-09-19 12:00',\n 'status' => 'Programada'\n ],\n [\n 'client_id' => 3,\n 'subject' => 'Revision de tesis',\n 'date_time' => '2020-09-20 12:00',\n 'status' => 'Programada'\n ]\n ];\n\n Schedule::insert($schedules);\n }", "public function run()\n {\n $endDate = new \\DateTime('now');\n $beginDate = new \\DateTime('-45 days');\n\n $interval = \\DateInterval::createFromDateString('1 day');\n $period = new \\DatePeriod($beginDate, $interval, $endDate);\n\n $macAddresses = MacAddress::all();\n\n foreach ($macAddresses as $macAddress)\n {\n $this->createBitrate($macAddress, $period);\n $this->createInterference($macAddress, $period);\n $this->createRss($macAddress, $period);\n }\n }", "public function process()\n {\n $this->export(date('20200101'), 1); //TODO: maybe use another timestamp\n }", "protected function schedule(Schedule $schedule) {\n\t\t// $schedule->command('inspire')\n\t\t// ->hourly();\n\t\t$schedule->command('email:broadcastEmail')->everyMinute();\n //set to commit there is error in cron\n\t\t//$schedule->command('email:email-if-not-accessed-coach-feedback')->everyFiveMinutes();\n\t\t$schedule->command('email:email-before-24-hours-of_session')->everyMinute();\n\t\t$schedule->command('email:monthly-email-activity')->monthlyOn(1, '09:00');\n\t\t// $schedule->command('email:monthly-email-activity')->dailyAt('13:21');\n\t\t//$schedule->command('email:monthly-email-activity')->everyFiveMinutes();\n\t\t// $schedule->command('subscribe:check-subscription-plan')->everyMinute();\n\t\t$schedule->command('subscribe:check-subscription-plan')->everyThirtyMinutes();\n\t\t$schedule->command('email:user-inactive')->dailyAt('3:00');\n\t\t$schedule->command('email:user-notbooked-schedule')->dailyAt('3:00');\n\t\t$schedule->command('email:user-notactive')->dailyAt('3:00');\n\t\t$schedule->command('email:lifestorey-update-notify')->dailyAt('3:00');\n\t\t$schedule->command('email:email-if-not-accessed-coach-feedback')->dailyAt('3:00');\n\t\t$schedule->command('command:completed-sessions')->hourlyAt(20);\n\t\t//$schedule->command('command:completed-sessions')->everyMinute();\n\t\t$schedule->command('command:gratuate-user-monthly-activity')->dailyAt('3:00');\n\n\t\t$schedule->command('command:coach-next-month-scheduled-Week')->monthlyOn(1, '09:00');\n\t\t$schedule->command('subscribe:addedbyadmin')->everyThirtyMinutes();\n\t\t$schedule->command('command:createmeeting')->everyMinute();\n\t\t$schedule->command('command:coaching-credit-payment-using-paypal-to-coach')->everyMinute();\n\n $schedule->command('command:charge-client-managers')->monthlyOn(27, '09:00');\n $schedule->command('command:update-client-credits')->monthlyOn(27, '09:00');\n\t\t//$schedule->command('test:ToCheckMailWorks')->everyMinute();\n\t}", "public function generate()\n {\n $excel = $this->excel;\n \n $ss = $excel->newSpreadSheet();\n $sheetIndex = 0;\n \n //$this->generateConfirmed ($ss->createSheet(1));\n //$this->generateMaybe ($ss->createSheet(2));\n //$this->generateStates ($ss->createSheet(3));\n //$this->generateGroundTransport($ss->createSheet(4));\n \n //$this->generateAssessments ($ss->createSheet(5));\n //$this->generateAssessments ($ss->createSheet(5));\n //$this->generateAvailability ($ss->createSheet(6));\n $this->generateProjectPersons ($ss->createSheet($sheetIndex++));\n $this->generateWantAssess ($ss->createSheet($sheetIndex++));\n $this->generateWillAssess ($ss->createSheet($sheetIndex++));\n \n //$this->generateCounts($ss->getSheet(0));\n \n // Output\n $ss->setActiveSheetIndex(0);\n $objWriter = $excel->newWriter($ss); // \\PHPExcel_IOFactory::createWriter($ss, 'Excel5');\n\n ob_start();\n $objWriter->save('php://output'); // Instead of file name\n return ob_get_clean();\n }", "public function run()\n {\n $faker = Faker::create();\n \n $start = SeederConfig::START_DATE();\n $end = SeederConfig::END_DATE();\n \n $courses = $this->courses();\n\n $array = DB::table('planes')\n ->select('id', 'hours')\n ->get();\n\n $planes = array();\n\n foreach ($array as $plan) {\n $planes[$plan->id] = $plan->hours;\n }\n\n\n for ($j = 1; $j <count($courses); $j++) { \n $courseGroups = $faker->numberBetween(1,4);\n $hours = $planes[$courses[$j]];\n\n for ($i = 1; $i<$courseGroups; $i++) {\n\n $startDate = Carbon::createFromFormat('Y-m-d',$faker->dateTimeBetween('-3 months', '3 months')->format('Y-m-d'));\n $endDate = $startDate->copy()->addWeeks(2);\n\n DB::table('course_groups')->insert([\n 'course_id' => $j,\n 'name' => \"g\".strval($i),\n 'start_date' => $startDate,\n 'end_date' => $endDate,\n 'hours' => $hours,\n ]);\n }\n } \n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('Instagram:V1.GetStoriesLouder')\n ->hourly()\n ->withoutOverlapping()\n ->sendOutputTo('/var/www/log/mylouder/louderbase/'.date('(d-m-Y)_H_m_s').'_louderbase.log');\n }", "public function generateOutput()\n {\n if ( is_null( $this->formatter ) )\n $this->formatter = new ezcDebugHtmlFormatter();\n\n return $this->formatter->generateOutput( $this->writer->getStructure(), $this->timer->getTimeData() );\n }", "public function run()\n {\n \t$project = Project::where('name', 'PIAMSBBFP')->first(); \n\t\t$projectCharter = ProjectCharter::where('project_id', $project->id)->first(); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Project Launch', \n\t\t\t'due_date' => '2019-07-31 00:00:00', \n\t\t\t'order' => 1, \n\t\t\t'description' => 'Project Launch', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Acquire Resource', \n\t\t\t'due_date' => '2019-08-15 00:00:00', \n\t\t\t'order' => 2, \n\t\t\t'description' => 'Acquire Resource', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Requirement Definition', \n\t\t\t'due_date' => '2019-08-31 00:00:00', \n\t\t\t'order' => 3, \n\t\t\t'description' => 'Requirement Definition', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Detailed Design', \n\t\t\t'due_date' => '2019-09-15 00:00:00',\n\t\t\t'order' => 4, \n\t\t\t'description' => 'Detailed Design', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'System Configuration', \n\t\t\t'due_date' => '2019-09-30 00:00:00', \n\t\t\t'order' => 5, \n\t\t\t'description' => 'System Configuration', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Acquire & Install System', \n\t\t\t'due_date' => '2019-09-15 00:00:00', \n\t\t\t'order' => 6, \n\t\t\t'description' => 'Acquire & Install System', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Application Development', \n\t\t\t'due_date' => '2019-10-15 00:00:00', \n\t\t\t'order' => 7, \n\t\t\t'description' => 'Application Development', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Data Migration', \n\t\t\t'due_date' => '2019-10-31 00:00:00', \n\t\t\t'order' => 8, \n\t\t\t'description' => 'Data Migration', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'System Documentation', \n\t\t\t'due_date' => '2019-12-05 00:00:00', \n\t\t\t'order' => 9, \n\t\t\t'description' => 'System Documentation', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Testing', \n\t\t\t'due_date' => '2019-12-10 00:00:00', \n\t\t\t'order' => 10, \n\t\t\t'description' => 'Testing', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Training', \n\t\t\t'due_date' => '2019-12-15 00:00:00', \n\t\t\t'order' => 11, \n\t\t\t'description' => 'Training', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Product Launching', \n\t\t\t'due_date' => '2019-12-20 00:00:00', \n\t\t\t'order' => 12, \n\t\t\t'description' => 'Product Launching', \n\t\t]); \n\n\t\tProjectCharterSchedule::create([\n\t\t\t'project_charter_id' => $projectCharter->id, \n\t\t\t'milestone' => 'Close Down', \n\t\t\t'due_date' => '2020-01-15 00:00:00', \n\t\t\t'order' => 13, \n\t\t\t'description' => 'Close Down', \n\t\t]); \n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function ()\n {\n $telegram = new SchedullerController();\n $telegram->checkSchedullerTask();\n })->everyMinute();\n $schedule->call(function ()\n {\n $demo = new DemoBotController();\n $demo->getSchedullerTasks();\n })->everyMinute();\n $schedule->call(function ()\n {\n $call_center_head_info_last_month = new CallCenterController();\n $call_center_head_info_last_month->dailyInsertHeadInfoLastMonth();\n })->dailyAt('04:00');\n $schedule->call(function ()\n {\n $call_center_head_info_last_month = new CallCenterController();\n $call_center_head_info_last_month->dailyInsertHeadInfoCurrentMonth();\n })->dailyAt('04:05');\n// $schedule->call(function ()\n// {\n// $hour = date('H');\n// if ($hour <= 23 && $hour >= 8)\n// {\n// $error_bot = new SdekErrorController();\n// $error_bot->Index();\n// }\n// })->everyThirtyMinutes();\n $schedule->call(function ()\n {\n $penalty_webs = new ZcpaWebPenaltyController();\n $penalty_webs->getPenaltyData();\n })->weekdays()->at('21:00');\n $schedule->call(function ()\n {\n $penalty_webs = new ZcpaWebPenaltyController();\n $penalty_webs->sendMessageToWebmaster();\n })->weekdays()->at('18:00');\n// $schedule->call(function ()\n// {\n// $dailyBalanceMessage = new ZcpaController();\n// $dailyBalanceMessage->dailyBalanceMessage();\n// })->dailyAt('23:00');\n $schedule->call(function ()\n {\n $facebook = new FacebookController();\n return $facebook->deleteComments();\n })->everyMinute();\n $schedule->call(function ()\n {\n $instagram = new InstagramController();\n return $instagram->checkNewMessage();\n })->everyMinute();\n $schedule->call(function ()\n {\n $chinilov_yesterday = new ChinilovDataController();\n $chinilov_yesterday->yesterdayData();\n })->dailyAt('10:00');\n $schedule->call(function ()\n {\n $chinilov_today = new ChinilovDataController();\n $chinilov_today->todayData();\n })->dailyAt('21:00');\n }", "public function run() {\n //is a work around.\n Artisan::call('schedule:run');\n $output = Artisan::output();\n return $output;\n }", "function print_daily_schedule($day_schedule) {\n\t\techo \"<td>\";\n\t\twhile (list($key, $value) = each($day_schedule)) {\n\t\t\techo \"<pre>\";\n\t\t\techo $key.\": \".$value;\n\t\t\techo \"</pre>\";\t\t\n\t\t}\n\t\techo \"</td>\";\n\t}", "protected function schedule(Schedule $schedule)\n {\n\n $schedule->command('scan_weibo_feed')->hourly()->timezone('Asia/Shanghai')->when(function(){\n return true;\n })->appendOutputTo(storage_path('/logs/scan_weibo_feed.log'));\n\n $schedule->command('scan_weibo_topic')->dailyAt('0:00')->timezone('Asia/Shanghai')->when(function(){\n return true;\n })->appendOutputTo(storage_path('/logs/scan_weibo_topic.log'));\n\n $schedule->command('scan_host_course_list')->dailyAt('0:00')->timezone('Asia/Shanghai')->when(function(){\n return true;\n })->appendOutputTo(storage_path('/logs/scan_host_course_list.log'));\n\n $schedule->command('scan_page_log_stat')->dailyAt('0:00')->timezone('Asia/Shanghai')->when(function(){\n return true;\n })->appendOutputTo(storage_path('/logs/scan_page_log_stat.log'));\n }", "function ConOrg_Schedule ()\n{\n}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')->hourly();\n $schedule->command('purchase:create')->cron('20 4,12 * * *');\n $schedule->command('purchaseStaticstics:create')->cron('20 6 * * *');\n \n //黑名单定时任务\n $schedule->command('blacklists:get')->dailyAt('2:00');\n $schedule->command('blacklists:update')->dailyAt('3:00');\n\n //EbaySku销量报表定时任务\n $schedule->command('ebaySkuSaleReport:update')->cron('0 16 * * *');\n\n //EBAY销售额统计定时任务\n $schedule->command('ebayAmountStatistics:update')->cron('0 17 * * *');\n\n //抓单定时任务规则\n foreach (ChannelModel::all() as $channel) {\n switch ($channel->driver) {\n case 'amazon':\n foreach ($channel->accounts->where('is_available', '1') as $account) {\n $schedule->command('get:orders ' . $account->id)->everyThirtyMinutes();\n }\n break;\n case 'aliexpress':\n //foreach ($channel->accounts->where('is_available', '1') as $account) {\n // $schedule->command('get:orders ' . $account->id)->cron('2 6,18,22 * * *');\n //}\n $schedule->command('sentReturnTrack:get ' . $channel->id)->cron('05 */2 * * *');\n break;\n case 'wish':\n //foreach ($channel->accounts->where('is_available', '1')->where('id',5) as $account) {\n // $schedule->command('get:orders ' . $account->id)->everyThirtyMinutes();\n //}\n $schedule->command('sentReturnTrack:get ' . $channel->id)->cron('02 * * * *');\n break;\n case 'ebay':\n //foreach ($channel->accounts->where('is_available', '1') as $account) {\n // $schedule->command('get:orders ' . $account->id)->everyThirtyMinutes();\n //}\n $schedule->command('sentReturnTrack:get ' . $channel->id)->cron('02 * * * *');\n break;\n case 'lazada':\n foreach ($channel->accounts->where('is_available', '1') as $account) {\n $schedule->command('get:orders ' . $account->id)->everyThirtyMinutes();\n }\n break;\n case 'cdiscount':\n foreach ($channel->accounts->where('is_available', '1') as $account) {\n $schedule->command('get:orders ' . $account->id)->everyThirtyMinutes();\n }\n break;\n case 'joom':\n foreach ($channel->accounts->where('is_available', '1') as $account) {\n $schedule->command('get:orders ' . $account->id)->everyThirtyMinutes();\n }\n break;\n }\n }\n //订单导入时间超过20天 系统自动撤单\n $schedule->command('autoCancelOrder:cancelOrder')->hourly();\n //包裹报表\n $schedule->command('pick:report')->hourly();\n $schedule->command('all:report')->daily();\n //CRM\n $schedule->command('import:message aliexpress')->cron('40 8,15 * * *'); //aliexpress\n $schedule->command('import:message ebay')->everyFiveMinutes(); //ebay\n $schedule->command('import:message wish')->hourly(); //wish\n $schedule->command('getEbayCases')->cron('30 8,12,13,14,16,17 * * *');\n $schedule->command('getFeedBack:account')->everyTenMinutes();\n $schedule->command('reply:again all')->everyThirtyMinutes();\n //采购\n $schedule->command('aliShipmentName:get')->hourly();\n $schedule->command('sendEmailToPurchase:notWarehouse')->cron('15 4 * * *');\n //API同步sellmore database\n $schedule->command('SyncSellmoreApi:all')->everyFiveMinutes();\n $schedule->command('SyncImportApi:all')->everyFiveMinutes();\n //半小时一次将包裹放入队列\n $schedule->command('autoRun:packages doPackages,assignStocks,assignLogistics,placeLogistics')->everyThirtyMinutes();\n //财务\n $schedule->command('aliexpressRefundStatus:change')->cron('0 21 * * *');//速卖通退款小于15美金 21:00 执行\n //DHL\n $schedule->command('dhl:sureShip')->daily();\n //匹配paypal\n $schedule->command('match:account all')->cron('*/20 * * * *');\n //邮件回复统计\n $schedule->command('compute:start')->cron('0 01 * * *'); //凌晨一点\n }", "public function run()\n {\n $planes_especialidades = PlanEspecialidad::get();\n foreach ($planes_especialidades as $key => $plan_especialidad) {\n for ($i=0; $i < 25; $i++) { \n factory(App\\Models\\Reticula::class,1)->create([\n 'plan_especialidad_id' => $plan_especialidad->id,\n 'periodo_reticula' => rand(1,$plan_especialidad->periodos)\n ]);\n }\n }\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->exec(\"python \" . public_path(). \"\\images\\\\nipponyasan.py \");\n $schedule->exec(\"python \" . public_path(). \"\\images\\biginjapan.py \");\n $schedule->exec(\"python \" . public_path(). \"\\images\\amiami\\amiami.py \");\n $schedule->call(function () {\n\n $notifications = Notification::all();\n $dailysales = Sale::where('created_at', date(\"Y-m-d\"))->get();\n foreach ($dailysales as $dailysale) {\n foreach ($notifications as $notification){\n if ($dailysale->figure['character_id'] == $notification['character_id']){\n\n $isnotification = ActualNotification::where('user_id', $notification['user_id'])->where('sale_id', $dailysale['id'])->get();\n if (count($isnotification) == 0)\n ActualNotification::create(array(\n 'user_id'=> $notification['user_id'],\n 'sale_id'=> $dailysale['id'],\n ));\n }\n }\n }\n\n });\n\n // $schedule->command('inspire')\n // ->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n #cron generate numbers winner, starter, consolation.\n #$schedule->call(function () {$this->cronGenerate();})->everyTenMinutes();\n $schedule->call(function(){$this->cronGenerate();})->dailyAt('00:01');\n $schedule->command('activations:clean')->daily();\n // luffy 7 April 2020 08:41 pm\n # tiap 12 jam\n // $schedule->command('cache:flush')->cron('0 */12 * * *');\n // $schedule->command('session:flush')->cron('0 */12 * * *');hours\n #tiap hari jam 09:00 & 21:00\n $schedule->command('cache:flush')->twiceDaily(9, 21);\n $schedule->command('session:flush')->twiceDaily(9, 21);\n }", "protected function get_schedules() {\r\n\t\treturn array(\r\n\t\t\t0 => 2 * GyroDate::ONE_MINUTE,\r\n\t\t\t1 => 15 * GyroDate::ONE_MINUTE,\r\n\t\t\t2 => 30 * GyroDate::ONE_MINUTE,\r\n\t\t\t3 => 1 * GyroDate::ONE_HOUR,\r\n\t\t\t4 => 2 * GyroDate::ONE_HOUR,\r\n\t\t\t5 => 3 * GyroDate::ONE_HOUR,\r\n\t\t\t6 => 6 * GyroDate::ONE_HOUR,\r\n\t\t\t7 => 12 * GyroDate::ONE_HOUR,\r\n\t\t);\r\n\t}", "function createEmptyStudentsSchedule (){\n for ($x = 1; $x <= $this->days_a_week; $x++ ){\n\t\t\t\n\t\t\t$this->students_schedule_count['Days'][($x-1)] = [ 'Slots' => [] ];\n\t\t\t$this->students_schedule['Days'][($x-1)] = [ 'Slots' => [] ];\n\t\t\t\n\t\t\tfor ($y = 1; $y <= $this->slot_total_count; $y++){\n\t\t\t\t// start hack\n\t\t\t\t// explained in the saveNewStudentsSchedule() function\n\t\t\t\t// hack for python slot times (based 30 mins)\n\t\t\t\t// default to one times in case the slot time is flawed\n\t\t\t\t$howManyTimes = ( ( $this->settings['day_slot_time'] / 30 ) > 0 ) ? intval($this->settings['day_slot_time'] / 30) : 1;\n\t\t\t\t\n\t\t\t\tfor ( $t = 0; $t < $howManyTimes ; $t++){\n\t\t\t\t\t$this->students_schedule_count['Days'][($x-1)]['Slots'][] = ['NumberOfStudents' => 0];\n\t\t\t\t}\n\t\t\t\t// end hack\n\t\t\t\t\n\t\t\t\t$this->students_schedule['Days'][($x-1)]['Slots'][] = [ 'Students' => [] ];\n\t\t\t}// end for y\n\t\t\t\n\t\t}// end for x\n\t\t\n\t\t// Save students schedule\n\t\t$this->saveStudentsScheduleToJSON();\n\t\t\n\t\t// Save students schedule count\n\t\t$this->saveStudentsScheduleCountToJSON();\n }", "protected function schedule(Schedule $schedule)\n {\n $archive_command = 'archive:richmedia';\n $file_path = config( $this->my_config . '.archive_log_file' );\n\n if (env('APP_ENV') == 'local') {\n $schedule->command($archive_command)\n ->monthly()\n ->sendOutputTo($file_path);\n // ->everyMinute()\n // ->withoutOverlapping();\n } else {\n // Every first day of the month at 12 midnight\n // Remove comment when logic is ready /app/Console/Commands/Archive.php\n // $schedule->command($archive_command)\n // ->cron('0 0 1 * *')\n // ->sendOutputTo($file_path);\n }\n }", "protected function schedule(Schedule $schedule)\n { \n $schedule->call(function () {\n DB::table('orders')->whereDate('finish_date', '<=', Carbon::now('Asia/Ho_Chi_Minh')->format('Y-m-d'))->update(['status' => '2']);\n DB::table('reserves')->whereDate('finish_day', '=', Carbon::now('Asia/Ho_Chi_Minh')->format('Y-m-d'))->update(['status' => '2']);\n \n \n })->everyMinute();\n\n $schedule->call(function () {\n $now = Carbon::now();\n $thoi_gian_gui_email = $now->addDays(2);\n $data = [];\n $data = Order::whereDate('finish_date', $thoi_gian_gui_email)->get();\n SenEmailDangKi::dispatch($data);\n $reserve = [];\n $reserve = Reserve::whereDate('finish_day', $thoi_gian_gui_email)->get();\n SenEmailBaoLuu::dispatch($reserve);\n })->everyMinute();\n \n \n // ->weeklyOn(1, '8:00');\n }", "protected function defineConsoleSchedule()\n {\n $this->app->singleton(Schedule::class, function ($app) {\n return tap(new Schedule($this->scheduleTimezone()), function (Schedule $schedule) {\n $this->schedule($schedule->useCache($this->scheduleCache()));\n });\n });\n }", "public function run()\n {\n DB::table('tirreport')->insert(\n [\n ['start'=>\"Start program_1\", 'stop'=>\"<p>1_Stop program.</p>\",'driver'=>\"<p>Nume sofer 1</p>\",'truck'=>\"<p>Camion 1</p>\", 'pause'=>\"<p>Camion 1</p>\", 'author'=>'LEO1'],\n ['start'=>\"Start program_2\", 'stop'=>\"<p>2_Stop program.</p>\",'driver'=>\"<p>Nume sofer 2</p>\",'truck'=>\"<p>Camion 2</p>\", 'pause'=>\"<p>Camion 1</p>\", 'author'=>'LEO2'],\n ['start'=>\"Start program_3\", 'stop'=>\"<p>3_Stop program.</p>\",'driver'=>\"<p>Nume sofer 3</p>\",'truck'=>\"<p>Camion 3</p>\", 'pause'=>\"<p>Camion 1</p>\", 'author'=>'LEO3'],\n ]\n );\n }", "function runTask()\n {\n // This task requires DMY4/ date format for informix\n //putenv(\"DBDATE=DMY4\");\n //$_ENV[\"DBDATE\"] = \"DMY4/\";\n\n // Create the auto_journey_schedule table\n $ajs = new AutoJourneySchedule($this->connector);\n $ajs->dropTable();\n $ajs->createTable();\n\n // Clear out the auto_journey_schedule table\n if ( !$this->connector->executeSQL (\"BEGIN WORK\" ) )\n return false;\n\n $sql = \"LOCK TABLE auto_journey_schedule in EXCLUSIVE MODE\";\n if ( !$this->connector->executeSQL($sql) )\n return false;\n\n $sql = \"DELETE FROM auto_journey_schedule\";\n if ( !$this->connector->executeSQL($sql) )\n return false;\n\n if ( !$this->connector->executeSQL (\"COMMIT WORK\" ) )\n return false;\n\n // Generate auto trip start schedule for next x days\n $buildDate = new DateTime();\n for ( $ct = 0; $ct < 2; $ct++ )\n {\n if ( !$this->buildAutoJourneySchedule($buildDate) )\n return false;\n $buildDate = $buildDate->Add(new Dateinterval(\"P1D\"));\n }\n\n return true;\n\n }", "public function run()\n {\n factory(Local::class, 5)->create();\n\n $this->createTraining(6,1,1,new DateTime('2020-11-02'), \"19:00\", \"20:00\", \"Segunda-Feira\");\n $this->createTraining(6,1,2,new DateTime('2020-11-03'), \"19:30\", \"20:30\", \"Terça-Feira\");\n $this->createTraining(6,1,1,new DateTime('2020-11-04'), \"20:00\", \"21:00\", \"Quarta-Feira\");\n $this->createTraining(6,1,3,new DateTime('2020-11-05'), \"19:00\", \"20:00\", \"Quinta-Feira\");\n }", "function createRunningTime() {\r\n $minutes = stripslashes($this->row['miscField1']);\r\n $hours = stripslashes($this->row['miscField4']);\r\n if (!$hours && !$minutes)\r\n return;\r\n if (!$hours)\r\n $hours = 0;\r\n $this->bibformat->formatRunningTime($minutes, $hours);\r\n }", "function fpw_add_cron_schedules($schedules) {\n\n // add a 'bihourly' schedule\n $schedules['bihourly'] = array(\n 'interval' => 7200, // 2 hours * 60 minutes * 60 seconds\n 'display' => __('Every Other Hour')\n );\n\n // add a 'twiceweekly'' schedule\n $schedules['twiceweekly'] = array(\n 'interval' => 302400, // 3.5 days * 24 * 60 minutes * 60 seconds\n 'display' => __('Twice a week')\n );\n\n // add a 'weekly' schedule\n $schedules['weekly'] = array(\n 'interval' => 604800, // 7 days * 24 hours * 60 minutes * 60 seconds\n 'display' => __('Once Weekly')\n );\n\n // Add a 'biweekly' schedule\n $schedules['biweekly'] = array(\n 'interval' => 1209600, // 2 weeks * 7 days * 24 hours * 60 minutes * 60 seconds\n 'display' => __('Every Other Week')\n );\n\n // Add a monthly schedule\n $schedules['monthly'] = array(\n 'interval' => 2592000, // 30 days * 24 hours * 60 minutes * 60 seconds\n 'display' => __('Every 30 days')\n );\n\n // Add a yearly schedule\n $schedules['yearly'] = array(\n 'interval' => 31536000, // 365 days * 24 hours * 60 minutes * 60 seconds\n 'display' => __('Every Year')\n );\n\n return $schedules;\n}", "public function run()\n {\n $available_times = [\n \"timer period 1\" => \"الصبح\",\n \"timer period 2\" => \"الظهر\",\n \"timer period 3\" => \"العصر\",\n \"timer period 4\" => \"المسا\",\n \"timer period 5\" => \"كل الأوقات\",\n ];\n\n foreach($available_times as $en => $ar){\n $available_time = new AvailableTime();\n $available_time->name_ar = $ar;\n $available_time->name_en = $en;\n $available_time->save();\n }\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function () {\n \n $db_name = env('DB_DATABASE', 'hms');\n $db_user = env('DB_USERNAME', 'root');\n $db_password = env('DB_PASSWORD', 'root');\n $db_host = env('DB_HOST', '127.0.0.1z');\n $backup_path = public_path( 'daily_backup'.date('Y-M-d').'.sql');\n\n //DO NOT EDIT BELOW THIS LINE\n //Export the database and output the status to the page\n $command = 'mysqldump --opt -h' .$db_host .' -u' .$db_user .' -p' .$db_password .' ' .$db_name .' > ' .$backup_path;\n //return $command;\n $output = array();\n exec($command, $output , $worked);\n\n })->daily();\n }", "public function getSchedule()\n {\n return \"0 3 * * *\";\n }", "public function run()\n {\n\n DB::table('schedules')->truncate();\n\n $faker = Faker::create();\n\n DB::table('schedules')->insert([\n [\n 'id' => '1',\n 'unit_class_id' => '1',\n 'shift_id' => '1',\n 'location_id' => '1',\n 'date' => $faker->dateTime(),\n ],\n [\n 'id' => '2',\n 'unit_class_id' => '1',\n 'shift_id' => '1',\n 'location_id' => '2',\n 'date' => $faker->dateTime(),\n ],\n [\n 'id' => '3',\n 'unit_class_id' => '2',\n 'shift_id' => '2',\n 'location_id' => '3',\n 'date' => $faker->dateTime(),\n ],\n ]);\n }", "public function run()\n {\n\n $times = [8, 10, 12, 14, 16, 18, 20, 22, 0];\n $period = CarbonPeriod::create(Carbon::now()->subWeek(), Carbon::now()->addYear());\n foreach ($period as $date) {\n foreach ($times as $time) {\n if(mt_rand(0, 100) <80) {\n factory(Training::class)->create([\n 'date' => $date,\n 'time' => $time,\n ]);\n }\n }\n }\n\n }", "function createEmptyTeachersSchedule (){\n // empty teachers schedule first\n $this->teachers_schedule = [];\n \n for ($x = 1; $x <= $this->days_a_week; $x++ ){\n $this->teachers_schedule['Days'][($x-1)] = [ 'Slots' => [] ];\n \n for ($y = 1; $y <= $this->slot_total_count; $y++){\n $this->teachers_schedule['Days'][($x-1)]['Slots'][] = [\n 'FullTime' => 0,\n 'PartTime' => 0\n ];\n }// end for y\n \n }// end for x\n \n // save JSON version of the schedule\n $this->teachers_schedule_json = json_encode ( $this->teachers_schedule );\n \n // Save teachers schedule\n $this->saveTeachersScheduleToJSON();\n }", "public function run()\n {\n App\\Workout::create([\n 'name' => \"Treino funcional 1\",\n 'created_by' => App\\User::where('first_name', 'Personal')->first()->id,\n 'schedule' => \"135\",\n 'sport_id' => 1,\n 'active' => 1\n ]);\n App\\Workout::create([\n 'name' => \"Treino Aeróbico 2\",\n 'created_by' => App\\User::where('first_name', 'João Victor')->first()->id,\n 'schedule' => \"246\",\n 'sport_id' => 1,\n 'active' => 0\n ]);\n App\\Workout::create([\n 'name' => \"Treino 3\",\n 'created_by' => App\\User::where('first_name', 'João Victor')->first()->id,\n 'schedule' => \"1345\",\n 'sport_id' => 1,\n 'active' => 1\n ]);\n App\\Workout::create([\n 'name' => \"Treino 4\",\n 'created_by' => App\\User::where('first_name', 'Personal')->first()->id,\n 'schedule' => \"1345\",\n 'sport_id' => 1,\n 'active' => 0\n ]);\n App\\Workout::create([\n 'name' => \"Treino 5\",\n 'created_by' => App\\User::where('first_name', 'Personal')->first()->id,\n 'schedule' => \"1256\",\n 'sport_id' => 1,\n 'active' => 0\n ]);\n App\\Workout::create([\n 'name' => \"Dieta 6\",\n 'created_by' => App\\User::where('first_name', 'João Victor')->first()->id,\n 'schedule' => \"0123456\",\n 'sport_id' => App\\Sport::where('name', 'Nutrição')->first()->id,\n 'active' => 1\n ]);\n App\\Workout::create([\n 'name' => \"Dieta 7\",\n 'created_by' => App\\User::where('first_name', 'Nutricionista')->first()->id,\n 'schedule' => \"0123456\",\n 'sport_id' => App\\Sport::where('name', 'Nutrição')->first()->id,\n 'active' => 1\n ]);\n App\\Workout::create([\n 'name' => \"Fisio 8\",\n 'created_by' => App\\User::where('first_name', 'João Victor')->first()->id,\n 'schedule' => \"135\",\n 'sport_id' => App\\Sport::where('name', 'Fisioterapia')->first()->id,\n 'active' => 1\n ]);\n App\\Workout::create([\n 'name' => \"Fisio 9\",\n 'created_by' => App\\User::where('first_name', 'Fisioterapeuta')->first()->id,\n 'schedule' => \"135\",\n 'sport_id' => App\\Sport::where('name', 'Fisioterapia')->first()->id,\n 'active' => 1\n ]);\n }", "public function run()\n {\n factory(App\\Schedule::class, 55)->create([\n 'project_id' => factory(\\App\\Project::class)->create([\n 'partner_id' => factory(\\App\\Partner::class)->create()->id\n ]),\n 'driver_id' => factory(\\App\\User::class)->create()->id,\n 'availability_shift_id' => factory(\\App\\AvailabilityShift::class)->create()->id\n ]);\n\n $users = \\App\\User::all();\n\n App\\Schedule::all()->each(function ($schedule) use ($users) {\n $schedule->employeeSchedules()->attach(\n $users->random()->first()->id\n );\n });\n }", "public function timetables(){\n\t\t$this->build('timetables');\n\t}" ]
[ "0.66280127", "0.61845225", "0.6181191", "0.6163803", "0.5968244", "0.5952934", "0.5910105", "0.58771664", "0.58283955", "0.5815785", "0.5802191", "0.5746059", "0.5736694", "0.5732906", "0.5719591", "0.5718419", "0.5702668", "0.5699374", "0.5698609", "0.56934744", "0.568128", "0.56800765", "0.566984", "0.5668478", "0.564975", "0.562587", "0.5624344", "0.5614311", "0.5606856", "0.5598724", "0.55742836", "0.5552334", "0.5550244", "0.55499136", "0.55497897", "0.55460185", "0.5532357", "0.55285305", "0.5524086", "0.5519957", "0.5512812", "0.55050075", "0.54869485", "0.5486517", "0.5484467", "0.54757106", "0.54672873", "0.5462478", "0.5459126", "0.54526794", "0.5448608", "0.5443244", "0.5437291", "0.5431374", "0.54102015", "0.53900295", "0.5387886", "0.5387305", "0.5381686", "0.5371787", "0.5366345", "0.5364729", "0.53642833", "0.53453416", "0.5344187", "0.534219", "0.53294563", "0.5328002", "0.5325618", "0.5324838", "0.5324782", "0.5322497", "0.53199273", "0.53194994", "0.5317186", "0.5314926", "0.531434", "0.53137785", "0.5312897", "0.5312179", "0.5309241", "0.53028613", "0.5301914", "0.53011626", "0.5299721", "0.529332", "0.5285785", "0.5276018", "0.5273762", "0.52735186", "0.52707624", "0.5269885", "0.52692807", "0.5265215", "0.52652055", "0.5261413", "0.5256876", "0.5253722", "0.5253637", "0.5248384" ]
0.70173866
0
Retrieve button attributes html
Получить атрибуты кнопки html
public function getButtonAttributesHtml() { $disabled = $this->getDisabled() ? 'disabled' : ''; $title = $this->getTitle(); if (!$title) { $title = $this->getLabel(); } $classes = []; $classes[] = 'action-default'; $classes[] = 'primary'; // @TODO Perhaps use $this->getButtonClass() instead if ($this->getClass()) { $classes[] = $this->getClass(); } if ($disabled) { $classes[] = $disabled; } $attributes = [ 'id' => $this->getId() . '-button', 'title' => $title, 'class' => join(' ', $classes), 'disabled' => $disabled, 'style' => $this->getStyle(), ]; //TODO perhaps we need to skip data-mage-init when disabled="disabled" if ($this->getDataAttribute()) { $this->_getDataAttributes($this->getDataAttribute(), $attributes); } $html = $this->_getAttributesString($attributes); $html .= $this->getUiId(); return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttributesHtml()\n {\n $title = $this->getTitle();\n if (!$title) {\n $title = $this->getLabel();\n }\n $classes = [];\n if ($this->hasSplit()) {\n $classes[] = 'actions-split';\n }\n //@TODO Perhaps use $this->getClass() instead\n if ($this->getButtonClass()) {\n $classes[] = $this->getButtonClass();\n }\n\n $attributes = ['id' => $this->getId(), 'title' => $title, 'class' => join(' ', $classes)];\n\n $html = $this->_getAttributesString($attributes);\n\n return $html;\n }", "public function attr() {\n\n\t\t$attr['class'] = 'fusion-button button-' . self::$args['type'] . ' button-' . self::$args['shape'] . ' button-' . self::$args['size'] . ' button-' . self::$args['color'] . ' button-' . $this->button_counter;\n\n\t\t$attr = fusion_builder_visibility_atts( self::$args['hide_on_mobile'], $attr );\n\n\t\tif ( self::$args['animation_type'] ) {\n\t\t\t$animations = FusionBuilder::animations( array(\n\t\t\t\t'type' => self::$args['animation_type'],\n\t\t\t\t'direction' => self::$args['animation_direction'],\n\t\t\t\t'speed' => self::$args['animation_speed'],\n\t\t\t\t'offset' => self::$args['animation_offset'],\n\t\t\t) );\n\n\t\t\t$attr = array_merge( $attr, $animations );\n\n\t\t\t$attr['class'] .= ' ' . $attr['animation_class'];\n\t\t\tunset( $attr['animation_class'] );\n\t\t}\n\n\t\t$attr['target'] = self::$args['target'];\n\t\tif ( '_blank' === self::$args['target'] ) {\n\t\t\t$attr['rel'] = 'noopener noreferrer';\n\t\t}\n\n\t\t$attr['title'] = self::$args['title'];\n\t\t$attr['href'] = self::$args['link'];\n\n\t\tif ( self::$args['modal'] ) {\n\t\t\t$attr['data-toggle'] = 'modal';\n\t\t\t$attr['data-target'] = '.fusion-modal.' . self::$args['modal'];\n\t\t}\n\n\t\tif ( self::$args['class'] ) {\n\t\t\t$attr['class'] .= ' ' . self::$args['class'];\n\t\t}\n\n\t\tif ( self::$args['id'] ) {\n\t\t\t$attr['id'] = self::$args['id'];\n\t\t}\n\n\t\treturn $attr;\n\n\t}", "protected function getButtonData($attrs)\n {\n switch ($this->button_type) {\n case 'text':\n return $attrs['title'];\n break;\n\n case 'icon-text':\n return '<i class=\"'.$attrs['icon'].'\"></i>'.$attrs['title'];\n\n case 'text-icon':\n return $attrs['title'].'<i class=\"'.$attrs['icon'].'\"></i>';\n\n case 'icon':\n default:\n return '<i class=\"'.$attrs['icon'].'\"></i>';\n break;\n }\n }", "public function getButtonData()\n {\n return [\n 'id' => 'attribute',\n 'label' => __('Create New Attribute'),\n 'on_click' => sprintf(\"location.href = '%s';\", $this->getUrl('categoryattribute/category_attribute/new')),\n 'class' => 'action-secondary',\n 'sort_order' => 20\n ];\n }", "public function getButtonAttribute()\n {\n if (is_null($value = $this->field('button'))) {\n return null;\n }\n\n return (string) $value;\n }", "public function getButton() {}", "protected function getButton($attrs)\n {\n $btn = \"\\n\\t\\t\\t\\t\";\n $btn .= '<a href=\"'.$attrs['url'].'\" ';\n\n if ($attrs['target']) {\n $btn .= 'target=\"_blank\" ';\n }\n\n $btn .= 'title=\"'.$attrs['title'].'\" ';\n $btn .= 'class=\"'.$attrs['btn_class'].' tipsy-tip\">';\n $btn .= \"\\n\\t\\t\\t\\t\\t\";\n $btn .= $this->getButtonData($attrs);\n $btn .= \"\\n\\t\\t\\t\\t</a>\";\n\n return $btn;\n }", "public function getHtml()\n {\n if($this->getType() == self::TYPE_BUTTON)\n {\n $strButton = '<button data-inline=\"true\"' . $this->getAttributesHtml() . '>' . $this->getValue() . '</button>';\n }\n else\n {\n $strButton = '<input type=\"' . $this->getType() . '\" data-inline=\"true\"' . $this->getValueHtml() . ' />';\n }\n return $strButton;\n }", "static public function html_ButtonLabels() {\n $config = json_decode('{\"type\":\"button\"}');\n $eBase = new ButtonElement();\n $eBase->configure($config);\n $bBase = Binding::fromElement($eBase);\n $cases = self::addLabels($bBase, '', 'Button ');\n return self::normalizeCases($cases);\n }", "function button_attr(string $button_id, array $button): string\n{\n $attributes = [\n 'name' => 'action',\n 'value' => $button_id,\n ];\n $attributes += $button['extra']['attr'] ?? [];\n return html_attr($attributes);\n}", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-musicsample\", \"admin.musicsamples.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-musicsample\", \"admin.musicsamples.destroy\").'\n </div>';\n }", "public static function get()\n\t{\n\t\t(self::$_attributes === NULL) AND self::$_attributes = array_values(array_unique(array_merge\n\t\t(\n\t\t\tMMI_HTML5_Attributes::get(),\n\t\t\tself::$_attr_button\n\t\t)));\n\t\treturn self::$_attributes;\n\t}", "private function getButtons() {\r\n $buttons = '';\r\n foreach ($this->_buttons as $btn) {\r\n $label = isset($btn['label'])?$btn['label']:'[label]';\r\n $icon = isset($btn['icon'])?$btn['icon']:'';\r\n $attr = (isset($btn['attr']) && is_array($btn['attr']))?$btn['attr']:'';\r\n \r\n $buttons .= '<button '.$this->getAttr($attr).'>';\r\n if(!empty($icon)){\r\n $buttons .= '<i class=\"'.$icon.'\"></i> ';\r\n }\r\n $buttons .= $label;\r\n $buttons .= '</button>';\r\n }\r\n return $buttons;\r\n }", "public function getButtonHtml()\n {\n \n $button = $this->getLayout()->createBlock('\\Magento\\Backend\\Block\\Widget\\Button')\n ->setData(\n [\n 'id' => 'ads_config',\n 'label' => __('Configure Ads'),\n 'class' => 'primary'\n ]\n );\n return $button->_toHtml();\n }", "public function __toString()\n {\n return '<button'.$this->attributes().'>'.$this->text.'</button>';\n }", "function GetHtmlAttributes()\n { \n return $this->attributes;\n }", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-achivesubcategory\", \"admin.achivesubcategories.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-achivesubcategory\", \"admin.achivesubcategories.destroy\").'\n </div>';\n }", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-translation\", \"admin.translations.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-translation\", \"admin.translations.destroy\").'\n </div>';\n }", "public function getActionButtonsAttribute()\n {\n return '\n '.$this->getViewButtonAttribute(\"quote-edit\", \"biller.quotes.show\").'\n '.$this->getEditButtonAttribute(\"quote-edit\", \"biller.quotes.edit\").'\n '.$this->getDeleteButtonAttribute(\"quote-delete\", \"biller.quotes.destroy\").'\n ';\n }", "public function button_text_attr() {\n\n\t\t$attr = array(\n\t\t\t'class' => 'fusion-button-text',\n\t\t);\n\n\t\tif ( self::$args['icon'] && 'yes' === self::$args['icon_divider'] ) {\n\t\t\t$attr['class'] = 'fusion-button-text fusion-button-text-' . self::$args['icon_position'];\n\t\t}\n\n\t\treturn $attr;\n\n\t}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "protected function getButtons() {}", "function button ($options) {\n if (is_string($options)) $options = strtoarray($options);\n $result = '';\n \n foreach (HTML::jsattributes() as $f) { \n $value = array_extract($options, array($f), ''); \n if ($value != '') $options[$f] = $value; \n }\n \n $result .= $def['label-tag'].div('class:'.$options['class'], input($options));\n \n return $result;\n}", "public function getUpdateButtonHtml()\n {\n return $this->getChildHtml('update_button');\n }", "protected function htmlOptionsButtons()\n {\n return $this->htmlOptionsSet('buttons');\n }", "public function getButtons() {}", "public function getButtons() {}", "public function getButtons() {}", "public function getCustomHtmlAttribs() {}", "public function getAttributes()\n {\n return $this->htmlAttributes;\n }", "public function getButtonHtml() {\n $button = $this->getLayout()->createBlock('adminhtml/widget_button')\n ->setData(array(\n 'id' => $this->_buttonId,\n 'label' => $this->helper('hawksearch_datafeed')->__('Generate Image Cache'),\n 'onclick' => 'javascript:hawkSearchCache.generateImageCache(); return false;'\n ));\n\n if ($this->_feedGenIsLocked()) {\n $button->setData('class', 'disabled');\n }\n\n return $button->toHtml();\n }", "function posts_link_attributes() {\n return 'class=\"button button-red button-filled button-small\"';\n}", "public function getButtonData()\n {\n return [\n 'label' => $this->getLabel(),\n 'disabled' => !($this->getOffer()->canBePublished() && $this->getOffer()->isValid()),\n 'class' => 'action-secondary',\n 'on_click' => $this->getOnclick(),\n 'sort_order' => 10,\n ];\n }", "public function getHtmlAttributes()\n {\n return [\n 'title',\n 'class',\n 'style',\n 'onclick',\n 'onchange',\n 'disabled',\n 'readonly',\n 'tabindex',\n 'data-form-part',\n 'data-role',\n 'data-action',\n 'data-mode',\n ];\n }", "public function getFormButtons();", "protected function getAttributes($button)\n {\n return array_diff_key($button, array_flip($this->notAttributes));\n }", "public function getUploadButtonHtml()\r\n {\r\n return $this->getChild('upload_button')->toHtml();\r\n }", "public function getActionButtonsAttribute()\n {\n return '\n '.$this->getViewButtonAttribute(\"invoice-manage\", \"biller.invoices.show\").'\n '.$this->getEditButtonAttribute(\"invoice-edit\", \"biller.invoices.edit\").'\n '.$this->getDeleteButtonAttribute(\"invoice-delete\", \"biller.invoices.destroy\",'table').'\n ';\n }", "public function getAddButtonHtml()\n {\n return $this->getChildHtml('add_button');\n }", "public function getAddButtonHtml()\n {\n return $this->getChildHtml('add_button');\n }", "public function getPreviewButtonHtml()\n {\n return $this->getChildHtml('preview_button');\n }", "function get_string() {\n\t$_strReturn = '';\n\t\t$attribs = $this->get_attribs();\n\t\t$_strReturn = \"\\n<button$attribs>$this->label</button>\";\n\treturn $_strReturn;\n\t}", "public function getSaveButtonHtml()\n {\n return $this->getChildHtml('save_button');\n }", "private function create_action_buttons_html() {\n\t\t\t$button_html = array();\n\t\t\tforeach ( $this->buttons as $action => $attributes ) {\n\t\t\t\t$button_html[] = sprintf(\n\t\t\t\t\t'<a class=\"dashicons %s slp-no-box-shadow\" title=\"%s\" href=\"#\" data-action=\"%s\" data-id=\"%s\"></a>',\n\t\t\t\t\t$attributes[ 'class' ] , $attributes[ 'title' ] , $action , $this->slplus->currentLocation->id );\n\t\t\t}\n\n\t\t\treturn join( $button_html );\n\t\t}", "protected function getButtons()\n\t{\n\t\treturn '';\n\t}", "public function getButtonDesign()\n {\n return $this->helper('breadcheckout')->getButtonDesign();\n }", "protected function _toHtml()\n {\n $html = $this->getBeforeHtml() . '<button '\n . ($this->getId() ? ' id=\"' . $this->getId() . '\"' : '')\n . ($this->getElementName() ?\n ' name=\"' . $this->getElementName() . '\"' : '')\n . ' title=\"'\n . Mage::helper('core')->quoteEscape(\n $this->getTitle() ? $this->getTitle() : $this->getLabel()\n )\n . '\"'\n . ($this->getType() ? ' type=\"' . $this->getType() . '\"' : '')\n . ' class=\"scalable ' . $this->getClass() . ($this->getDisabled()\n ? ' disabled' : '') . '\"'\n . ($this->getOnClick() ? ' onclick=\"' . $this->getOnClick() . '\"'\n : '')\n . ($this->getStyle() ? ' style=\"' . $this->getStyle() . '\"' : '')\n . ($this->getValue() ? ' value=\"' . $this->getValue() . '\"' : '')\n . ($this->getDisabled() ? ' disabled=\"disabled\"' : '');\n foreach ($this->_data as $name => $value) {\n if (substr($name, 0, 4) == 'data') {\n $html .= sprintf(' %s=\"%s\"', $name, $value);\n }\n }\n $html .= '><span><span><span>' . $this->getLabel()\n . '</span></span></span></button>' . $this->getAfterHtml();\n\n return $html;\n }", "public function getButtonClass(){return $this->classUsed;}", "public function getAttributes(){\n\t\treturn $this->getElement()->getAttributes();\n\t}", "function get_html(){\n\t\tif( $this->id != '' ) $id = ' id=\"' . $this->id . '\"';\n\t\tif( $this->name != '' ) $name = ' name=\"' . $this->name . '\"';\n\t\tif( $this->value != '' ) $value = ' value=\"' . $this->value . '\"';\n\t\tif( $this->extra != '' ) $extra = $this->extra;\n\t\t\n\t\t$html = $this->before_element;\n\t\tif( $this->submit ){\n\t\t\t$html.= '<input type=\"submit\"' . $id . $name . $value . $extra . ' />';\n\t\t}else{\n\t\t\t$html.= '<input type=\"button\"' . $id . $name . $value . $extra . ' />';\n\t\t}\n\t\t$html.= $this->after_element;\n\t\t\n\t\treturn $html;\n\t}", "public function getAddNewButtonHtml()\n {\n return $this->getChildHtml('add_button');\n }", "public function button($button) { return $this->getButton($button);}", "static function button( $attr ) {\r\n $url = get_permalink( $attr[ 'id' ] );\r\n\r\n if ( empty( $attr[ 'id' ] ) ) {\r\n $url = $attr[ 'url' ];\r\n }\r\n\r\n if ( empty( $url ) ) {\r\n return;\r\n }\r\n\r\n if ( empty( $attr[ 'title' ] ) ) {\r\n $attr[ 'title' ] = get_the_title( $attr[ 'id' ] );\r\n }\r\n\r\n return '<a href=\"' . $url . '\" class=\"btn ' . $attr[ 'class' ] . '\">' . ( $attr[ 'icon' ] ? '<i class=\"' . $attr[ 'icon' ] . '\"></i>' : '' ) . $attr[ 'title' ] . '</a>';\r\n }", "public function getButtons()\n {\n return '';\n }", "public function getButtons()\n {\n return '';\n }", "function alpha_single_button($attributes){ \n\t$default = array( \n\t\t'type' => 'primary', \n\t\t'title' => __('Button', 'alpha'), \n\t\t'url' => '', \n\t); \n\n\t$button_attributes = shortcode_atts( $default, $attributes); \n\n\treturn sprintf('<a target=\"_blank\" class=\"btn btn-%s\" href=\"%s\">%s</a> ', \n\t\t$button_attributes['type'], \n\t\t$button_attributes['url'], \n\t\t$button_attributes['title'], \n\t); \n}", "protected function getButtons()\t{\n\n\t\t\t\t\t$buttons = array(\n\t\t\t\t\t\t'csh' => '',\n\t\t\t\t\t\t'shortcut' => '',\n\t\t\t\t\t\t'save' => ''\n\t\t\t\t\t);\n\t\t\t\t\t\t// CSH\n\t\t\t\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);\n\n\t\t\t\t\t\t// SAVE button\n\t\t\t\t\t$buttons['save'] = '<input type=\"image\" class=\"c-inputButton\" name=\"submit\" value=\"Update\"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/savedok.gif', '') . ' title=\"' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '\" />';\n\n\n\t\t\t\t\t\t// Shortcut\n\t\t\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut())\t{\n\t\t\t\t\t\t$buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $buttons;\n\t\t\t\t}", "function button($caption, $attributes = array())\n\t{\n\t\t$str = \"\";\n\t\t$str = \"<button \"._attributes($attributes).\">\".$caption.\"</button>\\n\";\n\t\treturn $str;\n\t}", "function medigroup_mikado_get_button_html($params) {\n\t\t$button_html = medigroup_mikado_execute_shortcode('mkd_button', $params);\n\t\t$button_html = str_replace(\"\\n\", '', $button_html);\n\t\treturn $button_html;\n\t}", "function qode_get_button_html( $params ) {\n\t\t$button_html = qode_execute_shortcode( 'qbutton', $params );\n\t\t$button_html = str_replace( \"\\n\", '', $button_html );\n\n\t\treturn $button_html;\n\t}", "protected function getAttributes(array $button)\n {\n return array_diff_key($button, array_flip($this->notAttributes));\n }", "public function getButton()\n {\n $location = Mage::helper('adminhtml')->getUrl('*/sigepweb/postmethodsUpdate');\n $updateButton = $this->getLayout()->createBlock('adminhtml/widget_button');\n $updateButton->setData(\n array(\n 'id' => 'btn-update-postmethods',\n 'label' => $this->helper('adminhtml')->__('Update'),\n 'onclick' => \"setLocation('{$location}')\",\n )\n );\n return $updateButton;\n }", "public function button_get() {\n\t\t$result = $this->_plugin->button_details(\n\t\t\t\t$this->get('publicButtonId')\n\t\t\t\t);\n\t\t\t\n\t\t$this->response($result);\n\t}", "public function getHtmlAttr()\n {\n return $this->htmlAttr;\n }", "function getButtons() {\n return $this->buttons;\n }", "public function getDeleteButtonHtml()\n {\n return $this->getChildHtml('delete_button');\n }", "function getAttributes() {}", "function HTML_StatelessButton($name, $text, $buttonClass, $attributes = null)\r\n{\r\n $output = '<input ';\r\n $output .= ' type=\"button\" ';\r\n $output .= ' id=\"' . $name . '\" ';\r\n $output .= ' name=\"' . $name . '\" ';\r\n $output .= ' value=\"' . $text . '\" ';\r\n \r\n // class\r\n $output .= HTML_ButtonClass($buttonClass);\r\n \r\n if ($attributes != null) {\r\n $output .= HTML_Attributes($attributes);\r\n }\r\n\r\n $output .= \">\";\r\n\r\n return $output;\r\n}", "public function render() {\n $html = '<button type=\"button\"';\n if (strlen($this->_link) > 0) {\n $html .= ' onclick=\"window.location=\\'' . $this->_link . '\\'\"';\n }\n $html .= ' class=\"btn';\n if (strlen($this->_type) > 0) {\n $html .= ' btn-' . $this->_type;\n }\n $html .= '\">';\n $html .= $this->_content;\n $html .= '</button>';\n\n return $html;\n }", "public function getToggleAttributesHtml()\n {\n $disabled = $this->getDisabled() ? 'disabled' : '';\n $title = $this->getTitle();\n if (!$title) {\n $title = $this->getLabel();\n }\n $classes = [];\n $classes[] = 'action-toggle';\n $classes[] = 'primary';\n if ($this->getClass()) {\n $classes[] = $this->getClass();\n }\n if ($disabled) {\n $classes[] = $disabled;\n }\n\n $attributes = ['title' => $title, 'class' => join(' ', $classes), 'disabled' => $disabled];\n $this->_getDataAttributes(['mage-init' => '{\"dropdown\": {}}', 'toggle' => 'dropdown'], $attributes);\n\n $html = $this->_getAttributesString($attributes);\n $html .= $this->getUiId('dropdown');\n\n return $html;\n }", "public function getButton1()\n {\n return $this->button1;\n }", "function html_btn($name,$id,$akey,$params,$method='get',$tooltip=''){\n global $conf;\n global $lang;\n\n $label = $lang['btn_'.$name];\n\n $ret = '';\n $tip = '';\n\n //filter id (without urlencoding)\n $id = idfilter($id,false);\n\n //make nice URLs even for buttons\n if($conf['userewrite'] == 2){\n $script = DOKU_BASE.DOKU_SCRIPT.'/'.$id;\n }elseif($conf['userewrite']){\n $script = DOKU_BASE.$id;\n }else{\n $script = DOKU_BASE.DOKU_SCRIPT;\n $params['id'] = $id;\n }\n\n $ret .= '<form class=\"button\" method=\"'.$method.'\" action=\"'.$script.'\"><div class=\"no\">';\n\n if(is_array($params)){\n reset($params);\n while (list($key, $val) = each($params)) {\n $ret .= '<input type=\"hidden\" name=\"'.$key.'\" ';\n $ret .= 'value=\"'.htmlspecialchars($val).'\" />';\n }\n }\n\n $ret .= '<input type=\"submit\" value=\"'.htmlspecialchars($label).'\" class=\"button\" ';\n if($akey){\n $tip = '[ALT+'.strtoupper($akey).']';\n $ret .= 'accesskey=\"'.$akey.'\" ';\n }\n if ($tooltip!='') {\n $tip = htmlspecialchars($tooltip);\n }\n $ret .= 'title=\"'.$tip.'\" ';\n $ret .= '/>';\n $ret .= '</div></form>';\n\n return $ret;\n}", "private function renderButton()\n\t{\n\t\t$button = new Button();\n\t\t$button->setLabel($this->buttonLabel);\n\t\t$button->setUrl($this->buttonUrl);\n\t\treturn $button->render();\n\t}", "public function statusForm()\n {\n\n $html = \"<button class=\\\"btn btn-sm btn\\\"></button>\";\n\n return $html;\n }", "public function getMainButtonsHtml()\n {\n $html = '';\n if ($this->getColumnSet()->isFilterVisible()) {\n $html .= $this->getSearchButtonHtml();\n $html .= $this->getResetFilterButtonHtml();\n }\n return $html;\n }", "protected function htmlOptionsExtraButton()\n {\n return array_merge(\n ['type' => 'button'],\n !empty($this->extraButtonOptions) && is_array($this->extraButtonOptions) ? $this->extraButtonOptions : []\n );\n }", "public function getAttributesHTML()\n {\n $html = '';\n if (count($this->extraAttributes) > 0) {\n foreach ($this->extraAttributes as $name => $value) {\n $html .= ' ' . Convert::raw2att($name) . '=\"' . Convert::raw2att($value) . '\"';\n }\n }\n\n return $html;\n }", "public function elements()\n {\n return array(\n array(\n 'name' => 'saveOption',\n 'attributes' => array(\n 'type' => 'submit',\n 'value' => 'Save',\n 'class' => 'btn btn-primary',\n ),\n )\n );\n }", "protected function render_buttons() {\n\t\t/** @var \\WPO\\Fields\\Button $arg */\n\t\t$arg = wpo_field( 'button' )\n\t\t\t->field_class( array( 'button', 'button-primary' ) )\n\t\t\t->attribute( 'data-wponion-jsid', $this->js_field_id() )\n\t\t\t->only_field( true )\n\t\t\t->button_type( 'button' )\n\t\t\t->label( __( 'Add Icon', 'wponion' ) );\n\t\t$add_btn = clone $arg;\n\t\t$remove_btn = clone $arg;\n\t\t$add_btn->id( 'btnadd' )->attribute( 'data-wponion-iconpicker-add', 'yes' );\n\t\t$remove_btn->id( 'btnremove' )->label( __( 'Remove Icon', 'wponion' ) )->field_class( array(\n\t\t\t'button',\n\t\t\t'button-secondary',\n\t\t) )->attribute( 'data-wponion-iconpicker-remove', 'yes' );\n\t\t$return = $this->sub_field( $this->handle_args( 'label', $this->option( 'add_button' ), $add_btn ), false, $this->unique() );\n\t\t$return .= $this->sub_field( $this->handle_args( 'label', $this->option( 'remove_button' ), $remove_btn ), false, $this->unique() );\n\t\treturn $return;\n\t}", "public function hasButtonAttribute()\n {\n return true;\n }", "public function getHtml() {\n $this->_getRenderer()->setAttribute('type', 'submit');\n return parent::getHtml();\n }", "public function htmlAttributes()\n {\n $attributes = [\n 'type' => $this->type->htmlType(),\n 'name' => $this->name,\n ];\n\n return array_filter($attributes);\n }", "public function outputHTML(){\n\t\t$s_ret='<input id=\"'.htmlspecialchars($this->_id).'\" type=\"'.htmlspecialchars($this->_type).'\" value=\"'.htmlspecialchars($this->_label).'\"';\n\t\tif($this->_type=='image'){\n\t\t\tif($this->_src===NULL){\n\t\t\t\tJsonFormBuilder::throwError('[Element: '.$this->_id.'] Button of type \"image\" must have a src set.');\n\t\t\t}else{\n\t\t\t\t$s_ret.=' src=\"'.htmlspecialchars($this->_src).'\"';\n\t\t\t}\n\t\t}\n\t\t$s_ret.=' '.$this->processExtraAttribsToStr().' />';\n\t\treturn $s_ret;\n\t}", "public function getHtmlAttributes()\r\n\t{\r\n\t\tif(is_null($this->htmlAttributes))\r\n\t\t{\r\n\t\t\t$attributes = [];\r\n\t\t\tif(method_exists($this, 'getAttributes'))\r\n\t\t\t{\r\n\t\t\t\t$attributes = $this->getAttributes();\r\n\t\t\t}\r\n\t\t\tif(!empty($attributes))\r\n\t\t\t{\r\n\t\t\t\t$this->htmlAttributes = zbase_data_get($attributes, 'html.attributes', []);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->htmlAttributes = [];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->htmlAttributes;\r\n\t}", "function impact_custom_remove_button_atts($attributes) \r\n {\r\n // -- Change the attributes of the remove button. -- //\r\n return array_merge($attributes, array(\r\n 'text' => '-',\r\n 'additional_classes' => 'wpcf7-field-group-button-minus'\r\n ));\r\n }", "public function parseButtonFunction($button)\n {\n $button = json_decode(json_encode($button), true);\n\n // Set default values\n $result = ['tag' => 'a'];\n\n $flag = false;\n\n // Set default tag & type\n if (isset($button['type'])) {\n switch ($button['type']) {\n case 'button':\n case 'reset':\n case 'submit':\n $result['tag'] = 'button';\n $result['attributes'] = ['type' => $button['type']];\n break;\n case 'dismiss':\n $result['tag'] = 'button';\n $result['data'] = ['dismiss' => 'modal'];\n $result['attributes'] = ['type' => 'button'];\n break;\n }\n }\n\n if (isset($button['toggle']) && ! $flag) {\n $flag = true;\n $result['attributes'] = [\n 'aria-pressed' => 'false',\n 'autocomplete' => 'off',\n ];\n $result['data'] = [\n 'toggle' => 'button',\n ];\n }\n\n if (isset($button['dropdown']) && ! $flag) {\n $flag = true;\n $result['attributes'] = [\n 'aria-haspopup' => 'true',\n 'aria-expanded' => 'false',\n ];\n $result['data'] = [\n 'toggle' => 'dropdown',\n ];\n }\n\n if (isset($button['collapse']) && ! $flag) {\n $flag = true;\n $result['data'] = [\n 'toggle' => 'collapse',\n 'target' => $button['collapse'],\n ];\n }\n\n if (isset($button['modal']) && ! $flag) {\n $flag = true;\n $result['tag'] = 'button';\n $result['attributes'] = ['rel' => 'modal'];\n $result['data'] = [\n 'toggle' => 'modal',\n 'target' => $button['modal'],\n ];\n }\n\n if (isset($button['popover']) && ! $flag) {\n $flag = true;\n $result['tag'] = 'button';\n $result['data'] = [\n 'toggle' => 'popover',\n 'placement' => 'top',\n 'trigger' => 'focus',\n 'content' => $button['popover'],\n ];\n }\n\n if (isset($button['tab']) && ! $flag) {\n $flag = true;\n $result['attributes'] = ['role' => 'tab'];\n $result['data'] = ['toggle' => 'tab'];\n }\n\n if (isset($button['pill']) && ! $flag) {\n $flag = true;\n $result['attributes'] = ['role' => 'tab'];\n $result['data'] = ['toggle' => 'pill'];\n }\n\n if ($flag) {\n if (isset($button['data']['toggle'])) {\n if ($button['data']['toggle'] == 'tooltip') {\n $result['wrap'] = [\n 'toggle' => 'tooltip',\n 'placement' => $button['data']['placement'],\n 'original-title' => $button['data']['original-title'],\n ];\n }\n }\n }\n\n if (isset($button['tooltip'])) {\n if ($flag) {\n $result['wrap'] = [\n 'toggle' => 'tooltip',\n 'placement' => 'top',\n 'original-title' => $button['tooltip'],\n ];\n } else {\n $result['data'] = [\n 'toggle' => 'tooltip',\n 'placement' => 'top',\n 'original-title' => $button['tooltip'],\n ];\n }\n }\n\n // User settings overrides default settings\n return array_merge($button, $result);\n }", "function megatron_button($variables) {\n $element = $variables['element'];\n $label = check_plain($element['#value']);\n element_set_attributes($element, array('id', 'name', 'value', 'type'));\n\n $element['#attributes']['class'][] = 'form-' . $element['#button_type'];\n if (!empty($element['#attributes']['disabled'])) {\n $element['#attributes']['class'][] = 'form-button-disabled';\n }\n // The ending line break adds inherent margin between multiple buttons.\n return '<button' . drupal_attributes($element['#attributes']) . '>'. $label .'</button>' . \"\\n\";\n}", "public function getButtons()\n {\n return $this->buttons;\n }", "public function getButtons()\n {\n return $this->buttons;\n }" ]
[ "0.70783854", "0.70731235", "0.6970188", "0.69461733", "0.68908036", "0.68867534", "0.6788533", "0.6745584", "0.67433476", "0.6738169", "0.6724579", "0.67037123", "0.66937965", "0.6690594", "0.663605", "0.6585531", "0.65836287", "0.65760493", "0.6465513", "0.64596397", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.64563835", "0.6455485", "0.6454819", "0.6454819", "0.64288497", "0.6427241", "0.6407541", "0.63820666", "0.6381995", "0.6381995", "0.6355684", "0.63540685", "0.6343181", "0.63387555", "0.6335763", "0.63025296", "0.62921685", "0.6264579", "0.6257557", "0.6253585", "0.6249649", "0.6249649", "0.6243863", "0.624208", "0.6224458", "0.6194496", "0.6181755", "0.61750555", "0.61748445", "0.6151709", "0.61335415", "0.6126118", "0.6120414", "0.611656", "0.6103082", "0.6086205", "0.6086205", "0.6068417", "0.6067447", "0.603657", "0.6033351", "0.6032606", "0.601868", "0.6017314", "0.5988731", "0.59800625", "0.597353", "0.5926638", "0.59222513", "0.5909362", "0.5908642", "0.5889288", "0.5887177", "0.5864744", "0.5855581", "0.585456", "0.58415985", "0.58387107", "0.58362365", "0.5836173", "0.5830623", "0.5828218", "0.58281255", "0.58221346", "0.58175516", "0.5811918", "0.5799721", "0.57983124", "0.5796548", "0.57950115", "0.57950115" ]
0.7861026
0
Save loan to the repository
Сохранить кредит в репозиторий
public function save(Loan $loan) { $this->getEntityManager()->persist($loan); $this->getEntityManager()->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Save(){\n return LoanProSDK::GetInstance()->GetApiComm()->SaveLoan($this);\n }", "Public Function save();", "public function save()\n {\n $this->getRepository()->save();\n }", "public function save_new_loan()\n {\n $this->load->model('admin/prestamo/Loan_model');\n $Prestamo = new Loan_model();\n $Prestamo->id_prestamista = $this->session->userdata('user')['id'];\n $Prestamo->id_cliente = $this->input->post('id_cliente');\n $Prestamo->monto = $this->input->post('monto');\n $Prestamo->porcentaje = $this->input->post('porcentaje');\n $Prestamo->ciclo_pago = $this->input->post('ciclo_pago');\n $Prestamo->cant_cuotas = $this->input->post('cant_cuotas');\n $Prestamo->fecha_inicio = DateTime::createFromFormat('m/d/Y', $this->input->post('fecha_inicio'));\n if ($Prestamo->create()) {\n redirect('admin/prestamo/cuotas/' . $Prestamo->id);\n } else {\n $this->showError();\n }\n }", "public function save(){}", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "function save ()\n {\n try {\n $GLOBALS['DB']->exec(\"INSERT INTO checkouts (patron_id, copy_id, due_date) VALUES (\n {$this->getPatronId()},\n {$this->getCopyId()},\n '{$this->getDueDate()}');\n \");\n $this->id = $GLOBALS['DB']->lastInsertId();\n } catch (PDOException $e) {\n echo \"There was an error: \" . $e->getMessage();\n }\n }", "public function save() {\n\t\t\n\t}", "public final function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save() {\n \n }", "public function save() {\r\n\t }", "public function ___save() { }", "public function store(Request $request)\n {\n $loan= $request->except('_token');\n\n $validator = \\Validator::make($request->all(), [\n\n 'user_id' => 'required',\n 'amount' => ['required', 'integer', 'min:1000000'],\n 'duration' => ['required', 'integer', 'min:12'],\n 'repayment_frequency' => 'required',\n 'interest_rate' => ['required', 'min:0.01'],\n 'arrangement_fee' => 'required',\n ]);\n\n\n\n if ($validator->fails())\n {\n return response()->json( getAPIFormat(null, null, $validator->errors()->all()), 400);\n }\n\n $notSettledLoan = Loan::where('user_id', $request -> user_id)->where('is_settled', 0)->first();\n\n if($notSettledLoan){\n return response()->json( getAPIFormat('You have unsettled loan '), 403 );\n }\n\n try {\n $total_interest = $request -> amount * $request -> interest_rate * $request -> duration / 100;\n\n $totalLoan = $request -> amount + $request -> arrangement_fee + $total_interest;\n\n $fix_installment = $totalLoan / $request -> duration;\n\n $loan['fix_installment'] = $fix_installment;\n\n Loan::insert( $loan );\n } catch (\\Exception $e) {\n return response()->json( getAPIFormat('Error saving to database', null, $e), 500 );\n }\n\n return response()->json( getAPIFormat('Loan successfully created'), 201 );\n\n\n }", "public function store(Request $request)\n{\n $date=date_create($request->date_release);\n $date_format=date_format($date,\"Y/m/d\");\n $attrs=['member_loan_id'=>$request->member_loan_id,\n 'date_of_payment'=>$date_format,\n 'beginning_balance'=>$request->beginning_balance,\n 'paid_interest'=>$request->paid_interest,\n 'paid_principal'=>$request->paid_principal,\n 'ending_balance'=>$request->ending_balance\n ];\n\n $payment=LoanPayment::create($attrs);\n $loan=MemberLoan::findOrFail($payment->member_loan_id);\n if($payment->ending_balance==0){\n \n $loan->is_paid=true;\n $loan->save();\n }\n else{\n $loan->is_paid=false;\n $loan->save();\n }\n return $payment;\n }", "public function saving(platillos $platillos)\n {\n //code...\n }", "public function Archive(){\n $this->InsureHasID();\n (new LoanEntity($this->Get(LOAN::DISP_ID)))->Set(BASE_ENTITY::ID, $this->Get(BASE_ENTITY::ID),LOAN::ARCHIVED, 1)->Save();\n return $this->Set(LOAN::ARCHIVED, 1);\n }", "public function save() {\n }", "public function save() {\n }", "public function save()\n {\n $data = $this->getData();\n\n $this->_save($data);\n }", "public function savePenunjukanPengelola(PenunjukanPengelola $penujukanPengelola);", "public function store(LoanRequest $request)\n {\n \n try{\n $Loan = $this->loanRepository->create($request->all());\n $collateral = $this->loanCollateral($request,$Loan->id);\n $LoanCollateral = $this->loanRepository->saveLoanCollateral($collateral);\n return redirect()->route('loan.index')->with('success','Loan Created Successfully');\n }catch(Exception $e){\n dd($e);\n return redirect()->back()->with('error','Someting went wrong try Again!');\n }\n }", "protected function _save() {\n\n\t}", "public function save()\n {\n }", "function save() {}", "public function save() {\r\n\r\n }", "function save()\n\t{\n\t\tif($this->_modified)\n\t\t\t$this->_update();\n\t}", "public function save_data()\r\n\t{\r\n\t\t$this->account->update_data();\r\n\r\n\t\tredirect('mahasiswa/account/self');\r\n\t}", "public function save_new_due()\n {\n $monto = (int)$this->input->post('monto');\n if ($monto > 0) {\n $id_prestamo = $this->input->post('id_prestamo');\n $this->load->model('admin/prestamo/Loan_model');\n $Loan = new Loan_model();\n $Loan->map($id_prestamo);\n if ($Loan->progreso <= 100) {\n $Loan->set_payment($monto);\n redirect('admin/prestamo/cuotas/' . $id_prestamo . '?alert=added_due');\n } else {\n redirect('admin/prestamo/cuotas/' . $id_prestamo);\n }\n } else {\n $this->showError('Monto a pagar debe ser mayor de 0');\n }\n }", "public function saveNew() {\n\t}", "public function save()\n\t{\n\n\t}", "public function save() {\n\n parent::save();\n\n //RECALCULAR EL PRESUPUESTO\n $this->getIDPsto()->save();\n }", "public function save() {\n $db = db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'Follower' => $this->Follower,\n 'Followee' => $this->Followee\n );\n $db->storeFollow($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function store(Request $request)\n {\n //\n $payments = Payment::create($request->all());\n \n if($payments){\n\n $loan = loan::where('id', $request['loan_id'])->get();\n $loan[0]->loan_balance = $loan[0]->loan_balance - $request['payment_amount'];\n $loan[0]->save();\n\n if($request['payment_amount'] < $request['payment_amortization']){\n\n $amortization = Amortization::where('loan_id', $request['loan_id'])\n ->where('schedule',$request['schedule_payment'])\n ->get();\n\n $min_bal = Amortization::where('loan_id', $request['loan_id'])->min('running_balance_counter');\n $balance_checker = $min_bal - $request['payment_amount'];\n\n if( $balance_checker == 0 ){\n\n $loan_status = Loan::where( 'id', $request['loan_id'] )->update( ['loan_status' => 1] );\n\n $insertZeros = Amortization::where('loan_id', $request['loan_id'])\n ->where('payment_status', 0)\n ->update(['running_balance_counter' => 0, 'payment_status' => 1]);\n\n }\n\n if( is_null( $min_bal ) ){\n\n $amortization[0]->payment_status = 1;\n $amortization[0]->running_balance_counter = $amortization[0]->running_balance + ( $amortization[0]->loan_amortization - $request['payment_amount'] );\n\n $amortization[0]->save();\n\n }else{\n\n $amortization[0]->payment_status = 1;\n $amortization[0]->running_balance_counter = $min_bal - $request['payment_amount'];\n\n $amortization[0]->save();\n\n }\n \n $amortization[0]->save();\n $amortization_next = Amortization::where('id','>',$amortization[0]->id)->orderBy('id')->first();\n $amortization_next->loan_amortization = $amortization_next->loan_amortization + ($request['payment_amortization'] - $request['payment_amount']);\n $amortization_next->running_balance = $amortization_next->running_balance + ($request['payment_amortization'] - $request['payment_amount']);\n $amortization_next->save();\n\n $a = Bill::where('amortization_id', $amortization_next->id)->exists();\n\n if($a){\n \n Bill::where('amortization_id', $amortization_next->id)->update(['loan_amortization' => $amortization_next->loan_amortization]);\n }\n \n }else if( $request['payment_amount'] > $request['payment_amortization'] ){\n\n $amortization = Amortization::where('loan_id', $request['loan_id'])\n ->where('schedule',$request['schedule_payment'])\n ->get();\n\n $min_bal = Amortization::where('loan_id', $request['loan_id'])->min('running_balance_counter');\n $balance_checker = $min_bal - $request['payment_amount'];\n\n if( $balance_checker == 0 ){\n\n $loan_status = Loan::where( 'id', $request['loan_id'] )->update( ['loan_status' => 1] );\n\n $insertZeros = Amortization::where('loan_id', $request['loan_id'])\n ->where('payment_status', 0)\n ->update(['running_balance_counter' => 0, 'payment_status' => 1]);\n\n }\n\n\n if( is_null( $min_bal ) ){\n\n $amortization[0]->payment_status = 1;\n $amortization[0]->running_balance_counter = $amortization[0]->running_balance - ( $request['payment_amount'] - $amortization[0]->loan_amortization );\n\n $amortization[0]->save();\n\n }else{\n\n $amortization[0]->payment_status = 1;\n $amortization[0]->running_balance_counter = $min_bal - $request['payment_amount'];\n\n $amortization[0]->save();\n\n }\n \n }else{\n\n $amortization = Amortization::where('loan_id', $request['loan_id'])\n ->where('schedule',$request['schedule_payment'])\n ->get();\n\n $min_bal = Amortization::where('loan_id', $request['loan_id'])->min('running_balance_counter');\n $balance_checker = $min_bal - $request['payment_amount'];\n\n if( $balance_checker == 0 ){\n\n $loan_status = Loan::where( 'id', $request['loan_id'] )->update( ['loan_status' => 1] );\n\n $insertZeros = Amortization::where('loan_id', $request['loan_id'])\n ->where('payment_status', 0)\n ->update(['running_balance_counter' => 0, 'payment_status' => 1]);\n\n }\n\n if( is_null( $min_bal ) ){\n\n $amortization[0]->payment_status = 1;\n $amortization[0]->running_balance_counter = $amortization[0]->running_balance;\n\n $amortization[0]->save();\n\n }else{\n\n $amortization[0]->payment_status = 1;\n $amortization[0]->running_balance_counter = $min_bal - $request['payment_amount'];\n\n $amortization[0]->save();\n\n }\n \n }\n\n $notification = \"Success\";\n\n } else{\n\n $notification = \"Failed\";\n\n }\n\n return json_encode(array('notify'=>$notification));\n\n }", "private function saveData() {\n\t\t\n\t\t$this->persistence->store($this->manager);\n\t\t\n\t}", "private function save()\n {\n // query database for backup data, if not already done\n if (!$this->package) {\n $this->package = $this->getPackage();\n }\n\n // If there is no data yet, insert new backup\n // else update existing data\n if (empty( $this->package )) {\n $this->insertBackup();\n } else {\n $this->updateBackup();\n }\n }", "public function store(Request $request)\n {\n $this->validateInput($request);\n\n $loan = new Loan();\n $loan->amount = request('amount');\n $loan->term = request('term');\n $loan->interest_rate = request('interest_rate');\n $loan->start_date = request('year').'-'.request('month');\n $loan->save();\n\n return redirect('/loan/'.$loan->id)->with('successfully','The loan has been created successfully.');\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save()\n {\n }", "public function save() {\n return isset($this->RENTAL_ID) ? $this->update() : $this->create();\n }", "public function saved(platillos $platillos)\n {\n //code...\n }", "public abstract function save();", "public function save() {\n parent::save();\n // and now save all releases\n foreach ($this->releases as $release) {\n $release->save();\n }\n }" ]
[ "0.7702996", "0.6386678", "0.6355872", "0.6352657", "0.63039", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6286737", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6268458", "0.6266688", "0.62647367", "0.61306185", "0.6124805", "0.6099764", "0.609888", "0.609888", "0.6098305", "0.6098305", "0.6098305", "0.6098305", "0.6028105", "0.60227793", "0.59872484", "0.5978309", "0.5963993", "0.5962191", "0.5952908", "0.5915081", "0.5915081", "0.5902351", "0.5896643", "0.5887854", "0.5885682", "0.5883746", "0.5881787", "0.5881393", "0.5876161", "0.58747584", "0.5870518", "0.58625674", "0.5861145", "0.5850006", "0.5829979", "0.5820488", "0.5809259", "0.580796", "0.57912844", "0.57808733", "0.57808733", "0.57808733", "0.57808733", "0.57808733", "0.57808733", "0.57808733", "0.57808733", "0.57776684", "0.5765602", "0.57606494", "0.57518524" ]
0.7448458
1
Delete loan from the repository
Удалить кредит из репозитория
public function delete(Loan $loan) { $this->getEntityManager()->remove($loan); $this->getEntityManager()->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Loan $loan)\n {\n //\n }", "public function destroy(Loan $loan)\n {\n //\n }", "public function destroy(Loan $loan)\n {\n //\n }", "public function destroy(Loan $loan)\n {\n //\n }", "public function deleteRepository(): void;", "public function destroy(Loan $loan)\n {\n\n $num_loans = Loan::where('customer_id',$loan->customer->id)->count();\n Loan::destroy($loan->id);\n if($num_loans == 1) {\n Customer::destroy($loan->customer->id);\n }\n Payment::where('loan_id',$loan->id)->delete();\n return redirect()->back()->with('message', 'Successfully deleted!');\n }", "public function destroy(Loan $loan)\n {\n $findLoan = Loan::find( $loan->loan_id);\n if($findLoan->delete()){\n\n //redirect\n return redirect()->route('loans.index')\n ->with('success' , 'Loan deleted successfully');\n }\n\n return back()->withInput()->with('error' , 'Loan could not be deleted');\n }", "public function deactivate_loan($id)\n {\n try{\n $loan = $this->loanRepository->activate_deactivateLoan($id,0);\n // dd($loan->loanPayment());\n $LoanPayment = $this->loanRepository->findLoanPayment($loan->loanPayment()->id);\n $LoanPayment->delete();\n return redirect()->back()->with('success','Loan DeActivated Successfully');\n }catch(Exception $e){\n dd($e);\n }\n }", "public function destroy(Loan $loan)\n {\n $this->authorize('delete', $loan);\n\n $loan->delete();\n\n return back()\n ->with('info', 'Prestamo Eliminada con exito');\n }", "public function destroy(LoanPayment $loanPayment)\n {\n //\n }", "function doDelete(/*$id_ = \"\", */$paystub_id_ = \"\", $emp_id_ = \"\"){\n\t\t$sqlpstub = \"SELECT paystub_id from payroll_paystub_report where payperiod_id = '\".$paystub_id_.\"' and emp_id = '\".$emp_id_.\"'\";\n\t\t$rsResult = $this->conn->Execute($sqlpstub);\n\t\t//---------------DELETE LOAN HISTORY-------------->>\n\t\t$sqlLoanD = \"SELECT loansum_id, loan_id, loansum_payment FROM loan_detail_sum WHERE paystub_id = '\".$rsResult->fields['paystub_id'].\"'\";\n\t\t$rsResultLoanD = $this->conn->Execute($sqlLoanD);\n\t\tif(count($rsResultLoanD)>0){\n\t\t\tforeach ($rsResultLoanD as $keyLoanD => $valLoanD){//delete payroll_paystub_entry record.\n\t\t\t\t$sqlLoanInfo = \"SELECT loan_id,loantype_id,psa_id,emp_id,loan_ytd,loan_balance,loan_total FROM loan_info WHERE loan_id='\".$valLoanD['loan_id'].\"'\";\n\t\t\t\t$varLoanInfo = $this->conn->Execute($sqlLoanInfo);\n\t\t\t\t$varLoanBalance = $varLoanInfo->fields['loan_balance'] + $valLoanD['loansum_payment'];\n\t\t\t\t$varLoanYTD = $varLoanInfo->fields['loan_ytd'] - $valLoanD['loansum_payment'];\n//\t\t\t\techo \"<br>=========LOAN DELETE==========<br>\";\n//\t\t\t\techo $varLoanBalance.\" Loan Balance <br>\";\n//\t\t\t\techo $varLoanYTD.\" Loan YTD\";\n//\t\t\t\texit;\n\t\t\t\t$flds = array();\n\t\t\t\t$flds[] = \"loan_balance = '\".trim(addslashes($varLoanBalance)).\"'\";\n\t\t\t\t$flds[] = \"loan_ytd = '\".trim(addslashes($varLoanYTD)).\"'\";\n\t\t\t\t$fields = implode(\", \",$flds);\n\t\t\t\t$sqlLoanInfoUPdate = \"UPDATE loan_info set $fields WHERE loan_id='\".$valLoanD['loan_id'].\"'\";//update loan_info before delete loan_detail_sum\n\t\t\t\t$this->conn->Execute($sqlLoanInfoUPdate);\n\t\t\t\t$sqlLoanDsum = \"DELETE from loan_detail_sum where loansum_id='\".$valLoanD['loansum_id'].\"'\";//delete record in loan_detail_sum\n\t\t\t\t$this->conn->Execute($sqlLoanDsum);\n\t\t\t}\n\t\t}\n\t\t//----------------------EXIT----------------------<<\n\t\t//-----------------UPDATE TA TABLE---------------->>\n\t\t$sqlTA = \"UPDATE ta_emp_rec SET paystub_id = '0' WHERE paystub_id='\".$rsResult->fields['paystub_id'].\"' AND emp_id='\".$emp_id_.\"'\";\n\t\t$this->conn->Execute($sqlTA);\n\t\t//----------------------EXIT----------------------<<\n\t\t//-----------------UPDATE OT TABLE---------------->>\n\t\t$sqlOT = \"UPDATE ot_record SET paystub_id = '0' WHERE paystub_id='\".$rsResult->fields['paystub_id'].\"' AND emp_id='\".$emp_id_.\"'\";\n\t\t$this->conn->Execute($sqlOT);\n\t\t//----------------------EXIT----------------------<<\n\t\t//------------UPDATE Amendments TABLE------------->>\n\t\t$sqlAmend = \"UPDATE payroll_ps_amendemp SET paystub_id = '0' WHERE paystub_id='\".$rsResult->fields['paystub_id'].\"' AND emp_id='\".$emp_id_.\"'\";\n\t\t$this->conn->Execute($sqlAmend);\n\t\t//----------------------EXIT----------------------<<\n\t\t//------------UPDATE Custom Fields TABLE---------->>\n\t\t$sqlCF = \"UPDATE cf_detail SET paystub_id = '0' WHERE paystub_id='\".$rsResult->fields['paystub_id'].\"' AND emp_id='\".$emp_id_.\"'\";\n\t\t$this->conn->Execute($sqlCF);\n\t\t//----------------------EXIT----------------------<<\n\t\t$sqlpsentry = \"SELECT * from payroll_paystub_entry where paystub_id = '\".$rsResult->fields['paystub_id'].\"' order by psa_id\";\n\t\t$rsResult2 = $this->conn->Execute($sqlpsentry);\n\t\tif(count($rsResult2)>0){\n\t\t\tforeach ($rsResult2 as $keypsentry => $valpsentry){//delete payroll_paystub_entry record.\n\t\t\t\t$sqldel_psentry = \"delete from payroll_paystub_entry where ppe_id='\".$rsResult2->fields['ppe_id'].\"'\";\n\t\t\t\t$this->conn->Execute($sqldel_psentry);\n\t\t\t}\n\t\t}\n\t\t$sqlTemp = \"delete from z_formula_temp where paystub_id= '\".$rsResult->fields['paystub_id'].\"'\";\n\t\t$this->conn->Execute($sqlTemp);\n\t\t$sqlps = \"delete from payroll_pay_stub where paystub_id = '\".$rsResult->fields['paystub_id'].\"'\";//delete payroll_pay_stub record.\n\t\t$this->conn->Execute($sqlps);\n//\t\t$sql = \"delete from payroll_paystub_report where ppr_id=?\";//delete payroll_paystub_report record.\n//\t\t$this->conn->Execute($sql,array($id_));\n//\t\t$_SESSION['eMsg']=\"Pay Details Successfully Deleted.\";\n\t}", "public function delete_loan($id, $command = NULL)\n\t{\n if(isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {\n if (empty($command))\n {\n \t\t$data['db'] = 'loan';\n \t\t$data['id'] = $id;\n\n \t\t$this->display_view('item/confirm_delete', $data);\n } else {\n $this->load->model(\"loan_model\");\n\n // get the data from the loan with this id (to fill the form or to get the concerned item)\n $data = get_object_vars($this->loan_model->get($id));\n\n $this->loan_model->delete($id);\n\n redirect(\"/item/loans/\" . $data[\"item_id\"]);\n }\n // Delete is not allowed for the non-connected users, which are sent to the connection page\n } else {\n header(\"Location: \" . base_url() . \"auth/login\");\n exit();\n }\n\t}", "public function deletion();", "function deleteulasan_delete(){\n $id=$this->delete('id');\n\n if($this->admin->deleteUlasan($id)>0){\n $this->response([\n 'status' => true,\n 'message'=>'ulasan deleted'\n ], REST_Controller::HTTP_OK);\n }\n else{\n $this->response([\n 'status' => FALSE,\n 'message' => 'ulasan Not Found'\n ], REST_Controller::HTTP_NOT_FOUND); \n }\n }", "public function destroy(HrLoanPaymentRequest $request,$id)\n {\n try { \n //delete the loanPayment by id and update the fldStatus in loan Table into UNPAID\n $objLoanPayment = HrLoanPayment::find($id);\n $pkLoanID = $objLoanPayment->fkLoanID;\n $objLoan = HrLoan::find($pkLoanID);\n $objLoan->fldStatus = HrLoan::UNPAID;\n $objLoan->save();\n $objLoanPayment->delete();\n Session::flash('success' , 'Successfully Deleted!');\n } catch (\\Exception $e){\n Session()->flash('error' ,'Error In Deleted');\n }\n return Redirect::back();\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete(){}", "public function delete(){}", "public function destroy($id)\n {\n LoanStatus::find($id)->delete();\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();" ]
[ "0.711046", "0.711046", "0.711046", "0.711046", "0.7009779", "0.69464624", "0.6831739", "0.651765", "0.64352894", "0.6415047", "0.6352554", "0.632649", "0.6295681", "0.62899864", "0.62814045", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62773025", "0.62764376", "0.6273988", "0.6266878", "0.6266878", "0.6222092", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429", "0.6206429" ]
0.752095
0
Get protected value fillable
Получить защищённое значение fillable
public function getFillable() { return $this->fillable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFillable()\n {\n return $this->fillable;\n }", "public function getFillable()\n {\n return $this->fillable;\n }", "public function getFillable()\n\t{\n\t\t\treturn $this->fillable;\n\t}", "public function getFillable()\n\t{\n\t\t\treturn $this->fillable;\n\t}", "public function getFillable()\n\t{\n\t\treturn $this->fillable;\n\t}", "protected function getValueAttribute() {}", "public function getFieldValue();", "public function getFields()\n {\n return $this->fillable;\n }", "public function getFillable()\n {\n if (! is_null($this->requestMethod)) {\n switch (strtolower($this->requestMethod)) {\n case 'post': return static::$storeFillable;\n case 'patch': return static::$patchFillable;\n case 'put': return static::$putFillable;\n }\n }\n\n return $this->fillable;\n }", "protected function getValue()\n {\n }", "public function fillable()\n\t{\n\t\treturn $this->where('fillable', '=', true);\n\t}", "public function getFillable() : array\n {\n return $this->fillable;\n }", "protected function fillable()\n {\n return [];\n }", "protected function getPropertyValue() {}", "protected function value()\n {\n }", "public function get_pruebas_protected() {\n return $this->pruebas_protected;\n }", "public function getPerfil()\n {\n return $this->perfil;\n }", "public function value(): mixed;", "public function getValue(){return $this->value;}", "public function GetReadOnly ();", "protected function fillable()\n {\n return [\n 'email', 'firstname', 'lastname', 'password', 'username', 'options',\n ];\n }", "private static function get_posted_attribute()\n {\n }", "protected abstract function get();", "public function getFillable(): array\n {\n return $this->makeModel()->getFillableFields();\n }", "public function getFieldAttribute()\n {\n return $this->field()->first();\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "function getReadOnly(){\n\t\treturn $this->readonly;\n\t}", "public function getFillableFields(): array;", "public function getCustomFieldAttribute(){\n return \"value\";\n }", "public function __get($atributo){\n\n return $this->$atributo;\n}", "abstract protected function get();", "abstract protected function get();", "public function getField();", "public function getField();", "public function getField();", "public function getField();", "public function getField();", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "function get_value() {\r\n\r\n return $this->_value;\r\n\r\n }", "public function value() {}", "public function value() {}", "public function value() {}", "public function value() {}", "protected function attrProtected()\n {\n return null;\n }", "function getValue()\r\n {\r\n return $this -> _value;\r\n }", "public function getField(): string {}", "function getValue(){\n\t\treturn $this->getAttribute('value');\n\t}", "public function getShouldFieldBeOverlaidData() {}", "function getvalue() {\n\treturn $this->value;\n}", "public function getAllowed()\n {\n return $this->allowed;\n }", "protected function value() {\n return $this->value;\n }", "public function getBillable()\n {\n return $this->_billable;\n }", "function get_field() {\n\t\treturn $this->field;\n\t}", "public function getValue()\r\n {\r\n return arr::get($this->form_data, 'password');\r\n }", "public function getValue()\n {\n return parent::getValue();\n }", "public function getValue()\n {\n return parent::getValue();\n }", "abstract protected function getValue(): string;", "public function getUserValue();", "public function getValue(): mixed\n {\n return $this->field?->getValue();\n }", "public function getReadonly()\n {\n return $this->readonly;\n }", "public function get_unidad_medida_protected() {\n return $this->unidad_medida_protected;\n }", "public function getAllowed() {\n return $this->_allowed;\n }", "protected function inputValue() {\n return $this->value(false);\n }", "public function getValue() {return $this->_value; }", "function field(){\n\t\tif(!$this->_loaded){\n\t\t\t$this->load();\n\t\t}\n\t\treturn $this->_field;\n\t}", "function get_value() {\n\t\treturn $this->value;\n\t}", "public function getValue()\n {\n return $this->getReflector()->getValue();\n }", "public function getFieldValue()\r\n {\r\n return $this->FieldValue;\r\n }", "public function __get($name)\r\n {\r\n if (array_key_exists($name, $this->data)) {\r\n return $this->data[$name];\r\n }else{\r\n //returns the value of the attribute even though it is private/hidden\r\n return $this->$name;\r\n }\r\n\r\n }", "public function getValue() {\n\t\treturn isset($this->attributes['value'])?$this->attributes['value']:null;\n\t}", "public function get_field() {\r\n\t\treturn ($this->field);\r\n\t}", "public abstract function getValue();", "public function getRequired();", "function value() {\r\n return $this->value;\r\n }", "public function getBillable()\n {\n $value = $this->get(self::BILLABLE);\n return $value === null ? (boolean)$value : $value;\n }", "public function GetRequired ();", "function input_value(){\n\t\treturn $this->_value;\n\n\t}", "function input_value(){\n\t\treturn $this->_value;\n\n\t}", "public function getIsMineAttribute();", "function _getValue(){\n\t\tparent::_getValue();\n\t}", "function getValue() {\r\n return $this->_value;\r\n }", "function getValue() {\n return $this->value;\n }", "public function getUserValue() {\n\t\tif(!$this->name) return null;\n\t\t$method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\tif($this->parentForm && $this->parentForm->getMethod()!==$method) return $this->getInjectedUserValue();\n\t\tswitch($method) {\n\t\t\tcase 'get':\n\t\t\t\treturn $this->applyAutocorrect(isset($_GET[$this->name]) ? $_GET[$this->name] : $this->getInjectedUserValue());\n\t\t\t\tbreak;\n\t\t\tcase 'post':\n\t\t\t\treturn $this->applyAutocorrect(isset($_POST[$this->name]) ? $_POST[$this->name] : $this->getInjectedUserValue());\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $this->applyAutocorrect($this->getInjectedUserValue());\n\t}", "public function getPermissions() {\n return @$this->attributes['permissions'];\n }", "public function getReadOnly()\n {\n return $this->readOnly ? true : null;\n }", "final public function value()\n {\n return $this->value;\n }", "public function getFieldValue() {\n return $this->field_value;\n }", "public function get_value()\n { \n return $this->value;\n }", "private function getModelFields() {\n\n $model = (string)$this->model_namespace .\"\\\\\". $this->model;\n $record = new $model();\n\n return $record->getFillable();\n\n }", "public function getValue(){\r\n\t\treturn null;\r\n\t}", "public function getValue(){\r\n\t\treturn null;\r\n\t}", "public function get() {\n return $this->value;\n }", "protected function GetField() {\r\n\t\t\treturn $this->field;\r\n\t\t}", "public function sanitize()\n {\n return $this->value;\n }", "public function getReadOnly()\n {\n return $this->read_only;\n }" ]
[ "0.705937", "0.705937", "0.7051226", "0.7051226", "0.69734013", "0.689669", "0.65590847", "0.6546662", "0.64673424", "0.62643194", "0.62231153", "0.62059724", "0.61643744", "0.6140431", "0.61306596", "0.60848016", "0.60654795", "0.60415566", "0.6020141", "0.59862334", "0.59784037", "0.5940582", "0.59318715", "0.5926956", "0.5918725", "0.5908749", "0.5908749", "0.5908749", "0.5908749", "0.5908749", "0.5902109", "0.59008497", "0.5893945", "0.589378", "0.5888629", "0.5888629", "0.5877465", "0.5877465", "0.5877465", "0.5877465", "0.5877465", "0.5873599", "0.5873599", "0.5870071", "0.58689034", "0.58689034", "0.58689034", "0.58689034", "0.5861005", "0.58318174", "0.5814549", "0.58077717", "0.58019686", "0.5782938", "0.5780242", "0.57790357", "0.5776286", "0.5771843", "0.5768768", "0.5760764", "0.5760764", "0.5759903", "0.57580507", "0.5727659", "0.57273597", "0.5726704", "0.5722717", "0.57149243", "0.5708048", "0.56949735", "0.5691099", "0.5690584", "0.5688168", "0.5687296", "0.5685685", "0.56842285", "0.5679364", "0.56728446", "0.5672843", "0.5672382", "0.5667313", "0.56660783", "0.56660783", "0.5665762", "0.5656826", "0.5656648", "0.5646977", "0.5645054", "0.5639158", "0.563528", "0.5632532", "0.561502", "0.56146497", "0.56107247", "0.5600035", "0.5600035", "0.55991143", "0.55952775", "0.5595201", "0.5590141" ]
0.70875853
0
Get protected value $possibleRelations
Получить защищённое значение $possibleRelations
public function getPossibleRelations() { return $this->possibleRelations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }", "public function getRelations()\n {\n if (array_key_exists(\"relations\", $this->_propDict)) {\n return $this->_propDict[\"relations\"];\n } else {\n return null;\n }\n }", "public function getRelations() {}", "public function getRelations(): array;", "public function getAllowedRelationships();", "public function getRelations()\n {\n return $this->relations;\n }", "public function getRelations()\n {\n return $this->relations;\n }", "protected function relations()\n {\n // [relationName => [relationType, targetCollection, reference], ...]\n return array();\n }", "public function get_relations() {\n\t\t\treturn $this->relations;\n\t\t}", "public function getRelation();", "public function getRelations() : array\n {\n\n return $this->relations;\n }", "public function getRelations() {\n\t\treturn array_values($this->_relations);\n\t}", "public function relations()\n {\n return $this->_relations;\n }", "protected function availableRelations(): array\n {\n return $this->normalizeRelations(array_merge($this->relations, $this->load));\n }", "public function getRelationDefinition()\n {\n $relations = $this->getOption('relations');\n if (!is_array($relations)) {\n return $this->relations();\n }\n\n return $relations + $this->relations();\n }", "public static function relations()\n {\n if (isset(Auth::user()->attributes['relations'])) {\n self::$user_relations = Auth::user()->attributes['relations'];\n } else {\n throw new RelationNotFoundException();\n }\n return self::$user_relations;\n }", "protected function get_relationships() {\n\t\treturn (array) $this->get_config( 'field_relationships' );\n\t}", "public function getNNRelations(): array\n {\n return $this->nn_relations;\n }", "public function getRelations()\n {\n $this->checkInitRelations();\n\n return $this->relations;\n }", "protected function relations()\r\n {\r\n return [];\r\n }", "public function getResourceRelations()\n {\n return $this->resourceRelations;\n }", "public function getDefinedRel() {}", "protected static function _relations() {\n\n\t}", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelation()\n {\n return $this->relation;\n }", "public function relationships();", "protected function getRelations()\n\t{\n\t\treturn ['sections', 'contentTypes'];\n\t}", "public function getRelation()\n\t\t{\n\t\t\treturn $this->relation;\n\t\t}", "public function getRelations() {\n return $this->owner->relations();\n }", "public function getRelations()\n\t{\n\t\tif (empty($this->relations)) {\n\t\t\t$this->relations = Vtiger_Relation_Model::getAllRelations($this);\n\t\t}\n\t\treturn $this->relations;\n\t}", "public function getAvailableInterpretations()\n {\n return $this->owner->{$this->_hasManyRelationKey};\n }", "protected function relations()\n\t{\n\t\treturn array();\n\t}", "protected function relationships()\n {\n return array();\n }", "public function getRelations($relationType = null);", "public function getRelations()\n {\n if ($this->def->getTarget() === null) {\n return [];\n }\n\n $relations = [];\n foreach ($this->def->getTarget()->getRelations() as $relation) {\n $relations[$relation->getLocalProperty()] = $relation;\n }\n\n return $relations;\n }", "abstract protected function getRelations($request): array;", "public function getRelations()\n {\n $values = $this->toArray();\n $final = array();\n\n foreach ($values as $key => $value) {\n if ($value instanceof RelationInterface) {\n $final[$key] = $value;\n }\n }\n\n return $final;\n }", "public function getRelationsNames() : array\n {\n\n return array_keys($this->relations);\n }", "public function getIncludeFlagForURLRelations(): bool\n {\n return $this->UrlRelations;\n }", "public static function relations(): array\n\t{\n\t\tstatic::prepareModel();\n\n\t\treturn static::$relationships[static::class] ?? [];\n\t}", "public function relationNames()\r\n {\r\n return [\n 'especie',\n 'lance',\n 'replecion'\n ];\r\n }", "public function relations()\n {\n return array();\n }", "public function relations()\n {\n return array();\n }", "public function getRelationable(): ?bool\n {\n // Otherwise no member, but only subgroups are allowed.\n return $this->relationable;\n }", "function _setPossibleRelation() {\n\t\t//check for form data\n\t\tif(isset($this->params['url']) && isset($this->params['url']['possible_relation'])\n\t\t\t && isset($this->params['url']['vertex_id'])\n\t\t\t && is_numeric($this->params['url']['vertex_id'])) {\n\t\t\t \t//'f' or 't' as suffix?\n\t\t\t \t$fromto = substr($this->params['url']['possible_relation'], -1);\n\t\t\t \t\n\t\t \t\t$this->data['Relation']['relation_type_id'] = substr($this->params['url']['possible_relation'], 0, -1);\n\t\t\t \tif ($fromto == 'f')\n\t\t\t \t\t$this->data['Relation']['from_vertex_id'] = $this->params['url']['vertex_id'];\n\t\t\t \tif ($fromto == 't')\n\t\t\t \t\t$this->data['Relation']['to_vertex_id'] = $this->params['url']['vertex_id'];\n\t\t\t }\n\t}", "public function getExternalRelationNames(): array;", "public function relationNames()\n {\n return [\n 'nIK',\n 'tanggungans'\n ];\n }", "public function getRelationCanSearchable()\n {\n return $this->relationCanSearchable;\n }", "public function getRelationships()\n {\n return [\"cohort\", \"student\", \"workplace\", \"categories\", \"learningGoals\", \"resourcePerson\", \"timeslot\",\n \"resourceMaterial\", \"learningActivityProducing\", \"learningActivityActing\"];\n }", "public function setRelations() {}", "protected function getPossibleInterpretations()\n {\n $config = $this->_loadRelationConfig($this->_manyManyRelationKey);\n\n $model = $this->_applyScopes($config[self::RELATION_CLASS]::model());\n\n $data = CHtml::listData($model->findAll(), function() {\n return $this->_loadRelationConfigPkName($this->_loadRelationConfig($this->_hasManyRelationKey));\n }, 'id', 'id');\n\n $config = $this->_loadRelationConfig($this->_hasManyRelationKey);\n\n $possibles = $config[self::RELATION_CLASS]::model()->populateRecords($data, true, $config[self::RELATION_INDEX]);\n\n foreach ($possibles as $possible)\n {\n $possible->setIsNewRecord(true);\n }\n\n return $possibles;\n }", "public function getQueueableRelations();", "public function getFullRelations() {\r\n $acoClass = Strategy::getClass(\"Aco\");\r\n $acoObjects = $acoClass::model()->findAll();\r\n\r\n $aroClass = Strategy::getClass(\"Aro\");\r\n $aroObjects = $aroClass::model()->findAll();\r\n\r\n return $this->getRelations($acoObjects,$aroObjects);\r\n }", "public function getRelationships()\n\t{\n\t\treturn $this->relationships;\n\t}", "public function getRelations()\n {\n return array_keys($this->schema);\n }", "public function relationNames()\n {\n return [\n 'nIKKK'\n ];\n }", "public function getRelationshipsInclusionMeta();", "public static function getRelationFields()\n {\n return static::$relationFieldsData;\n }", "public function relationNames()\n {\n return [\n 'hasilkaryasiswas'\n ];\n }", "protected function getArrayableRelations()\n {\n return $this->getArrayableItems($this->relations);\n }", "public function getRelationship() {\n return $this->get('config_relationship')->rows;\n }", "public function allowedApiRelations(): array\n {\n return [];\n }", "public function relationNames()\n {\n return [\n 'evaluados',\n 'user'\n ];\n }", "abstract public function getRelationshipDefinitions(): array;", "public function hasRelations() {\n return !empty($this->_relations);\n }", "public function buildRelations()\n {\n }", "public function relationNames()\n {\n return [\n 'cutis'\n ];\n }", "public function relationNames() {\n return [\n 'adminbesichtigungkundes',\n 'immobilien',\n 'angelegtVon',\n 'aktualisiertVon'\n ];\n }", "public function can_be_used_in_relationship();", "public function GetToManyRelation();", "public function testRelationIsAvailable()\n\t{\n\t\t$query = RelationQuery::make('relation:value');\n\n\t\t$this->assertSame('relation', $query->getRelated());\n\t}", "public function relationNames()\r\n {\r\n return [\n ''\n ];\r\n }", "public function relationNames()\n {\n return [\n ''\n ];\n }", "public function related() {\n\t\t$s = $this->get('related');\n\n\t\tif( !$s ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $s;\n\t}", "public function getQueueableRelations()\n {\n }", "public function getQueueableRelations()\n {\n }", "public function getQueueableRelations()\n {\n }", "public function getRelations(): array\n {\n if (empty($this->associations)) {\n $this->buildAssociations();\n }\n return array_values($this->associations);\n }", "public function loadRelations();", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function get_table_relations() {\n \t\treturn $this->table->get_table_relations();\n \t}", "private function relations()\n {\n $tbls = $this->tables;\n foreach ($this->tables as $table => $fields) \n {\n isset($this->table_aliases[$table]) and ($table = $this->table_aliases[$table]);\n \n $table_fk = preg_replace(\"/s$/\", \"\", $table) . \"_{$this->pk}\";\n \n //define the possible relationships\n $this->tables[$table]['rships'] = array('has_one' => array(), 'has_many' => array(), 'many_to_many' => array());\n\n $table_fields = $fields['fields'] ;\n \n foreach ($tbls as $tbl => $flds) \n { \n isset($this->table_aliases[$tbl]) and ($tbl = $this->table_aliases[$tbl]);\n \n //create a tables foreign key\n // by replacing last space with nothing then appending the primary key to the end\n $tbl_fk = preg_replace(\"/s$/\", \"\", $tbl) . \"_{$this->pk}\";\n \n //get all table fields from the tables object\n $tbl_fields = $flds['fields'] ;\n\n //check for a substring of the foreign key is found among the inner table fields\n if (self::in_fields($table_fk, $tbl_fields)) \n { \n //check for a many to many table\n //else its a has many relationship\n if (preg_match(\"/\\_{$table}|{$table}\\_/\", $tbl)) \n {\n $this->tables[$table]['rships']['many_to_many'][] = preg_replace(\"/\\_{$table}|{$table}\\_/\", \"\", $tbl); \n } \n else \n { \n $this->tables[$table]['rships']['has_many'][] = $tbl;\n } \n }\n \n //check for a substring of the foreign key is found among the table fields\n // to define a has one relationship\n if (self::in_fields($tbl_fk, $table_fields)) \n { \n $this->tables[$table]['rships']['has_one'][] = $tbl; \n } \n } \n }\n }", "public function getRelated()\n {\n return $this->related;\n }", "public function getRelated()\n {\n return $this->related;\n }", "public function getRelated()\n {\n return $this->related;\n }", "public function getRalationsList(){\n $list = array();\n foreach($this->relations as $relation){\n //$list[] = $relation['relationName'];\n }\n return $list;\n }", "public function getQueueableRelations()\n {\n }", "public function relationNames()\n {\n return [\n 'user',\n 'planoEducadorLicencas',\n 'planoGrupos',\n 'grupos'\n ];\n }" ]
[ "0.85407144", "0.7160672", "0.7141845", "0.6850292", "0.68277156", "0.6775931", "0.6775931", "0.66220987", "0.65688187", "0.6509803", "0.6448849", "0.6420533", "0.6419721", "0.6386259", "0.63564086", "0.6266628", "0.624987", "0.6194527", "0.6168041", "0.6166368", "0.6133607", "0.6125183", "0.6117304", "0.6104624", "0.6104624", "0.6104624", "0.6096499", "0.606304", "0.6042721", "0.6041976", "0.5991882", "0.5952091", "0.5943964", "0.5899922", "0.58812165", "0.58804494", "0.5873008", "0.58680177", "0.58314437", "0.5827367", "0.58245754", "0.5819271", "0.5803961", "0.5803961", "0.5792547", "0.5783127", "0.5762506", "0.57518256", "0.57461417", "0.57454926", "0.5732039", "0.57211447", "0.57094294", "0.56935436", "0.5682237", "0.5681425", "0.56569415", "0.5654906", "0.56541646", "0.5648", "0.5646136", "0.56432253", "0.5638055", "0.5624581", "0.5624322", "0.5616181", "0.5613314", "0.5609053", "0.5608386", "0.559563", "0.5592565", "0.55922025", "0.5584073", "0.5560706", "0.55589604", "0.5553793", "0.5553793", "0.5553793", "0.55460554", "0.5541127", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.55295956", "0.5520517", "0.55192137", "0.55082434", "0.55082434", "0.55082434", "0.5484932", "0.5483907", "0.54818225" ]
0.87294054
0
check if the input test contains white spaces inside
проверить, содержит ли входной тест пробелы внутри
function whiteSpaceInside($inputText){ if( preg_match('/\s/',$inputText) ){ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWithWhiteSpace(){\n $string = \"azertyuiop qsdfghjklm wxcvbn\";\n $boolean = StringValidator::noWhiteSpace($string);\n $this->assertFalse($boolean);\n }", "public function testOnlySpaces()\r\n {\r\n // a varaiable that stores the results from the cleaner\r\n $result = $this->cleaner->cleanSearchQuery(' ');\r\n\r\n // an array with the values we expect it to have\r\n $queryStrings = array('');\r\n\r\n // assert that the two arrays are equal\r\n $this->assertEquals($queryStrings, $result);\r\n }", "public function testNoWhiteSpace(){\n $string = \"azertyuiopqsdfghjklmwxcvbn\";\n $boolean = StringValidator::noWhiteSpace($string);\n $this->assertTrue($boolean);\n }", "function nospaces($check) {\n\t\t$value = array_shift($check); \n\t\treturn preg_match('|^[0-9a-zA-Z]*$|', $value);\n\t}", "public function testGenerateStringHasWhiteSpace()\n {\n $string = \"4azdaazdq sdqé qsd78cdfp liok\";\n\n $bool = StringValidator::noWhiteSpace($string);\n\n $this->assertTrue($bool);\n }", "function check_no_spaces($stringa) {\n\tif (strrpos($stringa,' ') > 0) {\n\t return false;\n\t}\n\treturn true;\n}", "public function testGenerateStringHasNoWhiteSpace()\n {\n $string = \"4azdaazdqsdqéqsd78cdfpiok\";\n\n $bool = StringValidator::noWhiteSpace($string);\n\n $this->assertFalse($bool);\n }", "function validate_spaces($field_input, array &$field): bool\n{\n if (!preg_match('/\\s/', $field_input)) {\n $field['error'] = 'Turi ivesti ir VARDA ir PAVARDE';\n return false;\n }\n\n return true;\n}", "function verifyAlphaSpaces($testString) {\n $newTestString = str_replace(' ', '', $testString);\n return (ctype_alpha($newTestString));\n }", "function has_space ($text){\n\tif ( ereg(\"[ \t]\",$text) ){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function testWithWhiteSpaceBeginningEnd(){\n $string = \" azertyuiopqsdfghjklmwxcvbn \";\n $boolean = StringValidator::noWhiteSpaceBeginningEnd($string);\n $this->assertFalse($boolean);\n }", "static function isValid_letters_whiteSpace_only($data){\r\n return (bool)preg_match(\"/^[a-zA-Z ]*$/\", $data);\r\n }", "public function testLeadingSpaces()\r\n {\r\n // a varaiable that stores the results from the cleaner\r\n $result = $this->cleaner->cleanSearchQuery(' Bob');\r\n\r\n // an array with the values we expect it to have\r\n $queryStrings = array();\r\n $queryStrings[] = 'Bob';\r\n\r\n // assert that the two arrays are equal\r\n $this->assertEquals($queryStrings, $result);\r\n }", "function field_has_only_letters_spaces($data)\n{\n\t/*\n\t\tThe regular expression matches 0 or more expressions containing a letter(upper-case and lower-case) and space.\n\t\t\n\t*/\n\tif(preg_match(\"/^[a-zA-Z ]*$/\", $data))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function test ($actual_res, $expect_res) {\n if (str_replace(\" \", \"\", $actual_res) === str_replace(\" \", \"\", $expect_res)) {\n echo \".\\n\";\n }\n else {\n echo \"Test Failed\";\n }\n}", "protected function is_linear_whitespace()\n {\n }", "#[@test]\n public function whiteSpaceAndEmpty() {\n $in= $this->newReader(' ; Karlsruhe ; 76137');\n $this->assertEquals(array('', 'Karlsruhe', '76137'), $in->read());\n }", "public function testEmailWithSpaces() {\n $this->assertFalse($this->validator->isValid(\"joeblow @apache.org\")); // TODO - this should be valid?\n\n $this->assertFalse($this->validator->isValid(\"joeblow@ apache.org\"));\n\n $this->assertTrue($this->validator->isValid(\" joeblow@apache.org\")); // TODO - this should be valid?\n\n $this->assertTrue($this->validator->isValid(\"joeblow@apache.org \"));\n\n $this->assertFalse($this->validator->isValid(\"joe blow@apache.org \"));\n\n $this->assertFalse($this->validator->isValid(\"joeblow@apa che.org \"));\n\n }", "public function testCheckUndetectedUnspacedWord()\n {\n $filter = new LeoProfanity();\n\n $this->assertFalse($filter->check('Buy classic watches online'));\n }", "function isSpace()\r\n\t{\r\n\t\t$ch = $this->peekChar();\r\n\t\treturn $ch != '' && $ch <= ' ';\r\n\t}", "public function testGenerateStrignHasWhiteSpaceStartEnd()\n {\n $string = \" 4azdaazdqsdqéqsd78cdfpliok \";\n\n $bool = StringValidator::haveNoWhiteSpaceBeforeEnd($string);\n\n $this->assertTrue($bool);\n }", "public function testNoWhiteSpaceBeginningEnd(){\n $string = \"azertyuiopqsdfghjklmwxcvbn\";\n $boolean = StringValidator::noWhiteSpaceBeginningEnd($string);\n $this->assertTrue($boolean);\n }", "function get_space_allowed()\n{\n}", "public function testCleanUndetectedUnspacedWord()\n {\n $filter = new LeoProfanity();\n\n $this->assertEquals($filter->clean('Buy classic watches online'), 'Buy classic watches online');\n }", "function ctype_space($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return $text==32 || ($text >=9 && $text <=13);\n } else {\n return ((int)preg_match('/^[\\s\\v]+$/', (string)$text) > 0);\n }\n }", "function Es_string_espacios($string){\n\tif (preg_match('/[^a-zA-Z0-9\\s]/',$string)){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n}", "private function isSpace() {\n return $this->current == ' ';\n }", "function alpha_dash_space($str_in){\n\t\tif (! preg_match(\"/^([-a-z_ ])+$/i\", $str_in)) {\n\t\t\t$this->form_validation->set_message('alpha_dash_space', '%s harap masukan huruf');\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "function alpha_dash_space($str_in){\n\t\tif (! preg_match(\"/^([-a-z_ ])+$/i\", $str_in)) {\n\t\t\t$this->form_validation->set_message('alpha_dash_space', '%s harap masukan huruf');\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function testTrailingSpaces()\r\n {\r\n // a varaiable that stores the results from the cleaner\r\n $result = $this->cleaner->cleanSearchQuery('Bob ');\r\n\r\n // an array with the values we expect it to have\r\n $queryStrings = array();\r\n $queryStrings[] = 'Bob';\r\n\r\n // assert that the two arrays are equal\r\n $this->assertEquals($queryStrings, $result);\r\n }", "function check_space($string) {\r\n $space = FALSE;\r\n $asciiArray = string_to_ascii($string);\r\n foreach ($asciiArray as $ascii) {\r\n if ($ascii == 32) {\r\n $space = TRUE;\r\n }\r\n }\r\n return $space;\r\n}", "function alpha_only_space($str)\n {\n if (!preg_match(\"/^([-a-z ])+$/i\", $str)){\n $this->form_validation->set_message('alpha_only_space', 'Kolom %s harus mengandung huruh dan spasi saja');\n return FALSE;\n }else{\n return TRUE;\n }\n }", "private function is_white_space($string) {\n $whitespace = array(' ', \"\\t\", \"\\n\", \"\\r\", \"f\", \"\\v\");\n $unboxedstring = $string;\n if (is_object($string)) {\n $unboxedstring = $string->string();\n }\n return in_array($unboxedstring[0], $whitespace);\n }", "function check_input($data){\n\t $data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\tif(substr_count(strtolower($data), \" or \")>0){\n\t\t\t$data=null;\n\t\t}\n\t return $data;\n\t}", "#[@test]\n public function surroundingWhitespace() {\n $in= $this->newReader('Timm ; Karlsruhe ; 76137');\n $this->assertEquals(array('Timm', 'Karlsruhe', '76137'), $in->read());\n }", "public function testGenerateStringHasNoWhiteSpaceStartEnd()\n {\n $string = \"4azdaazdqsdqéqsd78cdfpliok\";\n\n $bool = StringValidator::haveNoWhiteSpaceBeforeEnd($string);\n\n $this->assertFalse($bool);\n }", "function testSkinInput($input){\n\n \n preg_match(\"/^[a-zA-Z]+$/i\", $input, $matches);\n \n if($matches == null){\n return $matches;\n } else {\n return $matches;\n }\n }", "public function testMultipleInnerSpaces()\r\n {\r\n // a varaiable that stores the results from the cleaner\r\n $result = $this->cleaner->cleanSearchQuery('Bob Jones');\r\n\r\n // an array with the values we expect it to have\r\n $queryStrings = array();\r\n $queryStrings[] = 'Bob';\r\n $queryStrings[] = 'Jones';\r\n\r\n // assert that the two arrays are equal\r\n $this->assertEquals($queryStrings, $result);\r\n }", "public function testCleanMultiSpace()\n {\n $filter = new LeoProfanity();\n\n $this->assertEquals($filter->clean('I hav ,e BoOb, '), 'I hav ,e ****, ');\n $this->assertEquals($filter->clean(',I h a. v e BoOb.'), ',I h a. v e ****.');\n }", "function isBlank($arg) {\n\treturn preg_match(\"/^\\s*$/\", $arg);\n}", "public function isStringEntry()\n {\n //Alternative Solution: \n //return ctype_alpha($this->input);\n if (preg_match('/^[a-z]+$/', $this->input)) {\n return true;\n } else {\n return false;\n }\n }", "private function isSpaceChar($char): bool\n {\n return (preg_match(\"/\\t| /\", $char) === 1);\n }", "public function testIsBlankGoodCase() {\n $result = $this->fieldObject->isBlank('');\n $this->assertEquals(true, $result);\n }", "public function skip_whitespace()\n {\n }", "function validName($name)\r\n {\r\n $name = str_replace(\" \", \"\", $name);\r\n\r\n return !empty($name) && ctype_alpha($name);\r\n }", "function alpha_only_space($str)\r\n {\r\n if (!preg_match(\"/^([-a-z ])+$/i\", $str))\r\n {\r\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\r\n return FALSE;\r\n }\r\n else\r\n {\r\n return TRUE;\r\n }\r\n }", "function wp_spaces_regexp()\n{\n}", "function alpha_dash_space($name)\n\t{\n\t return ( ! preg_match(\"/^([-a-z_ ])+$/i\", $name)) ? FALSE : TRUE;\n\t}", "private function stringHandle($expected)\n {\n // when check a string and only '' value given will return true;\n $expected = trim($expected);\n\n return $expected === '';\n }", "function alpha_only_space($str)\r\n\t{\r\n\t\tif (!preg_match(\"/^([-a-z ])+$/i\", $str))\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}", "function is_Char_Only($Invoer)\n{\n return (bool)(preg_match(\"/^[a-zA-Z ]*$/\", $Invoer)) ;\n}", "function alpha_only_space($str)\n\t{\n\t\tif (!preg_match(\"/^([-a-z ])+$/i\", $str))\n\t\t{\n\t\t\t$this->form_validation->set_message('alpha_only_space', 'The %s field\n\t\t\t\tmust contain only alphabets or spaces');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "function is_wordstr($value,$min=1,$max=1){\n\treturn form_regex_test('A-Za-z0-9\\-\\/\\+=~`\\.,:;<>\\{\\}\\[\\]\\(\\)\\|!@\\$%\\^&\\*\\'\"_\\?\\\\\\#',' \\r\\n\\t',$value,$min,$max);\n}", "function validate_field_has_space_between($field_value, &$field)\n{\n $has_space = strpos($field_value, ' ');\n\n if ($has_space === false) {\n $field['error'] = 'Privalo buti tarpas';\n } elseif ($field_value != trim($field_value)) {\n $field['error'] = 'Neturi buti tarpo pradzioje ar pabaigoje';\n } else {\n return true;\n }\n}", "public static function is_null_or_whitespace(?string $value)\n {\n }", "public function alpha_numeric_spaces($str)\n\t{\n\t\tif (preg_match('/^[0-9a-zA-Z{}=+!@#%*()_]+$/i', $str))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('clave', 'El campo {field} puede contener números, caracteres alfabéticos, y/o estos caracteres {}=+!@#%*()_');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function name_valid ($input){\n\t$isvalid = true;\n\t$input_as_array = str_split ($input);\n\tforeach ($input_as_array as $chara){\n\t\tif (!( (ord ($chara) >= ord('a') && ord ($chara) <= ord ('z'))\n\t\t\t|| (ord ($chara) >= ord('A') && ord ($chara) <= ord ('Z'))\n\t\t\t|| ord($chara) == ord(' ') )){\n\t\t\t$isvalid = false;\n\t\t}\n\t}\n\treturn $isvalid;\n}", "public function testCheckEmptyString()\n {\n $filter = new LeoProfanity();\n\n $this->assertFalse($filter->check(''));\n }", "public function isBlank()\n {\n return $this->matchesPattern('^[[:space:]]*$');\n }", "function _has_operator($str) {\n $str = trim($str);\n if (!preg_match('/(\\\\s|<|>|!|=|is null|is not null)/i', $str)) {\n return FALSE;\n }\n return TRUE;\n }", "function test_in($input){\r\n $input = trim($input);\r\n $input = stripslashes($input);\r\n $input = htmlspecialchars($input);\r\n return $input;\r\n }", "function checkAlpha($text){\n\t\tif(trim($text)!='')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t\t//was:\n\t\t //return preg_match (\"/[A-z-]/\", $text);\n\t}", "public function testContains()\n {\n $this->assertFalse(StringHelper::contains($this->text,'Test'));\n $this->assertFalse(StringHelper::contains($this->text,''));\n $this->assertTrue(StringHelper::contains($this->text,'as survived not only f'));\n $this->assertFalse(StringHelper::contains($this->text,array()));\n $this->assertFalse(StringHelper::contains($this->text,array('-','+','=')));\n $this->assertTrue(StringHelper::contains($this->text,array('versions','essentially','...')));\n }", "#[@test]\n public function leadingWhitespaces() {\n $in= $this->newReader('Timm; Karlsruhe; 76137');\n $this->assertEquals(array('Timm', 'Karlsruhe', '76137'), $in->read());\n }", "public function registerNoWhiteSpacesRule(){\n Validator::extend('no_white_spaces',function($attribute, $value, $parameters, $validator){\n if(preg_match('/\\s/', $value))\n {\n return false;\n }\n return true;\n });\n }", "private function text(string $str)\n {\n if (preg_match('/([^a-zA-Z\\s]+)/', $str))\n {\n return false;\n }\n else\n {\n if (preg_match('/([a-zA-Z\\s])/', $str) == true)\n {\n return true;\n }\n }\n\n return false;\n }", "function username_check_blank($str)\n{\n\n $pattern = ' ';\n $result = preg_match($pattern, $str);\n\n if ($result)\n {\n $this->form_validation->set_message(__FUNCTION__, 'The %s field can not have a \" \"');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n}", "function checkinvName($invName) {\n $pattern = '/^[A-Za-z\\s]{3,}$/';\n return preg_match($pattern, $invName);\n}", "function test_name($data){\n if(preg_match(\"/[a-zA-Z]{2,}$/\", $data)){\n return true;\n }else{\n return false;\n }\n}", "function verify_input($input){\n\t\t\t\t$input = trim($input);\n\t\t\t\t$input = stripcslashes($input);\n\t\t\t\t$input = htmlspecialchars($input);\n\t\t\t\treturn $input;\n\t\t\t}", "function test_name($name){\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$name)) {\n $nameError ='Sorry the name is invalid, it should be letters and space.';\n return $nameError; // mettre le return dans le if sinon la variable est indéfinie\n }\n \n }", "public function is_char_space($name)\n {\n if(!preg_match(\"/^[a-zA-Z -]+$/\",$name))\n {\n return 0;\n }\n else {\n return 1;\n }\n }", "public static function stringIsWhitespace($string)\n {\n return preg_match('/^(\\s)+$/', $string);\n }", "function test_input($input){\n\t\t$input = trim($input);\n\t\t$input = stripcslashes($input);\n\t\t$input = htmlspecialchars($input);\n\t\treturn $input;\n\t}", "function testValidTitleWithSpaces() \n {\n $this->get(\"https://cs361-project-b-technicallyrice.c9.io/employer_statistics.php\");\n $this->assertResponse(200);\n\n $this->setField(\"role\", \"sales manager\");\n $this->setField(\"location\", \"oregon\");\n \n $this->clickSubmit(\"submit\");\n\n $this->assertResponse(200);\n $this->assertText(\"1.) hibu\");\n }", "function verifyInput ($var){\n\t\t$var = trim($var);\n\t\t$var = htmlspecialchars($var);\n\t\t$var = stripcslashes($var);\n\t\treturn $var;\t\n\t}", "function letterStrict($input){\n $input = str_replace(' ','', $input);\n if(trim($input) === \"\" || ctype_alpha($input) === false || $input !== htmlspecialchars($input)){\n return false;\n }\n return true;\n}", "final public static function isAlphanumericPlusSpace($value):bool\n {\n return self::regex('alphanumericPlusSpace',$value);\n }", "public static function userform_input_needs_trim() {\n return true;\n }", "public function testIsBlankBadCases() {\n $isBlankBadCases = array('12234', 'Hhhhddd', '45.67');\n\n foreach ($isBlankBadCases as $isBlankBadCase) {\n $result = $this->fieldObject->isBlank($isBlankBadCase);\n $this->assertEquals(false, $result);\n }\n }", "function validReqText($input){\n if($input !== htmlspecialchars($input) || trim($input) === \"\"){\n return false;\n }\n return true;\n}", "function test($input){\n\t\t$row_regex =\n\t\t\t$this->quoted_left_row_delimiter .\n\t\t\t' .+ ' .\n\t\t\t$this->quoted_right_row_delimiter;\n\t\t$table_regex =\n\t\t\t'/^' .\n\t\t\t$row_regex .\n\t\t\t'(\\n' .\n\t\t\t$row_regex .\n\t\t\t')*$/';\n\t\t\n\t\tif(preg_match($table_regex, $input)){\n\t\t\treturn true;\n\t\t}\n\t}", "function has_valid_name($value){\n return preg_match(\"/^[A-Za-z- ']+$/ \", $value);\n }", "function alpha_only_space($str)\n{\n if (!preg_match(\"/^([-a-z ])+$/i\", $str))\n {\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n}", "public function min_whitespace($string)\n {\n }", "function empty_content($str) {\n\t return trim(str_replace('&nbsp;','',strip_tags($str))) == '';\n\t}", "function validData($data)\n {\n return preg_replace('/[^a-zA-Z0-9\\s]/', '', $data);\n }", "function check_string ($string_in, $esc_aped) {\n\t$not_allowed = '=;@()%';\n\t$bad_string = FALSE;\n\t$word_array = array();\n\tif ( strlen($string_in) != strcspn($string_in, $not_allowed) ) {\n\t\tif ($esc_aped) {\n\t\t\t$word_array = explode(' ', $string_in);\n\t\t\t$word_count = count($word_array);\n\t\t\tif ($word_count > 0) {\n\t\t\t\tforeach($word_array as $key => $value) {\n\t\t\t\t\t$w_word = trim($value);\n\t\t\t\t\t$w_len = strlen($w_word);\n\t\t\t\t\tif ($w_len > 0) {\n\t\t\t\t\t\t$scol_count = substr_count($w_word, ';');\n\t\t\t\t\t\tif ($scol_count > 0) {\n\t\t\t\t\t\t\t$amp_count = substr_count($w_word, '&');\n\t\t\t\t\t\t\tif ($scol_count == $amp_count) {\n\t\t\t\t\t\t\t\t$cool = TRUE;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$bad_string = TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$bad_string = TRUE;\n\t\t}\n } else {\n\t\t$phptag_count = substr_count($string_in, '<?');\n\t\tif ($phptag_count > 0) {\n\t\t\t$bad_string = TRUE;\n\t\t}\n }\n return $bad_string;\n}", "public static function emptyOrSpaces($value)\n {\n return (empty($value) ? true : (is_string($value) ? ctype_space(strval($value)) : false));\n }", "protected function isValid($data)\n\t{\n\t\treturn preg_match('/^[a-zA-Z0-9_, \\r\\n\\t]+$/', $data);\n\t}", "function check_inputs($string,$words) {\n $returnable = TRUE;\n \n foreach($words AS $word) {\n if(stripos($string, $word)!==false){\n $returnable = FALSE;\n }\n }\n \n return $returnable;\n}", "function check_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n }", "function checkinput($var){\n\t$var = htmlspecialchars($var);\n\t$var=trim($var);\n\t$var=stripslashes($var);\n\t//removing the special chars\n\t//trimming\n\t//and other thins\n\treturn $var;\n\t}", "function test_input($data) {\n\t\t\t\t$data = trim($data);\n\t\t\t\t$data = stripslashes($data);\n\t\t\t\t$data = htmlspecialchars($data);\n\t\t\t\treturn $data;\n\t\t\t}", "function test_input($data) {\n\t\t $data = trim($data);\n\t\t $data = stripslashes($data);\n\t\t $data = htmlspecialchars($data);\n\t\t return $data;\n\t\t}", "function test_input($input)\n{\n\t$input = trim($input);\n\t$input = stripcslashes($input);\n\t$input = htmlspecialchars($input);\n\treturn $input;\n}", "public static function blank($check) {\n if (is_array($check)) {\n extract(self::_defaults($check));\n }\n return !self::_check($check, '/[^\\\\s]/');\n }", "function test_input($data){\n\t\t\t\t$data = trim($data);\n\t\t\t\t$data = stripslashes($data);\n\t\t\t\t$data = htmlspecialchars($data);\n\t\t\t\treturn $data;\n\t\t\t\t}", "function test_input($data){\n\t\t\t\t$data = trim($data);\n\t\t\t\t$data = stripslashes($data);\n\t\t\t\t$data = htmlspecialchars($data);\n\t\t\t\treturn $data;\n\t\t\t\t}", "function test_input($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\t$data = strtolower($data);\n\treturn $data;\n}" ]
[ "0.74885803", "0.73238236", "0.7271135", "0.72282356", "0.71889156", "0.70929843", "0.69303966", "0.69034964", "0.688442", "0.6769292", "0.6742722", "0.6736647", "0.6692914", "0.6661057", "0.66508394", "0.6607078", "0.65559566", "0.6550116", "0.6538761", "0.65149033", "0.651247", "0.6498963", "0.6496347", "0.6466141", "0.6441606", "0.6425437", "0.64076835", "0.640691", "0.640691", "0.64050174", "0.6404285", "0.6400252", "0.6395802", "0.6391211", "0.63392437", "0.631548", "0.63058376", "0.62895226", "0.6236694", "0.62170213", "0.6197951", "0.6173614", "0.61669296", "0.61497694", "0.61320883", "0.6101538", "0.6093276", "0.60801697", "0.60726684", "0.6068863", "0.6041096", "0.6034911", "0.60269773", "0.6017669", "0.60143113", "0.6011686", "0.6006783", "0.6005221", "0.5995238", "0.5985613", "0.5974076", "0.5973746", "0.59731907", "0.59679765", "0.5960556", "0.5953297", "0.59277016", "0.5922459", "0.59151614", "0.59114534", "0.589209", "0.5886671", "0.5879849", "0.5871849", "0.58709913", "0.5869765", "0.58660454", "0.58616954", "0.58599156", "0.5858565", "0.58459747", "0.5824928", "0.5810503", "0.5796957", "0.5795066", "0.57765573", "0.5773987", "0.57581145", "0.57559514", "0.5750258", "0.5736281", "0.5732762", "0.5725623", "0.571429", "0.5712734", "0.57126737", "0.5710115", "0.57068676", "0.57068676", "0.5705085" ]
0.76743466
0
below function checks the date of birth receives the pointer to the variable that should capture errors related to the DOB
ниже приведенная функция проверяет дату рождения, получая указатель на переменную, которая должна захватывать ошибки, связанные с датой рождения
function validateDOB($day, $month, $year, &$errorsDOB, &$db){ $dateOK = true; settype($day, "integer"); settype($month, "integer"); settype($year, "integer"); $cleanedDay = cleanInput($day); $cleanedMonth = cleanInput($month); $cleanedYear = cleanInput($year); if((strcmp($day, $cleanedDay) !== 0) || (strcmp($month, $cleanedMonth) !== 0) || (strcmp($year, $cleanedYear) !== 0)){ $errorsDOB['emptySpace'] = 'The date entered cannot contain empty spaces, slashes or special characters!. Please select another one'; $dateOK = false; } //The oldest person in the world today was born 1898, so an error occurs if someone claims to be older than that. else if ($year < 1898) { $errorsDOB['invalidYear'] = 'You cant\'t be that old!. Please select another one'; $dateOK = false; } //If month of birth isn't between 1 and 12, an error occurs. else if (1 > $month || $month > 12) { $errorsDOB['invalidMonth'] = 'The month you\'ve entered isn\'t valid!. Please select another one'; $dateOK = false; } //If day of birth isn't valid, while also considering the months and leap years, an error occurs. else if (($day < 1) || ($day > 31) || ($day == 31 && ($month == 2) || ($month == 4) || ($month == 6) || ($month == 9) || ($month == 11)) || ($day == 30 && $month == 2 || ($day == 29 && $month == 2 // Fun Fact: Leap years happen every year divisible by 4, unless when divisible by 100 (unless when divisible by 400). && ($year % 4 != 0 || ($year % 100 == 0 && $year % 400 != 0)))) ){ $errorsDOB['invalidDay'] = 'The day you\'ve entered isn\'t valid!. Please select another one'; $dateOK = false; } return $dateOK; // if valid }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateOfBirthValidate($DoB) {\n $DoB = sanitiseInput($DoB);\n $errMsg = \"\";\n if ($DoB == \"\") {\n $errMsg = \"You must enter your date of birth\";\n }\n else if (!preg_match(\"/^[\\d]{2}\\/[\\d]{2}\\/[\\d]{4}$/\", $DoB)) {\n $errMsg = \"Invalid format of date, dd/mm/yyyy\";\n }\n else {\n $dateArray = explode(\"/\", $DoB);\n foreach ($dateArray as $index) {\n $index = (int)$index;\n }\n $minDate = date_create((string)$dateArray[0].\"-\".(string)$dateArray[1].\"-\".(string)($dateArray[2]+15));\n $maxDate = date_create((string)$dateArray[0].\"-\".(string)$dateArray[1].\"-\".(string)($dateArray[2]+80));\n //get currentdate\n $now = date(\"d-m-Y\");\n $now = date_create($now);\n //compare to make sure age > 15\n $minDiff = date_diff($minDate, $now);\n $maxDiff = date_diff($maxDate, $now);\n if ($minDiff->format(\"%R%a\") < 0) {\n $errMsg = $errMsg . \"Age must be at least 15-year old\";\n }\n else if ($maxDiff->format(\"%R%a\") > 0) {\n $errMsg = $errMsg . \"Age must not greater than 80-year old\";\n }\n }\n return [$errMsg,$DoB];\n }", "function validateAge ($dob) {\n\n}", "function validateDateOfBirth($dateOfBirth, $personalNumber){\n $dateOfBirthErr = $this->checkInputData($dateOfBirth, \"Date of birth\", 2, true);\n if(empty($dateOfBirthErr) && !empty($dateOfBirth)){\n $dateOfBirthLocal = $this->removeSpaceAndhyphen($dateOfBirth);\n $firstTwoDigit = substr($dateOfBirthLocal, 0, 2);\n if(strlen($dateOfBirthLocal)!=8 ||( $firstTwoDigit !=\"19\" && $firstTwoDigit!=\"20\")){\n $dateOfBirthErr =\"Invalid date of birth. e.g 19671225 or 1967-12-25\";\n }\n \n //check with personal number\n if(!empty($personalNumber)){\n $dateOfBirthFromPersonNumber = $this->changePersonalNumberForm($this->getDateOfBirthFromPersonalNumber($personalNumber));\n if($dateOfBirthLocal !=$dateOfBirthFromPersonNumber){\n $dateOfBirthErr =\"Invalid date of birth, does not much with personal number\";\n }\n }\n }\n return $dateOfBirthErr;\n \n }", "public function check_dob($date) {\n\n\t\t$this->crm_library->check_dob($date);\n\t}", "public function dateOfBirth()\n {\n return $this->validateDate($this->struct['DateOfBirth'], func_get_args());\n }", "function validateDOB(&$errors, $field_list, $field_name) {\n\t/*Follows yyyy-mm-dd-format*/\n\t$pattern = '/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/'; \n\tif (!isset($field_list[$field_name])|| empty($field_list[$field_name])) {\n\t\t$errors[$field_name] = '<br/> *Your Date of Birth is required*';\n\t}\n\telse if (!preg_match($pattern, $field_list[$field_name])) {\n\t\t$errors[$field_name] = '<br/> *Not a valid Date of birth*<br/> *e.g 1992-09-29*';\n\t}\n}", "function check_dob($dobday, $dobmonth, $dobyear){\n $dm = intval($dobmonth);\n $dy = intval($dobyear);\n $dbb = intval($dobday);\n $dob = ($dy * 10000) + ($dm * 100) + $dbb;\n $currentdate = intval(date(\"Ymd\"));\n if ((($currentdate - $dob) < 120000) || ($dob < 19000101)) {\n return 0;\n }\n if (!checkdate ($dm , $dbb , $dy )){\n return 0;\n }\n return $dob;\n}", "public function validate_birthdate($str){\n $field_value = $str; //this is redundant, but it's to show you how\n if($field_value != ''){\n $arr_date = explode('-',$field_value);\n if(count($arr_date) == 3 && is_numeric($arr_date[0]) && is_numeric($arr_date[1]) && is_numeric($arr_date[2]) && checkdate($arr_date[0], $arr_date[1], $arr_date[2])){ \n return TRUE;\n }else{\n return FALSE;\n }\n } \n }", "function _check_birthday($value)\n {\n if(!$value) return true;\n if (!get_time_from_date($value)) {\n\n $this->form_validation->set_message(__FUNCTION__, lang('notice_value_invalid'));\n return FALSE;\n }\n $value=year_age($value);\n if ($value<6 || $value>150) {\n $this->form_validation->set_message(__FUNCTION__, lang('notice_birthday_invalid'));\n return FALSE;\n }\n\n return TRUE;\n }", "function cp_isValid_age($birthDay,$birthMonth,$birthYear){\r\n return date('Ymd') - ($birthYear*10000+$birthMonth*100+$birthDay) >= 180000;\r\n}", "public function validate_dobyear($value) {\n\t\tif ($value < 1950 || $value > (int)date(\"Y\") - 16 || !checkdate((int)$this->post['dobmonth'], (int)$this->post['dobdate'], (int)$this->post['dobyear'])) \n\t\t\t$this->set_specific_error('dobyear', lang(\"ACCOUNT_INVALID_DATE_OF_BIRTH\"));\n\t}", "public function check_dob($date) {\n\n\t\t// valid if empty\n\t\tif (empty($date)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// check valid date\n\t\tif (!check_uk_date($date)) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// check date is in future\n\t\tif (strtotime(uk_to_mysql_date($date)) > time()) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function check_dob($date) {\n\n\t\t// valid if empty\n\t\tif (empty($date)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// check valid date\n\t\tif (!check_uk_date($date)) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// check date is in future\n\t\tif (strtotime(uk_to_mysql_date($date)) > time()) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function dateOfBirth($dateOfBirth)\n {\n $age = '';\n if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $dateOfBirth)) {\n $age = new parliament();\n $age = intval($age->calculateAge($dateOfBirth));\n }\n return ($age >= 18 && $age < 95) ? $_SESSION['dateOfBirth'] = $dateOfBirth : $this->error(3);\n }", "private function _checkAge()\n {\n $dob = $this->getUser()->oxuser__oxbirthdate->value;\n\n // check age if birthdate is set\n if ($dob != \"0000-00-00\") {\n $geb = strval($dob);\n $gebtag = explode(\"-\", $geb);\n\n // explode day form time (14 00:00:00)\n $birthDay = explode(\" \", $gebtag[2]);\n\n $stampBirth = mktime(0, 0, 0, $gebtag[1], $birthDay[0], $gebtag[0]);\n $result['stampBirth'] = $stampBirth;\n\n // fetch the current date (minus 18 years)\n $today['day'] = date('d');\n $today['month'] = date('m');\n $today['year'] = date('Y') - 18;\n\n // generates current day timestamp - 18 years\n $stampToday = mktime(0, 0, 0, $today['month'], $today['day'], $today['year']);\n $result['$stampToday'] = $stampToday;\n\n return $stampBirth <= $stampToday;\n }\n\n // still return true if birthdate is not set, this case is checked in validatePayment\n return true;\n }", "public function birthdate($ibirthdate = NULL) {\n\t\t\tif (!is_null($ibirthdate)){\n\t\t\t\t$this->ibirthdate = $ibirthdate; \n\t\t\t\treturn TRUE; \n\t\t\t}\n\t\t\tif (is_null($this->ibirthdate)) $this->load();\n\t\t\treturn ($this->visible4me(\"birthdate\")) ? $this->ibirthdate : 0; \n\t\t}", "function validateBdate(&$errors, $field_list, $field_name) {\r\n\t$pattern = '/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/';\r\n\tif(!preg_match($pattern,$field_list[$field_name])) {\r\n\t\t$errors[$field_name] = \"Please enter a valid date\";\r\n\t}\r\n}", "public function getDateBirth();", "public function prepareDateOfBirth()\n {\n if ($this->dateOfBirthDay > 0 && $this->dateOfBirthMonth > 0 && $this->dateOfBirthYear > 0) {\n if ($this->dateOfBirth === null) {\n $this->dateOfBirth = new \\DateTime();\n }\n $this->dateOfBirth->setDate($this->dateOfBirthYear, $this->dateOfBirthMonth, $this->dateOfBirthDay);\n }\n }", "function form_example_tutorial_7_validate($form, &$form_state) {\n $year_of_birth = $form_state['values']['year_of_birth'];\n if ($year_of_birth && ($year_of_birth < 1900 || $year_of_birth > 2000)) {\n form_set_error('year_of_birth', t('Enter a year between 1900 and 2000.'));\n }\n}", "public function hasBirthdate(): bool;", "function DetermineAgeFromDOB ($YYYYMMDD_In)\n{\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n}", "function DetermineAgeFromDOB ($YYYYMMDD_In)\n{\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n}", "function DetermineAgeFromDOB ($YYYYMMDD_In)\n{\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n}", "public function birthdateAgeAgeRange($data){\n $valid = 1;\n $regx = \"/^[0-9]+$/\";\n $error = array();\n if(isset($data['birthdate']) && $data['birthdate']!=''){\n $format = array('Y-m-d','m/d/Y','m/d/y','d M Y','d M y','M d y','M d Y','d-m-Y','d-m-y','y-m-d','d/m/Y','d/m/y','d-M-Y','j-n-y','j-n-Y','j/n/y','j/n/Y','n/j/Y','n/j/y','y-n-j','Y-n-j','j n y','j n Y','n j y','n j Y','d/M/Y','j/M/Y');\n $validBirthDate = $this->validateDateTime($data['birthdate'],$format); \n if($validBirthDate['status']=='1'){\n $Y1 = date('Y',strtotime($validBirthDate['date']));\n $Y2 = date('Y', strtotime('-100 year'));\n $Y3 = date('Y');\n $error = ''; \n if($Y1 <= $Y3 && $Y1 >= $Y2){\n $birthdate = date('Y-m-d',strtotime($validBirthDate['date']));\n } else {\n $birthdate = $data['birthdate'];\n $valid = 0;\n $error[] = 'Invalid birthdate';\n } \n } else {\n $birthdate = $data['birthdate'];\n $valid = 0;\n $error[] = 'Invalid birthdate';\n }\n } else {\n $birthdate = '';\n }\n\n if(isset($data['age']) && $data['age']!=''){\n if(!preg_match($regx, $data['age'])){\n $valid = 0;\n $error[] = 'Invalid age';\n } else {\n if($data['age'] < 1 || $data['age'] > 100){\n $valid = 0;\n $error[] = 'Invalid age';\n }\n }\n }\n if($data['ageRange']!=''){\n $_ageRange = explode('-', $data['ageRange']);\n if(!preg_match($regx, $_ageRange[0]) && !preg_match($regx, $_ageRange[1])){\n $valid = 0;\n $error[] = 'Invalid age range';\n } else {\n if(($_ageRange[0] < 1 || $_ageRange[0] > 100) || ($_ageRange[1] < 2 || $_ageRange[1] > 100)){\n $valid = 0;\n $error[] = 'Invalid age range';\n }\n }\n }\n\n if($valid=='1'){\n $_campaigns = DB::table('campaigns')->where('id',$data['campaign_id'])->get(['id','criteria_age','parameter_required']); \n if(!empty($_campaigns[0])){\n $_parameterRequired = json_decode($_campaigns[0]->parameter_required);\n if(!empty($_parameterRequired)){\n if(isset($_parameterRequired->api)){\n $parameterRequired = $_parameterRequired->api;\n } else {\n $parameterRequired = $_parameterRequired->csv;\n }\n }\n if($_campaigns[0]->criteria_age!=''){\n $criteriaAge = explode('-', $_campaigns[0]->criteria_age);\n $dob=$birthdate;\n $actualAge = (date('Y') - date('Y',strtotime($dob)));\n if($data['ageRange']!=''){\n if($criteriaAge[0] != $_ageRange[0] || $criteriaAge[1] != $_ageRange[1]){\n $valid = 0;\n $error[] = \"Supplied Age Range doesn't match with Campaign Age Range\"; \n } else {\n if($data['age']!=''){\n if($data['age'] >= $criteriaAge[0] && $data['age'] <= $criteriaAge[1]){\n if($dob!=''){\n if($actualAge < $criteriaAge[0] || $actualAge > $criteriaAge[1]){\n $valid = 0;\n $error[] = 'Consumer does not qualify birthdate';\n } else {\n if($data['age']!=$actualAge){\n $valid = 0;\n $error[] = 'date of birth does not match with age provided';\n }\n }\n }\n } else {\n $valid = 0;\n $error[] = 'Consumer does not qualify age';\n }\n } else {\n if($dob!=''){\n if($actualAge < $criteriaAge[0] || $actualAge > $criteriaAge[1]){\n $valid = 0;\n $error[] = 'Consumer does not qualify birthdate';\n }\n }\n }\n }\n } else {\n if($data['age']!=''){\n if($data['age'] >= $criteriaAge[0] && $data['age'] <= $criteriaAge[1]){\n if($dob!=''){\n if($actualAge < $criteriaAge[0] || $actualAge > $criteriaAge[1]){\n $valid = 0;\n $error[] = 'Consumer does not qualify birthdate';\n } else {\n if($data['age']!=$actualAge){\n $valid = 0;\n $error[] = 'date of birth does not match with age provided';\n }\n }\n }\n } else {\n $valid = 0;\n $error[] = 'Consumer does not qualify age';\n }\n } else {\n if($dob!=''){\n if($actualAge < $criteriaAge[0] || $actualAge > $criteriaAge[1]){\n $valid = 0;\n $error[] = 'Consumer does not qualify birthdate';\n }\n }\n }\n }\n } else { \n if($data['ageRange']!='' && isset($data['ageRange'])){\n $dob=$birthdate;\n $actualAge = (date('Y') - date('Y',strtotime($dob)));\n $_ageRanges = explode('-', $data['ageRange']);\n if($data['age']!='' && isset($data['age'])){\n if($data['age'] >= $_ageRanges[0] && $data['age'] <= $_ageRanges[1]){\n if($dob!=''){\n if($actualAge < $_ageRanges[0] || $actualAge > $_ageRanges[1]){\n $valid = 0;\n $error[] = 'Consumer does not qualify birthdate';\n } else {\n if($data['age']!=$actualAge){\n $valid = 0;\n $error[] = 'date of birth does not match with age provided';\n }\n }\n }\n }else {\n $valid = 0;\n $error[] = 'Consumer does not qualify age';\n }\n } else {\n if($dob!=''){\n if($actualAge < $_ageRanges[0] || $actualAge > $_ageRanges[1]){\n $valid = 0;\n $error[] = 'Consumer does not qualify birthdate';\n }\n }\n } \n } else {\n $dob=$birthdate;\n $actualAge = (date('Y') - date('Y',strtotime($dob)));\n if($data['age']!='' && isset($data['age'])){\n if($data['age']!=$actualAge){\n $valid = 0;\n $error[] = 'date of birth does not match with age provided';\n }\n }\n }\n }\n }\n } \n return array('status'=>$valid,'birthdate'=>$birthdate,'error'=>$error);\n }", "public function validateBirthDate(string $date)\n {\n if (!trim($date) || (!DateTime::createFromFormat('d-m-Y', $date) && !DateTime::createFromFormat('Y-m-d', $date))) {\n return false;\n }\n\n return true;\n }", "public function testFormRegistrationWithInvalidBirthDate(){\n sleep(1);\n $this->driver->findElement(WebDriverBy::id('registration'))->click();//click button\n sleep(1);\n $this->fillForm('LGH','Jordan','Password0123','24-01-1996','ipdddddddes.lagache@gmail.com','M','');\n sleep(2);\n $this->driver->findElement(WebDriverBy::name('sub'))->click(); //click submit\n $error = (bool)$this->driver->findElement(WebDriverBy::id('err'));\n $this->assertTrue(!empty($error)); //error?\n sleep(5);\n // $this->quit();\n }", "function checkValidDate($d, $m, $y)\n{\n\tglobal $months , $monthLength;\n\tglobal $error;\n \n\t if($d > $monthLength[$m] )\n\t {\n\t\t \n\t\t if ($d == 29 and $m == 2 and checkLeapYear($y)){\n\t\t \t\t// Special case for leap years to use 29th Feb\n\t\t\t return true;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t \n\t\t\t $message = 'Date is not valid';\n\t\t\t $error->addFlag($message);\n\t\t\t return false;\n\t\t \t}\n\t }\treturn true;\n}", "function verifyDate($date, $add_doctor='') {\n\n // if date not in the format YYY-MM-DD\n if (!preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $date)) {\n\techo \"<p style='color: red;'>\" . \"<b>Error: Invalid Date</b>\" . \"</p>\";\n\treturn False;\n }\n\n // check if individual parts of date are valid\n $date_array = explode('-', $date);\n\n if (!empty($add_doctor)) { // if adding a doctor, check if their licence date is not above current year\n if ($date_array[0] > gmdate(\"Y\")){\n \techo \"<p style='color: red;'>\" . \"<b>Error: Invalid Date</b>\" . \"</p>\";\n \treturn False;\n }\n }\n\n if ($date_array[1] > 12) return False; // if month is greater than 12, then invalid date\n if ($date_array[2] > 31) return False; // if date is greater than 31, invalid date\n return True;\n}", "function checkForErrorInDate($date)\n{\n $errorMessage = NULL;\n\n if (empty($date)) {\n $errorMessage = 'You need to fill this field';\n }\n\n return $errorMessage;\n}", "public function isBirthday(): bool;", "function checkdate($month,$day,$year)\n{\n\treturn false;\n}", "function is_valid_date($month, $day, $year, $is_later_date)\r\n{\r\n // depending on the year, calculate the number of days in the month\r\n if ($year % 4 == 0) // LEAP YEAR \r\n $days_in_month = array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n else\r\n $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n\r\n\r\n // first, check the incoming month and year are valid. \r\n if (!$month || !$day || !$year) return false;\r\n if (1 > $month || $month > 12) return false;\r\n if ($year < 0) return false;\r\n if (1 > $day || $day > $days_in_month[$month-1]) return false;\r\n\r\n\r\n // if required, verify the incoming date is LATER than the current date.\r\n if ($is_later_date)\r\n { \r\n // get current date\r\n $today = date(\"U\");\r\n $date = mktime(0, 0, 0, $month, $day, $year);\r\n if ($date < $today)\r\n return false;\r\n }\r\n\r\n return true;\r\n}", "function ageValidate($dob, $min, $max){\n\tif($dob >= $min && $dob <= $max){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function setDateOfBirth($dob)\n {\n $this->dob = $dob;\n }", "public static function validatePersonalBirthdate()\n {\n return [\n new LengthValidator(null, 50),\n ];\n }", "public function setDob($dob) { $this->dob = $dob ; }", "public function chkIsCorrectDateSignup($day, $field='', $err_tip_empty='', $err_tip_invalid='')\n\t\t\t{\n\t\t\t\t$dodArray = explode('-', $day);\n\t\t\t\t$date = $dodArray[2];\n\t\t\t\t$month = $dodArray[1];\n\t\t\t\t$year = $dodArray[0];\n\t\t\t\tif (empty($field))\n\t\t\t\t {\n\t\t\t\t\t\t$this->fields_err_tip_arr[$field] = $err_tip_empty;\n\t\t\t\t\t\treturn false;\n\t\t\t\t }\n\t\t\t\tif (checkdate(intval($month), intval($date), intval($year)))\n\t\t\t\t {\n\t\t\t\t\t\t$dob = $year.'-'.$month.'-'.$date;\n\t\t\t\t\t\t$date_to_validation = date('Y')-$this->CFG['admin']['members_signup']['age_limit_start'];\n\t\t\t\t\t\tif($year>$date_to_validation)\n\t\t\t\t\t\t\t$age = $this->getAge($dob);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$age = date('Y')-$year;\n\t\t\t\t\t\tif ((date('m')-$month < 0) || (date('m')-$month == 0 && date('d')-$date < 0))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$age = $age - 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif($age<$this->CFG['admin']['members_signup']['age_limit_start'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->LANG['err_tip_age_min'] = str_replace('VAR_MIN_AGE', $this->CFG['admin']['members_signup']['age_limit_start'], $this->LANG['err_tip_age_min']);\n\t\t\t\t\t\t\t\t$this->fields_err_tip_arr[$field] = $this->LANG['err_tip_age_min'];\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif($age>$this->CFG['admin']['members_signup']['age_limit_end'])\n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t$this->LANG['err_tip_age_max'] = str_replace('VAR_MAX_AGE', $this->CFG['admin']['members_signup']['age_limit_end'], $this->LANG['err_tip_age_max']);\n\t\t\t\t\t\t\t\t$this->fields_err_tip_arr[$field] = $this->LANG['err_tip_age_max'];\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t $this->fields_arr[$field] = $dob;\n\t\t\t\t\t return true;\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->fields_err_tip_arr[$field] = $err_tip_invalid;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t}", "function bad_get_from_birth_date($year,$month,$day, \n $hour=0 , $minute = 0, $seconds = 0){\n $date1 = bad_render_time(\"$year-$month-$day\",\"Y-m-d\");\n $date2 = bad_time_now(\"Y-m-d\");\n $return[\"days\"] = bad_difference_in_days($date1, $date2,\"%a\");\n $return['year'] = floor($return['days'] / 365);\n $return['month'] = floor($return['days']/30);\n \n $hour_now = bad_time_now(\"H\");\n $return['hour'] = floor($return['days']*12)+$hour_now;\n \n $minutes_now = $hour_now*60 + bad_time_now(\"i\");\n $return['minute'] = floor($return['days']*12*60)+$minutes_now;\n \n $seconds_now = $minutes_now*60 + bad_time_now(\"s\");\n $return['second'] = floor($return['days']*12*60*60)+$seconds_now;\n return ($return);\n}", "function birthday ($birthday){\r\n list($year,$month,$day) = explode(\"-\",$birthday);\r\n $year_diff = date(\"Y\") - $year;\r\n $month_diff = date(\"m\") - $month;\r\n $day_diff = date(\"d\") - $day;\r\n if ($day_diff < 0 || $month_diff < 0)\r\n $year_diff--;\r\n return $year_diff;\r\n}", "function verify_datum($datum,&$d,&$m,&$y,&$timestamp) {\r\n $ymd= sql_date1($datum,1);\r\n $y=substr($ymd,0,4);\r\n $m=substr($ymd,5,2);\r\n $d=substr($ymd,8,2);\r\n $ok= checkdate($m,$d,$y);\r\n $timestamp= mktime(0,0,0,$m,$d,$y);\r\n return $ok;\r\n}", "function checkdate($month, $day, $year)\n{\n return false;\n}", "private function isDateMySqlFormat($date)\r\n {\r\n // Uses try catch statements to determine various conditions\r\n try {\r\n\r\n // Gets rid of whitespaces at beginning and end of string\r\n $date = trim($date);\r\n\r\n // Throw exception if nothing is passed (prevents same day date)\r\n if (!$date) {\r\n throw new \\Exception('No date passed to API.');\r\n }\r\n\r\n // Create date\r\n $date=date_create($date);\r\n\r\n // Throw exception if $date isn't in a date format\r\n if (!$date) {\r\n throw new \\Exception('Invalid date format. Use YYYY-MM-DD.');\r\n }\r\n\r\n // Error if DOB has year before\r\n $dateYear = date_format($date, 'Y');\r\n if ($dateYear < 1900) {\r\n throw new \\Exception('Invalid date of birth. Birth year must be after 1900.');\r\n }\r\n\r\n // Ensure date is in mySQL format NOTE: may switch month and day\r\n $date_return = date_format($date, 'Y-m-d');\r\n\r\n // Gets date 16 years ago for valid DOB - 16 years or older\r\n $maxDOB = strtotime(\"-16 year\", time());\r\n $maxDOB = date(\"Y-m-d\", $maxDOB);\r\n\r\n if ($date_return >= $maxDOB) {\r\n throw new \\Exception('Invalid date of birth. User must be at least 16 years old.');\r\n }\r\n\r\n // Returns formatted DOB if no errors thrown\r\n return $date_return;\r\n\r\n } catch (Exception $e) {\r\n\r\n $this->outputError(\"400\", \"error\", \"input failed\", $e->getMessage());\r\n\r\n }\r\n\r\n }", "public function setDateOfBirth($newDateOfBirth)\n\t{\n\t\t// zeroth, allow the date to be null if new object\n\t\tif($newDateOfBirth === null) {\n\t\t\t$this->dateOfBirth = null;\n\t\t\treturn;\n\t\t}\n\t\t// first, allow a DateTime object to be directly assigned\n\t\tif(gettype($newDateOfBirth) === \"object\" && get_class($newDateOfBirth) === \"DateTime\") {\n\t\t\t$this->dateOfBirth = $newDateOfBirth;\n\t\t\treturn;\n\t\t}\n\t\t// second, treat the date as a mySQL date string\n\t\t$newDateOfBirth = trim($newDateOfBirth);\n\t\tif((preg_match(\"/^(\\d{4})-(\\d{2})-(\\d{2})$/\", $newDateOfBirth, $matches)) !== 1) {\n\t\t\tthrow(new RangeException(\"$newDateOfBirth is not a valid date\"));\n\t\t}\n\t\t// third, verify the date is really a valid calendar date\n\t\t$year = intval($matches[1]);\n\t\t$month = intval($matches[2]);\n\t\t$day = intval($matches[3]);\n\t\tif(checkdate($month, $day, $year) === false) {\n\t\t\tthrow(new RangeException(\"$newDateOfBirth is not a Gregorian date\"));\n\t\t}\n\t\t// finally, take the date out of quarantine\n\t\t$newDateOfBirth = DateTime::createFromFormat(\"Y-m-d\", $newDateOfBirth);\n\t\t$newDateOfBirth->setTime(0, 0, 0);\n\t\t$this->dateOfBirth = $newDateOfBirth;\n\t}", "function year_validation($str) {\n // $str will be field value which post. will get auto and pass to function.\n $current_year = strtotime($str);\n $timestamp = strtotime('-18 years');\n\n if ($current_year > $timestamp) {\n $this->form_validation->set_message(\"year_validation\", $this->lang->line('invalid_dob'));\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function birth()\n\t{\n\t\tif ($this->isBirthInDay())\n\t\t{\n\t\t\t$this->LastBirthTime = time() ;\n if (date('dmY', $this->LastTimeViagra) != date('dmY', $_SERVER['REQUEST_TIME']))\n {\n $this->LastTimeViagra = 0;\n $this->ViagraUsed = 0;\n }\n\t\t\treturn true ;\n\t\t}\n\t\telse\n\t\treturn false ;\n\t}", "public function getBirthDate() {\n\t\t$date = $this->__get('birth_date');\n\t\tif($date === null)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn strtotime($date);\n\t}", "public function getBirthdate(): int|null;", "function verifier_input_date(&$erreur, $input){\n\t$err = '';\n\t$data = _request($input);\n\tif (!$data)\n\t\t$err = _T('etat_civil:info_obligatoire');\n\telse {\n\t\t$tab = recup_date($data);\n\t\tif(!checkdate($tab[1],$tab[2],$tab[0]) or !$tab)\n\t\t\t$err = _T('etat_civil:date_incorrecte');\n\t}\n\n\tif ($err) $erreur[$input] = $err;\n}", "public function test_validDate_PresentAndBadFormat_MM_DD_YYYY()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(\"03-30-2017\"),\n \"Validator :: validDate :: False when MM-DD-YYYY date format provided\");\n }", "function validDate($date){\n return 1;\n }", "function validateDateEn($date)\n{\n\techo \"Fecha \".$date;\n\tif ($date != \"\"){\n $pattern=\"/^((19|20)?[0-9]{2})[\\/|-](0?[1-9]|[1][012])[\\/|-](0?[1-9]|[12][0-9]|3[01])$/\";\n if(preg_match($pattern,$date)){\n return true;\n }else{\n\n return false;\n }\n }\n return true;\n\n}", "public function testcheckAgeByBirthdate()\n { \n $verificationModelMock = $this->getModelMock('postident/config', array(\n 'getMinAge'\n ));\n $verificationModelMock->expects($this->any())\n ->method('getMinAge')\n ->will($this->returnValue(18));\n $this->replaceByMock('model', 'postident/verification', $verificationModelMock);\n $this->assertTrue(Mage::getModel('postident/IdCard_Abstract')->checkAgeByBirthdate( \n '1980-05-10 00:00:00.0',\n '2010-05-10 00:00:00.0'\n ));\n $this->assertFalse(Mage::getModel('postident/IdCard_Abstract')->checkAgeByBirthdate( \n '1998-05-10 00:00:00.0',\n '1999-05-10 00:00:00.0'\n ));\n //assertion for 17y and 3xx days\n $this->assertFalse(Mage::getModel('postident/IdCard_Abstract')->checkAgeByBirthdate( \n '1980-01-01 00:00:00.0',\n '1997-12-31 00:00:00.0'\n ));\n //assertion for 18y and 1 day\n $this->assertTrue(Mage::getModel('postident/IdCard_Abstract')->checkAgeByBirthdate( \n '1980-01-01 00:00:00.0',\n '1998-01-02 00:00:00.0'\n ));\n }", "public function setDob($dob);", "function bad_daysLeftForBirthday($day_of_birthdate){\n list($y, $m, $d) = explode('-',$day_of_birthdate);\n $nowdate = mktime(0, 0, 0, date(\"m\"), date(\"d\"), date(\"Y\"));\n $nextbirthday = mktime(0,0,0,$m, $d, date(\"Y\"));\n\n if ($nextbirthday<$nowdate)\n $nextbirthday=$nextbirthday+(60*60*24*365);\n $daycount=intval(($nextbirthday-$nowdate)/(60*60*24));\n return $daycount;\n }", "function date_validate($strdate){\n if(strlen($strdate) == 8 && (substr($strdate,0,2) == 19 || substr($strdate,0,2) == 20 || substr($strdate,0,2) == 99)){\n $year = substr($strdate,0,4);\n $month = substr($strdate,4,2);\n $date = substr($strdate,6,2);\n if($year == 9999 || $year == '9999'){\n $year = 2035;\n }\n $datearr = array($month,$date,$year);\n } else {\n $pos1 = strpos($strdate,\"/\");\n $pos2 = strpos(substr($strdate,$pos1+1,3),\"/\");\n\n //The entered value is checked for proper Date format\n if((substr_count($strdate,\"/\"))<>2){\n return array(0,\"Enter the date in 'dd/mm/yyyy' format\");\n } else {\n $month = substr($strdate,0,($pos1));\n $result = preg_match(\"/^[0-9]+$/\",$month,$trashed);\n if(!($result)){\n } else {\n if(($month <= 0) || ($month > 12)){\n return array(0,\"Enter a Valid Month\");\n }\n }\n }\n $date = substr($strdate,$pos1+1,$pos2);\n if(($date <= 0) || ($date > 31)){\n return array(0,\"Enter a Valid Day\");\n } else {\n $result = preg_match(\"/^[0-9]+$/\",$date,$trashed);\n if(!($result)){\n return array(0,\"Enter a Valid Day\");\n }\n }\n $year = substr($strdate,($pos2 + $pos1 + 2),4);\n $result = preg_match(\"/^[0-9]+$/\",$year,$trashed);\n if(!($result)){\n echo \"Enter a Valid year\";\n } else {\n if(($year < 1900) || ($year > 2200)){\n return array(0,\"Enter a year between 1900-2200\");\n }\n }\n $datearr = array($month,$date,$year);\n }\n return array(1,$datearr);\n}", "public function calculatePatientAge($dob) {\n $dob = date('m/d/Y', strtotime($dob));\n if(empty($dob)){\n return '-';\n }\n $tz = new DateTimeZone('Europe/Brussels');\n $dt = DateTime::createFromFormat('d/m/Y', $dob, $tz);\n if(empty($dt)){\n return '-';\n }\n return $age = $dt->diff(new DateTime('now', $tz))->y;\n }", "function aplVerifyDate($date, $date_format)\n {\n $datetime=DateTime::createFromFormat($date_format, $date);\n $errors=DateTime::getLastErrors();\n if (!$datetime || !empty($errors['warning_count'])) //date was invalid\n {\n $date_check_ok=false;\n }\n else //everything OK\n {\n $date_check_ok=true;\n }\n\n return $date_check_ok;\n }", "function chk_age_more_55($emp_id) {\r\n $sql = 'select dob from employee where id=' . $emp_id . ' limit 1';\r\n $rs = mysql_query($sql);\r\n $row = mysql_fetch_array($rs);\r\n $dateOfBirth = date(\"Y-m-d\", strtotime($row['dob']));\r\n $yearOfDay = date(\"Y\");\r\n\r\n $yearOfBirth = substr($dateOfBirth, 0, 4);\r\n\t\r\n $age = $yearOfDay - $yearOfBirth;\r\n $year_diff = abs($age);\r\n\t\r\n if ($year_diff > 55) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "public function setDobAttribute($value) {\n $this->attributes['dob'] = Carbon::createFromFormat('m/d/Y', $value);\n Log::debug('date transformed for Employment model: \"' . $value . '\"');\n Log::debug('date is valid: ' . ($this->attributes['dob']->isValid() === true ? 'true' : 'false'));\n }", "function verify_date($sql_date)\n{\n $thn = substr($sql_date, 0, 4);\n $bln = substr($sql_date, 5, 2);\n $tgl = substr($sql_date, 8, 2);\n $bener = checkdate($bln, $tgl, $thn);\n return $bener;\n}", "function customer_date_field_process()\n {\n if (!$_POST['ia_datepicker_for_dob']) {\n wc_add_notice(__('<b>Billing Enter your age</b> is a required field'), 'error');\n return;\n }\n $currentCountry = wc_get_base_location();\n $currentState = $currentCountry['state'];\n $getAllAgeLimitToSetDefault = get_option('ia_configure_restriction');\n $defaultAgeLimit = $getAllAgeLimitToSetDefault[\"age_restriction\"]['Default'];\n $currentStateRistriction = get_option(\"ia_configure_restriction\", $defaultAgeLimit);\n $currentStateRistriction = $currentStateRistriction[$currentState];\n $currentStateRistriction = (int)$currentStateRistriction;\n $secondsInLimitedAge = $currentStateRistriction * 31556952;\n $date1 = $_POST['ia_datepicker_for_dob'];\n $date2 = date('Y-m-d');\n $diff = abs(strtotime($date2) - strtotime($date1));\n if ($diff < $secondsInLimitedAge) {\n wc_add_notice(__('<b>You are not eligibile for check out</b> '), 'error');\n return;\n }\n }", "function revisaFecha($dia,$mes,$anio){\n\tif (!checkdate($mes,$dia,$anio)) {\n\t\techo \"Fecha no aceptada\";\n\t\treturn \"Fecha no aceptada\";\n\t}\n}", "function validateDate($fd,$fm,$fy,$td,$tm,$ty){\n if($fy > $ty){ // Check if from year is bigger than to year\n return false;\n }\n\n if($fm > $tm){ // check months\n return false;\n }\n\n if($fd > $td){ // check days\n return false;\n }\n\n return true; // if dates are okay, then return true\n }", "public function test_validDate_PresentGoodFormatBadDate_NotClose()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(\"9999-99-99\"),\n \"Validator :: validDate :: False when invalid date provided in correct format 9999-99-99\");\n }", "function valid_date($date_in, $format = 'YMD') {\n$str_date = NULL;\n$separator = NULL;\n$date_array = array();\n$date_size = strlen($date_in);\n\tif ( ($date_size >= 6) && ($date_size <= 10) ) {\n\t\tfor ($i = 0; $i < $date_size; $i++) {\n\t\t\t$c_char = substr($date_in, $i, 1);\n\t\t\tif (!ctype_digit($c_char)) {\n\t\t\t\t$separator = $c_char;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n// trigger_error('separator is ' . $separator);\n\t\tif (!is_null($separator)) {\n\t\t\t$date_array = blowup($separator, $date_in);\n\t\t\t$date_parts = count($date_array);\n\t\t\tif ($date_parts == 3) {\n\t\t\t\tswitch($format) {\n\t\t\t\t\tcase 'YMD':\n\t\t\t\t\t$year = $date_array[0];\n\t\t\t\t\t$mon = $date_array[1];\n\t\t\t\t\t$day = $date_array[2];\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MDY':\n\t\t\t\t\t$year = $date_array[2];\n\t\t\t\t\t$mon = $date_array[0];\n\t\t\t\t\t$day = $date_array[1];\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'DMY':\n\t\t\t\t\t$year = $date_array[2];\n\t\t\t\t\t$mon = $date_array[1];\n\t\t\t\t\t$day = $date_array[0];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$year = str_pad($year, 2, '0', STR_PAD_LEFT);\n\t\t\t\tif ( strlen($year) != 4) {\n\t\t\t\t\t$year = '20' . $year;\n\t\t\t\t}\n\t\t\t\t$mon = str_pad($mon, 2, '0', STR_PAD_LEFT);\n\t\t\t\t$day = str_pad($day, 2, '0', STR_PAD_LEFT);\n\t\t\t\t$str_date = $day . '-' . $mon . '-' . $year;\n\t\t\t}\n\t\t}\n\t}\n\treturn $str_date;\n}", "function ageCalculator($dob)\n{\n\tif(!empty($dob))\n\t{\n\t\t$birthdate = new DateTime($dob);\n\t\t$today = new DateTime('today');\n\t\t$age = $birthdate->diff($today)->y;\n\t\treturn $age;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n}", "public function checkBirthday($birthdayJSON) {\r\n $birthday = json_decode(json_encode($birthdayJSON), false);\r\n if (!isset($birthday->day) || is_null($birthday->day) || !isset($birthday->month) || is_null($birthday->month) || !isset($birthday->year) || is_null($birthday->year))\r\n return false;\r\n if (strlen($birthday->day) && strlen($birthday->month) && strlen($birthday->year))\r\n return checkdate($birthday->month, $birthday->day, $birthday->year);\r\n else\r\n return true;\r\n }", "function validate_date($date) {\n $date = DateTime::createFromFormat(\"Y-m-d\", $date);\n return $date !== false && !array_sum($date::getLastErrors());\n}", "function testValidateEatByDate($dateToEvaluate){\n if(validateEatByDate($dateToEvaluate)==NULL){\n echo \"ERROR: PRECEDES CURRENT DATE.</P>\";\n } else {\n echo \"EAT BY DATE IS VALID</P>\";\n } \n }", "function isDateValid($date)\n{\n if ($date === \"Aucune\")\n return (false);\n else if ($date === \"1970-01-01\")\n return (false);\n else if ($date === \"0000-00-00\")\n return (false);\n return (true);\n}", "public function setDateOfBirth($dateOfBirth) {\r\n $this->dateOfBirth = $dateOfBirth;\r\n }", "function validateDate($date) {\n if ($date == '') {\n return true;\n }\n return preg_match('/^(0[1-9]|[12][0-9]|3[01])\\.(0[1-9]|1[012])\\.(19|20)\\d\\d$/', $date);\n}", "protected function calcBirth()\n {\n $birth = $this->getBirth();\n //random Datatime\n if ($birth === false) {\n $startDate = mktime(0, 0, 0, 1, 1, 1950);\n $year = date('Y');\n $month = date('m');\n $day = date('d');\n $endDate = mktime(0, 0, 0, $month, $day, $year);\n $birth = mt_rand($startDate, $endDate);\n $datetime = date('Ymd', $birth);\n } else {\n list($year, $month, $day) = explode('-', $birth);\n if (!checkdate($month, $day, $year)) {\n die('Invalided datetime');\n }\n $datetime = $year . $month . $day;\n }\n\n return $datetime;\n }", "public function displayBirthdate(){\n \n //1. on convertit la date en timestamp\n $timestamp = strtotime($this->dateOfBirth); //YYYY-MM-dd => timestamp\n\n //2. on construit notre date au format souhaité à partir du timestamp\n $dateFR = date(\"d/m/Y\", $timestamp);\n\n echo $dateFR;\n }", "function input_check($name, $email, $year, $month, $day, $sex, $terms) {\n $errors = array(); // associative array indexed with field names holding errors\n\n // name\n if (strlen($name) == 0) {\n $errors['name'] = \"Name is missing\";\n }\n elseif (strlen($name) < 3) {\n $errors['name'] = \"Invalid name\";\n }\n\n // email\n if (strlen($email) == 0) {\n $errors['email'] = \"Email is missing\";\n }\n elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $errors['email'] = \"Invalid email address\";\n }\n\n // date\n if (checkdate($month, $day, $year)) {\n // check whether there has been 5 years between now and the entered date\n $time_min = new DateTime(\"now\");\n $time_min->modify('-5 years');\n $time_reg = new DateTime();\n $time_reg->setDate($year, $month, $day);\n if ($time_reg >= $time_min) {\n $errors['date'] = \"You need to be minimum 5 years old\";\n }\n }\n else {\n $errors['date'] = \"Invalid date\";\n }\n\n // sex\n if (strlen($sex) == 0) {\n $errors['sex'] = \"Sex is missing\";\n }\n\n // terms\n if ($terms != 1) {\n $errors['terms'] = \"Terms and conditions must be accepted\";\n }\n\n return $errors;\n}", "function cal_age($birthdate) {\r\n $bday=date_create($birthdate);\r\n $today=date_create();\r\n $diff=date_diff($bday,$today);\r\n return $diff->y;\r\n}", "function validateAge($birthday, $age = 18)\n{\n if(is_string($birthday)) {\n $birthday = strtotime($birthday);\n }\n\n // check\n // 31536000 is the number of seconds in a 365 days year.\n if(time() - $birthday < $age * 31536000) {\n return false;\n }\n\n return true;\n}", "protected function validate_player_dob(array $infoArray) {\n if (($infoArray['dob_month'] != 0 && $infoArray['dob_day'] == 0) ||\n ($infoArray['dob_month'] == 0 && $infoArray['dob_day'] != 0)) {\n $this->set_message('DOB is incomplete.');\n return FALSE;\n }\n\n if ($infoArray['dob_month'] != 0 && $infoArray['dob_day'] != 0 &&\n !checkdate($infoArray['dob_month'], $infoArray['dob_day'], 4)) {\n $this->set_message('DOB is not a valid date.');\n return FALSE;\n }\n\n return TRUE;\n }", "public function testBirthday($someClass)\n {\n // Date is required (FALSE - dont have a @required option) \n $someClass->birthday = '';\n $result = Heimdall::validate($someClass);\n $this->assertTrue($result);\n\n // Date invalid option\n $someClass->birthday = '23-12-1990';\n $result = Heimdall::validate($someClass);\n $this->assertTrue(array_key_exists('type', $result['birthday']));\n\n // Date valid option\n $someClass->birthday = '23/12/1990';\n $result = Heimdall::validate($someClass);\n $this->assertTrue($result);\n }", "public function test_validDate_PresentGoodFormatBadDate_Close()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(\"2016-02-31\"),\n \"Validator :: validDate :: False when invalid date provided 2016-02-31\");\n }", "function getAge($birthdate)\n\t{\n\t\tlist($year, $month, $day) = explode(\"-\", $birthdate);\n\t\t$year_diff = date(\"Y\") - $year;\n \t$month_diff = date(\"m\") - $month;\n \t$day_diff = date(\"d\") - $day;\n \t\n \t// If the month-difference is smaller then 0, or is 0 with a smaller day-difference,\n \t// the user hasn't had his/her birthday this year yet.\n \tif($month_diff < 0) {\n \t\t$year_diff--;\n \t}\n \telse if($month_diff == 0 && $day_diff < 0) {\n \t\t$year_diff--;\n \t}\n \treturn $year_diff;\n\t}", "public function getBirthDate()\n {\n if (array_key_exists(\"birthDate\", $this->_propDict)) {\n if (is_a($this->_propDict[\"birthDate\"], \"\\DateTime\") || is_null($this->_propDict[\"birthDate\"])) {\n return $this->_propDict[\"birthDate\"];\n } else {\n $this->_propDict[\"birthDate\"] = new \\DateTime($this->_propDict[\"birthDate\"]);\n return $this->_propDict[\"birthDate\"];\n }\n }\n return null;\n }", "public function birthDate() {\n return $this->data->birth_date;\n }", "public function getBirthday()\r\r\n {\r\r\n $value = $this->getProperty('birthday');\r\r\n if ($value) {\r\r\n return new \\DateTime($value);\r\r\n }\r\r\n return null;\r\r\n }", "public function getDate_Birth()\r\n\t{\r\n\t\treturn $this->date_birth;\r\n\t}", "function v6_IsValidDate($date)\n{\n if (!isset($date) || $date == \"\") {\n return false;\n }\n if (strlen($date) <> 10) {\n return false;\n }\n $yyyy = substr($date, 0, 4);\n $mm = substr($date, 5, 2);\n $dd = substr($date, 8, 2);\n if ($dd != \"\" && $mm != \"\" && $yyyy != \"\") {\n return checkdate($mm, $dd, $yyyy);\n }\n return false;\n}", "function cp_isValid_date($day,$month,$year) {\r\n return (cp_intIsBetween($day,1,31) && \r\n cp_intIsBetween($month,1,12) && \r\n cp_intIsBetween($year,1900,2020));\r\n}", "public function getBirthday()\n {\n if (isset($this->_userInfo['birthday'])) {\n $this->_userInfo['birthday'] = str_replace('0000', date('Y'), $this->_userInfo['birthday']);\n $result = date('d.m.Y', strtotime($this->_userInfo['birthday']));\n } else {\n $result = null;\n }\n return $result;\n }", "function boj_validate_date( $date ) {\n // first test: pattern matching\n if( !preg_match( '!\\d{2}/\\d{2}/\\d{4}!', $date ) )\n return 'wrong pattern';\n \n // second test: is date valid?\n $timestamp = strtotime( $date );\n if( !$ timestamp )\n return 'date invalid';\n \n // third test: is the date from the past?\n if( $timestamp <= time() )\n return 'past date';\n\n // So far, so good\n return true;\n}", "function validate($date)\n\t{\n\t\treturn checkdate($date['F'], $date['d'], $date['Y']);\n\t}", "public function testUSLocalizedDateValidationRules()\n {\n $url = route('candidates.show', [$this->candidate->slug]);\n\n $this->inCountry('US')\n ->visit($url)\n ->type('30/1/1990', 'birthdate') // Incorrectly DD/MM/YYYY date\n ->press('Count My Vote');\n\n $this->see('Enter your birthdate in MM/DD/YYYY.');\n }", "public static function getDateOfBirthElement($yearFieldName, $monthFieldName, $dayFieldName, $defaultYear = null, $defaultMonth = null, $defaultDay = null, \n\t\t\t$errorMessage = null, $startAge = 0, $language = null, $label = null)\n\t{\n\t\t$days = array(\n\t\t\t'none' => Customweb_I18n_Translation::__('Day')\n\t\t);\n\t\tfor ($i = 1; $i <= 31; $i ++) {\n\t\t\t$days[($i < 10 ? '0' : '') . $i] = ($i < 10 ? '0' : '') . $i;\n\t\t}\n\t\t$dayControl = new Customweb_Form_Control_Select($dayFieldName, $days, $defaultDay);\n\t\t$dayControl->addValidator(new Customweb_Form_Validator_NotEmpty($dayControl, Customweb_I18n_Translation::__(\"Please select the day of your birth.\")));\n\t\t\n\t\t$months = self::getMonthArray();\n\t\t$monthControl = new Customweb_Form_Control_Select($monthFieldName, $months, $defaultMonth);\n\t\t$monthControl->addValidator(new Customweb_Form_Validator_NotEmpty($monthControl, Customweb_I18n_Translation::__(\"Please select the month of your birth.\")));\n\t\t\n\t\t$years = array(\n\t\t\t'none' => Customweb_I18n_Translation::__('Year')\n\t\t);\n\t\t$current = intval(date('Y')) - $startAge;\n\t\tfor ($i = 0; $i < 100; $i ++) {\n\t\t\t$years[$current] = $current;\n\t\t\t$current --;\n\t\t}\n\t\t$yearControl = new Customweb_Form_Control_Select($yearFieldName, $years, $defaultYear);\n\t\t$yearControl->addValidator(new Customweb_Form_Validator_NotEmpty($yearControl, Customweb_I18n_Translation::__(\"Please select the the year of your birth.\")));\n\t\t\n\t\t\n\t\tif ($language == null) {\n\t\t\t$language = Customweb_Core_Language::resolveCurrentLanguage();\n\t\t}\n\t\t// We have to consider the current language to determine which order we should choose of the controls.\n\t\t$format = Customweb_Core_Util_DateFormat::byLanguage($language);\n\t\t$controls = array();\n\t\tforeach ($format->getFormat() as $item) {\n\t\t\tif ($item == 'year') {\n\t\t\t\t$controls[] = $yearControl;\n\t\t\t}\n\t\t\telse if ($item == 'month') {\n\t\t\t\t$controls[] = $monthControl;\n\t\t\t}\n\t\t\telse if ($item == 'day') {\n\t\t\t\t$controls[] = $dayControl;\n\t\t\t}\n\t\t}\n\t\t$control = new Customweb_Form_Control_MultiControl('date_of_birth', $controls);\n\t\t\n\t\tif($label === null) {\n\t\t\t$label = Customweb_I18n_Translation::__('Date of Birth');\n\t\t}\n\t\t$element = new Customweb_Form_Element($label, $control, Customweb_I18n_Translation::__('Select the date of your birth.'));\n\t\t$element->setElementIntention(Customweb_Form_Intention_Factory::getDateOfBirthIntention())->setErrorMessage($errorMessage);\n\t\t\n\t\treturn $element;\n\t}", "function validate_date_picker_field($field)\n {\n }", "function age($s) {\n list($y, $m, $d) = explode('-', $s->birthdate, 3);\n $alreadyPassed = (sprintf('%02d%02d', $m, $d) > date('dm') ? 0 : 1);\n return date('Y') - $y + $alreadyPassed;\n}", "function mf_validate_date($value) {\r\n\t\tglobal $mf_lang;\r\n\r\n\t\t$error_message = $mf_lang['val_date'];\r\n\t\t\r\n\t\tif(!empty($value[0])){\r\n\t\t\tif($value[1] == 'yyyy/mm/dd'){\r\n\t\t\t\t$regex = \"/^([1-9][0-9])\\d\\d[-\\/](0?[1-9]|1[012])[-\\/](0?[1-9]|[12][0-9]|3[01])$/\";\r\n\t\t\t}elseif($value[1] == 'mm/dd/yyyy'){\r\n\t\t\t\t$regex = \"/^(0[1-9]|1[012])[-\\/](0[1-9]|[12][0-9]|3[01])[-\\/](19|20)\\d\\d$/\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$result = preg_match($regex, $value[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(empty($result)){\r\n\t\t\treturn sprintf($error_message,'%s',$value[1]);\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "function valid_date($date){\n\t$error = false;\n\t// trim date\n\t$valid_date = trim($date);\n\t// perfect format, return valid_date\n\tif( preg_match('/^\\d\\d-\\d\\d-\\d\\d\\d\\d$/', $valid_date) ){ // valid\n\t\treturn $valid_date;\n\t\n\t// else, validate...\n\t// split numbers by non-number-chars, and pad each to desired length\n\t}elseif( preg_match('/^\\d\\d?[^a-zA-Z0-9]\\d\\d?[^a-zA-Z0-9]\\d\\d\\d?\\d?$/', $valid_date) ){\n\t\t$date_pieces = preg_split('/[^a-zA-Z0-9]+/', $valid_date);\n\t\tif( count($date_pieces) !== 3 ){\n\t\t\t$error = true;\n\t\t}else{\n\t\t\t$day = str_pad($date_pieces[0], 2, \"0\", STR_PAD_LEFT);\n\t\t\t$month = str_pad($date_pieces[1], 2, \"0\", STR_PAD_LEFT);\n\t\t\t$year = str_pad($date_pieces[2], 4, \"20\", STR_PAD_LEFT);\n\t\t\tif($day < 32 && $day > 0 && $month < 13 && $month > 0 && $year > 1){\n\t\t\t\t$valid_date = $day.'-'.$month.'-'.$year;\n\t\t\t}else{\n\t\t\t\t$error = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}else{\n\t\t$error = true;\n\t}\n\tif( $error ){\n\t\treturn false;\n\t}else{\n\t\t//echo '<pre>'.__FUNCTION__.' => '.$valid_date.'</pre>';\n\t\treturn $valid_date;\n\t}\n}", "public function getBirthdate() \n\t{\n\t\treturn $this->birthdate;\n\t}", "function validatorDate($date){\n\t$format = 'Y-m-d';\n\n\tif(DateTime::createFromFormat($format, $date) == false){\n\t\treturn false;\n\t}\n\telse\n\t\treturn true;\n}", "function getAge($birthdate){\n\t$token=\"-./ \";\n\t$p1 = strtok($birthdate,$token);\n\t$p2 = strtok($token);\n\t$p3 = strtok($token);\n\t$currentDate = getdate();\n\t$currentyear = $currentDate[year];\n\t$currentday = $currentDate[mday];\n\t$currentmonth = $currentDate[mon];\n\t$age = $currentyear-$p1; //calculate age\n\tif ($currentmonth < $p2){\n\t\t//Birthdate has not passed yet\n\t\t$age--;\n\t} else if ($currentyear == $p2 && $currentday<$p3){\n\t\t$age--;\n\t}\n\treturn $age;\n}" ]
[ "0.76914334", "0.75910413", "0.7574657", "0.73620164", "0.7343922", "0.7304664", "0.7281899", "0.7038945", "0.69888216", "0.69083166", "0.6872496", "0.6864057", "0.6864057", "0.68343335", "0.6752715", "0.66908395", "0.6634313", "0.65908635", "0.65752274", "0.6553136", "0.6545496", "0.6518192", "0.6518192", "0.6518192", "0.651256", "0.65112287", "0.6445356", "0.6437675", "0.6430788", "0.6382342", "0.6321049", "0.63126814", "0.6303655", "0.6293173", "0.62898284", "0.62853295", "0.6254956", "0.62501633", "0.6243146", "0.6215479", "0.62136024", "0.62059945", "0.6194882", "0.6188411", "0.61878854", "0.6179549", "0.6160756", "0.61583734", "0.6156961", "0.61566925", "0.61540437", "0.6149924", "0.6146244", "0.6136736", "0.61303777", "0.6129413", "0.6108674", "0.6093174", "0.60862404", "0.60846466", "0.60830224", "0.6070402", "0.60574895", "0.6053684", "0.60393465", "0.60370326", "0.6034942", "0.6033375", "0.602321", "0.6009009", "0.6007288", "0.60046273", "0.60027647", "0.6002407", "0.5996741", "0.59749866", "0.596841", "0.5967581", "0.5948752", "0.594773", "0.594747", "0.59465283", "0.5935762", "0.5932041", "0.5929437", "0.59283566", "0.592029", "0.59195495", "0.59192765", "0.591358", "0.5909878", "0.5904695", "0.5901407", "0.59008425", "0.5882498", "0.5878116", "0.58650756", "0.586011", "0.58576906", "0.58562976" ]
0.77715945
0
below function checks the gender receives the pointer to the variable that should capture errors related to the gender
ниже функция проверяет пол, получает указатель на переменную, которая должна захватывать ошибки, связанные с полом
function validateGender($gender, &$errorsGender, &$db){ $cleanedGender = cleanInput($gender); if(strcmp($gender, $cleanedGender) !== 0){ $errorsGender['invalidGender'] = 'Trying to hack our website, aren\'t you?'; return false; } return true; // if valid }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check_gender () {\n\t}", "function isValidGender(&$gender)\n{\n switch ($gender)\n {\n case 'female':\n $gender = 1;\n return true;\n case 'male':\n $gender = 2;\n return true;\n case 'other':\n $gender = 3;\n return true;\n case 'pnta':\n $gender = 4;\n return true;\n default: // improper gender received\n return false;\n }\n}", "public function validarGender(){\n\t\t\t//si el campo esta vacio\n\t\t\tif (empty($this->gender)) {\n \t\t$this->genderErr = \"Gender is required\";\n \t\t} else {\n \t\t$gender = test_input($this->gender);\n \t\t}\n\t\t}", "function checkGender($data){\n if(empty($data)){\n $genderErr = \"Gender Required...!\";\n }\n return $genderErr;\n }", "function validateGender(&$errors, $field_list, $gender, $errorname) {\n\tif(!isset($field_list[$gender])) {\n\t\t$errors[$errorname] = '<br/> *Gender not selected*';\n\t}\n}", "function validateGender(&$errors, $field_list, $field_name) {\r\n\tif (!isset($field_list[$field_name])) {\r\n\t\t$errors[$field_name] = \"Please choose a Gender\";\r\n\t}\r\n}", "public function getGenderErr(){\n\t\t\treturn $this->genderErr;\n\t\t}", "public function genderValidation($title,$firstName,$lastName,$countryCode,$gender){\n if($gender=='' && $title!=''){\n if(strtolower($title)=='mr'){\n $_gender = 'Male'; \n } else {\n $_gender = 'Female';\n }\n $_fname = $firstName;\n $_lname = $lastName;\n $_countryCode = $countryCode;\n } else if($gender == '') {\n $_firstName = preg_replace('/[^a-zA-Z ]/', '', $firstName);\n $_lastName = preg_replace('/[^a-zA-Z ]/', '', $lastName);\n if($countryCode=='UK'){\n $_countryCodes = 'GB';\n } else {\n $_countryCodes = $countryCode;\n }\n\n $url = \"https://gender-api.com/get?key=BTvunEepSkbLZULazE&split=\".$_firstName.' '.$_lastName.\"&country=\".$_countryCodes;\n $client = new Client();\n $res = $client->get($url);\n $result = $res->getBody();\n $_result = json_decode($result);\n if($_result->gender=='unknown'){\n $_gender = $gender; \n } else if($_result->gender=='') {\n $_gender = $gender;\n } else {\n $_gender = $_result->gender;\n }\n if(isset($_result->first_name) && $_result->first_name !=''){\n $_fname = $_result->first_name;\n } else {\n $_fname = $firstName;\n }\n\n if(isset($_result->last_name) && $_result->last_name !='' && $_result->last_name != $firstName){\n $_lname = $_result->last_name;\n } else {\n $_lname = $lastName;\n }\n $_countryCode = $countryCode;\n } else {\n $_gender = $gender;\n $_fname = $firstName;\n $_lname = $lastName;\n $_countryCode = $countryCode;\n }\n return array('firstName'=>ucwords($_fname),'lastName'=>ucwords($_lname),'gender'=>ucwords($_gender),'countryCode'=>ucwords($_countryCode));\n }", "public static function validate_gender($name, &$errorVal, &$isValid, &$value){\n if (empty($_POST[$name])){\n $errorVal = \"Please Select your gender!\";\n $isValid = 0;\n }else {\n $value = user::validate_input($_POST[$name]);\n if ($value == \"male\"){\n $value = 1;\n }elseif($value == \"female\"){\n $value = 0;\n }\n $isValid = 1;\n }\n }", "function validGender($gender)\r\n {\r\n $validGender = $this->_dataLayer->getGender();\r\n return in_array($gender, $validGender);\r\n }", "public function setGender($parameter_gender){\n\t\t\tif (empty($parameter_gender)) {\n \t\t$this->genderErr = \"Gender is required\";\n \t\t} else {\n \t\t$this->gender = $this->test_input($parameter_gender);\n \t\t}\n\t\t}", "function check_sex($sex)\r\n\t\t\t{\r\n\t\t\t\tif($sex == \"male\")\r\n\t\t\t\t\t$sex = \"He\";\r\n\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\t$sex = \"She\";\r\n\t\t\t\t\t\r\n\t\t\t\treturn $sex;\t\r\n\t\t\t}", "function checkSelectedSex($selectedSex){\n $strError=\"\";\n if($selectedSex==\"0\"){\n $strError=\"Fill your sex.\";\n }\n return $strError;\n }", "function detectInputError()\n {\n global $name,$phone,$books,$gender; \n \n // For holding error messages.\n $error = array();\n \n // gender\n if ($gender == null)\n {\n $error['gender'] = 'Unisex? Please select your <strong>gender</strong>.';\n }\n // EXTRA: To prevent hacks.\n else if (!preg_match('/^[MF]$/', $gender))\n {\n $error['gender'] = '<strong>Gender</strong> can only be either M or F.';\n }\n \n // name\n if ($name == null)\n {\n $error['name'] = 'Nameless? Please enter your <strong>name</strong>.';\n }\n // EXTRA: To prevent hacks.\n else if (strlen($name) > 30)\n {\n $error['name'] = 'Your <strong>name</strong> is too long. It must be less than 30 characters.';\n }\n else if (!preg_match('/^[A-Za-z @,\\'\\.\\-\\/]+$/', $name))\n {\n $error['name'] = 'There are invalid characters in your <strong>name</strong>.';\n }\n \n // phone\n if ($phone == null)\n {\n $error['phone'] = 'Please enter your <strong>mobile phone</strong> number.';\n }\n // EXTRA: To prevent hacks.\n else if (!preg_match('/^01\\d-\\d{7}$/', $phone))\n {\n $error['phone'] = 'Your <strong>mobile phone</strong> number is invalid. Format: 999-9999999 and starts with 01.';\n }\n \n // clubs\n if ($books == null)\n {\n $error['books'] = 'Please select <strong>event</strong> that you want to booking.';\n }\n else if (count($books) > 1)\n {\n $error['books'] = 'You cannot select more than 1 <strong>event</strong>.';\n }\n // EXTRA: To prevent hacks.\n else if (array_diff($books, array_keys(getbooks())) != null)\n {\n $error['books'] = 'You have selected invalid <strong>event</strong>.';\n }\n \n if ($gender != null && $books != null)\n {\n if ($gender == 'M' && in_array('LD', $books))\n {\n \n }\n else if ($gender == 'F' && in_array('GT', $books))\n {\n \n }\n }\n return $error;\n }", "public function validate_gender(){\n\t\t$this->db->where(array(\n\t\t\t'gender_name'\t\t=>\t\t$this->input->post('gender_name'),\n\t\t\t'InActive'\t\t\t=>\t\t0\n\t\t));\n\t\t$query = $this->db->get(\"gender\");\n\t\tif($query->num_rows() > 0){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function checkGender($gender) {\n return in_array($gender, ['Male', 'Female']);\n }", "public function setGender($data){\n if(!is_string($data) && $data != 'Male' || $data == 'Female'){\n throw new Exception('Gender is not valid, you can only enter \"Male\" or \"Female\"!');\n }\n $this->gender = $data;\n }", "public function testGender($someClass)\n {\n // Gender is required\n $someClass->gender = '';\n $result = Heimdall::validate($someClass);\n $this->assertTrue(array_key_exists('required', $result['gender']));\n\n // Gender invalid option\n $someClass->gender = 'P';\n $result = Heimdall::validate($someClass);\n $this->assertTrue(array_key_exists('type', $result['gender']));\n\n // Gender valid option\n $someClass->gender = 'M';\n $result = Heimdall::validate($someClass);\n $this->assertTrue($result);\n }", "function getGender($userid) {\r\n return NULL;\r\n }", "public function checkGender($gender){\n\t\t\t$gender = strtolower($gender);\n\t\t\tif($gender == 'm' || $gender == 'f' || $gender == 'altro'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function gender()\n {\n return $this->validateSet($this->struct['Gender'], func_get_args(), array('M', 'F'));\n }", "public static function validatePersonalGender()\n {\n return [\n new LengthValidator(null, 1),\n ];\n }", "public static function isGenderValid($value) {\n if(strcasecmp($value, \"male\") == 0 || strcasecmp($value, \"female\") == 0) {\n return true;\n } else {\n return false;\n }\n }", "function getGender($userid) {\n\treturn NULL;\n }", "function getGender($userid){\r\n\t\treturn NULL;\r\n \t}", "public static function isGenderValid($gender) {\r\n\t\t\r\n\t\treturn $gender >= 0 && $gender <= 2;\r\n\t}", "public function male_or_female($gender=null) \n\t{\n\t\tswitch ($gender) {\n\t\t\tcase 'M':\n\t\t\tcase 'male':\n\t\t\t\t$gender = \"male\";\n\t\t\t\tbreak;\n\t\t\tcase 'F':\n\t\t\tcase 'female':\n\t\t\t\t$gender = \"female\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit('No valid gender value was passed to male_or_female()');\n\t\t}\n\t\treturn $gender;\n\t}", "function convert_gender($gender) {\n\treturn ($gender == 'f') ? 1 : 0;\n}", "function sc_pof_gender() {\n\n\t\t$pofgender = (isset($_GET['g'])) ? (($_GET['g'] == 'bhwdd') ? 'Female' : 'Male') : 'N/A';\n\n\t\treturn $pofgender;\n\t\t\n\t}", "public function gender($strGender = NULL) {\n\t\t\tif (!is_null($strGender)) {\n\t\t\t\t$this->strGender = $strGender; \n\t\t\t\treturn TRUE; \n\t\t\t}\n\t\t\tif (is_null($this->strGender)) $this->load();\n\t\t\treturn ($this->visible4me(\"gender\")) ? $this->strGender : \"\"; \n\t\t}", "function set_gender($gender){\n\tswitch($gender){\n\t\tcase 'B':\n\t\t\t$r = 'BOYS';\n\t\t\tbreak;\n\t\tcase 'G':\n\t\t\t$r = 'GIRLS';\n\t\t\tbreak;\n\t\tcase 'M':\n\t\t\t$r = 'MEN';\n\t\t\tbreak;\n\t\tcase 'W':\n\t\t\t$r = 'WOMEN';\n\t\t\tbreak;\n\t}\n\treturn $r;\n}", "private function checkSex($sex) {\r\n switch ($sex) {\r\n case \"M\" : return true;\r\n break;\r\n case \"F\" : return true;\r\n break;\r\n case \"ND\" : return true;\r\n break;\r\n default : return false;\r\n }\r\n }", "public function setGender($newGender) {\n\t\t// sanitize the Gender as a likely Gender identifier\n\t\t$newGender = trim($newGender);\n\t\tif(($newGender = filter_var($newGender, FILTER_SANITIZE_STRING)) == false) {\n\t\t\tthrow(new UnexpectedValueException(\"gender $newGender does not appear to be a gender\"));\n\t\t}\n\t\t//then just take the Gender out of quarantine\n\t\t$this->gender = $newGender;\n\t}", "public function testFaceDetectGender()\n {\n }", "public function testGetGenderFromSalutationReturnsFemaleWhenProvidedSalutationKeyIsMrs(): void\n {\n $customerId = $this->createCustomer($this->context);\n $customer = $this->getCustomer($customerId, $this->context);\n $customer->getSalutation()->setSalutationKey('mrs');\n $checkoutHelper = $this->getContainer()->get(CheckoutHelper::class);\n $result = $checkoutHelper->getGenderFromSalutation($customer);\n $this->assertEquals('female', $result);\n }", "public function setGender($gender)\r\n {\r\n if(preg_match('/^Male|Female$/',$gender)) {\r\n $this->gender = $gender;\r\n } else {\r\n $this->gender = null;\r\n }\r\n }", "public function isMaleValid()\n {\n return (null == $this->male)||\n ((null != $this->male)&&($this->male->getGenotype() !== false))||\n ((null != $this->male)&&(!empty($this->maleName)));\n }", "static public function gender($input)\n {\n $names = explode(' ', $input);\n $name = (strlen($names[0]) < 4 && isset($names[1]))\n ? $names[1]\n : $names[0];\n\n $name = strtr($name, 'áéíóú', 'aeiou'); // Funciona mejor sin acentos\n $gender = trim(shell_exec('python scripts/gender_detector.py ' . ucfirst($name)));\n\n switch ($gender) {\n case 'MALE':\n case 'MOSTLY_MALE':\n case 'ANDY': // Desconocido\n $gender = 'MASCULINO';\n break;\n\n case 'FEMALE':\n case 'MOSTLY_FEMALE':\n $gender = 'FEMENINO';\n break;\n }\n\n return $gender;\n }", "public function is_male() {\n\t\tif ($this->clean['gender'] == \"M\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function getgender(){\n\t\treturn $this->_gender;\n\t}", "public function isValidGender ($gender) {\r\n $acceptableGenders = ['M', 'Male', 'F', 'Female', 'U', 'Undefined'];\r\n return in_array($gender, $acceptableGenders);\r\n }", "private function getDefinedGender($gender)\n {\n if ( !in_array( $gender, $this->avatar->getCategories() ) ) {\n\n return $this->app->abort( 404, \"There is no picture for the \\\"{$gender}\\\" category.\" );\n }\n\n return $this->avatar\n ->init()\n ->{$gender}();\n\n }", "public function gender($gender) {\n $gender = \"<img src=\\\"../icons/user\".$this->gender_array[$gender][1].\".png\\\" alt=\\\"\".$this->gender_array[$gender][0].\"\\\" title=\\\"\".$this->gender_array[$gender][0].\"\\\" />\";\n return $gender;\n }", "public function isMaleValid()\n {\n return ! (($this->getMale() instanceof CrossVial)&&(trim($this->getMaleName()) == \"\"));\n }", "public function getUserSex()\n {\n if (isset($this->userInfo['sex'])) {\n // gender is specified\n return $this->userInfo['sex'] == 1 ? 'female' : 'male';\n }\n\n return null;\n }", "public function setGender(string $gender);", "public function setGender($gender) { $this->gender = $gender ; }", "public function testGetGenderFromSalutationReturnsMaleWhenProvidedSalutationKeyIsMr(): void\n {\n $customerId = $this->createCustomer($this->context);\n $customer = $this->getCustomer($customerId, $this->context);\n $customer->getSalutation()->setSalutationKey('mr');\n $checkoutHelper = $this->getContainer()->get(CheckoutHelper::class);\n $result = $checkoutHelper->getGenderFromSalutation($customer);\n $this->assertEquals('male', $result);\n }", "public function set_Gender($userID, $gender){\r\n //Call the setName method\r\n $result= $this->setGender($userID, $gender);\r\n \r\n if($result){\r\n echo \"<br>Successfull changed gender!<br>\";\r\n return true;\r\n }else{\r\n echo \"<br>Error changing gender<br>\";\r\n return false;\r\n }\r\n }", "public function testDetectGenderModifier() {\n $string = 'guardswoman 💂‍♀️';\n $emoji = Emoji\\detect_emoji($string);\n $this->assertEquals(1, count($emoji));\n $this->assertEquals('female-guard', $emoji[0]['short_name']);\n }", "public function getGender() : string;", "public function setGender(string $gender): void;", "public function getGender($gender) {\n \n $gender = strtolower(trim($gender));\n\n if (is_numeric($gender)) {\n if ($gender == Gender::MALE) {\n return Gender::MALE;\n } else if ($gender == Gender::FEMALE) {\n return Gender::FEMALE;\n }\n\n return Gender::UNKNOWN;\n } else {\n if ($gender == \"männlich\" || $gender == \"m\" || $gender == \"mm\") {\n return Gender::MALE;\n } else if ($gender == \"weiblich\" || $gender == \"f\") {\n return Gender::FEMALE;\n }\n \n $this->LOGGER->debug(\"Could not identify gender: \".$gender);\n\n return Gender::UNKNOWN;\n }\n }", "public function get_gender()\n {\n return $this->_gender;\n }", "public function testGetGenderFromSalutationReturnsNullWhenProvidedSalutationKeyIsNull(): void\n {\n $customerId = $this->createCustomer($this->context);\n $customer = $this->getCustomer($customerId, $this->context);\n $customer->getSalutation()->setSalutationKey('');\n $checkoutHelper = $this->getContainer()->get(CheckoutHelper::class);\n $result = $checkoutHelper->getGenderFromSalutation($customer);\n $this->assertNull($result);\n }", "private function validatePlayer($firstName, $name, $gender, $isYouth, $isVeteran, $ranking, $errors){\n if (!isset($firstName) || trim($firstName) === ''){\n $errors[] = \"Voornaam moet ingevuld zijn.\"; \n }\n if (!isset($name) || trim($name) === ''){\n $errors[] = \"Naam moet ingevuld zijn.\"; \n }\n if (!is_bool($isYouth)){\n $errors[] = \"Jeugd is niet ingevuld.\"; \n }\n if (!is_bool($isVeteran)){\n $errors[] = \"Veteraan is niet ingevuld.\"; \n }\n if(!in_array($gender, $this->playerRepository->getPossibleGenders())){\n $errors[] = \"Onbekend geslacht\"; \n }\n if(!in_array($ranking, $this->playerRepository->getPossibleRankings())){\n $errors[] = \"Onbekende ranking\"; \n }\n\n return $errors;\n }", "public function set_user_gender(){\n\t\t$gender = $this->HrLeave->Home->findById($this->Session->read('USER.Login.id'), array('fields' => 'Home.gender'));\n\t\treturn $gender['Home']['gender'];\n\t\t\n\t}", "public function setGender($value)\n {\n if($value == 'm' || $value == 'f') {\n $value = strtoupper($value);\n }\n\n if(!$value != 'M' && $value != 'F') {\n throw new InvalidParameterException('Invalid value on gender');\n }\n\n return $this->setParameter('gender', $value);\n }", "public function getGender()\n {\n # code...\n }", "function validate2($county_id, $date, $female_less_18, $female_above_18){\r\n if($county_id === \"\"){\r\n return \"Wrong file format.\\n\"; //wrong format\r\n }\r\n if($date !== \"\"){\r\n if($female_less_18 === \"\" && $female_above_18 === \"\"){\r\n return \"Aggregates are empty.\\n\"; //empty aggregate\r\n }\r\n }else if($female_less_18 !== \"\" || $female_above_18 !== \"\"){\r\n return \"Date is empty.\\n\";\r\n }\r\n return \"\";\r\n}", "public function is_female() {\n\t\tif ($this->clean['gender'] == \"F\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function handle(Request $request, Closure $next)\n {\n if($request->gender && ($request->gender == 'female' || $request->gender == 'f') ){\n return redirect('error');\n }\n return $next($request);\n }", "function validar_sexo($tSex)\n\t{\n\t\tif($tSex=='M' || $tSex=='F')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\t$this->form_validation->set_message('validar_sexo','Sexo incorrecto');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function validate_registration ($nickname, $password, $password2, $email, $year, $month, $day) {\n $errors = array();\n \n //the first entry in the error array is reserved for a returned ID of a successful registration\n $errors[] = -1;\n \n \n if (!valid_nickname($nickname)) {\n //$errors[] = USERNAME_ERROR();\n $errors['username'] = 'Please enter a valid username';\n }\n\n\n if (!valid_password($password) || $password != $password2) { \n //$errors[] = PASSWORD_ERROR();\n $errors['password'] = 'Please enter a valid password';\n }\n\n\n \n if (!valid_email($email)) {\n //$errors[] = EMAIL_ERROR();\n $errors['email'] = 'Please enter a valid email';\n }\n\n //if ($email != $email2) {\n //$errors[] = EMAIL_NO_MATCH_ERROR();\n //$errors['email2'] = 'Emails must match';\n //}\n\n if (user_exists($email, $nickname)) {\n //$errors[] = USER_EXISTS_ERROR();\n $errors['user_exists'] = 'This user already exists';\n }\n\n $birthday = $year . \"-\" . $month . \"-\" . $day; \n\n if (!(strtotime($birthday))) {\n //$errors[] = DATE_ERROR();\n $errors['strtotime'] = 'There was an error storing your birthday. Please try again later';\n }\n elseif ((int)(calculate_age(substr((string)$birthday, 0, 10))) < 18) {\n \n \n //echo substr((string)$birthday, 0, 10) . '<br>';\n //echo (int)(calculate_age(substr((string)$birthday, 0, 10)));\n //die();\n //$errors[] = UNDERAGE_ERROR();\n $errors['underage'] = 'You must be at least 18 to join Starma.com';\n }\n \n return $errors;\n \n}", "public function getGender (){\n return $this->gender;\n }", "public function getGender(): ?EducationGender {\n $val = $this->getBackingStore()->get('gender');\n if (is_null($val) || $val instanceof EducationGender) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'gender'\");\n }", "public function testDetectGenderModifier() {\n $string = 'guardswoman 💂‍♀️';\n $emoji = detect_emoji($string);\n $this->assertCount(1, $emoji);\n $this->assertSame('female-guard', $emoji[0]['short_name']);\n $this->assertSame(12, $emoji[0]['grapheme_offset']);\n $this->assertSame(12, $emoji[0]['byte_offset']);\n }", "public function validateSex($sex){\n if ($sex == self::MALE_SEX || $sex == self::FEMALE_SEX || $sex == self::OTHER_SEX) {\n return true;\n } else {\n return false;\n }\n }", "function input_check($name, $email, $year, $month, $day, $sex, $terms) {\n $errors = array(); // associative array indexed with field names holding errors\n\n // name\n if (strlen($name) == 0) {\n $errors['name'] = \"Name is missing\";\n }\n elseif (strlen($name) < 3) {\n $errors['name'] = \"Invalid name\";\n }\n\n // email\n if (strlen($email) == 0) {\n $errors['email'] = \"Email is missing\";\n }\n elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $errors['email'] = \"Invalid email address\";\n }\n\n // date\n if (checkdate($month, $day, $year)) {\n // check whether there has been 5 years between now and the entered date\n $time_min = new DateTime(\"now\");\n $time_min->modify('-5 years');\n $time_reg = new DateTime();\n $time_reg->setDate($year, $month, $day);\n if ($time_reg >= $time_min) {\n $errors['date'] = \"You need to be minimum 5 years old\";\n }\n }\n else {\n $errors['date'] = \"Invalid date\";\n }\n\n // sex\n if (strlen($sex) == 0) {\n $errors['sex'] = \"Sex is missing\";\n }\n\n // terms\n if ($terms != 1) {\n $errors['terms'] = \"Terms and conditions must be accepted\";\n }\n\n return $errors;\n}", "public function getGender(){\n\t\treturn $this->gender;\n\t}", "public function testGetGenderFromSalutationReturnsNullWhenProvidedSalutationKeyIsStringOthers(): void\n {\n $customerId = $this->createCustomer($this->context);\n $customer = $this->getCustomer($customerId, $this->context);\n $customer->getSalutation()->setSalutationKey('others');\n $checkoutHelper = $this->getContainer()->get(CheckoutHelper::class);\n $result = $checkoutHelper->getGenderFromSalutation($customer);\n $this->assertNull($result);\n }", "public function getGender()\n {\n return self::GENDER_TYPE_ARRAY[$this->gender];\n }", "function error_check($value, $param, &$error, $error_msg, &$name, &$valid) {\n\t\n\t\t// Check for invalid characters\n\t\tif (!preg_match($param, $value)) {\n\t\t\t$error = $error_msg;\n\t\t\t$name = \"\";\n\t\t\t$valid = false;\n\t\t}// if\n\n\t}", "public function getGender()\r\r\n {\r\r\n return $this->getProperty('gender');\r\r\n }", "public function __invoke($gender)\n\t{\t\n\t\t$return=\"\";\n\t\tswitch($gender){\n\t\tcase \"male\":\n\t\t\t$return = \"Mr.\";\n\t\t\tbreak;\n\t\tcase \"female\":\n\t\t\t$return = \"Ms.\";\n\t\t\tbreak;\n\t\t}\n\t\treturn $return;\n\t}", "function validregister()\n{\n //Array to take in errors\n //$errorMessages = [];\n global $fname_error, $lname_error, $date_error, $email_error, $phone_error, $password_error, $gender_error, $is_ok;\n global $fname, $lname, $email, $dob, $gender, $tel;\n\n\n //Validating first name\n if (!isset($_POST['firstname']) || $_POST['firstname'] === '') {\n $fname_error = \"The fist name shouldn't be empty\";\n $is_ok = false;\n } else if (!preg_match('/^[A-Za-z]*$/', $_POST['firstname'])) {\n $fname_error = \"DO not include any symbol in the first name\";\n $is_ok = false;\n } else {\n $fname = format_data($_REQUEST['firstname']);\n }\n\n\n //Validating Last name\n if (!isset($_POST['lastname']) || $_POST['lastname'] === '') {\n $lname_error = \"The last name shouldn't be empty\";\n $is_ok = false;\n } else if (!preg_match('/^[A-Za-z]*$/', $_POST['lastname'])) {\n $lname_error = \"DO not include any symbol in the last name\";\n $is_ok = false;\n } else {\n $lname = format_data($_REQUEST['lastname']);\n }\n\n\n //Validating date\n if (!isset($_POST['date_of_birth']) || $_POST['date_of_birth'] === '') {\n $date_error = \"Please select date\";\n $is_ok = false;\n } else {\n $dob = format_data($_REQUEST['date_of_birth']);\n }\n\n\n //Validating Email\n if (!isset($_POST['email']) || $_POST['email'] === '') {\n $email_error = \"Your email field shouldn't be empty\";\n $is_ok = false;\n } else if (!preg_match('/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/', $_POST['email'])) {\n $email_error = \"Your email is not right\";\n $is_ok = false;\n } else {\n $email = format_data($_REQUEST['email']);\n }\n\n //Validating the password\n if (!isset($_POST['password']) || $_POST['password'] === '') {\n $password_error = \"The password shouldn't be empty\";\n $is_ok = false;\n } else if (!(preg_match('/^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{8,16}$/', $_POST['password'])) || (strlen($_POST['password'])) < 6) {\n $password_error = \"Make sure you have Caps, Lowercase, numbers and a symbol in you password\";\n $is_ok = false;\n } else {\n $pwdhash = password_hash(format_data($_REQUEST['password']), PASSWORD_DEFAULT);\n }\n\n //Validating gender\n if (!isset($_POST['gender']) || $_POST['gender'] === '' || $_POST['gender'] == 'gender') {\n $gender_error = \"Please select atleast one gender\";\n $is_ok = false;\n } else {\n $gender = format_data($_REQUEST['gender']);\n }\n\n if (!isset($_POST['tel']) || $_POST['tel'] === '') {\n $phone_error = 'Please provide a correct phone number';\n $is_ok = false;\n } else {\n $tel = format_data($_REQUEST['tel']);\n }\n\n //user name exits\n if ($is_ok) {\n if (checkemail($email)) {\n registernewuser($fname, $lname, $email, $pwdhash, $dob, $gender, $tel);\n }\n }\n\n}", "public function setGender ($gender)\n\t{\n\t\t$this->gender = $gender;\n\t}", "public function findGender($id)\n {\n $sql=\"SELECT GENDER FROM newjs.JPROFILE WHERE PROFILEID='$id'\";\n $res=mysql_query_decide($sql) or logError($sql);\n $row=mysql_fetch_array($res);\n return $row[\"GENDER\"];\n }", "public function get_gender()\r\n {\r\n return $this->mpersistent->get_value(\"Gender\");\r\n }", "function id7($gender, $age) {\n if ($gender=='man' AND $age>=18)\n {\n echo 'You are a man and you are an adult <br>';\n }\n elseif ($gender=='man' AND $age<18)\n {\n echo 'You are a man and you are a minor <br>'; \n }\n elseif ($gender=='woman' AND $age>=18)\n {\n echo 'You are a woman and you are an adult <br>';\n }\n elseif ($gender=='woman' AND $age<18)\n {\n echo 'You are a man and you are an adult <br>';\n }\n}", "public function testGetGender()\n {\n\n }", "public function getGender()\n {\n return $this->getField('sex');\n }", "private function getGenderFromIdentity($identity) {\n $gender = (int) substr($identity, 6, 1);\n return ($gender >= 0 && $gender <= 4) ? 'Female' : 'Male';\n }", "public function setGender($gender)\r\n {\r\n $this->_gender = $gender;\r\n }", "public function getGender(){ return $this->gender; }", "public function testGetGenderFromSalutationReturnsNullWhenProvidedSalutationKeyIsStringTwo(): void\n {\n $customerId = $this->createCustomer($this->context);\n $customer = $this->getCustomer($customerId, $this->context);\n $customer->getSalutation()->setSalutationKey('2');\n $checkoutHelper = $this->getContainer()->get(CheckoutHelper::class);\n $result = $checkoutHelper->getGenderFromSalutation($customer);\n $this->assertNull($result);\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n }", "public function setGender($gender)\n {\n $this->gender = $gender;\n }", "public function getGender() \n\t{\n\t\treturn $this->gender;\n\t}", "public function unit_gender($building, $unit) {\n $sql = \"SELECT * FROM room_assignments WHERE dormitory_id= $building AND unit= $unit\";\n $student_ids = $this->db->get($sql);\n if(isset($student_ids['id'])){\n $student = (object) (new Student())->find($student_ids['student_id']);\n return $student->gender;\n }\n $students = (new Student())->find($this->pluck('student_id',$student_ids));\n $gender = array_unique($this->pluck('gender',$students));\n if(count($gender) > 1){\n throw new RuntimeException('Only one gender allowed in unit ');\n }\n return $gender[0];\n }", "private function getGender(): string\n {\n return strtoupper($this->baseItem->gender[0]);\n }", "public function getGenderName(){\n return $this->gender == 0 ? yii::t('backend\\modules\\customer','Female') : yii::t('backend\\modules\\customer','Male');\n }", "function getGender()\r\n {\r\n return array(\"female\", \"male\");\r\n }", "public function getGender(){\n\t\t\treturn $this->gender;\n\t\t}", "protected function castGender(string $gender): void\n {\n // Sanitizes and checks supplied value.\n $genderValue = Str::create($gender)->toLower()->toUpperFirst();\n\n if (!(\n $genderValue->equals('Male') ||\n $genderValue->equals('Female') ||\n $genderValue->equals('Other')\n )) {\n throw UnexpectedEntityValueException::withName('$gender');\n }\n\n $this->gender = $genderValue;\n }", "function setSex($sexToken = null)\n\t{\n\t\t$availableSex = $this->getSexes();\n\t\tif ($sexToken == null || !in_array($sexToken, $availableSex)) {\n\t\t\t// Nach Prozentsatz setzen\n\t\t\t$percentageMale = $this->getPercentageMale();\n\t\t\t$randomNumber = rand(0, 1) * 100;\n\t\t\tif ($randomNumber > $percentageMale) {\n\t\t\t\t// weiblich\n\t\t\t\t$sexToken = $availableSex['female'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// männlich\n\t\t\t\t$sexToken = $availableSex['male'];\n\t\t\t}\n\t\t}\n\t\t$this->_sex = $sexToken;\n\t}", "public function setGender($gender) {\n\t\t$this->gender = $gender;\n\t}", "public function setGender($gender) {\n\t\t$this->gender = $gender;\n\t}", "public function getGender()\n\t{\n\t\treturn $this->gender;\n\t}", "public function getGender()\n\t{\n\t\treturn $this->gender;\n\t}" ]
[ "0.8079292", "0.77491736", "0.76410383", "0.76338667", "0.7442705", "0.7115827", "0.7031553", "0.70151144", "0.6954415", "0.6896186", "0.68728375", "0.68045276", "0.67891014", "0.6752879", "0.66244197", "0.64510196", "0.63518584", "0.6327934", "0.6242487", "0.62324333", "0.62120247", "0.6154068", "0.614674", "0.61437154", "0.6143484", "0.6137603", "0.61237204", "0.6104547", "0.6071583", "0.6047538", "0.6022437", "0.5918293", "0.591588", "0.5905744", "0.5885723", "0.5882765", "0.58762634", "0.5829532", "0.57928675", "0.5782396", "0.57330686", "0.5732399", "0.57309955", "0.57288325", "0.57282853", "0.57281095", "0.5720903", "0.5719631", "0.5695924", "0.5687619", "0.56758106", "0.56500614", "0.5634518", "0.56216234", "0.5619402", "0.56112427", "0.5598372", "0.5594045", "0.5586118", "0.5579812", "0.5558033", "0.55575085", "0.5549688", "0.55495244", "0.5545502", "0.553368", "0.5519391", "0.5509874", "0.54593724", "0.54519594", "0.5446331", "0.54452163", "0.5427093", "0.54259217", "0.54215777", "0.54208267", "0.5416443", "0.54033184", "0.5398621", "0.53963804", "0.53696", "0.53673697", "0.536278", "0.5359401", "0.5357471", "0.53443795", "0.5336918", "0.5336918", "0.5321039", "0.53063405", "0.52916217", "0.5287721", "0.52874756", "0.52864873", "0.52843547", "0.5278675", "0.5267828", "0.5267828", "0.52676", "0.52676" ]
0.78913295
1
Get the results of the relationship.
Получите результаты отношения.
public function getResults() { return ! is_null($this->parent->{$this->foreignKey}) ? $this->get() : $this->related->newCollection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function results()\n\t{\n\t\treturn $this->hasMany( Result::class );\n\t}", "public function results()\n {\n return $this->hasMany('App\\Result');\n }", "public function results()\n {\n return $this->hasMany('App\\Result');\n }", "public function results()\n {\n return $this->hasMany('App\\Result');\n }", "public function results()\n {\n return $this->all();\n }", "public function getResults()\n {\n return $this->getQuery()->getResult();\n }", "public function getResults()\n {\n return $this->query->get();\n }", "public function getResults()\n {\n return $this->query->get();\n }", "public function getResults()\n {\n return $this->query->get();\n }", "public function getResults()\n {\n return $this->query->get();\n }", "public function getResults()\r\n {\r\n return $this->query->get();\r\n }", "public function getRelations() {}", "public function get_results()\n\t{\n\t\treturn $this->getResults();\n\t}", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }" ]
[ "0.75248265", "0.7376699", "0.7376699", "0.7376699", "0.7102293", "0.7074116", "0.70504665", "0.70504665", "0.70504665", "0.70504665", "0.70372486", "0.70111734", "0.6841588", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367", "0.67756367" ]
0.78630346
0
Create a person and return the person's ID
Создайте человека и верните идентификатор человека
protected function createPerson() { $response = $this->client->post('/platform/tree/persons', [ 'body' => new \Gedcomx\Extensions\FamilySearch\FamilySearchPlatform($this->personData()) ]); return $response->headers['X-ENTITY-ID']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_person($person_data) {\n $person_id = $this->model->insert($person_data);\n return $person_id;\n }", "public function person_create($person_name, $face_id = '', $group_name = '') {\r\n\t\t$param ['person_name'] = $person_name;\r\n\t\tempty ( $face_id ) || $param ['face_id'] = $face_id;\r\n\t\tempty ( $group_name ) || $param ['group_name'] = $group_name;\r\n\t\t\r\n\t\treturn $this->call ( \"person/create\", $param );\r\n\t}", "function add_person($params)\n {\n\t\t$params['password'] = $this->hash($params['password']);\n $this->db->insert('person',$params);\n return $this->db->insert_id();\n }", "function create_person($id = false){\n return new GoSquaredPerson($this, $id);\n }", "public function createPerson() {\n $personType = $_POST[\"status\"];\n\n $dbc = DB::withConfig();\n \n $ok = true;\n error_log($personType);\n if($personType == \"student\") {\n $dao = new StudentDAO($dbc);\n // TODO have a better security for the password\n $person = new Student(null, $_POST[\"firstName\"] . ' ' . $_POST[\"lastName\"], \n $_POST[\"mail\"], $this->hashPass($_POST[\"password\"]), \n $_POST[\"year\"]);\n } else if($personType == \"teacher\") {\n error_log(\"Teacher\");\n $dao = new TeacherDAO($dbc);\n $person = new Teacher(null, $_POST[\"firstName\"] . ' ' . $_POST[\"lastName\"], \n $_POST[\"mail\"], $this->hashPass($_POST[\"password\"]), \n $_POST[\"speciality\"]);\n } else {\n // new type of person?\n $ok = false;\n error_log(\"none\");\n }\n \n if( $ok == true) {\n $ok = $dao->insert($person);\n }\n\n $data = array( \"ok\" => $ok);\n $this->view->setData($data);\n }", "public function action_new() {\n $person = new Person($this->paramsToAttributes(\n 'first_name', 'last_name', 'address', 'address_2', 'city', 'state', 'zipcode', 'ssn', 'phone'));\n $person->company_id = $this->company->id;\n $person->save();\n return array('personId' => $person->id);\n }", "public function postCreatePerson(PersonDTO $person)\n {\n // `position`, `column_9`, `company_name`, `id_person_type`, `total`)\n // VALUES (NULL, 'ASD', 'ASD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);\n\n $name = $person->getName();\n $last_name = $person->getLastName();\n $email = $person->getEmail();\n $document = $person->getDocumentNumber();\n $phone = $person->getPhoneNumer();\n $city = $person->getCity();\n $total = $person->getTotal();\n $documentType = $person->getIdDocumentType();\n $position = $person->getPosition();\n $id_person_type = $person->getIdPersonType();\n $company_name = $person->getCompanyName();\n $invitado = $person->getInvitado();\n $centro = $person->getCentro();\n $codigo_estudiante = $person->getCodigoEstudiante();\n $findPerson = $this->getPersonDocumentNumber($document, $email);\n if (count($findPerson) == 0) {\n $sql = \"INSERT INTO person (name,last_name,email,document_number,phone_number,city,total, id_document_type, position,id_person_type,company_name,guest,centro, codigo_estudiante) \n VALUES('$name','$last_name','$email','$document','$phone','$city','$total','$documentType','$position','$id_person_type','$company_name','$invitado', '$centro', '$codigo_estudiante')\";\n\n try {\n $this->db->executeInstruction($sql);\n $last_id = $this->db->getConnect()->insert_id;\n return [\"error\" => \"false\", \"message\" => \"Se registro el estudiante exitosamente!\", \"id\"=> $last_id];\n } catch (Exception $e) {\n return [\"error\" => \"true\", \"message\" => \"Error en el Servidor\"];\n }\n } else {\n return [\"error\" => \"true\", \"message\" => \"Error ya se encuentra registrado el Correo o Dni.\"];\n }\n }", "public function postCreateRepresentante(PersonDTO $person)\n {\n // `position`, `column_9`, `company_name`, `id_person_type`, `total`)\n // VALUES (NULL, 'ASD', 'ASD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);\n\n $name = $person->getName();\n $last_name = $person->getLastName();\n $email = $person->getEmail();\n $document = $person->getDocumentNumber();\n $phone = $person->getPhoneNumer();\n $city = $person->getCity();\n $total = $person->getTotal();\n $documentType = $person->getIdDocumentType();\n $position = $person->getPosition();\n $id_person_type = $person->getIdPersonType();\n $company_name = $person->getCompanyName();\n $invitado = $person->getInvitado();\n $centro = $person->getCentro();\n $codigo_estudiante = $person->getCodigoEstudiante();\n $sql = \"INSERT INTO person (name,last_name,email,document_number,phone_number,city,total, id_document_type, position,id_person_type,company_name,guest,centro, codigo_estudiante) \n VALUES('$name','$last_name','$email','$document','$phone','$city','$total','$documentType','$position','$id_person_type','$company_name','$invitado', '$centro', '$codigo_estudiante')\";\n\n try {\n $this->db->executeInstruction($sql);\n $last_id = $this->db->getConnect()->insert_id;\n return [\"error\" => \"false\", \"message\" => \"Se registro el estudiante exitosamente!\", \"id\"=> $last_id];\n } catch (Exception $e) {\n return [\"error\" => \"true\", \"message\" => \"Error al registrar!\"];\n }\n }", "public function CreatePerson($new_record_info=\"\"){\n\t\t \n\t\t //Array of the possible fields (True = required, false = not required)\n\t\t $array_expected_fields = array(\n\t\t\t'firstname' => true,\n\t\t\t'lastname' => true,\n\t\t\t'email' => true,\n\t\t\t'specialty' => \"None\",\n\t\t\t'priority' => 9,\n\t\t\t'notes' => \"\"\n\t\t );\n\t\t \n\t\t //Define final arary\n\t\t $final_array = array();\n\t\t \n\t\t //Iterate the array of required variables\n\t\t foreach($array_expected_fields as $field_name=>$dvalue){\n\t\t\t \n\t\t\t /*\n\t\t\t * Determine if this is a required field\n\t\t\t */\n\t\t\t if($dvalue === true && $new_record_info[$field_name] == \"\"){\n\t\t\t\t \n\t\t\t\t //This is required, but no value is present\n\t\t\t\t $this->last_error = \"Field `{$field_name}` is required but blank\";\n\t\t\t\t return false;\n\t\t\t\t \n\t\t\t }\t\n\t\t\t \n\t\t\t /*\n\t\t\t * Check if blank, and a default is required\n\t\t\t */\t \n\t\t\t if($new_record_info[$field_name] == \"\"){\n\t\t\t\t\n\t\t\t\t//Assign the default value\n\t\t\t\t$new_record_info[$field_name] = $dvalue;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t //Add to final array\n\t\t\t $final_array[$field_name] = $new_record_info[$field_name];\n\t\t\t \n\t\t }\n\t\t \n\t\t /*\n\t\t * Craete insertion query\n\t\t */\n\t\t $insert_people_query = $this->dbl->CreateInsertQuery('people', $final_array, true);\n \n //Execute SQL QUery\n $this->dbl->ExecuteQuery($insert_people_query);\n \n //If numweic return the ID\n if( is_numeric( $this->dbl->InsertID() ) ){\n\t \n\t //Give back the number\n\t return $this->dbl->InsertID();\n\t \n }else{\n\t \n\t //Return false\n\t $this->last_error = \"No Insert ID Provided by DB, Insertion Failed\";\n\t return false;\n\t \n }\n\t\t \n\t }", "function add_persona($params)\n {\n $this->db->insert('persona',$params);\n return $this->db->insert_id();\n }", "public function create()\n {\n $stmt = $this->pdo->prepare('\n insert into Genders (Name)\n values (:name)\n ');\n $stmt->execute(['name' => $this->name]);\n $this->id = $this->pdo->lastInsertId();\n }", "public function create()\n {\n // save to database\n // redirect as appropriate\n /*$person = $_POST['person'];\n if (personmodel::create($person))\n {\n setflash(\"Person created\");\n }\n else\n {\n setflash(\"Could not create person\");\n }*/\n setflash(\"Dummy create method\");\n $this->redirect('/person/list');\n }", "public function register(RegistrationRequest $person)\n {\n $this->first_name = $person->input('first_name');\n $this->last_name = $person->input('last_name');\n $this->email_address = $person->input('email_address');\n $this->contact_number = $person->input('contact_number');\n /*\n $this->passport_number = $person->input('passport_number');\n $this->national_id = $person->input('national_id');*/\n $this->save();\n\n\n // limtation\n\n //\n $anon = new Anonymous;\n // pass new user id over to anon\n $anon->createAnonymousID($this->id,$this->email_address);\n \n \n \n //DEBUG STUFF\n //var_dump($this->id);\n //\n //createAnonymousID($this->id);\n }", "function insertNewPerson($surname, $firstnames, $formername, $neename, $alsoknownas, $deathdate, $birthdate,\r\n $age, $agemeasure, $cityid, $formercityid, $regionid, $countryid,\r\n $charityid, $funeralhomeid, $otherinfo) {\r\n $db = $this->_db;\r\n $surname = $db->escape($surname);\r\n $firstnames = $db->escape($firstnames);\r\n $formername = $db->escape($formername);\r\n $neename = $db->escape($neename);\r\n $alsoknownas = $db->escape($alsoknownas);\r\n $deathdate = $db->escape($deathdate);\r\n $birthdate = $db->escape($birthdate);\r\n $age = intval($age);\r\n $agemeasure = $db->escape($agemeasure);\r\n $cityid = intval($cityid);\r\n $formercityid = intval($formercityid);\r\n $regionid = intval($regionid);\r\n $countryid = intval($countryid);\r\n $charityid = intval($charityid);\r\n $funeralhomeid = intval($funeralhomeid);\r\n $otherinfo = $db->escape($otherinfo);\r\n $addedon = gmdate(\"Y-m-j H:i:s\", time() + 3600*12);\r\n $sql = <<< EOT\r\n INSERT INTO\r\n Person(\r\n Surname, FirstNames, FormerName, NeeName, AlsoKnownAs, DeathDate, BirthDate, \r\n Age, AgeMeasure, CityTownID, FormerCityTownID, RegionID, CountryID, \r\n CharityID, FuneralHomeID, OtherInfo, AddedOn\r\n )\r\n VALUES (\r\n '$surname', '$firstnames', '$formername', '$neename', '$alsoknownas', '$deathdate', '$birthdate', \r\n '$age', '$agemeasure', $cityid, $formercityid, $regionid, $countryid,\r\n $charityid, $funeralhomeid, '$otherinfo', '$addedon'\r\n )\r\n\r\nEOT;\r\n $db->query($sql);\r\n return $db->insertID();\r\n }", "function add()\n\t{\n\t\tglobal $cmn;\n\t\t$strquery='INSERT INTO '.DB_PREFIX.'contact_person SET\n\t\t\t\t\tclient_id\t\t= \\''.$this->client_id.'\\',\n\t\t\t\t\tfull_name\t\t= \\''.$this->full_name.'\\',\n\t\t\t\t\temail\t\t\t= \\''.$this->email.'\\',\n\t\t\t\t\toffice_phone\t\t\t= \\''.$this->office_phone.'\\',\n\t\t\t\t\tmobile\t\t= \\''.$this->mobile.'\\',\n\t\t\t\t\tfax\t\t= \\''.$this->fax.'\\',\n\t\t\t\t\tcreated_date= NOW(),\n\t\t\t\t\tcreated_by\t= \\''.$cmn->get_session(ADMIN_USER_ID).'\\',\n\t\t\t\t\tstatus\t\t= \\'active\\'';\n\t\t\t\t\t\n\t\tmysql_query($strquery) or die(mysql_error());\n\t\t$this->id = mysql_insert_id();\n\t\treturn mysql_insert_id();\n\t}", "public function insert($persona);", "public function create()\n {\n return app(PersonController::class)->create();\n }", "public function create() {\n\n $lastId = parent::create();\n if ($lastId != NULL) {\n //RECALCULAR EL PRESUPUESTO\n $this->getIDPsto()->save();\n }\n return $lastId;\n }", "public function store(PersonCreateRequest $request) {\n $person = $this->personService->create($request->getPerson());\n return response()->json($person);\n }", "private function create_person()\n {\n # create the person object\n $person = new midgard_person();\n $person->firstname = 'firstname';\n $person->lastname = 'lastname';\n\n if ( ! $person->create() )\n {\n $error = midgard_connection::get_instance()->get_error_string();\n $this->mvc->log(__CLASS__, \"Failed to create midgard person: \" . $error, 'error');\n return false;\n }\n else\n {\n $this->mvc->log(__CLASS__, \"Created midgard person: \" . $person->guid, 'info');\n\n $user = new midgard_user();\n $user->login = 'username_' . time();\n $user->password = '';\n $user->usertype = 1;\n\n $user->authtype = 'LDAP';\n $user->active = true;\n $user->set_person($person);\n\n if ( ! $user->create() )\n {\n $error = midgard_connection::get_instance()->get_error_string();\n $this->mvc->log(__CLASS__, \"Failed to create midgard user: \" . $error, 'error');\n }\n\n $this->mvc->log(__CLASS__, \"Created midgard user: \" . $user->login, 'info');\n }\n\n return $person;\n }", "function add_company_contact_person($params)\n {\n $this->db->insert('company_contact_person',$params);\n return $this->db->insert_id();\n }", "public function getPersonId()\n\t{\n\t\treturn $this->person['id'];\n\t}", "public function createNewPet($name, $gender, $type, $nature, $user) {\n $time = date('Y-m-d H:i:s');\n $addQuery = 'INSERT INTO pet (pet_name, pet_gender, pet_type, pet_nature, pet_reg, owner_id) \n VALUES (:name, :gender, :type, :nature, :reg, :user)';\n $addStmt = $this->db->prepare($addQuery);\n $addStmt->bindValue(':name', $name, PDO::PARAM_STR);\n $addStmt->bindValue(':gender', $gender, PDO::PARAM_INT);\n $addStmt->bindValue(':type', $type, PDO::PARAM_INT);\n $addStmt->bindValue(':nature', $nature, PDO::PARAM_INT);\n $addStmt->bindValue(':reg', $time);\n $addStmt->bindValue(':user', $user, PDO::PARAM_INT);\n $addStmt->execute();\n return $this->db->lastInsertId();\n }", "public function addPerson($data) {\n $data = request()->except(['_token']);\n $getCompanyID = DB::table('company')\n ->select('company.id')\n ->where('company.name', '=', $data['company'])\n ->get();\n\n return DB::table('Person')\n ->insert(['name' => $data['p_name'],\n 'adress' => $data['p_adress'],\n 'phone' => $data['p_phone'],\n 'email' => $data['p_email'],\n 'company_id' => $getCompanyID[0]->id,\n 'user_id' => $data['user_id'],\n 'date_of_birth' => $data['date']\n ]);\n }", "public function createPersona(){ \n \n $sql = \"INSERT INTO persona(nombres,apellidos,fecha_nac,dui) VALUES(?,?,?,?)\";\n #se guardan los parametros (datos recogidos) en una variable,como un arreglo\n $params = array($this->nombre,$this->apellido,$this->fecha_n,$this->dui);\n #Retorna el estado que devuelve el metodo executeRow \n return Database::executeRow($sql, $params);\n }", "public function insert($persona){\r\n\t\t$sql = 'INSERT INTO personas (usuario, correo, rut, identificador_moodle, rol_moodle, id, nombre, apellido) VALUES (?, ?, ?, ?, ?, ?, ?, ?)';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\r\n\t\t$sqlQuery->set($persona->usuario);\r\n\t\t$sqlQuery->set($persona->correo);\r\n\t\t$sqlQuery->set($persona->rut);\r\n\t\t$sqlQuery->set($persona->identificadorMoodle);\r\n\t\t$sqlQuery->set($persona->rolMoodle);\r\n\r\n\t\t\r\n\t\t$sqlQuery->setNumber($persona->id);\r\n\r\n\t\t$sqlQuery->setNumber($persona->nombre);\r\n\r\n\t\t$sqlQuery->setNumber($persona->apellido);\r\n\r\n\t\t$this->executeInsert($sqlQuery);\t\r\n\t\t//$persona->id = $id;\r\n\t\t//return $id;\r\n\t}", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"persona\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $persona = new Persona();\n $persona->persona_id = $this->request->getPost(\"persona_id\");\r\n $persona->nombres = $this->request->getPost(\"nombres\");\r\n $persona->apellidos = $this->request->getPost(\"apellidos\");\r\n $persona->dni = $this->request->getPost(\"dni\");\r\n $persona->direccion = $this->request->getPost(\"direccion\");\r\n $persona->fecha_nacimiento = $this->request->getPost(\"fecha_nacimiento\");\r\n $persona->telefono_fijo = $this->request->getPost(\"telefono_fijo\");\r\n $persona->telefono_movil = $this->request->getPost(\"telefono_movil\");\r\n $persona->estado_civil = $this->request->getPost(\"estado_civil\");\r\n $persona->activo = $this->request->getPost(\"activo\");\r\n $persona->fecha_creacion = $this->request->getPost(\"fecha_creacion\");\r\n $persona->usuario_creacion = $this->request->getPost(\"usuario_creacion\");\r\n \n\n if (!$persona->save()) {\n foreach ($persona->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"persona\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"persona was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"persona\",\n 'action' => 'index'\n ]);\n }", "function add_contact_person($contact_params)\n \n {\n $this->db->insert('contact_person',$contact_params);\n return $this->db->insert_id();\n $this -> send_validation_email();\n }", "public function newPerson(Request $request)\n {\n if ((!$request->has(\"id\")) || (!$request->id)) {\n $address = new Address();\n $person = new Person();\n } else {\n $person = Person::find($request->id);\n $address = Address::find($person->address_id);\n }\n $address->address = $request->has(\"address\") ? $request->address : '';\n $address->neighborhood = $request->has(\"neighborhood\") ? $request->neighborhood : '';\n $address->city = $request->has(\"city\") ? $request->city : '';\n $address->shipcode = $request->has(\"shipcode\") ? $request->shipcode : '';\n $address->reference = $request->has(\"reference\") ? $request->reference : '';\n $address->save();\n\n $person->name = $request->has(\"name\") ? $request->name : '';\n $person->birthday = $request->has(\"birthday\") ? $request->birthday : null;\n $person->phone = $request->has(\"phone\") ? $request->phone : '';\n $person->comments = $request->has(\"comments\") ? $request->comments : '';\n $person->preferences = $request->has(\"preferences\") ? $request->preferences : '';\n $person->address_id = $address->id;\n $person->save();\n\n $request->session()->put(\"person\", compact(\"person\", \"address\"));\n return redirect()->route('admin.startOrder');\n }", "function save(&$person,&$account,$person_id = FALSE) {\n \n $person['person_id'] =$this->db->insert('people', $person);\n $account['person_id'] = $person_id =$this->db->insert_id();\n $success = $this->db->insert('employees', $account);\n return $success;\n\n }", "public function store(AddNewPersonRequest $request)\n {\n\n $filename = request('avatar') ? hash( 'sha256', false).request('avatar')->getClientOriginalName() : 'default.jpg';\n\n\n if ($filename !== \"default.jpg\") {\n request('avatar')->storeAs('avatars', $filename, 'public_uploads');\n }\n\n $person = Person::create([ \n 'avatar' => $filename,\n 'firstname' => request('firstname'),\n 'middlename' => request('middlename'),\n 'lastname' => request('lastname'),\n 'birthdate' => request('birthdate'),\n 'address' => request('address'),\n 'city' => request('city'),\n 'contact_number' => request('contact_number')\n ]);\n\n if (request('leader')) {\n $leader = Person::find(request('leader'));\n $leader->insertables()->create([\n 'person_id' => $person->id\n ]);\n }\n\n return response()->json($person);\n }", "public function addPerson($person)\n {\n return $this->person()->save($person);\n }", "public function insert() {\n\n // Does an object have ID?\n if ( !is_null( $this->id ) ) trigger_error ( \n \"Person::insert(): Attempt to insert a person that already has its ID property set (to $this->id).\", E_USER_ERROR );\n\n // catch errors\n $opt = array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC\n );\n\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD, $opt );\n\n $sql_person = \"INSERT INTO \n person ( vorname, nachname, geburtsdatum, todesdatum, geburtsort, \n todesort, titel, geschlecht, k_beschreibung, l_beschreibung ) \n VALUES ( :vorname, :nachname, :geburtsdatum, :todesdatum, :geburtsort, \n :todesort, :titel, :geschlecht, :k_beschreibung, :l_beschreibung );\";\n\n // Insert person\n $st = $conn->prepare ( $sql_person );\n $st->bindValue( \":vorname\", $this->vorname, PDO::PARAM_STR );\n $st->bindValue( \":nachname\", $this->nachname, PDO::PARAM_STR );\n $st->bindValue( \":geburtsdatum\", date('Y-m-d', $this->geburtsdatum), PDO::PARAM_STR );\n $st->bindValue( \":todesdatum\", date('Y-m-d', $this->todesdatum), PDO::PARAM_STR );\n $st->bindValue( \":geburtsort\", $this->geburtsort, PDO::PARAM_STR );\n $st->bindValue( \":todesort\", $this->todesort, PDO::PARAM_STR );\n $st->bindValue( \":titel\", $this->titel, PDO::PARAM_STR );\n $st->bindValue( \":geschlecht\", $this->geschlecht, PDO::PARAM_STR );\n $st->bindValue( \":k_beschreibung\", $this->k_beschreibung, PDO::PARAM_STR );\n $st->bindValue( \":l_beschreibung\", $this->l_beschreibung, PDO::PARAM_STR );\n\n $st->execute();\n $person_id = $conn->lastInsertId();\n $this->id = $person_id;\n\n // Insert category connection\n $sql_category = \"INSERT INTO person_kategorie (person_id, kategorie_id) VALUES (:person_id, :kategorie_id)\";\n $st = $conn->prepare ( $sql_category );\n $st->bindValue( \":person_id\", $person_id, PDO::PARAM_INT );\n $st->bindValue( \":kategorie_id\", $this->kategorie_id, PDO::PARAM_INT );\n $st->execute();\n\n // Insert images\n Person::insertImages($conn, $person_id);\n\n $conn = null;\n }", "public function create($data)\n {\n $this->errors = $errors = array();\n\n if (!$data->aysoid) $errors[] = 'AYSOID is required';\n if (!$data->fname) $errors[] = 'AYSO First Name is required';\n if (!$data->lname) $errors[] = 'AYSO Last Name is required';\n if (!$data->email) $errors[] = 'Email is required';\n\n if (count($errors))\n {\n $this->errors = $errors;\n return null;\n }\n // See if already exists\n $person = $this->findForAysoid($data->aysoid);\n if ($person) return $person;\n\n $person = new \\NatGames\\Person\\PersonItem();\n\n $person->fname = $data->fname;\n $person->lname = $data->lname;\n $person->nname = $data->nname;\n $person->email = $data->email;\n $person->phonec = $data->phonec;\n\n $personReg = new \\NatGames\\Person\\PersonRegItem();\n $personReg->regType = 'AYSOV';\n $personReg->regKey = 'AYSOV-' . $data->aysoid;\n $personReg->person = $person;\n \n // $em instanceof EntityManager\n $em = $this->_em;\n try\n {\n $em->persist($person);\n $em->persist($personReg);\n $em->flush();\n }\n catch (\\Exception $e)\n {\n // QLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '123456789' for key 'aysoid'\n $msg = $e->getMessage();\n if (strstr($msg,'Duplicate entry'))\n {\n \n }\n if (!count($errors)) $errors[] = 'Person creation failed, unknown error.';\n $this->errors = $errors;\n\n return null;\n }\n return $person;\n }", "public function testPersonSaving() {\n $person = factory(Person::class, 1)->create();\n $this->assertNotNull(Person::find($person[0]->id));\n }", "public function getPersonId()\n {\n return $this->personId;\n }", "public function create_account(midgard_person $person)\n {\n midgardmvc_core::get_instance()->log(__CLASS__, \"Person with guid: \" . $person->guid . ' created', 'info');\n\n $qb = new midgard_query_builder('midgard_user');\n $qb->add_constraint('auth_type', '=', 'LDAP');\n $qb->add_constraint('person', '=', $person->guid);\n $users = $qb->execute();\n\n if (count($users))\n {\n $user = $users[0];\n }\n unset($qb);\n\n if ($user)\n {\n $account = new midgardmvc_account();\n $account = $person;\n }\n }", "public function createReadableId() {\n $firstName = json_encode($this->firstName);\n $lastName = json_encode($this->lastName);\n\n $js = file_get_contents(\\mym\\PATH_RESOURCES . '/User.createReadableId.js');\n\n $js = str_replace(array(\n \"'%firstName%'\",\n \"'%lastName%'\",\n ), array(\n $firstName,\n $lastName\n ), $js);\n\n $mongo = DocumentManager::getMongoDB();\n $result = $mongo->execute($js);\n\n if ($result['ok']) {\n $this->readableId = $result['retval'];\n }\n else {\n throw new \\Exception(\"Unable to generate readable id\");\n }\n }", "function addPerson (){\n if($_GET['action'] =='peoples'){\n //Decodificar un JSON de entrada con los datos de la nueva persona\n $strInputData = json_decode(file_get_contents('php://input'));\n $saveData = (array)$strInputData; \n if (empty($saveData)){\n $this->response(422, \"Sin datos\",\"No agrego ningun dato, Verificar JSON\");\n }else\n if (isset ( $strInputData->id,\n $strInputData->name,\n $strInputData->lastName ) ){\n $npeople = new PeopleDB();\n $npeople->addPerson( $strInputData->id, \n $strInputData->name, \n $strInputData->lastName );\n $this->response(200,\"Perfecto\",\"Se inserto un nuevo dato a la BD\");\n }else{\n $this->response(422,\"Incompleto\",\"Falta un dato en el JSON\");\n }\n }else{\n $this->response(400);\n }\n }", "public function createPerson(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'age' => 'required',\n 'sex' => [\n 'required',\n Rule::in(['M', 'F']),\n ]\n ]);\n\n /*\n if($validator->fails()){\n $errors = $validation->errors();\n return $errors->toJson();\n }else{\n return Person::create([\n 'name' => $request->get('name'),\n 'age' => $request->get('age'),\n 'sex' => $request->get('sex'),\n ]);\n }\n */\n $person = $this->personService->createPerson([\n 'name' => $request->get('name'),\n 'age' => $request->get('age'),\n 'sex' => $request->get('sex'),\n ]);\n \n /*\n $location = $this->locations->createLocation([\n 'latitude' => $request->get('latitude'),\n 'longitude' => $request->get('longitude'),\n ]);\n */\n\n // TODO Adicionar a localização da pessoa\n // $person->location()->apend($location);\n\n return $person;\n\n }", "public static function create()\n\t{\n\t\t$retailer = new Model_Entity_Person();\n\t\treturn $retailer;\n\t}", "abstract public function insert_id();", "public static function addNewPerson($TipPerson, $Name, $LastName, $MotherLastName, $Date, $Age, $Gender, $Phone, $Email, $Curp, $Rfc, $State, $Municipality, $Suburb, $Street, $Number, $PostalCode) {\n $sql = \"INSERT INTO mPersona(CvTipPerson, CvNombre, CvApePat, CvApeMat, FecNac, Edad, CvGenero, Telefono, Email, Curp, Rfc, CvEstado, CvMunicipio, CvColonia, CvCalle, Numero, Cp) VALUES(:CvTipPerson, :CvNombre, :CvApePat, :CvApeMat, :FecNac, :Edad, :CvGenero, :Telefono, :Email, :Curp, :Rfc, :CvEstado, :CvMunicipio, :CvColonia, :CvCalle, :Numero, :Cp)\";\n\n $stmt = Conexion::conectar() -> prepare($sql);\n $stmt -> bindParam(\":CvTipPerson\", $TipPerson, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvNombre\", $Name, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvApePat\", $LastName, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvApeMat\", $MotherLastName, PDO::PARAM_STR);\n $stmt -> bindParam(\":FecNac\", $Date, PDO::PARAM_STR);\n $stmt -> bindParam(\":Edad\", $Age, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvGenero\", $Gender, PDO::PARAM_STR);\n $stmt -> bindParam(\":Telefono\", $Phone, PDO::PARAM_STR);\n $stmt -> bindParam(\":Email\", $Email, PDO::PARAM_STR);\n $stmt -> bindParam(\":Curp\", $Curp, PDO::PARAM_STR);\n $stmt -> bindParam(\":Rfc\", $Rfc, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvEstado\", $State, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvMunicipio\", $Municipality, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvColonia\", $Suburb, PDO::PARAM_STR);\n $stmt -> bindParam(\":CvCalle\", $Street, PDO::PARAM_STR);\n $stmt -> bindParam(\":Numero\", $Number, PDO::PARAM_STR);\n $stmt -> bindParam(\":Cp\", $PostalCode, PDO::PARAM_STR);\n $stmt -> execute();\n $stmt = null;\n }", "public function create($object, $newId);", "public static function create($params) {\n $rows = DB::query('INSERT INTO List (name, owner) '\n . 'VALUES (:name, :owner) RETURNING id', \n array('name' => $params['name'], \n 'owner' => $params['owner']));\n\n $row = $rows[0];\n $last_id = $row[0];\n return $last_id;\n }", "public function create()\n {\n foreach ($this->attributes as $k => $attribute) {\n if (trim($attribute) == '') {\n $this->offsetUnset($k);\n }\n if (is_numeric($attribute) && $attribute == 0) {\n $this->offsetUnset($k);\n }\n }\n $columnString = implode(',', array_flip($this->attributes));\n $valueString = \":\".implode(',:', array_flip($this->attributes));\n\n try {\n $core = self::getDB();\n $stmt = $core->prepare(\"INSERT INTO $this->table ({$columnString}) VALUES ({$valueString})\");\n\n $status = $stmt->execute($this->attributes);\n if ($status) {\n $lastId = $core->lastInsertId();\n return $lastId;\n }\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n }", "public function create($name, $website = null, $paying_user = null)\n {\n $this->name = $name;\n $this->website = $website;\n $this->paying_user = $paying_user;\n $this->save();\n return $this->id;\n }", "function addMember($firstName, $lastName, $age, $gender, $phone,$premium,$email,$state,$seeking,$bio,$indoor,$outdoor)\n {\n $insert = 'INSERT INTO pets (firstName, lastName, age, gender, phone, premium, email, state, seeking, bio, indoor, outdoor) \n VALUES (:firstName, :lastName, :age, :gender, :phone, :premium, :email, :state, :seeking, :bio, :indoor, :outdoor)';\n \n $statement = $this->_dbConnection->prepare($insert);\n $statement->bindValue(':firstName', $firstName, PDO::PARAM_STR);\n $statement->bindValue(':lastName', $lastName, PDO::PARAM_STR);\n $statement->bindValue(':age', $age, PDO::PARAM_INT);\n $statement->bindValue(':gender', $gender, PDO::PARAM_STR);\n $statement->bindValue(':phone', $phone, PDO::PARAM_STR);\n $statement->bindValue(':premium', $premium, PDO::PARAM_INT);\n $statement->bindValue(':email', $email, PDO::PARAM_STR);\n $statement->bindValue(':state', $state, PDO::PARAM_STR);\n $statement->bindValue(':seeking', $seeking, PDO::PARAM_STR);\n $statement->bindValue(':bio', $bio, PDO::PARAM_STR);\n $statement->bindValue(':indoor', $indoor, PDO::PARAM_STR);\n $statement->bindValue(':outdoor', $outdoor, PDO::PARAM_STR);\n \n\n $statement->execute();\n\n //Return ID of inserted row\n return $this->_dbConnection->lastInsertId();\n }", "function New_contact_person($m_member_id,$m_title,$m_name,$post,$m_address,$m_telephone,$m_fax,$m_email,$m_url,$m_add_date)\n\t{\n\t\t$sql = \"Insert into contactperson values(NULL,'\".$m_member_id.\"','\".$m_title.\"','\".$m_name.\"','\".$post.\"','\".$m_address.\"','\".$m_telephone.\"','\".$m_fax.\"','\".$m_email.\"','\".$m_url.\"','\".$m_add_date.\"',NULL)\";\n $pdo = CDBCon::GetInstance();\n $stmt = $pdo->prepare($sql);\n return $stmt->execute();\n\t}", "public function getPersonNew(){\n\t\t$result = new _PersonNew($this->apiClient);\n\t\treturn $result;\n\t}", "function create($postdata) {\n //Insert a new customer based on the post data that was inserted\n //Validate numerical input\n validateNumber($postdata['familySize'],1,99,\"Family Size is invalid or not within in range 1-99.\");\n $owner = new Owner(cleanString($postdata['name'],30), cleanString($postdata['city'],58), cleanString($postdata['gender'],20), $postdata['familySize']);\n //Clean strings\n //Create object based on cleaned and validated input\n //new PDOAgent\n $p =new PDOAgent(\"mysql\", DBUSER,DBPASSWD,\"localhost\", DBNAME);\n\n //Connect to the Database\n $p->connect();\n\n //Setup the Bind Parameters\n $bindParams = [\n 'name' => $owner->name,\n 'city' => $owner->city,\n 'gender' => $owner->gender,\n 'familySize' => $owner->familySize\n ];\n\n //Get the results of the insert query (rows inserted)\n $results = $p->query(\"INSERT INTO Owners(Name, City, Gender, FamilySize)\n VALUES ( :name, :city, :gender, :familySize);\", $bindParams);\n //copy the last inserted id\n $this->lastInsertId = $p->lastInsertId;\n\n //Disconnect from the database\n $p->disconnect();\n\n if ($p->rowcount != 1) {\n trigger_error(\"Something went horribly wrong!\");\n die();\n }\n\n //Return the ID of the created entry\n return $this->lastInsertId;\n\n }", "public function create()\n {\n $data = $this->data;\n $data = $this->before_db($data);\n $data = $this->clear_others($data);\n if ($this->unset_primary)\n unset($data[$this->primary_key]);\n\n $insert_id = $this->db->query($this->sql->insert('?a')->generate(), $data);\n $this->data[$this->primary_key] = $insert_id;\n return $insert_id;\n }", "public function store(CreatePersonaRequest $request)\n {\n $input = $request->all();\n\n app('App\\Http\\Controllers\\PrintReportContoller')->getPrintReport();\n \n $user = Illuminate\\Foundation\\Auth\\User::create([\n 'name' => $input['full_name'],\n 'email' => $input['email'],\n 'password' => bcrypt($input['rut']),\n ]);\n \n \n //$input['user_id'] = 1;//$user['id'];\n $persona = $this->personaRepository->create($input);\n\n Flash::success('Persona saved successfully.');\n\n return redirect(route('personas.index'));\n }", "public function getCreatorId();", "private function makePerson(array $data): Person\n {\n return (new Person())\n ->setId((int)$data['id'])\n ->setCard($data['card'])\n ->setEmail($data['email'])\n ->setPhone($data['phone']);\n }", "public function create ($republica = NULL) {\r\n\t\t$this->db->insert('Republica', $republica);\r\n\t\treturn $this->db->insert_id();\r\n\t}", "public function created(contactPerson $contactPerson)\n {\n //\n }", "function insertPatient($firstname, $lastname, $email, $pid)\n {\n if ($this->pdo == null)\n {\n $this->init();\n }\n\n $patientID = $this->checkPatientExistsByHospitalPatientID($pid);\n\n if ($patientID !==false)\n return $patientID;\n\n $sql = \"INSERT INTO patient (first_name, last_name, email, hospital_patient_id)\n VALUES (:FIRSTNAME, :LASTNAME, :EMAIL, :HOSPITALPATIENTID)\";\n $query = $this->pdo->prepare($sql);\n // use exec() because no results are returned\n $query->execute(array(\n 'FIRSTNAME'=>$firstname,\n 'LASTNAME'=>$lastname,\n 'EMAIL'=>$email,\n 'HOSPITALPATIENTID'=>$pid));\n\n return $this->pdo->lastInsertId(\"id\");\n\n }", "public function Create($first_name, $last_name, $email)\n {\n $query = $this->db->prepare(\"INSERT INTO users(first_name, last_name, email) VALUES (:first_name,:last_name,:email)\");\n $query->bindParam(\"first_name\", $first_name, PDO::PARAM_STR);\n $query->bindParam(\"last_name\", $last_name, PDO::PARAM_STR);\n $query->bindParam(\"email\", $email, PDO::PARAM_STR);\n $query->execute();\n return $this->db->lastInsertId();\n }", "public static function create_new($prospect_info) {\n\t\t$new_id = db::insert(\"contracts.prospects\", array(\n\t\t\t'name' => $prospect_info['prospect_name'],\n\t\t\t'company' => $prospect_info['prospect_company'],\n\t\t\t'email' => $prospect_info['prospect_email'],\n\t\t\t'url' => $prospect_info['prospect_url']\n\t\t));\n\t\treturn $new_id;\n\t}", "public function createEmptyPerson($model){\n\t\t//$AreEmptyPerson = \tPerson::model()->findAllByAttributes(array(\"second_name\"=>\"-\"));\n //if(isset($AreEmptyPerson->id))return $AreEmptyPerson->id;\n\t\t$model->second_name =\"-\";\n\t\t$model->first_name=\"-\";\n\t\t$model->third_name=\"-\";\n\t\tif($model->save())echo \"good_safeee\";\n\t\telse{\n\t\t\t\n\t\t\t echo var_dump($model->errors);\n\t\t\t die();\n\t\t}\n\t\treturn $model->id;\n\t}", "public function createStudent($name, $fn, $email) {\n\t\t$sql = \"INSERT INTO students(name,email,faculty_number)\n VALUES('%s', '%s', '%s')\";\n\t\t$sql = sprintf($sql, $name, $email, $fn);\n\t\t$this -> database -> query($sql);\n\t\t// get the newly created ID\n\t\treturn $this -> database -> lastInsertedId();\n\t}", "private function createNewAuthor($author)\n {\t \n\t Yii::$app->db->createCommand()->insert('author', [\n 'name' => HtmlPurifier::process($author),\n ])->execute(); \n \n $id = Yii::$app->db->getLastInsertID();\n \n if (is_numeric($id)) {\n\t return $id; \n } else {\n\t return NULL;\n }\n }", "public function insertPersonRecord($firstName, $lastName, $gender) {\n\n\t $query = \"INSERT INTO person (first_name, last_name, gender)\n\t VALUES (\" . \"\\\"\".$firstName.\"\\\",\"\n\t . \"\\\"\".$lastName.\"\\\",\"\n\t \t\t\t . \"\\\"\".$gender.\"\\\"\n\t )\"; \n\t\t\t\t \n\t $results = $this->Person->query($query); \n\t\t\n\t\t /*\n\t\t NOT USING ORM\n\t $personArray = array();\t\n\t\t$personArray['Person']['first_name'] = $firstName;\n\t\t$personArray['Person']['last_name'] = $lastName;\n\t\t$personArray['Person']['gender'] = $gender;\n\t\t$this->Person->save($personArray);\n\t\t*/ \n\t}", "public function createAction(Request $request)\n {\n $entity = $this->get('fibe_security.acl_entity_helper')->getEntityACL('CREATE', 'Person');\n $form = $this->createForm(new PersonType($this->getUser()), $entity);\n $form->bind($request);\n\n if ($form->isValid())\n {\n $em = $this->getDoctrine()->getManager();\n $entity->setMainEvent($this->getUser()->getCurrentMainEvent());\n\n foreach ($entity->getPapers()\n as\n $paper)\n {\n $paper->addAuthor($entity);\n //$entity->addMember($person);\n $em->persist($paper);\n }\n\n $em->persist($entity);\n $em->flush();\n\n //$this->get('fibe_security.acl_entity_helper')->createACL($entity,MaskBuilder::MASK_OWNER);\n\n return $this->redirect($this->generateUrl('community_person_show', array('id' => $entity->getId())));\n\n }\n\n return $this->render(\n 'fibeCommunityBundle:Person:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView()\n )\n );\n }", "public function create($id)\n { \n }", "public function actionCreate()\n\t{\n\t\t$model=new Person;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Person']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Person'];\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tif(!$this->goBack())\n\t\t\t\t\t$this->redirect(array('admin'));\n\t\t\t\telse\n\t\t\t\t\t$this->goBack();\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create() {\n\n //save new user\n $reply = new $this->replies;\n\n //data\n $reply->ticketreply_ticketid = request('ticketreply_ticketid');\n $reply->ticketreply_creatorid = auth()->id();\n $reply->ticketreply_clientid = request('ticketreply_clientid');\n $reply->ticketreply_text = request('ticketreply_text');\n\n //save and return id\n if ($reply->save()) {\n return $reply->ticketreply_id;\n } else {\n Log::error(\"record could not be saved - database error\", ['process' => '[TicketRepository]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n return false;\n }\n }", "public function create() {\n\n //save new user\n $tag = new $this->tags;\n\n //data\n $tag->tag_title = request('tag_title');\n $tag->tag_creatorid = auth()->id();\n $tag->tag_visibility = request('tag_visibility');\n $tag->tagresource_type = request('tagresource_type');\n $tag->tagresource_id = 0;\n\n //save and return id\n if ($tag->save()) {\n return $tag->tag_id;\n } else {\n Log::error(\"record could not be created - database error\", ['process' => '[TagsRepository]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n return false;\n }\n }", "public function create(){\n\t\tif ($this->isExists())\n\t\t\treturn;\n\t\t\n\t\t$query = \"INSERT INTO `\".$this->_getTableName().\"` \".\n\t\t\t\t\t$this->_prepareSqlToInsert();\n\t\t\n\t\tif (!M::q($query)){\n\t\t\tprint_r(M::e());\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$this->id = M::lastId();\n\n\t\treturn intval($this->getId());\n\t}", "public function create(){\n $query = \"INSERT INTO \" . $this->table_name . \" VALUES (NULL, :firstname, :lastname, :password, :archive)\";\n $stmt = $this->connection->prepare($query);\n $stmt->bindParam(\":firstname\", $this->firstname );\n $stmt->bindParam(\":lastname\", $this->lastname );\n $stmt->bindParam(\":password\", $this->password );\n $stmt->bindParam(\":archive\", $this->archive );\n $stmt->execute();\n\n return $this->connection->lastInsertId();\n }", "public function getIdPerson() \n\t{\n\t\treturn $this->idPerson;\n\t}", "function personRegister($userId, $name, $lastname, $cellphone, $country, $birthday){\n\t\t\t$sql = \"INSERT INTO `person`(`users_iduser`, `name`, `lastname`, `cellphone`, `country`, `birthday`) VALUES ('$userId', '$name', '$lastname', '$cellphone', '$country', '$birthday');\";\n\t\t\t# se prepara el stament para la ejecucion de la consulta\n\t\t\t$stmt = $this->AbrirConexion->prepare($sql);\n\n\t\t\ttry {\n\t\t\t\t# ejecutamos el stament\n\t\t\t\t$stmt->execute();\n\n\t\t\t\t# solicitamos la consulta en un arreglo asociativo\n\t\t\t\t$result = $stmt;\n\t\t\t} catch (PDOException $e) {\n\t\t\t\t# capturamos el error\n\t\t\t\t$result = $e->getMesage();\n\t\t\t}\n\t\t\t# libera la conexion con la base de datos\n\t\t\t$stmt->closeCursor();\n\n\t\t\t# retornamos el resultado de la consulta.\n\t\t\treturn $result;\n\t\t}", "static function createClient(Client $newClient): int {\n\n //Generate the INSERT STATEMENT for the user;\n $sql = \"INSERT INTO Client (UserID)\n VALUES (:userid);\";\n\n //prepare the query\n self::$_db->query($sql);\n\n //Setup the bind parameters\n self::$_db->bind(\":userid\", $newClient->getUserID());\n\n //Execute the query\n self::$_db->execute();\n\n //Return the last inserted ID!!\n return self::$_db->lastInsertedId();\n\n}", "public function create($identifier);", "protected function create()\n {\n $hData = $this->hData;\n unset($hData[$this->sIdColumn]);\n $iID = $this->getDatabase()->insert($this->sTable, $hData);\n \n if (empty($iID))\n {\n return false;\n }\n \n $this->hData[$this->sIdColumn] = $iID;\n return $iID;\n }", "public function insertId(): string;", "public function insert()\n {\n $id = self::createMapper()->insert($this);\n $this->setId($id); // Has to be here cause of private property\n return $id;\n }", "public function insert($person) {\n //create the statement\n $statement = 'INSERT INTO Person (name, surname, birthdate, website, email) VALUES (:name, :surname, FROM_UNIXTIME(:birthdate), :website, :email)';\n $query = Connection::getConnection()->prepare($statement);\n\n //bind parameters and execute query\n $name = $person->getName();\n $surname = $person->getSurname();\n $birthdate = $person->getBirthdate()->getTimestamp();\n\n if( !is_null( $person->getWebsite() ) )\n $website = $person->getWebsite();\n else\n $website = null;\n if( !is_null( $person->getEmail() ) )\n $email = $person->getEmail();\n else\n $email = null;\n\n $query->bindParam(':name', $name, PDO::PARAM_STR, 255);\n $query->bindParam(':surname', $surname, PDO::PARAM_STR, 255);\n $query->bindParam(':birthdate', $birthdate, PDO::PARAM_INT);\n\n if( is_null( $website ) )\n $query->bindParam(':website', $website, PDO::PARAM_NULL);\n else\n $query->bindParam(':website', $website, PDO::PARAM_STR, 255);\n if( is_null( $email ) )\n $query->bindParam(':email', $email, PDO::PARAM_NULL);\n else\n $query->bindParam(':email', $email, PDO::PARAM_STR, 255);\n\n $query->execute();\n }", "public function created(people $people)\n {\n //\n }", "public function createAction()\n {\n $entity = new Persona();\n $request = $this->getRequest();\n $form = $this->createForm(new PersonaType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('persona_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('LyricaEirinBundle:Persona:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function createNewUser()\n {\n $rawPassword = $this->faker->word;\n\n $user = [\n 'email' => $this->faker->email,\n 'password' => $this->hasher->make($rawPassword),\n 'remember_token' => str_random(60),\n 'session_salt' => str_random(60),\n 'display_name' => $this->faker->words(4, true),\n 'created_at' => time(),\n 'updated_at' => time(),\n ];\n\n $userId = $this->databaseManager->table(ConfigService::$tableUsers)\n ->insertGetId($user);\n\n return $userId;\n }", "public function create()\n {\n return view('backend.default.addperson');\n }", "private function createTestOpportunityRecord()\n {\n $id = time();\n $sql = \"INSERT INTO `opportunities` (`id`, `name`, `deleted`, `date_entered`, `date_modified`) VALUES\n('$id', 'JustForTest', 0, '1970-01-01 00:00:01', '1970-01-01 00:00:01')\";\n $pdo = new SugarPDO(new SugarApp(new NullLogger(), getenv('SUGARCLI_SUGAR_PATH')));\n $pdo->query($sql);\n return $id;\n }", "public function create($id)\n {\n\n }", "public function create() {\n /*$id = json_decode($_POST['id']);\n $name = json_decode($_POST['name']);\n $usr = User();\n $usr->id = $id;\n $usr->name = $name;\n $usr->save();*/\n }", "public static function addPerson(int $teamId, int $personId)\n {\n self::insert(['person_id' => $personId, 'team_id' => $teamId, 'joined_on' => now()]);\n }", "function create_user($data)\n\t{\n\t\tif ($this->db->insert($this->table_name, $data)) {\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t\treturn NULL;\n\t}", "public function create() {\n if (self::getEntityId() != NULL) {\n $exception = new ZCRMException(\"Entity ID MUST be null for create operation.\", APIConstants::RESPONSECODE_BAD_REQUEST);\n $exception->setExceptionCode(\"ID EXIST\");\n throw $exception;\n }\n return EntityAPIHandler::getInstance($this)->createRecord();\n }", "private function new_user ()\n {\n\n if ( !null == ( $_POST[ 'name' ] && $_POST[ 'password' ] ) ) {\n $name = trim( $_POST[ 'name' ] );\n $password = trim( $_POST[ 'password' ] );\n }\n\n $query = <<<SQL\n INSERT INTO xyz_users (name, password)\n\t\t\tVALUES (:name, :password);\nSQL;\n $this->dbh->insertRow( $query, array(\n 'name' => $name,\n 'password' => $password ) );\n return $this->dbh->lastInsertId();\n\n }", "public function CreateLinkedPhoneNumber($person_record_id, $phone_number, $primary_pi=1){\n\t\t \n\t\t //Define the values array\n\t\t $insert_array = array(\n\t\t\t 'person_id' => $person_record_id,\n\t\t\t 'phone_number' => $phone_number,\n\t\t\t 'primary' => $primary_pi\n\t\t );\n\t\t \n\t\t //Create the insert array\n\t\t $insert_sql_query = $this->dbl->CreateInsertQuery('people_phone_numbers', $insert_array, true);\n\t\t \n\t\t //Execute this insert query\n\t\t $this->dbl->ExecuteQuery($insert_sql_query);\n\t\t \n\t\t //Evaluate the returned ID\n\t\t $returned_id = $this->dbl->InsertID();\n\t\t \n\t\t //Return false (OR ID on success)\n\t\t if(is_numeric($returned_id)){\n\t\t\t \n\t\t\t //RETURN ID\n\t\t\t return $returned_id;\n\t\t\t \n\t\t }else{\n\t\t\t \n\t\t\t //FALSE\n\t\t\t $this->last_error = \"MySQL Issue, could not insert phone number\";\n\t\t\t return false;\n\t\t\t \n\t\t }\n\t\t \n\t }", "function create(PersonalInformationModel $pi){\n try {\n Log::info(\"Entering PersonalInformationDataService.create()\");\n \n //use the connection to create a prepared statement\n $stmt = $this->conn->prepare(\"INSERT INTO `PERSONAL_INFORMATION` (`BIOGRAPHY`, `CURRENT_POSITION`, `CONTACT_EMAIL`, `PHONE_NUMBER`, `PHOTO`, `USERS_ID`) VALUES (:biography, :currposition, :contactemail, :phone, :photo, :userid)\");\n\n //Store the information from the personal information object into variables\n $bio = $pi->getBiography(); \n $pos = $pi->getCurrent_position(); \n $email = $pi->getContact_email(); \n $phone = $pi->getPhone_number(); \n $photo = $pi->getPhoto(); \n $userid = $pi->getUserid(); \n \n //Bind the variables from the personal information object to the SQL statement\n $stmt->bindParam(':biography', $bio);\n $stmt->bindParam(':currposition', $pos); \n $stmt->bindParam(':contactemail', $email);\n $stmt->bindParam(':phone', $phone);\n $stmt->bindParam(':photo', $photo);\n $stmt->bindParam(':userid', $userid);\n \n //Excecute the SQL statement\n $stmt->execute();\n \n //If a row was inserted the method will return true.\n //If not it will return false\n if ($stmt->rowCount() == 1) {\n Log::info(\"Exiting PersonalInformationDataService.create() with true\");\n return true;\n }\n else {\n Log::info(\"Exiting PersonalInformationDataService.create()with false\");\n return false;\n }\n }catch (PDOException $e){\n Log::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }", "public function create()\n\t{\n\t\treturn view('personnes.create');\n\t}", "function create($data)\n\t{\n\t\t$this->db->insert('wp_kapn_users', $data);\n\t\t$new_id = $this->db->insert_id();\n\t\treturn $new_id;\n\t}", "public function create($params) {\n foreach ($params as $key => $field) {\n if (!in_array($key, $this->goodFields)) {\n unset($params[$key]);\n }\n }\n $id = $this->insert($params);\n $this->setId($id);\n return $id;\n }", "public static function createId($id, $firstName, $middleName, $lastName, $designation = 'DO') {\n $fullName = sprintf('%s %s %s %s', $firstName, $middleName, $lastName, $designation);\n\n if (empty($id)) { return ''; }\n\n $id = str_pad($id, 6, '0', STR_PAD_LEFT);\n $idBase64 = base64_encode($id);\n\n\n $punctStripped = \n preg_replace('/[.,\\/#!$%\\^&\\*;:{}=\\-_`~()]/', '', $fullName);\n\n return sprintf(\n '%s-%s',\n mb_strtolower(str_replace(' ', '-', $punctStripped)),\n mb_substr(hash('sha256', $idBase64), 0, 18)\n );\n }", "public function insertId()\n {\n }", "public function insertId()\n {\n }", "function _create($company_id){\n\t\t// nachystam si data na ulozeni\n\t\t$cart['Cart']['company_id'] = $company_id;\n\n\t\t// kosik ulozim do db\n\t\t$this->save($cart);\n\t\t\n\t\t// znam ID kosiku, zalozim automaticke pojmenovani\n\t\t$name = 'nepojmenovana' . $this->id . '_' . date('d-m-Y');\n\t\t$this->save(array('name' => $name));\n\t\t\n\t\t// vratim id kosiku\n\t\treturn $this->id;\n\t}", "public function create($id)\n {\n \n \n\n }" ]
[ "0.8375548", "0.719356", "0.7025862", "0.698751", "0.6985066", "0.6838075", "0.6801476", "0.6786637", "0.6652867", "0.66102976", "0.6555934", "0.6535398", "0.6503698", "0.64488643", "0.6441316", "0.64114004", "0.63992524", "0.6397454", "0.6392136", "0.6384028", "0.63722056", "0.6370074", "0.6360861", "0.633227", "0.63114357", "0.6287468", "0.62758315", "0.6237249", "0.6229413", "0.619868", "0.6195088", "0.6186246", "0.6171262", "0.6165184", "0.61613286", "0.61350226", "0.6121325", "0.611574", "0.61015695", "0.60993737", "0.6090254", "0.60832936", "0.60804665", "0.6079043", "0.60757494", "0.6064518", "0.6047018", "0.60332143", "0.60265195", "0.60264647", "0.60106206", "0.6006833", "0.5990055", "0.59765524", "0.59642226", "0.5943393", "0.59413683", "0.59237045", "0.5893934", "0.5891854", "0.588977", "0.58845055", "0.5872079", "0.58677655", "0.5864518", "0.58608073", "0.5853692", "0.5849967", "0.58492583", "0.58466643", "0.58458745", "0.5841046", "0.5839461", "0.5830037", "0.5829515", "0.5828036", "0.58280176", "0.58270746", "0.58251053", "0.58223766", "0.5821422", "0.58144844", "0.58045906", "0.5801499", "0.57996786", "0.57913125", "0.5789267", "0.5782187", "0.577533", "0.57746744", "0.57727325", "0.5766004", "0.57647294", "0.57646585", "0.57606786", "0.5756981", "0.57505006", "0.57505006", "0.57475096", "0.5747112" ]
0.7370957
1
print theme file name with some html markup. Magical hidden feature: when viewing any given page, add "?pagecheck=1" to the URL to invoke the page_check function.
Напечатать имя файла темы с некоторой html-маркировкой. Магический скрытый функционал: при просмотре любой страницы добавьте "?pagecheck=1" в URL, чтобы вызвать функцию page_check.
function njimedia_show_theme($f){ //return; if( ! defined('WP_DEBUG') || ! WP_DEBUG ) return; // only enable if debugging turned on. // only run for hosts containing ".local" or .dev or .loc if( ! is_local_server() ) return; // optionally display results of running most all WP conditionals (see below) if( isset($_GET['pagecheck']) ){ NJIMEDIA_WP_Utils::page_check(); } $name = FALSE === strpos($f, 'templates') ? basename($f) : substr($f, strpos($f, 'templates')); echo "<script type=\"text/debug\" class=\"template-name\">{$name}</script>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theme_call_page($theme, $page, $data = array()){\n\tif(file_exists(\"themes/\".$theme.\"/\".$page.\".tpl\")){\n\t\tinclude (\"themes/\".$theme.\"/\".$page.\".tpl\");\n\t}else{\n\t\tprint \"<!-- The Template '$page' does not exist inside the Theme '$theme' -->\";\n\t}\n}", "public static function\t\tprint_page(){\r\n\t\tif (WOME::$cache_mode == 'page')\r\n\t\t{\r\n\t\t\t//save the previous buffer\r\n\t\t\tWOME::initcache_save_buffer(true);\r\n\r\n\t\t\t//check and read the cache\r\n\t\t\tWOME::$_page['read_cache'] = WOME::initcache_check_file();\r\n\t\t\tif(WOME::$_page['read_cache'])\r\n\t\t\t\tWOME::initcache_read_file();\r\n\t\t}\r\n\r\n\t\tif(!WOME::$_page['read_cache'])\r\n\t\t{\r\n\t\t//else : exec the page\r\n\t\t\t//include the page\r\n\t\t\t$function = function(){\r\n\t\t\t\tinclude(WOME::$_site['directory'].'pages/'.WOME::$_page['properties']['address']);\r\n\t\t\t};\r\n\t\t\t$function();\r\n\t\t\t\r\n\t\t\tif (WOME::$cache_mode == 'page')\r\n\t\t\t{\r\n\t\t\t\t//save the page buffer\r\n\t\t\t\tWOME::initcache_save_buffer(true);\r\n\t\t\t\tWOME::initcache_save_file();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function display_theme($theme)\n{\n}", "function printPage() {\n $this->printDebug($this->drupalGetContent());\n }", "function customize_themes_print_templates()\n{\n}", "function zp_printThemeDownloadButton() {\n\tglobal $_zp_themeroot, $_zp_gallery, $_zp_current_album;\n\tif(!$_zp_current_album->hasTag('theme-officially-supported') && zp_getParentAlbumName() == \"theme\") {\n \tif(zp_getParentAlbumName() == \"theme\" && $_zp_current_album->hasTag('hosted_theme')) {\n\t\t\t$linktext = 'Download on GitHub.com';\n\t\t\t$theme = explode('/',$_zp_current_album->name);\n\t\t\t$themeurl = 'https://github.com/zenphoto/Unsupported/tree/master/themes/';\t\n\t\t\techo '<p class=\"articlebox-left\"><strong>Please note:</strong> It is not possible to download individual themes from the GitHub repository. You have to download the full repository (click on ZIP) and sort out what you need yourself.</p>';\n\t\t} else {\n\t\t\t$linktext = 'Info/download (external)';\n\t\t\t$themeurl = $_zp_current_album->getLocation();\n\t\t}\n\t\tif($_zp_current_album->hasTag('theme-abandoned')) {\n\t\t\techo '<p>Sorry, this theme is no longer provided by its developer.</p>';\n\t\t} else {\n\t\t\techo '<div class=\"buttons\"><a href=\"' . $themeurl . '\"><img src=\"'.$_zp_themeroot.'/images/arrow_right_blue_round.png\" alt=\"\" /> '.$linktext.'</a></div>';\n\t\t}\n }\n if($_zp_current_album->hasTag('theme-officially-supported')) {?>\n\t\t<p class=\"articlebox\">Included in the Zenphoto release.</p>\n\t<?php \n }\n}", "function printPageCSS(){\n\techo \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\" . plugins_url('styles/mixare-pages.css', __FILE__) . \"\\\" />\";\n}", "function wpa_page_file_path() {\n }", "function ww_thesis_custom_page() {\n $offer = '<div class=\"whitepaperoffer\">';\n $offer .= 'Get this article beautifully formatted in PDF.';\n $offer .= '</div>';\n\n return $offer;\n}", "function info_page_html()\n {\n }", "function palmate_usermanual_page() {\n echo '<h1>Användarmanual till Palmate</h1>';\n echo '<div><a href=\"/assets/Anvandarmanual_Palmate.pdf\">Klicka här för att läsa användarmanualen</a></div>';\n echo '<h2>Versionshistorik</h2>';\n echo '<table>';\n echo '<tr><td style=\"min-width: 100px;\">Version 1.1</td><td>Login, logout</td></tr>';\n echo '<tr><td style=\"min-width: 100px;\">Version 1.0</td><td>Login, logout</td></tr>';\n echo '</table>';\n}", "function print_page($html) {\n\tglobal $session_warning,$categories_bot_list;\n\n\t// if template file is not loaded compress output\n\tif (defined('TEMPLATE_LOADED')) {\n\t\tif (TEMPLATE_LOADED != 1) {\n\t\t\tif (COMPRESS_PAGE_OUTPUT == 1) $html = preg_replace('/\\>\\s+\\</', '> <', $html);\n\t\t}\n\t} else {\n\t\t\tif (COMPRESS_PAGE_OUTPUT == 1) $html = preg_replace('/\\>\\s+\\</', '> <', $html);\n\t}\n\t\n\t// prints session timeout warning if customers/advertiser is logged in\n\t$html = str_replace('SESSION_EXP_WARNING',$session_warning,$html);\n\n\t// start output buffer\n\tob_start(\"ob_gzhandler\");\n\t\n\tif (defined('PRINT_PAGE')) {\n\t\tif(PRINT_PAGE == 0) {\n\t\t\t// add page header to template\n\t\t\techo draw_page_header();\n\t\t}\n\t} else {\n\t\techo draw_page_header();\n\t}\n\t\n\t// print page body\n\techo $html;\n\t\n\t// flush output buffer\n\tob_end_flush();\n}", "function displayTheme()\n {\n if($this->db->GetData(\"sk_modules\",\"active\",\"url='/\".$this->actualPage.\"/' AND active=1 AND independant_tpl=1\"))\n {\n $class = $this->db->GetFirstData(\"sk_modules\",\"name\",\"url='/\".$this->actualPage.\"/' AND active=1\")->name;\n __loadModule($class);\n $module = new $class();\n echo $module->content;\n }\n //IF WE LOAD A PAGE\n else\n {\n\n echo $this->processTheme($this->loadTheme());\n }\n }", "protected function get_file_name(): string {\n\t\t\treturn 'page';\n\t\t}", "function wp_print_theme_file_tree($tree, $level = 2, $size = 1, $index = 1)\n{\n}", "function mash_print_file($file) {\n // Don't even bother to print the file in --no mode\n if (mash_get_context('MASH_NEGATIVE')) {\n return;\n }\n if ((substr($file,-4) == \".htm\") || (substr($file,-5) == \".html\")) {\n $tmp_file = mash_tempnam(basename($file));\n file_put_contents($tmp_file, mash_html_to_text(file_get_contents($file)));\n $file = $tmp_file;\n }\n // Do not wait for user input in --yes or --pipe modes\n if (mash_get_context('MASH_PIPE')) {\n mash_print_pipe(file_get_contents($file));\n }\n elseif (mash_get_context('MASH_AFFIRMATIVE')) {\n mash_print(file_get_contents($file));\n }\n elseif (mash_shell_exec_interactive(\"less %s\", $file)) {\n return;\n }\n elseif (mash_shell_exec_interactive(\"more %s\", $file)) {\n return;\n }\n else {\n mash_print(file_get_contents($file));\n }\n}", "function linktracking_civicrm_pageRun(&$page) {\n $pageName = $page->getVar('_name');\n $fname = 'linktracking_'.$pageName;\n if (function_exists($fname)) {\n $fname($page);\n }\n // else { echo '<pre>'.$fname.'</pre>'; }\n}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "function printOpenHTML ($specific) {\n\n // build a nice screen\n printf(\"<html>\");\n printf(\"<head>\");\n printf(\"<title>ye old Pub.com - ezContentMgt - %s</title>\", $specific);\n printf(\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=iso-8859-1\\\"/>\");\n printf(\"<style type=\\\"text/css\\\" media=\\\"all\\\">@import \\\"css/master.css\\\";</style>\");\n printf(\"</head>\");\n printf(\"<body>\");\n printf(\"<p align=\\\"center\\\">\");\n printf(\"<img src=\\\"../images/general/logotextonly.gif\\\" width=\\\"212\\\" height=\\\"44\\\">\");\n printf(\"<h1><center>ezContentMgt Utility</center></h1>\");\n printf(\"<div align=\\\"center\\\">\");\n printf(\"<table width=\\\"\".MAINTBLSIZE.\"\\\" border=\\\"0\\\">\");\n printf(\"<br/><center><h2>%s</h2></center></br>\", $specific);\n printf(\"<hr>\");\n\n}", "public function page() {\n\t\t//debug($this->data);\n\n\t\tif (file_exists($this->current_theme)) {\n\t\t\tif (file_exists($this->site_theme_path)) {\n\t\t\t\tif (file_exists($this->site_theme_path . DIRECTORY_SEPARATOR . $this->page_template)) {\n\n\t\t\t\t\t$this->load->view($this->site_theme_view . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $this->page_template, $this->data);\n\t\t\t\t} else {\n\t\t\t\t\techo 'Page template <b>' . $this->current_theme . DIRECTORY_SEPARATOR . $this->page_template . '</b> not found!';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmkdir($this->site_theme_path, 0777);\n\t\t\t\techo \"The directory $this->site_theme_path was not found, but is now successfully created.\";\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\techo 'Error theme: <b>' . $this->current_theme . '</b> not found';\n\t\t}\n\t}", "function enTete($titre)\n{\n print \"<!DOCTYPE html>\\n\";\n print \"<html>\\n\";\n print \"<head>\\n\";\n print \"<meta charset=\\\"utf-8\\\" />\\n\";\n print \"<title>$titre</title>\\n\";\n print \"<link rel=\\\"stylesheet\\\" href=\\\"tpStyle.css\\\"/>\\n\";\n print \"</head>\\n\";\n \n print \"<body>\\n\";\n print \"<h1> $titre </h1>\\n\";\n}", "public function print_template_content();", "function PrintPage($filename, $contents, $board) {\n\n if ($board !== true) {\n print_page($filename, $contents, $board);\n } else {\n echo $contents;\n }\n }", "function page_header() {\n print '<html><head><title>Welcome to my site</title></head>';\n print '<body bgcolor=\"#ffffff\">';\n}", "function printPage($titleN = DEFAULT_TITLE, $includeN)\n\t{\n\t\tglobal $title;\n\t\t$title = $titleN;\n\n\t\tglobal $include;\n\t\t$include = $includeN;\t\t\n\t\n\t\tinclude_once(STATIC_FOLDER. 'template.inc');\n\t}", "function themewizard_script()\n{\n\t$type=get_param('type');\n\t$source_theme=get_param('keep_theme_source','default');\n\t$algorithm=get_param('keep_theme_algorithm','equations');\n\t$show=get_param('show');\n\t$seed=get_param('keep_theme_seed');\n\tif ($seed=='kiddie')\n\t{\n\t\t$seed=str_pad(dechex(mt_rand(0,255)),2,'0',STR_PAD_LEFT).str_pad(dechex(mt_rand(0,255)),2,'0',STR_PAD_LEFT).str_pad(dechex(mt_rand(0,255)),2,'0',STR_PAD_LEFT);\n\t}\n\t$_dark=get_param_integer('keep_theme_dark',NULL);\n\t$dark=is_null($_dark)?NULL:($_dark==1);\n\tif ($type=='preview')\n\t{\n\t\t$_tpl=do_template('THEMEWIZARD_2_PREVIEW');\n\t\t$tpl=do_template('STYLED_HTML_WRAP',array('TITLE'=>do_lang_tempcode('PREVIEW'),'CONTENT'=>$_tpl));\n\t\t$tpl->evaluate_echo();\n\t}\n\tif ($type=='css')\n\t{\n\t\t@ini_set('ocproducts.xss_detect','0');\n\t\tlist($colours,$landscape)=calculate_theme($seed,$source_theme,$algorithm,'colours',$dark);\n\t\t$css=theme_wizard_colours_to_sheet($show,$landscape,$source_theme,$algorithm,$seed);\n\t\theader('Content-type: text/css');\n\t\trequire_code('tempcode_compiler');\n\t\t$tpl=template_to_tempcode($css);\n\t\t$tpl->evaluate_echo();\n\t}\n\tif ($type=='image')\n\t{\n\t\t$image=calculate_theme($seed,$source_theme,$algorithm,$show,$dark);\n\t\tif (is_null($image))\n\t\t{\n\t\t\theader('Location: '.find_theme_image($show));\n\t\t\texit();\n\t\t}\n\t\theader('Content-type: image/png');\n\t\timagepng($image);\n\t\timagedestroy($image);\n\t}\n}", "public static function showTheme($format = '<a onclick=\"window.open(this.href);return false;\" href=\"[authorWebsite]\">[name]</a>') {\n \tglobal $themes;\n \teval(callHook('startShowTheme'));\n \t$data = $format;\n \t$data = str_replace('[authorWebsite]', $themes[getCoreConf('theme')]['authorWebsite'], $data);\n \t$data = str_replace('[author]', $themes[getCoreConf('theme')]['author'], $data);\n \t$data = str_replace('[name]', $themes[getCoreConf('theme')]['name'], $data);\n\t$data = str_replace('[id]', getCoreConf('theme'), $data);\n \teval(callHook('endShowTheme'));\n \techo $data;\n }", "function template_find($args)\n{\n\ttemplate_common_prologue(array('norobots' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'title' => lang('Find').' ' . htmlspecialchars($args['find']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'heading' => lang('Find').' ' . htmlspecialchars($args['find']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'headlink' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'headsufx' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'toolbar' => 1));\n?>\n<div id=\"body\">\n<?php print $args['pages']; ?>\n</div>\n<?php\n\ttemplate_common_epilogue(array('twin' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'edit' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'editver' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'history' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'timestamp' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nosearch' => 0));\n}", "function html_show($txt=''){\n global $ID;\n global $REV;\n global $HIGH;\n //disable section editing for old revisions or in preview\n if($txt || $REV){\n $secedit = false;\n }else{\n $secedit = true;\n }\n\n if ($txt){\n //PreviewHeader\n print '<br id=\"scroll__here\" />';\n print p_locale_xhtml('preview');\n print '<div class=\"preview\">';\n print html_secedit(p_render('xhtml',p_get_instructions($txt),$info),$secedit);\n print '<div class=\"clearer\"></div>';\n print '</div>';\n\n }else{\n if ($REV) print p_locale_xhtml('showrev');\n $html = p_wiki_xhtml($ID,$REV,true);\n $html = html_secedit($html,$secedit);\n print html_hilight($html,$HIGH);\n }\n}", "function pageLocalDisplay()\r\n{\r\n pageName(\"QuArK Addons\");\r\n\r\n global $Games, $GamesQRKAddons; # See '_download-database.php3'\r\n\r\n\r\n$IntroText = \"\r\nThis page tries to list all the known addons for QuArK, and their download links.\r\nIf you ever find an error or some outdated addon, please <a href=\\\"javascript:mail_decode('qrpxre@cynargdhnxr.pbz');\\\">tell us</a>,\r\nand we will try to correct it.\r\n<br><br>\r\nAlso, if you have made an addon, please <a href=\\\"javascript:mail_decode('qrpxre@cynargdhnxr.pbz');\\\">tell us about it</a>, and we will create\r\na link to your addon from this page. If you need help on creating an addon, please post your question(s) to the\r\n<a href=\\\"forums.php3\\\">QuArK forum/mailing-list</a>.\r\n<br><br>\r\n<b>Notice!</b> Those files that have extension '.QRK' or '.qrk', are actually taken directly from the <u>development</u>\r\nsource-library, from our project at <a href=\\\"http://sourceforge.net/project/?group_id=1181\\\">SourceForge</a>.<br>\r\n<br>\";\r\n\r\n\r\n $bodytext = downloadaddonBuildPanel($Games, $GamesQRKAddons);\r\n\r\n pagePanel(\"download\", \"QuArK Addons\", \"\", $IntroText.$bodytext);\r\n}", "function step4()\n\t{\n\t\t// Add theme\n\t\t$source_theme=post_param('source_theme');\n\t\t$algorithm=post_param('algorithm');\n\t\t$seed=post_param('seed');\n\t\t$themename=post_param('themename');\n\t\t$use=(post_param_integer('use_on_all',0)==1);\n\t\t$dark=post_param_integer('dark');\n\t\t$inherit_css=post_param_integer('inherit_css');\n\n\t\techo ' '; // HACKHACK: FastCGI seems to have a weird issue with 'slowish spiky process not continuing with output' - this works around it. Not ideal as would break headers in any hook.\n\t\tif (function_exists('set_time_limit')) @set_time_limit(0);\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('THEMEWIZARD'))));\n\n\t\trequire_code('type_validation');\n\t\tif ((!is_alphanumeric($themename,true)) || (strlen($themename)>40)) warn_exit(do_lang_tempcode('BAD_CODENAME'));\n\t\tmake_theme($themename,$source_theme,$algorithm,$seed,$use,$dark==1,$inherit_css==1);\n\t\t$myfile=@fopen(get_custom_file_base().'/themes/'.filter_naughty($themename).'/theme.ini','wt') OR intelligent_write_error(get_custom_file_base().'/themes/'.filter_naughty($themename).'/theme.ini');\n\t\tfwrite($myfile,'title='.$themename.chr(10));\n\t\tfwrite($myfile,'description='.do_lang('NA').chr(10));\n\t\tfwrite($myfile,'seed='.$seed.chr(10));\n\t\tif (fwrite($myfile,'author='.$GLOBALS['FORUM_DRIVER']->get_username(get_member()).chr(10))==0) warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\n\t\tfclose($myfile);\n\t\tsync_file('themes/'.filter_naughty($themename).'/theme.ini');\n\n\t\t// We're done\n\t\t$title=get_page_title('_THEMEWIZARD',true,array(integer_format(4),integer_format(4)));\n\t\t$message=do_lang_tempcode('THEMEWIZARD_4_DESCRIBE',escape_html('#'.$seed),escape_html($themename));\n\n\t\trequire_code('templates_donext');\n\t\treturn do_next_manager($title,$message,\n\t\t\t\t\t\tNULL,\n\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t/*\t\tTYPED-ORDERED LIST OF 'LINKS'\t\t*/\n\t\t\t\t\t\t/*\t page\t params\t\t\t\t zone\t */\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add one\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Edit this\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Edit one\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// View this\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// View archive\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add to category\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Add one category\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Edit one category\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Edit this category\n\t\t\t\t\t\tNULL,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// View this category\n\t\t\t\t\t\t/*\t SPECIALLY TYPED 'LINKS'\t\t\t\t */\n\t\t\t\t\t\tarray(),\n\t\t\t\t\t\tarray(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t/*\t type\t\t\t\t\t\t\t page\t\t\t params\t\t\t\t\t\t\t\t\t\t\t\t\t zone\t */\n\t\t\t\t\t\t\tarray('edit_this',array('admin_themes',array('type'=>'edit_theme','theme'=>$themename),get_module_zone('admin_themes'))),\t\t\t\t\t\t\t\t // Edit this\n\t\t\t\t\t\t\tarray('edit_css',array('admin_themes',array('type'=>'choose_css','theme'=>$themename),get_module_zone('admin_themes'))),\n\t\t\t\t\t\t\tarray('edit_templates',array('admin_themes',array('type'=>'edit_templates','theme'=>$themename),get_module_zone('admin_themes'))),\n\t\t\t\t\t\t\tarray('manage_images',array('admin_themes',array('type'=>'manage_images','theme'=>$themename),get_module_zone('admin_themes'))),\n\t\t\t\t\t\t\tarray('manage_themes',array('admin_themes',array('type'=>'misc'),get_module_zone('admin_themes')))\n\t\t\t\t\t\t),\n\t\t\t\t\t\tdo_lang('THEME')\n\t\t);\n\t}", "function political_theme_info_page() {\n\t// Get theme details.\n\t$theme = wp_get_theme();\n\t?>\n\t<div class=\"wrap theme-info-wrap\">\n\t\t<h1><?php printf( esc_html__( 'Welcome to %1$s %2$s', 'political' ), esc_html($theme->display( 'Name' )), esc_html($theme->display( 'Version' ) )); ?></h1>\n\t\t<div class=\"theme-description\"><p><?php echo esc_html($theme->display( 'Description' )); ?></p></div>\n\t\t<h2 class=\"nav-tab-wrapper wp-clearfix\">\n\t\t\t<a target=\"_blank\" href=\"<?php echo esc_url('https://wpcomb.com/political-theme/'); ?>\" class=\"nav-tab\"><?php echo esc_html__('Free vs PRO', 'political'); ?></a>\n\t\t\t<a target=\"_blank\" href=\"<?php echo esc_url('http://wpcomb.com/themes/political/'); ?>\" class=\"nav-tab\"><?php echo esc_html__('Live Demo', 'political'); ?></a>\n\t\t\t<a target=\"_blank\" href=\"<?php echo esc_url('http://docs.wpcomb.com/political'); ?>\" class=\"nav-tab\"><?php echo esc_html__('Documentation', 'political'); ?></a>\n\t\t\t<a href=\"https://wordpress.org/support/theme/political/reviews/#new-post\" class=\"nav-tab\"><?php echo esc_html__('Rate this Theme', 'political'); ?></a>\n\t\t\t<a href=\"<?php echo esc_url(home_url().'/wp-admin/themes.php?page=tgmpa-install-plugins'); ?>\" class=\"nav-tab\"><?php echo esc_html__('Recomended Plugins', 'political'); ?></a>\n\t\t</h2>\n\t\t<div id=\"getting-started\">\n\t\t\t<div class=\"columns-wrapper clearfix\">\n\t\t\t\t<div class=\"column column-half clearfix\">\n\t\t\t\t\t<div class=\"section\">\n\t\t\t\t\t\t<h3 class=\"title\"><?php printf( esc_html__( 'Getting Started with %s', 'political' ), esc_html($theme->display( 'Name' )) ); ?></h3>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<a href=\"https://wpcomb.com/political-theme/\" target=\"_blank\" class=\"button button-primary button-hero\"><?php esc_html_e( 'Get Political PRO now', 'political' ); ?></a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"section\">\n\t\t\t\t\t\t<h4><?php esc_html_e( 'Theme Options', 'political' ); ?></h4>\n\t\t\t\t\t\t<p class=\"about\">\n\t\t\t\t\t\t\t<?php printf( esc_html__( '%s makes use of the Customizer for all theme settings. Click on \"Customize Theme\" to open the Customizer now.', 'political' ), esc_html($theme->display( 'Name' )) ); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<a href=\"<?php echo esc_url(wp_customize_url()); ?>\" class=\"button button-primary\"><?php esc_html_e( 'Customize Theme', 'political' ); ?></a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"column column-half clearfix\">\n\t\t\t\t\t<img class=\"screenshot\" width=\"500\" src=\"<?php echo esc_url(get_template_directory_uri() . '/screenshot.png'); ?>\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<?php\n}", "public function printAboutPage() {\n\t}", "function Render($dirname, $filenumber)\n{\n global $user_dir, $calculated_dir,\n $rootdir, $query, $m, $from, $showed, $pages, $color1, $color2, $explodestring, $maxoccurrences, $desc_header, $desc_footer, $interface_all;\n $f=$rootdir.$dirname;\n ++$showed;\n if ($showed&1)\n echo \"<tr><td bgcolor=$color2>\";\n else\n echo \"<tr><td bgcolor=$color1>\";\n// echo str_replace(\"%1\", $filenumber, $interface_all);\n \n $corrected_dirname = str_replace($calculated_dir,$user_dir, $dirname);\n $base_filename = basename($corrected_dirname);\n echo \"<a href=\\\"$corrected_dirname\\\"> $base_filename</a> \";\n echo \"&nbsp;&nbsp;&nbsp;&nbsp;\";\n\n\n if (IsAllowed($dirname)==2)\n {\n//echo \"third=2: \".$f.\"<br>\";\n\n $fc=file($f);\n $filet=join(\"\", $fc);\n if (preg_match(\"/<title.*>(.*)<\\/title.*>/isU\", $filet, $match))\n {\n // display the title\n echo trim($match[1]);\n }\n // display the content matches\n $s=implode($fc, $explodestring);\n $s=strip_tags($s);\n $fc=explode($explodestring, $s);\n $q=explode(\" \",$query);\n $occurrence=0;\n echo \"<br>$desc_header\";\n for ($i=0; $i<count($fc); ++$i)\n {\n $occ=0;\n $s=strtolower(strip_tags($fc[$i]));\n for ($j=0; $j<count($q); ++$j)\n {\n if (stristr($s, $q[$j]))\n {\n $s=str_replace($q[$j], \"<b>$q[$j]</b>\", $s);\n $occ=1;\n }\n else\n {\n $key=htmlentities($q[$j]);\n if (stristr($s, $key))\n {\n $s=str_replace($key, \"<b>$key</b>\", $s);\n $occ=1;\n }\n }\n }\n if ($occ)\n {\n $occ=0;\n echo \"...$s...\";\n ++$occurrence;\n if ($occurrence > $maxoccurrences) break;\n }\n }\n echo $desc_footer;\n }\n echo \"</td></tr>\\n\";\n}", "function elggadmin_page($page_name=null) {\n global $metatags;\n $metatags .= \"\\n<style type=\\\"text/css\\\">\\n\";\n $metatags .= file_get_contents(dirname(__FILE__).'/../elggadmin.css');\n $metatags .= \"</style>\";\n\n if ($page_name == 'theme') {\n $page = elggadmin_page_theme();\n elggadmin_currentpage('theme');\n } elseif ($page_name == 'frontpage') {\n $page = elggadmin_page_frontpage();\n elggadmin_currentpage('frontpage');\n } elseif ($page_name == 'logs') {\n $page = elggadmin_page_logs();\n elggadmin_currentpage('logs');\n } else {\n $page = elggadmin_page_config();\n elggadmin_currentpage('config');\n }\n\n // add global title\n $page->title = __gettext('Administration') . ' :: ' . $page->title;\n\n return $page;\n\n}", "public function print_template()\n {\n }", "public function print_template()\n {\n }", "public function report_print_page() {\n\n\t\t?>\n\t\t<!doctype html>\n\t\t<html>\n\t\t<head>\n\t\t\t<meta charset=\"utf-8\">\n\t\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\t\t\t<title><?php esc_html_e( 'WPForms Survey Print Preview', 'wpforms-surveys-polls' ); ?> - <?php echo esc_html( sanitize_text_field( $this->form_data['settings']['form_title'] ) ); ?></title>\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t<meta name=\"robots\" content=\"noindex,nofollow,noarchive\">\n\t\t\t<?php\n\t\t\tdo_action( 'admin_enqueue_scripts' );\n\t\t\tdo_action( 'admin_print_scripts' );\n\t\t\tdo_action( 'admin_head' );\n\t\t\t?>\n\t\t</head>\n\t\t<body id=\"wpforms-survey-print-preview\">\n\t\t\t<h1 class=\"header\">\n\t\t\t\t<?php echo esc_html( sanitize_text_field( $this->form_data['settings']['form_title'] ) ); ?>\n\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t<button type=\"button\" id=\"wpforms-survey-print-close\"><?php esc_html_e( 'Close', 'wpforms-surveys-polls' ); ?></button>\n\t\t\t\t\t<button type=\"button\" id=\"wpforms-survey-print\"><?php esc_html_e( 'Print', 'wpforms-surveys-polls' ); ?></button>\n\t\t\t\t</div>\n\t\t\t</h1>\n\t\t\t<div id=\"wpforms-survey-report\">\n\t\t\t\t<?php echo $this->display_loader( ! empty( $_GET['field_id'] ) ); // WPCS: XSS ok. // WPCS: CSRF ok. ?>\n\t\t\t</div>\n\t\t\t<?php do_action( 'admin_print_footer_scripts' ); ?>\n\t\t</body>\n\t\t</html>\n\t\t<?php\n\t\texit();\n\t}", "function print_page_title() {\n global $PAGE_TITLE;\n return isset($PAGE_TITLE) ? $PAGE_TITLE . ' - twebbit' : 'twebbit: the front page (clone) of the internet';\n }", "function showPage()//read and display the header.html file\n\t{\n\t\t$this->tpl->display(\"html/main.tpl.php\");\n\t}", "function display_themes()\n{\n}", "public function create_tpl_page(){\n\t\techo '<div class=\"wrap\">';\n\t\t\n\t\t$cur_tab = (isset($_GET['tab'])) ? $_GET['tab'] : 'email_tpls';\n\t\t\n\t\tstatic::create_tpl_page_tabs($cur_tab);\n\t\tstatic::render_section($cur_tab); \n\t\t\n\t\techo '</div>';\n\t}", "function page_start($title,$relcss) {\necho<<<END\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"it\" lang=\"it\">\n\n\t<head>\n\t\t<title>$title</title>\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"$relcss\">\n\t</head>\n\t\t\n\t<body>\n\t\t<hr />\n\t\t<h2>$title</h2>\n\t\t<hr />\nEND;\n}", "function gpp_get_page_tab_markup() {\n\n\tglobal $gpp_tabs;\n\n\t$page = 'gpp-settings';\n\n\t/*if ( isset( $_GET['page'] ) && 'gpp-reference' == $_GET['page'] ) {\n\t\t$page = 'gpp-reference';\n\t} else {\n\t\t// do nothing\n\t}*/\n\n $current = gpp_get_current_tab();\n\n\tif ( 'gpp-settings' == $page ) {\n $tabs = $gpp_tabs;\n\t} /*else if ( 'gpp-reference' == $page ) {\n $tabs = gpp_get_reference_page_tabs();\n\t}*/\n\n $links = array();\n $i = 0;\n foreach( $tabs as $tab ) {\n\t\tif( isset( $tab['name'] ) )\n\t\t\t$tabname = $tab['name'];\n\t\tif( isset( $tab['title'] ) )\n\t\t\t$tabtitle = $tab['title'];\n if ( $tabname == $current ) {\n $links[] = \"<a class='nav-tab nav-tab-active' href='?page=$page&tab=$tabname&i=$i'>$tabtitle</a>\";\n } else {\n $links[] = \"<a class='nav-tab' href='?page=$page&tab=$tabname&i=$i'>$tabtitle</a>\";\n }\n $i++;\n }\n gpp_utility_links();\n echo '<div id=\"icon-themes\" class=\"icon32\"><br /></div>';\n echo '<h2 class=\"nav-tab-wrapper\">';\n foreach ( $links as $link )\n echo $link;\n echo '</h2>';\n\n}", "public function preview()\n {\n if (!$this->session->userdata('logged_in')) {\n $uri = urlencode(uri_string());\n redirect('/');\n }\n\n $data = $this->get_page_info(array('page_id' => $this->input->get('page_id')));\n if ($data == null) {\n $this->error404();\n return;\n }\n\n $data[\"related_pages\"] = [];\n\n //Load local theme Controller\n echo $this->themeController->render($data);\n }", "function closeHtmlTest($arg = FALSE){\n print \"\n </td>\n <!-- This place could be used to include a file. -->\n <td style=\\\"text-align: center;font-family: Verdana, Arial; font-size: 16px ;font-weight: bold\\\">Page $arg</td>\n </tr>\n </table>\n </body>\n </html>\";\n }", "function display_site_info()\n{\n?>\n <ul>\n <li>Store your files online!</li>\n <li>Safe and Secure File Storage!</li>\n </ul>\n<?php\n}", "function Show()\n {\n \tif($this->finalparsetarget==\"\")\n \t\treturn $this->app->Tpl->FinalParse('page.tpl');\n\telse\n \t\treturn $this->app->Tpl->FinalParse($this->finalparsetarget);\n }", "function show_template() {\n\n\tglobal $template;\n\n\t$path = $template;\n\t$path_part = explode('/', $path);\n\t$path_part = array_slice($path_part, 5);\n\t$new_path = implode(' ', $path_part);\n\t$new_path = str_replace('themes', 'skin', $new_path);\n\t$new_path = str_replace('plugins', 'modules', $new_path);\n\t$new_path = str_replace('.php', '', $new_path);\n\n\treturn $new_path;\n\n}", "function startPage()\r\n {\r\n print(\"<html>\\n\");\r\n print(\"<head>\\n\");\r\n print(\"<title>Listing 24-1</title>\\n\");\r\n print(\"</head>\\n\");\r\n print(\"<body>\\n\");\r\n }", "public function display($file_name){\n\t//First if it has a php tag, we are going to assume that is the best way to go.\n\tif(strpos($file_name, '.php') !== false){\n\t $full_name = 'templates/'.$file_name;\n\t $this->include_template($full_name);\n\t}else if(strpos($file_name, 'template') !== false){\n\t //lets just append a .php to see if that is a template\n\t $full_name = 'templates/'.$file_name.'.php';\n\t $this->include_template($full_name);\n\t}else{\n\t //last chance to get it to appear.\n\t $full_name = 'templates/'.$file_name.'_template.php';\n\t $this->include_template($full_name);\n\t}\n\t\n }", "protected function printPage(): void {\n $this->getPageView()->set('cssFiles', $this->_cssFiles);\n $this->getPageView()->set('jsFiles', $this->_jsFiles);\n if ($this->getAjaxMode()) {\n $this->getPageView()->setTemplate($this->_ajaxTemplate);\n } else {\n $this->getPageView()->setTemplate($this->_pageTemplate);\n }\n $html = $this->getPageView()->render();\n \n $this->getResponse()->setBody($html);\n $this->getResponse()->send();\n }", "function printfile($File, $Ret = false){//cannot use __FILE__ due to caching\n $showdebug = false;\n if (debugmode() || $showdebug) {\n $Return = '<FONT COLOR=\"RED\" STYLE=\"background-color: white;\" TITLE=\"' . $File . '\">' . $File . '</FONT>';\n //if(isset($GLOBALS[\"currentfile\"])){$Return .= \" From: \" . $GLOBALS[\"currentfile\"];}//doesn't work as it expects a flat layout, not hierarchical\n $GLOBALS[\"currentfile\"] = $File;\n if ($Ret) {\n return $Return;\n }\n echo $Return;\n }\n }", "function canadianhifi_preprocess_page(&$vars, $hook) {\n /**\n * Solve 30 CSS files limit in Internet Explorer\n */\n $preprocess_css = variable_get('preprocess_css', 0);\n if (!$preprocess_css) {\n $styles = '';\n foreach ($vars['css'] as $media => $types) {\n $import = '';\n $counter = 0;\n foreach ($types as $files) {\n foreach ($files as $css => $preprocess) {\n $import .= '@import \"'. base_path() . $css .'\";'.\"\\n\";\n $counter++;\n if ($counter == 15) {\n $styles .= \"\\n\".'<style type=\"text/css\" media=\"'. $media .'\">'.\"\\n\". $import .'</style>';\n $import = '';\n $counter = 0;\n }\n }\n }\n if ($import) {\n $styles .= \"\\n\".'<style type=\"text/css\" media=\"'. $media .'\">'.\"\\n\". $import .'</style>';\n }\n }\n if ($styles) {\n $vars['styles'] = $styles;\n }\n }\n\n // If in node edit mode, I must be an admin and I need to see tabs and a specially formatted title.\n $vars['admin_mode'] = ((arg(0) == 'node') && (arg(2))) ? TRUE : FALSE;\n\n // Enable page templates based on vocabulary.\n if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {\n $tid = arg(2);\n $vars['template_files'][] = 'page-term-' . $tid;\n // Get vocabulary id of this term.\n $sql = \"Select vid from {term_data} WHERE tid = '%d'\";\n $vid = db_result(db_query($sql, $tid));\n $vars['template_files'][] = 'page-vocabulary-' . $vid;\n }\n\n // use custom page tpls by nodetype\n if ($node = menu_get_object()) {\n $vars['node'] = $node;\n\t$suggestions = array();\n\t$template_filename = 'page';\n\t$template_filename = $template_filename . '-' . $vars['node']->type;\n $suggestions[] = $template_filename;\n $vars['template_files'] = $suggestions;\n }\n\n // Add page template suggestions based on the aliased path.\n // For instance, if the current page has an alias of about/history/early,\n // we'll have templates of:\n // page-about-history-early.tpl.php\n // page-about-history.tpl.php\n // page-about.tpl.php\n // Whichever is found first is the one that will be used.\n if (module_exists('path')) {\n //$alias = drupal_get_path_alias(str_replace('/edit','',$_GET['q']));\n $alias = drupal_get_path_alias($_GET['q']);\n if ($alias != $_GET['q']) {\n $suggestions = array();\n $template_filename = 'page';\n foreach (explode('/', $alias) as $path_part) {\n $template_filename = $template_filename . '-' . $path_part;\n $suggestions[] = $template_filename;\n }\n $vars['template_files'] = array_merge((array) $suggestions, $vars['template_files']);\n }\n }\n}", "public function renderPrint($filename = \"\") {\n require VIEWS_PATH . '_templates/print.php';\n }", "function get_theme_file_path($file = '')\n{\n}", "function theme_options_html() { \r\n global $theme_options;\r\n?>\r\n<div class=\"wrap\">\r\n <h2><?php echo THEME_NAME.\" \".__(\"HTML Options\"); ?></h2>\r\n\r\n\r\nThis is the Theme Admin Options Page for HTML\r\n\r\n\r\n<div> <!-- end wrap-->\r\n<?php\r\n}", "function outputHTML($file) { \n\t\t$content = file($file);\n\t\t?>\n\t\t<h3><?=$content[0] ?><span><?=$content[1] ?></span></h3>\n\t\t<p><?=$content[2] ?></p>\n\t<?php\n\t}", "function preview_theme()\n{\n}", "function zp_printThemeStatusIconList() {\n\t\tglobal $_zp_themeroot;\n?>\n\t<hr />\n\t<ul class=\"statuslist\">\n\t\t<li class=\"themestatus1\"><a href=\"<?php echo getSearchURL('theme-officially-supported','','','',NULL); ?>\">Officially supported theme*</a></li>\n\t\t<li class=\"themestatus2\"><a href=\"<?php echo getSearchURL('theme-compatible','','','',NULL); ?>\">Generally compatible</a> (3rd party)</li>\n\t\t<li class=\"themestatus3\"><a href=\"<?php echo getSearchURL('theme-partly-compatible','','','',NULL); ?>\">Partly compatible</a> (3rd party)</li>\n\t\t<li class=\"themestatus4\"><a href=\"<?php echo getSearchURL('theme-not-compatible','','','',NULL); ?>\">Currently not compatible</a> (3rd party)</li>\n\t\t<li class=\"themestatus5\"><a href=\"<?php echo getSearchURL('theme-abandoned','','','',NULL); ?>\">No longer provided</a> (3rd party)</li>\n\t</ul>\n\t<p><strong>*</strong><em>included within the release package.</em></p>\n\t<?php\n}", "function print_page_link($kid,$k)\n\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<li class =\"li_level<?php echo $k; ?>\"><a href=\"<?php echo get_post_permalink($kid->ID); ?>\" > <?php echo $kid->post_title; ?></a></li>\n\n\t\t\t\t\t <?php\n\t\t\t\t\t}", "function abs_welcome_page(){\n \n\t$output = '\n\n\t\t<div class = \"abs-welcome-admin-age\">\n\t\t<h2>Welcome to Autobuysell</h2>\n\n\t\t<p>Lorem Ipsum Neque porro quisquam est qui dolorem ipsum quia dolor sit amet <br>\n\t\tThere is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain</p>\n\t\t</div>\n\t';\n\techo $output;\n }", "public function print_url() {\n\t\tif ( get_option( 'permalink_structure' ) ) {\n\t\t\treturn home_url( '/wprm_print/' . $this->id() );\n\t\t} else {\n\t\t\treturn home_url( '?wprm_print=' . $this->id() );\n\t\t}\n\t}", "function html_head ($pagetitle, $pagecss = \"web/css/lincoln.css\", $finish = true) {\n print \"<html>\n <head>\n <title>The Martyred President : $pagetitle</title>\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=iso-8859-1\\\">\n <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$pagecss\\\">\n\t\t<link rel=\\\"shortcut icon\\\" href=\\\"images/lincoln.ico\\\">\";\n if ($finish) print \"\\n</head>\";\n}", "function PrintHead()\n{\n $head = file_get_contents(\"templates/head.html\");\n print $head;\n}", "public function check_page() {\n\n\t\t$output = '';\n\t\t$theme_dir = get_template_directory();\n\n\t\t// update_option( '_wolf_discography_needs_page', true );\n\t\t// delete_option( '_wolf_discography_no_needs_page', true );\n\t\t// delete_option( '_wolf_discography_page_id' );\n\n\t\tif ( get_option( '_wolf_discography_no_needs_page' ) )\n\t\t\treturn;\n\n\t\tif ( ! get_option( '_wolf_discography_needs_page' ) )\n\t\t\treturn;\n\n\t\tif ( -1 == wolf_discography_get_page_id() && ! isset( $_GET['wolf_discography_create_page'] ) ) {\n\n\t\t\tif ( isset( $_GET['skip_wolf_discography_setup'] ) ) {\n\t\t\t\tdelete_option( '_wolf_discography_needs_page' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate_option( '_wolf_discography_needs_page', true );\n\n\t\t\t$message = '<strong>Wolf Discography</strong> ' . sprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t__( 'says : <em>Almost done! you need to <a href=\"%1$s\">create a page</a> for your releases or <a href=\"%2$s\">select an existing page</a> in the plugin settings</em>.', 'wolf-discography' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t\t\t'title' => array(),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'br' => array(),\n\t\t\t\t\t\t\t'em' => array(),\n\t\t\t\t\t\t\t'strong' => array(),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tesc_url( admin_url( '?wolf_discography_create_page=true' ) ),\n\t\t\t\t\tesc_url( admin_url( 'edit.php?post_type=release&page=wolf-discography-settings' ) )\n\t\t\t);\n\n\t\t\t$message .= sprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t__( '<br><br>\n\t\t\t\t\t<a href=\"%1$s\" class=\"button button-primary\">Create a page</a>\n\t\t\t\t\t&nbsp;\n\t\t\t\t\t<a href=\"%2$s\" class=\"button button-primary\">Select an existing page</a>\n\t\t\t\t\t&nbsp;\n\t\t\t\t\t<a href=\"%3$s\" class=\"button\">Skip setup</a>', 'wolf-discography' ),\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t\t\t'title' => array(),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'br' => array(),\n\t\t\t\t\t\t\t'em' => array(),\n\t\t\t\t\t\t\t'strong' => array(),\n\t\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t\tesc_url( admin_url( '?wolf_discography_create_page=true' ) ),\n\t\t\t\t\tesc_url( admin_url( 'edit.php?post_type=release&page=wolf-discography-settings' ) ),\n\t\t\t\t\tesc_url( admin_url( '?skip_wolf_discography_setup=true' ) )\n\t\t\t);\n\n\t\t\t$output = '<div class=\"updated wolf-admin-notice wolf-plugin-admin-notice\"><p>';\n\n\t\t\t\t$output .= $message;\n\n\t\t\t$output .= '</p></div>';\n\n\t\t\techo $output;\n\t\t} else {\n\n\t\t\tdelete_option( '_wolf_discography_need_page' );\n\t\t}\n\n\t\treturn false;\n\t}", "function bodyFooterFilename()\r\n{\r\n\r\n/*\r\n global $gPHPscript;\r\n\r\n echo '<p><a href=\"', htmlspecialchars($_SERVER['REQUEST_URI']), '\">',$_SERVER['PHP_SELF'],'</a></p>';\r\n*/\r\n}", "function xcms_get_info_file_name($page_id = false)\n{\n global $SETTINGS;\n if ($page_id === false)\n {\n global $pageid;\n $page_id = $pageid;\n }\n return \"{$SETTINGS[\"content_dir\"]}cms/pages/$page_id/info\";\n}", "function printBottom(){?>\n\t\t<div>\n\t\t\t<p>This page is for single nerds to meet and date each other! \n\t\t\tType in your personal information and wait for the nerdly luv to begin! \n\t\t\tThank you for using our site.</p>\n\t\t\t<p>Results and page (C) Copyright NerdLuv Inc.</p>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"index.php\">\n\t\t\t\t\t\t<img src=\"hw4_images/transparent.png\" class=\"back\" width=\"64px\" height=\"64px\"/>\n\t\t\t\t\t\tBack to front page\n\t\t\t\t</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div id=\"w3c\">\n\t\t\t<a href=\"https://webster.cs.washington.edu/validate-html.php\">\n\t\t\t\t<img src=\"hw4_images/w3c_html.png\" alt=\"Valid HTML\" width=\"71px\" height=\"25px\"/>\n\t\t\t</a>\n\t\t\t<a href=\"https://webster.cs.washington.edu/validate-css.php\">\n\t\t\t\t<img src=\"hw4_images/w3c_css.png\" alt=\"Valid CSS\" width=\"71px\" height=\"25px\"/>\n\t\t\t</a>\n\t\t</div>\n\t</body>\n</html>\n<script src=\"proto_homepage_opt.js\" type=\"text/javascript\" async=\"async\"></script>\n<?php }", "public function printHelpPage() {\n\t}", "function displayResultPage($display_content){\n if(file_exists(DISPLAY_TEMPLATE))\n {\n if(!@($str_display_content = file_get_contents(DISPLAY_TEMPLATE)))\n {\n sleep(DELAY_SEC);\n echo __LINE__;\n\n return;\n }\n $str_display_content = str_replace(\"\\$\\$content\\$\\$\", $display_content, $str_display_content);\n echo $str_display_content;\n }\n else\n {\n echo \"<html><head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\";\n echo \"</head><body>\";\n echo $display_content;\n echo \"</body></html>\";\n }\n}", "function displayResultPage($display_content){\n if(file_exists(DISPLAY_TEMPLATE))\n {\n if(!@($str_display_content = file_get_contents(DISPLAY_TEMPLATE)))\n {\n sleep(DELAY_SEC);\n echo __LINE__;\n\n return;\n }\n $str_display_content = str_replace(\"\\$\\$content\\$\\$\", $display_content, $str_display_content);\n echo $str_display_content;\n }\n else\n {\n echo \"<html><head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\";\n echo \"</head><body>\";\n echo $display_content;\n echo \"</body></html>\";\n }\n}", "public function print_style(){\n\t\t\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . plugins_url( basename( dirname( __FILE__ ) ) ) . '/quicklogin.css' . '\" />';\n\t\t}", "function theme_uri($path, $echo = true) {\n\t$uri = get_template_directory_uri() . $path;\n\tif ($echo) {\n\t\techo($uri);\n\t} else {\n\t\treturn $uri;\n\t}\n}", "function page_header5($color,$title,$header ='Welcome'){\n print '<html><head><title>Welcome to '.$title .'</title></head>';\n print '<body bgcolor=\"#'. $color .'\">';\n print \"<h1>$header</h1>\";\n}", "function template_common_prologue($args)\n{\n\tglobal $WikiName, $HomePage, $WikiLogo, $MetaKeywords, $MetaDescription;\n\tglobal $StyleScript, $SeparateTitleWords, $SeparateHeaderWords, $SearchURL, $FindScript;\n\n\t//echo \"<p>template_common_prologue(\".print_r($args,True).\")</p>\";\n\t$keywords = ' ' . html_split_name($args['headlink']);\n\t$keywords = str_replace('\"', '&quot;', $keywords);\n\n//ob_start(); // Start buffering output.\n/*\n\tif($SeparateTitleWords)\n\t\t{ $args['title'] = html_split_name($args['title']); }\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta name=\"KEYWORDS\" content=\"<?php print $MetaKeywords . $keywords; ?>\" />\n<meta name=\"DESCRIPTION\" content=\"<?php print $MetaDescription; ?>\" />\n<?php\n\tif($args['norobots'])\n\t{\n?>\n<meta name=\"ROBOTS\" content=\"NOINDEX, NOFOLLOW\" />\n<?php\n\t}\n?>\n<link rel=\"STYLESHEET\" href=\"<?php print $StyleScript; ?>\" type=\"text/css\" />\n<title><?php print $args['title'] . ' - ' . $WikiName; ?></title>\n</head>\n<body>\n<?php\n*/\n\n/* <link rel=\"stylesheet\" href=\"<?php echo $GLOBALS['egw_info']['server']['webserver_url'].'/wiki/template/wiki.css'; ?>\" type=\"text/css\" /> */\n?>\n<div align=\"left\">\n<div id=\"header\">\n\t<?php /* removed logo for now: TODO show it on extern site\n\t<div class=\"logo\">\n\t <a href=\"<?php print viewURL($HomePage); ?>\"><img\n\t\tsrc=\"<?php print $WikiLogo; ?>\" alt=\"[Home]\" /></a>\n\t</div> */ ?>\n\t<h1 style=\"margin:0px;\">\n<?php\n\t\tprint $args['heading'];\n\t\tif($args['headlink'] != '')\n\t\t{\n?>\n\t\t<a class=\"title\" href=\"<?php print findURL($args['headlink']); ?>\">\n<?php\n\t$title = get_title($args['headlink']);\n\t\tif($SeparateHeaderWords)\n\t\t\t{ print html_split_name($title); }\n\t\telse\n\t\t\t{ print $title; }\n?></a>\n<?php\n\t\t}\n\t\tprint $args['headsufx'];\n?>\n\t</h1>\n<?php\n\tif($args['toolbar'])\n\t{ \n\t\tif(!$args['nosearch']) \n\t\t{ \n\t\t\techo '<form method=\"POST\" action=\"'.$FindScript.'\" name=\"thesearch\">\n\t\t\t\t<div class=\"form\">'.\"\\n\";\n\t\t} \n\t\tprint html_toolbar_top();\n\t\t\n\t\tif(!$args['nosearch']) \n\t\t{\n\t\t\techo ' | <input type=\"text\" name=\"search\" size=\"20\" /> <input type=\"submit\" value=\"'.htmlspecialchars(lang('Search')).'\" />';\n\t\t}\n\t\techo \"\\n<hr align=left width=99% />\\n\";\n\t\t\n\t\tif(!$args['nosearch']) { \n\t\t\techo \"</div>\\n</form>\\n\";\n\t\t} \n\t}\n\t?>\n</div>\n<?php\n}", "function _preview_theme_template_filter()\n{\n}", "function print_content() {\n //make sure anyone trying to access this page has managewiki capabilities\n require_capability('mod/socialwiki:managewiki', $this->modcontext, NULL, true, 'noviewpagepermission', 'socialwiki');\n\n //update wiki cache if timedout\n $page = $this->page;\n if ($page->timerendered + SOCIALWIKI_REFRESH_CACHE_TIME < time()) {\n $fresh = socialwiki_refresh_cachedcontent($page);\n $page = $fresh['page'];\n }\n\n //dispaly admin menu\n echo $this->wikioutput->menu_admin($this->page->id, $this->view);\n\n //Display appropriate admin view\n switch ($this->view) {\n case 1: //delete page view\n $this->print_delete_content($this->listorphan);\n break;\n case 2: //delete version view\n $this->print_delete_version();\n break;\n default: //default is delete view\n $this->print_delete_content($this->listorphan);\n break;\n }\n }", "public function printHeader() {\n print_r( '\n<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->getThemeUri() . 'fonts/font-awesome/css/font-awesome.min.css\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->getThemeUri() . 'css/style.css\">' );\n }", "public function CreateHTML($php_file_path, $show_in_browser=true) {\r\n // подготовка переданных параметров\r\n $params = Request::GetParameters();\r\n foreach( $params as $key => $value ) {\r\n $$key = $value;\r\n }\r\n // включение буферизации\r\n ob_start();\r\n include($php_file_path);\r\n $buffer = ob_get_contents();\r\n ob_end_clean();\r\n if(empty($showpage['adminpanel'])){\r\n // раскрытие внутренних вызовов (блоки контента)\r\n $mcount = preg_match_all( '!{(block|page):\\s?([^}\\s]+)\\s*\\}!i', $buffer, $matches, PREG_SET_ORDER);\r\n if($mcount){\r\n $backup_env_params = $params; // сохраняем все текущие параметры (могут быть перезаписаны внутри блока)\r\n foreach($matches as $match){\r\n $pg = new Page($match[2]);\r\n $cont = $pg->Render(false);\r\n $buffer = str_replace( $match[0], $cont, $buffer );\r\n }\r\n Response::SetParametersFromArray($backup_env_params); // восстанавливаем текущие параметры\r\n }\r\n // раскрытие внутренних подстановок констант и переменных\r\n $mcount = preg_match_all( '!{(\\$*)([\\w\\_]+[\\w\\d\\_]*)}!i', $buffer, $matches, PREG_SET_ORDER);\r\n if($mcount){\r\n foreach($matches as $match){\r\n if(empty($match[2]))\r\n $val = defined($match[2]) ? constant($match[2]) : \"\";\r\n else\r\n $val = isset($$match[2]) ? $$match[2] : \"\";\r\n $buffer = str_replace( $match[0], $val, $buffer );\r\n }\r\n }\r\n }\r\n if($this->tpl_compact) $buffer = $this->CompressTPL( $buffer );\r\n if($show_in_browser) echo $buffer;\r\n return $buffer;\r\n }", "function output_item ($filename,$word,$pagenum) {\n $sfx = \"png\";\n $dir=\"/scans/SCHScan/SCHScan\" . $sfx . \"/\";\n $outfile = $dir . $filename;\n if ($pagenum != '') {\n echo \"$pagenum\";\n echo \"&nbsp;&nbsp;\";\n }\n // page size = 2568px × 3780px\n// $width = \"700\"; $height = \"1030\";\n// $width = \"900\"; $height = \"1325\";\n $width = \"1284\"; $height = \"1890\";\n echo \"<a href=\\\"/cgi-bin/serveimg.pl?file=$outfile&width=$width&height=$height\\\"\";\n echo \" target=\\\"output\\\">$word</a>\";\n echo \"<br />\";\n echo \"\\n\";\n }", "function displayXFTemplate() {\n $breadCrumb = buildBreadCrumbs();\n// echo $breadCrumb;\n addScript(\".breadBoxTop\", \"html\", $breadCrumb);\n addScript(\".breadBoxBottom\", \"html\", $breadCrumb);\n addScript(\".tabLinks\", \"html\",\"<ul class='secondaryContent blockLinksList'><li><a href='forums/-/mark-read?date=1316264858'>Mark All Forums Read</a></li><li><a href='search/?type=post'>Search Forums</a></li><li><a href='watched/threads'>Watched Threads</a></li></ul>\");\n global $templateParts;\n $templateParts['middle'] = str_replace(\"<!-- main template -->\", '<div class=\"mainContainer XenDynamicMC\">\n <div class=\"mainContent\">\n </div>\n </div>\n <aside>\n </aside>', $templateParts['middle']);\n echo $templateParts['middle'];\n}", "function offline_template()\n{\nreturn <<<EOF\n<html>\n<head>\n\n<title>Site Kapalı</title>\n\n<style type=\"text/css\">\n\nbody { \nbackground-color:\t#ffffff; \nmargin:\t\t\t\t50px; \nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size:\t\t\t11px;\ncolor:\t\t\t\t#000;\nbackground-color:\t#fff;\n}\n\na {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-weight:\t\tbold;\nletter-spacing:\t\t.09em;\ntext-decoration:\tnone;\ncolor: #330099;\nbackground-color: transparent;\n}\n \na:visited {\ncolor:\t\t\t\t#330099;\nbackground-color:\ttransparent;\n}\n\na:hover {\ncolor:\t\t\t\t#000;\ntext-decoration: underline;\nbackground-color:\ttransparent;\n}\n\n#content {\nborder:\t\t\t\t#999999 1px solid;\npadding:\t\t\t22px 25px 14px 25px;\n}\n\nh1 {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-weight:\t\tbold;\nfont-size:\t\t\t14px;\ncolor:\t\t\t\t#000;\nmargin-top: \t\t0;\nmargin-bottom:\t\t14px;\n}\n\np {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size: \t\t\t12px;\nfont-weight: \t\tnormal;\nmargin-top: \t\t12px;\nmargin-bottom: \t\t14px;\ncolor: \t\t\t\t#000;\n}\n</style>\n\n</head>\n\n<body>\n\n<div id=\"content\">\n\n<h1>Site Kapalı</h1>\n\n<p>Sitemiz geçici bir süre için devre dışıdır.</p>\n\n</div>\n\n</body>\n\n</html>\nEOF;\n}", "function wp_print_file_editor_templates()\n{\n}", "function install_print_help_page($help) {\n global $CFG, $OUTPUT; //TODO: MUST NOT USE $OUTPUT HERE!!!\n\n @header('Content-Type: text/html; charset=UTF-8');\n @header('X-UA-Compatible: IE=edge');\n @header('Cache-Control: no-store, no-cache, must-revalidate');\n @header('Cache-Control: post-check=0, pre-check=0', false);\n @header('Pragma: no-cache');\n @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');\n @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');\n\n echo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">';\n echo '<html dir=\"'.(right_to_left() ? 'rtl' : 'ltr').'\">\n <head>\n <link rel=\"shortcut icon\" href=\"theme/clean/pix/favicon.ico\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"'.$CFG->wwwroot.'/install/css.php\" />\n <title>'.get_string('installation','install').'</title>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n </head><body>';\n switch ($help) {\n case 'phpversionhelp':\n print_string($help, 'install', phpversion());\n break;\n case 'memorylimithelp':\n print_string($help, 'install', @ini_get('memory_limit'));\n break;\n default:\n print_string($help, 'install');\n }\n echo $OUTPUT->close_window_button(); //TODO: MUST NOT USE $OUTPUT HERE!!!\n echo '</body></html>';\n die;\n}", "public final function print_template()\n {\n }", "function header_blueprint() {?>\n <link rel=\"stylesheet\" href=\"<?php bloginfo(\"wpurl\"); ?>/wp-content/themes/bluebox/blueprint/print.css\" type=\"text/css\" media=\"print\" />\n <!--[if IE]><link rel=\"stylesheet\" href=\"<?php bloginfo(\"wpurl\"); ?>/wp-content/themes/bluebox/blueprint/ie.css\" type=\"text/css\" media=\"screen, projection\" /><![endif]--> \n\n<?php }", "public static function check_page(){NJIMEDIA_WP_Utils::page_check();}", "public function showPage() {\n\t\t$this->tpl->displayTemplate();\n\t}", "function fileHyercy( $file ){\n\t\tif( !$theme_file = locate_template( array( 'go-live-update-urls/' . $file ) ) ){\n\t\t\t$theme_file = GLUU_VIEWS_DIR . $file;\n\t\t}\n\n\t\treturn $theme_file;\n\n\t}", "function showErrorPage($error)\n\t{\n\t\tinclude cms_join_path(CMS_INSTALL_BASE, 'templates', 'installer_start.tpl');\n\t\techo '<p class=\"error\">' . $error . '</p>';\n\t\tinclude cms_join_path(CMS_INSTALL_BASE, 'templates', 'installer_end.tpl');\n\t}", "function display_template()\n{\n if (!is_readable(func_get_arg(0))) { \n throw new \\RuntimeException(sprintf(\n 'template file %s is not readable', func_get_arg(0)\n ));\n } \n extract(func_get_arg(1));\n include func_get_arg(0);\n}", "function display_about_page() {\n require_once SCANTOWP_DIR.'templates/about.php';\n}", "function afficherPage()\n {\n echo \"<h1>TITRE1</h1>\";\n }", "public function print_page($text = '')\n {\n main()->no_graphics(true);\n return print tpl()->parse('system/common/print_page', [\n 'text' => $text,\n 'path_to_tpls' => WEB_PATH . tpl()->TPL_PATH,\n ]);\n }", "function zp_printThemeStatusIcon() {\n\tglobal $_zp_current_album, $_zp_current_zenpage_news, $_zp_themeroot, $_zp_gallery_page;\n\t$albumobj = '';\n\tswitch($_zp_gallery_page) {\n\t\tcase 'album.php':\n\t\tcase 'search.php':\n\t\t\t$albumobj = $_zp_current_album;\n\t\t\t$iconclass = 'themeicon';\n\t\t\tbreak;\n\t\tcase 'news.php':\n\t\t\t$albumobj = $_zp_current_zenpage_news;\n\t\t\t$iconclass = 'themeicon-news';\n\t\t\tbreak;\n\t}\n\tif(is_object($albumobj)) {\n\t\tif($albumobj->hasTag('theme-officially-supported')) {\n\t\t\techo \"<img class='\".$iconclass.\"' src='\".$_zp_themeroot.\"/images/accept_green.png' alt='official and included theme' />\";\n\t\t}\n\t\tif($albumobj->hasTag('theme-compatible')) {\n\t\t\techo \"<img class='\".$iconclass.\"' src='\".$_zp_themeroot.\"/images/accept_blue.png' alt='generally compatible 3rd party theme'/>\";\n\t\t}\n\t\tif($albumobj->hasTag('theme-partly-compatible')) {\n\t\t\techo \"<img class='\".$iconclass.\"' src='\".$_zp_themeroot.\"/images/question_orange.png' alt='partly compatible 3rd party theme' />\";\n\t\t}\n\t\tif($albumobj->hasTag('theme-not-compatible')) {\n\t\t\techo \"<img class='\".$iconclass.\"' src='\".$_zp_themeroot.\"/images/stop_round.png' alt='incompatible 3rd party theme' />\";\n\t\t}\n\t\tif($albumobj->hasTag('theme-abandoned')) {\n\t\t\techo \"<img class='\".$iconclass.\"' src='\".$_zp_themeroot.\"/images/cancel_round.png' alt='no longer provided 3rd party theme' />\";\n\t\t}\n\t}\n}", "public function getTemplateFile()\n {\n return 'page.tpl';\n }", "function Main_page() \n{\n return html('main.html.php');\n}", "function printer()\n\t{\n\t\t$this->load->helper('typography');\n\t\t$uri = $this->uri->segment(3, 0);\n\t\tif($uri<>'' && $uri<>'index') \n\t\t{\n\t\t\t$uri = $this->input->xss_clean($uri);\n\t\t\t$data['article']=$this->article_model->get_article_by_uri($uri);\n\t\t\t$data['article']->article_description = parse_smileys($data['article']->article_description, $this->config->item('base_url').\"/images/\");\n\t\t\t$data['title'] = $data['article']->article_title. ' | '. $this->init_model->get_setting('site_name');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data='';\n\t\t}\n\t\techo $this->init_model->load_body('printer', 'front', $data);\n\t}", "function output_footer($pageName){\n echo \t\t'<div class=\"footer-main-div\">';\n echo \t\t'</div>';\n echo \t\t'<div class=\"footer-bottom\">';\n echo \t\t\t'<p> Copyright© E-Commerce Website.All rights reserved</p>';\n echo \t\t'</div>';\n echo \t'</body>';\n echo '</html>';\n}" ]
[ "0.6218707", "0.6164907", "0.6129963", "0.605903", "0.60570806", "0.6056052", "0.6049597", "0.59757304", "0.5902433", "0.5901056", "0.5885756", "0.588031", "0.58783036", "0.58615375", "0.58215684", "0.5771414", "0.57142377", "0.5701565", "0.5700658", "0.56927615", "0.56789684", "0.56462014", "0.5636106", "0.56220883", "0.56202114", "0.5594584", "0.5585291", "0.5558188", "0.5551463", "0.5548171", "0.554537", "0.5542683", "0.5527885", "0.55253077", "0.5523299", "0.55011904", "0.55003715", "0.5499378", "0.5486003", "0.5472578", "0.5471941", "0.54485834", "0.54475135", "0.54439664", "0.54329634", "0.54256463", "0.54247004", "0.54244554", "0.5417174", "0.5416733", "0.54142493", "0.5412242", "0.54118896", "0.5410068", "0.54069865", "0.54068434", "0.5406452", "0.54063165", "0.54044724", "0.5392502", "0.5392311", "0.5385546", "0.53803563", "0.5379722", "0.53687227", "0.5367271", "0.53665376", "0.5365929", "0.53646064", "0.5362467", "0.5362252", "0.5362252", "0.53602976", "0.5358143", "0.53443545", "0.53434855", "0.53388524", "0.53382045", "0.53377664", "0.5335753", "0.5333278", "0.53328425", "0.5327085", "0.5327", "0.53219146", "0.53211135", "0.5319673", "0.53150064", "0.53106314", "0.53051126", "0.5305081", "0.5304882", "0.5303434", "0.5301949", "0.53006864", "0.5300645", "0.5300247", "0.52975947", "0.5296089", "0.52957505" ]
0.7087872
0
page_check List output of each of WP's conditional tags (like is_page() )
page_check Список вывода каждого из условных тегов WP (например, is_page() )
public static function check_page(){NJIMEDIA_WP_Utils::page_check();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conditional_widgets_page_checkboxes($selected=array()) {\n\techo \"<ul class='conditional-widget-selection-list'>\";\n\twp_list_pages( array( 'title_li' => null, 'walker' => new Conditional_Widgets_Walker_Page_Checklist($selected) ) );\n\techo \"</ul>\";\n}", "public function hasPages() {}", "function wpmanual_has_pages( $args = '' ) {\r\n\tglobal $wpmanual_template;\r\n\t\r\n\t$manual_page_in_cache = false;\r\n\r\n\t// This keeps us from firing the query more than once\r\n\tif ( empty( $wpmanual_template ) ) {\r\n\t\t\r\n\t\t/***\r\n\t\t * Set the defaults for the parameters you are accepting via the \"bp_checkins_has_places()\"\r\n\t\t * function call\r\n\t\t */\r\n\t\t$page = $src = false;\r\n\t\t$ppage = -1;\r\n\r\n\r\n\t\tif( wpmanual_is_search() ) {\r\n\t\t\t$ppage = 10;\r\n\t\t\t$page = !empty( $_GET['mpage'] ) ? $_GET['mpage'] : 1;\r\n\t\t\t$src = wpmanual_sanitize_search( 'input' );\r\n\t\t}\r\n\r\n\t\t$defaults = array(\r\n\t\t\t'id' => false,\r\n\t\t\t'name' => false,\r\n\t\t\t'per_page'\t=> $ppage,\r\n\t\t\t'paged' => $page,\r\n\t\t\t'search' => $src,\r\n\t\t\t'orderby' => false,\r\n\t\t\t'order' => 'ASC'\r\n\t\t);\r\n\t\t\r\n\t\t$r = wp_parse_args( $args, $defaults );\r\n\t\textract( $r, EXTR_SKIP );\r\n\t\t\r\n\t\tif( wpmannual_is_page_preview() ) {\r\n\r\n\t\t\t$preview_page = wp_cache_get( 'manual_page_preview', 'wpmanual_preview_page' );\r\n\t\t\t\r\n\t\t\tif( false !== $preview_page )\r\n\t\t\t\t$manual_page_in_cache = $preview_page;\r\n\r\n\t\t} else if( $manual_page = wpmanual_get_manual_page_name() ) {\r\n\t\t\t\t\r\n\t\t\t$name = $manual_page;\r\n\t\t\t$page = wp_cache_get( 'manual_page_query', 'wpmanual_single_page' );\r\n\t\t\t\r\n\t\t\tif( false !== $page && $page->query->post->post_name == $manual_page )\r\n\t\t\t\t$manual_page_in_cache = $page;\r\n\r\n\t\t} else {\r\n\t\t\tif( false !== wp_cache_get( 'manual_page_query', 'wpmanual_single_page' ) )\r\n\t\t\t\twp_cache_delete( 'manual_page_query', 'wpmanual_single_page' );\r\n\t\t}\r\n\t\t\r\n\t\tif( empty( $manual_page_in_cache ) ) {\r\n\t\t\t\r\n\t\t\t$all_page = wp_cache_get( 'manual_table_content', 'wpmanual_all_page' );\r\n\r\n\t\t\tif( false !== $all_page && empty( $search ) && -1 == $per_page && empty( $paged ) && 'menu_order' == $orderby && 'ASC' == $order ) {\r\n\t\t\t\t$wpmanual_template = new stdClass();\r\n\t\t\t\t$wpmanual_template->query = $all_page;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$wpmanual_template = new WP_Manual_Page();\r\n\r\n\t\t\t\tif( !empty($search) )\r\n\t\t\t\t\t$wpmanual_template->get( array( 'paged' => $paged, 'per_page' => $per_page, 'search' => $search, 'order' => $order ) );\r\n\t\t\t\telse\r\n\t\t\t\t\t$wpmanual_template->get( array( 'id' => $id, 'name' => $name, 'per_page' => $per_page, 'paged' => $paged, 'orderby' => $orderby, 'order' => $order ) );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\r\n\t\t} else {\r\n\t\t\t$wpmanual_template = $manual_page_in_cache;\r\n\t\t}\r\n\t\r\n\t}\r\n\r\n\treturn apply_filters( 'wpmanual_has_pages', $wpmanual_template->have_posts() );\r\n}", "function wpsc_has_pages() {\n\tif(1 == get_option('use_pagination'))\n\t\treturn true;\n\telse\n\t\treturn false;\n\n}", "function wc_terms_and_conditions_page_content()\n {\n }", "function get_page_statuses()\n{\n}", "public function hasPages(): bool;", "public function hasVisiblePages() {}", "private function required_pages_ready() {\n\n\t\tglobal $pmpro_pages;\n\n\t\t$page_test = true;\n\n\t\tif ( WP_DEBUG ) {\n\t\t\terror_log( \"Page List: \" . print_r( $pmpro_pages, true ) );\n\t\t}\n\n\t\tforeach ( $pmpro_pages as $p ) {\n\n\t\t\t$pg = get_post( $p, ARRAY_A );\n\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Page: {$p} - Exists: \" . ( ! empty( $pg ) ? 'True' : 'False' ) );\n\t\t\t}\n\n\t\t\t$page_test = $page_test && ( ! empty( $pg ) );\n\t\t}\n\n\t\tif ( WP_DEBUG ) {\n\t\t\terror_log( \"All PMPro pages are ready & configured: \" . ( $page_test ? 'Yes' : 'No' ) );\n\t\t}\n\n\t\treturn $page_test;\n\t}", "public function isPage();", "public function amOnPagesPage() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Condition('amOnPagesPage', func_get_args()));\n }", "function pages($page) {\n\n $page_array = array(FILENAME_DEFAULT, FILENAME_PRODUCT_INFO, FILENAME_INFORMATION);\n return in_array($page, $page_array);\n\n }", "public function has_terms_and_conditions_page_id()\n {\n }", "function show_page_status() {\r\n\t// Get page status\r\n\t$page_status = get_page_status();\r\n\r\n\t// Prepare html variable\r\n\t$html = '';\r\n\r\n\t// If we have something inside status\r\n\tif ( $page_status ) {\r\n\t\t// Create page status element\r\n\t\t$html .= '<div id=\"page-status-content\" class=\"page-status-content ' . $page_status->class . '\">';\r\n\t\t$html .= \t'<p>' . $page_status->message . '</p>';\r\n\t\t$html .= '</div>';\r\n\t}\r\n\t\r\n\treturn $html;\r\n}", "function wc_admin_is_registered_page()\n {\n }", "function show_page_nav() {\n global $wp_query;\n return ($wp_query->max_num_pages > 1);\n}", "function pts_allowed_pages($pages)\n {\n }", "public function hasPages(){\n return $this->_has(1);\n }", "function aps_log_datos_pagina()\n{\n\n\t$lista = '404,page,single,archive,attachment,front_page,home,search,category,tag,tax';\n\t$lista = preg_split('/,/', $lista);\n\t\n\techo '<!-- ';\n\tforeach($lista as $el)\n\t{\n\t\t$function = 'is_'.$el;\n\t\techo ' is_'.$el.'['; print_r($function()); echo '] ';\n\t}\n echo '<br>';\n echo 'is_post_type_archive['.is_post_type_archive('aps_project').']';\n echo 'is_tax_project_category['.is_tax('project_category').']';\n echo 'is_tax_project_skill['.is_tax('project_skill').']';\n echo 'is_tax_project_tag['.is_tax('project_tag').']';\n\t\n\tif (is_page() || is_single()){\n\t\tglobal $post;\n\t\techo '<p>'.$post->post_title.'</p>';\n\t}\n\t\n\tglobal $aps_config;\n\techo '<pre>'; print_r($aps_config['layout']); echo '</pre>';\t\n\techo ' -->';\n}", "function suffusion_show_page_nav() {\r\n\tglobal $wp_query;\r\n\treturn ($wp_query->max_num_pages > 1);\r\n}", "function is_page( $page = '' ) {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_page( $page );\n}", "public function getIsOnPage() {\n $parts = explode('.', $this->path);\n return ($parts[sizeof($parts) - 4] == \"PageTypes\");\n }", "function wc_list_pages($pages)\n {\n }", "private function checkPostsPage() {\r\r\n return is_home() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_for_posts');\r\r\n }", "protected function currentPageHasSubPages() {}", "public function has_published_pages()\n {\n }", "function has_multiple_pages() {\n global $wp_query;\n return ( $wp_query->max_num_pages > 1 );\n}", "public function pagesOnly() {}", "function pages_read( $echo = true ) {\r\n global $book;\r\n\tif ( $book->cpages == 0 )\r\n\t $pages_completed = apply_filters('pages_read', __('Planned Book', MRLTD));\r\n\telseif ( $book->cpages == $book->tpages )\r\n\t $pages_completed = apply_filters('pages_read', __('Completed Book', MRLTD));\r\n else\r\n $pages_completed = apply_filters('pages_read', $book->cpages . __(' of ', MRLTD) . $book->tpages . __(' Pages Read', MRLTD));\r\n\r\n if ( $echo )\r\n echo $pages_completed;\r\n\treturn $pages_completed;\r\n}", "public function is_own_page();", "function is_paged() {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_paged();\n}", "public function check_page() {\n\n\t\t$output = '';\n\t\t$theme_dir = get_template_directory();\n\n\t\t// update_option( '_wolf_discography_needs_page', true );\n\t\t// delete_option( '_wolf_discography_no_needs_page', true );\n\t\t// delete_option( '_wolf_discography_page_id' );\n\n\t\tif ( get_option( '_wolf_discography_no_needs_page' ) )\n\t\t\treturn;\n\n\t\tif ( ! get_option( '_wolf_discography_needs_page' ) )\n\t\t\treturn;\n\n\t\tif ( -1 == wolf_discography_get_page_id() && ! isset( $_GET['wolf_discography_create_page'] ) ) {\n\n\t\t\tif ( isset( $_GET['skip_wolf_discography_setup'] ) ) {\n\t\t\t\tdelete_option( '_wolf_discography_needs_page' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate_option( '_wolf_discography_needs_page', true );\n\n\t\t\t$message = '<strong>Wolf Discography</strong> ' . sprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t__( 'says : <em>Almost done! you need to <a href=\"%1$s\">create a page</a> for your releases or <a href=\"%2$s\">select an existing page</a> in the plugin settings</em>.', 'wolf-discography' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t\t\t'title' => array(),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'br' => array(),\n\t\t\t\t\t\t\t'em' => array(),\n\t\t\t\t\t\t\t'strong' => array(),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tesc_url( admin_url( '?wolf_discography_create_page=true' ) ),\n\t\t\t\t\tesc_url( admin_url( 'edit.php?post_type=release&page=wolf-discography-settings' ) )\n\t\t\t);\n\n\t\t\t$message .= sprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t__( '<br><br>\n\t\t\t\t\t<a href=\"%1$s\" class=\"button button-primary\">Create a page</a>\n\t\t\t\t\t&nbsp;\n\t\t\t\t\t<a href=\"%2$s\" class=\"button button-primary\">Select an existing page</a>\n\t\t\t\t\t&nbsp;\n\t\t\t\t\t<a href=\"%3$s\" class=\"button\">Skip setup</a>', 'wolf-discography' ),\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t\t\t'title' => array(),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'br' => array(),\n\t\t\t\t\t\t\t'em' => array(),\n\t\t\t\t\t\t\t'strong' => array(),\n\t\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t\tesc_url( admin_url( '?wolf_discography_create_page=true' ) ),\n\t\t\t\t\tesc_url( admin_url( 'edit.php?post_type=release&page=wolf-discography-settings' ) ),\n\t\t\t\t\tesc_url( admin_url( '?skip_wolf_discography_setup=true' ) )\n\t\t\t);\n\n\t\t\t$output = '<div class=\"updated wolf-admin-notice wolf-plugin-admin-notice\"><p>';\n\n\t\t\t\t$output .= $message;\n\n\t\t\t$output .= '</p></div>';\n\n\t\t\techo $output;\n\t\t} else {\n\n\t\t\tdelete_option( '_wolf_discography_need_page' );\n\t\t}\n\n\t\treturn false;\n\t}", "function pages() {\r\n return $GLOBALS['have_items']['pages'];\r\n }", "function has_subpages() {\n\n\tglobal $post;\n\n\tif ( $post->post_parent ) {\n\t\t$children = wp_list_pages(\"depth=1&title_li=&child_of=\".$post->post_parent.\"&echo=0&post_type=\".$post->post_type.\"\");\n\t} else {\n\t\t$children = wp_list_pages(\"depth=1&title_li=&child_of=\".$post->ID.\"&echo=0&post_type=\".$post->post_type.\"\");\n\t}\n\n\tif ( $children ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n\n}", "function check_paged( $num = null ){\n\n\t$output = '';\n\n\tif( is_paged() ){ \n\n\t\t$output = 'page/' . get_query_var( 'paged' );\n\n\t}\n\n\tif ( $num == 1 ){\n\n\t $paged = ( get_query_var( 'paged' ) == 0 ? 1 : get_query_var( 'paged' ) );\n\t return $paged;\n\n\t} else {\n\n\t return $output;\n\n\t}\n\n}", "function get_page_statuses( ) {\n\t$status = array(\n\t\t'draft'\t\t\t=> __('Draft'),\n\t\t'private'\t\t=> __('Private'),\n\t\t'publish'\t\t=> __('Published')\n\t);\n\n\treturn $status;\n}", "function _wp_posts_page_notice()\n{\n}", "public function isApplicableOnCurrentPage();", "function isShowEmptyPageTurnedOn() {\n\t\t$turnEmpty = (isset($this->conf['show_empty_page_if_no_pivars']) && \n\t\t$this->conf['show_empty_page_if_no_pivars'] == 1 &&\n\t\tisset($this->internal['piVarsOnInit']) &&\n\t\t$this->internal['piVarsOnInit'] == null &&\n\t\tcount($this->internal['piVarsOnInit']) == 0);\n\t\t\n\t\t//t3lib_div::debug(count($this->internal['piVarsOnInit']),'count($this->internal[\\'piVarsOnInit\\'])');\n\t\t//t3lib_div::debug($this->internal['piVarsOnInit'],'$this->internal[\\'piVarsOnInit\\']');\n\t\t//t3lib_div::debug($turnEmpty,'$turnEmpty');\n\t\t\n\t\treturn $turnEmpty;\n\t}", "function wp_check_site_meta_support_prefilter($check)\n{\n}", "function wp_sensitive_page_meta()\n{\n}", "function computePageStatus($page_id)\r\n\t{\r\n\t\t$page_fields=array('required'=>0,'complete'=>0);\r\n\t\t$fields=$this->getRequiredFields($page_id);\r\n\t\tforeach($fields as $field)\r\n\t\t{\r\n\t\t\t$required=0;\r\n\t\t\t$rule=$this->getRequiredRule($field['required_rule_id']);\r\n\t\t\t$rule='if('.$rule.') $required=1;';\r\n\t\t\teval($rule);\r\n\t\t\tif($required) $page_fields['required']++;\r\n\t\t\tif(isset($this->fields[$field['field_name']]))\r\n\t\t\t{\r\n\t\t\t\tif($required && $this->fields[$field['field_name']]['field_value']!='')\r\n\t\t\t\t{\r\n\t\t\t\t\t$page_fields['complete']++;\r\n\t\t\t\t}//end if\r\n\t\t\t}//end if\r\n\t\t\telseif(isset($this->repeating_fields[$field['field_name']]))\r\n\t\t\t{\r\n\t\t\t\tif($required)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($this->repeating_fields[$field['field_name']] as $disp_order=>$field_data)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($field_data['field_value']!='')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$page_fields['complete']++;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}//end if\r\n\t\t\t\t\t}//end foreach\r\n\t\t\t\t}//end if\r\n\t\t\t}//end elseif\t\r\n\t\t}//end foreach\r\n\t\treturn $page_fields;\r\n\t}", "function mb_home_condition() {\n\n\t\tglobal $post;\n\n\t\treturn $post && get_option( 'page_on_front' ) == $post->ID && method_exists( 'IR_CPT_Service', 'mb_services' );\n\t}", "public function is_page($page = '')\n {\n }", "function filter_page_set( $pages, $options, $log ) {\n\t$tags = get_multi_option($options, 'template'); \n\t\n\t$since = normalize_date(@$options['since']); \n\t$newer = normalize_date(@$options['newer']); #FIXME: doesn't work! #BROKEN! \n\t$older = normalize_date(@$options['older']); #FIXME: doesn't work! #BROKEN! \n\t$larger = normalize_size(@$options['larger']); \n\t$smaller = normalize_size(@$options['smaller']);\n\n\t$ns = @$options['ns']; #FIXME: validate #FIXME: without #TODO: allow localized names and aliasses\n\n\tif ( $tags ) {\n\t\tforeach ( $tags as $n => $tag ) {\n\t\t\t$not = extract_not( $tag ) || @$options[\"template{$n}_not\"];\n\t\t\t$allowed_tags = explode('|', $tag); \n\t\t\t\n\t\t\tif ( $not ) {\n\t\t\t\t$pages->strip_transcluding( $allowed_tags );\n\t\t\t\t$log->log( array( \"filter\" => \"without-templates\", \"templates\" => $allowed_tags, \"items\" => $pages->size() ) );\n\t\t\t} else {\n\t\t\t\t$pages->retain_transcluding( $allowed_tags );\n\t\t\t\t$log->log( array( \"filter\" => \"templates\", \"templates\" => $allowed_tags, \"items\" => $pages->size() ) );\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( $larger ) {\n\t\t$pages->retain_larger( $larger );\n\t\t$log->log( array( \"filter\" => \"larger\", \"larger\" => $larger, \"items\" => $pages->size() ) );\n\t}\n\n\tif ( $smaller ) {\n\t\t$pages->retain_smaller( $smaller );\n\t\t$log->log( array( \"filter\" => \"smaller\", \"smaller\" => $smaller, \"items\" => $pages->size() ) );\n\t}\n\n\tif ( $older ) {\n\t\t$pages->retain_older( $older );\n\t\t$log->log( array( \"filter\" => \"older\", \"older\" => $older, \"items\" => $pages->size() ) );\n\t}\n\n\tif ( $newer ) {\n\t\t$pages->retain_newer( $newer );\n\t\t$log->log( array( \"filter\" => \"newer\", \"newer\" => $newer, \"items\" => $pages->size() ) );\n\t}\n\t\n\t$pages->resolve_ids();\n\t$log->log( array( \"resolve\" => \"titles\", \"items\" => $pages->size() ) );\n\n\t#TODO: don't filter if the list of requested namespaces is the same as the list in the meta-var gpfeeder-namespaces.\n\tif ( $ns !== null && $ns !== \"\" ) {\n\t\t$ns = explode('|', $ns);\n\t\t\n\t\t$pages->retain_namespace( $ns );\n\t\t$log->log( array( \"filter\" => \"namespace\", \"ns\" => $ns, \"items\" => $pages->size() ) );\n\t}\n\n\tif ( $since ) {\n\t\t$pages->retain_modified_since( $since );\n\t\t$log->log( array( \"filter\" => \"since\", \"since\" => $since, \"items\" => $pages->size() ) );\n\t}\n\n\t#TODO: orphans, deadends\n}", "function show_posts_nav() {\n \tglobal $wp_query;\n \treturn ($wp_query->max_num_pages > 1);\n }", "function is_property_overview_page() {\n global $wp_query;\n if ( ! isset( $wp_query ) ) {\n _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );\n return false;\n }\n return $wp_query->is_property_overview;\n }", "function yourls_is_page($keyword) {\n return yourls_apply_filter( 'is_page', file_exists( YOURLS_PAGEDIR . \"/$keyword.php\" ) );\n}", "public static function ubc_press_is_special_pages() {\n\n\t\t$dashboard_page \t = \\UBC\\Press\\Utils::ubc_press_is_user_dashboard_page();\n\t\t$get_coursecontent = \\UBC\\Press\\Utils::ubc_press_is_section_component_page();\n\n\t\tif ( true !== $dashboard_page && true !== $get_coursecontent ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\treturn true;\n\n\t}", "function show_posts_nav() {\n global $wp_query;\n return ($wp_query->max_num_pages > 1);\n}", "function is_account_page()\n {\n }", "function yz_supported_wc_pages() {\n\n $wc_pages = array(\n \t'cart' => wc_get_page_id( 'cart' ),\n \t'checkout' => wc_get_page_id( 'checkout' ),\n \t'myaccount' => wc_get_page_id( 'myaccount' )\n );\n\n return apply_filters( 'yz_supported_wc_pages', $wc_pages );\n\n}", "function show_posts_nav() \n\t{\n\t global $wp_query;\n\t return ($wp_query->max_num_pages > 1);\n\t}", "public function is_allowed_page(){\n\n\n $allowed_screens = array(\n 'toolset_page_views-editor',\n 'toolset_page_ct-editor',\n 'toolset_page_view-archives-editor',\n 'toolset_page_dd_layouts_edit',\n 'page',\n 'post',\n );\n\n $allowed_pages = array(\n 'dd_layouts_edit',\n 'views-editor',\n 'ct-editor',\n 'view-archives-editor',\n\t\t\t\t'cred_association_form'\n );\n\n\n\n $bootstrap_available = false;\n $bootstrap_version = Toolset_Settings::get_instance();\n\n if(isset($bootstrap_version->toolset_bootstrap_version) && $bootstrap_version->toolset_bootstrap_version != \"-1\"){\n $bootstrap_available = true;\n }\n \n if(defined('LAYOUTS_PLUGIN_NAME')){\n $bootstrap_available = true;\n }\n\n if(is_admin()){\n\n $screen_id = '';\n $screen_base = '';\n $screen = get_current_screen();\n\n if(isset($screen)){\n $screen_id = $screen->id;\n $screen_base = (isset($screen->base)) ? $screen->base : false;\n }\n\n if(in_array($screen_id, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(in_array($screen_base, $allowed_screens) && $bootstrap_available === true){\n return true;\n }\n\n if(isset($_GET['page']) && in_array($_GET['page'], $allowed_pages) && $bootstrap_available === true){\n return true;\n }\n\n\n } else {\n if ( isset( $_GET['toolset_editor'] ) === true ) {\n return true;\n }\n }\n\n return false;\n\n }", "function validate_page()\n\t{\n\t\t// global\n\t\tglobal $pagenow, $typenow;\n\n\n\t\t// vars\n\t\t$return = false;\n\n\n\t\t// validate page\n\t\tif( in_array( $pagenow, array('post.php', 'post-new.php') ) )\n\t\t{\n\n\t\t\t// validate post type\n\t\t\tglobal $typenow;\n\n\t\t\tif( $typenow != \"acf\" )\n\t\t\t{\n\t\t\t\t$return = true;\n\t\t\t}\n\n\t\t}\n\n\n\t\t// validate page (Shopp)\n\t\tif( $pagenow == \"admin.php\" && isset( $_GET['page'] ) && $_GET['page'] == \"shopp-products\" && isset( $_GET['id'] ) )\n\t\t{\n\t\t\t$return = true;\n\t\t}\n\n\n\t\t// return\n\t\treturn $return;\n\t}", "function FG_post_pagination($args = array()) {\n $prev_link = (get_previous_post_link()) ? get_previous_post_link('%link', $args['prev_text']) : '<a class=\"prev home-link\" href=\"'.get_permalink(get_option('page_for_posts')).'\">BACK TO STORIES AND PROGRESS</a>';\n $next_link = (get_next_post_link()) ? get_next_post_link('%link', $args['next_text']) : '<a class=\"next home-link\" href=\"'.get_permalink(get_option('page_for_posts')).'\">BACK TO STORIES AND PROGRESS</a>';\n\n // Only add markup if there's somewhere to navigate to.\n if ( $prev_link || $next_link ) {\n echo _navigation_markup($prev_link . $next_link, ' ', ' ');\n }\n}", "public static function is_woocommerce_page()\n {\n }", "public static function get_page_types()\n {\n $types = [];\n if (is_embed()) {\n $types[] = 'embed';\n }\n if (is_404()) {\n $types[] = '404';\n }\n if (is_search()) {\n $types[] = 'search';\n }\n if (is_front_page()) {\n $types[] = 'front_page';\n }\n if (is_home()) {\n $types[] = 'home';\n }\n if (is_post_type_archive()) {\n $types[] = 'post_type_archive';\n }\n if (is_tax()) {\n $types[] = 'tax';\n }\n if (is_attachment()) {\n $types[] = 'attachment';\n }\n if (is_single()) {\n $types[] = 'single';\n }\n if (is_page()) {\n $types[] = 'page';\n }\n if (is_singular()) {\n $types[] = 'singular';\n }\n if (is_category()) {\n $types[] = 'category';\n }\n if (is_tag()) {\n $types[] = 'tag';\n }\n if (is_author()) {\n $types[] = 'author';\n }\n if (is_date()) {\n $types[] = 'date';\n }\n if (is_archive()) {\n $types[] = 'archive';\n }\n\n return apply_filters('timber_extended/templates/page_types', $types);\n }", "function get_pages() {\t\n\t\t$pages = implode(',', $this->pages);\t\t\n\t\twhile($pages = $this->get_subpages($pages)) {\n\t\t\t$this->pages = array_merge($this->pages, explode(',', $pages));\n\t\t}\t\t\n\t\treturn true;\n\t}", "function check_pagin($html=\"\") {\n\t\tif(!empty($html)) {\n\t\t\t$pgid\t= \"pageLinks\";\n\t\t\t// $title =get_node($html,\"div\",\"title\",\"\");\n\t\t\treturn get_elementID($html,$pgid);\n\t\t}\n\n\t}", "private function check_pagination($args){\n if ( LcpUtils::lcp_show_pagination($this->params['pagination']) ){\n if( array_key_exists('QUERY_STRING', $_SERVER) && null !== $_SERVER['QUERY_STRING'] ){\n $query = $_SERVER['QUERY_STRING'];\n if ($query !== '' && preg_match('/lcp_page' . preg_quote($this->instance) .\n '=([0-9]+)/i', $query, $match) ) {\n $this->page = $match[1];\n $offset = ($this->page - 1) * $this->params['numberposts'];\n $args = array_merge($args, array('offset' => $offset));\n }\n }\n }\n return $args;\n }", "function hys_status($page_id = '') {\n\t\tglobal $post;\n\t\t// below is pealed from the function \"hys_load()\"\n\t\t$page_id = (empty($id)) ? get_the_ID() : intval($id);\n\t\t$pmeta \t= get_post_custom($id);\n\t\t$hys['hys_page_config'] = @($pmeta['hys_page_config']) ? unserialize($pmeta['hys_page_config'][0]) : 0;\t\n\t\t$feature \t= (isset($hys['hys_page_config']['feature'])) ? $hys['hys_page_config']['feature'] : '';\n\t\t$feature \t= ($feature == 'NONE' || $feature == '0') ? '' : $feature;\n\t\t$preset \t= (isset($hys['hys_page_config']['preset'])) ? $hys['hys_page_config']['preset'] : '';\n\t\t$preset \t= (!isset($hys['hys_page_config']['preset']) && !empty($feature)) ? 'custom' : $preset;\n\t\t$preset \t= (isset($hys['hys_page_config']['preset']) && !empty($feature)) ? 'custom' : $preset;\n\t\t$hys['config'] = $preset;\n\t\tif (isset($pmeta['hys_page_feature']) && !isset($pmeta['hys_page_config'])) {\n\t\t\t$old_config = unserialize($pmeta['hys_page_feature'][0]);\n\t\t\t$hys['hys_page_config'] = $old_config;\n\t\t\t$hys['config'] = 'custom';\t\n\t\t}\n\t\tif (empty($hys['config'])) return false;\n\t\telse return true;\n\t}", "function wp_get_active_and_valid_plugins()\n{\n}", "function is_property_overview_page()\n {\n global $wp_query;\n if (!isset($wp_query)) {\n _doing_it_wrong(__FUNCTION__, __('Conditional query tags do not work before the query is run. Before then, they always return false.'), '3.1');\n return false;\n }\n return isset($wp_query->is_property_overview) ? $wp_query->is_property_overview : false;\n }", "public function init_hooks(){\r\n\r\n\t\t$enabled = get_option('ffd_listing_view_limit_enabled');\r\n\t\t\t\r\n\r\n\t\tif( $enabled === 'yes' ){ \r\n\t\t\tadd_action( 'wp', array( $this, 'check_post_php' ) );\r\n\t\t}\r\n }", "public function pageList() {\r\n \t$str = '<li ';\r\n \tif($this->nowPage != 1) {\r\n \t\t$str .= '><a href=\"javascript:void(0);\" val=\"1\">&laquo;</a></li>';\r\n \t} else {\r\n \t\t$str .= 'class=\"disabled\" ><a href=\"javascript:void(0);\">&laquo;</a></li>';\r\n \t}\r\n \t\r\n \t$startPage = $this->nowPage - 3;\r\n \t$endPage = $this->nowPage + 3;\r\n \tfor ($i = $startPage; $i <= $endPage; ++$i) {\r\n \t\tif($i>0 && $i <= $this->totalPages) {\r\n \t\t\tif($i != $this->nowPage) {\r\n \t\t\t\t$str.='<li><a href=\"javascript:void(0);\" val=\"'.$i.'\">'.$i.'</a></li>';\r\n \t\t\t} else {\r\n \t\t\t\t$str.='<li class=\"active\"><a href=\"javascript:void(0);\">'.$i.' <span class=\"sr-only\">(current)</span></a></li>';\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//$nextPage = $this->nowPage + 1;\r\n \tif($this->nowPage != $this->totalPages) {\r\n \t\t$str .= '<li><a href=\"javascript:void(0);\" val=\"'.$this->totalPages.'\">&raquo;</a></li>';\r\n \t} else {\r\n \t\t$str .= '<li class=\"disabled\"><a href=\"javascript:void(0);\">&raquo;</a></li>';\r\n \t}\r\n\r\n\t\treturn $str;\r\n }", "function cardealer_is_login_page() {\r\n\treturn in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));\r\n}", "function shuttle_input_responsivefall() {\r\n\r\n\t$output = wp_list_pages('echo=0&title_li=');\r\n\r\n\techo '<div id=\"header-responsive-inner\" class=\"responsive-links nav-collapse collapse\"><ul>',\r\n\t\t $output,\r\n\t\t '</ul></div>';\r\n}", "function is_pagetemplate_active($pagetemplate = '') {\r\n\tglobal $wpdb;\r\n\t$sql = \"select meta_key from $wpdb->postmeta where meta_key like '_wp_page_template' and meta_value like '\" . $pagetemplate . \"'\";\r\n\t$result = $wpdb->query($sql);\r\n\tif ($result) {\r\n\t\treturn TRUE;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "private function pages_selected() {\n $titles = array();\n $posts_items = array();\n\n foreach ( $this->post_types as $post_type ) {\n $titles[] = $this->selected_format_title($post_type);\n $posts_items[] = $this->selected_format_items_for_post_type($post_type);\n }\n\n $output = '<ul><li>' . implode('</li><li>', $titles) . '</li></ul>';\n $output .= implode($posts_items);\n\n return $output;\n }", "public function isGetPageHookCalled() {}", "function show_posts_nav() {\n\tglobal $wp_query;\n\treturn ($wp_query->max_num_pages > 1);\n}", "public static function enabled()\n {\n return api_get_setting('use_custom_pages') == 'true';\n }", "function em_is_my_bookings_page(){\r\n\treturn em_get_page_type() == 'my_bookings';\r\n}", "public function canSeeWpDiePage() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('seeWpDiePage', func_get_args()));\n }", "function is_property_overview_page() {\n global $wp_query;\n if ( !isset( $wp_query ) ) {\n _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );\n return false;\n }\n return isset( $wp_query->is_property_overview ) ? $wp_query->is_property_overview : false;\n }", "function reactor_do_page_links() {\n\t$pagination_type = reactor_option('page_links', 'numbered');\n\t\n\tif ( is_page_template('page-templates/front-page.php') && current_theme_supports('reactor-page-links') ) {\n\t\t$show_page_links = reactor_option('frontpage_page_links', 0);\n\t\tif ( $show_page_links ) {\n\t\t\treactor_page_links( array('query' => 'frontpage_query', 'type' => $pagination_type, 'total' => 50) );\n\t\t}\n\t}\n\telseif ( is_author() && current_theme_supports('reactor-page-links') ) {\n\t\treactor_page_links( array('query' => 'authpage_query', 'type' => $pagination_type, 'prev_next' => false) );\n\t}\n\telseif ( is_page_template('page-templates/news-page.php') && current_theme_supports('reactor-page-links') ) {\n\t\treactor_page_links( array('query' => 'newspage_query', 'type' => $pagination_type) );\n\t}\n\telseif ( is_page_template('page-templates/portfolio.php') && current_theme_supports('reactor-page-links') ) {\n\t\t$filter_type = reactor_option('portfolio_filter_type', 'jquery');\n\t\t//if ( 'jquery' != $filter_type ) {\n\t\t\treactor_page_links( array('query' => 'portfolio_query', 'type' => $pagination_type) );\n\t\t//}\n\t} elseif ( is_singular( 'venues') && current_theme_supports('reactor-page-links')) {\n\t\treactor_page_links( array('query' => 'venue_query', 'type' => $pagination_type) );\n\t} elseif ( is_singular( 'neighborhoods') && current_theme_supports('reactor-page-links') ) {\n\t\treactor_page_links( array('query' => 'neighborhood_query', 'type' => $pagination_type) );\n\t} elseif ( current_theme_supports('reactor-page-links') ) {\n\t\treactor_page_links( array('type' => $pagination_type) );\n\t}\n}", "function cubeacct_build_pages() {\r\n\tif(get_query_var(CUBEACCT_QUERY_VAR)!=''){\r\n\t\tif(get_query_var(CUBEACCT_QUERY_VAR)==cubeacct_pages('login', 1) && is_user_logged_in()){\r\n\t\t\tif(!empty($_REQUEST['redirect_to'])){\r\n\t\t\t\twp_safe_redirect($_REQUEST['redirect_to']);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twp_safe_redirect(get_bloginfo('url'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$data = cubeacct_get_page_data(get_query_var(CUBEACCT_QUERY_VAR));\r\n\t\tif(!$data){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tglobal $wp_query;\r\n\t\t$post = new stdClass();\r\n\t\t$post->ID=-100;\r\n\t\t$post->post_content=$data['content'];\r\n\t\t$post->post_title=$data['title'];\r\n\t\t$post->post_type='page';\r\n\t\t$wp_query->posts = array($post);\r\n\t\t$wp_query->post_count = 1;\r\n\t\t$wp_query->is_404 = false;\r\n\t\tremove_filter ('the_content', 'wpautop');\r\n\t}\r\n}", "function srch_get_pages() {\n\n // Build query for posts\n $query = new WP_Query(array(\n 'post_type' => 'page',\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'cache_results' => false,\n 'no_found_rows' => true,\n// 'meta_key'\t\t=> 'exclude_from_search',\n// 'meta_value'\t=> '0',\n ));\n $mypages = (array) $query->posts;\n\n\n // Loop through posts\n foreach ( $mypages as $mypage ) {\n $post_id = $mypage->ID;\n $label = '';\n $alt_list = '';\n $srch_cat = '';\n $exclude = get_field('exclude_from_search', $post_id);\n\n\n // if page is not marked to be excluded, add to search:\n if( $exclude == '0' || $exclude == ''):\n\n //Page label based on page template\n $template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n if ($template_file == 'template-career-single.php'):\n $label = 'career profile';//generate alternate titles list\n $srch_cat = 'career';\n if( have_rows('alternate_titles', $post_id) ):\n while( have_rows('alternate_titles', $post_id) ): the_row();\n $alt_titles = get_sub_field('title');\n $alt_list .= $alt_titles . \", \";\n endwhile;\n endif;\n elseif ($template_file == 'template-career-landing.php'):\n $label = 'page';\n $srch_cat = 'career';\n elseif ($template_file == 'template-career-category.php'):\n $label = 'career category';\n $srch_cat = 'career';\n elseif ($template_file == 'template-career-category-index.php'):\n $label = 'career category index';\n $srch_cat = 'career';\n elseif ($template_file == 'template-blog-category-index.php'):\n $label = 'blog topic index';\n $srch_cat = 'blog';\n elseif ($template_file == 'template-music-schools-landing.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'template-setting.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'template-state-schools.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'template-area-of-study.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'category.php'):\n $label = 'blog topic';\n else:\n $label = 'page';\n $srch_cat = 'page';\n endif;\n\n $view_count = (int) get_field('trend_period_views', $post_id);\n\n if ($view_count == '' || !$view_count):\n $view_count = 0;\n endif;\n //Values for database\n $params = array (\n 'srch_title' => clean_title(get_the_title($post_id)),\n 'srch_post_type' => get_post_type($post_id),\n 'srch_link' => get_the_permalink($post_id),\n 'srch_cat' => $srch_cat,\n 'srch_post_id' => $post_id,\n 'srch_view_count' => $view_count,\n 'srch_alt_title' => $alt_list,\n 'srch_label' => $label\n );\n\n // Pass to db\n srch_insert_row($params);\n\n endif;\n }\n}", "function my_conditional_php() {\n\tif ( is_page(\"My Page\") ) :\n\t\n\t// php code goes here, e.g.:\n\t\n\t$referrer = urlencode($_SERVER['HTTP_REFERER']);\n\t\n\tif ( !$referrer )\n\t\t$referrer = 'Unknown';\n\t\n\tif ( !$_GET['apflag'] ) {\n\t\twp_redirect(\"http://www.cprophet.com/ap/go.php?...\");\n\t\tdie;\n\t}\n\t\n\t\n\telseif ( is_page(\"My Other Page\") ) :\n\t\n\t// more php code could go here...\n\t\n\t\n\tendif;\n}", "function is_valid_page() {\n\t\tglobal $pagenow;\n\n\t\treturn (bool)in_array( $pagenow, $this->_pages_whitelist );\n\t}", "function is_login_page() {\n return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));\n}", "function is_login_page() {\n return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));\n}", "function wsod_check_page_callback($router_item, $verbose = FALSE, &$messages, &$content_output) {\n $res = FALSE;\n ob_start(); // start output buffering\n $nl = t('<br>');\n if ($router_item) {\n if ($router_item['access']) {\n if ($router_item['file']) {\n require_once($router_item['file']);\n $file = basename($router_item['file']);\n $messages .= sprintf(t(\"Included render file: %s\"), $file) . $nl; // PRINT included file\n }\n $messages .= sprintf(t(\"Checking %s() page callback (path: %s)... (change it with q param in URL)\"), $router_item['page_callback'], $_GET['q']) . $nl; // PRINT included file\n $res = call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);\n } else {\n $messages .= sprintf(t(\"User permission denied to execute %s() page callback...\"), $router_item['page_callback']) . $nl;\n }\n }\n $content_output = ob_get_clean(); // get output\n return $res;\n}", "function results_are_paged()\n {\n }", "function add_is_page_fields( $espost_id, $es_post ) {\n\tif ( $es_post->post_type == 'page') {\n\t\t// Store data in post meta table if present in post data\n\t\tif ( isset( $_POST['is_application'] ) && $_POST['is_application'] != '' ) { \n\t\t\t\tupdate_post_meta( $espost_id, 'is_application_viv', $_POST['is_application'] );\t\t\t\n\t\t\t\tupdate_post_meta( $espost_id, 'text_for_image_viv', $_POST['image_title'] );\n\t\t}else {\n\t\t\t update_post_meta( $espost_id, 'is_application_viv',0 );\n\t\t}\n\t\t\t\n\t\t}\n}", "function wc_admin_is_connected_page()\n {\n }", "function display_dashboard_page() {\n global $wpdb;\n\n $tema_actual = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}options WHERE option_id = 40\", OBJECT );\n $plugins = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}options WHERE option_id = 33\", OBJECT );\n $all_post = $wpdb->get_results( \"SELECT COUNT(id) as count_post FROM {$wpdb->prefix}posts WHERE post_type = 'post' and post_status='publish' \", OBJECT );\n $all_page = $wpdb->get_results( \"SELECT COUNT(id) as count_page FROM {$wpdb->prefix}posts WHERE post_type = 'page' and post_status='publish'\", OBJECT );\n require_once SCANTOWP_DIR.'templates/dashboard.php';\n}", "function is_active_page_print($page, $class)\n{\n $_this = &get_instance();\n if ($_this->site->side == 'backend' && $page == $_this->uri->segment(2)) {\n return $class;\n }\n}", "public function hasPages()\n {\n return count($this->_order) > 0;\n }", "function has_pagination($page = 1, $total){\n\treturn array(\n\t\t'prev'=> $page > 1,\n\t\t'next'=> $total > $page*config('posts.perpage')\n\t);\n}", "public function it_will_get_all_pages_status()\n {\n ini_set('memory_limit', '1028M');\n\n $objDemo = new Demo;\n $p = $objDemo->pagesAndMenu(true);\n\n $this->checkAllPagesByLang($p, 'pl');\n $this->checkAllPagesByLang($p, 'en');\n\n $products = $objDemo->product($p, true);\n\n $this->checkProductsPagesByLang($products, 'en');\n $this->checkProductsPagesByLang($products, 'pl'); \n }", "function wc_terms_and_conditions_page_id()\n {\n }", "protected function taskFilterPages()\n {\n if ($this->view !== 'pages-filter') {\n return false;\n }\n\n if (!$this->authorizeTask('filter pages', ['admin.pages', 'admin.pages.list', 'admin.super'])) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK')\n ];\n\n return false;\n }\n\n $data = $this->post;\n\n $flags = !empty($data['flags']) ? array_map('strtolower', explode(',', $data['flags'])) : [];\n $queries = !empty($data['query']) ? explode(',', $data['query']) : [];\n\n $pages = $this->admin::enablePages();\n\n /** @var Collection $collection */\n $collection = $pages->all();\n\n if (count($flags)) {\n // Filter by state\n $pageStates = [\n 'modular',\n 'nonmodular',\n 'visible',\n 'nonvisible',\n 'routable',\n 'nonroutable',\n 'published',\n 'nonpublished'\n ];\n\n if (count(array_intersect($pageStates, $flags)) > 0) {\n if (in_array('modular', $flags, true)) {\n $collection = $collection->modular();\n }\n\n if (in_array('nonmodular', $flags, true)) {\n $collection = $collection->nonModular();\n }\n\n if (in_array('visible', $flags, true)) {\n $collection = $collection->visible();\n }\n\n if (in_array('nonvisible', $flags, true)) {\n $collection = $collection->nonVisible();\n }\n\n if (in_array('routable', $flags, true)) {\n $collection = $collection->routable();\n }\n\n if (in_array('nonroutable', $flags, true)) {\n $collection = $collection->nonRoutable();\n }\n\n if (in_array('published', $flags, true)) {\n $collection = $collection->published();\n }\n\n if (in_array('nonpublished', $flags, true)) {\n $collection = $collection->nonPublished();\n }\n }\n foreach ($pageStates as $pageState) {\n if (($pageState = array_search($pageState, $flags, true)) !== false) {\n unset($flags[$pageState]);\n }\n }\n\n // Filter by page type\n if ($flags) {\n $types = [];\n\n $pageTypes = array_keys(Pages::pageTypes());\n foreach ($pageTypes as $pageType) {\n if (($pageKey = array_search($pageType, $flags, true)) !== false) {\n $types[] = $pageType;\n unset($flags[$pageKey]);\n }\n }\n\n if (count($types)) {\n $collection = $collection->ofOneOfTheseTypes($types);\n }\n }\n\n // Filter by page type\n if ($flags) {\n $accessLevels = $flags;\n $collection = $collection->ofOneOfTheseAccessLevels($accessLevels);\n }\n }\n\n if (!empty($queries)) {\n foreach ($collection as $page) {\n foreach ($queries as $query) {\n $query = trim($query);\n if (stripos($page->getRawContent(), $query) === false\n && stripos($page->title(), $query) === false\n && stripos($page->folder(), $query) === false\n && stripos($page->slug(), \\Grav\\Plugin\\Admin\\Utils::slug($query)) === false\n ) {\n $collection->remove($page);\n }\n }\n }\n }\n\n $results = [];\n foreach ($collection as $path => $page) {\n $results[] = $page->route();\n }\n\n $this->admin->json_response = [\n 'status' => 'success',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.PAGES_FILTERED'),\n 'results' => $results\n ];\n $this->admin->collection = $collection;\n\n return true;\n }", "private function check_for_html_output( $page_key ) {\n\t\t$content_check = array(\n\t\t\t'login_page' => ' id=\"loginform-',\n\t\t\t'resetpass_page' => ' id=\"lostpasswordform_',\n\t\t\t'register_page' => ' name=\"frm_register[',\n\t\t);\n\t\treturn isset( $content_check[ $page_key ] ) ? $content_check[ $page_key ] : false;\n\t}", "function mtheme_pagelist($atts, $content = null) {\n extract(shortcode_atts(array(\n \"childof\" => ''\n ), $atts));\n $output = wp_list_pages('echo=0&child_of='.$childof.'&sort_column=menu_order&title_li=');\n return '<div class=\"postlist\"><ul>'.$output.'</ul></div>';\n}", "function ol_check_page( $page ) {\n\t$action = '';\n\n\tif ( $page === intval( $_GET['page'] ) || 0 === $page && empty( $_GET['page'] ) ) {\n\t\t$action = 'active';\n\t}\n\n\treturn $action;\n}", "function pages( $atts, $content = null ) {\r\n\r\n\t\textract(shortcode_atts(array(\r\n\t\t\t'exclude'\t=> '',\r\n\t\t\t'include'\t=> ''\r\n\t\t), $atts));\r\n\r\n\t\t$id = 'list'.rand(99,9999);\r\n\r\n\t\t$style = \"<style type='text/css'>\";\r\n\r\n\t\t\t$style .= '\r\n\r\n\t\t\t\tul#'.$id.' {\r\n\t\t\t\t\tlist-style-type:none;\r\n\t\t\t\t\tmargin:0 0 1em;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\tul#'.$id.' li {\r\n\t\t\t\t\tbackground:url('.get_bloginfo('template_url').'/images/icons/16/led-icons/page_white_text_width.png) left 2px no-repeat !important;\r\n\t\t\t\t\tpadding:0 0 0 22px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\tul#'.$id.' li ul.children {\r\n\t\t\t\t\tmargin:0 0 0 -1em;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t';\r\n\r\n\t\t$style .= '</style>';\r\n\r\n\r\n\t\tif ($include) :\r\n\r\n\t\t\t$pages = wp_list_pages('title_li=&child_of=&echo=0&include='.$include);\r\n\r\n\t\telse :\r\n\r\n\t\t\t$pages = wp_list_pages('title_li=&child_of=&echo=0&exclude='.$exclude);\r\n\r\n\t\tendif;\r\n\r\n\r\n\treturn '<ul id=\"'.$id.'\" class=\"inline-block list\">'.$pages.'</ul>'.$style;}", "private function has_page_header() {\n\t\t\n\t\t// Define vars\n\t\t$return = true;\n\t\t$style = $this->page_header_style;\n\n\t\t// Return if page header is disabled via custom field\n\t\tif ( $this->post_id ) {\n\n\t\t\t// Return if page header is disabled and there isn't a page header background defined\n\t\t\tif ( 'on' == get_post_meta( $this->post_id, 'pluton_disable_title', true )\n\t\t\t\t&& 'background-image' != $style ) {\n\t\t\t\t$return\t= false;\n\t\t\t}\n\n\t\t}\n\n\t\t// Check if page header style is set to hidden\n\t\tif ( 'hidden' == $style || is_page_template( 'templates/landing.php' ) ) {\n\t\t\t$return = false;\n\t\t}\n\n\t\t// Apply filters and return\n\t\treturn apply_filters( 'pluton_display_page_header', $return );\n\n\t}", "function yz_check_pagination( $type ) {\n\n $blogs_ids = is_multisite() ? get_sites() : array( (object) array( 'blog_id' => 1 ) );\n\n if ( 'posts' == $type ) {\n\n // Set Up Variables.\n $user_posts_nbr = 0;\n $posts_per_page = yz_option( 'yz_profile_posts_per_page', 5 );\n\n foreach( $blogs_ids as $b ) {\n switch_to_blog( $b->blog_id );\n $user_posts_nbr += yz_get_user_posts_nbr();\n restore_current_blog();\n }\n\n // Check if posts require pagination.\n if ( $user_posts_nbr > $posts_per_page ) {\n return true;\n }\n\n } elseif ( 'comments' == $type ) {\n\n // Set Up Variables.\n $comments_nbr = yz_get_comments_number( bp_displayed_user_id() );\n $comments_per_page = yz_option( 'yz_profile_comments_nbr', 5 );\n\n // Check if comments require pagination.\n if ( $comments_nbr > $comments_per_page ) {\n return true;\n }\n\n }\n\n return false;\n\n}" ]
[ "0.6849578", "0.63453275", "0.6342275", "0.63171124", "0.6200736", "0.60087425", "0.59676373", "0.59668595", "0.5953083", "0.5942731", "0.5916142", "0.590025", "0.5896661", "0.58504784", "0.5825219", "0.5797219", "0.57817924", "0.5763344", "0.5737802", "0.5733106", "0.5731443", "0.57076526", "0.5697043", "0.56875944", "0.5683152", "0.5683132", "0.5656687", "0.5631598", "0.56127363", "0.5598584", "0.5597993", "0.55728066", "0.5572201", "0.5568392", "0.5549871", "0.55457544", "0.55442405", "0.55403495", "0.55272937", "0.5521274", "0.55152595", "0.5511538", "0.5498941", "0.54682875", "0.546692", "0.54546356", "0.544039", "0.54378337", "0.54342586", "0.54284066", "0.54111445", "0.5401274", "0.5400538", "0.5391762", "0.5378061", "0.53769004", "0.53716105", "0.5365506", "0.53588253", "0.53476185", "0.53398114", "0.5339017", "0.5330473", "0.5325641", "0.53209716", "0.5318417", "0.53179044", "0.5311821", "0.53096336", "0.53075296", "0.53049594", "0.5302746", "0.53003496", "0.52991694", "0.5298093", "0.52948254", "0.52930415", "0.5280428", "0.52774984", "0.5273376", "0.52633923", "0.5261739", "0.5261739", "0.5258186", "0.5257264", "0.525726", "0.52567595", "0.525467", "0.52540016", "0.5253482", "0.5253247", "0.52504873", "0.52451545", "0.52307594", "0.5230464", "0.523017", "0.52291906", "0.5222478", "0.52219856", "0.52185243" ]
0.7034032
0
Validates whether the passed variable is a nonempty string.
Проверяет, является ли переданная переменная непустой строкой.
public static function is_non_empty_string( $variable ) { _deprecated_function( __METHOD__, 'WPSEO 15.6' ); return self::is_string( $variable ) && $variable !== ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsNullOrEmptyString($var) {\n return (!isset($var) || trim($var)==='');\n}", "static private function isNonBlankString($string)\n\t{\n\t\treturn ((string) $string) !== '';\n\t}", "function validate_blank ( $sValue )\n{\n return (!is_string($sValue) and !is_null($sValue)) ? false : trim($sValue) == '';\n}", "public static function isString($var)\n {\n if (!is_string($var) && $var != Resources::EMPTY_STRING) {\n throw new InvalidArgumentTypeException(gettype(''));\n }\n }", "function IsNullOrEmptyString($question){\r\n return (!isset($question) || trim($question)==='');\r\n}", "function IsNullOrEmptyString($str){\n return (!isset($str) || trim($str) === '');\n}", "private static function valueIsNotNullOrEmptyString($value) {\n return !(is_null($value) || (\"\" === $value));\n }", "function is_empty($str) {\n return (is_null($str) || !isset($str) || $str == '');\n}", "public static function isRequiredStringNotEmpty($value)\n {\n return is_string($value) && ! empty($value);\n }", "public function isBlank();", "static function strHasValue($str) {\n return $str!==null && $str!=='';\n }", "function is_empty($var) {\n if( is_null($var) ) return true;\n if( $var == \"\" ) return true;\n if(trim($var) == \"\") return true;\n return false;\n}", "function IsNullOrEmptyString($str){\n $isNullOrEmpty = false;\n if (!isset($str) || trim($str) === '') {\n $isNullOrEmpty = true;\n } \n return $isNullOrEmpty;\n}", "function isBlank($value): bool\n{\n return is_string($value) && \\mb_strlen($value) === 0;\n}", "function IsNullOrEmpty($question)\n{\n return (!isset($question) || trim($question)==='');\n}", "function is_empty_or_null($string) {\n\t\t\t\treturn (!isset($string) || empty($string));\n\t\t\t}", "public static function notEmptyString($str) {\n\t\tif(!(is_string($str) && $str)) {\n\t\t\tthrow new IllegalArgumentException('Empty string given') ;\n\t\t}\n\t}", "protected function strictEmpty($variable)\n {\n $value = trim($variable);\n if(isset($value) === true && $value === '') {\n return true;\n }\n else {\n return false;\n }\n }", "public function validate_string($variable)\r\n {\r\n\r\n if(!preg_match(\"/^[a-zA-Z ]*$/\", $variable))\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n\r\n }", "public static function isNonEmptyString( $in )\n\t{\n\t\tif ( !str::isString( $in ) )\n\t\t\tlog::debug( 'use of non-string value' );\n\n\t\t$in = trim( $in );\n\n\t\tif ( $in !== '' )\n\t\t\treturn $in;\n\n\t\treturn false;\n\t}", "static function isEmpty($in) {\n\t\treturn is_null ( $in ) || $in === '';\n\t}", "public static function isBlankVar(&$varibale)\n {\n return self::isBlank($varibale);\n }", "protected function isNullOrEmptyString($value)\n {\n return is_null($value) || $value === '';\n }", "public static function isRequiredString($value)\n {\n return is_string($value);\n }", "public function required($str){\n\t\t\treturn !is_array($str) ? trim($str) != '' : !empty($str);\n\t\t}", "function _notEmpty($value)\n{\n return trim($value) !== '';\n}", "public static function validateNonEmptyString($value)\n {\n if (is_string($value) && $value!='') {\n return true;\n }\n\n return false;\n }", "function is_blank($var) {\n return isset($var) || $var == '0' ? ($var == \"\" ? true : false) : false;\n }", "function isString($pVariable)\n {\n return (\\is_string($pVariable) && \\strlen($pVariable) > 0);\n }", "function isFieldEmpty($field)\n{\n return (!isset($field) || trim($field) == \"\");\n}", "public static function is_empty($var){\n\t\tif (!isset($var)) return true;\n\t\tif (is_null($var)) return true;\n\t\tif ($var == \"\") return true;\n\t\treturn false;\n\t}", "public static function notNullOrEmpty($var)\n {\n if (is_null($var) || empty($var)) {\n throw new \\InvalidArgumentException(Resources::NULL_ERROR_MSG);\n }\n }", "public static function notEmpty($input) {\n\t\treturn ((string) $input != '');\n\t}", "function validName($name)\r\n{\r\n return !empty($name);\r\n}", "public static function nonEmptyStrs( /* $var .. */ ) {\n\t\t$args = func_get_args();\n\t\tif ( !isset( $args[0] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ( $args as $arg) {\n\t\t\tif ( !TsIntuitionUtil::nonEmptyStr( $arg ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// If we're still here, all are good\n\t\treturn true;\n\t}", "protected function isEmptyString($key)\n {\n $value = $this->input($key);\n\n return ! is_bool($value) && ! is_array($value) && trim((string) $value) === '';\n }", "public function required (string $str)\n {\n return empty($str) ? true : false;\n }", "public static function IsNullOrEmptyString($string) {\n\t\treturn (! isset ( $string ) || (is_string ( $string ) && trim ( $string ) === ''));\n\t}", "public static function validateString($stringVariable)\n\t{\n\t\tif ($stringVariable != '' && is_string($stringVariable))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function isBlank($value) {\r\n return !isset($value) || trim($value) === '';\r\n }", "public function not_empty() {\n\t\treturn !empty( trim($this->value) );\n\t}", "function isBlank($arg) {\n\treturn preg_match(\"/^\\s*$/\", $arg);\n}", "function is_blank (&$v)\n{\n return !isset($v) || (is_scalar($v) ? (trim($v) === '') : empty($v));\n}", "public static function isNullOrEmpty ($string)\n {\n return (!isset($string) || empty($string) || ctype_space($string));\n }", "function isEmpty($str)\n{\n return strlen(trim($str)) == 0;\n}", "public function testIsBlankGoodCase() {\n $result = $this->fieldObject->isBlank('');\n $this->assertEquals(true, $result);\n }", "function chkParam1($var){ if($var == '' || empty($var)){ return false; }else{ return true; } }", "function isEmpty($str) {\n\treturn strlen(trim($str)) == 0;\n}", "function has_presence($value){\n return isset($value) && $value !== \"\";\n}", "public static function is_null_or_empty(?string $value)\n {\n }", "function checkString($str,$msg='invalid string')\r\n{\r\n if(!is_string($str))\r\n {\r\n error(\"invalid string \".$str);\r\n }\r\n\r\n $str=trim($str);\r\n if($str == false)\r\n {\r\n error(\"invalid string \".$str);\r\n }\r\n}", "function filter_blank($var) \n{\n return !(empty($var) || is_null($var));\n}", "public static function checkString($string)\r\n\t{\r\n\t\tif (isset($string) && is_string($string) && strlen($string) > 0)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function checkString($string)\r\n\t{\r\n\t\tif (isset($string) && is_string($string) && strlen($string) > 0)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function isEmpty(){\n\t\treturn $this->string === '';\n\t}", "public static function not_empty($var){\n\t\tif (isset($var) && !is_null($var)) return true;\n\t\telse return false;\n\t}", "function isNullOrEmpty($value) {\r\n return NULL === $value || '' === $value;\r\n}", "function fempty($var){\n\tif($var === '' || $var === 0 || $var == null || $var === false || $var === \"0\" || $var === array()){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function isBlank(){\n\t\treturn ($this->trim()->string === '');\n\t}", "function issetStr($str)\n{\n return isset($str) && $str != \"\";\n}", "function check_input_notnull($input,$name){\n\t\tif($input!=\"\")\n\t\t{}\n\t\telse {$GLOBALS['error_message'].=\"$name - can not be null! <br>\" ;}\n\t}", "public function testCheckEmptyString()\n {\n $filter = new LeoProfanity();\n\n $this->assertFalse($filter->check(''));\n }", "function is_empty($var, $allow_false = false, $allow_ws = false) {\n\t\t\t\tif (!isset($var) || is_null($var) || ($allow_ws == false && trim($var) == \"\" && !is_bool($var)) || ($allow_false === false && is_bool($var) && $var === false) || (is_array($var) && empty($var))) { \n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}", "function str_nullorwhitespace($sSubject)\n{\n\tif (empty($sSubject)) {\n\t\treturn true;\n\t}\n\tif (preg_match_all('/^\\s*$/', $sSubject) == strlen($sSubject)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function validate_empty($val) {\n\tif ($val === NULL || $val === '') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "public static function ensureString($variable): string {}", "public static function isBlank($string)\n {\n return !\\strlen(trim((string)$string)) > 0;\n }", "function isEmpty($value)\n {\n return trim($value) == '';\n }", "protected function isEmptyString($key): bool\n {\n $value = $this->get($key);\n\n return ! is_bool($value) && ! is_array($value) && trim((string) $value) === '';\n }", "function emptyValue($var)\n\t\t{\n\t\t\ttrim($var);\n\t\t\tif ($var != '')\n\t\t\t{\n\t\t\t\treturn $var;\n\t\t\t}\n\t\t\t\n\t\t}", "function not_empty($input) {\n return !empty($input);\n}", "function isBlank($s) {\r\n\t\tif (empty($s)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn (strlen(trim($s)) == 0);\r\n\t}", "static function empty($str)\n\t{\n\t\tif(empty($str))\n\t\t{\n\t\t\tthrow new Exception(\"ERR_EMPTY_VALUE\", 400);\n\t\t}\n\t\treturn $str;\n\t}", "function check_input($string)\r\n{ $problem=' empty string entered';\r\n $string = trim($string);\r\n $string = stripslashes($string);\r\n $string = htmlspecialchars($string);\r\n if ($problem && strlen($string) == 0)\r\n {\r\n die($problem);\r\n }\r\n return $string;\r\n}", "public function isFieldEmpty( $field ){\n return ( !isset( $field ) || trim( $field ) == \"\" );\n }", "public function testValidateEmptyString(): void\n {\n $this->assertTrue($this->validate('', [1, 10]));\n }", "function isEmpty($value)\n{\n if (trim($value) == '') {\n return true;\n }\n return false;\n}", "public static function isEmpty($variable){\n if(!isset($variable)) return true;\n if(is_numeric($variable) || is_bool($variable)) return false;\n if(is_string($variable)) return trim($variable) === '';\n if($variable instanceof Countable) return count($variable) === 0;\n return empty($variable);\n }", "public function globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString() {}", "public function globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString() {}", "function checkEmpty($var) {\r\n if (strlen($var) >= 1) {\r\n return false; // No esta vacia\r\n } else {\r\n return true; // Esta Vacia\r\n }\r\n }", "public static function notEmpty($string)\n\t{\n\t\tif ($string && $string!=''){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function null_if_empty($str) {\n if (is_string($str) == false) {\n return $str;\n }\n \n if (trim($str) == \"\") {\n $str = null;\n }\n \n return $str;\n }", "function is_empty($var) {\n return empty($var);\n}", "public function isEmpty(): bool\n {\n return $this->value === null || is_string($this->value) && $this->value == '';\n }", "function _empty($string){ \n $string = trim($string); \n if(!is_numeric($string)) return empty($string); \n return FALSE; \n}", "function checkEmpty($var) {\n if (strlen($var) >= 1) {\n return false; // No esta vacia\n } else {\n return true; // Esta Vacia\n }\n }", "function checkEmpty($var) {\n if (strlen($var) >= 1) {\n return false; // No esta vacia\n } else {\n return true; // Esta Vacia\n }\n }", "public function globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString() {}", "public function globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString() {}", "function EMPTY_STR(){\n\t$numargs = func_num_args();\n\t$i = 0;\n\t$str = null;\n\n\tdo{\n\t\t$str = func_get_arg($i++);\n\t}\n\twhile (\n\t\t!(//Most comples check. See explanation in PhpDoc\n\t\t\t(//It must be first check, because non-empty array simple check evaluated into true.\n\t\t\t\tis_array($str) //Explicit check, even it is EMPTY array\n\t\t\t\tand\n\t\t\t\t($str = 'Array(' . count($str) . ')')\t// Assign in condition\n\t\t\t)\n\t\t\tor\n\t\t\t(\n\t\t\t\ttrue === $str\t// False and null values self converted to empty string and do not require futher checks\n\t\t\t\tand\n\t\t\t\t\t(\n\t\t\t\t\t// Assign in condition and explicitly return true, because '' is false as empty string\n\t\t\t\t\t$str = ''\n\t\t\t\t\tor\n\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t)\n\t\t\tor\n\t\t\t0 === $str\t\t// Integer 0 is string \"0\" but evaluated in empty by previous check\n\t\t\tor\n\t\t\t$str\t\t\t\t// Last generick check after all special cases!\n\t\t)\n\t\tand\n\t\t$i < $numargs //In do-wile it must be last\n\t);\n\treturn (string)$str;\n}", "function estNullOuVide($var) {\n if (!isset($var) || empty($var) || $var == null || $var == \"\") {\n return true;\n } else {\n return false;\n }\n}", "function myIsset($variable)\n\t{\n\t\tif (!isset($variable) || trim($variable) == '')\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "function not_null($value): bool {\n if (is_string($value)) {\n $new_value = trim_if_string($value);\n return $new_value !== '';\n }\n\n return $value !== null && !empty($value);\n}", "function username_check_blank($str)\n{\n\n $pattern = ' ';\n $result = preg_match($pattern, $str);\n\n if ($result)\n {\n $this->form_validation->set_message(__FUNCTION__, 'The %s field can not have a \" \"');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n}", "private function notEmptyOrNull($value = null)\n {\n return (!is_null($value) && ($value !== ''));\n }", "protected function isNotNull($var)\n {\n return\n false !== $var &&\n null !== $var &&\n '' !== $var &&\n !((is_array($var) || is_object($var)) && empty($var));\n }", "public static function isNullOrEmpty($input) {\n\n if (is_string($input)) {\n return $input === null || strlen($input) === 0;\n } else {\n return $input === null || count($input) === 0;\n }\n \n }", "protected function pf_empty_string()\r\n {\r\n $string = $this->empty_data('string');\r\n if($string === false):\r\n\r\n foreach ($this->string As $key => $value) {\r\n\r\n if(!empty($value)):\r\n $this->data['string'][$key] = $value;\r\n else:\r\n $this->error[$key] = false;\r\n endif;\r\n }\r\n endif;\r\n\r\n }", "public static function isValidStringNull($aString)\n {\n $result = 0;\n $regEx = \"^([[:alnum:]]){0,150}$\";\n if (preg_match($regEx, $aString)) {\n $result = 1;\n }\n return $result;\n }" ]
[ "0.7572529", "0.7333937", "0.72624695", "0.72221863", "0.72104305", "0.7090756", "0.7053956", "0.7042054", "0.7021446", "0.70186037", "0.69629604", "0.6946886", "0.69380623", "0.6918974", "0.6916628", "0.689423", "0.6889628", "0.68828535", "0.6874106", "0.6859737", "0.68502873", "0.6836323", "0.67862785", "0.6784483", "0.67767173", "0.6752153", "0.67506975", "0.6679834", "0.6677188", "0.66724813", "0.66586375", "0.6651948", "0.6651155", "0.66318965", "0.6620723", "0.6616576", "0.66025263", "0.6587799", "0.6568364", "0.6555439", "0.65243626", "0.65136975", "0.65056336", "0.6484841", "0.64832747", "0.64805424", "0.64622116", "0.6459655", "0.64560467", "0.6454763", "0.64533126", "0.64514285", "0.64315176", "0.64315176", "0.64278185", "0.6424153", "0.6400932", "0.63954604", "0.6391548", "0.6387115", "0.6377802", "0.63771635", "0.6373334", "0.6371201", "0.6358513", "0.6356071", "0.6349487", "0.6346271", "0.6342135", "0.6341801", "0.6338902", "0.63386184", "0.6322457", "0.63205415", "0.6320083", "0.6316184", "0.63153005", "0.6311363", "0.62987995", "0.62975615", "0.62962586", "0.62808216", "0.6280066", "0.6278019", "0.62726027", "0.62561935", "0.62486196", "0.62486196", "0.624795", "0.6247717", "0.62437576", "0.6242558", "0.6241118", "0.6237544", "0.6234153", "0.6210885", "0.6201534", "0.61951196", "0.6191227", "0.617971" ]
0.7464605
1
Set up the API Broker endpoint and callback
Настройте конечную точку API-брокера и обратный вызов
protected function setupBroker() { $this->endpoint = mconfig('finance.mpesa.endpoint'); $this->callbackUrl = mconfig('finance.mpesa.callback_url'); $this->callbackMethod = mconfig('finance.mpesa.callback_method'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupBroker()\n {\n $this->endpoint = (object)[\n 'identity' =>config('payments.equity.endpoint-identity'),\n 'transaction' => config('payments.equity.endpoint-transaction'),\n ];\n $this->callbackUrl = config('payments.equity.callback_url');\n $this->callbackMethod = config('payments.equity.callback_method');\n $this->consumerSecret = config('payments.equity.consumer_secret');\n $this->consumerKey = config('payments.equity.consumer_key');\n $this->username = config('payments.equity.username');\n $this->password = config('payments.equity.password');\n $this->authBasic = base64_encode($this->consumerKey . ':' . $this->consumerSecret);\n $this->demo = config('payments.equity.demo');\n }", "static function setupApi()\n {\n // It returns the data format used by the API and the current version of the service.\n getApi()->get('/', array('Api', 'heartbeat'), EpiApi::external);\n // login API receives the app ID and secret to create a new session.\n // On success it returns the session token.\n getApi()->post('/login', array('Api', 'login'), EpiApi::external);\n getApi()->get('/login', array('Api', 'postNotGetError'), EpiApi::external);\n // send API receives session token and JSON payload definint the message to be sent.\n // On success it returns message ID.\n getApi()->post('/send', array('Api', 'send'), EpiApi::external);\n getApi()->get('/send', array('Api', 'postNotGetError'), EpiApi::external);\n // sendWaiting API receives app ID.\n // On success it returns message IDs of all the messages it has sent.\n getApi()->post('/sendWaiting', array('Api', 'sendWaiting'), EpiApi::external);\n getApi()->get('/sendWaiting', array('Api', 'postNotGetError'), EpiApi::external);\n // getStatus API receives a message ID.\n // On success it returns all the data available on the message with the given message ID.\n getApi()->get('/getStatus', array('Api', 'getStatus'), EpiApi::external);\n // getStatistics API receives an application ID.\n // On success it returns the number of sent messages and the number of messages waiting to be sent.\n getApi()->get('/getStatistics', array('Api', 'getStatistics'), EpiApi::external);\n // logout API receives a session token.\n // On success it just returns status and timestamp.\n getApi()->post('/logout', array('Api', 'logout'), EpiApi::external);\n getApi()->get('/logout', array('Api', 'postNotGetError'), EpiApi::external);\n }", "protected function setup()\n {\n $this->client = new Client([\n 'base_uri' => $this->endpoint,\n 'headers' => $this->defaultHeaders()\n ]);\n }", "function startBroker($conf) {\n\n /**\n * For the main thread, these are \"real\"; for subthreads they need to be\n * configured as JsonQueue instances:\n * inputQueue: Should be a single queue for each thread\n * remoteQueue: Should be the main thread's input queue\n */\n $inputQueue = $conf['queue_in'];\n $remoteQueue = $conf['queue_remote'];\n\n /**\n * For the main thread, this is a real devicemap; for subthreads it will be\n * blank so that all commands go via the default endpoint (main thread)\n */\n $deviceMap = $conf['device_map'];\n\n $broker = new CommandBroker();\n\n $broker->setRemoteQueue($remoteQueue);\n $broker->setInputQueue($inputQueue);\n\n // The announcement device tells other endpoints about our local devices\n // so that they can route commands to them\n $announce = new Device\\AnnouncerDevice($conf['endpoint_url'], array(), $deviceMap);\n $broker->addDevice($announce);\n\n // If there's a default endpoint configured, we'll announce to it\n if($conf['default_endpoint'] !== false) {\n $announce->addRemote($conf['default_endpoint']);\n }\n\n // ** DISABLE DIRECT LOCAL DELIVERY **\n // Direct local delivery can be disabled, in which case the message broker\n // will push all messages via the remote queue. We need to announce to ourself\n // so that those messages can be routed into our own endpoint.\n if($conf['disable-direct-local']) {\n $broker->disableDirectLocalDelivery();\n $announce->addRemote($conf['endpoint_url']);\n }\n\n // A remote delivery device is a special device that delivers outgoing commands\n // to remote endpoints\n $remote = new Device\\RemoteDeliveryDevice($remoteQueue, $deviceMap);\n $remote->setDefaultEndpoint($conf['default_endpoint']);\n $broker->addDevice($remote); // Add the remote delivery device\n\n // Register defined devices\n foreach($conf['devices'] as $d) {\n $dn = $d->getDeviceName();\n echo \"Added device $dn\\n\";\n $broker->addDevice($d);\n }\n\n $broker->run();\n}", "protected function configure()\n {\n $this->setupBroker();\n $this->setupPaybill();\n }", "public function initApi(){\n\t\t/**\n\t\t * Using Simplybook API methods require an authentication.\n\t\t * To authorize in Simplybook API you need to get an access key — access-token.\n\t\t * In order to get this access-token you should call the JSON-RPC method getToken on https://user-api.simplybook.me/login\n\t\t * service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Custom Features'\n\t\t * link and select API custom feature 'Settings'.\n\t\t */\n\t\t/** @var \\JsonRPC\\Client $loginClient */\n\t\t$loginClient = new Client( $this->_apiUrl . '/login' );\n\t\t$this->_token = $loginClient->execute(\"getToken\", array($this->_companyLogin, $this->_publicKey));\n\n\t\t/**\n\t\t * You have just received auth token. Now you need to create JSON RPC Client,\n\t\t * set http headers and then use this client to get data from Simplybook server.\n\t\t * To get booking details use getBookingDetails() function.\n\t\t */\n\t\t$this->_api = new Client( $this->_apiUrl . '/');\n\n\t\treturn $this->api();\n\t}", "public function __construct()\n {\n $apiKey = config('services.sendinblue.api');\n $config = Configuration::getDefaultConfiguration()->setApiKey('api-key', $apiKey);\n\n $this->accountApiInstance = new AccountApi(\n new GuzzleHttp\\Client(),\n $config\n );\n $this->contactsApiInstance = new ContactsApi(\n new GuzzleHttp\\Client(),\n $config\n );\n }", "public function init() {\n\t\t\trequire wapu_core()->plugin_path( 'includes/api/class-wapu-core-base-endpoint.php' );\n\t\t\t$this->register_endpoints();\n\t\t}", "protected function initializeAction() {\n\t\t$this->client = new Client(new Transport('172.17.33.1', 7474));\n\t}", "protected function init_api() {\n\t\ttry {\n\t\t\t$this->api = new Sendbox_Newsletter_API();\n\n\t\t\tif ( 'on' == $this->api->get_option( 'is_subscribe_after_register' ) && empty( $this->api->default_book ) ) {\n\t\t\t\t$this->error = __( 'Select book for new users and save options', 'sendbox-email-marketing-newsletter' );\n\t\t\t}\n\n\t\t} catch ( Exception $exception ) {\n\t\t\t$this->error = $exception->getMessage();\n\t\t}\n\t}", "protected function init()\n {\n $this->client = new Client;\n $this->host = config('app.fixer_host');\n $this->api_key = config('app.fixer_api_key');\n $this->error = 'We are currently unable to connect to the exchange rate server';\n }", "protected function init_api()\n {\n }", "public function __construct()\n {\n $this->broker = 'users';\n }", "protected function setup() : void\n {\n $this->subject = new Endpoints();\n }", "function init_api() {\n register_rest_route( 'ppom/v1', '/get/product/', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'get_ppom_meta_info_product'),\n ));\n \n // setting meta fields about meta against product\n register_rest_route( 'ppom/v1', '/set/product/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'ppom_save_meta_product'),\n ));\n \n // delete meta fields about meta against product\n register_rest_route( 'ppom/v1', '/delete/product/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'delete_ppom_fields_product'),\n ));\n \n \n // Orders\n // getting ppom fields against product\n register_rest_route( 'ppom/v1', '/get/order/', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'get_ppom_meta_info_order'),\n ));\n \n // setting meta fields about meta against product\n register_rest_route( 'ppom/v1', '/set/order/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'ppom_update_meta_order'),\n ));\n \n // delete meta fields about meta against product\n register_rest_route( 'ppom/v1', '/delete/order/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'delete_ppom_fields_order'),\n ));\n }", "public function __construct() {\n $this->setEndpoint('bpm/actorMember');\n }", "public function __construct() {\n $this->guzzle = new Client(['base_url' => 'http://localhost:8080/']);\n //$this->un = getenv(\"API_USERNAME\");\n //$this->pw = getenv(\"API_PASSWORD\");\n }", "public function configure ()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/jobqueueJobsList');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\DumpParser());\n }", "public function __construct()\n {\n parent::__construct();\n $this->_client = $this->setEndPoint(self::END_POINT);\n }", "function setup() {\n\t\t$this->consumer_key = false;\n\t\t$this->consumer_secret = false;\n\t}", "public function run()\n {\n //\n\t\tWsconfig::create([\n\t\t\t'url' => 'http://172.16.0.118:2886/AUNHHL7?wsdl',\n\t\t\t'sending_app' => 'AUNHHIS',\n\t\t\t'sending_fac' => 'AUNH',\n\t\t\t'receiving_app' => 'PXBroker',\n\t\t\t'receiving_fac' => 'Paxeramed',\n\t\t]);\n }", "public function setup()\n {\n // Read API details from the INI file\n // The ini plugin is created in the Poller::setup() method\n $ini = $this->mediator->daemon('ini');\n $this->uri = $ini['api']['uri'];\n $this->username = $ini['api']['username'];\n $this->token = $ini['api']['token'];\n }", "public function setApi()\n {\n $this->_appnexusapiclient = new AppNexusClient\\AppNexusClient(\n $this->username,\n $this->password,\n $this->host,\n $this->getStorage()\n );\n }", "public function setApi()\n {\n $this->_appnexusapiclient = new AppNexusClient\\AppNexusClient(\n $this->username,\n $this->password,\n $this->host,\n $this->getStorage()\n );\n }", "protected function configure()\n {\n $this->setupBroker();\n// $this->setupGateway();\n $this->setNumberGenerator();\n }", "public function setupConnection()\n {\n }", "public function on_start() {\n\t\tif(!defined('BASE_API_PATH')) {\n\t\t\tdefine('BASE_API_PATH', '-/api'); // -/api\n\t\t}\n\t\tif(!defined('C5_API_DEBUG')) {\n\t\t\tConfig::getandDefine('C5_API_DEBUG', true);\n\t\t}\n\n\t\tdefine('C5_API_DIRNAME_AUTH', 'api/auth');\n\t\tdefine('C5_API_DIRNAME_FORMATS', 'api/formats');\n\t\tdefine('C5_API_DIRNAME_ROUTES', 'api/routes');\n\n\t\tdefine('C5_API_DEFAULT_FORMAT', 'json');\n\t\tdefine('C5_API_DEFAULT_AUTH', 'none');\n\n\t\tdefine('C5_API_DEFAULT_KEY_LENGTH', 40);\n\t\tdefine('C5_API_KEY_TIMEOUT', 120);//in seconds\n\n\t\tdefine('C5_API_FILENAME_ROUTES_CONTROLLER', 'controller.php');\n\t\t\n\t\tdefine('C5_API_HANDLE', 'api');\n\n\t\tself::registerAutoload();\n\n\t\tEvents::extend('on_start', 'ApiRouter', 'get', DIR_PACKAGES.'/'.$this->pkgHandle.'/'.DIRNAME_MODELS.'/api/router.php');\n\t}", "public function run(): void\n {\n $endpoint = new Endpoint();\n $endpoint->url = '/channels';\n $endpoint->description = 'Get the list of channels';\n $endpoint->save();\n\n $endpoint = new Endpoint();\n $endpoint->url = '/channels/{channel_uuid}/programmes/{programme_uuid}';\n $endpoint->description = 'Get the programme details based on given channel and programme uuids';\n $endpoint->save();\n\n $endpoint = new Endpoint();\n $endpoint->url = '/channels/{channel_uuid}/{date}/{timezone}';\n $endpoint->description = 'Get the channel programmes for the date and timezone. Use a timezone in the format {continent-city}.';\n $endpoint->save();\n }", "public function configure ()\n {\n $this->setMethod('GET');\n $this->setFunctionPath('/Api/applicationGetStatus');\n $this->setParser(new \\ZendService\\ZendServerAPI\\Adapter\\ApplicationList());\n }", "protected function init_rest_api_handler() {\n\n\t\trequire_once( $this->get_plugin_path() . '/src/REST_API.php' );\n\n\t\t$this->rest_api_handler = new \\SkyVerge\\WooCommerce\\Sequential_Order_Numbers_Pro\\REST_API( $this );\n\t}", "public function __construct()\r\n { \r\n $this->initAPI();\r\n }", "public function setUp()\n {\n parent::setUp();\n\n $clientCredentials = new ClientCredentials();\n $clientCredentials->setIdentifier('consumer-key');\n $clientCredentials->setSecret('consumer-key-secret');\n\n $this->server = new Quickbooks($clientCredentials);\n }", "public function initClient();", "protected function setUp()\n {\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n }", "public function setUp(): void\n { \n $config = Configuration::getDefaultConfiguration()\n ->setHost('http://127.0.0.1:4010')\n ->setUsername('YOUR_ACCOUNT_ID')\n ->setPassword('YOUR_API_KEY');\n\n\n $apiInstance = new DefaultApi(\n new Client(),\n $config\n );\n\n }", "private function setupGuzzle()\n {\n $stack = HandlerStack::create();\n $stack->push(RateLimiterMiddleware::perSecond(3));\n\n $this->guzzle = new Client([\n 'handler' => $stack,\n ]);\n }", "public function setUp()\n {\n $this->apiKey = getenv('BBY_API_KEY');\n $this->client = new Client(['debug' => true, 'key' => $this->apiKey]);\n $this->client->setLogger(new NullLogger());\n }", "public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'press-sync/v1', '/status', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array( $this, 'get_connection_status_via_api' ),\n\t\t) );\n\n\t\tregister_rest_route( 'press-sync/v1', '/status/(?P<id>\\d+)', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array( $this, 'get_post_sync_status_via_api' ),\n\t\t) );\n\n\t\tregister_rest_route( 'press-sync/v1', '/sync', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'sync_objects' ),\n\t\t\t'permission_callback' => array( $this, 'validate_sync_key' ),\n\t\t) );\n\n\t\t/* register_rest_route( 'press-sync/v1', '/sync/(?P<id>\\d+)', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'sync_objects' ),\n\t\t) ); */\n\n\t}", "protected function setEndpoint(): void\n {\n $this->endpoint = $this->getDomain() . '/api/rewardsAndConduct/students';\n }", "protected function setupClient()\n {\n\n $this->_client = new SoapClient($this->getConnection()->getGateway()->getWdsl(),\n array('trace' => 1,\n 'exceptions' => 1));\n }", "public static function configure($api_key)\n {\n parent::configureEndpoint(self::API_ENDPOINT, $api_key);\n }", "public function setupWebservice() {\n $config = array();\n $credentials = Kohana::config('webserviceclient.basic_auth');\n if ($credentials) {\n $config['basic_auth'] = $credentials;\n }\n $this->service = new Web_Service($config);\n }", "public function setUp()\r\n {\r\n $this->bolApi = new Client('B19C17EF61514343B1780F0C520E260B', 'EADBE4CDF75C8F5C6E69246806BB6255B23F4C0206EEFE370A6AE92BBDD42C3E11627F23825935DEBC65F25A1B782F20E6B735C020A9B5CDA81A398BAB80C3D3A91CE3CDEECFCA28A867C0CA45F78201FE8B5C45BC88F37A7737AC2CEC105B3A6A44DD54CD22FF0BC5C29E140ADD4A41F6CED232C9BDF02C744BEE863CAE74FE', new \\Buzz\\Browser());\r\n }", "public function __construct()\n {\n $this->apiUrl = config('app.apiUrl');\n $this->apiKey = config('app.apiKey');\n $this->guzzleClient = new GuzzleClient(\n [\n // Base URI is used with relative requests\n 'base_uri' => $this->apiUrl,\n ]\n );\n }", "public function configure(){\n// $broker = BrokerFactory::getBroker($this->brokerType, $pamelContext, $this->from);\n// $broker->from()->process($this->processor)->to($this->to);\n }", "function setup() {\n\t\t$this->highrise = new HighriseAPI;\n\t\t$this->highrise->setAccount($this->account);\n\t\t$this->highrise->setToken($this->token);\n\t}", "private function initializeTransport() {}", "public function __construct()\n {\n $this->client = $this->getClient();\n }", "private function __construct() { \n $this->clientRestForum = new ClientRestForumImp(new ClientRestGuzzle());\n }", "protected function setup()\n {\n $this->handler = new AirbrakeHandler('test', array());\n $this->client = new AirbrakeClientMock();\n $this->handler->setAirbrakeClient($this->client);\n }", "protected function setup() {\n\t\t$this->rs = new \\HaveAPI\\Client\\Resource($this->client, 'token', $this->description->resources->token, array());\n\t\t$this->via = isSet($this->opts['via']) ? $this->opts['via'] : self::HTTP_HEADER;\n\n\t\tif (isSet($this->opts['token'])) {\n\t\t\t$this->configured = true;\n\t\t\t$this->token = $this->opts['token'];\n\t\t\treturn;\n\t\t} elseif (isSet($this->opts['resume'])) {\n\t\t\t$r = $this->opts['resume'];\n\t\t\t$this->resumeAuthentication($r['action'], $r['token'], $r['input']);\n\t\t\treturn;\n\t\t}\n\n\t\t$this->requestToken();\n\t}", "protected function _endpoint() {\n\t\t\n\t\t$this->_endpoint = $this->_endpoints[$this->_environment];\n\t}", "protected function _endpoint() {\n\t\t\n\t\t$this->_endpoint = $this->_endpoints[$this->_environment];\n\t}", "protected function setUp()\n\t {\n\t\t$this->remotepath = $this->webserverURL();\n\t\t$this->host = $this->remotepath . \"/datasets/bitfinex\";\n\n\t\tdefine(\"BLOOMBERG_URL\", $this->remotepath . \"/BloombergHTTPResponder.php\");\n\t\tdefine(\"BITFINEX_URL\", $this->host);\n\t }", "public function api_rest_api_init() {\n\n\t\t\t/* API - Config */\n\t\t\t$plugin_api_config = new WS_Form_API_Config();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/config/', array('methods' => 'GET', 'callback' => array($plugin_api_config, 'api_get')));\n\n\t\t\t/* API - Helper */\n\t\t\t$plugin_api_helper = new WS_Form_API_Helper();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/test/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_test')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/system/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_system')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/intro/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_intro')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/framework_detect/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_framework_detect')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/setup_push/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_setup_push')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/ws_form_css/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_ws_form_css')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/ws_form_css_skin/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_ws_form_css_skin')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/ws_form_css_skin_rtl/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_ws_form_css_skin_rtl')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/ws_form_css_admin/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_ws_form_css_admin')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/css_email/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_css_email')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/file_download/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_file_download')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/user_meta_hidden_column/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_user_meta_hidden_columns')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/support_contact_submit/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_support_contact_submit')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/deactivate_feedback_submit/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_deactivate_feedback_submit')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/count_submit_unread/', array('methods' => 'GET', 'callback' => array($plugin_api_helper, 'api_count_submit_unread')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/review_nag/dismiss/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_review_nag_dismiss')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/helper/shortcode/', array('methods' => 'POST', 'callback' => array($plugin_api_helper, 'api_review_nag_dismiss')));\n\n\t\t\t/* API - Form */\n\t\t\t$plugin_api_form = new WS_Form_API_Form();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/submit/', array('methods' => 'POST', 'callback' => array($plugin_api_form, 'api_submit')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/download/json/', array('methods' => 'POST', 'callback' => array($plugin_api_form, 'api_post_download_json')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/upload/json/', array('methods' => 'POST', 'callback' => array($plugin_api_form, 'api_post_upload_json')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/full/', array('methods' => 'GET', 'callback' => array($plugin_api_form, 'api_get_full')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/published/', array('methods' => 'GET', 'callback' => array($plugin_api_form, 'api_get_published')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/checksum/', array('methods' => 'GET', 'callback' => array($plugin_api_form, 'api_get_checksum')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/full/', array('methods' => 'PUT', 'callback' => array($plugin_api_form, 'api_put_full')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/', array('methods' => 'PUT', 'callback' => array($plugin_api_form, 'api_put')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/publish/', array('methods' => 'PUT', 'callback' => array($plugin_api_form, 'api_put_publish')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/draft/', array('methods' => 'PUT', 'callback' => array($plugin_api_form, 'api_put_draft')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/locations/', array('methods' => 'GET', 'callback' => array($plugin_api_form, 'api_get_locations')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/svg/draft/', array('methods' => 'GET', 'callback' => array($plugin_api_form, 'api_get_svg_draft')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/svg/published/', array('methods' => 'GET', 'callback' => array($plugin_api_form, 'api_get_svg_published')));\n\n\t\t\t/* API - Form Stats */\n\t\t\t$plugin_api_form_stat = new WS_Form_API_Form_Stat();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/stat/get_chart_data/', array('methods' => 'GET', 'callback' => array($plugin_api_form_stat, 'api_get_chart_data')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/form/(?P<form_id>[\\d]+)/stat/add_view/', array('methods' => 'POST', 'callback' => array($plugin_api_form_stat, 'api_add_view')));\n\n\t\t\t/* API - Group */\n\t\t\t$plugin_api_group = new WS_Form_API_Group();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/group/', array('methods' => 'POST', 'callback' => array($plugin_api_group, 'api_post')));\n\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/group/(?P<group_id>[\\d]+)/', array('methods' => 'PUT', 'callback' => array($plugin_api_group, 'api_put')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/group/(?P<group_id>[\\d]+)/sort_index/', array('methods' => 'PUT', 'callback' => array($plugin_api_group, 'api_put_sort_index')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/group/(?P<group_id>[\\d]+)/clone/', array('methods' => 'PUT', 'callback' => array($plugin_api_group, 'api_put_clone')));\n\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/group/(?P<group_id>[\\d]+)/', array('methods' => 'DELETE', 'callback' => array($plugin_api_group, 'api_delete')));\n\n\t\t\t/* API - Section */\n\t\t\t$plugin_api_section = new WS_Form_API_Section();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/section/', array('methods' => 'POST', 'callback' => array($plugin_api_section, 'api_post')));\n\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/section/(?P<section_id>[\\d]+)/', array('methods' => 'PUT', 'callback' => array($plugin_api_section, 'api_put')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/section/(?P<section_id>[\\d]+)/sort_index/', array('methods' => 'PUT', 'callback' => array($plugin_api_section, 'api_put_sort_index')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/section/(?P<section_id>[\\d]+)/clone/', array('methods' => 'PUT', 'callback' => array($plugin_api_section, 'api_put_clone')));\n\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/section/(?P<section_id>[\\d]+)/', array('methods' => 'DELETE', 'callback' => array($plugin_api_section, 'api_delete')));\n\n\t\t\t/* API - Field */\n\t\t\t$plugin_api_field = new WS_Form_API_Field();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/', array('methods' => 'POST', 'callback' => array($plugin_api_field, 'api_post')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/upload/csv/', array('methods' => 'POST', 'callback' => array($plugin_api_field, 'api_post_upload_csv')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/download/csv/', array('methods' => 'POST', 'callback' => array($plugin_api_field, 'api_post_download_csv')));\n\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/', array('methods' => 'PUT', 'callback' => array($plugin_api_field, 'api_put')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/sort_index/', array('methods' => 'PUT', 'callback' => array($plugin_api_field, 'api_put_sort_index')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/clone/', array('methods' => 'PUT', 'callback' => array($plugin_api_field, 'api_put_clone')));\n\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/', array('methods' => 'DELETE', 'callback' => array($plugin_api_field, 'api_delete')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/field/(?P<field_id>[\\d]+)/', array('methods' => 'GET', 'callback' => array($plugin_api_field, 'api_get')));\n\n\t\t\t/* API - Submit */\n\t\t\t$plugin_api_submit = new WS_Form_API_Submit();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/', array('methods' => 'POST', 'callback' => array($plugin_api_submit, 'api_post')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/action/', array('methods' => 'POST', 'callback' => array($plugin_api_submit, 'api_repost')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/', array('methods' => 'PUT', 'callback' => array($plugin_api_submit, 'api_put')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/download/csv/', array('methods' => 'POST', 'callback' => array($plugin_api_submit, 'api_post_download_csv')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/', array('methods' => 'GET', 'callback' => array($plugin_api_submit, 'api_get')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/hash/(?P<wsf_hash>[a-zA-Z0-9]+)/', array('methods' => 'GET', 'callback' => array($plugin_api_submit, 'api_get_by_hash')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/starred/on/', array('methods' => 'PUT', 'callback' => array($plugin_api_submit, 'api_put_starred_on')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/starred/off/', array('methods' => 'PUT', 'callback' => array($plugin_api_submit, 'api_put_starred_off')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/viewed/on/', array('methods' => 'PUT', 'callback' => array($plugin_api_submit, 'api_put_viewed_on')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/submit/(?P<submit_id>[\\d]+)/viewed/off/', array('methods' => 'PUT', 'callback' => array($plugin_api_submit, 'api_put_viewed_off')));\n\n\t\t\t/* API - Wizard */\n\t\t\t$plugin_api_wizard = new WS_Form_API_Wizard();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/wizard/action/', array('methods' => 'GET', 'callback' => array($plugin_api_wizard, 'api_get_actions')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/wizard/action/(?P<action_id>[a-zA-Z0-9]+)/', array('methods' => 'GET', 'callback' => array($plugin_api_wizard, 'api_get_action_wizards')));\n\t\t\t/* API - Migrate */\n\t\t\t$plugin_api_migrate = new WS_Form_API_Migrate();\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/migrate/field_mapping/', array('methods' => 'POST', 'callback' => array($plugin_api_migrate, 'api_field_mapping')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/migrate/submission/import/', array('methods' => 'POST', 'callback' => array($plugin_api_migrate, 'api_submission_import')));\n\t\t\tregister_rest_route(WS_FORM_RESTFUL_NAMESPACE, '/migrate/form/import/', array('methods' => 'POST', 'callback' => array($plugin_api_migrate, 'api_form_import')));\n\t\t}", "public function __construct()\n {\n $environment = 'sandbox'; // or 'production'\n \\tdanielcox\\Bluesnap\\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');\n }", "public function setUp()\n {\n $this->webhook = new Webhook($this->subscriber, $this->data);\n }", "public function onReady()\n {\n $app = null;\n require ZERO_ROOT . '/vendor/zer0-framework/core/src/bootstrap.php';\n\n define('ZERO_ASYNC', 1);\n\n $this->app = $app;\n\n $routes = $app->broker('HTTP')->getConfig()->Routes;\n\n $config = $app->factory('Socket')->config;\n\n $this->services = $config->services;\n\n $this->redis = $app->factory('RedisAsync');\n\n $this->ws = WebSocketPool::getInstance();\n\n foreach ($config->routes as $routeName => $class) {\n $route = $routes->{$routeName} ?? null;\n\n if (!$route) {\n throw new RouteNotFound(\"Route '\" .$routeName . \"' not found.\");\n }\n\n $this->ws->addRoute(trim($route['path'], '/'), function ($client) use ($class) {\n return new $class($client, $this);\n });\n $this->ws->addRoute(trim($route['path'], '/') . '/', function ($client) use ($class) {\n return new $class($client, $this);\n });\n }\n\n\n $this->sockjs = SockJS::getInstance('');\n $this->sockjs->setRedis($this->redis);\n\n $this->app = $app;\n }", "public function register_endpoints() {\n\t\tregister_rest_route( 'obfx-' . $this->slug, '/obfx-analytics', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'refresh_tracking_links' )\n\t\t\t),\n\t\t) );\n\t}", "function rest_api_init()\n{\n}", "public function __construct()\n {\n $this->cosmetics = new CosmeticsEndpoint();\n $this->shop = new ShopEndpoint();\n $this->news = new NewsEndpoint();\n }", "public function setUp()\n {\n $this->DataBroker = new DataBroker($this->getJobId());\n }", "public function setUp()\n {\n $this->client = new Client();\n $this->client->getConfig()\n ->setUsername(\"api_token123\")\n ->setPassword('testsecret123')\n ->setHost('http://api.formapi.local:31337/api/v1');\n }", "public function __construct()\n {\n $this->connection = env('SWAN_ASYNC_SEND_QUEUE', 'redis');\n $this->queue = env('SWAN_ASYNC_SEND_QUEUE_NAME', 'send_alert');\n $this->weChatApp = new WeChatApplication(Swan::loadEasyWeChatConfig());\n }", "public static function add_endpoint()\n {\n }", "function setup() {\n //$this->url = $r->getBaseUrl().\"/server.php?q=\";\n $this->url = \"http://localhost/diogo/restserver/tests/server.php?q=\";\n }", "public function setUp() {\n\n\t\t// Create the client\n\t\t$this->client = static::createClient();\n\n\t}", "public function __construct()\n {\n $this->Initialize(\"Admin\", \"zabbix\", \"application/json\", \"http://172.16.252.1//zabbix/api_jsonrpc.php\");\n }", "public function __construct()\n {\n $this->client = app(Rest::class);\n }", "private function SetApiUrl() {\n\t\t$this->apiurl = $this->endpoint . '/' . $this->version;\n\t}", "static function bootstrapForApiSubscription() {\n if(!(self::$adapter instanceof AngieApplicationAdapter)) {\n self::loadAdapter();\n } // if\n\n self::initEnvironment();\n self::initHttpEnvironment();\n\n if(self::isInstalled()) {\n self::initCache();\n self::initDatabaseConnection();\n self::initFrameworks();\n self::initModules();\n self::initRouter();\n self::initEventsManager();\n } else {\n self::initInstaller();\n } // if\n }", "protected function set_endpoint_url() {\n\t\t$this->endpoint_url = self::API_URL . $this->endpoint;\n\t}", "public static function init()\n {\n $ENV = getenv(\"ENV\");\n\n switch ($ENV)\n {\n case 'prod':\n APIClient::$url = \"https://saintsxctf.com\";\n break;\n case 'dev':\n APIClient::$url = \"https://dev.saintsxctf.com\";\n break;\n case 'local':\n APIClient::$url = \"localhost/saints-xctf\";\n break;\n default:\n # The default case is a production environment\n APIClient::$url = \"https://saintsxctf.com\";\n }\n\n APIClient::$initialized = true;\n }", "function __construct() {\n $this->client = new \\GuzzleHttp\\Client();\n\n // Set which version of EveryoneAPI to use.\n define(\"APIVersion\", \"1\");\n }", "public function __construct () {\r\n\t\t// Split out endpoint class\r\n\t\t$la_script_path = explode('/', $_SERVER['SCRIPT_NAME']);\r\n\t\t$la_script_name = array_pop($la_script_path);\r\n\t\t//\r\n\t\t$la_script_name = explode('.', $la_script_name);\r\n\t\tarray_pop($la_script_name);\r\n\t\t$ls_script_name = ucfirst(implode('.', $la_script_name));\r\n\r\n\t\t$ls_endpoint_file_path = './endpoint/' . $ls_script_name . '.php';\r\n\t\tif (!file_exists($ls_endpoint_file_path)) {\r\n\t\t\t$this->set_http_response(500);\r\n\t\t\tdie(json_encode(array('error' => array(\"Cannot find corresponding endpoint file: $ls_endpoint_file_path\")))); // Convert to json \r\n\t\t}\r\n\t\tinclude $ls_endpoint_file_path;\r\n\r\n\t\t$ls_endpoint_name = 'RestmeEndpoint\\\\' . $ls_script_name;\r\n\t\t$this->endpoint_class = new $ls_endpoint_name;\r\n\r\n\t\t$this->is_json = (array_key_exists('HTTP_ACCEPT', $_SERVER) && strpos($_SERVER['HTTP_ACCEPT'], 'json') !== false);\r\n\t\t$this->method = strtoupper($_SERVER['REQUEST_METHOD']);\r\n\t\t$this->true_method = $this->_get_true_method();\r\n\t\t$this->version = (!empty($_SERVER['ACCEPT_VERSION']) || !empty($_SERVER['HTTP_ACCEPT_VERSION'])) ? $_SERVER['ACCEPT_VERSION'] . $_SERVER['HTTP_ACCEPT_VERSION'] : '0.0.1';\r\n\r\n\t\t$this->query = $this->get_query();\r\n\r\n\t\t$li_path_length = strlen(implode('/', $la_script_path));\r\n\t\t$la_request_uri = parse_url(substr($_SERVER['REQUEST_URI'], $li_path_length)); // get rid of the path up to the file.\r\n\t\t$la_request_uri = explode('/', trim($la_request_uri['path'], '/'));\r\n\t\t\r\n\t\t// $this->url_parts = new RURL_mapper($la_request_uri);\r\n\t\t$this->url_parts = $la_request_uri;\r\n\t}", "public function ApiClient() {}", "function rest_api_stuff() {\n\t\tregister_rest_route('ap/v1', '/webfinger', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_webfinger'\n\t\t));\n\n\t\tregister_rest_route('ap/v1', '/actor', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_webfinger_actor'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/inbox', array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'get_inbox'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/outbox', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_outbox'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/followers', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_followers'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/likes', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_likes'\n\t\t));\n\t\t\n\t\tregister_rest_route('ap/v1', '/shares', array(\n\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t'callback' => 'get_shares'\n\t\t));\n\t}", "function __construct() {\n \n \n // configs\n self::$api_key = \"\";\n \n self::$api_base_url = \"\";\n }", "protected function set_up()\n {\n parent::set_up();\n\n $this->Zend_Service_Amazon_Ec2_Elasticip = new Zend_Service_Amazon_Ec2_Elasticip('access_key', 'secret_access_key');\n\n $adapter = new Zend_Http_Client_Adapter_Test();\n $client = new Zend_Http_Client(null, [\n 'adapter' => $adapter\n ]);\n $this->adapter = $adapter;\n Zend_Service_Amazon_Ec2_Elasticip::setHttpClient($client);\n }", "public function setup() {\n\t\tadd_filter( 'query_vars', array( $this, 'add_query_vars' ), 0 );\n\t\tadd_action( 'init', array( $this, 'add_endpoint' ), 0 );\n\t\tadd_action( 'parse_request', array( $this, 'handler' ), 0 );\n\t\tadd_filter( 'dlm_can_download', array( $this, 'check_members_only' ), 10, 2 );\n\t\tadd_filter( 'dlm_can_download', array( $this, 'check_blacklist' ), 10, 2 );\n\t}", "public function __construct()\n {\n $this->setApiController(self::END_POINT);\n $this->setVersion(2.1);\n }", "public function __construct()\n {\n $this->client = new Client(['base_uri' => static::MAIN_URL, 'timeout' => 360]);\n $this->setConfigs();\n }", "public function init(){\n\n\t\t$pb = new Pushbullet\\Pushbullet('YOUR-API-KEY');\n\t\tPushbullet\\Connection::setCurlCallback(function ($curl) {\n // Get a CA certificate bundle here:\n // https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt\n //curl_setopt($curl, CURLOPT_CAINFO, 'E:/xampp/api.del.icio.us.crt');\n\n // Not recommended! Makes communication vulnerable to MITM attacks:\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n});\n\t\treturn $pb;\n\t}", "protected function _initTransport() {\n\t}", "protected function setUp()\n {\n $config = require(__DIR__ . '/config.php');\n\n $this->apiKey = $config['apiKey'];\n $this->endPoint = $config['endPoint'];\n\n if (! $this->app) {\n $this->app = $this->createApplication();\n }\n }", "function __construct() {\n $consumerKey = getenv('AWEBER_CONSUMER_KEY');\n $consumerSecret = getenv('AWEBER_CONSUMER_SECRET');\n $accessToken = getenv('AWEBER_ACCESS_KEY');\n $accessSecret = getenv('AWEBER_ACCESS_SECRET');\n $accountID = getenv('AWEBER_ACCOUNT_ID');\n $listID = getenv('AWEBER_LIST_ID');\n \n\n $instance = new AWeberAPI($consumerKey, $consumerSecret);\n $this->account = $instance->getAccount($accessToken, $accessSecret);\n $this->listURL = \"/accounts/{$accountID}/lists/{$listID}\";\n }", "public static function init()\n {\n // Regular api key used for sending emails\n $api_key = Environment::getEnv('MAILGUN_API_KEY');\n if ($api_key) {\n self::config()->api_key = $api_key;\n }\n\n $domain = Environment::getEnv('MAILGUN_DOMAIN');\n if ($domain) {\n self::config()->domain = $domain;\n }\n\n // Set a custom endpoint\n $endpoint = Environment::getEnv('MAILGUN_ENDPOINT');\n if ($endpoint) {\n self::config()->endpoint = $endpoint;\n }\n\n // Debug\n $debug = Environment::getEnv('MAILGUN_DEBUG');\n if ($debug) {\n self::config()->debug = $debug;\n }\n\n // Disable sending\n $sending_disabled = Environment::getEnv('MAILGUN_SENDING_DISABLED');\n if ($sending_disabled) {\n self::config()->disable_sending = $sending_disabled;\n }\n\n // Log all outgoing emails (useful for testing)\n $enable_logging = Environment::getEnv('MAILGUN_ENABLE_LOGGING');\n if ($enable_logging) {\n self::config()->enable_logging = $enable_logging;\n }\n\n // We have a key, we can register the transport\n if (self::config()->api_key) {\n self::registerTransport();\n }\n }", "public function run() {\n\n\t\t$this->installClient();\n\t}", "public static function index()\n {\n $config = new Config();\n $apis = $config->api_endpoints_functions;\n if (count($apis) > 0) {\n foreach ($apis as $api) {\n if (isset($api[0]) && isset($api[1]) && isset($api[2])) {\n \\register_rest_route(\n $config->api_endpoint_name . '/v' . $config->api_endpoint_version,\n '/' . $api[0] . '/(?P<id>\\d+)',\n array(\n 'methods' => $api[1],\n 'callback' => $api[2],\n )\n );\n }\n }\n }\n }", "public function bootClient()\n {\n $this->client = new \\stdClass();\n }", "public function __construct()\n {\n //$options = array('uri'=>'http://10.100.0.46/', 'encoding' => 'UTF-8');\n //create a new SOAP server\n //$server = new SoapServer(NULL, $options);\n //attach the API class to the SOAP Server\n //$server->setClass('Server');\n //$server->setClass('Welcome');\n //start the SOAP requests handler\n //$server->handle();\n }", "private function setup() {\n\t\trequire plugin_dir_path( __FILE__ ) . 'includes/class-myfs-rest-activity-controller.php';\n\t\trequire plugin_dir_path( __FILE__ ) . 'includes/class-myfs-rest-user-controller.php';\n\t\trequire plugin_dir_path( __FILE__ ) . 'includes/class-myfs-rest-group-controller.php';\n\t\trequire plugin_dir_path( __FILE__ ) . 'includes/class-myfs-rest-comment-controller.php';\n\t\trequire plugin_dir_path( __FILE__ ) . 'includes/class-myfs-rest-specimen-controller.php';\n\t\trequire plugin_dir_path( __FILE__ ) . 'includes/class-myfs-rest-notification-controller.php';\n\n\t\tadd_action('rest_api_init', array( $this, 'create_rest_routes' ) );\n\t}", "public function handle_api_callback ()\n\t{\n\t\t// Read URL parameters\n\t\t$action = Mage::app ()->getRequest ()->getParam ('oa_action');\n\t\t$connection_token = Mage::app ()->getRequest ()->getParam ('connection_token');\n\n\t\t// Callback Handler\n\t\tif (strtolower ($action) == 'social_login' and ! empty ($connection_token))\n\t\t{\n\t\t\t// Read settings\n\t\t\t$settings = array ();\n\t\t\t$settings ['api_connection_handler'] = Mage::getStoreConfig ('oneall_sociallogin/connection/handler');\n\t\t\t$settings ['api_connection_port'] = Mage::getStoreConfig ('oneall_sociallogin/connection/port');\n\t\t\t$settings ['api_subdomain'] = Mage::getStoreConfig ('oneall_sociallogin/general/subdomain');\n\t\t\t$settings ['api_key'] = Mage::getStoreConfig ('oneall_sociallogin/general/key');\n\t\t\t$settings ['api_secret'] = Mage::getStoreConfig ('oneall_sociallogin/general/secret');\n\n\t\t\t// API Settings\n\t\t\t$api_connection_handler = ((! empty ($settings ['api_connection_handler']) and $settings ['api_connection_handler'] == 'fsockopen') ? 'fsockopen' : 'curl');\n\t\t\t$api_connection_port = ((! empty ($settings ['api_connection_port']) and $settings ['api_connection_port'] == 80) ? 80 : 443);\n\t\t\t$api_connection_protocol = ($api_connection_port == 80 ? 'http' : 'https');\n\t\t\t$api_subdomain = (! empty ($settings ['api_subdomain']) ? trim ($settings ['api_subdomain']) : '');\n\n\t\t\t// We cannot make a connection without a subdomain\n\t\t\tif (! empty ($api_subdomain))\n\t\t\t{\n\t\t\t\t// See: http://docs.oneall.com/api/resources/connections/read-connection-details/\n\t\t\t\t$api_resource_url = $api_connection_protocol . '://' . $api_subdomain . '.api.oneall.com/connections/' . $connection_token . '.json';\n\n\t\t\t\t// API Credentials\n\t\t\t\t$api_credentials = array ();\n\t\t\t\t$api_credentials ['api_key'] = (! empty ($settings ['api_key']) ? $settings ['api_key'] : '');\n\t\t\t\t$api_credentials ['api_secret'] = (! empty ($settings ['api_secret']) ? $settings ['api_secret'] : '');\n\n\t\t\t\t// Retrieve connection details\n\t\t\t\t$result = $this->do_api_request ($api_connection_handler, $api_resource_url, $api_credentials);\n\n\t\t\t\t// Check result\n\t\t\t\tif (is_object ($result) and property_exists ($result, 'http_code') and $result->http_code == 200 and property_exists ($result, 'http_data'))\n\t\t\t\t{\n\t\t\t\t\t// Decode result\n\t\t\t\t\t$decoded_result = @json_decode ($result->http_data);\n\n\t\t\t\t\tif (is_object ($decoded_result) and isset ($decoded_result->response->result->data->user))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Extract user data.\n\t\t\t\t\t\t$data = $decoded_result->response->result->data;\n\n\t\t\t\t\t\t// The user_token uniquely identifies the user.\n\t\t\t\t\t\t$user_token = $data->user->user_token;\n\n\t\t\t\t\t\t// The identity_token uniquely identifies the social network account.\n\t\t\t\t\t\t$identity_token = $data->user->identity->identity_token;\n\n\t\t\t\t\t\t// Check if we have a user for this user_token.\n\t\t\t\t\t\t$oneall_entity = Mage::getModel ('oneall_sociallogin/entity')->load ($user_token, 'user_token');\n\t\t\t\t\t\t$customer_id = $oneall_entity->customer_id;\n\n\t\t\t\t\t\t// No user for this token, check if we have a user for this email.\n\t\t\t\t\t\tif (empty ($customer_id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (isset ($data->user->identity->emails) and is_array ($data->user->identity->emails))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$customer = Mage::getModel (\"customer/customer\");\n\t\t\t\t\t\t\t\t$customer->setWebsiteId (Mage::app ()->getWebsite ()->getId ());\n\t\t\t\t\t\t\t\t$customer->loadByEmail ($data->user->identity->emails [0]->value);\n\t\t\t\t\t\t\t\t$customer_id = $customer->getId ();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If the user does not exist anymore.\n\t\t\t\t\t\telse if (! Mage::getModel (\"customer/customer\")->load ($customer_id)->getId ()) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Cleanup our table.\n\t\t\t\t\t\t\t$oneall_entity->delete ();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset customer id\n\t\t\t\t\t\t\t$customer_id = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// This is a new customer.\n\t\t\t\t\t\tif (empty ($customer_id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Generate email address\n\t\t\t\t\t\t\tif (isset ($data->user->identity->emails) and is_array ($data->user->identity->emails))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$email = $data->user->identity->emails [0]->value;\n\t\t\t\t\t\t\t\t$email_is_random = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$email = $this->create_random_email ();\n\t\t\t\t\t\t\t\t$email_is_random = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Create a new customer.\n\t\t\t\t\t\t\t$customer = Mage::getModel ('customer/customer');\n\n\t\t\t\t\t\t\t// Generate a password for the customer.\n\t\t\t\t\t\t\t$password = $customer->generatePassword (8);\n\n\t\t\t\t\t\t\t// Setup customer details.\n\t\t\t\t\t\t\t$first_name = 'unknown';\n\t\t\t\t\t\t\tif (! empty ($data->user->identity->name->givenName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$first_name = $data->user->identity->name->givenName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (! empty ($data->user->identity->displayName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->displayName);\n\t\t\t\t\t\t\t\t$first_name = $names[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (! empty($data->user->identity->name->formatted))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->name->formatted);\n\t\t\t\t\t\t\t\t$first_name = $names[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$last_name = 'unknown';\n\t\t\t\t\t\t\tif (! empty ($data->user->identity->name->familyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$last_name = $data->user->identity->name->familyName;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (!empty ($data->user->identity->displayName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->displayName);\n\t\t\t\t\t\t\t\tif (! empty ($names[1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$last_name = $names[1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (!empty($data->user->identity->name->formatted))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->name->formatted);\n\t\t\t\t\t\t\t\tif (! empty ($names[1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$last_name = $names[1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$customer->setFirstname ($first_name);\n\t\t\t\t\t\t\t$customer->setLastname ($last_name);\n\t\t\t\t\t\t\t$customer->setEmail ($email);\n\t\t\t\t\t\t\t//$customer->setSkipConfirmationIfEmail ($email);\n\t\t\t\t\t\t\t$customer->setPassword ($password);\n\t\t\t\t\t\t\t$customer->setPasswordConfirmation ($password);\n\t\t\t\t\t\t\t$customer->setConfirmation ($password);\n\n\t\t\t\t\t\t\t// Validate user details.\n\t\t\t\t\t\t\t$errors = $customer->validate ();\n\n\t\t\t\t\t\t\t// Do we have any errors?\n\t\t\t\t\t\t\tif (is_array ($errors) && count ($errors) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMage::getSingleton ('core/session')->addError (implode (' ', $errors));\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Save user.\n\t\t\t\t\t\t\t$customer->save ();\n\t\t\t\t\t\t\t$customer_id = $customer->getId ();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Save OneAll user_token.\n\t\t\t\t\t\t\t$model = Mage::getModel ('oneall_sociallogin/entity');\n\t\t\t\t\t\t\t$model->setData ('customer_id', $customer->getId ());\n\t\t\t\t\t\t\t$model->setData ('user_token', $user_token);\n\t\t\t\t\t\t\t$model->setData ('identity_token', $identity_token);\n\t\t\t\t\t\t\t$model->save ();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Send email.\n\t\t\t\t\t\t\tif (! $email_is_random)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Site requires email confirmation.\n\t\t\t\t\t\t\t\tif ($customer->isConfirmationRequired ())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$customer->sendNewAccountEmail ('confirmation');\n\t\t\t\t\t\t\t\t\tMage::getSingleton ('core/session')->addSuccess (\n\t\t\t\t\t\t\t\t\t\t\t__ ('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href=\"%s\">click here</a>.',\n\t\t\t\t\t\t\t\t\t\t\tMage::helper ('customer')->getEmailConfirmationUrl ($customer->getEmail ())));\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$customer->sendNewAccountEmail ('registered');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// No email found in identity, but email confirmation required.\n\t\t\t\t\t\t\telse if ($customer->isConfirmationRequired ())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tMage::getSingleton ('core/session')->addError (\n\t\t\t\t\t\t\t\t\t\t\t__ ('Account confirmation by email is required. To provide an email address, <a href=\"%s\">click here</a>.',\n\t\t\t\t\t\t\t\t\t\t\tMage::helper ('customer')->getEmailConfirmationUrl ('')));\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// This is an existing customer.\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Check if we have a user for this user_token.\n\t\t\t\t\t\t\tif (strlen (Mage::getModel ('oneall_sociallogin/entity')->load ($user_token, 'user_token')->customer_id) == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Save OneAll user_token.\n\t\t\t\t\t\t\t\t$model = Mage::getModel ('oneall_sociallogin/entity');\n\t\t\t\t\t\t\t\t$model->setData ('customer_id', $customer_id);\n\t\t\t\t\t\t\t\t$model->setData ('user_token', $user_token);\n\t\t\t\t\t\t\t\t$model->setData ('identity_token', $identity_token);\n\t\t\t\t\t\t\t\t$model->save ();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Login\n\t\t\t\t\t\tif (! empty ($customer_id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Login\n\t\t\t\t\t\t\tMage::getSingleton ('customer/session')->loginById ($customer_id);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Done\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Not logged in.\n\t\treturn false;\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->client = app('fluent.api_client');\n }", "public function actionCallback() {\n\t\trequire dirname(__FILE__) . '/../Hybrid/Endpoint.php';\n\t\tHybrid_Endpoint::process();\n\t}", "private function init()\n {\n $client = new Curl();\n $config = $this->getRequestParams();\n $res = $client->get(self::URL_WEIBO_OAUTH_SERVER,$config);\n $r = json_decode($res, true);\n $this->qrcodeUrl = $r['url'];\n $this->vcode = $r['vcode'];\n $client->close();\n }", "protected function setUp()\n {\n $this->object = new Client( $GLOBALS['api_key'] );\n }", "protected function setUp()\n {\n $this->object = new Client( $GLOBALS['api_key'] );\n }", "protected function setUp()\n {\n $this->object = new Client( $GLOBALS['api_key'] );\n }", "public function setUp() {\n $this->client = new GonebusyClient();\n $this->schedules = $this->client->getSchedules();\n\n $this->services = $this->client->getServices();\n $this->resources = $this->client->getResources();\n }" ]
[ "0.7495751", "0.69207686", "0.62813395", "0.6196975", "0.61348885", "0.6108062", "0.60820085", "0.6073439", "0.6033774", "0.59992146", "0.5956986", "0.5938", "0.590728", "0.58934355", "0.5881625", "0.5871297", "0.5837902", "0.5814883", "0.5785541", "0.5778723", "0.5755105", "0.57546115", "0.5739842", "0.5739842", "0.57289535", "0.5719997", "0.57074904", "0.56839776", "0.56774867", "0.5672374", "0.56694895", "0.56591403", "0.5656174", "0.5655976", "0.564884", "0.56386584", "0.5631727", "0.5625788", "0.56167936", "0.5611845", "0.56111246", "0.56107855", "0.5605874", "0.5583772", "0.55797243", "0.55709815", "0.55654496", "0.55573463", "0.55463797", "0.554365", "0.55353093", "0.5529878", "0.5529878", "0.5508212", "0.5504", "0.5503998", "0.54896843", "0.54893565", "0.5487331", "0.5487217", "0.5486141", "0.54857534", "0.5485421", "0.5484054", "0.547996", "0.5472063", "0.54705715", "0.5470425", "0.5468067", "0.54554933", "0.54540116", "0.5448801", "0.5434856", "0.54309386", "0.54235786", "0.5414775", "0.54122233", "0.5408769", "0.5408323", "0.5406558", "0.54061985", "0.540609", "0.5405701", "0.54016614", "0.5398219", "0.5388379", "0.53859484", "0.5372326", "0.53699166", "0.5360248", "0.5336331", "0.53300667", "0.5327425", "0.53243774", "0.53201336", "0.5304006", "0.52972144", "0.52972144", "0.52972144", "0.5296478" ]
0.7626657
0
Set up Merchant Paybill account.
Настройте аккаунт Merchant Paybill.
protected function setupPaybill() { $this->paybillNumber = mconfig('finance.mpesa.paybill_number'); $this->passkey = mconfig('finance.mpesa.passkey'); $this->demo = mconfig('finance.mpesa.demo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUpBanklink()\n {\n $this->protocol = new $this->protocolClass(\n $this->sellerId,\n __DIR__.'/../keys/IPizza/private_key.pem',\n '',\n __DIR__.'/../keys/IPizza/public_key.pem',\n $this->customRequestUrl\n );\n\n $this->bank = new $this->bankClass($this->protocol);\n }", "public function configure()\r\n {\r\n if ($this->getTestMode()) {\r\n $this->braintree->config->environment('sandbox');\r\n } else {\r\n $this->braintree->config->environment('production');\r\n }\r\n\r\n // Set the keys\r\n $this->braintree->config->merchantId($this->getMerchantId());\r\n $this->braintree->config->publicKey($this->getPublicKey());\r\n $this->braintree->config->privateKey($this->getPrivateKey());\r\n }", "abstract public function setup_payment(): void;", "private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t}", "protected function configure()\n {\n $this->setupBroker();\n $this->setupPaybill();\n }", "private function setupBronto()\n {\n $this->brontoObject = new BrontoSoapApi();\n $sessionId = $this->brontoObject->login(new login($this->token))->getReturn();\n $sessionHeader = new \\SoapHeader(\"http://api.bronto.com/v4\",\n 'sessionHeader',\n array('sessionId' => $sessionId));\n $this->brontoObject->__setSoapHeaders(array($sessionHeader));\n }", "public function setUp()\n {\n $this->gateway = new DirectPostGateway();\n $this->gateway->setUsername('demo');\n $this->gateway->setPassword('password');\n\n $this->purchaseOptions = array(\n 'amount'=>'10.00',\n 'card'=>$this->getValidCard()\n );\n }", "public function setup() {\r\n\t\t$this->payment->Amount->Amount = $this->paymentData['Amount'];\r\n\t\t$this->payment->Amount->Currency = $this->paymentData['Currency'];\r\n\t\t$this->payment->Reference = isset($this->paymentData['Reference']) ? $this->paymentData['Reference'] : null;\r\n\t\t$this->payment->Status = Payment::PENDING;\r\n\t\t$this->payment->Method = $this->methodName;\r\n\t\t$this->payment->write();\r\n\t}", "protected function setUp()\n {\n $this->conf = include(__DIR__ . \"/conf.php\");\n $rpc = new JsonRPC($this->conf[\"wallet1\"]);\n $this->wallet = new Wallet($rpc);\n $this->wallet->unlock(\"Fatty7Boom6Boom\", 5);\n }", "public function __construct()\n {\n\n // You can import it from your Database\n $bkash_app_key = '5tunt4masn6pv2hnvte1sb5n3j'; // bKash Merchant API APP KEY\n $bkash_app_secret = '1vggbqd4hqk9g96o9rrrp2jftvek578v7d2bnerim12a87dbrrka'; // bKash Merchant API APP SECRET\n $bkash_username = 'sandboxTestUser'; // bKash Merchant API USERNAME\n $bkash_password = 'hWD@8vtzw0'; // bKash Merchant API PASSWORD\n $bkash_base_url = 'https://checkout.sandbox.bka.sh/v1.2.0-beta'; // For Live Production URL: https://checkout.pay.bka.sh/v1.2.0-beta\n\n $this->app_key = $bkash_app_key;\n $this->app_secret = $bkash_app_secret;\n $this->username = $bkash_username;\n $this->password = $bkash_password;\n $this->base_url = $bkash_base_url;\n }", "public function set_gateway() {\n\t\tglobal $gateway_environment;\n\t\t$environment = $gateway_environment;\n\n\t\t$this->gateway_version = urlencode( '109.0' );\n\n\t\t$this->API_UserName = urlencode( pmpro_getOption( \"ppauto_apiusername\" ) );\n\t\t$this->API_Password = urlencode( pmpro_getOption( \"ppauto_apipassword\" ) );\n\t\t$this->API_Signature = urlencode( pmpro_getOption( \"ppauto_apisignature\" ) );\n\n\t\t$this->gateway_url = \"https://api-3t.paypal.com/nvp\";\n\n\t\tif ( \"sandbox\" === $environment || \"beta-sandbox\" === $environment ) {\n\t\t\t$this->gateway_url = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t}\n\n\t}", "private function __construct() {\n $this->_applicationName = 'Billing';\n $this->_backend = new Billing_Backend_AccountSystem();\n $this->_modelName = 'Billing_Model_AccountSystem';\n $this->_currentAccount = Tinebase_Core::getUser();\n $this->_purgeRecords = FALSE;\n $this->_doContainerACLChecks = FALSE;\n $this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\n }", "public function setup_payment(): void {\n\t\t\t// No actions.\n\t\t}", "public function setUp()\n {\n $options = array(\n 'username' => 'pj-ql-01',\n 'password' => 'pj-ql-01p',\n 'appkey' => '2489d40d-a74f-474f-9e8e-7b39507f3101',\n 'endpoint' => 'test'\n );\n\n $this->client = (new PayJunction\\Client($options))->customer();\n\n parent::setUp();\n }", "function initPayment() ;", "function mc_ewallet_setup(){\n mc_wallet_register_role_cap();\n mc_wallet_install();\n}", "protected function set_billing() {\n\n\t\tif ( ! empty( $this->get_order()->payment->billing_address_id ) ) {\n\n\t\t\t// use the existing billing address when using a saved payment method\n\t\t\t$this->request_data['billingAddressId'] = $this->get_order()->payment->billing_address_id;\n\n\t\t} else {\n\n\t\t\t// otherwise just set the billing address directly\n\t\t\t$this->request_data['billing'] = array(\n\t\t\t\t'firstName' => $this->get_order_prop( 'billing_first_name' ),\n\t\t\t\t'lastName' => $this->get_order_prop( 'billing_last_name' ),\n\t\t\t\t'company' => $this->get_order_prop( 'billing_company' ),\n\t\t\t\t'streetAddress' => $this->get_order_prop( 'billing_address_1' ),\n\t\t\t\t'extendedAddress' => $this->get_order_prop( 'billing_address_2' ),\n\t\t\t\t'locality' => $this->get_order_prop( 'billing_city' ),\n\t\t\t\t'region' => $this->get_order_prop( 'billing_state' ),\n\t\t\t\t'postalCode' => $this->get_order_prop( 'billing_postcode' ),\n\t\t\t\t'countryCodeAlpha2' => $this->get_order_prop( 'billing_country' ),\n\t\t\t);\n\t\t}\n\t}", "public function setBillpayer(Billpayer $billpayer);", "function authorizeCreateAccount(\n\t$apiLogin,\n\t$transKey,\n\t$testMode = false,\n\t$merchantCustomerId,\n\t$billTo_firstName,\n\t$billTo_lastName,\n\t$billTo_address,\n\t$billTo_city,\n\t$billTo_state,\n\t$billTo_zip,\n\t$billTo_country,\n\t$billTo_phoneNumber,\n\t$email,\n\t$cardNumber,\n\t$expirationDate\n){\n\n\t// Athenticate\n \t$cim = new AuthNetCim($apiLogin, $transKey, $testMode);\n\n\t// Set all to \"individual\"\n\t$cim->setParameter('customerType', 'individual'); // individual or business (optional)\n\n\t// merchantCustomerId must be unique across all profiles\n\t$cim->setParameter('merchantCustomerId', $merchantCustomerId); // Up to 20 characters (optional)\n\n\t// Some Billing address information is required and some is optional\n\t// depending on the Address Verification Service (AVS) settings\n\t$cim->setParameter('billTo_firstName', $billTo_firstName); // Up to 50 characters (no symbols)\n\t$cim->setParameter('billTo_lastName', $billTo_lastName); // Up to 50 characters (no symbols)\n\t//$cim->setParameter('billTo_company', 'Acme, Inc.'); // Up to 50 characters (no symbols) (optional)\n\t$cim->setParameter('billTo_address', $billTo_address); // Up to 60 characters (no symbols)\n\t$cim->setParameter('billTo_city', $billTo_city); // Up to 40 characters (no symbols)\n\t$cim->setParameter('billTo_state', $billTo_state); // A valid two-character state code (US only) (optional)\n\t$cim->setParameter('billTo_zip', $billTo_zip); // Up to 20 characters (no symbols)\n\t$cim->setParameter('billTo_country', $billTo_country); // Up to 60 characters (no symbols) (optional)\n\t$cim->setParameter('billTo_phoneNumber', $billTo_phoneNumber); // Up to 25 digits (no letters) (optional)\n\t//$cim->setParameter('billTo_faxNumber', '444-444-4444'); // Up to 25 digits (no letters) (optional)\n\n\t// In this method, shipping information is required because it reduces an extra\n\t// step from having to create a shipping address in the future, therefore you can simply update it when needed.\n\t// Just populate it with the billing info if you don't have an order form with shipping details.\n\t$cim->setParameter('shipTo_firstName', $billTo_firstName); // Up to 50 characters (no symbols)\n\t$cim->setParameter('shipTo_lastName', $billTo_lastName); // Up to 50 characters (no symbols)\n\t//$cim->setParameter('shipTo_company', 'Acme, Inc.'); // Up to 50 characters (no symbols) (optional)\n\t$cim->setParameter('shipTo_address', $billTo_address); // Up to 60 characters (no symbols)\n\t$cim->setParameter('shipTo_city', $billTo_city); // Up to 40 characters (no symbols)\n\t$cim->setParameter('shipTo_state', $billTo_state); // A valid two-character state code (US only) (optional)\n\t$cim->setParameter('shipTo_zip', $billTo_zip); // Up to 20 characters (no symbols)\n\t$cim->setParameter('shipTo_country', $billTo_country); // Up to 60 characters (no symbols) (optional)\n\t$cim->setParameter('shipTo_phoneNumber', $billTo_phoneNumber); // Up to 25 digits (no letters) (optional)\n\t//$cim->setParameter('shipTo_faxNumber', '444-444-4444'); // Up to 25 digits (no letters) (optional)\n\n\t// A receipt from authorize.net will be sent to the email address defined here\n\t$cim->setParameter('email', $email); // Up to 255 characters (optional)\n\n\t// Merchant-assigned reference ID for the request\n\t//$cim->setParameter('refId', 'my unique ref id'); // Up to 20 characters (optional)\n\n\t// Description must be unique across all profiles, if defined\n\t//$cim->setParameter('description', 'My description'); // Up to 255 characters (optional)\n\n\t// Choose a payment type - (creditCard or bankAccount) REQUIRED\n\t// creditCard payment method\n\t$cim->setParameter('paymentType', 'creditCard');\n\t$cim->setParameter('cardNumber', $cardNumber);\n\t$cim->setParameter('expirationDate', $expirationDate); // (YYYY-MM)\n\n\t// eCheck payment method (not used right now)\n\t//$cim->setParameter('paymentType', 'bankAccount');\n\t//$cim->setParameter('accountType', 'checking'); // (checking, savings or businessChecking)\n\t//$cim->setParameter('nameOnAccount', 'John Smith');\n\t//$cim->setParameter('echeckType', 'WEB'); // (CCD, PPD, TEL or WEB)\n\t//$cim->setParameter('bankName', 'Bank of America');\n\t//$cim->setParameter('routingNumber', '000000000');\n\t//$cim->setParameter('accountNumber', '0000000000000');\n\n\t// Do it!\n\t$cim->createCustomerProfileRequest();\n\n\treturn $cim;\n\n}", "public function brokerPay()\r\n {}", "private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t\t$this->_doContainerACLChecks = FALSE;\n\t\t$this->setOutputType();\n\t}", "public function __construct()\n {\n $bkash_app_key = '5tunt4masn6pv2hnvte1sb5n3j'; // bKash Merchant API APP KEY\n $bkash_base_url = 'https://checkout.sandbox.bka.sh/v1.2.0-beta'; // For Live Production URL: https://checkout.pay.bka.sh/v1.2.0-beta\n\n $this->app_key = $bkash_app_key;\n $this->base_url = $bkash_base_url;\n }", "private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_backend = new Billing_Backend_PaymentMethod();\n\t\t$this->_modelName = 'Billing_Model_PaymentMethod';\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t\t$this->_purgeRecords = FALSE;\n\t\t$this->_doContainerACLChecks = FALSE;\n\t\t$this->_config = isset(Tinebase_Core::getConfig()->eventmanager) ? Tinebase_Core::getConfig()->eventmanager : new Zend_Config(array());\n\t}", "public function payeeAccount();", "public function testCreateBillingAccount()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function set_billing_address_to_base()\n {\n }", "public function createAccount(array $config = []);", "public function setAccount( $account );", "public static function setPayUEnvironment()\n {\n \\PayU::$apiKey = static::getApiKey();\n \\PayU::$apiLogin = static::getApiLogin();\n \\PayU::$merchantId = static::getMerchantId();\n \\PayU::$isTest = static::isAccountInTesting();\n \\PayU::$language = \\SupportedLanguages::ES;\n if (static::isAppInTesting() == 'local') {\n \\Environment::setPaymentsCustomUrl(\n \"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi\"\n );\n \\Environment::setReportsCustomUrl(\n \"https://sandbox.api.payulatam.com/reports-api/4.0/service.cgi\"\n );\n \\Environment::setSubscriptionsCustomUrl(\n \"https://sandbox.api.payulatam.com/payments-api/rest/v4.9/\"\n );\n } else {\n \\Environment::setPaymentsCustomUrl(\n \"https://api.payulatam.com/payments-api/4.0/service.cgi\"\n );\n \\Environment::setReportsCustomUrl(\n \"https://api.payulatam.com/reports-api/4.0/service.cgi\"\n );\n \\Environment::setSubscriptionsCustomUrl(\n \"https://api.payulatam.com/payments-api/rest/v4.9/\"\n );\n }\n }", "protected function setupBroker()\n {\n $this->endpoint = (object)[\n 'identity' =>config('payments.equity.endpoint-identity'),\n 'transaction' => config('payments.equity.endpoint-transaction'),\n ];\n $this->callbackUrl = config('payments.equity.callback_url');\n $this->callbackMethod = config('payments.equity.callback_method');\n $this->consumerSecret = config('payments.equity.consumer_secret');\n $this->consumerKey = config('payments.equity.consumer_key');\n $this->username = config('payments.equity.username');\n $this->password = config('payments.equity.password');\n $this->authBasic = base64_encode($this->consumerKey . ':' . $this->consumerSecret);\n $this->demo = config('payments.equity.demo');\n }", "public function testCreateBankAccount(){\n\t\t$parameters = PayUTestUtil::buildParametersBankAccount();\n\t\t$customer = PayUCustomers::create(PayUTestUtil::buildSubscriptionParametersCustomer());\n\t\t$parameters[PayUParameters::CUSTOMER_ID] = $customer->id;\n\t\t$response = PayUBankAccounts::create($parameters);\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotNull($response->id);\n\t\t$this->assertEquals(\"CREATED\",$response->state);\n\t}", "public function __construct()\n {\n $swConfig = Shopware()->Plugins()->Frontend()->PaymPaymentCreditcard()->Config();\n $this->modelHelper = new Shopware_Plugins_Frontend_PaymPaymentCreditcard_Components_ModelHelper();\n $this->privateKey = trim($swConfig->get(\"privateKey\"));\n $this->servicePayments = new Services_Paymill_Payments(trim($swConfig->get(\"privateKey\")), $this->apiUrl);\n }", "public function specifyCredentials()\n {\n $this->_rootElement->find($this->fields['Merchant ID'])->setValue('1');\n $this->_rootElement->find($this->fields['Public Key'])->setValue('1');\n $this->_rootElement->find($this->fields['Private Key'])->setValue('1');\n }", "public function __construct($config = array())\n {\n $this->setup($config);\n $this->fieldData['MERCHANT'] = $this->merchantId;\n }", "public function __construct($config = array())\n {\n $this->setup($config);\n $this->fieldData['MERCHANT'] = $this->merchantId;\n }", "function __construct()\t\r\n\t\t{\t\r\n\r\n\t\t\trequire_once(\"FlexPay.php\");\r\n\r\n\t\t\t// Turn on options for subscriptions\r\n\t\t\t$this->supports = array( \r\n\t\t\t\t'subscriptions', \r\n\t\t\t\t'products', \r\n\t\t\t\t'subscription_cancellation',\r\n\t\t\t\t'gateway_scheduled_payments' // This turns off the WooSubscriptions automated payments as Verotel handles this.\r\n\t\t\t);\r\n\r\n\t\t\t$this->id = \"cardbilling\";\r\n\t\t\t$this->icon = null;\r\n\t\t\t$this->method_title = \"Verotel / CardBilling\";\r\n\t\t\t$this->method_description = \"Allows for single purchase payments via your Verotel / CardBilling merchant account.\";\r\n\t\t\t\r\n\t\t\t$url_pb = home_url( '/' ).\"?wc-api=WC_Gateway_CardBilling&Action=Approval_Post\";\r\n\t\t\t$url_su = home_url( '/' ).\"?wc-api=WC_Gateway_CardBilling&Action=CheckoutSuccess\";\r\n\t\t\t\r\n\t\t\t$this->method_description .= \"\\n\\nYour Postback script URL: \" . $url_pb;\r\n\t\t\t$this->method_description .= \"\\nYour Success URL: \" . $url_su;\r\n\r\n\t\t\t$this->init_form_fields();\r\n\t\t\t$this->init_settings();\r\n\r\n\t\t\t// Turn these settings into variables we can use\r\n\t\t\tforeach ( $this->settings as $setting_key => $value ) {\r\n\t\t\t\t$this->$setting_key = $value;\r\n\t\t\t}\r\n\r\n\r\n\t\t\t// Lets check for SSL\r\n\t\t\tadd_action( 'admin_notices', array( $this,\t'do_ssl_check' ) );\r\n\r\n\t\t\t// Save settings\r\n\t\t\tif ( is_admin() ) {\r\n\t\t\t\t// Versions over 2.0\r\n\t\t\t\t// Save our administration options. Since we are not going to be doing anything special\r\n\t\t\t\t// we have not defined 'process_admin_options' in this class so the method in the parent\r\n\t\t\t\t// class will be used instead\r\n\t\t\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t// Payment listener/API hook\r\n\t\t\tadd_action( 'woocommerce_api_wc_gateway_cardbilling', array( $this, 'check_verotel_response' ) );\r\n\t\t\tadd_action( 'woocommerce_api_wc_gateway_cardbilling', array( $this, 'process_verotel_response' ) );\r\n\t\t\t\r\n\t\t\t// Hook triggered after a subscription is cancelled\r\n\t\t\tadd_action( 'cancelled_subscription', array( $this, 'cancel_subscription' ),0,2 );\r\n\r\n\t\t}", "public function __construct() {\r\n parent::__construct();\r\n $this->load->library('merchant');\r\n $this->merchant->load('paypal_express');\r\n }", "public function setMerchantAccount($value)\n {\n return $this->setParameter('merchantAccount', $value);\n }", "protected function setup_properties() {\r\n\t\t$this->id = 'b_pay';\r\n\t\t$this->icon = apply_filters( 'woocommerce_b_pay_icon', plugins_url('../assets/b_pay.jpg', __FILE__ ) );\r\n\t\t$this->method_title = __( 'b_pay Mobile Payments', 'b_pay-payments-woo' );\r\n\t\t$this->dev_key = __( 'Ajouter Dev_Key', 'b_pay-payments-woo' );\r\n\t\t$this->business_key = __( 'Ajouter Business_key', 'b_pay-payments-woo' );\r\n\t\t$this->method_description = __( 'Le mode de paiement que vont utiliser vos clients.', 'b_pay-payments-woo' );\r\n\t\t$this->has_fields = false;\r\n\t}", "public function setUp() {\n $this->account = new Account();\n\n // Define\n $this->phactory->define( 'websites', array( 'user_id' => self::USER_ID, 'title' => self::TITLE, 'status' => Account::STATUS_ACTIVE, 'live' => Account::LIVE ) );\n $this->phactory->define( 'auth_user_websites', array( 'website_id' => self::WEBSITE_ID, 'user_id' => self::USER_ID ) );\n $this->phactory->define( 'website_products', array( 'website_id' => self::WEBSITE_ID, 'product_id' => self::PRODUCT_ID ) );\n $this->phactory->define( 'website_settings', array( 'website_id' => self::WEBSITE_ID, 'key' => self::WEBSITE_SETTINGS_KEY, 'value' => self::WEBSITE_SETTINGS_VALUE ) );\n $this->phactory->define( 'website_industries', array( 'website_id' => self::WEBSITE_ID, 'industry_id' => self::INDUSTRY_ID ) );\n $this->phactory->define( 'users', array( 'role' => User::ROLE_ADMIN, 'status' => User::STATUS_ACTIVE ) );\n $this->phactory->define( 'website_top_brands', array( 'website_id' => self::WEBSITE_ID, 'brand_id' => self::BRAND_ID ) );\n $this->phactory->recall();\n }", "protected function setUp()\n {\n $this->configuration = new \\LibBankaccount\\Configuration(\"localhost\", \"root\", \"\", \"bankaccount\");\n\n parent::setUp();\n }", "public function setUp()\n {\n $easyCredit = new EasyCreditPaymentMethod();\n\n $easyCredit->getRequest()->authentification(...$this->authentification);\n $easyCredit->getRequest()->customerAddress(...$this->customerDetails);\n $easyCredit->getRequest()->b2cSecured('MR', '1970-01-01');\n $easyCredit->getRequest()->async('DE', 'https://dev.heidelpay.de');\n\n $easyCredit->getRequest()->getRiskInformation()->set('guestcheckout', false);\n $easyCredit->getRequest()->getRiskInformation()->set('since', '2013-01-01');\n $easyCredit->getRequest()->getRiskInformation()->set('ordercount', 3);\n\n $easyCredit->getRequest()->basketData(\n 'heidelpayEasyCreditTest',\n 500.98,\n $this->currency,\n $this->secret\n );\n\n $this->paymentObject = $easyCredit;\n }", "public function setMerchantAccount($val)\n {\n if (is_array($val))\n {\n return parent::setMerchantAccount($val);\n }\n\n // Explode from string.\n list($appId, $shopId, $password, $privateKey, $rc4key) = explode(':', $val);\n\n $this->setAppId($appId);\n\n $this->setShopId($shopId);\n\n $this->setPassword($password);\n\n $this->setPrivateKey($privateKey);\n\n $this->setRC4Key($rc4key);\n\n return $this;\n }", "public function actionCreate_account()\n {\n\n // // Test\n // $customer_profile = ANETFacade::save_customer_profile(array(\n // 'description'=>Yii::app()->name,\n // 'card_num'=>'4242424242424242',\n // 'exp_date'=>'04/2019',\n // 'firstName'=>'Jim',\n // 'lastName'=>'Campbell',\n // 'email'=>'jim.campbell@engagex.com',\n // 'bill_address'=>'Test Address',\n // 'bill_state'=>'Test State',\n // 'bill_city'=>'Test City',\n // 'bill_zipcode'=>'Test Zipcode',\n // 'bill_phone'=>'36287773678',\n // ));\n // echo json_encode($customer_profile);\n // exit;\n\n $model = new CreateAccountForm();\n \n if (isset($_POST['CreateAccountForm'])) {\n $data = $_POST['CreateAccountForm'];\n \n $model->attributes = $data;\n \n $email = AccountSetup::model()->find(\"email = :email\", array(\n ':email' => $data['email']\n ));\n if ($email != null) {\n Yii::app()->user->setFlash('error', 'Your email address already taken');\n } else {\n if ($model->validate()) {\n // customer profile CIM\n $customer_profile = ANETFacade::save_customer_profile(array(\n 'description'=>Yii::app()->name,\n 'card_num'=>$data['cc_cardnum'],\n 'exp_date'=>$data['cc_expiry_month'].'/'.$data['cc_expiry_year'],\n 'email'=>$data['email'],\n 'bill_address'=>$data['bill_address'],\n 'bill_state'=>$data['bill_state'],\n 'bill_city'=>$data['bill_city'],\n 'bill_zipcode'=>$data['bill_zipcode'],\n 'bill_phone'=>$data['bill_phone'],\n ));\n \n if ($customer_profile['status'] == EnumStatus::ERROR) {\n Yii::app()->user->setFlash('error', $customer_profile['msg']);\n } else {\n $customer_profile_id = $customer_profile['customerProfileId'];\n $payment_profile_id = $customer_profile['paymentProfileId'];\n \n \n // save account setup\n $acct_setup = new AccountSetup();\n $acct_setup->email = $data['email'];\n $acct_setup->password = $this->security_encrypt($data['password']);\n $acct_setup->agency_name = $data['agency_name'];\n $acct_setup->first_name = $data['first_name'];\n $acct_setup->last_name = $data['last_name'];\n $fullname = $acct_setup->first_name . ' ' . $acct_setup->last_name; // combined\n $acct_setup->office_phone_number = $data['bill_phone'];\n $acct_setup->videoconf_feature = $data['videoconf_feature'];\n if(!$acct_setup->save())\n {\n Yii::app()->user->setFlash('error', $acct_setup->errors);\n } else {\n // save login user\n $username = explode('@', $acct_setup->email);\n $user = new User();\n $user->account_id = $acct_setup->id;\n $user->email = $acct_setup->email;\n $user->username = $acct_setup->email;\n $user->fullname = (isset($fullname) ? '-' : $fullname);\n $user->password = $acct_setup->password;\n $user->roles = EnumRoles::ADMINISTRATOR;\n if (!$user->save()) {\n //$this->dd($user->errors);\n Yii::app()->user->setFlash('error', 'Error saving user information');\n }\n \n // save credit card information\n $cc = new CreditCardSettings();\n $cc->account_id = $acct_setup->id;\n $cc->created_at = new CDbExpression('NOW()');\n $cc->is_primary = 1;\n $cc->cim_customer_profile_id = $customer_profile_id;\n $cc->cim_payment_profile_id = $payment_profile_id;\n $cc->credit_card = $data['cc_cardnum'];\n $cc->card_type = $data['cc_cardtype'];\n if(!$cc->save()) {\n //$this->dd($cc->errors);\n Yii::app()->user->setFlash('error', 'Error saving card detail');\n }\n \n \n // init variable\n $enroll_fee = 0;\n $staff_fee = 0;\n $videoconf_fee = 0;\n $total_bill = 0;\n $promo_amount = 0;\n\n $promo_code = '';\n $chargesfee = ChargesFacade::fees();\n \n // bill computation\n $enroll_fee = $chargesfee->enrollment_fee;\n $description = \"Enrollment Fee\";\n $total_bill = $enroll_fee;\n\n // IF user initially buy staff\n if (boolval($data['buy_staff'])) {\n $staff_fee = $chargesfee->staff_fee;\n $total_bill = $total_bill + $staff_fee;\n $description = $description . \" + Staff Fee\";\n \n // save staff credits\n $staff_credits = new StaffCredits();\n $staff_credits->account_id = $acct_setup->id;\n $staff_credits->staff_credit = $chargesfee->staff_credits;\n $staff_credits->created_at = new CDbExpression('NOW()');\n $staff_credits->save();\n }\n\n // If user initially enable video conference feature\n if (boolval($data['videoconf_feature'])) {\n $videoconf_fee = $chargesfee->videoconf_feature_fee;\n $total_bill = $total_bill + $videoconf_fee;\n $description = $description . \" + Video Conference Feature Fee\";\n }\n \n // promo deduction\n if ($data['promo_code'] != '') {\n $promo = Promo::model()->find('promo_code = :promo_code', array(\n ':promo_code'=>$data['promo_code']\n ));\n if($promo != null) {\n $promo_code = $data['promo_code'];\n $promo_amount = $promo->amount_off;\n \n $description = $description . \" (Promo Off: \". $promo_amount .\")\";\n $total_bill = $total_bill - $promo_amount;\n }\n }\n \n // payment transaction\n $invoice_num = date('Ym').'-'.$acct_setup->id;\n $transaction = ANETFacade::save_payment(array(\n 'cust_id' =>$customer_profile_id,\n 'last_name' => $data['last_name'],\n 'first_name' => $data['first_name'],\n 'company' =>$acct_setup->agency_name,\n 'address' =>$data['bill_address'],\n 'city' =>$data['bill_city'],\n 'state' => $data['bill_state'],\n 'zip' => $data['bill_zipcode'],\n 'country' => 'USA',\n 'phone' => $data['bill_phone'],\n 'invoice_num' =>$invoice_num,\n 'amount' =>$total_bill,\n 'card_num' =>$data['cc_cardnum'],\n 'exp_date' =>$data['cc_expiry_month'].'/'.$data['cc_expiry_year'],\n 'email' =>$data['email'],\n 'description' =>$description,\n ));\n \n if ($transaction['status'] == EnumStatus::ERROR) {\n Yii::app()->user->setFlash('error', 'Error saving payment: '. $transaction['msg']);\n } else {\n $transaction_id = $transaction['transaction_id'];\n \n // record invoice\n $inv = new Billing();\n $inv->account_id = $acct_setup->id;\n $inv->created_at = new CDbExpression(\"NOW()\");\n $inv->bill_type = EnumStatus::ENROLLMENT;\n $inv->bill_no = $invoice_num;\n $inv->fee = $enroll_fee;\n $inv->promo_code = $promo_code;\n $inv->promo_off = $promo_amount;\n $inv->bill_amount = $total_bill;\n $inv->bill_status = EnumStatus::PAID;\n $inv->save();\n \n // record payments \n $payment = new Payments();\n $payment->account_id = $acct_setup->id;\n $payment->created_at = new CDbExpression(\"NOW()\");\n $payment->invoice_number = $invoice_num;\n $payment->enrollment_fee = $enroll_fee;\n $payment->staff_fee = $staff_fee;\n $payment->videoconf_fee = $videoconf_fee;\n $payment->promo_code = $promo_code;\n $payment->promo_off = $promo_amount;\n $payment->invoice_total = $total_bill;\n $payment->payment_date = new CDbExpression(\"NOW()\");\n $payment->invoice_description = $description;\n $payment->invoice_type = EnumStatus::ENROLLMENT;\n $payment->creditcard = $data['cc_cardnum'];\n $payment->anet_customer_profile_id = $customer_profile_id;\n $payment->anet_payment_profile_id = $payment_profile_id;\n $payment->anet_transaction_id = $transaction_id;\n if (!$payment->save()) {\n //$this->dd($payment->errors);\n Yii::app()->user->setFlash('error', 'Error saving payment details');\n }\n }\n \n if(Yii::app()->user->hasFlash('error')) {\n // back page\n $this->redirect('/site/create_account');\n } else {\n // success page\n $this->redirect('/site/success?email='.$acct_setup->email .'&ok=true');\n }\n }\n\n }\n \n\n\n } // validate $model\n } \n }\n \n // change master page layout\n $this->layout = '//layouts/column_login';\n \n $this->render('create_account', array(\n 'model' => $model\n ));\n }", "function __construct()\n {\n $this->conf['ApiKey'] = 'de9236b1b6743bebf3ae16b5e0f7134c';\n $this->conf['SignatureKey'] = 'fd41ed6009449598c721035c549c6ae8';\n\n /**\n * 1: For Sandbox (Test);\n * 0: For Production\n */\n $this->conf['Environment'] = 1;\n\n /**\n * Total Amount\n */\n $this->conf['Amount'] = '346.50';\n\n /**\n * Currency Code\n * Samples: USD, PEN, MXN, EUR.\n * Register your Default Currency market products, this must match your\n * Bank Account Affiliate. MMS, option: Profile > Bank Accounts.\n */\n $this->conf['CurrencyCode'] = 'USD';\n\n /**\n * ISO Code Language\n * Samples: EN, ES, DE, PT.\n */\n $this->conf['Language'] = 'EN';\n\n /**\n * Merchant Reference No.\n * Required in purchase process.\n */\n $this->conf['MerchantSalesID'] = 'ORDER_NO-12345';\n\n /**\n * Tracking Code.\n * Leave blank\n */\n $this->conf['TrackingCode'] = '';\n\n /**\n * Communication Protocol\n * 'http' or 'https'\n * Check also related parameter: 'port_ssl'.\n */\n $this->conf['Protocol'] = 'https';\n\n /**\n * URL Token Expiration Time\n * In minutes. Default: 120 minutes.\n */\n $this->conf['ExpirationTime'] = 120;\n\n /**\n * Filter By\n * Filter options in screen Express service as Countries, Banks\n * or Currencies. Leave blank. Optional.\n * Samples:\n * COUNTRY(PER)CURRENCY(USD): Show only to Peru and pay with US Dollar\n * BANK(1011,1019)COUNTRY(ESP): Shown only to Spain and banks selected.\n */\n $this->conf['FilterBy'] = '';\n\n /**\n * Choose a URL for Return at message of sucess or fail paid process.\n */\n $this->conf['TransactionOkURL'] = 'http://demostore.safetypay.com';\n $this->conf['TransactionErrorURL'] = 'http://demostore.safetypay.com/contacts/';\n\n /**\n * Port number to connections SSL. Related at \"Environment\" parameter.\n */\n $this->conf['port_ssl'] = 443;\n\n /**\n * Request Date Time\n */\n $this->conf['RequestDateTime'] = $this->getDateIso8601(time());\n\n /**\n * Data Responde Format\n * Options: XML, CSV (Default)\n */\n $this->conf['ResponseFormat'] = 'XML';\n }", "public function TransferToProvider()\n\t{\n\t\t$payMateCurrency = '';\n\t\t$defaultCurrency = GetDefaultCurrency();\n\n\t\tif (isset($defaultCurrency['currencycode']) && trim($defaultCurrency['currencycode']) !== '') {\n\t\t\t$payMateCurrency = $defaultCurrency['currencycode'];\n\t\t}\n\n\t\t// Default the default currency code to AUD if we have none or if we have an unsupported one\n\t\tif ($payMateCurrency == '' || !$this->checkSupportedCurrencies($payMateCurrency)) {\n\t\t\t$payMateCurrency = 'AUD';\n\t\t}\n\n\t\t$payMateUsername = trim($this->GetValue(\"username\"));\n\n\t\tif($this->GetValue(\"testmode\") == \"YES\") {\n\t\t\t$payMateURL = sprintf(\"https://www.paymate.com.au/PayMate/TestExpressPayment?mid=%s\", $payMateUsername);\n\t\t}\n\t\telse {\n\t\t\t$payMateURL = sprintf(\"https://www.paymate.com/PayMate/ExpressPayment?mid=%s\", $payMateUsername);\n\t\t}\n\n\t\t$billingDetails = $this->GetBillingDetails();\n\t\t$hiddenFields = array(\n\t\t\t'currency'\t\t\t\t=> $payMateCurrency,\n\t\t\t'amt'\t\t\t\t\t=> $this->GetGatewayAmount(),\n\t\t\t'amt_editable'\t\t\t=> 'N',\n\t\t\t'ref'\t\t\t\t\t=> $_COOKIE['SHOP_ORDER_TOKEN'],\n\t\t\t'return'\t\t\t\t=> $GLOBALS['ShopPathSSL'].'/finishorder.php',\n\t\t\t'popup'\t\t\t\t\t=> 'false',\n\n\t\t\t// Customer details\n\t\t\t'pmt_contact_firstname'\t=> $billingDetails['ordbillfirstname'],\n\t\t\t'pmt_contact_surname'\t=> $billingDetails['ordbilllastname'],\n\t\t\t'pmt_sender_email'\t\t=> $billingDetails['ordbillemail'],\n\t\t\t'pmt_contact_phone'\t\t=> $billingDetails['ordbillphone'],\n\t\t\t'pmt_country'\t\t\t=> GetCountryISO2ByName($billingDetails['ordbillcountry']),\n\t\t\t'regindi_address1'\t\t=> $billingDetails['ordbillstreet1'],\n\t\t\t'regindi_address2'\t\t=> $billingDetails['ordbillstreet2'],\n\t\t\t'regindi_pcode'\t\t\t=> $billingDetails['ordbillzip'],\n\t\t\t'regindi_sub'\t\t\t=> $billingDetails['ordbillsuburb'],\n\t\t\t'regindi_state'\t\t\t=> $billingDetails['ordbillstate']\n\t\t);\n\n\t\t$this->RedirectToProvider($payMateURL, $hiddenFields);\n\t}", "public function testCreateBankAccountBrazil(){\n\t\t$parameters = PayUTestUtil::buildParametersBankAccountBrazil();\n\t\t$customer = PayUCustomers::create(PayUTestUtil::buildSubscriptionParametersCustomer());\n\t\t$parameters[PayUParameters::CUSTOMER_ID] = $customer->id;\n\t\t\n\t\t$response = PayUBankAccounts::create($parameters);\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotNull($response->id);\n\t\t$this->assertEquals(\"ACTIVE\",$response->state);\n\t}", "protected function setupBroker()\n {\n $this->endpoint = mconfig('finance.mpesa.endpoint');\n $this->callbackUrl = mconfig('finance.mpesa.callback_url');\n $this->callbackMethod = mconfig('finance.mpesa.callback_method');\n }", "protected function setUp(\\Netric\\Account\\Account $account)\n {\n \n }", "function laterpay_migrator_init() {\n laterpay_migrator_before_start();\n // Write init code here\n $config = get_laterpay_migrator_config();\n $bootstrap = new LaterPay_Migrator_Bootstrap( $config );\n $bootstrap->run();\n}", "function initializeBilling($entity);", "public function __construct(Bill $bill)\n {\n $this->bill = $bill;\n $this->sender_wallet = $this->bill->sender_wallet;\n $this->recipient_wallet = $this->bill->recipient_wallet;\n $this->system_wallet = SystemWallet::getByCurrency($this->sender_wallet->currency->id);\n }", "public function initPayment()\n {\n $this->payment = Payment::purchase($this->paymentInvoice);\n $this->setTransactionId();\n $this->createTransaction();\n }", "public function setup() {\r\n\t\tconfigure::load('google_checkout');\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleCart', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googlecart.php'));\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleItem', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googleitem.php'));\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleMerchantCalculations', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googlemerchantcalculations.php'));\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleFlatRateShipping', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googleshipping.php'));\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleTaxRule', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googletax.php'));\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleRequest', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googleresult.php'));\r\n\t\tApp::import('Vendor', 'GoogleCheckout.GoogleResponse', array('file' => 'checkout-php-1.3.1'.DS.'library'.DS.'googlerequest.php'));\r\n\r\n\t\t// Create a new shopping cart object\r\n\t\t$merchant_id = configure::read('GoogleCheckout.ID'); // Your Merchant ID\r\n\t\t$merchant_key = configure::read('GoogleCheckout.key'); // Your Merchant Key\r\n\t\t$server_type = configure::read('GoogleCheckout.server_type');\r\n\t\t$currency = configure::read('GoogleCheckout.currency');\r\n\t\t$this->cart = new GoogleCart($merchant_id, $merchant_key, $server_type, $currency);\r\n\r\n\t\t// Define rounding policy\r\n\t\textract(configure::read('GoogleCheckout.RoundingPolicy'));\r\n\t\t$this->cart->AddRoundingPolicy($mode, $rule);\r\n\r\n\t\t// set other settings\r\n\t\t$this->cart->AddGoogleAnalyticsTracking(configure::read('GoogleCheckout.google_analytics'));\r\n\t\t$this->cart->SetEditCartUrl(configure::read('GoogleCheckout.edit_cart_url'));\r\n\t\t$this->cart->SetContinueShoppingUrl(configure::read('GoogleCheckout.continue_shopping_url'));\r\n\t\t$this->cart->SetRequestBuyerPhone(configure::read('GoogleCheckout.request_buyers_phone'));\r\n\r\n\t\treturn (!empty($this->cart));\r\n\t}", "function initOrderPayment() ;", "private function createCustomerWallet(){\n $user_id = Auth::user()->id;\n $user = User::find($user_id);\n $user->wallets()->create();\n }", "function setupPurchase($purchaseInfo) {\n\t\t$gateway = $this->datasource->getGateway();\n\t\t$options = array_merge($purchaseInfo, array(\n\t\t\t'return_url' => $this->datasource->getReturnUrl(),\n\t\t\t'cancel_return_url' => $this->datasource->getCancelUrl(),\n\t\t));\n\t\t$this->response = $gateway->setup_purchase($purchaseInfo['amount'], $options);\n\t}", "public function set_billing(array $address)\n {\n }", "public function setBaseUrl()\n {\n $this->baseUrl = config('paystack.paymentUrl');\n }", "public final function setUp() : void {\n\t\t//count the number of rows\n\t\tparent::setUp();\n\t\t$password = \"coffee12345\";\n\t\t$this->VALID_PROFILE_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 384]);\n\t\t$this->VALID_PROFILE_ACTIVATION_TOKEN = bin2hex(random_bytes(16));\n\t}", "protected function create_email_marketing_account() {\r\n // Get the account\r\n $account = new Account();\r\n $account->get( $_GET['aid'] );\r\n\r\n // Get email plans\r\n library('sendgrid-api');\r\n $sendgrid = new SendGridAPI( $account );\r\n $sendgrid->setup_subuser();\r\n\r\n $username = format::slug( $account->title );\r\n\r\n $user = new User();\r\n $user->get( $account->user_id );\r\n\r\n $password = substr( $account->id . md5(microtime()), 0, 10 );\r\n list( $first_name, $last_name ) = explode( ' ', $user->contact_name, 2 );\r\n if ( empty( $last_name ) ) {\r\n $response = new AjaxResponse( true );\r\n $response->notify( _('Please specify user First Name and Last Name before creating an Email Marketin Account'), false );\r\n return $response;\r\n }\r\n\r\n $settings = $account->get_settings( 'address', 'city', 'state', 'zip', 'from_email', 'from_name' );\r\n\r\n $settings = $account->get_settings( array('address', 'city', 'state', 'zip') );\r\n if ( !$settings['address'] || !$settings['city'] || !$settings['state'] || !$settings['zip'] ) {\r\n $response = new AjaxResponse( true );\r\n $response->notify( _('Please specify your Address, City, State and ZIP code before creating an Email Marketing Account'), false );\r\n return $response;\r\n }\r\n\r\n $phone = ( empty( $user->work_phone ) ) ? $user->cell_phone : $user->work_phone;\r\n if ( empty( $phone ) )\r\n $phone = '8185551234';\r\n\r\n $sendgrid->subuser->add( $username, $password, $user->email, $first_name, $last_name, $settings['address'], $settings['city'], $settings['state'], $settings['zip'], 'US', $phone, $account->domain, $account->title );\r\n\r\n // Add IP Address\r\n $sendgrid->subuser->send_ip( $username );\r\n\r\n // Create identity\r\n $sendgrid->setup_sender_address();\r\n $name = ( empty ( $settings['from_name'] ) ) ? $user->contact_name : $settings['from_name'];\r\n $email = ( empty( $settings['from_email'] ) ) ? 'noreply@' . url::domain( $account->domain, false ) : $settings['from_email'];\r\n\r\n // Add sender address\r\n $sendgrid->sender_address->add( $account->id, $name, $email, $settings['address'], $settings['city'], $settings['state'], $settings['zip'], 'US' );\r\n\r\n $account->set_settings( array( 'sendgrid-username' => $username, 'sendgrid-password' => $password ) );\r\n\r\n // Now add all email lists\r\n $sendgrid = new SendGridAPI( $account, $username, $password );\r\n $sendgrid->setup_list();\r\n $sendgrid->setup_email();\r\n $email_list = new EmailList();\r\n $email_lists = $email_list->get_by_account( $account->id );\r\n\r\n foreach ( $email_lists as $email_list ) {\r\n $sendgrid->list->add( $email_list->name );\r\n\r\n // Now import subscribers\r\n\r\n $email = new Email();\r\n $emails = $email->get_by_email_list( $email_list->id );\r\n\r\n $email_chunks = array_chunk( $emails, 1000 );\r\n\r\n foreach ( $email_chunks as $emails ) {\r\n $sendgrid->email->add( $email_list->name, $emails );\r\n }\r\n }\r\n\r\n $sendgrid->setup_filter();\r\n $sendgrid->filter->event_notify( 0, 0, 0, 0, 0, 0, 0, 1, 0, 'https://api.imagineretailer.com/?api_key=0e63566eb07d3369836e2b59e85b9845&method=sendgrid_event_callback&aid=' . $account->id );\r\n\r\n // Create response\r\n $response = new AjaxResponse( true );\r\n\r\n // Add notification\r\n $response->notify( _('Email Marketing account successfully created') );\r\n\r\n return $response;\r\n }", "public function initiate($amount, $customerEmail, $planCode = '');", "protected function configure()\n {\n $this->setupBroker();\n// $this->setupGateway();\n $this->setNumberGenerator();\n }", "public function setAccount()\r\n {\r\n $account = request()->input('account', '');\r\n $password = request()->input('password', '');\r\n $repassword = request()->input('repassword', '');\r\n if (empty($account) || empty($password) || empty($repassword)) {\r\n return $this->error('The Required Information Is Incomplete');\r\n }\r\n if ($password != $repassword) {\r\n return $this->error('The Two Passwords Are Inconsistent');\r\n }\r\n $user_id = Users::getUserId();\r\n $user = Users::find($user_id);\r\n if (empty($user)) {\r\n return $this->error('This User Does Not Exist');\r\n }\r\n if ($user->account_number) {\r\n return $this->error('This Transaction Account Has Been Set');\r\n }\r\n $res = Users::where('account_number', $account)->first();\r\n if ($res) {\r\n return $this->error('This Account Already Exists');\r\n }\r\n try {\r\n $user->account_number = $account;\r\n $user->pay_password = Users::MakePassword($password, $user->type);\r\n $user->save();\r\n return $this->success('Transaction Account Set Successfully');\r\n } catch (\\Exception $e) {\r\n return $this->error($e->getMessage());\r\n }\r\n }", "public function init(){\r\n\t\t$account = new Account();\r\n\t\t$account->accountID = $_SESSION['transferAccountID'];\r\n\t\t$account->getAccount();\r\n\t\t$_SESSION['transferAccount'] = $account->accountName;\r\n\t\t\r\n\t\t$accountPayees = new AccountPayees();\r\n\t\t$accountPayees->accountPayeeID = $_SESSION['transferAccountPayeeID']; \r\n\t\t$accountPayees->userID = $_SESSION['userID'];\r\n\t\t$accountPayees->getAccountPayee(); \r\n\t\t$_SESSION['transferAccountPayee'] = $accountPayees->accountName;\r\n\t\t$_SESSION['transferType'] = $accountPayees->accountType;\r\n\t\t\r\n\t\t$this->setAccountSelected($_SESSION['transferAccountID']);\r\n\t\t$this->setAccountPayeeSelected($_SESSION['transferAccountPayeeID']); \r\n\t}", "protected function setUp()\n {\n $this->options = new PaypointOptions;\n }", "private function onBeforeProcess(){\n $config = $this->getConfig();\n \n //TODO\n //setup user id\n if(!$this->pxpay_userid){\n $this->pxpay_userid = $config['authentication']['user_id'];\n }\n \n //TODO\n //setup user key\n if(!$this->pxpay_key){\n $this->pxpay_key = $config['authentication']['key'];\n }\n \n //TODO\n //setup url\n if(!$this->gatewayURL){\n $this->gatewayURL = $config['url'];\n }\n \n }", "function SetBilling($billingOption, $initialAmount, $trialPeriod, $recurringFrequency, $productName, $promotionCode)\n\t\t{\n\t\t\tif (!empty($this->Transaction))\n\t\t\t\t$this->Transaction->Billing = new RequestTransactionBilling($billingOption, $initialAmount, $trialPeriod, $recurringFrequency, $productName, $promotionCode);\n\t\t}", "public function setup($gateway = 'PayPal_Express') {\n $this->omnipay = Omnipay::create($gateway);\n\n $this->omnipay->setUsername('dementedhaunt_api1.aol.com');\n $this->omnipay->setPassword('P88AVGZRMYYVFY6A');\n $this->omnipay->setSignature('AFcWxV21C7fd0v3bYYYRCpSSRl31A2oHCupAfwM-.I.CnVkzaMDgvVbe');\n $this->omnipay->setTestMode(('Live' == 'sandbox') ? true : false);\n if ($gateway == 'PayPal_Express')\n $this->omnipay->setLandingPage('Login');\n }", "protected function setBrokerProfile()\r\n {\r\n }", "public function createAccount(HH_Domain_Farm $farm)\n {\n $client = $this->_getPaypalClient();\n $client->setUri(\n Bootstrap::get('Zend_Config')\n ->resources->paypal->adaptive->account->url . 'CreateAccount'\n );\n \n /**\n * @todo ensure telephone is part of the profile\n */\n \n $payload = array(\n 'accountType' => 'Business',\n 'businessInfo' => array(\n 'businessAddress' => array(\n 'line1' => $farm->address,\n 'line2' => $farm->address2,\n 'city' => $farm->city,\n 'state' => $farm->state,\n 'postalCode' => $farm->zipCode,\n 'countryCode' => $farm->country\n ),\n 'businessName' => $farm->name,\n 'category' => $this->_category,\n 'customerServiceEmail' => $farm->email,\n 'customerServicePhone' => $farm->telephone,\n 'disputeEmail' => $farm->email,\n 'subCategory' => $this->_subCategory,\n 'webSite' => 'http://' . $farm->subdomain . '.' . Bootstrap::$rootDomain . '/',\n 'workPhone' => $farm->telephone,\n 'averagePrice' => $farm->getPreferences('paypal')->get('averagePrice'),\n 'averageMonthlyVolume' => $farm->getPreferences('paypal')->get('averageMonthlyVolume'),\n 'salesVenue' => 'WEB',\n 'dateOfEstablishment' => $farm->getPreferences('paypal')->get('dateOfEstablishment'),\n 'businessType' => $farm->getPreferences('paypal')->get('businessType'),\n 'percentageRevenueFromOnline' => $farm->getPreferences('paypal')->get('percentageRevenueFromOnline')\n ),\n 'address' => array(\n 'line1' => $farm->address,\n 'line2' => $farm->address2,\n 'city' => $farm->city,\n 'state' => $farm->state,\n 'postalCode' => $farm->zipCode,\n 'countryCode' => $farm->country\n ),\n 'citizenshipCountryCode' => $farm->country,\n 'contactPhoneNumber' => $farm->telephone,\n 'createAccountWebOptions' => array(\n 'returnUrl' => 'http://' . $farm->subdomain . '.' . Bootstrap::$rootDomain . '/admin/default/paypal/a/added',\n 'showAddCreditCard' => 'false'\n ),\n 'currencyCode' => Zend_Locale_Data::getContent('en', 'currencytoregion', $farm->country),\n 'dateOfBirth' => $farm->getPreferences('paypal')->get('dateOfBirth') . 'Z',\n 'emailAddress' => $farm->email,\n 'name' => array(\n 'firstName' => $farm->getPrimaryFarmer()->firstName,\n 'lastName' => $farm->getPrimaryFarmer()->lastName\n ),\n 'notificationURL' => 'https://' . $farm->subdomain . '.' . Bootstrap::$rootDomain . '/service/default/ipn',\n 'preferredLanguageCode' => $this->_getLanguageFromFarm($farm),\n 'registrationType' => 'Web',\n 'requestEnvelope' => array(\n 'detailLevel' => 'ReturnAll',\n 'errorLanguage' => 'en_US'\n ),\n 'suppressWelcomeEmail' => 'false'\n );\n \n $client->setRawData(Zend_Json::encode($payload), 'application/json');\n \n /* @var $response Zend_Http_Response */\n $response = $client->request(Zend_Http_Client::POST);\n \n if ($response->isError()) {\n return false;\n }\n \n return Zend_Json::decode($response->getBody());\n }", "public function onBeforePayment() {\n\t\t$customer = $this->owner->Member();\n\t\tif ($customer && $customer->exists()) {\n\t\t\t$customer->createAddresses($this->owner);\n\t\t}\n\t}", "public function run()\n {\n Wallet::create([\n 'type' => 'cash',\n 'amount' => 5000000\n ]);\n Wallet::create([\n 'type' => 'bank',\n 'amount' => 10000000\n ]);\n }", "public function setAccount(string $name, string $iban, string $bic = '') : Payment\r\n\t{\r\n\t\t$this->setAccountName($name);\r\n\t\t$this->setAccountIban($iban);\r\n\t\tif ($bic)\r\n\t\t{\r\n\t\t\t$this->setAccountBic($bic);\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "public function setMerchant(?array $merchant): void\n {\n $this->merchant = $merchant;\n }", "public function setUp()\n {\n $merchantId = '';\n $username = '';\n $password = '';\n $credentialsFilePath = dirname(__FILE__) . '/Mock/myCredentials.json';\n\n if(file_exists($credentialsFilePath)) {\n $credentialsJson = file_get_contents($credentialsFilePath);\n if($credentialsJson) {\n $credentials = json_decode($credentialsJson);\n $merchantId = $credentials->merchantId;\n $username = $credentials->username;\n $password = $credentials->password;\n }\n }\n\n if(empty($merchantId) || empty($username) || empty($password)) {\n $this->markTestSkipped();\n } else {\n $this->gateway = new ConvergeGateway();\n $this->gateway->setMerchantId($merchantId);\n $this->gateway->setUsername($username);\n $this->gateway->setPassword($password);\n $this->gateway->setTestMode(true);\n }\n }", "function wpdev_bk_payment_activate_system_ipay88() {\n global $wpdb;\n \n add_bk_option( 'booking_ipay88_payment_button_title' , __('Pay via' ,'booking') .' iPay88');\n add_bk_option( 'booking_ipay88_is_active' , 'Off');\n add_bk_option( 'booking_ipay88_merchant_code', '' );\n add_bk_option( 'booking_ipay88_merchant_key', '' );\n add_bk_option( 'booking_ipay88_curency' , 'MYR' );\n add_bk_option( 'booking_ipay88_subject', sprintf(__('Payment for booking %s on these day(s): %s' ,'booking'),'[bookingname]','[dates]'));\n add_bk_option( 'booking_ipay88_is_description_show', 'Off' );\n add_bk_option( 'booking_ipay88_is_auto_approve_cancell_booking', 'Off' );\n add_bk_option( 'booking_ipay88_return_url', '/successful' );\n add_bk_option( 'booking_ipay88_cancel_return_url', '/failed' );\n\n }", "public function __construct( Pronamic_Pay_Config $config ) {\n\t\t$this->config = $config;\n\t}", "public function creating(Bill $bill)\n {\n //\n $bill->bill_no = 'XSY';\n $bill->balance = 0;\n $bill->paid = 0;\n }", "protected function setBaseData() {\n \n \n switch($this->getPaymentMethod()) {\n\n case 'ACH_eft': \n // check for test mode or live mode\n $this->isTestMode = Mage::getStoreConfig(self::XML_PATH_WIRECARD_EFT_TEST_MODE);\n $username = Mage::getStoreConfig(self::XML_PATH_WIRECARD_EFT_USERNAME);\n $businessCaseSignature = Mage::getStoreConfig(self::XML_PATH_WIRECARD_EFT_BUSINESSCASESIGNATURE);\n $password = Mage::getStoreConfig(self::XML_PATH_WIRECARD_EFT_PASSWORD);\n $this->displayErrors = Mage::getStoreConfig(self::XML_PATH_WIRECARD_EFT_DISPLAYERRORS);\n $this->usage = Mage::getStoreConfig(self::XML_PATH_WIRECARD_EFT_USAGE);\n $this->transactionNodeName = 'FT_TRANSACTION';\n break;\n \n case 'ACH_cc':\n // check for test mode or live mode\n $this->isTestMode = Mage::getStoreConfig(self::XML_PATH_WIRECARD_CC_TEST_MODE);\n $username = Mage::getStoreConfig(self::XML_PATH_WIRECARD_CC_USERNAME);\n $businessCaseSignature = Mage::getStoreConfig(self::XML_PATH_WIRECARD_CC_BUSINESSCASESIGNATURE);\n $password = Mage::getStoreConfig(self::XML_PATH_WIRECARD_CC_PASSWORD);\n $this->displayErrors = Mage::getStoreConfig(self::XML_PATH_WIRECARD_CC_DISPLAYERRORS);\n $this->usage = Mage::getStoreConfig(self::XML_PATH_WIRECARD_CC_USAGE);\n $this->transactionNodeName = 'CC_TRANSACTION';\n break;\n \n default:\n $this->transactionNodeName = 'Test';\n return;\n }\n\n if (!$this->isTestMode && strlen($username) && strlen($password)) {\n \n // set live access data instead of test data\n $this->login = $username;\n $this->businessCaseSignature = $businessCaseSignature;\n $this->pass = $password;\n //$this->host = 'c3.wirecard.com';\n\t\t\t $this->host = 'https://www.paymentsgateway.net/cgi-bin/posttest.pl';\n }\n }", "public function setup($gateway = 'PayPal_Express')\n {\n // Create the instance of Omnipay\n $this->omnipay = Omnipay::create($gateway);\n\n // Get PayPal credentials from payment_gateway table\n $paypal_credentials = PaymentGateway::where('site', 'PayPal')->get();\n\n $this->omnipay->setUsername($paypal_credentials[0]->value);\n $this->omnipay->setPassword($paypal_credentials[1]->value);\n $this->omnipay->setSignature($paypal_credentials[2]->value);\n $this->omnipay->setTestMode($this->payment_mode);\n $this->omnipay->setLandingPage('Login');\n }", "public function setup() {\n\t\t//$currency = 'GBP';\n\t\t$this->products = array(\n\t\t\tarray('Baked Beans', 0.50, 0),\n\t\t\tarray('Washing Up Liquid', 0.72, 0.10),\n\t\t\tarray('Rubber Gloves', 1.50, 0.35)\n\t\t);\n\t}", "protected function maybe_set_user_billing_email()\n {\n }", "function setAccessPoint()\n {\n \t$_env = '';\n \t$domain_srv = 'mws2.safetypay.com';\n\n if ( $this->conf['Environment'] )\n \t$_env = '/sandbox';\n\n $this->conf['CreateExpressToken'] = strtolower( $this->conf['Protocol'] )\n . '://' . $domain_srv\n . \"$_env/express/ws/v.3.0/Post/CreateExpressToken\";\n $this->conf['CreateRefund'] = strtolower( $this->conf['Protocol'] )\n . '://' . $domain_srv\n . \"$_env/express/ws/v.3.0/Post/CreateRefundProcess\";\n $this->conf['GetOperation'] = strtolower( $this->conf['Protocol'] )\n . '://' . $domain_srv\n . \"$_env/express/ws/v.3.0/Post/GetOperation\";\n }", "public function __construct() {\n\t$this->config = Shopware()->Plugins()->Frontend()->PaymPaymentCreditcard()->Config();\n $this->logging = new Shopware_Plugins_Frontend_PaymPaymentCreditcard_Components_LoggingManager();\n }", "public function __construct(){\n \\Midtrans\\Config::$serverKey = env('MIDTRANS_SERVERKEY');\n // Set to Development/Sandbox Environment (default). Set to true for Production Environment (accept real transaction).\n \\Midtrans\\Config::$isProduction = false;\n // Set sanitization on (default)\n \\Midtrans\\Config::$isSanitized = true;\n // Set 3DS transaction for credit card to true\n \\Midtrans\\Config::$is3ds = true;\n }", "function configureBCApi($storeHash)\n{\n\tBigcommerce::configure(array(\n\t\t'client_id' => clientId(),\n\t\t'auth_token' => getAuthToken($storeHash),\n\t\t'store_hash' => $storeHash\n\t));\n}", "function setUp() \r\n\t{\r\n\t\t$this->ant = new Ant();\r\n\t\t$this->dbh = $this->ant->dbh;\r\n\t\t$this->user = $this->ant->getUser(USER_SYSTEM);\r\n\t\t$this->api = new AntApi(AntConfig::getInstance()->aereus['server'], \r\n\t\t\t\t\t\t\t\t AntConfig::getInstance()->aereus['user'],\r\n\t\t\t\t\t\t\t\t AntConfig::getInstance()->aereus['password']);\r\n\r\n\t\t// Make sure the co_ant_account object exists locally\r\n\t\t$otid = objCreateType($this->dbh, \"ant_account\", \"ANT Account\");\r\n\t\t$objAc = new CAntObject($this->dbh, \"co_ant_account\", null, $this->user);\r\n\t\tif (!$objAc->fields->getField(\"aid\"))\r\n\t\t\t$objAc->addField(\"aid\", array(\"type\"=>\"number\", \"title\"=>\"AID\"));\r\n\t\tif (!$objAc->fields->getField(\"num_users\"))\r\n\t\t\t$objAc->addField(\"num_users\", array(\"type\"=>\"number\", \"title\"=>\"Num Users\"));\r\n\t\tif (!$objAc->fields->getField(\"name\"))\r\n\t\t\t$objAc->addField(\"name\", array(\"type\"=>\"text\", \"title\"=>\"Name\"));\r\n\t\tif (!$objAc->fields->getField(\"customer\"))\r\n\t\t\t$objAc->addField(\"customer\", array(\"type\"=>\"object\", \"subtype\"=>\"customer\", \"title\"=>\"Customer\"));\r\n\t\tif (!$objAc->fields->getField(\"bill_next_date\"))\r\n\t\t\t$objAc->addField(\"bill_next_date\", array(\"type\"=>\"date\", \"title\"=>\"Bill Next Date\"));\r\n\t\tif (!$objAc->fields->getField(\"bill_last_date\"))\r\n\t\t\t$objAc->addField(\"bill_last_date\", array(\"type\"=>\"date\", \"title\"=>\"Bill Last Date\"));\r\n\t\tif (!$objAc->fields->getField(\"edition\"))\r\n\t\t\t$objAc->addField(\"edition\", array(\"type\"=>\"text\", \"subtype\"=>\"64\", \"title\"=>\"Edition\"));\r\n\t\tif (!$objAc->fields->getField(\"edition_discount\"))\r\n\t\t\t$objAc->addField(\"edition_discount\", array(\"type\"=>\"text\", \"subtype\"=>\"64\", \"title\"=>\"Discount\"));\r\n\r\n\t\t// Make sure a customer exists for the current account\r\n\t\t$apiAcc = $this->ant->getAereusAccount();\r\n\t\tif (!$apiAcc->getValue(\"customer\"))\r\n\t\t{\r\n\t\t\t$cust = $this->api->getObject(\"customer\");\r\n\t\t\t$cust->setValue(\"name\", \"AccountSyncTest\");\r\n\t\t\t$cid = $cust->save();\r\n\t\t\t$apiAcc->setValue(\"customer\", $cid);\r\n\t\t\t$apiAcc->save();\r\n\t\t}\r\n\t}", "public function __construct(BankAccount $bankAccount = null)\n {\n $this->bankAccount = $bankAccount;\n }", "function laterpay_migrator_activate() {\n if ( ! is_plugin_active( 'laterpay/laterpay.php' ) ) {\n return;\n }\n laterpay_migrator_before_start();\n LaterPay_Migrator_Bootstrap::activate();\n}", "private function setConfiguration()\n {\n $this->environmentType = $this->scopeConfig->getValue(\n 'vesta_protection/general/environment_type', \n ConfigurationScope::SCOPE_STORE\n );\n if ($this->environmentType == 'sandbox') {\n $this->userName = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_account_name',\n ConfigurationScope::SCOPE_STORE\n );\n $this->password = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_password',\n ConfigurationScope::SCOPE_STORE\n );\n $this->endPointUrl = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_end_point_url',\n ConfigurationScope::SCOPE_STORE\n );\n $this->merchantRoutingID = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_merchant_routing_id',\n ConfigurationScope::SCOPE_STORE\n );\n } else {\n $this->userName = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_account_name',\n ConfigurationScope::SCOPE_STORE\n );\n $this->password = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_password',\n ConfigurationScope::SCOPE_STORE\n );\n $this->endPointUrl = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_end_point_url',\n ConfigurationScope::SCOPE_STORE\n );\n $this->merchantRoutingID = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_merchant_routing_id',\n ConfigurationScope::SCOPE_STORE\n );\n }\n $this->autoDisposition = $this->scopeConfig->getValue(\n 'vesta_protection/general/autodisposition',\n ConfigurationScope::SCOPE_STORE\n );\n $this->acquirerCD = $this->scopeConfig->getValue(\n 'vesta_protection/general/acquirer_cd',\n ConfigurationScope::SCOPE_STORE\n );\n }", "public final function setUp(): void {\n\t// run the default setUp() method first\n\tparent::setUp();\n\t$password = \"monkey\";\n\t$this->VALID_PROFILE_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 383]);\n\t$this->VALID_ACTIVATION = bin2hex(random_bytes(16));\n\n\t//create and insert a Profile to own the beer\n\t$this->profile = new Profile(generateUuidV4(), \"!!!\", $this->VALID_ACTIVATION, \"6009 Oak St NW\", \"6008 Oak St NW\",\n\t\t\"Albuquerque\", \"iluvu@hotmail.com\", $this->VALID_PROFILE_HASH, \"\", \"Fredo\", \"NM\", \"hola0\", \"1\", \"87110\");\n\t$this->profile->insert($this->getPDO());\n}", "protected function setPaymentInfoForCreation()\n {\n $this->helper->log(\n $this->getMethod(),\n 'setPaymentInfoForCreation()'\n );\n\n $this->getMethodInstance()->setCard($this);\n\n $gateway = $this->getMethodInstance()->gateway();\n $address = $this->getAddressObject();\n\n $region = $address->getRegion()->getRegionCode() ?: $address->getRegion()->getRegion();\n\n $gateway->setParameter('billToFirstName', $address->getFirstname());\n $gateway->setParameter('billToLastName', $address->getLastname());\n $gateway->setParameter('billToCompany', $address->getCompany());\n $gateway->setParameter('billToAddress', implode(', ', $address->getStreet() ?: []));\n $gateway->setParameter('billToCity', $address->getCity());\n $gateway->setParameter('billToState', $region);\n $gateway->setParameter('billToZip', $address->getPostcode());\n $gateway->setParameter('billToCountry', $address->getCountryId());\n $gateway->setParameter('billToPhoneNumber', $address->getTelephone());\n $gateway->setParameter('billToFaxNumber', $address->getFax());\n\n $this->setPaymentInfoOnCreate($gateway);\n\n return $this;\n }", "public function checkout_form_billing()\n {\n }", "public function __construct($account, $voucher)\n {\n // Set details of user account we are purchasing so plugin case use it (e.g. sms details)\n $this->voucher = $voucher;\n $this->useraccount = $account;\n }", "private static function setup(){\r\n if(get_option(\"gf_paypalpaymentspro_version\") != self::$version){\r\n //loading data lib\r\n require_once(self::get_base_path() . \"/data.php\");\r\n GFPayPalPaymentsProData::update_table();\r\n }\r\n update_option(\"gf_paypalpaymentspro_version\", self::$version);\r\n }", "public function __construct($config)\n {\n $this->fields['profile_id'] = $config['profile_id'];\n $this->fields['profile_key'] = $config['profile_key'];\n $this->fields['transaction_type'] = $config['transaction_type'];\n $this->required_fields['profile_id'] = !empty($config['profile_id']);\n $this->required_fields['profile_key'] = !empty($config['profile_key']);\n $this->required_fields['transaction_type'] = !empty($config['transaction_type']);\n\n $this->curl_config = $config['curl_config'];\n $this->test_mode = $config['test_mode'];\n\n Kohana::log('debug', 'Trident Payment Driver Initialized');\n }", "function startPayment() ;", "public function setAccount($account)\n {\n $this->_account = $account;\n }", "public function run()\n {\n \\App\\Models\\GatewayConfig::create([\n 'merchantId' => 'XXXXXX',\n 'gateway_key' => 'zarinpal',\n 'gateway_name' => 'زرین پال',\n 'gateway_base_url' => 'https://www.zarinpal.com'\n ]);\n }" ]
[ "0.63650966", "0.60254574", "0.5980514", "0.59143674", "0.59046996", "0.58789843", "0.5808735", "0.577177", "0.57615435", "0.571024", "0.5656342", "0.5635923", "0.56147254", "0.55978453", "0.5565168", "0.5564571", "0.55224854", "0.5499494", "0.54779714", "0.5476568", "0.547644", "0.54571456", "0.5453101", "0.54212826", "0.54046583", "0.53906286", "0.5351657", "0.53469914", "0.53393", "0.53349966", "0.5332184", "0.5327004", "0.53182054", "0.5315069", "0.5315069", "0.53119475", "0.5296119", "0.5292258", "0.5256875", "0.5253313", "0.52518296", "0.52361953", "0.52349627", "0.52228695", "0.520937", "0.5205422", "0.520345", "0.51969934", "0.51910645", "0.51897925", "0.5186451", "0.5178247", "0.5175478", "0.5149792", "0.5145689", "0.5113707", "0.50932693", "0.5088555", "0.5085183", "0.5081093", "0.5070808", "0.5070019", "0.5059589", "0.5049467", "0.50418836", "0.5036784", "0.50275946", "0.5026389", "0.5025946", "0.50223356", "0.50202787", "0.50192606", "0.50189143", "0.50143", "0.49960196", "0.49888283", "0.49878576", "0.4984115", "0.49806398", "0.49701032", "0.49690312", "0.4967941", "0.4967258", "0.49670553", "0.49643928", "0.496224", "0.49610206", "0.4953838", "0.49522614", "0.49492988", "0.49339452", "0.49294826", "0.49278617", "0.49197578", "0.49175155", "0.49081767", "0.49036866", "0.4898103", "0.48968595", "0.48901662" ]
0.7579333
0
sanitize user entered css as seen here:
очистить введённый пользователем CSS, как показано здесь:
function sanitize_css( $css ) { if ( ! class_exists( 'csstidy' ) ) { include_once( 'csstidy/class.csstidy.php' ); } $csstidy = new csstidy(); $csstidy->set_cfg( 'remove_bslash', false ); $csstidy->set_cfg( 'compress_colors', false ); $csstidy->set_cfg( 'compress_font-weight', false ); $csstidy->set_cfg( 'discard_invalid_properties', true ); $csstidy->set_cfg( 'merge_selectors', false ); $csstidy->set_cfg( 'remove_last_;', false ); $csstidy->set_cfg( 'css_level', 'CSS3.0' ); $css = preg_replace( '/\\\\([0-9a-fA-F]{4})/', '\\\\\\\\$1', $css ); $css = wp_kses_split( $css, array(), array() ); $csstidy->parse( $css ); return $csstidy->print->plain(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simple_css_validate( $input ) \n{\n\t$input['css'] = wp_kses( $input['css'], array( '\\'', '\\\"', '>', '+' ) );\n\t$input['css'] = str_replace( '&gt;', '>', $input['css'] );\n\t$input['theme'] = wp_filter_nohtml_kses($input['theme']);\n\treturn $input;\n}", "function sanitize_custom_css($input){\n $output = esc_textarea($input) ;\n return $output;\n}", "function normalize_css() {\n if ( preg_match( \"/(\\}[\\w\\#\\.]|; *\\})/\", $this->styles ) ): // prettify compressed CSS\n $this->styles = preg_replace( \"/\\*\\/\\s*/s\", \"*/\\n\", $this->styles ); // end comment\n $this->styles = preg_replace( \"/\\{\\s*/s\", \" {\\n \", $this->styles ); // open brace\n $this->styles = preg_replace( \"/;\\s*/s\", \";\\n \", $this->styles ); // semicolon\n $this->styles = preg_replace( \"/\\s*\\}\\s*/s\", \"\\n}\\n\", $this->styles ); // close brace\n endif;\n }", "function clean_content($content){\r\n\t\t$patterns = array('/(<[^>]+) style=\".*?\"/i', \"/(<[^>]+) style='.*?'/i\");\r\n\t\t$content = preg_replace($patterns, '$1', $content);\r\n\t\t\r\n\t\treturn apply_filters('style_stripper_strip_styles', $content);\r\n\t}", "function x_get_clean_css( $css ) {\n\n //\n // 1. Remove comments.\n // 2. Remove whitespace.\n // 3. Remove starting whitespace.\n //\n\n $output = preg_replace( '#/\\*.*?\\*/#s', '', $css ); // 1\n $output = preg_replace( '/\\s*([{}|:;,])\\s+/', '$1', $output ); // 2\n $output = preg_replace( '/\\s\\s+(.*)/', '$1', $output ); // 3\n\n return $output;\n\n}", "function sanitize( $styles ) {\n return sanitize_text_field( preg_replace( '/[^[:print:]]|[\\{\\}].*/', '', $styles ) );\n }", "function safecss_filter_attr($css, $deprecated = '')\n{\n}", "public function cleanCSS($buffer)\n\t{\n\t\t// Remove comments\n\t\t$buffer = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $buffer);\n\t\t// Remove tabs, spaces, new lines, etc.\n\t\t$buffer = str_replace(array(\"\\r\\n\",\"\\r\",\"\\n\",\"\\t\",' ',' ',' '),'',$buffer);\n\t\t// Remove unnecessary spaces\n\t\t$buffer = str_replace('{ ', '{', $buffer);\n\t\t$buffer = str_replace(' }', '}', $buffer);\n\t\t$buffer = str_replace('; ', ';', $buffer);\n\t\t$buffer = str_replace(', ', ',', $buffer);\n\t\t$buffer = str_replace(' {', '{', $buffer);\n\t\t$buffer = str_replace('} ', '}', $buffer);\n\t\t$buffer = str_replace(': ', ':', $buffer);\n\t\t$buffer = str_replace(' ,', ',', $buffer);\n\t\t$buffer = str_replace(' ;', ';', $buffer);\n\t\t$buffer = str_replace(';}', '}', $buffer);\n\t\treturn $buffer;\n\t}", "public static function minify_css($input)\n {\n if (trim($input) === '') {\n return $input;\n }\n \n return preg_replace(\n array(\n // Remove comment(s)\n '#(\"(?:[^\"\\\\\\]++|\\\\\\.)*+\"|\\'(?:[^\\'\\\\\\\\]++|\\\\\\.)*+\\')|\\/\\*(?!\\!)(?>.*?\\*\\/)|^\\s*|\\s*$#s',\n // Remove unused white-space(s)\n '#(\"(?:[^\"\\\\\\]++|\\\\\\.)*+\"|\\'(?:[^\\'\\\\\\\\]++|\\\\\\.)*+\\'|\\/\\*(?>.*?\\*\\/))|\\s*+;\\s*+(})\\s*+|\\s*+([*$~^|]?+=|[{};,>~+]|\\s*+-(?![0-9\\.])|!important\\b)\\s*+|([[(:])\\s++|\\s++([])])|\\s++(:)\\s*+(?!(?>[^{}\"\\']++|\"(?:[^\"\\\\\\]++|\\\\\\.)*+\"|\\'(?:[^\\'\\\\\\\\]++|\\\\\\.)*+\\')*+{)|^\\s++|\\s++\\z|(\\s)\\s+#si',\n // Replace `0(cm|em|ex|in|mm|pc|pt|px|vh|vw|%)` with `0`\n '#(?<=[\\s:])(0)(cm|em|ex|in|mm|pc|pt|px|vh|vw|%)#si',\n // Replace `:0 0 0 0` with `:0`\n '#:(0\\s+0|0\\s+0\\s+0\\s+0)(?=[;\\}]|\\!important)#i',\n // Replace `background-position:0` with `background-position:0 0`\n '#(background-position):0(?=[;\\}])#si',\n // Replace `0.6` with `.6`, but only when preceded by `:`, `,`, `-` or a white-space\n '#(?<=[\\s:,\\-])0+\\.(\\d+)#s',\n // Minify string value\n '#(\\/\\*(?>.*?\\*\\/))|(?<!content\\:)([\\'\"])([a-z_][a-z0-9\\-_]*?)\\2(?=[\\s\\{\\}\\];,])#si',\n '#(\\/\\*(?>.*?\\*\\/))|(\\burl\\()([\\'\"])([^\\s]+?)\\3(\\))#si',\n // Minify HEX color code\n '#(?<=[\\s:,\\-]\\#)([a-f0-6]+)\\1([a-f0-6]+)\\2([a-f0-6]+)\\3#i',\n // Replace `(border|outline):none` with `(border|outline):0`\n '#(?<=[\\{;])(border|outline):none(?=[;\\}\\!])#',\n // Remove empty selector(s)\n '#(\\/\\*(?>.*?\\*\\/))|(^|[\\{\\}])(?:[^\\s\\{\\}]+)\\{\\}#s'\n ),\n array(\n '$1',\n '$1$2$3$4$5$6$7',\n '$1',\n ':0',\n '$1:0 0',\n '.$1',\n '$1$3',\n '$1$2$4$5',\n '$1$2$3',\n '$1:0',\n '$1$2'\n ),\n $input);\n }", "function clean_style_tag($input) {\n preg_match_all(\"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches);\n if (empty($matches[2])) {\n return $input;\n }\n // Only display media if it is meaningful\n $media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media=\"' . $matches[3][0] . '\"' : '';\n return '<link rel=\"stylesheet\" href=\"' . $matches[2][0] . '\"' . $media . '>' . \"\\n\";\n}", "public function css($input)\n\t{\n\t\treturn preg_replace([\n\t\t\t'#\\/\\*(.*?)\\*\\/|[\\r\\n\\t]#s',\t\t\t// I replace comments EOL TAB with space\n\t\t\t'#\\s*([\\{\\}>~:;,]|\\!important)\\s*#',\t// I remove contiguous spaces\n\t\t\t'#^\\s*|(\\s)\\s+#',\t\t\t\t\t\t// ltrim | remove multiples spaces\n\t\t\t'#;}#',\t\t\t\t\t\t\t\t\t// I remove the semicolon before the parenthesis\n\t\t],[\n\t\t\t\" \",\n\t\t\t\"$1\",\n\t\t\t\"$1\",\n\t\t\t\"}\",\n\t\t], $input);\n\t}", "function green_prepare_custom_styles() {\n\t\t$css = apply_filters('green_filter_add_styles_inline', green_get_custom_styles());\n\t\t// Minify css string\n\t\t//$css = str_replace(array(\"\\n\", \"\\r\", \"\\t\"), '', $css);\n\t\t$css = green_minify_css($css);\n\t\treturn $css;\n\t}", "function parse_css_input( $styles ) {\n return $this->repl_octal( stripslashes( $this->esc_octal( $styles ) ) );\n }", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('theme.component_controller_admincp_style_css_clean')) ? eval($sPlugin) : false);\n\t}", "function freshops_gallery_style($css)\n{\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "function cssminify( $css ) {\n\n\t// Normalize whitespace\n\t$css = preg_replace( '/\\s+/', ' ', $css );\n\n\t// Remove spaces before and after comment\n\t$css = preg_replace( '/(\\s+)(\\/\\*(.*?)\\*\\/)(\\s+)/', '$2', $css );\n\n\t// Remove comment blocks, everything between /* and */, unless\n\t// preserved with /*! ... */ or /** ... */\n\t$css = preg_replace( '~/\\*(?![\\!|\\*])(.*?)\\*/~', '', $css );\n\n\t// Remove ; before }\n\t$css = preg_replace( '/;(?=\\s*})/', '', $css );\n\n\t// Remove space after , : ; { } */ >\n\t$css = preg_replace( '/(,|:|;|\\{|}|\\*\\/|>) /', '$1', $css );\n\n\t// Remove space before , ; { } ( ) >\n\t$css = preg_replace( '/ (,|;|\\{|}|\\(|\\)|>)/', '$1', $css );\n\n\t// Strips leading 0 on decimal values (converts 0.5px into .5px)\n\t$css = preg_replace( '/(:| )0\\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );\n\n\t// Strips units if value is 0 (converts 0px to 0)\n\t$css = preg_replace( '/(:| )(\\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );\n\n\t// Converts all zeros value into short-hand\n\t$css = preg_replace( '/0 0 0 0/', '0', $css );\n\n\t// Shortern 6-character hex color codes to 3-character where possible\n\t$css = preg_replace( '/#([a-f0-9])\\\\1([a-f0-9])\\\\2([a-f0-9])\\\\3/i', '#\\1\\2\\3', $css );\n\n\treturn trim( $css );\n\n}", "public function encodeForCSS($input);", "public static function cleanTinyContent ( $string )\n {\n $except = [ 'color', 'font-weight', 'font-size', 'height', 'width' ]; // declare your exceptions\n $allow = implode( '|', $except );\n $regexp = '@([^;\"]+)?(?<!' . $allow . '):(?!\\/\\/(.+?)\\/)((.*?)[^;\"]+)(;)?@is';\n //$string = preg_replace($regexp, '', $string);\n //$string = preg_replace('@[a-z]*=\"\"@is', '', $string); // remove any unwanted style attributes\n $regexp = '@([^;\"]+)?(?<!' . $allow . '):(?!\\/\\/(.+?)\\/)((.*?)[^;\"]+)(;)?@is';//this line should be replaced with other gibberish that excludes certain strings of 4 characters...\n $string = preg_replace( $regexp, '', $string );\n // remove unwanted style propeties end\n $string = str_replace( ' style=\"\"', '', $string );\n\n return $string;\n }", "public function emogrify() {\n\t $body = $this->html;\n\t // process the CSS here, turning the CSS style blocks into inline css\n\t if (count($this->unprocessableHTMLTags)) {\n $unprocessableHTMLTags = implode('|',$this->unprocessableHTMLTags);\n $body = preg_replace(\"/<($unprocessableHTMLTags)[^>]*>/i\",'',$body);\n\t }\n\n $encoding = mb_detect_encoding($body);\n $body = mb_convert_encoding($body, 'HTML-ENTITIES', $encoding);\n\n $xmldoc = new DOMDocument;\n\t\t$xmldoc->encoding = $encoding;\n\t\t$xmldoc->strictErrorChecking = false;\n\t\t$xmldoc->formatOutput = true;\n $xmldoc->loadHTML($body);\n\t\t$xmldoc->normalizeDocument();\n\n\t\t$xpath = new DOMXPath($xmldoc);\n\n // before be begin processing the CSS file, parse the document and normalize all existing CSS attributes (changes 'DISPLAY: none' to 'display: none');\n // we wouldn't have to do this if DOMXPath supported XPath 2.0.\n $nodes = @$xpath->query('//*[@style]');\n if ($nodes->length > 0) foreach ($nodes as $node) $node->setAttribute('style',preg_replace('/[A-z\\-]+(?=\\:)/Se',\"strtolower('\\\\0')\",$node->getAttribute('style')));\n\n\t\t// get rid of css comment code\n\t\t$re_commentCSS = '/\\/\\*.*\\*\\//sU';\n\t\t$css = preg_replace($re_commentCSS,'',$this->css);\n\n static $csscache = array();\n $csskey = md5($css);\n if (!isset($csscache[$csskey])) {\n\n // process the CSS file for selectors and definitions\n $re_CSS = '/^\\s*([^{]+){([^}]+)}/mis';\n preg_match_all($re_CSS,$css,$matches);\n\n $all_selectors = array();\n foreach ($matches[1] as $key => $selectorString) {\n // if there is a blank definition, skip\n if (!strlen(trim($matches[2][$key]))) continue;\n\n // else split by commas and duplicate attributes so we can sort by selector precedence\n $selectors = explode(',',$selectorString);\n foreach ($selectors as $selector) {\n // don't process pseudo-classes\n if (strpos($selector,':') !== false) continue;\n $all_selectors[] = array('selector' => $selector,\n 'attributes' => $matches[2][$key],\n 'index' => $key, // keep track of where it appears in the file, since order is important\n );\n }\n }\n\n // now sort the selectors by precedence\n usort($all_selectors, array('self','sortBySelectorPrecedence'));\n\n $csscache[$csskey] = $all_selectors;\n }\n\n foreach ($csscache[$csskey] as $value) {\n\n // query the body for the xpath selector\n $nodes = $xpath->query($this->translateCSStoXpath(trim($value['selector'])));\n\n foreach($nodes as $node) {\n // if it has a style attribute, get it, process it, and append (overwrite) new stuff\n if ($node->hasAttribute('style')) {\n // break it up into an associative array\n $oldStyleArr = $this->cssStyleDefinitionToArray($node->getAttribute('style'));\n $newStyleArr = $this->cssStyleDefinitionToArray($value['attributes']);\n\n // new styles overwrite the old styles (not technically accurate, but close enough)\n $combinedArr = array_merge($oldStyleArr,$newStyleArr);\n $style = '';\n foreach ($combinedArr as $k => $v) $style .= (strtolower($k) . ':' . $v . ';');\n } else {\n // otherwise create a new style\n $style = trim($value['attributes']);\n }\n $node->setAttribute('style',$style);\n }\n }\n\n\t\t// This removes styles from your email that contain display:none. You could comment these out if you want.\n $nodes = $xpath->query('//*[contains(translate(@style,\" \",\"\"),\"display:none\")]');\n // the checks on parentNode and is_callable below are there to ensure that if we've deleted the parent node,\n // we don't try to call removeChild on a nonexistent child node\n if ($nodes->length > 0) foreach ($nodes as $node) if ($node->parentNode && is_callable(array($node->parentNode,'removeChild'))) $node->parentNode->removeChild($node);\n\n\t\treturn $xmldoc->saveHTML();\n\n\t}", "function ksaslab_gallery_style( $css ) {\n\treturn preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\n}", "function starter_minify_css( $css ) {\n\n\t// Normalize whitespace.\n\t$css = preg_replace( '/\\s+/', ' ', $css );\n\n\t// Remove spaces before and after comment.\n\t$css = preg_replace( '/(\\s+)(\\/\\*(.*?)\\*\\/)(\\s+)/', '$2', $css );\n\n\t// Remove comment blocks, everything between /* and */, unless preserved with /*! ... */ or /** ... */.\n\t$css = preg_replace( '~/\\*(?![\\!|\\*])(.*?)\\*/~', '', $css );\n\n\t// Remove ; before }.\n\t$css = preg_replace( '/;(?=\\s*})/', '', $css );\n\n\t// Remove space after , : ; { } */ >.\n\t$css = preg_replace( '/(,|:|;|\\{|}|\\*\\/|>) /', '$1', $css );\n\n\t// Remove space before , ; { } ( ) >.\n\t$css = preg_replace( '/ (,|;|\\{|}|\\(|\\)|>)/', '$1', $css );\n\n\t// Strips leading 0 on decimal values (converts 0.5px into .5px).\n\t$css = preg_replace( '/(:| )0\\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );\n\n\t// Strips units if value is 0 (converts 0px to 0).\n\t$css = preg_replace( '/(:| )(\\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );\n\n\t// Converts all zeros value into short-hand.\n\t$css = preg_replace( '/0 0 0 0/', '0', $css );\n\n\t// Shorten 6-character hex color codes to 3-character where possible.\n\t$css = preg_replace( '/#([a-f0-9])\\\\1([a-f0-9])\\\\2([a-f0-9])\\\\3/i', '#\\1\\2\\3', $css );\n\n\treturn trim( $css );\n}", "function frenchpress_minify_css( $css ) {\n\treturn str_replace(\n\t\t[\"\\r\",\"\\n\",\"\\t\",' ',' ',': ','; ',', ',' {','{ ',' }','} ',';}'],\n\t\t[ '', '', '', '', ' ', ':', ';', ',', '{', '{', '}', '}', '}'],\n\t\tpreg_replace('|\\/\\*[\\s\\S]*?\\*\\/|','',$css)\n\t);\n}", "protected function parseStyles()\n {\n $str = &$this->str;\n\n $str = preg_replace_callback('~(?<!@)@style\\s*\\(([\\'\"])([^\\'\"]+)\\\\1(\\s*,\\s*true\\s*)?\\)~x', function ($match) {\n if (isset($match[3])) {\n return \"<?php inline_styles(\\\"{$match[2]}\\\"); ?>\";\n } else return \"<?php include_styles(\\\"{$match[2]}\\\"); ?>\";\n }, $str);\n }", "function genesis_extender_minify_css( $css )\n{\n $css = preg_replace( '/\\s+/', ' ', $css );\n $css = preg_replace( '/\\/\\*[^\\!](.*?)\\*\\//', '', $css );\n $css = preg_replace( '/(,|:|;|\\{|}) /', '$1', $css );\n $css = preg_replace( '/ (,|;|\\{|})/', '$1', $css );\n $css = preg_replace( '/(:| )0\\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );\n $css = preg_replace( '/0 0 0 0/', '0', $css );\n\n return apply_filters( 'genesis_extender_minify_css', $css );\n}", "function ex_gallery_style($css) {\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "function theme_gallery_style($css) {\n return preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\n }", "function\t_frozen_gallery_style($css = '') {\n\t\t\t//Return the CSS.\n\t\t\treturn preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n\t\t}", "function granola_gallery_style($css)\n{\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "function pwd_minify_css($css)\n{\n // Normalize whitespace\n $css = preg_replace('/\\s+/', ' ', $css);\n // Remove ; before }\n $css = preg_replace('/;(?=\\s*})/', '', $css);\n // Remove space after , : ; { } */ >\n $css = preg_replace('/(,|:|;|\\{|}|\\*\\/|>) /', '$1', $css);\n // Remove space before , ; { }\n $css = preg_replace('/ (,|;|\\{|})/', '$1', $css);\n // Strips leading 0 on decimal values (converts 0.5px into .5px)\n $css = preg_replace('/(:| )0\\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css);\n // Strips units if value is 0 (converts 0px to 0)\n $css = preg_replace('/(:| )(\\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css);\n // Return minified CSS\n return trim($css);\n}", "public function test_cleanCSS_angledBrackets2()\r\n {\r\n //$this->assertCleanCSS(\r\n // \"span[title=\\\"</style>\\\"] {\\nfont-size:12pt;\\n}\",\r\n // \"span[title=\\\"\\\\3C /style\\\\3E \\\"] {\\nfont-size:12pt;\\n}\"\r\n //);\r\n }", "function minify_css_lines($css){\n // from the awesome CSS JS Booster: https://github.com/Schepp/CSS-JS-Booster\n // all credits to Christian Schaefer: http://twitter.com/derSchepp\n // remove comments\n $css = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $css);\n // backup values within single or double quotes\n preg_match_all('/(\\'[^\\']*?\\'|\"[^\"]*?\")/ims', $css, $hit, PREG_PATTERN_ORDER);\n for ($i=0; $i < count($hit[1]); $i++) {\n $css = str_replace($hit[1][$i], '##########' . $i . '##########', $css);\n }\n // remove traling semicolon of selector's last property\n $css = preg_replace('/;[\\s\\r\\n\\t]*?}[\\s\\r\\n\\t]*/ims', \"}\\r\\n\", $css);\n // remove any whitespace between semicolon and property-name\n $css = preg_replace('/;[\\s\\r\\n\\t]*?([\\r\\n]?[^\\s\\r\\n\\t])/ims', ';$1', $css);\n // remove any whitespace surrounding property-colon\n $css = preg_replace('/[\\s\\r\\n\\t]*:[\\s\\r\\n\\t]*?([^\\s\\r\\n\\t])/ims', ':$1', $css);\n // remove any whitespace surrounding selector-comma\n $css = preg_replace('/[\\s\\r\\n\\t]*,[\\s\\r\\n\\t]*?([^\\s\\r\\n\\t])/ims', ',$1', $css);\n // remove any whitespace surrounding opening parenthesis\n $css = preg_replace('/[\\s\\r\\n\\t]*{[\\s\\r\\n\\t]*?([^\\s\\r\\n\\t])/ims', '{$1', $css);\n // remove any whitespace between numbers and units\n $css = preg_replace('/([\\d\\.]+)[\\s\\r\\n\\t]+(px|em|pt|%)/ims', '$1$2', $css);\n // shorten zero-values\n $css = preg_replace('/([^\\d\\.]0)(px|em|pt|%)/ims', '$1', $css);\n // constrain multiple whitespaces\n $css = preg_replace('/\\p{Zs}+/ims',' ', $css);\n // remove newlines\n $css = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), '', $css);\n // Restore backupped values within single or double quotes\n for ($i=0; $i < count($hit[1]); $i++) {\n $css = str_replace('##########' . $i . '##########', $hit[1][$i], $css);\n }\n\n return $css;\n}", "function minimize_minify_css( $css ) {\n\t$css = preg_replace( '/\\s+/', ' ', $css );\n\t$css = preg_replace( '/(\\s+)(\\/\\*(.*?)\\*\\/)(\\s+)/', '$2', $css );\n\t$css = preg_replace( '~/\\*(?![\\!|\\*])(.*?)\\*/~', '', $css );\n\t$css = preg_replace( '/;(?=\\s*})/', '', $css );\n\t$css = preg_replace( '/(,|:|;|\\{|}|\\*\\/|>) /', '$1', $css );\n\t$css = preg_replace( '/ (,|;|\\{|}|\\(|\\)|>)/', '$1', $css );\n\t$css = preg_replace( '/(:| )0\\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );\n\t$css = preg_replace( '/(:| )(\\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );\n\t$css = preg_replace( '/0 0 0 0/', '0', $css );\n\t$css = preg_replace( '/#([a-f0-9])\\\\1([a-f0-9])\\\\2([a-f0-9])\\\\3/i', '#\\1\\2\\3', $css );\n\n\treturn trim( $css );\n}", "function minifyCSS($css) {\n $replace = array(\n \";/\\\\*(.|[\\r\\n])*?\\\\*/;\" => '',\n \"/\\r/\" => '',\n \"/\\n/\" => '',\n \"/\\t/\" => '',\n \"/ +/\" => ' ',\n \"/; +/\" => ';',\n \"/ +;/\" => ';',\n \"/\\\\} +/\" => '}',\n \"/\\\\] +/\" => ']',\n \"/\\\\) +/\" => ')',\n \"/\\\\{ +/\" => '{',\n \"/\\\\[ +/\" => '[',\n \"/\\\\( +/\" => '(',\n \"/ +\\\\}/\" => '}',\n \"/ +\\\\]/\" => ']',\n \"/ +\\\\)/\" => ')',\n \"/ +\\\\{/\" => '{',\n \"/ +\\\\[/\" => '[',\n \"/ +\\\\(/\" => '(',\n \"/, +/\" => ',',\n \"/ +,/\" => ',',\n \"/= +/\" => '=',\n \"/ +=/\" => '=',\n \"/ +:/\" => ':',\n \"/: +/\" => ':',\n );\n return preg_replace(array_keys($replace), array_values($replace), $css);\n}", "function filter_mce_css($css, $sep=' ,') {\r\n\t\treturn $css;\r\n\t}", "function ogle_gallery_style($css) {\r\n\treturn preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\r\n}", "private function prepareCSS($css)\n {\n //var_dump($css);\n\n // Add linenumbers to source css\n $arr = preg_split(\"/\\r\\n|\\n|\\r/\", $css);\n $new_css = \"\";\n\n for($i=0; $i<count($arr);$i++){\n $line = $i+1;\n $new_css .= \"⚜\".$line.\"⚜\".$arr[$i].\"\\n\";\n }\n\n\n\n\n\n // remove empty lines left by the source\n $new_css = preg_replace(\"/(⚜\\d+⚜\\n)/u\", \"\", $new_css);\n\n\n // handle declarations that were on the same line and therefore doesn't have a source line number.\n // give them the same one as their selector line\n $new_css = str_ireplace(\"}\",\"\\n}\\n\",$new_css);\n $new_css = str_ireplace(\"{\",\"{\\n\",$new_css);\n $new_css = str_ireplace(\";\",\";\\n\",$new_css);\n $new_css = explode(\"\\n\",$new_css); // make array\n $linenumber;\n //$i=0;\n $new_css = array_filter($new_css); // remove empty array elements\n $new_css = array_values($new_css); // reset array index\n $i = 0;\n // var_dump($new_css);die();\n foreach ($new_css as $line) {\n // get line number value\n preg_match(\"/⚜(\\d+)⚜/u\", $line, $matches);\n if(!empty($matches[1])){\n // if there is a line number already, update $linenumber to use that\n $linenumber = $matches[1];\n }\n if(strpos($line,\"⚜\")!==false) {\n // lines that have a linenumber\n } else {\n // no line number\n\n/* if(strpos($line,\"{\")===false && strpos($line,\"}\")===false) {\n // make sure it isn't { or } lines\n // add linenumber\n // $line = \"⚜\".$linenumber.\"⚜ \".$line;\n }*/\n\n $line = \"⚜\".$linenumber.\"⚜ \".$line;\n\n }\n // update the line\n $new_css[$i] = $line;\n $i++;\n\n }\n $new_css = implode(\"\\n\",$new_css); // make it a string again\n\n //var_dump($new_css);die();\n\n // 1) Minify the css as to remove all coments and ensure uniformity in format\n $minifier = new \\MatthiasMullie\\Minify\\CSS($new_css);\n $minified = $minifier->minify();\n\n // 2) Modify structure by adding linebreaks again\n $minified = str_ireplace(\"{\", \"{\\n\", $minified); // make { stand on own line\n $minified = str_ireplace(\"}\", \"\\n}\\n\", $minified); // make double line break to next rule\n $minified = str_ireplace(\";\", \";\\n\", $minified); // make each rule be on its onw line\n\n\n // remove empty lines left over by moving the } to the next line\n $minified = preg_replace(\"/(⚜\\d+⚜\\n)/u\", \"\", $minified);\n\n // if two lines have been put together, separate them (this can happen when comments have\n // been removed in minifying process)\n $minified = str_replace(\"⚜ ⚜\",\"⚜\\n⚜\", $minified);\n $minified = str_replace(\"⚜⚜\",\"⚜\\n⚜\", $minified);\n\n\n //var_dump($minified);die();\n return $minified;\n }", "protected function strip_head_css() {\n\t\t\t/* capture the output and strip out some of the <style></style> nodes */\n\t\t\tob_start();\n\t\t\twp_head();\n\t\t\t$contents = ob_get_clean();\n\t\t\t/* keywords to search for within the CSS rules */\n\t\t\t$tcb_rules_keywords = array(\n\t\t\t\t'.ttfm',\n\t\t\t\t'data-tve-custom-colour',\n\t\t\t\t'.tve_more_tag',\n\t\t\t\t'.thrive-adminbar-icon',\n\t\t\t\t'#wpadminbar',\n\t\t\t\t'html { margin-top: 32px !important; }',\n\t\t\t\t'img.emoji',\n\t\t\t\t'img.wp-smiley',\n\t\t\t\t/* Social Warfare style - SUPP-6725 */\n\t\t\t\t'sw-icon-font',\n\t\t\t);\n\t\t\t/* keywords to search for within CSS style node - classes and ids for the <style> element */\n\t\t\t$tcb_style_classes = array(\n\t\t\t\t'thrive-default-styles',\n\t\t\t\t'tve_user_custom_style',\n\t\t\t\t'tve_custom_style',\n\t\t\t\t'tcb_skin_lp_typography',\n\t\t\t\t'tve_global_style',\n\t\t\t\t'tve_global_variables',\n\t\t\t\t'optm_lazyload',\n\t\t\t\t/* lightspeed styles */\n\t\t\t\t'tcb-style-',\n\t\t\t);\n\t\t\t/**\n\t\t\t * Filter list of CSS classes / DOM attributes for style nodes that should be kept\n\t\t\t *\n\t\t\t * @param array $tcb_style_classes list of strings\n\t\t\t * @param TCB_Landing_Page $this Landing Page instance\n\t\t\t *\n\t\t\t * @return array filtered list of styles\n\t\t\t */\n\t\t\t$tcb_style_classes = apply_filters( 'tcb_lp_strip_css_whitelist', $tcb_style_classes, $this );\n\n\t\t\t$theme_dependency = get_post_meta( $this->id, 'tve_disable_theme_dependency', true );\n\t\t\tif ( empty( $theme_dependency ) ) {\n\t\t\t\t$tcb_style_classes[] = 'wp-custom-css';\n\t\t\t}\n\n\t\t\tif ( preg_match_all( '#<style(.*?)>(.*?)</style>#ms', $contents, $m ) ) {\n\t\t\t\tforeach ( $m[2] as $index => $css_rules ) {\n\t\t\t\t\t$css_node = $m[1][ $index ];\n\t\t\t\t\t$remove_it = true;\n\t\t\t\t\tforeach ( $tcb_rules_keywords as $tcb_keyword ) {\n\t\t\t\t\t\tif ( strpos( $css_rules, $tcb_keyword ) !== false ) {\n\t\t\t\t\t\t\t$remove_it = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( $remove_it ) {\n\t\t\t\t\t\tforeach ( $tcb_style_classes as $style_class ) {\n\t\t\t\t\t\t\tif ( strpos( $css_node, $style_class ) !== false ) {\n\t\t\t\t\t\t\t\t$remove_it = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( $remove_it ) {\n\t\t\t\t\t\t$contents = str_replace( $m[0][ $index ], '', $contents );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo $contents; //phpcs:ignore\n\n\t\t\t/**\n\t\t\t * Support for Custom Fonts plugin\n\t\t\t */\n\t\t\tif ( class_exists( 'Bsf_Custom_Fonts_Render' ) ) {\n\t\t\t\t/** @var Bsf_Custom_Fonts_Render $bsf_renderer */\n\t\t\t\t$bsf_renderer = Bsf_Custom_Fonts_Render::get_instance();\n\t\t\t\tif ( method_exists( $bsf_renderer, 'add_style' ) ) {\n\t\t\t\t\t$bsf_renderer->add_style();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function boiler_gallery_style($css) {\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "function boiler_gallery_style($css) {\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "function xssClean($str)\n\t{\n\t\t$str = preg_replace('/\\0+/', '', $str);\n\t\t$str = preg_replace('/(\\\\\\\\0)+/', '', $str);\n\n\t\t/*\n\t\t * Validate standard character entities\n\t\t *\n\t\t * Add a semicolon if missing. We do this to enable\n\t\t * the conversion of entities to ASCII later.\n\t\t *\n\t\t */\n\t\t$str = preg_replace('#(&\\#?[0-9a-z]+)[\\x00-\\x20]*;?#i', \"\\\\1;\", $str);\n\n\t\t/*\n\t\t * Validate UTF16 two byte encoding (x00)\n\t\t *\n\t\t * Just as above, adds a semicolon if missing.\n\t\t *\n\t\t */\n\t\t$str = preg_replace('#(&\\#x?)([0-9A-F]+);?#i',\"\\\\1\\\\2;\",$str);\n\n\t\t/*\n\t\t * URL Decode\n\t\t *\n\t\t * Just in case stuff like this is submitted:\n\t\t *\n\t\t * <a href=\"http://%77%77%77%2E%67%6F%6F%67%6C%65%2E%63%6F%6D\">Google</a>\n\t\t *\n\t\t * Note: Normally urldecode() would be easier but it removes plus signs\n\t\t *\n\t\t */\n\t\t$str = preg_replace(\"/(%20)+/\", '9u3iovBnRThju941s89rKozm', $str);\n\t\t$str = preg_replace(\"/%u0([a-z0-9]{3})/i\", \"&#x\\\\1;\", $str);\n\t\t$str = preg_replace(\"/%([a-z0-9]{2})/i\", \"&#x\\\\1;\", $str);\n\t\t$str = str_replace('9u3iovBnRThju941s89rKozm', \"%20\", $str);\n\n\t\t/*\n\t\t * Convert character entities to ASCII\n\t\t *\n\t\t * This permits our tests below to work reliably.\n\t\t * We only convert entities that are within tags since\n\t\t * these are the ones that will pose security problems.\n\t\t *\n\t\t */\n\n\t\t$str = preg_replace_callback(\"/[a-z]+=([\\'\\\"]).*?\\\\1/si\", array($this, 'xss_attribute_conversion'), $str);\n\n\t\t$str = preg_replace_callback(\"/<([\\w]+)[^>]*>/si\", array($this, 'xss_html_entity_decode'), $str);\n\n\t\t/*\n\n\t\tOld Code that when modified to use preg_replace()'s above became more efficient memory-wise\n\n\t\tif (preg_match_all(\"/[a-z]+=([\\'\\\"]).*?\\\\1/si\", $str, $matches))\n\t\t{\n\t\t\tfor ($i = 0; $i < count($matches[0]); $i++)\n\t\t\t{\n\t\t\t\tif (stristr($matches[0][$i], '>'))\n\t\t\t\t{\n\t\t\t\t\t$str = str_replace(\t$matches['0'][$i],\n\t\t\t\t\t\t\t\t\t\tstr_replace('>', '&lt;', $matches[0][$i]),\n\t\t\t\t\t\t\t\t\t\t$str);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n if (preg_match_all(\"/<([\\w]+)[^>]*>/si\", $str, $matches))\n {\n\t\t\tfor ($i = 0; $i < count($matches[0]); $i++)\n\t\t\t{\n\t\t\t\t$str = str_replace($matches[0][$i],\n\t\t\t\t\t\t\t\t\t$this->_html_entity_decode($matches[0][$i], $charset),\n\t\t\t\t\t\t\t\t\t$str);\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t/*\n\t\t * Convert all tabs to spaces\n\t\t *\n\t\t * This prevents strings like this: ja\tvascript\n\t\t * NOTE: we deal with spaces between characters later.\n\t\t * NOTE: preg_replace was found to be amazingly slow here on large blocks of data,\n\t\t * so we use str_replace.\n\t\t *\n\t\t */\n\n\t\t$str = str_replace(\"\\t\", \" \", $str);\n\n\t\t/*\n\t\t * Not Allowed Under Any Conditions\n\t\t */\n\t\t$bad = array(\n\t\t\t\t\t\t'document.cookie'\t=> '[removed]',\n\t\t\t\t\t\t'document.write'\t=> '[removed]',\n\t\t\t\t\t\t'.parentNode'\t\t=> '[removed]',\n\t\t\t\t\t\t'.innerHTML'\t\t=> '[removed]',\n\t\t\t\t\t\t'window.location'\t=> '[removed]',\n\t\t\t\t\t\t'-moz-binding'\t\t=> '[removed]',\n\t\t\t\t\t\t'<!--'\t\t\t\t=> '&lt;!--',\n\t\t\t\t\t\t'-->'\t\t\t\t=> '--&gt;',\n\t\t\t\t\t\t'<!CDATA['\t\t\t=> '&lt;![CDATA['\n\t\t\t\t\t);\n\n\t\tforeach ($bad as $key => $val)\n\t\t{\n\t\t\t$str = str_replace($key, $val, $str);\n\t\t}\n\n\t\t$bad = array(\n\t\t\t\t\t\t\"javascript\\s*:\"\t=> '[removed]',\n\t\t\t\t\t\t\"expression\\s*\\(\"\t=> '[removed]', // CSS and IE\n\t\t\t\t\t\t\"Redirect\\s+302\"\t=> '[removed]'\n\t\t\t\t\t);\n\n\t\tforeach ($bad as $key => $val)\n\t\t{\n\t\t\t$str = preg_replace(\"#\".$key.\"#i\", $val, $str);\n\t\t}\n\n\t\t/*\n\t\t * Makes PHP tags safe\n\t\t *\n\t\t * Note: XML tags are inadvertently replaced too:\n\t\t *\n\t\t *\t<?xml\n\t\t *\n\t\t * But it doesn't seem to pose a problem.\n\t\t *\n\t\t */\n\t\t$str = str_replace(array('<?php', '<?PHP', '<?', '?'.'>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);\n\n\t\t/*\n\t\t * Compact any exploded words\n\t\t *\n\t\t * This corrects words like: j a v a s c r i p t\n\t\t * These words are compacted back to their correct state.\n\t\t *\n\t\t */\n\t\t$words = array('javascript', 'expression', 'vbscript', 'script', 'applet', 'alert', 'document', 'write', 'cookie', 'window');\n\t\tforeach ($words as $word)\n\t\t{\n\t\t\t$temp = '';\n\t\t\tfor ($i = 0; $i < strlen($word); $i++)\n\t\t\t{\n\t\t\t\t$temp .= substr($word, $i, 1).\"\\s*\";\n\t\t\t}\n\n\t\t\t// We only want to do this when it is followed by a non-word character\n\t\t\t// That way valid stuff like \"dealer to\" does not become \"dealerto\"\n\t\t\t$str = preg_replace('#('.substr($temp, 0, -3).')(\\W)#ise', \"preg_replace('/\\s+/s', '', '\\\\1').'\\\\2'\", $str);\n\t\t}\n\n\t\t/*\n\t\t * Remove disallowed Javascript in links or img tags\n\t\t */\n\t\tdo\n\t\t{\n\t\t\t$original = $str;\n\n\t\t\tif ((version_compare(PHP_VERSION, '5.0', '>=') === TRUE && stripos($str, '</a>') !== FALSE) OR\n\t\t\t\t preg_match(\"/<\\/a>/i\", $str))\n\t\t\t{\n\t\t\t\t$str = preg_replace_callback(\"#<a.*?</a>#si\", array($this, 'xss_js_link_removal'), $str);\n\t\t\t}\n\n\t\t\tif ((version_compare(PHP_VERSION, '5.0', '>=') === TRUE && stripos($str, '<img') !== FALSE) OR\n\t\t\t\t preg_match(\"/img/i\", $str))\n\t\t\t{\n\t\t\t\t$str = preg_replace_callback(\"#<img.*?\".\">#si\", array($this, 'xss_js_img_removal'), $str);\n\t\t\t}\n\n\t\t\tif ((version_compare(PHP_VERSION, '5.0', '>=') === TRUE && (stripos($str, 'script') !== FALSE OR stripos($str, 'xss') !== FALSE)) OR\n\t\t\t\t preg_match(\"/(script|xss)/i\", $str))\n\t\t\t{\n\t\t\t\t$str = preg_replace(\"#</*(script|xss).*?\\>#si\", \"\", $str);\n\t\t\t}\n\t\t}\n\t\twhile($original != $str);\n\n\t\tunset($original);\n\n\t\t/*\n\t\t * Remove JavaScript Event Handlers\n\t\t *\n\t\t * Note: This code is a little blunt. It removes\n\t\t * the event handler and anything up to the closing >,\n\t\t * but it's unlikely to be a problem.\n\t\t *\n\t\t */\n\t\t$event_handlers = array('onblur','onchange','onclick','onfocus','onload','onmouseover','onmouseup','onmousedown','onselect','onsubmit','onunload','onkeypress','onkeydown','onkeyup','onresize', 'xmlns');\n\t\t$str = preg_replace(\"#<([^>]+)(\".implode('|', $event_handlers).\")([^>]*)>#iU\", \"&lt;\\\\1\\\\2\\\\3&gt;\", $str);\n\n\t\t/*\n\t\t * Sanitize naughty HTML elements\n\t\t *\n\t\t * If a tag containing any of the words in the list\n\t\t * below is found, the tag gets converted to entities.\n\t\t *\n\t\t * So this: <blink>\n\t\t * Becomes: &lt;blink&gt;\n\t\t *\n\t\t */\n\t\t$str = preg_replace('#<(/*\\s*)(alert|applet|basefont|base|behavior|bgsound|blink|body|embed|expression|form|frameset|frame|head|html|ilayer|iframe|input|layer|link|meta|object|plaintext|style|script|textarea|title|xml|xss)([^>]*)>#is', \"&lt;\\\\1\\\\2\\\\3&gt;\", $str);\n\n\t\t/*\n\t\t * Sanitize naughty scripting elements\n\t\t *\n\t\t * Similar to above, only instead of looking for\n\t\t * tags it looks for PHP and JavaScript commands\n\t\t * that are disallowed. Rather than removing the\n\t\t * code, it simply converts the parenthesis to entities\n\t\t * rendering the code un-executable.\n\t\t *\n\t\t * For example:\teval('some code')\n\t\t * Becomes:\t\teval&#40;'some code'&#41;\n\t\t *\n\t\t */\n\t\t$str = preg_replace('#(alert|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\\s*)\\((.*?)\\)#si', \"\\\\1\\\\2&#40;\\\\3&#41;\", $str);\n\n\t\t/*\n\t\t * Final clean up\n\t\t *\n\t\t * This adds a bit of extra precaution in case\n\t\t * something got through the above filters\n\t\t *\n\t\t */\n\t\t$bad = array(\n\t\t\t\t\t\t'document.cookie'\t=> '[removed]',\n\t\t\t\t\t\t'document.write'\t=> '[removed]',\n\t\t\t\t\t\t'.parentNode'\t\t=> '[removed]',\n\t\t\t\t\t\t'.innerHTML'\t\t=> '[removed]',\n\t\t\t\t\t\t'window.location'\t=> '[removed]',\n\t\t\t\t\t\t'-moz-binding'\t\t=> '[removed]',\n\t\t\t\t\t\t'<!--'\t\t\t\t=> '&lt;!--',\n\t\t\t\t\t\t'-->'\t\t\t\t=> '--&gt;',\n\t\t\t\t\t\t'<!CDATA['\t\t\t=> '&lt;![CDATA['\n\t\t\t\t\t);\n\n\t\tforeach ($bad as $key => $val)\n\t\t{\n\t\t\t$str = str_replace($key, $val, $str);\n\t\t}\n\n\t\t$bad = array(\n\t\t\t\t\t\t\"javascript\\s*:\"\t=> '[removed]',\n\t\t\t\t\t\t\"expression\\s*\\(\"\t=> '[removed]', // CSS and IE\n\t\t\t\t\t\t\"Redirect\\s+302\"\t=> '[removed]'\n\t\t\t\t\t);\n\n\t\tforeach ($bad as $key => $val)\n\t\t{\n\t\t\t$str = preg_replace(\"#\".$key.\"#i\", $val, $str);\n\t\t}\n\n\t\t//log_message('debug', \"XSS Filtering completed\");\n\t\treturn $str;\n\t}", "function _minify_css($input) {\n // Keep important white-space(s) in `calc()`\n if(stripos($input, 'calc(') !== false) {\n $input = preg_replace_callback('#\\b(calc\\()\\s*(.*?)\\s*\\)#i', function($m) {\n return $m[1] . preg_replace('#\\s+#', X . '\\s', $m[2]) . ')';\n }, $input);\n }\n // Minify ...\n return preg_replace(\n array(\n // Fix case for `#foo [bar=\"baz\"]` and `#foo :first-child` [^1]\n '#(?<![,\\{\\}])\\s+(\\[|:\\w)#',\n // Fix case for `[bar=\"baz\"] .foo` and `@media (foo: bar) and (baz: qux)` [^2]\n '#\\]\\s+#', '#\\b\\s+\\(#', '#\\)\\s+\\b#',\n // Minify HEX color code ... [^3]\n '#\\#([\\da-f])\\1([\\da-f])\\2([\\da-f])\\3\\b#i',\n // Remove white-space(s) around punctuation(s) [^4]\n '#\\s*([~!@*\\(\\)+=\\{\\}\\[\\]:;,>\\/])\\s*#',\n // Replace zero unit(s) with `0` [^5]\n '#\\b(?:0\\.)?0([a-z]+\\b|%)#i',\n // Replace `0.6` with `.6` [^6]\n '#\\b0+\\.(\\d+)#',\n // Replace `:0 0`, `:0 0 0` and `:0 0 0 0` with `:0` [^7]\n '#:(0\\s+){0,3}0(?=[!,;\\)\\}]|$)#',\n // Replace `background(?:-position)?:(0|none)` with `background$1:0 0` [^8]\n '#\\b(background(?:-position)?):(0|none)\\b#i',\n // Replace `(border(?:-radius)?|outline):none` with `$1:0` [^9]\n '#\\b(border(?:-radius)?|outline):none\\b#i',\n // Remove empty selector(s) [^10]\n '#(^|[\\{\\}])(?:[^\\{\\}]+)\\{\\}#',\n // Remove the last semi-colon and replace multiple semi-colon(s) with a semi-colon [^11]\n '#;+([;\\}])#',\n // Replace multiple white-space(s) with a space [^12]\n '#\\s+#'\n ),\n array(\n // [^1]\n X . '\\s$1',\n // [^2]\n ']' . X . '\\s', X . '\\s(', ')' . X . '\\s',\n // [^3]\n '#$1$2$3',\n // [^4]\n '$1',\n // [^5]\n '0',\n // [^6]\n '.$1',\n // [^7]\n ':0',\n // [^8]\n '$1:0 0',\n // [^9]\n '$1:0',\n // [^10]\n '$1',\n // [^11]\n '$1',\n // [^12]\n ' '\n ),\n $input);\n}", "function minifyCSS($css) \n {\n // Compress whitespace.\n $css = preg_replace('/\\s+/', ' ', $css);\n \n // Remove comments.\n $css = preg_replace('/\\/\\*.*?\\*\\//', '', $css);\n \n return trim($css);\n }", "protected function minify_css( $css )\r\n {\r\n return preg_replace( '@({)\\s+|(\\;)\\s+|/\\*.+?\\*\\/|\\R@is', '$1$2 ', $css );\r\n }", "public function test_cleanCSS_angledBrackets()\r\n {\r\n // font-family; when we add support for 'content', reinstate\r\n // this test.\r\n //$this->assertCleanCSS(\r\n // \".class {\\nfont-family:'</style>';\\n}\",\r\n // \".class {\\nfont-family:\\\"\\\\3C /style\\\\3E \\\";\\n}\"\r\n //);\r\n }", "private function minifyCSS() {\n\t\t$this->setMinifiedData($this->getMinifiedData());\n\t}", "public static function parse()\n\t{\n\t\t$xml = CSS::to_xml();\n\t\t\n\t\t$css = \"\";\n\t\t\n\t\tforeach($xml->rule as $key => $value)\n\t\t{\n\t\t\t$css .= self::parse_rule($value);\n\t\t}\n\n\t\tCSS::$css = CSS::convert_entities('decode', $css);\n\t}", "private function stripComments()\n\t{\n\t\t$this->css=preg_replace('/\\/\\*.*?\\*\\//s', '', $this->css);\n\t}", "function xss_clean($data)\n{\n// Fix &entity\\n;\n$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n$data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n$data = html_entity_decode($data, ENT_COMPAT, 'utf-8');\n \n// Remove any attribute starting with \"on\" or xmlns\n$data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n \n// Remove javascript: and vbscript: protocols\n$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n \n// Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n \n// Remove namespaced elements (we do not need them)\n$data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n \ndo\n{\n// Remove really unwanted tags\n$old_data = $data;\n$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n}\nwhile ($old_data !== $data);\n \n// we are done...\nreturn $data;\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag) {\r\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\r\n}", "private function parseCSS()\r\n {\r\n $cssStyles = $this->cssStyles;\r\n foreach ($cssStyles as $key => $value) {\r\n if (preg_match(\"/((?=,)|(?=, ))/\", $key)) {\r\n $newKeys = preg_split(\"/,/\", trim($key));\r\n foreach ($newKeys as $newKey) {\r\n $cssStyles[trim($newKey)] = $value;\r\n }\r\n unset($cssStyles[$key]);\r\n }\r\n }\r\n $this->cssStyles = $cssStyles;\r\n \r\n // Same as above, except for Selectors in Media Query blocks\r\n $mediaStyles = $this->mediaStyles;\r\n foreach ($mediaStyles as $media => $mediaBlock) {\r\n foreach ($mediaBlock as $mKey => $mStyle) {\r\n if (preg_match(\"/((?=,)|(?=, ))/\", $mKey)) {\r\n $newMsKeys = preg_split(\"/,/\", trim($mKey));\r\n foreach ($newMsKeys as $newMsKey) {\r\n $mediaStyles[$media][trim($newMsKey)] = $mStyle;\r\n }\r\n unset($mediaStyles[$media][$mKey]);\r\n }\r\n }\r\n }\r\n $this->mediaStyles = $mediaStyles;\r\n }", "function nuevoconcepto_style_remove($tag)\n{\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function twentyten_remove_gallery_css( $css ) {\n return preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n }", "function nzf_css_alter(&$css) {\n\n /**\n * If stylesheets from core or modules cause trouble in your theme add the path to spruit.info \n * before you start overriding classes\n */\n $stylesheets = theme_get_setting('unset_styles');\n foreach($stylesheets as $path) {\n unset($css[$path]);\n }\n}", "public function setrawcss($rawcss)\n {\n if(is_string($rawcss)) {\n $this->rawcss = $rawcss;\n }\n }", "function html5_style_remove($tag) {\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag) {\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag) {\n\treturn preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function html5_style_remove($tag) {\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function bfa_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function html5_style_remove( $tag ) {\n return preg_replace( '~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag );\n}", "function cleanAndSanitize($input) {\t\n\t$search = array(\n '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n '@<style[^>]*?>{}:.*?</style>@siU', // Strip style tags properly\n '@<![\\s\\S]*?--[ \\t\\n\\r]*>@', // Strip multi-line comments\n \"/@?@siU/\"\n );\n\n \tif (get_magic_quotes_gpc()) {\n $input = stripslashes($input);\n }\n $output = preg_replace($search, '', html_entity_decode($input, ENT_QUOTES));\n \n \n return utf8_encode($output);\n}", "function sandbox_no_inline_style_tag_cloud( $list ) {\r\n $list = preg_replace('/style=(\"|\\')(.*?)(\"|\\')/','',$list);\r\n return $list;\r\n}", "function btm_remove_gallery_css( $css ) {\n\t\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function dazzling_sanitize_typo_style( $input ) {\n global $typography_options,$typography_defaults;\n if ( array_key_exists( $input, $typography_options['styles'] ) ) {\n return $input;\n } else {\n return $typography_defaults['style'];\n }\n}", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('mobiletemplate.component_controller_admincp_addstyle_clean')) ? eval($sPlugin) : false);\n\t}", "public static function xssClean( string $str, string $charset = 'UTF-8' ): string {\n\n if( empty($str) ) {\n return $str;\n }\n\n // strip any raw control characters that might interfere with our cleaning\n $str = static::stripControlChars($str);\n\n // fix and decode entities (handles missing ; terminator)\n $str = str_replace(['&amp;','&lt;','&gt;'], ['&amp;amp;','&amp;lt;','&amp;gt;'], $str);\n $str = preg_replace('/(&#*\\w+)\\s+;/u', '$1;', $str);\n $str = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $str);\n $str = html_entity_decode($str, ENT_COMPAT, $charset);\n\n // strip any control characters that were sneakily encoded as entities\n $str = static::stripControlChars($str);\n\n // normalise line endings\n $str = static::normaliseLineEndings($str);\n\n // remove any attribute starting with \"on\" or xmlns\n $str = preg_replace('#(?:on[a-z]+|xmlns)\\s*=\\s*[\\'\"\\s]?[^\\'>\"]*[\\'\"\\s]?\\s?#iu', '', $str);\n\n // remove javascript: and vbscript: protocols and -moz-binding CSS property\n $str = preg_replace('#([a-z]*)\\s*=\\s*([`\\'\"]*)\\s*j\\s*a\\s*v\\s*a\\s*s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*:#iu', '$1=$2nojavascript...', $str);\n $str = preg_replace('#([a-z]*)\\s*=([\\'\"]*)\\s*v\\s*b\\s*s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*:#iu', '$1=$2novbscript...', $str);\n $str = preg_replace('#([a-z]*)\\s*=([\\'\"]*)\\s*-moz-binding\\s*:#u', '$1=$2nomozbinding...', $str);\n\n // only works in IE: <span style=\"width: expression(alert('XSS!'));\"></span>\n $str = preg_replace('#(<[^>]+?)style\\s*=\\s*[`\\'\"]*.*?expression\\s*\\([^>]*+>#isu', '$1>', $str);\n $str = preg_replace('#(<[^>]+?)style\\s*=\\s*[`\\'\"]*.*?behaviour\\s*\\([^>]*+>#isu', '$1>', $str);\n $str = preg_replace('#(<[^>]+?)style\\s*=\\s*[`\\'\"]*.*?s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*:*[^>]*+>#isu', '$1>', $str);\n\n // remove namespaced elements (we do not need them)\n $str = preg_replace('#</*\\w+:\\w[^>]*+>#iu', '', $str);\n\n // remove data URIs\n $str = preg_replace(\"#data:[\\w/]+;\\w+,[\\w\\r\\n+=/]*#iu\", \"data: not allowed\", $str);\n\n // remove really unwanted tags\n do {\n $old = $str;\n $str = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|body|embed|frame(?:set)?|head|html|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#iu', '', $str);\n }\n while( $old !== $str );\n\n return $str;\n\n }", "function _rhd_remove_gallery_css( $css ) {\n return preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "public function rawcss()\n {\n return $this->rawcss;\n }", "function adfc2010_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "public function ms_css() {\n\t\t$css = get_option('thesis_raw_css') ? get_option('thesis_raw_css') : file_get_contents(THESIS_USER_SKIN. '/css.css');\n\t\theader('Content-Type: text/css', true, 200);\n\t\tprintf('%s', strip_tags($css));\n\t\texit;\n\t}", "function dip_style_remove($tag) {\n return preg_replace('~\\s+type=[\"\\'][^\"\\']++[\"\\']~', '', $tag);\n}", "function cmsValidateStylesheet($src) {\n if(strstr($src,'wp-mediaelement-css')||strstr($src,'mediaelement-css')){\n return str_replace('rel', 'property=\"stylesheet\" rel', $src);\n }\n else{\n return $src;\n }\n }", "function wpfolio_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function wpfolio_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function mantra_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "protected function _minifyCss($content)\n {\n // strip comments.\n $content = preg_replace('#/\\*.*\\*/#Us', '', $content);\n\n // strip needless whitespace.\n $content = preg_replace('#\\s*([\\s{},:;])\\s*#s', '\\\\1', $content);\n\n return $content;\n }", "function stylize () {\n\t\n\t\t// valid string to be styled matches this rule\n\t\t$S_PATTERN = \"([^\\s]|[^\\s].*?[^\\s])\";\n\t\t$S_START = \"(?<=\\s)\";\n\t\t$S_END = \"(?=\\s|\\.|,|<)\";\n\t\t\n\t\t// bold #example#\n\t\t//$this->text = preg_replace(\"/(?<!&)(#)\".$S_PATTERN.\"(#)/\", \"<b>$2</b>\", $this->text); // #\n\t\n\t\t// bold **example**\n\t\t$this->text = preg_replace(\"/\\B(\\*\\*)\".$S_PATTERN.\"(\\*\\*)\\B/\", \"<b>$2</b>\", $this->text); // **\n\t\t\n\t\t// italics *italics*\n\t\t$this->text = preg_replace(\"/\\B(\\*)\".$S_PATTERN.\"(\\*)\\B/\", \"<i>$2</i>\", $this->text);\n\t\n\t\t// underline _example_\n\t\t$this->text = preg_replace(\"/\\b(_)\".$S_PATTERN.\"(_)\\b/\", \"<u>$2</u>\", $this->text);\n\t\t\t\t\n\t\t// strike-through\n\t\t// this is from my custom config of dokuwiki: \\B(-)(?!\\s)(.*)(?<!\\s)(-)\\B/\n\t\t$this->text = preg_replace(\"/\".$S_START.\"(-)\".$S_PATTERN.\"(-)\".$S_END.\"/\", \"<strike>$2</strike>\", $this->text);\n\n\t\t// acronyms EG(Exempli Gratia)\n\t\t// ACTS ON: Single all caps words followed by parenthetical expression of more than 3 non-\")\" chars\n\t\t$this->text = preg_replace(\"/([A-Z]+)\\(([^\\)]{3,}?)\\)/\", \"<acronym title=\\\"$2\\\">$1</acronym>\", $this->text);\n\t\n\t}", "protected function _strip_comments($css_string) {\n\t\treturn preg_replace('/\\s*(?!<\\\")\\/\\*[^\\*]+\\*\\/(?!\\\")\\s*/' , '' , $css_string);\n\t}", "private function processCSS($rawCSSString)\n {\n $regexMatches = [];\n $matchedSuccessfully = preg_match_all(self::CSS_TOKENIZING_REGEX, $rawCSSString, $regexMatches);\n if ($matchedSuccessfully) {\n $selectors = $regexMatches[1];\n $descriptors = $regexMatches[2];\n\n $this->processSelectors($selectors);\n $this->processDescriptors($descriptors);\n }\n }", "public static function escapeCss($s): string\n\t{\n\t\t// http://www.w3.org/TR/2006/WD-CSS21-20060411/syndata.html#q6\n\t\treturn addcslashes((string) $s, \"\\x00..\\x1F!\\\"#$%&'()*+,./:;<=>?@[\\\\]^`{|}~\");\n\t}", "public function get_css()\n\t\t{\n\t\t\treturn ( isset($this->code_secret[\"url_style\"]) ) ? $this->get_secret(\"url_style\"):\"\";\n\t\t}", "function clear_css(){\n\t\t\n\t\t$this->css_raw = '';\n\t\t$this->css_scripts = '';\n\t\t\n\t}", "public function css($content) {\n $this->parsed_css = $this->parse_css($content);\n }", "function xss_cleaner($input_str) {\r\n $return_str = str_replace(array('<', ';', '|', '&', '>', \"'\", '\"', ')', '('), array('&lt;', '&#58;', '&#124;', '&#38;', '&gt;', '&apos;', '&#x22;', '&#x29;', '&#x28;'), $input_str);\r\n $return_str = str_ireplace('%3Cscript', '', $return_str);\r\n return $return_str;\r\n}", "function memegen_sanitize( $input ) {\r\n\t$input = preg_replace( '/[^a-zA-Z0-9-_]/', '-', $input );\r\n\t$input = preg_replace( '/--*/', '-', $input );\r\n\treturn $input;\r\n}", "function minify_css($file = '../public/styles/style.min.css') {\n $css = file_get_contents($file);\n\n $css = preg_replace_callback(\n '/(?<=\\.)([a-zA-Z].+?)(?=\\,|\\{|:|\\>| )/', \n function($matches) {\n return 'ab';\n }, $css\n );\n\n file_put_contents($file, $css);\n}", "function udem_islandscholar_css_alter(&$css) {\n //unset($css[drupal_get_path('theme', 'omega') . '/omega/css/modules/system/system.messages.theme.css']);\n}", "public function css() {\n\t\treturn null;\n\t}", "function readCSSString()\n {\n\n $result='';\n\n if ($this->_style != tssDisabled)\n {\n $result = \"text-shadow:$this->_horizontalposition $this->_verticalposition $this->_blurradius $this->_color;\\n\";\n }\n\n return($result);\n }", "public function sanitize() {\n\t\t$this->is_customize_preview = is_customize_preview();\n\n\t\t$elements = [];\n\n\t\t$this->focus_class_name_selector_pattern = (\n\t\t\t! empty( $this->args['focus_within_classes'] ) ?\n\t\t\t\tself::get_class_name_selector_pattern( $this->args['focus_within_classes'] ) :\n\t\t\t\tnull\n\t\t);\n\n\t\t/*\n\t\t * Note that xpath is used to query the DOM so that the link and style elements will be\n\t\t * in document order. DOMNode::compareDocumentPosition() is not yet implemented.\n\t\t */\n\n\t\t$dev_mode_predicate = '';\n\t\tif ( DevMode::isActiveForDocument( $this->dom ) ) {\n\t\t\t$dev_mode_predicate = sprintf( ' and not ( @%s )', AMP_Rule_Spec::DEV_MODE_ATTRIBUTE );\n\t\t}\n\n\t\t$lower_case = 'translate( %s, \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"abcdefghijklmnopqrstuvwxyz\" )'; // In XPath 2.0 this is lower-case().\n\t\t$predicates = [\n\t\t\tsprintf( '( self::style and not( @amp-boilerplate ) and ( not( @type ) or %s = \"text/css\" ) %s )', sprintf( $lower_case, '@type' ), $dev_mode_predicate ),\n\t\t\tsprintf( '( self::link and @href and %s = \"stylesheet\" %s )', sprintf( $lower_case, '@rel' ), $dev_mode_predicate ),\n\t\t];\n\n\t\tforeach ( $this->dom->xpath->query( '//*[ ' . implode( ' or ', $predicates ) . ' ]' ) as $element ) {\n\t\t\t$elements[] = $element;\n\t\t}\n\n\t\t// If 'width' attribute is present for 'col' tag, convert to proper CSS rule.\n\t\tforeach ( $this->dom->getElementsByTagName( 'col' ) as $col ) {\n\t\t\t/**\n\t\t\t * Col element.\n\t\t\t *\n\t\t\t * @var DOMElement $col\n\t\t\t */\n\t\t\t$width_attr = $col->getAttribute( 'width' );\n\t\t\tif ( ! empty( $width_attr ) && ( false === strpos( $width_attr, '*' ) ) ) {\n\t\t\t\t$width_style = 'width: ' . $width_attr;\n\t\t\t\tif ( is_numeric( $width_attr ) ) {\n\t\t\t\t\t$width_style .= 'px';\n\t\t\t\t}\n\t\t\t\tif ( $col->hasAttribute( 'style' ) ) {\n\t\t\t\t\t$col->setAttribute( 'style', $width_style . ';' . $col->getAttribute( 'style' ) );\n\t\t\t\t} else {\n\t\t\t\t\t$col->setAttribute( 'style', $width_style );\n\t\t\t\t}\n\t\t\t\t$col->removeAttribute( 'width' );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Element.\n\t\t *\n\t\t * @var DOMElement $element\n\t\t */\n\t\tforeach ( $elements as $element ) {\n\t\t\t$node_name = strtolower( $element->nodeName );\n\t\t\tif ( 'style' === $node_name ) {\n\t\t\t\t$this->process_style_element( $element );\n\t\t\t} elseif ( 'link' === $node_name ) {\n\t\t\t\t$this->process_link_element( $element );\n\n\t\t\t\t// If the element is still in the document, it is a font stylesheet; make sure it gets moved to the head as required.\n\t\t\t\tif ( $element->parentNode && 'head' !== $element->parentNode->nodeName ) {\n\t\t\t\t\t$this->dom->head->appendChild( $element->parentNode->removeChild( $element ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$elements = [];\n\t\tforeach ( $this->dom->xpath->query( \"//*[ @style $dev_mode_predicate ]\" ) as $element ) {\n\t\t\t$elements[] = $element;\n\t\t}\n\t\tforeach ( $elements as $element ) {\n\t\t\t$this->collect_inline_styles( $element );\n\t\t}\n\n\t\t$this->finalize_styles();\n\n\t\t$this->did_convert_elements = true;\n\n\t\t$parse_css_duration = 0.0;\n\t\t$shake_css_duration = 0.0;\n\t\tforeach ( $this->pending_stylesheets as $pending_stylesheet ) {\n\t\t\tif ( ! $pending_stylesheet['cached'] ) {\n\t\t\t\t$parse_css_duration += $pending_stylesheet['parse_time'];\n\t\t\t}\n\t\t\t$shake_css_duration += $pending_stylesheet['shake_time'];\n\t\t}\n\n\t\t// TODO: These cannot use actions when we extract the sanitizers into an external library.\n\n\t\t/**\n\t\t * Logs the server-timing measurement for the CSS parsing.\n\t\t *\n\t\t * @since 2.0\n\t\t * @internal\n\t\t *\n\t\t * @param string $event_name Name of the event to log.\n\t\t * @param string $event_description Description of the event to log.\n\t\t * @param string[] $properties Optional. Additional properties to add\n\t\t * to the logged record.\n\t\t * @param bool $verbose_only Optional. Whether to only show the\n\t\t * event in verbose mode.\n\t\t */\n\t\tdo_action( 'amp_server_timing_log', 'amp_parse_css', '', [ 'dur' => $parse_css_duration * 1000 ], true );\n\n\t\t/**\n\t\t * Logs the server-timing measurement for the CSS tree-shaking.\n\t\t *\n\t\t * @since 2.0\n\t\t * @internal\n\t\t *\n\t\t * @param string $event_name Name of the event to log.\n\t\t * @param string $event_description Description of the event to log.\n\t\t * @param string[] $properties Optional. Additional properties to add\n\t\t * to the logged record.\n\t\t * @param bool $verbose_only Optional. Whether to only show the\n\t\t * event in verbose mode.\n\t\t */\n\t\tdo_action( 'amp_server_timing_log', 'amp_shake_css', '', [ 'dur' => $shake_css_duration * 1000 ], true );\n\t}" ]
[ "0.7737274", "0.7618496", "0.7415824", "0.7284593", "0.7004667", "0.6905426", "0.69027907", "0.68957573", "0.6854619", "0.6836568", "0.6813237", "0.6733662", "0.67104334", "0.66186076", "0.66089374", "0.6601469", "0.6596227", "0.65891725", "0.6556909", "0.6527033", "0.65062267", "0.64663094", "0.6461848", "0.6426035", "0.64240307", "0.64211047", "0.64120305", "0.63863444", "0.6379437", "0.6375679", "0.6374589", "0.63623583", "0.6313145", "0.6306214", "0.6289088", "0.6288693", "0.6282898", "0.62738454", "0.62738454", "0.62242144", "0.6217001", "0.6184598", "0.61798835", "0.61798257", "0.6179142", "0.6175553", "0.6134648", "0.6125562", "0.612534", "0.612534", "0.612534", "0.612534", "0.612534", "0.612534", "0.612534", "0.6103983", "0.60955775", "0.60949326", "0.6074697", "0.6074292", "0.6054032", "0.60453165", "0.60453165", "0.6039721", "0.6035027", "0.6033334", "0.6028646", "0.602024", "0.60156244", "0.60067546", "0.59848934", "0.5979161", "0.5970894", "0.5966617", "0.59663886", "0.5952541", "0.59351635", "0.5931078", "0.5928197", "0.59273225", "0.59273225", "0.5925646", "0.5920116", "0.5920116", "0.5920116", "0.59087265", "0.58932054", "0.5893197", "0.5884787", "0.588299", "0.58763343", "0.5875763", "0.58482164", "0.5834494", "0.5825574", "0.58254707", "0.58253807", "0.5806259", "0.58047324", "0.58030087" ]
0.8262102
0
display a color picker in place of a text input
показать палитру цветов вместо текстового поля ввода
function form_color( $args ) { $id = ''; $value = ''; $description = ''; // set values if ( ! empty( $args['value'][$args['id']] ) ) { $value = $args['value'][$args['id']]; } else { if ( ! empty( $args['default'] ) ) { $value = $args['default']; } } if ( ! empty( $args['description'] ) ) { $description = $args['description']; } $id = $args['id']; ?> <input type="text" id="<?php echo $id; ?>" name="<?php echo CL_OPTIONS; ?>[<?php echo $id; ?>]" value="<?php echo $this->sanitize_hex_color( $value ); ?>" data-default-color="#<?php echo $this->sanitize_hex_color( $args['default'] ); ?>" class="color-picker"/> <?php if ( ! empty( $description ) ) { echo '<br /><span class="description">' . $description . '</span>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toptal_ss_facebook_colorpicker() { ?>\n <input type=\"text\" name=\"toptal_ss_facebook_color\" value=\"<?php echo get_option('toptal_ss_facebook_color'); ?>\" class=\"color-field\">\n <?php\n }", "function show_color($val, $fld='', $update_fg='', $update_bg='') {\n if(!is_color($val)) return $val;\n $val = ltrim($val, '#');\n $brightness = get_brightness($val);\n $fg = $brightness < 0.5 ? \"FFF\" : \"000\"; // pick suitable fg color\n\tif($fld) {\n \t$output = \"# <input id='$fld' class='colorpicker_input' type='text' maxlength='6' name='$fld' value='$val' style='color:#$fg;background-color:#$val;width:75px;' />\";\n } else {\n \t$output = \"<span style='color:#$fg;background:#$val;width:55px;'>#$val</span>\";\n }\n\n $script = \"\n$('#\".$fld.\"').ColorPicker({\n\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t$(el).val(hex);\n\t\t$(el).ColorPickerHide();\n \tvar brightness = (rgb.r+ rgb.g + rgb.b) / 765;\n \tvar fg = brightness < 0.5 ? '#FFFFFF' : '#000000';\n \t$('#\".$fld.\"').css('color', fg);\n \t$('#\".$fld.\"').css('background-color', '#' + hex);\n\".($update_fg ? \" \t$('\".$update_fg.\"').css('color', '#' + hex);\" : \"\").\"\n\".($update_bg ? \" \t$('\".$update_bg.\"').css('background-color', '#' + hex);\" : \"\").\"\n\t},\n\tonBeforeShow: function () {\n\t\t$(this).ColorPickerSetColor(this.value);\n\t},\n\n\tonChange: function (hsb, hex, rgb) {\n\t\t$('#\".$fld.\"').val(hex);\n\t\t$('#\".$fld.\"').css('background-color', '#' + hex);\n\".($update_fg ? \" \t$('\".$update_fg.\"').css('color', '#' + hex);\" : \"\").\"\n\".($update_bg ? \" \t$('\".$update_bg.\"').css('background-color', '#' + hex);\" : \"\").\"\n\t}\n\n})\n.bind('keyup', function(){\n\t$(this).ColorPickerSetColor(this.value);\n});\n\";\n $output .= html_script_inline($script);\n\n return $output;\n}", "public function render_control( $input = null ) {\n $control = new CV_HTML( '<input />', array(\n 'class' => 'cv-composer-color-picker',\n 'type' => 'text',\n 'name' => $this->handle,\n 'id' => $this->id,\n 'value' => $input,\n 'data-default-color' => $this->config['default'],\n ) );\n return $control->render();\n }", "public function color_field($attr) {\n\n ## Set the picker ID ##\n $colPikerID = \"colpicker_\" . $this->name;\n\n $str = '';\n $str .= '&nbsp;&nbsp;<input type=\"text\" ';\n foreach ($attr as $k => $v) {\n $str .= ' ' . $k . '=\"' . $v . '\" ';\n }\n $str .= ' readonly=\"readonly\" style=\"text-align: center; background-color: #D8D8D8\" /> ';\n $str .= '<a href=\"Javascript://\" onclick=\"color_picker(\\'' . $colPikerID . '\\');\">';\n $str .= '<div id=\"' . $colPikerID . '_sample\" ';\n $str .= 'style=\"float: left; width: 19px; height: 19px; border: 1px solid #CECECE; background-color: #' . $this->value . ';\">&nbsp;</div></a>';\n\n\n\n $str .= '<div class=\"cns_colorpicker\" id=\"' . $colPikerID . '\" style=\"width: 240px; height: 242px;\">';\n $str .= '<div class=\"cns_colorpicker_topbar clearfix\">';\n $str .= '<div class=\"cns_colorpicker_color\" style=\"background-color: #4444FF\" onclick=\"cp_chooseColor(\\'4444FF\\',\\'' . $colPikerID . '\\');\">&nbsp;</div> ';\n $str .= '<div style=\"float: left; width: 100px; padding-top: 3px;\">&nbsp;&nbsp;';\n $str .= '<a href=\"Javascript://\" onclick=\"cp_chooseColor(\\'4444FF\\',\\'' . $colPikerID . '\\');\">Default Color</a></div>';\n $str .= '<div style=\"position: absolute; right: 10px; top: 8px;\">';\n $str .= '<a href=\"Javascript://\" onclick=\"cp_closePicker(\\'' . $colPikerID . '\\');\">Close</a></div>';\n $str .= '</div>';\n\n for ($cpi = 0; $cpi < sizeof($this->picker_colors); $cpi++) {\n $str .= '<div class=\"cns_colorpicker_row clearfix\">';\n foreach ($this->picker_colors[$cpi] as $v) {\n $str .= '<div class=\"cns_colorpicker_color\" style=\"background-color: #' . $v . '\" ';\n $str .= 'onclick=\"cp_chooseColor(\\'' . strtoupper($v) . '\\',\\'' . $colPikerID . '\\');\">&nbsp;</div>';\n }\n $str .= '</div>';\n }\n\n $str .= '<div class=\"cns_colorpicker_spacer\" style=\"height: 8px;\">&nbsp;</div>';\n $str .= '<div class=\"cns_colorpicker_row clearfix\">';\n foreach ($this->picker_baseColors as $v) {\n $str .= '<div class=\"cns_colorpicker_color\" style=\"background-color: #' . $v . '\" ';\n $str .= 'onclick=\"cp_chooseColor(\\'' . strtoupper($v) . '\\',\\'' . $colPikerID . '\\');\">&nbsp;</div>';\n }\n $str .= '</div>';\n $str .= '</div>';\n\n return $str;\n\n }", "function ColorPicker($color_picker_id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo\t\t'<div class=\"color_picker\" id=\"'.$color_picker_id.'\">';\n\t\t\t\t\t\t\t\techo\t\t\t'<input type=\"range\" class=\"red_slider\" \t\tmin=\"0\" max=\"255\" value=\"128\">';\n\t\t\t\t\t\t\t\techo\t\t\t'<input type=\"range\" class=\"green_slider\" \tmin=\"0\" max=\"255\" value=\"128\">';\n\t\t\t\t\t\t\t\techo\t\t\t'<input type=\"range\" class=\"blue_slider\" \t\tmin=\"0\" max=\"255\" value=\"128\">\t';\n\t\t\t\t\t\t\t\techo\t\t\t'<div class=\"color\" id=\"color\"></div>';\n\t\t\t\t\t\t\t\techo\t\t'</div>';\n\t\t\t\t\t\t\t}", "function fblike_lock_setting_color($param) {\r\n\t$options = get_option('fblike_lock_options');\r\n\t$value = $options[$param[0]];\r\n\t$name=$param[0];\r\n\t$extra=\"\";\r\n\tif($value===\"\")\r\n\t\t$value=\"#000000\";\r\n\techo\"\r\n\t<label for='fblike_lock_$name'><input type='text' id='fblike_lock_$name' name='fblike_lock_options[$name]' value='$value' /> Pick color</label>\r\n <div id='ilctabscolorpicker_$name'></div>\";\r\n}", "function admin_color_scheme_picker($user_id)\n{\n}", "public function output($inputName, $value = null, $options = array())\n {\n $view = View::getInstance();\n $view->requireAsset('core/colorpicker');\n $form = Loader::helper('form');\n $r = Request::getInstance();\n if ($r->request->has($inputName)) {\n $value = h($r->request->get($inputName));\n }\n $strOptions = '';\n $i = 0;\n $defaults = array();\n $defaults['value'] = $value;\n $defaults['className'] = 'ccm-widget-colorpicker';\n $defaults['showInitial'] = true;\n $defaults['showInput'] = true;\n $defaults['allowEmpty'] = true;\n $defaults['cancelText'] = t('Cancel');\n $defaults['chooseText'] = t('Choose');\n $defaults['preferredFormat'] = 'rgb';\n $defaults['showAlpha'] = false;\n $defaults['clearText'] = t('Clear Color Selection');\n $defaults['appendTo'] = '.ui-dialog';\n $strOptions = json_encode(array_merge($defaults, $options));\n\n print \"<input type=\\\"text\\\" name=\\\"{$inputName}\\\" value=\\\"{$value}\\\" id=\\\"ccm-colorpicker-{$inputName}\\\" />\";\n print \"<script type=\\\"text/javascript\\\">\";\n print \"$(function () { $('#ccm-colorpicker-{$inputName}').spectrum({$strOptions}); })\";\n print \"</script>\";\n }", "function homebtn_button_textcolor_cb($args) \n{ \n //be safe default\n if($args['value'] == '') $args['value'] = sanitize_hex_color('#46494c');\n\n printf( '<label>%1$s </label> <em> %7$s</em><br>\n <input type=\"%2$s\" name=\"%3$s[%4$s]\" value=\"%5$s\" \n class=\"%6$s homebtn-color-picker-2\" id=\"%3$s-%4$s\"\n data-default-color=\"%8$s\"/>',\n $args['label'],\n $args['type'],\n $args['option_name'],\n $args['name'], \n $args['value'],\n $args['class'],\n $args['description'],\n $args['default']\n ); \n}", "public function colorpicker($type=NULL)\n\t{\n\t\t// CSS File(s)\n\t\tif ($type == 'css') {\n\t\t\t$this->CI->output->append_output(\n\t\t\t\tlink_tag('assets/global/plugins/bootstrap-colorpicker/css/colorpicker.css')\n\t\t\t);\n\t\t}\n\n\t\t// JavaScript File(s)\n\t\tif ($type == 'javascript') {\t\t\n\t\t\t$this->CI->output->append_output(\n\t\t\t\tscript_tag('assets/global/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js')\n\t\t\t);\n\t\t}\n\t\n\t}", "public function input_color( $args ) {\n\n\t\t$this->input_text( $args, 'color' );\n\t}", "function vibrant_life_do_field_colorpicker( $args = array() ) {\n\tvibrant_life_field_helpers()->fields->do_field_colorpicker( $args['name'], $args );\n}", "public function colorpicker( $name, $value, $placeholder = '' ) {\n\t\t$value = '#' . ltrim( $value, '#' );\n\t\t$this->text( $name, $value, $placeholder, 'text', 'small', 'normal', array( 'ipt_uif_colorpicker', 'code' ) );\n\t}", "function rbm_do_field_colorpicker( $name, $label = false, $value = false, $args = array() ) {\n\n\tglobal $rbm_fh_deprecated_support;\n\n\t$args['label'] = $label;\n\t$args['value'] = $value;\n\n\t$rbm_fh_deprecated_support->fields->do_field_colorpicker( $name, $args );\n}", "public function color_picker($name, $id, $value, $desc = '')\n {\n }", "function color($name, $value = null, $options = [])\n{\n return IFInput('color', $name, $value, $options);\n}", "function homebtn_button_background_cb($args) \n{ \n //be safe default\n if($args['value'] == '') $args['value'] = sanitize_hex_color('#ededed');\n\n printf( '<label>%1$s </label> <em> %7$s</em><br>\n <input type=\"%2$s\" name=\"%3$s[%4$s]\" value=\"%5$s\" \n class=\"%6$s homebtn-color-picker-1\" id=\"%3$s-%4$s\"\n data-default-color=\"%8$s\"/>',\n $args['label'],\n $args['type'],\n $args['option_name'],\n $args['name'], \n $args['value'],\n $args['class'],\n $args['description'],\n $args['default']\n ); \n}", "public function renderWidget()\n {\n if ( isset( $this->params['required'] ) && $this->params['required'] )\n {\n $this->attr['required'] = 'required';\n }\n $this->attr['value'] = $this->getValue();\n $this->attr['type'] = 'text';\n $this->attr['class'] .= ' colorselector';\n\n return HtmlToolkit::buildTag( 'input', $this->attr, true );\n }", "function ys_colorpicker_callback( $args ) {\n $options = ys_display_settings();\n $background = $args[0] . '_background';\n $border = $args[0] . '_border_color';\n $color = $args[0] . '_color';\n foreach( $args[1] as $key => $value ) {\n $field = $args[0] . $key; ?>\n\n <span>\n <input id=\"show_in_posts\" name=\"ys_settings_display[show_in_posts]\" type=\"hidden\" value=\"below\"/>\n <input type=\"text\" id=\"<?php echo $field; ?>\" name=\"ys_settings_display[<?php echo $field; ?>]\" class=\"your_sign-color-input\" value=\"<?php echo $options[$field]; ?>\" />\n\t\t\t<span class=\"description\"><?php echo $value; ?></span>\n <a href=\"#\" id=\"<?php echo $field; ?>\" class=\"color-field\"></a>\n\t\t</span><br />\n <?php }\n\n //echo var_dump($options);\n}", "public function render()\n {\n $id = $this->id = $this->id == null ? Str::uuid()->getHex() : $this->id;\n $placeholder = $this->placeholder = $this->placeholder ?? __('Pick a color');\n $value = $this->value;\n $name = $this->name;\n $colors = $this->colors;\n\n return view('components.color-picker', compact(\n 'id',\n 'placeholder',\n 'value',\n 'name',\n 'colors',\n ));\n }", "function check_field_color() {\n\t\tif ($this->has_field('color') && $this->is_edit_page()) {\n\t\t\twp_enqueue_style('farbtastic');\t\t\t\t\t\t\t\t\t// enqueue built-in script and style for color picker\n\t\t\twp_enqueue_script('farbtastic');\n\t\t\tadd_action('admin_head', array(&$this, 'add_script_color'));\t// add our custom script for color picker\n\t\t}\n\t}", "function wpcf_fields_colorpicker_js_farbtastic() {\n\n ?>\n <div id=\"types-color-picker\" style=\"display:none; background-color: #FFF; width:220px; padding: 10px;\"></div>\n <script type=\"text/javascript\">\n /* <![CDATA[ */\n var farbtasticTypes;\n var typesPickColor = (function($) {\n var el;\n function set(color) {\n el.parent().find('.js-types-cp-preview').css('background-color', color)\n .parent().find('.js-types-colorpicker').val(color);\n toggleButton();\n }\n function show(element) {\n el = element;\n var offset = el.offset();\n farbtasticTypes.setColor(el.parent().find('.js-types-colorpicker').val());\n $('#types-color-picker').toggle().offset({left: offset.left, top: Math.round(offset.top + 25)});\n toggleButton();\n }\n function toggleButton() {\n $('.js-types-pickcolor').text('<?php echo esc_js( __( 'Pick color', 'wpcf' ) ); ?>');\n el.text($('#types-color-picker').is(':visible') ? '<?php echo esc_js( __( 'Done', 'wpcf' ) ); ?>' : '<?php echo esc_js( __( 'Pick color', 'wpcf' ) ); ?>');\n }\n return {set: set, show: show}\n })(jQuery);\n (function($) {\n if ($.isFunction($.fn.farbtastic)) {\n $(document).ready(function() {\n $('#post').on('click', '.js-types-pickcolor', function(e) {\n e.preventDefault();\n typesPickColor.show($(this));\n return false;\n });\n farbtasticTypes = $.farbtastic('#types-color-picker', typesPickColor.set);\n });\n }\n })(jQuery);\n /* ]]> */\n </script>\n <?php\n}", "public function color(array $args): void\n {\n $field = $this->getSettingFieldObject($args);\n $field->setAttributes(\n array_merge(\n $field->getAttributes(),\n ['class' => ['color-picker']]\n )\n );\n $field->setType(FieldTypes::FIELD_TYPE_TEXT);\n $this->text($args);\n }", "function render(){\n\t\t\n\t\t$array = array('bg_color','color','border_color');\n\n\t\t$class = (isset($this->field['class']))?$this->field['class']:''; $field_id = preg_replace('#[^\\w()/.%\\-&]#',\"\", $this->field['id']);\n\n\t\t\n\t\tif(!isset($this->value['transparant']))\n\t\t\t$this->value['transparant'] = 0;\n\t\techo '<input type=\"checkbox\" id=\"'.$field_id.'_transparant\" name=\"'.$this->args['opt_name'].'['.$this->field['id'].'][transparant]\" value=\"1\" class=\"'.$class.'\" '.checked($this->value['transparant'], '1', false).' /><label for=\"'.$field_id['transparant'].'\"> No Border ? </label>';\n\t\techo '<br/></br>';\n\t\techo '<div class=\"widget-color background\">';\n\t\tforeach($array as $key){\n\t\t\techo '<div class=\"farb-popup-wrapper widget_color_picker\" >';\n\t\t\tif(!isset($this->value[$key])){ $this->value[$key] = '#000000'; }\n\t\t\t\techo '<label>'.str_replace('_', ' ', $key).'</label>:';\n\t\t\t\techo '<input type=\"text\" id=\"'.$field_id.'_'.$key.'\" name=\"'.$this->args['opt_name'].'['.$this->field['id'].']['.$key.']\" value=\"'.$this->value[$key].'\" class=\"'.$class.' popup-colorpicker\" style=\"width:70px;\"/>';\n\t\t\t\techo '<div class=\"farb-popup\"><div class=\"farb-popup-inside\"><div id=\"'.$field_id.'_'.$key.'picker\" class=\"color-picker\"></div></div></div> ';\t\n\t\t\techo '</div>';\n\n\t\t}\n\t\t\n\t\tif(!isset($this->value['opacity'])){\n\t\t\t\t\t\t$this->value['opacity'] = 0;\n\t\t}\n\t\t\techo '<p>\n\t\t\t\t\t<label for=\"opacity\">Opacity:</label>\n\t\t\t\t\t<input type=\"text\" class=\"opacity\" style=\"border:0; color:#f6931f; font-weight:bold;\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"'.$this->args['opt_name'].'['.$this->field['id'].'][opacity]\" value=\"'.$this->value['opacity'].'\" id=\"'.$this->field['id'].'opacity\" class=\"opacity-value\" />\n\t\t\t\t</p>\n\t\t\t\t<div id=\"'.$this->field['id'].'slider\" class=\"slider\"></div><br/>';\n\t\techo '</div>';\n\n\t\techo (isset($this->field['desc']) && !empty($this->field['desc']))?' <span class=\"description\">'.$this->field['desc'].'</span>':'';\n\t\t\t\t\n\t}", "public function render_content() {\n\n //var_dump($this->value());\n\n $defaultValue = '#RRGGBB';\n $defaultValueAttr = '';\n\n\n if( '' != $this->value()){\n if(is_string( $this->value() )){\n if('#' !== substr($this->value(), 0,1)){\n $defaultValue = '#' . $this->value();\n }else{\n $defaultValue = $this->value();\n }\n $defaultValueAttr = ' value=' . $defaultValue;\n }\n }else if( '' != $this->setting->default){\n $defaultValue = $this->setting->default;\n $defaultValueAttr = ' data-default-color=' . $defaultValue;\n }\n\n\n\n\n if(!empty($this->label)){\n echo '<span class=\"customize-control-title\">'.$this->label.'</span>';\n }\n if(!empty($this->description)){\n echo '<span class=\"customize-control-title\">'.$this->description.'</span>';\n }\n\n echo '<div class=\"customize-control-content\">';\n echo '<label><span class=\"screen-reader-text\">'.$this->label.'</span>';\n\n echo '<input class=\"color-picker-hex color-picker\" type=\"text\" maxlength=\"7\" placeholder=\"#RRGGBB\" data-alpha=\"true\"' .$defaultValueAttr. ' />';\n\n echo '</label>';\n echo '</div>';\n\n\n }", "function wpcf_fields_colorpicker_render_js() {\n if ( wpcf_compare_wp_version( '3.5', '<' ) ) {\n wpcf_fields_colorpicker_js_farbtastic();\n } else {\n wpcf_fields_colorpicker_js();\n }\n}", "function render_field( $field ) {\n\n\t\t\t/*\n\t\t\t* Create a simple text input using the 'color_picker_palette' setting.\n\t\t\t*/\n\n\t\t\t// Have to reformat the choices array in order to yield a properly formatted JSON string.\n\t\t\t$nested_array = [];\n\t\t\tif ( ! empty( $field['choices'] ) ) {\n\t\t\t\tforeach ( (array) $field['choices'] as $value => $label ) {\n\t\t\t\t\t$nested_array[] = [\n\t\t\t\t\t\t$value => $label,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$data_palette = json_encode( $nested_array );\n\n\t\t\t?>\n\t\t\t<input type=\"text\" name=\"<?php echo esc_attr( $field['name'] ) ?>\" data-palette='<?php echo $data_palette; ?>' value=\"<?php echo esc_attr( $field['value'] ) ?>\" />\n\t\t\t<?php\n\t\t}", "public function colorpicker($element='#colorpicker', $user_options=array())\n\t{\n\t\t$this->css->addFile(OKT_PUBLIC_URL.'/plugins/jpicker/css/jPicker.min.css');\n\t\t$this->js->addFile(OKT_PUBLIC_URL.'/plugins/jpicker/jpicker.min.js');\n\n\t\t# patch for 1.1.5 missing this property\n\t\t# TODO : remove when it will be corrected\n\t\t$this->css->addCss('.jPicker tr, .jPicker td { vertical-align: middle; } ');\n\n\t\tl10n::set(OKT_LOCALES_PATH.'/'.$GLOBALS['okt']->user->language.'/jPicker');\n\n\t\t$options = array(\n\t\t\t'images' => array(\n\t\t\t\t'clientPath' => OKT_PUBLIC_URL.'/plugins/jpicker/images/'\n\t\t\t),\n\t\t\t'localization' => array(\n\t\t\t\t'text' => array(\n\t\t\t\t\t'title' => __('jpicker_text_title'),\n\t\t\t\t\t'newColor' => __('jpicker_text_newColor'),\n\t\t\t\t\t'currentColor' => __('jpicker_text_currentColor'),\n\t\t\t\t\t'ok' => __('jpicker_text_ok'),\n\t\t\t\t\t'cancel' => __('jpicker_text_cancel')\n\t\t\t\t),\n\t\t\t\t'tooltips' => array(\n\t\t\t\t\t'colors' => array(\n\t\t\t\t\t\t'newColor' => __('jpicker_tooltips_colors_newColor'),\n\t\t\t\t\t\t'currentColor' => __('jpicker_tooltips_colors_currentColor')\n\t\t\t\t\t),\n\t\t\t\t\t'buttons' => array(\n\t\t\t\t\t\t'ok' => __('jpicker_tooltips_buttons_ok'),\n\t\t\t\t\t\t'cancel' => __('jpicker_tooltips_buttons_cancel')\n\t\t\t\t\t),\n\t\t\t\t\t'hue' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_hue_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_hue_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'saturation' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_saturation_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_saturation_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_value_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_value_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'red' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_red_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_red_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'green' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_green_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_green_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'blue' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_blue_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_blue_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'alpha' => array(\n\t\t\t\t\t\t'radio' => __('jpicker_tooltips_alpha_radio'),\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_alpha_textbox')\n\t\t\t\t\t),\n\t\t\t\t\t'hex' => array(\n\t\t\t\t\t\t'textbox' => __('jpicker_tooltips_hex_textbox'),\n\t\t\t\t\t\t'alpha' => __('jpicker_tooltips_hex_alpha')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tif (!empty($user_options)) {\n\t\t\t$options = array_merge($options, $user_options);\n\t\t}\n\n\t\t$this->js->addReady('\n\t\t\tjQuery(\\''.$element.'\\').jPicker('.json_encode($options).');\n\t\t');\n\t}", "function add_script_color() {\n\t\t$ids = array();\n\t\tforeach ($this->_fields as $field) {\n\t\t\tif ('color' == $field['type']) {\n\t\t\t\t$ids[] = $field['id'];\n\t\t\t}\n\t\t}\n\t\techo '\n\t\t<script type=\"text/javascript\">\n\t\tjQuery(document).ready(function($){\n\t\t';\n\t\tforeach ($ids as $id) {\n\t\t\techo \"\n\t\t\t$('#picker-$id').farbtastic('#$id');\n\t\t\t$('#select-$id').click(function(){\n\t\t\t\t$('#picker-$id').toggle();\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t\";\n\t\t}\n\t\techo '\n\t\t});\n\t\t</script>\n\t\t';\n\t}", "function register_widget() {\n\t\tregister_widget( 'VIP_Background_Color_Picker_Widget' );\n\t}", "protected function getInput()\n\t{\n require_once 'categorycolorpickertool.php';\n\t\t$html = array();\n\t\t$attr = '';\n \n $db = JFactory::getDBO();\n $query = \"SELECT cat.id, cat.title FROM #__categories as cat WHERE extension='com_content'\";\n $db->setQuery($query);\n $db->query();\n $categories = $db->loadObjectList();\n $i=0;\n foreach($categories as $category)\n {\n $fieldName = \"category_color_\".$category->id;\n $color = new JFormFieldCategorycolorpickertool($fieldName, \"jform_\".$fieldName, \"#FF0000\");\n \n //print_r($color);\n \n $htmlElem = \"<fieldset id='jform_\".$fieldName.\"'>\\n\";\n $htmlElem .= \"<div class='span2'>\".$category->title.\"</div>\\n\";\n $htmlElem .= \"<div class='span2 controls'>\".$color->getInput().\"</div>\\n\";\n $htmlElem .= \"</fieldset>\\n\\n\";\n /*$htmlElem .= '<div class=\"span2\"><span class=\"minicolors minicolors-theme-bootstrap minicolors-swatch-position-left minicolors-swatch-left minicolors-position-right minicolors-focus\">';\n $htmlElem .= '<span class=\"minicolors-swatch\"><span style=\"background-color: rgb(82, 37, 28);\"></span></span>';\n $htmlElem .= '<input type=\"text\" name=\"jform['.$fieldName.']\" id=\"jform_'.$fieldName.'\" value=\"#1\" class=\"minicolors radio btn-group required minicolors-input \" data-position=\"right\" aria-required=\"true\" required=\"required\" size=\"7\" maxlength=\"7\" aria-invalid=\"false\">';\n $htmlElem .= '<span class=\"minicolors-panel minicolors-slider-hue\" style=\"display: inline;\"><span class=\"minicolors-slider\"><span class=\"minicolors-picker\" style=\"top: 146px;\"></span></span><span class=\"minicolors-opacity-slider\"><span class=\"minicolors-picker\"></span></span><span class=\"minicolors-grid\" style=\"background-color: rgb(255, 43, 0);\"><span class=\"minicolors-grid-inner\"></span><span class=\"minicolors-picker\" style=\"top: 102px; left: 100px;\"><span></span></span></span></span></span>';\n $htmlElem .= \"</div><br/>\";*/\n $html[] = $htmlElem;\n }\n //print_r($response);\n \n/*\n\t\t// Initialize some field attributes.\n\t\t$attr .= $this->element['class'] ? ' class=\"' . (string) $this->element['class'] . '\"' : '';\n\n\t\t// To avoid user's confusion, readonly=\"true\" should imply disabled=\"true\".\n\t\tif ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true')\n\t\t{\n\t\t\t$attr .= ' disabled=\"disabled\"';\n\t\t}\n\n\t\t$attr .= $this->element['size'] ? ' size=\"' . (int) $this->element['size'] . '\"' : '';\n\t\t$attr .= $this->multiple ? ' multiple=\"multiple\"' : '';\n\t\t$attr .= $this->required ? ' required=\"required\" aria-required=\"true\"' : '';\n\n\t\t// Initialize JavaScript field attributes.\n\t\t$attr .= $this->element['onchange'] ? ' onchange=\"' . (string) $this->element['onchange'] . '\"' : '';\n\n\t\t// Get the field options.\n\t\t$options = (array) $this->getOptions();\n\n\t\t// Create a read-only list (no name) with a hidden input to store the value.\n\t\tif ((string) $this->element['readonly'] == 'true')\n\t\t{\n\t\t\t$html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id);\n\t\t\t$html[] = '<input type=\"hidden\" name=\"' . $this->name . '\" value=\"' . $this->value . '\"/>';\n\t\t}\n\t\t// Create a regular list.\n\t\telse\n\t\t{\n\t\t\t$html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);\n\t\t}\n */\n\t\treturn implode($html);\n\t}", "function wpcf_fields_colorpicker() {\n return array(\n 'id' => 'wpcf-colorpicker',\n 'title' => __( 'Colorpicker', 'wpcf' ),\n 'description' => __( 'Colorpicker', 'wpcf' ),\n 'validate' => array(\n 'required' => array(\n 'form-settings' => include( dirname( __FILE__ ) . '/patterns/validate/form-settings/required.php' )\n )\n ),\n 'meta_box_js' => array(\n 'wpcf-jquery-fields-colorpicker' => array(\n 'inline' => 'wpcf_fields_colorpicker_render_js',\n ),\n ),\n 'font-awesome' => 'eyedropper',\n );\n}", "function buildColor() {\n\t\t$args = func_get_args();\n\t\tarray_unshift_assoc($args, '-1', 'form_color');\n\t\treturn call_user_func_array(array(&$this, 'buildformelement'), $args);\n\t}", "public function meta_setter() {\n?>\n\n<p>\n\t<label>\n\t\t<?php echo esc_attr( $this->labels['choose'] ); ?>\n\t\t<input type=\"text\" class=\"<?php echo $this->id; ?>-color-picker color-picker-hex\" value=\"#000000\" data-hide=\"false\" />\n\t</label>\n</p>\n\n<?php\n\t}", "private function color_input($color)\n {\n // use color if passed\n if (isset($color)) {\n $this->set_color($color);\n }\n // if no color value then set default\n elseif (!isset($this->hsla)) {\n $this->set_color();\n }\n }", "public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <input type=\"text\" value=\"<?php echo esc_attr( $this->value() ); ?>\" <?php $this->link(); ?> />\n </label>\n <?php\n // The input's value gets set by JS. Don't fill it.\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <div class=\"customize-control-content\">\n <form><input type=\"text\" <?= $default_attr ?> value=\"<?= $this_default ?>\" /></form>\n\n <div class=\"colorpicker\"></div>\n </div>\n </label>\n <?php\n }", "function theme_helper_picker_color_content() {\n $colors=array(\n /* Blue light */\n '002939','003C52','00597C','0078A4','0090CD','00BAFD','00CEFE','6CDFFE','B6EDFE','E8FAFF',\n /* Blue dark */\n '070E44','141666','211585','2E1EAE','4217EE','3653DA','628BFF','97B3FE','C7D9FD','F0F4FF',\n /* Purple */\n '13002D','1C0041','2B0061','380081','4C00A3','6200E5','8A00FB','B05DFC','D6B5FD','F4EAFE',\n /* Mauve */\n '27002E','380045','570066','73008C','9600AD','C400EC','DD00FA','DF56EC','E8A8ED','FEE9FE',\n /* Pink */\n '2E0013','49001B','6D0027','910039','B50044','EF005E','F93B87','FF84AE','FFC2D7','FFEDF3',\n /* Red */\n '470201','6d0708','a2120d','d51a16','f22822','f34a48','f37771','f6a3a0','fbd1d1','fff1f2',\n /* Orange dark */\n '461303','641e06','992a10','cc3c17','f15320','f56f3f','f4936d','f8b79d','fbdbcf','fff5f1',\n /* Orange light */\n '402704','643909','975611','c57219','f49926','f6a340','f7b96c','fad09d','fde7cb','fff8f1',\n /* Yellow dark */\n '422e04','63410c','956914','c48c1f','f6bb2c','f7c041','fad26c','fbdf9e','fdefcc','fefaee',\n /* Yellow light */\n '514f0c','7a7314','b7b024','f2ea33','fdfb4b','fff666','fefa8b','fdfbb0','fdfdd8','fffff2',\n /* Green light */\n '3f400d','5b6312','8b9720','b7c92e','d1e942','deea60','e5f084','eef6ad','f4fbd4','fefef3',\n /* Green dark */\n '1e2d0e','2b4617','416824','568c2d','66ad3a','86cc56','a4d97d','c3e5a8','dae8cb','f7fef5',\n /* Gray */\n '1a1a1a','343434','4d4d4d','666666','808080','9b9b9b','b3b3b3','cccccc','e6e6e6','fafafa',\n /* B&W */\n '000000','ffffff',\n );\n\t$i = 1 ;\n\tforeach($colors as $color){\n\n echo '<div style=\"background-color:#'.$color.';\" data-value=\"'.$color.'\" '.(($color == 'ffffff') ? 'class=\"bordered\"':'').'></div>';\n \t$i++;\n\t}\n}", "public static function color():InputColor {\r\n\t\treturn new InputColor();\r\n\t}", "function colors_generate_settings_form($form, $form_state, $type) {\n colors_include_api();\n $info = module_invoke_all('colors_info');\n if (empty($info[$type])) {\n return;\n }\n\n $info = $info[$type];\n\n $form = colors_load_colorpicker();\n $form['#attached']['css'][] = ctools_attach_css('colors.admin', 'colors');\n $form['#colors_type'] = $type;\n $form['#colors_info'] = $info;\n\n\n $form[$type . '_colors'] = array(\n '#type' => 'item',\n '#title' => t('!title colors', array('!title' => $info['title'])),\n '#description' => $info['long_description'],\n );\n\n $multiple = !empty($info['multiple_function']);\n $repeat = !empty($multiple) ? $info['multiple_function']() : array(NULL => NULL);\n\n foreach ($repeat as $id => $repeat_value) {\n $enabled_type = !empty($multiple) ? $type . '_' . $id : $type;\n $enabled_string = 'colors_' . $enabled_type . '_enabled';\n $enabled = variable_get($enabled_string, FALSE);\n\n $element = array(\n '#type' => 'fieldset',\n '#title' => !empty($multiple) ? $repeat_value->name : t('!title colors', array('!title' => $info['title'])),\n '#collapsible' => TRUE,\n '#collapsed' => !$enabled,\n );\n $element[$enabled_string] = array(\n '#type' => 'checkbox',\n '#title' => $info['short_description'],\n '#default_value' => $enabled,\n );\n foreach ($info['function']($id) as $key => $value) {\n $class = 'colors_' . $type . '_' . $key;\n $colors = colors_get_colors($class, 'colors');\n\n $element[$class] = array(\n '#title' => t($value),\n '#type' => 'textfield',\n '#attributes' => array('class' => array('colorpicker-input')),\n '#default_value' => $colors['background'],\n '#size' => 7,\n '#maxlength' => 7,\n '#states' => array(\n 'visible' => array(\n ':input[name=\"' . $enabled_string . '\"]' => array('checked' => TRUE),\n ),\n ),\n );\n }\n if (!empty($multiple)) {\n $form[$id] = $element;\n }\n else {\n $form['fieldset'] = $element;\n }\n }\n\n $form['actions']['#type'] = 'actions';\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n );\n $form['#submit'][] = 'colors_admin_type_settings_submit';\n\n // Add the additional submission handler, if necessary.\n if (!empty($info['submit'])) {\n $form['#submit'][] = 'colors_admin_' . $type . '_settings_submit';\n }\n\n // Add the additional validation handler, if necessary.\n if (!empty($info['validate'])) {\n $form['#validate'][] = 'colors_admin_' . $type . '_settings_validate';\n }\n\n return $form;\n}", "public static function colorPicker($taxonomy, $term, $name, $title, array $args, $mode = self::MODE_EDIT_AND_NEW)\n {\n $term_id = is_object($term) ? (int)$term->term_id : null;\n $meta_value = $term_id ? Taxonomy_Meta::get($term_id, $name) : '';\n $uniqueId = uniqid('_colorpicker');\n\n if ($term_id): ?>\n\n <?php /* when term is in `edit` mode */ ?>\n <?php if ($mode !== self::MODE_ONLY_NEW): ?>\n <table class=\"form-table\">\n <tr class=\"form-field\">\n <th scope=\"row\"><label for=\"<?php echo esc_attr($name) ?>\"><?php echo $title ?></label></th>\n <td>\n <input\n type=\"text\"\n name=\"taxmeta[<?php echo esc_attr($name) ?>]\"\n id=\"<?php echo $uniqueId ?>\"\n <?php if (array_key_exists('placeholder', $args)): ?>placeholder=\"<?php echo esc_attr($args['placeholder']) ?>\"<?php endif; ?>\n value=\"<?php echo esc_attr($meta_value) ?>\"\n />\n <?php if (!empty($args['description'])): ?>\n <span class=\"description\"><?php echo $args['description'] ?></span>\n <?php endif; ?>\n </td>\n </tr>\n </table>\n <?php endif; ?>\n\n <?php else: ?>\n\n <?php /* when term is in `new` mode */ ?>\n <?php if ($mode !== self::MODE_ONLY_EDIT): ?>\n <div class=\"form-field\">\n <label for=\"tag-description\"><?php echo $title ?></label>\n <input\n type=\"text\"\n name=\"taxmeta[<?php echo esc_attr($name) ?>]\"\n id=\"<?php echo $uniqueId ?>\"\n <?php if (array_key_exists('placeholder', $args)): ?>placeholder=\"<?php echo esc_attr($args['placeholder']) ?>\"<?php endif; ?>\n value=\"<?php echo esc_attr($meta_value) ?>\"\n />\n\n <?php if (!empty($args['description'])): ?>\n <span class=\"description\"><?php echo $args['description'] ?></span>\n <?php endif; ?>\n </div>\n <?php endif; ?>\n\n <?php endif; ?>\n\n <?php /* print javascript inline colorpicker */ ?>\n <?php ob_start(); ?>\n <script type=\"application/javascript\">\n (function ($) {\n 'use strict';\n\n $(document).ready(function () {\n var irisSettings = {};\n\n <?php /* Add colors to iris settings */ ?>\n <?php if (!empty($args['colors'])): ?>\n irisSettings['palettes'] = JSON.parse('<?php echo json_encode($args['colors']) ?>');\n <?php endif; ?>\n\n <?php /* Merge iris settings */ ?>\n <?php if (!empty($args['iris_options'])): ?>\n irisSettings = _.extend(irisSettings, JSON.parse('<?php echo json_encode($args['iris_options']) ?>'));\n <?php endif; ?>\n\n <?php /* attach the iris instance */ ?>\n $('input#<?php echo $uniqueId ?>').iris(irisSettings);\n });\n })(jQuery);\n </script><?php\n $script = ob_get_clean();\n echo trim(preg_replace('#[\\r\\n]+|[\\s]{2,}#', '', $script));\n }", "function mamihockyemisiones_customize_control_js() {\n\twp_enqueue_script( 'color-scheme-control',\n\t\tget_template_directory_uri() . '/js/color-scheme-control.js',\n\t\tarray( 'customize-controls', 'iris', 'underscore', 'wp-util' ),\n\t\t'20141216',\n\t\ttrue );\n\twp_localize_script( 'color-scheme-control', 'colorScheme', mamihockyemisiones_get_color_schemes() );\n}", "public static function colorField($parameters){ }", "protected function render_input() {\n\t\treturn $this->sub_field( array(\n\t\t\t'type' => 'text',\n\t\t\t'only_field' => true,\n\t\t\t'class' => ( $this->has( 'show_input' ) ) ? 'wponion-icon-picker-input' : 'wponion-icon-picker-input hidden',\n\t\t), $this->value(), $this->name() );\n\t}", "public function color();", "public function nova_header_colour_setting() {\n\t\techo \"<input name='nova_header_options[nova_header_colour]' placeholder='#303030' type='text' value='{$this->options['nova_header_colour']}' />\";\n\t}", "function event_carscars_snippet_color_options(&$params)\n\t{\n\techo \"<style>\";\n$rs = DB::Query(\"select * from carsbcolor\");\nwhile( $data = $rs->fetchAssoc() )\n{\n\techo \"[id^=value_color_] option[value='\".$data[\"id\"].\"'] {\n\t\tbackground-color: \".$data[\"rgb\"].\"; \n\t}\";\n}\necho \"</style>\";\n\t;\n}", "public function popup()\n {\n wp_enqueue_script('wp-color-picker');\n wp_enqueue_style('wp-color-picker');\n ?>\n <div id=\"isc-shortcode-popup\" style=\"display: none;\">\n <div class=\"isc-inner\">\n <div class=\"isc-top\">\n <div class=\"isc-menu isc-shortcode-menu\">\n <div class=\"isc-selected\">\n <div class=\"isc-selected-box\">\n <h3><?php _e( 'ヘッドライン' ); ?></h3>\n <p><em><?php _e( 'Add headline image to your page' ); ?></em></p>\n </div>\n <span class=\"toggle\"></span>\n </div>\n <div class=\"isc-select\" style=\"display: none;\">\n <div class=\"isc-select-content\">\n <ul class=\"isc-clear\">\n <li>\n <a href=\"#isc_headline\">\n <h3><?php _e( 'ヘッドライン' ); ?></h3>\n <p><em><?php _e( 'Add headline image to your page' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_heading\">\n <h3><?php _e( '見出し' ); ?></h3>\n <p><em><?php _e( 'Styled heading' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_frame\">\n <h3><?php _e( '画像&背景枠' ); ?></h3>\n <p><em><?php _e( 'Styled image frame' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_service\">\n <h3><?php _e( '説明ボックス' ); ?></h3>\n <p><em><?php _e( 'Service box with title' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_box\">\n <h3><?php _e( 'カラーボックス' ); ?></h3>\n <p><em><?php _e( 'Colored box with caption' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_button\">\n <h3><?php _e( 'ボタン' ); ?></h3>\n <p><em><?php _e( 'Styled button' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_divider\">\n <h3><?php _e( 'Divider' ); ?></h3>\n <p><em><?php _e( 'Content divider' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_spacer\">\n <h3><?php _e( 'Spacer' ); ?></h3>\n <p><em><?php _e( 'Empty space' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_quote\">\n <h3><?php _e( 'Quote' ); ?></h3>\n <p><em><?php _e( 'Blockquote alternative' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_pullquote\">\n <h3><?php _e( 'Pullquote' ); ?></h3>\n <p><em><?php _e( 'Pullquote' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_testimony\">\n <h3><?php _e( 'ボックスコメント' ); ?></h3>\n <p><em><?php _e( 'Box comment' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_highlight\">\n <h3><?php _e( 'ハイライト' ); ?></h3>\n <p><em><?php _e( 'Highlighted text' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_label\">\n <h3><?php _e( 'ラベル' ); ?></h3>\n <p><em><?php _e( 'Styled label' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_fancylink\">\n <h3><?php _e( 'ファンシーリンク' ); ?></h3>\n <p><em><?php _e( 'Fancy link' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_note\">\n <h3><?php _e( 'ノート' ); ?></h3>\n <p><em><?php _e( 'Colored Box' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_message\">\n <h3><?php _e( 'メッセージ' ); ?></h3>\n <p><em><?php _e( 'Colored box for message' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_column\">\n <h3><?php _e( 'Column' ); ?></h3>\n <p><em><?php _e( 'Flexible columns' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_youtube\">\n <h3><?php _e( 'Youtube' ); ?></h3>\n <p><em><?php _e( 'Insert video from Youtube' ); ?></em></p>\n </a>\n </li>\n <li>\n <a href=\"#isc_tweets\">\n <h3><?php _e( 'Tweets' ); ?></h3>\n <p><em><?php _e( 'Recent tweets' ); ?></em></p>\n </a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n <div id=\"isccontent\" class=\"isc-main\">\n <div class=\"isc-inner\">\n <?php\n $this->headlineSetting();\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }", "function __construct($id, $value){\n\t\t$this->id = $id;\n\t\t\n\t\t?>\n <input type=\"text\" value=\"<?php echo $value; ?>\" id=\"<?php echo $id; ?>\" name=\"<?php echo $id; ?>\" style=\"display:none;\"/>\n <div id=\"<?php echo $id; ?>_color_picker\" class=\"ui_color_picker\"></div>\n \n <script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function($){\n\t\t\t\tvar Backend = require(\"./Backend.js\");\n\t\t\t\tvar ColorPicker = Backend.ui.ColorPicker;\n\n\t\t\t\tvar colorPicker = new ColorPicker($(\"#<?php echo $id; ?>_color_picker\"), $(\"#<?php echo $id; ?>\").val(), \"<?php echo $id; ?>\");\n\t\t\t});\n\t\t</script>\n <?php\n\t}", "function initJQueryColorbox() {\n new JQueryColorbox();\n}", "function all_business_edit_category_color($term) {\r\n\twp_register_script('cmsmasters_theme_settings_js', get_template_directory_uri() . '/framework/admin/settings/js/cmsmasters-theme-settings.js', array('jquery', 'farbtastic'), '1.0.0', true);\r\n\t\r\n\twp_localize_script('cmsmasters_theme_settings_js', 'cmsmasters_setting', array( \r\n\t\t'palettes' => \t\t\timplode(',', cmsmasters_color_picker_palettes()) \r\n\t));\r\n\t\r\n\t\r\n\twp_enqueue_script('cmsmasters_theme_settings_js');\r\n\t\r\n\t\r\n\t$t_id = $term->term_id;\r\n\t\r\n\t$term_meta = get_option( \"taxonomy_$t_id\" );\r\n\t\r\n\t?>\r\n\t<tr class=\"form-field\">\r\n\t\t<th scope=\"row\" valign=\"top\">\r\n\t\t\t<label for=\"term_meta[cmsmasters_cat_color]\"><?php esc_html_e('Category Color', 'all-business'); ?></label>\r\n\t\t</th>\r\n\t\t<td>\r\n\t\t\t<input type=\"text\" id=\"term_meta[cmsmasters_cat_color]\" name=\"term_meta[cmsmasters_cat_color]\" value=\"<?php echo (esc_attr($term_meta['cmsmasters_cat_color']) ? esc_attr( $term_meta['cmsmasters_cat_color']) : ''); ?>\" class=\"cmsmasters-color-field\" data-alpha=\"true\" data-reset-alpha=\"true\" />\r\n\t\t</td>\r\n\t</tr>\r\n\t<?php \r\n}", "function resurrect_customize_sanitize_color( $input, $object ) {\n\n\t// Check input against options; use default if empty value not permitted\n\t$output = ctfw_customize_sanitize_single_choice( 'color', $input, ctfw_colors() ); // ctfw_customize_sanitize_single_choice is for radio or single select\n\n\t// Return sanitized, filterable\n\treturn apply_filters( 'resurrect_customize_sanitize_color', $output, $input, $object );\n\n}", "public function generate_color_html( $key = '', $data = array() ) {\n\t if ( empty( $key ) ) {\n $key = $this->setting_key;\n }\n if ( empty( $data ) ) {\n\t $data = $this->setting_data;\n }\n\t\t$defaults = array(\n\t\t\t'disabled' => false,\n\t\t\t'class' => array(),\n\t\t\t'css' => '',\n\t\t\t'placeholder' => '',\n\t\t\t'custom_attributes' => array(),\n\t\t\t'value' => '',\n\t\t\t'is_required' => false,\n 'no_init_class' => false\n\t\t);\n\n\t\t$data = wp_parse_args( $data, $defaults );\n\n\t\tif ( true !== $data['no_init_class'] ) {\n\t\t $data['class'][] = 'builderius-setting-field';\n\t\t}\n\t\tif ( $data['is_required'] ) {\n\t\t\t$data['class'][] = 'builderius-field-required';\n\t\t}\n\t\t$data['class'][] = 'builderius-setting-colorpick';\n\n\t\tob_start();\n\t\t?>\n\t\t<input\n\t\t class=\"<?php echo implode( ' ', array_map( function($el){ return esc_attr( $el ); }, $data['class'] ) ); ?>\"\n\t\t type=\"text\"\n\t\t name=\"<?php echo esc_attr( $key ); ?>\"\n\t\t id=\"builderius-setting-<?php echo esc_attr( $key ); ?>\"\n\t\t style=\"<?php echo esc_attr( $data['css'] ); ?>\"\n\t\t value=\"\"\n\t\t placeholder=\"<?php echo esc_attr( $data['placeholder'] ); ?>\"\n\t\t <?php disabled( $data['disabled'], true ); ?>\n\t\t <?php echo $this->get_custom_attribute_html( $data ); ?> />\n\t\t<?php\n\n\t\treturn ob_get_clean();\n\t}", "function mb_colors_display( $post ) {\n\t//wp_nonce_field( basename( __FILE__ ), 'mb_colors_nonce' );\n\n\n\tif(have_rows('colors', 'options')):\n\t\techo '<p>Click color to copy to clipboard.</p>';\n\t\twhile(have_rows('colors', 'options')): the_row();\n\t\t\techo '<div class=\"color-select clipboard\" style=\"background: '.get_sub_field('color').' \" data-clipboard-text=\"'.get_sub_field('color').'\">'.get_sub_field('label').'</div>';\n\t\tendwhile;\n\telse:\n\t\techo 'Go to <a href=\"/wp-admin/admin.php?page=acf-options\">Options</a> to set brand colors for easy copying.';\n\tendif;\n\n}", "public static function color($name) {\n $formElement = new FormElement();\n\n $formElement->closable(false);\n $formElement->tag('input');\n\n $formElement->type('color');\n $formElement->name($name);\n $formElement->id($name);\n\n $formElement->value(Input::old($name));\n\n return $formElement;\n }", "public function coloralpha(array $args): void\n {\n $field = $this->getSettingFieldObject($args);\n $field->setAttributes(\n array_merge(\n $field->getAttributes(),\n ['class' => ['color-picker'], 'data-alpha-enabled' => 'true']\n )\n );\n $field->setType(FieldTypes::FIELD_TYPE_TEXT);\n $this->text($args);\n }", "public function cfwc_display_custom_field() {\n global $post;\n // Check for the custom field value\n $product = wc_get_product( $post->ID );\n $title = $product->get_meta($this->textfield_id );\n if( $title ) {\n $title = '';//__('');\n // Only display our field if we've got a value for the field title\n printf(\n '<div class=\"cfwc-custom-field-wrapper\"><label for=\"cfwc-title-field\">%s</label><input type=\"text\" id=\"%s\" class=\"cpa-color-picker wp-color-result-text\" name=\"%s\" value=\"\"></div>',\n esc_html( $title ), esc_html($this->formfield_id), esc_html($this->formfield_id)\n );\n }\n }", "function toptal_add_color_picker( $hook ) {\n if($hook == 'settings_page_toptal_social_share') {\n // Add the color picker css file\n wp_enqueue_style( 'wp-color-picker' );\n // Include our custom jQuery file with WordPress Color Picker dependency\n wp_enqueue_script( 'toptal-script-handle', TOPTAL_SS_PLUGIN_DIR_ASSETS_URL . 'js/scripts.js', array( 'wp-color-picker' ), false, true );\n }\n }", "function wp_customizer_add_colorPicker( $wp_customize){\n \n // Add New Section: Colors//\n \n $wp_customize->add_section( 'wp_color_section', array(\n 'title' => 'Header, Footer, & Font Color',\n 'description' => 'Set Colors For Background & Links',\n 'priority' => '40' \n ));\n \n // Add Settings \n \n $wp_customize->add_setting( 'header_bgcolor', array(\n 'default' => '#ffffff', \n ));\n\n $wp_customize->add_setting( 'font_color', array(\n 'default' => '#8e8e8e', \n ));\n \n $wp_customize->add_setting( 'footer_background_color', array(\n 'default' => '#232323', \n ));\n\n $wp_customize->add_setting( 'link_color', array(\n 'default' => '#6c757d', \n ));\n \n $wp_customize->add_setting( 'footer_title_color', array(\n 'default' => '#fff', \n ));\n\n $wp_customize->add_setting( 'button_color', array(\n 'default' => '#000', \n ));\n\n $wp_customize->add_setting( 'button_text_color', array(\n 'default' => '#fff', \n ));\n \n $wp_customize->add_setting( 'social_media_color', array(\n 'default' => '#fff', \n ));\n \n \n // Add Controls// \n \n \n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_bgcolor', array(\n 'label' => 'Header Background',\n 'section' => 'wp_color_section',\n 'settings' => 'header_bgcolor'\n )));\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'font_color', array(\n 'label' => 'Header Font Color',\n 'section' => 'wp_color_section',\n 'settings' => 'font_color'\n )));\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_background_color', array(\n 'label' => 'Footer Background Color',\n 'section' => 'wp_color_section',\n 'settings' => 'footer_background_color'\n )));\n \n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(\n 'label' => 'Footer Link Color',\n 'section' => 'wp_color_section',\n 'settings' => 'link_color'\n )));\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_title_color', array(\n 'label' => 'Footer Title Color',\n 'section' => 'wp_color_section',\n 'settings' => 'footer_title_color'\n )));\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'button_color', array(\n 'label' => 'Button Color',\n 'section' => 'wp_color_section',\n 'settings' => 'button_color'\n )));\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'button_text_color', array(\n 'label' => 'Button Text Color',\n 'section' => 'wp_color_section',\n 'settings' => 'button_text_color'\n )));\n\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'social_media_color', array(\n 'label' => 'Social Icon Color',\n 'section' => 'wp_color_section',\n 'settings' => 'social_media_color'\n )));\n}", "function form($instance){\n\t\t$defaults = array('instamojo_url' => '', 'type' => true);\n\t\t$instance = wp_parse_args((array)$instance, $defaults);\n\t\t?>\n\t\t<script type='text/javascript'> \n \t\tjQuery(document).ready(function($) { \n \t$('.my-color-picker').wpColorPicker(); \n \t\t}); \n\t\t</script> \n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title');?>\">Widget Title:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id('title');?>\" \n\t\t\t\tname=\"<?php echo $this->get_field_name('title');?>\"\n\t\t\t\tvalue=\"<?php echo $instance['title'];?>\"\n\t\t\tstyle=\"width:100%\"/>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('instamojo_url');?>\">Instamojo Offer URL:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id('instamojo_url');?>\" \n\t\t\t\tname=\"<?php echo $this->get_field_name('instamojo_url');?>\"\n\t\t\t\tvalue=\"<?php echo $instance['instamojo_url'];?>\"\n\t\t\tstyle=\"width:100%\"/>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('button_pos'); ?>\"><?php _e('Button Position:'); ?></label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('button_pos'); ?>\" name=\"<?php echo $this->get_field_name('button_pos'); ?>\">\n\t\t\t\t<option value=\"top\" <?php if($instance['button_pos'] == 'top') echo 'selected=\"selected\"';?>>Top</option>\n\t\t\t\t<option value=\"bottom\" <?php if($instance['button_pos'] == 'bottom') echo 'selected=\"selected\"';?>>Bottom</option>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('type'); ?>\"><?php _e('Button type:'); ?></label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('type'); ?>\" name=\"<?php echo $this->get_field_name('type'); ?>\">\n\t\t\t\t<option value=\"small\" <?php if($instance['type'] == 'small') echo 'selected=\"selected\"';?>>Small button</option>\n\t\t\t\t<option value=\"large\" <?php if($instance['type'] == 'large') echo 'selected=\"selected\"';?>>Large button</option>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('text-color');?>\">Text Color:</label>\n\t\t\t<input class=\"my-color-picker\" id=\"<?php echo $this->get_field_id('text-color');?>\" \n\t\t\t\tname=\"<?php echo $this->get_field_name('text-color');?>\"\n\t\t\t\tvalue=\"<?php echo $instance['text-color'];?>\"\n\t\t\tstyle=\"width:100%\"/>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('bg-color');?>\">Background Color:</label>\n\t\t\t<input class=\"my-color-picker\" id=\"<?php echo $this->get_field_id('bg-color');?>\" \n\t\t\t\tname=\"<?php echo $this->get_field_name('bg-color');?>\"\n\t\t\t\tvalue=\"<?php echo $instance['bg-color'];?>\"\n\t\t\tstyle=\"width:100%\"/>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('button-color');?>\">Button Color:</label>\n\t\t\t<input class=\"my-color-picker\" id=\"<?php echo $this->get_field_id('button-color');?>\" \n\t\t\t\tname=\"<?php echo $this->get_field_name('button-color');?>\"\n\t\t\t\tvalue=\"<?php echo $instance['button-color'];?>\"\n\t\t\tstyle=\"width:100%\"/>\n\t\t</p>\n\t\t<?php\n\t}", "public function color($name, $value = null, $options = [])\n {\n return $this->input('color', $name, $value, $options);\n }", "public function render($name, $value = null, $attributes = array(), $errors = array()) {\n // This can be done better, of course\n // We check if the user have set for this specific widget its own specific values\n // Or we are using the defaults one from the config.yml\n $maxlength = ($this->getAttribute('maxlength')) ? $this->getAttribute('maxlength') : $this->getOption('default_maxlength');\n $size = ($this->getAttribute('size')) ? $this->getAttribute('size') : $this->getOption('default_maxlength');\n if ($style = $this->getAttribute('style')) {\n if (!strpos($style, 'width')) {\n $style .= 'width: '. $this->getOption('widget_width'). ';';\n }\n } else $style = 'width: '.$this->getOption('widget_width').';'; \n if ($this->getOption('show_elements') == 'color') $this->setOption ('type', 'hidden');\n \n // This is HTML code to render input field\n $input = parent::render($name, $value, array_merge($attributes, array_merge($attributes, array(\"maxlength\"=>$maxlength, \"size\"=>$size, \"style\"=>$style))), $errors);\n // This is HTML code to render colored box -> see provided CSS file\n $colorSelector = ($this->getOption('show_elements') == 'input') ? '' : '<div class=\"colorSelector\"><div></div></div>';\n \n \n // This could be nice if we can use Front layout helper :) but, we have to hard code HTML\n return sprintf('\n <div class=\"dmColorPickerPlugin sfWidgetFormColorPicker\">\n %s %s\n </div>', $input, $colorSelector);\n // Note sfWidgetFormColorPicker class -> we use that for the javascript to select the container and other elements inside\n }", "public function highlightSetting()\n {\n ?>\n <div class=\"isc-main-title\">\n <h3><?php _e( 'Highlight Setting' ); ?></h3>\n </div>\n <div class=\"isc-main-content\">\n <form class=\"isc-form\" action=\"\" method=\"post\">\n <table class=\"form-table\">\n <tbody>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-bgcolor\"><?php _e( 'Background Color' ); ?></label>\n </th>\n <td>\n <input type=\"text\" class=\"isc-color-picker\" name=\"isc_bgcolor\" id=\"isc-input-bgcolor\" value=\"#000000\" />\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-color\"><?php _e( 'Text Color' ); ?></label>\n </th>\n <td>\n <input type=\"text\" class=\"isc-color-picker\" name=\"isc_color\" id=\"isc-input-color\" value=\"#ffffff\" />\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-content\"><?php _e( 'Content' ); ?></label>\n </th>\n <td>\n <textarea id=\"isc-input-content\" name=\"isc_content\"></textarea>\n </td>\n </tr>\n </tbody>\n </table>\n <?php \n $this->buttonInsert( 'highlight' );\n ?>\n </form>\n </div>\n <?php\n }", "function colorize($value) {\n /** @todo enable this when new manialive version is out && problem with maniascript elements are sorted out! */\n \n /*\n $outval = $value;\n if (strlen($value) == 4) {\n $val = substr($value, 3, 1); \n $this->quad->setOpacity(floatval(intval($val, 16)/16));\n $outval = substr($value, 0, 3);\n }\n $this->quad->setModulateColor($outval); */\n \n $this->label->setFocusAreaColor1($value);\n }", "public static function create_input($data) {\n\n $class = '';\n if($data['name'] == 'input_color' || $data['name'] == 'output_color'){\n $class = \"color-input\";\n }\n\n printf(\n '<input type=\"text\" id=\"'.$data['name'].'\" \n name=\"icr_option['.$data['name'].']\" \n class=\"regular-text '.$class.' code\" value=\"%s\" /><p>%s</p>',\n isset($data['options']->options[$data['name']]) ? \n esc_attr($data['options']->options[$data['name']]):$data['default'],\n $data['desciption']\n );\n\n }", "public function after_setup_theme() {\n\t\t$color_input_id = $this->get_parent()->get_field_id() . '_color';\n\t\t$color_input_value = '#000000';\n\n\t\tif ( $this->get_parent()->get_data() && isset( $this->get_parent()->get_data()['color'] ) ) {\n\t\t\t$color_input_value = $this->get_parent()->get_data()['color'];\n\t\t}\n\n\t\t$this->setting_color->localize_script( $color_input_id, $color_input_value );\n\t}", "public function colors();", "public function form( $term, $taxonomy )\r\n\t{\r\n\t\ttify_control_colorpicker(\r\n\t\t\tarray(\r\n\t\t\t\t'name'\t\t=> 'tify_meta_term[_color]',\r\n\t\t\t\t'value'\t=> get_term_meta( $term->term_id, '_color', true ),\r\n\t\t\t\t'options'\t=> array(\r\n\t\t\t\t\t'showInput'\t=> true\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t}", "function setup_Form_html()\n\t\t\t{\n\t\t\t\tif ( $this->palette ){\n\t\t\t\t\t$html = mnml_optioncomponent_color( $this->name, array('palette'=>$this->palette) );\n\t\t\t\t} else {\n\t\t\t\t\t$html = mnml_optioncomponent_color( $this->name );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->form_html = $html;\n\t\t\t}", "function wpa82718_scripts() {\n wp_enqueue_style( 'wp-color-picker' );\n wp_enqueue_style( 'super-color-picker.css', MY_PLUGIN_PATH . '/includes/super-color-picker.css' );\n \n //Enqueuing JS\n wp_enqueue_script( 'wp-color-picker' ); \n wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );\n wp_enqueue_script(\n 'wp-color-picker',\n admin_url( 'js/color-picker.min.js' ),\n array( 'iris' ),\n false,\n 1\n );\n $colorpicker_l10n = array(\n 'clear' => __( 'Clear' ),\n 'defaultString' => __( 'Default' ),\n 'pick' => __( 'Select Color' ),\n 'current' => __( 'Current Color' ),\n );\n wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', $colorpicker_l10n ); \n\n wp_enqueue_script( 'cpa-color-picker', plugins_url('../custom-script.js', __FILE__), array('jquery','wp-color-picker'), '', true );\n}", "function _hrb_customize_color_scheme( $wp_customize ) {\n\tglobal $hrb_options;\n\n\t$wp_customize->add_setting( 'hrb_options[color]', array(\n\t\t'default' => $hrb_options->color,\n\t\t'type' => 'option'\n\t) );\n\n\t$wp_customize->add_control( 'hrb_color_scheme', array(\n\t\t'label' => __( 'Color Scheme', APP_TD ),\n\t\t'section' => 'colors',\n\t\t'settings' => 'hrb_options[color]',\n\t\t'type' => 'radio',\n\t\t'choices' => hrb_get_color_choices(),\n\t) );\n}", "function wp_ajax_save_user_color_scheme()\n{\n}", "public static function color($args) {\r\n echo \"<div class='relative'>\";\r\n echo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='\".$args['name'].\"' class=\\\"picker field\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . self::placeholder('None') . \"' name='\" . $args['name'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n echo \"<div id='\" . $args['name'] . \"_picker' class='picker' style=''></div>\";\r\n echo self::description($args['description']); // print a description if there is one\r\n echo \"</div>\";\r\n }", "public function getColor();", "public function getColor();", "public function get_control_render();", "function wp_enqueue_color_picker( ) {\n global $wp_version;\n \n //If the WordPress version is greater than or equal to 3.5, then load the new WordPress color picker.\n if ( 3.5 <= $wp_version ){\n \t//Both the necessary css and javascript have been registered already by WordPress, so all we have to do is load them with their handle.\n \twp_enqueue_style( 'wp-color-picker' );\n \twp_enqueue_script( 'wp-color-picker' );\n }else{\n //As with wp-color-picker the necessary css and javascript have been registered already by WordPress, so all we have to do is load them with their handle.\n \twp_enqueue_style( 'farbtastic' );\n wp_enqueue_script( 'farbtastic' );\n }\n //Load our custom javascript file\n wp_enqueue_script( 'wp-color-picker-script', get_template_directory_uri() . '/js/colorpicker.js', array( 'wp-color-picker' ), false, true ); \n}", "function html_color($val, $encoding = 'hex') {\n if(!strlen(trim($val))) return '';\n echo(\"val=$val<br>\");\n switch ($encoding) {\n case 'hex':\n return \"#\".$val;\n default: \n return '';\n } \n}", "function mw_enqueue_color_picker( $hook_suffix ) {\n // first check that $hook_suffix is appropriate for your admin page\n wp_enqueue_style( 'wp-color-picker' );\n wp_enqueue_script( 'admin-script', plugins_url('lb-admin-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );\n}", "public function getColor($input, $opacity = 1) {\n\t\tif (!is_numeric($opacity)) {\n\t\t\t$this->addError(\"Opacity value (second parameter) is not a number. Entered value '\" . $opacity . \"'.\");\n\t\t} elseif ($opacity > 1 || $opacity < 0) {\n\t\t\t$this->addError(\"Opacity value (second parameter) must be in <0;1> range. Entered value '\" . $opacity . \"'.\");\n\t\t} elseif (is_array($input)) {\n\t\t\t$this->addError(\"Input (first parameter) must be number or string, array detected.\");\n\t\t}\n\n\t\t// initialization\n\t\tif (!$this->inicializationCompleted) {\n\t\t\t$this->inicializationCompleted = true;\n\n\t\t\t$minimumDifference = 0.2;\n\t\t\tif ($this->lightnessMax - $this->lightnessMin < $minimumDifference) {\n\t\t\t\t$this->addError(\"Difference between maximum and minimum lightness must be at least \" . $minimumDifference . \". Entered values: max '\" . $this->lightnessMax . \"', min '\" . $this->lightnessMin . \"', difference \" . ($this->lightnessMax - $this->lightnessMin) . \".\");\n\t\t\t}\n\n\t\t\tif ($this->lightnessMin !== 0 || $this->lightnessMax !== 1) {\n\t\t\t\t$this->CIEDE2000 = $this->removeColorsOutsideLightnessSettings($this->lightnessMin, $this->lightnessMax, $this->CIEDE2000);\n\t\t\t}\n\n\t\t\tif ($this->maximumColors) {\n\t\t\t\t$this->CIEDE2000 = $this->limitNumberOfUsedColors($this->maximumColors, $this->CIEDE2000);\n\t\t\t}\n\n\t\t\t$this->numberOfColors = count($this->CIEDE2000);\n\t\t}\n\n\t\t// debugging and error displaying\n\t\tstatic $errorsPrinted = false;\n\t\t\n\t\tif ($this->debuggingEnabled && !$errorsPrinted && $this->errorsDetected){\n\t\t\t// prevents displaying more than one error message if there are more instances of PHPAutoColor class\n\t\t\t$this->displayErrors($this->errors);\n\t\t\t$errorsPrinted = true;\n\t\t}\n\n\t\tif ($this->errorsDetected) {\n\t\t\t// if there are any errors detected, returns empty string\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$input = (string)$input;\n\n\t\t// assigning color to entered number\n\t\tif (isset($this->inputsWithAssignedColors[$input])) {\n\t\t\t$color = $this->inputsWithAssignedColors[$input];\n\t\t} else {\n\t\t\tswitch ($this->colorPickingMethod) {\n\t\t\t\tcase 'random':\n\t\t\t\t\t$color = dechex(mt_rand(0, 0xFFFFFF));\n\t\t\t\t\t$color = $this->addLeadingZeros($color);\n\n\t\t\t\t\t$this->inputsWithAssignedColors[$input] = $color;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dynamic\":\n\t\t\t\t\t$color = $this->CIEDE2000[$this->usedColors%$this->numberOfColors];\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dynamic-random\":\n\t\t\t\t\t$color = $this->CIEDE2000[mt_rand(0, $this->numberOfColors - 1)];\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"static\":\n\t\t\t\t\t$inputAdjusted = $input;\n\t\t\t\t\tif ((int)$input != $input) {\n\t\t\t\t\t\t$inputAdjusted = abs(crc32($input)); // transfers input to integer\n\t\t\t\t\t}\n\n\t\t\t\t\t$color = $this->CIEDE2000[$inputAdjusted%$this->numberOfColors];\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$this->usedColors++;\n\t\t\t$this->inputsWithAssignedColors[$input] = $color;\n\t\t}\n\n\t\t// transforming color to desired color type\n\t\tswitch ($this->colorType) {\n\t\t\tcase 'hex':\n\t\t\t\t$color = \"#\" . $this->shortenHex($color);\n\t\t\t\tbreak;\n\t\t\tcase 'rgb':\n\t\t\tcase 'rgba':\n\t\t\t\t$colorRGB = array();\n\t\t\t\tfor ($i = 0; $i < 3; $i++) { \n\t\t\t\t\t$colorRGB[] = hexdec(substr($color, $i * 2, 2));\n\t\t\t\t}\n\n\t\t\t\tif ($this->colorType === \"rgba\") {\n\t\t\t\t\t$opacity = \",\" . $opacity;\n\t\t\t\t} else {\n\t\t\t\t\t$opacity = \"\";\n\t\t\t\t}\n\t\t\t\t$color = $this->colorType . \"(\" . implode(\",\", $colorRGB) . $opacity . \")\";\n\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t}\n\n\t\treturn $color;\n\t}", "public function color()\n {\n }", "public function color()\n {\n }", "function udesign_icon_fonts_color_picker( ) {\r\n\twp_enqueue_style( 'wp-color-picker' );\r\n\twp_enqueue_script( 'wp-color-picker' );\r\n\r\n\tglobal $wp_scripts;\r\n\twp_enqueue_script( 'jquery-ui-core' );\r\n\twp_enqueue_script( 'jquery-ui-slider' );\r\n\t// Get the jquery ui object.\r\n\t$queryui = $wp_scripts->query( 'jquery-ui-core' );\r\n\t// Load the jquery ui theme.\r\n\t$scheme = is_ssl() ? 'https://' : 'http://';\r\n\t$url = $scheme . \"code.jquery.com/ui/\".$queryui->ver.\"/themes/flick/jquery-ui.min.css\";\r\n\twp_enqueue_style( 'jquery-ui-smoothness', $url, false, null );\r\n}", "function drawInputBox($type, $name, $label, $value_array, $additional_class = '') {\n $value = $value_array[$name];\n if ($_SERVER['REQUEST_METHOD'] == 'POST')\n $value = $_POST[$name];\n\n if ($type == 'password') {\n $value = '';\n }\n ?>\n <div class=\"\">\n <div class=\"col-xs-12\">\n <label class=\"control-label\"><?php echo $label; ?></label>\n <input class=\"form-control <?php echo $additional_class; ?>\" placeholder=\"\" type=\"<?php echo $type; ?>\" name=\"<?php echo $name; ?>\" value=\"<?php echo htmlspecialchars(stripslashes($value)); ?>\">\n </div>\n </div>\n <?php\n}", "function pickColor($s) {\n\tglobal $ghFieldColors;\n\n\t$aColors = array_values($ghFieldColors);\n\t$len = count($aColors);\n\t$i = (strlen($s)+ord($s)) % $len; // pick a repeatable but random number based on the string\n\t\n\treturn $aColors[$i];\n}", "public static function make(string $name = null, string $label = null) : ColorPickerField\n {\n return new self($name, $label);\n }", "function render_field_settings( $field ) {\n\n\t\t\t/*\n\t\t\t* acf_render_field_setting\n\t\t\t*\n\t\t\t* This function will create a setting for your field. Simply pass the $field parameter and an array of field settings.\n\t\t\t* The array of settings does not require a `value` or `prefix`; These settings are found from the $field array.\n\t\t\t*\n\t\t\t* More than one setting can be added by copy/paste the above code.\n\t\t\t* Please note that you must also have a matching $defaults value for the field name (color_picker_palette)\n\t\t\t*/\n\n\t\t\t$field['choices'] = acf_encode_choices( $field['choices'] );\n\n\t\t\tacf_render_field_setting( $field, array(\n\t\t\t\t'label' => __( 'Color Options', 'acf-color-picker-palette' ),\n\t\t\t\t'instructions' => __( 'Enter each choice on a new line.', 'acf-color-picker-palette' ) . '<br /><br />' . __( 'For more control, you may specify both a value and label like this:', 'acf-color-picker-palette' ) . '<br /><br />' . __( 'black : #000', 'acf-color-picker-palette' ),\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'name' => 'choices',\n\t\t\t) );\n\n\t\t\tacf_render_field_setting( $field, array(\n\t\t\t\t'label' => __( 'Allow Custom', 'acf-color-picker-palette' ),\n\t\t\t\t'name' => 'allow_custom',\n\t\t\t\t'default_value' => 1,\n\t\t\t\t'type' => 'true_false',\n\t\t\t\t'ui' => 1,\n\t\t\t\t'message' => __( 'Allow \\'custom\\' colors to be added', 'acf-color-picker-palette' ),\n\t\t\t) );\n\n\t\t}", "function hrb_get_color_choices() {\n\n\t$color_choices = array(\n\t\t'modern' => __( 'Bee Modern (default)', APP_TD ),\n\t\t'green' => __( 'Bee Green', APP_TD ),\n\t\t'water' => __( 'Bee Water', APP_TD ),\n\t\t'urban' => __( 'Bee Urban', APP_TD ),\n\t\t'dark' => __( 'Bee Dark', APP_TD ),\n\t);\n\n\treturn apply_filters( 'hrb_color_choices', $color_choices );\n}", "function setColorCode( $value ) {\n $options = get_option( WL_OPTIONS_NAME );\n $options[WL_CONFIG_ENABLE_COLOR_CODING_ON_FRONTEND_NAME] = $value;\n update_option( WL_OPTIONS_NAME, $options );\n }", "function wp_content_module_overlay() {\n add_meta_box(\"wp_content_module_overlay\", \"Module Overlay Options\", \"wp_content_module_overlay_markup\", \"module\", \"normal\", \"high\", null);\n\n // Markup\n function wp_content_module_overlay_markup() {\n // WP Nonce Hook (required)\n wp_nonce_field(basename(__FILE__), \"_wp_content_module_nonce\");\n\n // Get all available or previsouly set meta data\n $meta = get_post_meta(get_the_ID());\n // For each entry get the value if available\n foreach ( $meta as $key => $value ) {\n ${$key} = $value[0];\n }\n\n // Start input markup\n ?>\n <script>\n jQuery(document).ready(function($){\n $('.color-picker').wpColorPicker();\n });\n </script>\n <div class=\"wp-module--overlay clearfix\">\n <!-- Module Overlay Color 1 -->\n <div class=\"wp-module--meta-field\">\n <div class=\"wp-module--meta-field-label\">\n <p>Module Overlay Color 1</p>\n </div>\n <div class=\"wp-module--meta-field-input\">\n <?php wp_content_module_text_input('_module_overlay_color_1', 'color-picker', isset($_module_overlay_color_1) ? $_module_overlay_color_1 : null); ?>\n <p class=\"wp-module--meta-field-desc\">First color option for color overlay</p>\n </div>\n </div>\n <!-- Module Overlay Color 1 -->\n <div class=\"wp-module--meta-field\">\n <div class=\"wp-module--meta-field-label\">\n <p>Module Overlay Color 2</p>\n </div>\n <div class=\"wp-module--meta-field-input\">\n <?php wp_content_module_text_input('_module_overlay_color_2', 'color-picker', isset($_module_overlay_color_2) ? $_module_overlay_color_2 : null); ?>\n <p class=\"wp-module--meta-field-desc\">Select a second overlay color to create a gradient<br />(leave blank to use <b>Overlay Color 1</b> for a solid color overlay)</p>\n </div>\n </div>\n <!-- Module Overlay Opacity -->\n <div class=\"wp-module--meta-field\">\n <div class=\"wp-module--meta-field-label\">\n <p>Module Overlay Opacity</p>\n </div>\n <div class=\"wp-module--meta-field-input\">\n <?php\n // Set dropdown options\n $opacity_options = array(\n null => \"None\",\n \"90\" => \"90%\",\n \"80\" => \"80%\",\n \"70\" => \"70%\",\n \"60\" => \"60%\",\n \"50\" => \"50%\",\n \"40\" => \"40%\",\n \"30\" => \"30%\",\n \"20\" => \"20%\",\n \"10\" => \"10%\",\n );\n // Render dropdown options\n wp_content_module_select_input('_module_overlay_opacity', $opacity_options, isset($_module_overlay_opacity) ? $_module_overlay_opacity : null);\n ?>\n <p class=\"wp-module--meta-field-desc\">Select the opacity of the overlay color/gradient (default is 100%, no opacity)</p>\n </div>\n </div>\n <!-- Module Overlay Direction -->\n <div class=\"wp-module--meta-field\">\n <div class=\"wp-module--meta-field-label\">\n <p>Module Overlay Direction</p>\n </div>\n <div class=\"wp-module--meta-field-input\">\n <?php\n // Set dropdown options\n $direction_options = array(\n null => \"Auto\",\n \"left\" => \"Left\",\n \"right\" => \"Right\",\n \"top\" => \"Top\",\n \"bottom\" => \"Bottom\",\n );\n // Render dropdown options\n wp_content_module_select_input('_module_overlay_direction', $direction_options, isset($_module_overlay_direction) ? $_module_overlay_direction : null);\n ?>\n <p class=\"wp-module--meta-field-desc\">Select the overlay gradient direction. Gradient flows from <b>Overlyay Color 1</b> to <b>Overlay Color 2</b></p>\n </div>\n </div>\n </div>\n <?php }\n}", "public function colorField($value) {\n return $this->setProperty('colorField', $value);\n }", "function my_custom_load() { \n wp_enqueue_style('wp-color-picker'); \n wp_enqueue_script('wp-color-picker'); \n }", "function _style_manager_jsform_hsl($variables) {\r\n $out = array();\r\n $data = $variables['data'];\r\n $options = array(\r\n array('=', '=', '='),\r\n array('+', '+', '+'),\r\n array('-', '-', '-'),\r\n );\r\n $hsl_types = array(\r\n 'hue' => t('Hue'),\r\n 'saturation' => '<span title=\"Saturation\">S</span>',\r\n 'lightness' => '<span title=\"Lightness\">L</span>',\r\n );\r\n foreach ($hsl_types as $type => $title) {\r\n $combo_options = array(\r\n 'id' => $data['id'] . $type . '--0',\r\n 'val' => $data[$type][0],\r\n 'options' => $options,\r\n 'width' => 40,\r\n 'stateful' => FALSE,\r\n );\r\n\r\n if ($type != 'hue') {\r\n $out[] = array(\r\n 'xtype' => 'displayfield',\r\n 'margin' => '0 2px 0 9px',\r\n 'value' => $title . ':',\r\n 'stateful' => FALSE,\r\n );\r\n }\r\n $out[] = _style_manager_field_combo($combo_options);\r\n $out[] = array(\r\n 'xtype' => 'numberfield',\r\n 'name' => $data['id'] . $type . '--1',\r\n 'width' => 60,\r\n 'maxValue' => $type == 'hue' ? 359 : 100,\r\n 'minValue' => 0,\r\n 'allowBlank' => TRUE,\r\n 'value' => $data[$type][1],\r\n 'stateful' => FALSE,\r\n );\r\n }\r\n return $out;\r\n}", "public function getColorCode();", "protected function renderInput()\n {\n $name = $this->_displayOptions['id'];\n Html::addCssClass($this->_displayOptions, 'form-control');\n $input = Html::textInput($name, $this->value, $this->_displayOptions);\n $input .= $this->hasModel() ?\n Html::activeHiddenInput($this->model, $this->attribute, $this->options) :\n Html::hiddenInput($this->name, $this->value, $this->options);\n echo $input;\n }", "function mw_enqueue_color_picker( $hook_suffix ) {\n wp_enqueue_style( 'wp-color-picker' );\n wp_enqueue_script( 'my-script-handle', plugins_url('my-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );\n}", "function sc_settings_field_cb( $args ){\n\n // Get the value of the registered setting\n // $option_name from register_setting()\n $options = get_option( 'sc_settings_options' );\n // output the field\n ?>\n <input id=\"<?php echo esc_attr( $args['label_for'] ); ?>\"\n type=\"text\"\n data-custom=\"<?php echo esc_attr( $args['sc_settings_custom_data'] ); ?>\"\n name=\"sc_settings_options[<?php echo esc_attr( $args['label_for'] ); ?>]\">\n\n <p class=\"description\">\n <?php esc_html_e( 'Enter a valid Googgle Map AP.', 'sc' ); ?>\n </p>\n <?php\n}", "function adrotate_colorpicker() {\n \twp_enqueue_style( 'farbtastic' );\n \twp_enqueue_script( 'farbtastic' );\n}", "public function render_content()\n {\n $default = isset($this->setting->default) ? $this->setting->default : '';\n\n\n ?>\n <div class=\"yatri-icon-picker-control\">\n <?php\n $this->field_header();\n ?>\n <div class=\"yatri-icon-picker-control-field\">\n <span class=\"icon-show <?php echo esc_attr($this->value()) ?>\"></span>\n <input type=\"text\"\n id=\"<?php echo esc_attr($this->id); ?>\"\n name=\"<?php echo esc_attr($this->id); ?>\"\n value=\"<?php echo esc_attr($this->value()); ?>\"\n class=\"customize-control-icon-picker-value\" <?php $this->link(); ?>\n placeholder=\"Click here to pick an icon\"\n readonly\n />\n <span class=\"icon-clear dashicons dashicons-trash\"></span>\n\n <?php\n $this->picker();\n ?>\n </div>\n\n </div>\n <?php\n }", "public function render_container_classes_field() {\n\t\t?>\n\t\t<input\n\t\t\tstyle=\"width: 600px; height: 40px;\"\n\t\t\tname=\"coral_talk_container_classes\"\n\t\t\tplaceholder=\"\"\n\t\t\tid=\"coral_talk_container_classes\"\n\t\t\ttype=\"text\"\n\t\t\tvalue=\"<?php echo esc_attr( get_option( 'coral_talk_container_classes' ) ); ?>\"\n\t\t/>\n\t\t<?php\n\t}", "protected function form()\n {\n return Admin::form(Color::class, function (Form $form) {\n $style = new Style();\n $style = $style->all()->mapWithKeys(function ($item) {\n return [$item['id'] => $item['name']];\n });\n $form->display('id', 'ID');\n $form->text('name', '颜色名称');\n $form->color('value', '颜色')->default('#ff69b3');\n $form->select('style_id', '款式')->options($style);\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }" ]
[ "0.7426354", "0.7152844", "0.6959532", "0.6885358", "0.67705196", "0.6694915", "0.6682407", "0.66363466", "0.6558079", "0.653321", "0.6475488", "0.6442951", "0.64293885", "0.6412754", "0.6327765", "0.63069046", "0.6271035", "0.623082", "0.6204317", "0.61759895", "0.6153689", "0.6093006", "0.6043631", "0.5979463", "0.5964632", "0.5934741", "0.58466697", "0.5785244", "0.5783052", "0.57814276", "0.5762711", "0.5733623", "0.5731959", "0.57274675", "0.5707469", "0.56939393", "0.56838936", "0.5678709", "0.5616846", "0.55928355", "0.557187", "0.55283934", "0.552559", "0.5477096", "0.5468901", "0.54266685", "0.54262626", "0.53939015", "0.5377006", "0.53753686", "0.53745115", "0.5356108", "0.5352101", "0.5327068", "0.53267777", "0.53188854", "0.5277944", "0.52747583", "0.52746475", "0.52653956", "0.5245484", "0.52262235", "0.5225859", "0.52153623", "0.519966", "0.516908", "0.5168795", "0.51668257", "0.5163087", "0.51544094", "0.514724", "0.5133185", "0.51240367", "0.51240367", "0.50975317", "0.5092355", "0.5077832", "0.5048392", "0.50473535", "0.50469774", "0.50469774", "0.50448346", "0.5041486", "0.50407916", "0.5013995", "0.50133944", "0.50054896", "0.4991428", "0.4987708", "0.4979535", "0.49460283", "0.49438956", "0.49326912", "0.49325296", "0.49269646", "0.49188292", "0.49123874", "0.49096793", "0.49009517", "0.49002004" ]
0.7244195
1
Get auto incremented field
Получить поле с автоматическим увеличением
public function getAutoIncrementedField() { return $this->autoIncrementedField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAutoIncrementField(){\n\t\tforeach (array_keys($this->keys()) as $field){\n\t\t\tif (strtolower($this->_fields[$field]['Extra']) == 'auto_increment'){\n\t\t\t\treturn $field;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function fieldAutoIncrement();", "public function getAutoIncrement()\r\n\t{\r\n\t\treturn $this->auto_increment;\r\n\t}", "public function getAutoIncrement()\r\n {\r\n $connection = Yii::app()->db;\r\n $command = $connection->createCommand(\"SHOW TABLE STATUS LIKE '\" . get_called_class() . \"'\");\r\n $row = $command->queryRow();\r\n $nextId = 'PAM' . $row['Auto_increment'];\r\n\r\n return $nextId;\r\n }", "public function getAutoincrement()\n\t{\n\t\treturn $this->getPrimaryKey();\n\t}", "public function getAutoIncId();", "public function autoIncName() {\n\t\treturn $this->_auto_inc;\n\t}", "public function getAutoIncKeyName();", "public function getIncrementId();", "public static function primary_key_field() \n\t\t{\n\t\t\treturn static::$db_fields[0];\n\t\t}", "function aaNextTicketAutoInc()\n{\n\n global $pdo_conn, $pdo, $pdo_t;\n $sql_aid = \"SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '\" . $pdo['db'] . \"' AND TABLE_NAME = '\" . $pdo_t['t_ticket'] . \"'\";\n $q_aid = $pdo_conn->prepare($sql_aid);\n $q_aid->execute();\n $f_aid = $q_aid->fetch();\n return $f_aid[\"AUTO_INCREMENT\"];\n\n}", "public function getAutoIncrement()\n\t\t{\n\t\t\treturn 'cfe_action_id';\n\t\t}", "public function getId_inc()\r\n {\r\n return $this->id_inc;\r\n }", "function aaNextTicketUpdateAutoInc()\n{\n\n global $pdo_conn, $pdo, $pdo_t;\n $sql_aid = \"SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '\" . $pdo['db'] . \"' AND TABLE_NAME = '\" . $pdo_t['t_ticket_updates'] . \"'\";\n $q_aid = $pdo_conn->prepare($sql_aid);\n $q_aid->execute();\n $f_aid = $q_aid->fetch();\n return $f_aid[\"AUTO_INCREMENT\"];\n\n}", "public function get_pk_field() {\n return $this->module['pk_field'];\n }", "public function getAuto_id()\n {\n return $this->auto_id;\n }", "public function autoInc() {\n $cols = $this->getColumnsByProperty('auto_inc',true);\n if (!empty($cols)) {\n return $cols[0];\n }\n return false;\n }", "public function get_auto_id() { return $this->connection->insert_id; }", "public function getNextId()\n {\n $table = $this->db->exec(\"SHOW TABLE STATUS LIKE '{$this->tableName}'\")->row;\n return $table['Auto_increment'];\n }", "function GetAutoincrement($field)\n {\n $records=$this->GetRecords();\n $max=0;\n $contrec=0;\n if (is_array($records))\n {\n foreach($records as $rec)\n {\n $contrec++;\n if (isset($rec[$field]) && intval($rec[$field]) > intval($max))\n $max=intval($rec[$field]);\n }\n }\n $this->numrecords=$contrec;\n return $max + 1;\n }", "public function getIDField()\n {\n return $this->idField;\n }", "public function getAutoIncrement() {\n\t\t$query = \" \tSELECT `AUTO_INCREMENT`\n\t\t\t\t\tFROM INFORMATION_SCHEMA.TABLES\n\t\t\t\t\tWHERE TABLE_SCHEMA = 'salys'\n\t\t\t\t\tAND TABLE_NAME = '{$this->country_table}'\";\n\t\t$result = mysql::query($query);\n\t\treturn $result;\n\t}", "public function getIdField(): string;", "private function getIdField() {\n if (!property_exists($this, 'idField')) return 'id';\n return $this->idField;\n }", "public function getAutoIncrement()\n\t\t{\n\t\t\treturn 'cfe_rule_action_id';\n\t\t}", "public function getNextId()\n {\n return (int) $this->db->select('AUTO_INCREMENT')\n ->from('information_schema.TABLES')\n ->where('TABLE_NAME', $this->table)\n ->where('TABLE_SCHEMA', $this->db->database)\n ->get()->row()->AUTO_INCREMENT;\n }", "public function get_future_id()\n {\n $query = $this->db->query(\"SHOW TABLE STATUS LIKE 'item'\");\n\n $row = $query->row(0);\n $value = $row->Auto_increment;\n\n return $value;\n }", "public static function getAutoincrementFields() {\r\n\t\treturn self::$AUTOINCREMENT_FIELDS;\r\n\t}", "public static function getAutoincrementFields() {\n\t\treturn self::$AUTOINCREMENT_FIELDS;\n\t}", "public static function getAutoincrementFields() {\n\t\treturn self::$AUTOINCREMENT_FIELDS;\n\t}", "public static function getAutoincrementFields() {\n\t\treturn self::$AUTOINCREMENT_FIELDS;\n\t}", "public function get_id($field = 'id') {\n\t\n\t\tif (isset($this->propertyArr[$field])) { // already set, id exists\n\t\t\treturn $this->propertyArr[$field];\n\t\t} elseif (!empty($this->modelArr)) { // not set yet, go fetch\n\t\t\t\n\t\t\t// IMPORT: db object\n\t\t\t$db = Db::get_instance();\n\t\t\t\n\t\t\t// GET: next auto id\n\t\t\t$nextIdRes = $db->query('SHOW TABLE STATUS LIKE \\'' . $this->objectTable . '\\'');\n\t\t\t\n\t\t\tif (isset($nextIdRes)) {\n\t\t\t\t\t\n\t\t\t\t$dataRow = $nextIdRes->fetch_assoc();\n\t\t\t\t$nextId = $dataRow['Auto_increment'];\n\t\t\t\treturn $nextId;\n\t\t\t\n\t\t\t} else {\n\t\t\t\ttrigger_error('Object table doesn\\'t exist, or DataObject setting incorrect', E_USER_ERROR);\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\ttrigger_error('Object table doesn\\'t exist, or DataObject setting incorrect', E_USER_ERROR);\n\t\t}\n\t\n\t}", "public function getFieldId() {\n return (int)$this->field_id;\n }", "public function getNextId() \n {\n\n $statement = DB::select(\"show table status like 'products'\");\n\n return $statement[0]->Auto_increment;\n }", "protected function getMysqlAutoIncrement()\n {\n $next = DB::table('INFORMATION_SCHEMA.TABLES')\n ->select('AUTO_INCREMENT')\n ->where([\n 'TABLE_SCHEMA' => config('database.connections.mysql.database'),\n 'TABLE_NAME' => 'users'\n ])->first();\n return $next->AUTO_INCREMENT;\n }", "public function fieldUniqueNumber();", "public function getOrderIncrementId();", "public function getOrderIncrementId();", "public function getIdField() {\n\t\t$idFields = $this->metadata->getIdentifierFieldNames();\n\t\treturn $idFields[0];\n\t}", "public function returnNextID(){\n include '../dbcon/init.php';\n $query = \"SELECT AUTO_INCREMENT \n FROM information_schema.tables\n WHERE table_name = 'ORDERS'\n and table_schema = 'c3518706';\";\n\n $result = $sqli->query($query);\n $row = $result->fetch_assoc();\n $sqli->close();\n return $row['AUTO_INCREMENT'];\n }", "public function getLastIncrementId()\n {\n return $this->object->getLastIncrementId();\n }", "public function getAutoIncrementColumnName()\n {\n foreach ($this->getColumns() as $column) {\n if ($column['isAutoIncrement']) {\n return $column['name'];\n }\n }\n\n return null;\n }", "public function getAutoIncrement()\n\t{\n\t\treturn 'rule_definition_id';\n\t}", "public static function getRecordIdField()\r\n\t{\r\n\t\t// Make sure we are in the Project context\r\n\t\tself::checkProjectContext(__METHOD__);\r\n\t\t// Return the record ID field\r\n\t\tglobal $table_pk;\r\n\t\treturn $table_pk;\r\n\t}", "public function getFieldId()\n {\n return $this->field_id;\n }", "private function get_primary_key( ){\n foreach( $this->table_info['fields'] as $field => $field_info ){\n if( $field_info['Key'] == 'PRI' && $field_info['Extra'] == 'auto_increment' ){\n return $field;\n }\n }\n }", "function primaryKeyField()\n {\n return $this->m_primaryKey[0];\n }", "public function getLastAutoId()\n {\n return mysqli_insert_id($this->_db);\n }", "public function get_id() {\n return $this->get_field( 'ID' );\n }", "function serendipity_db_insert_id() {\n global $serendipity;\n return $serendipity['dbConn']->getDriver()->getConnection()->getLastGeneratedValue();\n}", "private function insert()\n {\n $this->beforeInsert(); \n $sequenceId = $this->getSequenceNextValue();\n $autoincrementId = $this->dbConnection->insert(\n $this->table,\n array_intersect_key($this->activeRecord, array_flip($this->fields()))\n );\n $id = !empty($autoincrementId) ? $autoincrementId : $sequenceId;\n $this->loadRecordAfterInsert($id);\n $this->afterInsert($id);\n return $id;\n }", "function getID() {\n\t\treturn $this->data_array['extra_field_id'];\n\t}", "function getUltimoIdInsertado(){\r\n\t\treturn 0;\r\n\t}", "function getFieldDescription()\r\n\t{\r\n\t\treturn \"INT(6) NOT NULL AUTO_INCREMENT\";\r\n\t}", "public function getNextId()\n {\n return \"CTM\" . sprintf( '%05s', (int) substr( \n ( $this->getMaxId() )->maxColumn, 3, 5 ) + 1\n );\n }", "public function get_pk();", "public function __getUniqueId()\n\t{\n\t\treturn \\App\\Db::getInstance()->getUniqueID('vtiger_field');\n\t}", "public function insertedId();", "public function getIdField() {\r\n return $this -> mIdField;\r\n }", "public static function getNextAutoValue($strTable,$strField) {\n\t\treturn (int)amDB::getOne(\"select max($strField) + 1 as next from $strTable limit 1\");\n\t}", "public function getDbIdField() {\r\n return $this -> mDbIdField;\r\n }", "public function getIdField()\n {\n // You can use the column ID, but it is not recommended by sercurity issue.\n // Then you can use a calculated column with a UUID generated by Springy\\Utils\\UUID::random();\n // return $this->primaryKey;\n return 'uuid';\n }", "public function getPk() {\n\t\treturn 'id';\n\t}", "function views_pgsql_last_insert_id($table, $field) {\n return views_pgsql_result(views_pgsql_query(\"SELECT CURRVAL('{\". views_pgsql_escape_table($table) .\"}_\". views_pgsql_escape_table($field) .\"_seq')\"));\n}", "protected function insert_id()\n {\n if (!$this->meta) { \n return $this->result->insert_id; \n }\n else {return 0; }\n }", "public function getOrderIncrementId()\n {\n return $this->order->getIncrementId();\n }", "public function get_primary_key()\n {\n return (int)parent::getVar(UrlHandler::PRIMARY_KEY);\n }", "function created_row_id() {\n return (int)$this->driver->insert_id;\n }", "function getInsertedID();", "public function getFuzzyIncrementId()\n {\n $value = $this->get(self::fuzzy_increment_id);\n return $value === null ? (string)$value : $value;\n }", "public function fieldId(): string\n {\n return $this->fieldId ?? Config::get('elastic_sync.index_id_field', 'id');\n }", "function insert_id()\n\t{\n\t\t$this->last_query = str_replace(array(\"\\r\", \"\\t\"), '', $this->last_query);\n\t\t$this->last_query = str_replace(\"\\n\", ' ', $this->last_query);\n\t\tpreg_match('#INSERT INTO ([a-zA-Z0-9_\\-]+)#i', $this->last_query, $matches);\n\n\t\t$table = $matches[1];\n\n\t\t$query = $this->query(\"SELECT column_name FROM information_schema.constraint_column_usage WHERE table_name = '{$table}' and constraint_name = '{$table}_pkey' LIMIT 1\");\n\t\t$field = $this->fetch_field($query, 'column_name');\n\n\t\t// Do we not have a primary field?\n\t\tif(!$field)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t$id = $this->write_query(\"SELECT currval(pg_get_serial_sequence('{$table}', '{$field}')) AS last_value\");\n\t\treturn $this->fetch_field($id, 'last_value');\n\t}", "public function getNextId()\n {\n return function () {\n // if the form property doesn't exist, then it means we're executing this \n // method inside the Eloquent builder\n $table = $this->from ?? $this->model->getTable();\n\n $statements = DB::select(\"SHOW TABLE STATUS LIKE '{$table}'\");\n\n if (!$statements) {\n throw new Exception(sprintf('Base table \"%s\" does not exist', $table));\n }\n\n return $statements[0]->Auto_increment;\n };\n }", "public function getPk(): string\n {\n return $this->pk;\n }", "public function getAutoIncrementPictureId()\n\t{\n $sql=\"REPLACE INTO newjs.PICTURE_AUTOINCREMENT(AUTO_ID,NO_USE_VARIABLE) VALUES('','X')\";\n $res=$this->db->prepare($sql);\n\t\t$res->execute();\n\t\treturn $this->db->lastInsertId();\n }", "public static function getDbPrimaryKey( )\n {\n return 'FO_id';\n }", "function lastID() {\n $sql = \"SELECT AUTO_INCREMENT\n FROM information_schema.tables\n WHERE table_name = 'course'\";\n $query = $this->conn->query($sql);\n $lastid = $query->fetch()['AUTO_INCREMENT'] - 1;\n return $lastid;\n }", "public function getInsertId();", "public function GetInsertID();", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "public function getIncrementCompteAuto(): ?int {\n return $this->incrementCompteAuto;\n }", "function autoincrementid_underscore($model){\n $tableStatus = $this->$model->query(\"SHOW TABLE STATUS LIKE '\".$model.\"'\");\n return $tableStatus[0]['TABLES']['Auto_increment'];\n \t \n}", "public function setAutoIncAccID(){\r\n\t\t$clientAc = new Database();\r\n\t\t$clientAc->connect();\r\n\t\t$queryMax = \"SELECT MAX(clientaccountid)clientaccountid\r\n\t\t FROM `clientaccount`\";\r\n\r\n\t\t$clientAc->query($queryMax);\r\n\t\t$clientAc->close();\r\n\t\t$newAccNum=$clientAc->queryFirstResult[clientaccountid];\r\n\t\t$this->autoIncAccID = $newAccNum+1;\r\n\t}", "public function getInsertID();", "function get_next_id(){\n $company_db = $this->load->database('company_db', TRUE);\n $next = $company_db->query(\"SHOW TABLE STATUS LIKE 'tbl_customer'\");\n //echo $company_db->last_query();\n $next = $next->row(0);\n /*echo \"<pre>\";\n var_dump($next);exit;\n echo \"</pre>\";*/\n return $next->Auto_increment;\n }", "protected static final function getAutoIncrement (S $objTable) {\n // Return\n return self::doQuery (_S ('SHOW TABLE STATUS LIKE \"%tId\"')\n ->doToken ('%tId', $objTable))->offsetGet (0)\n ->offsetGet ('Auto_increment');\n }", "function ultimoIdInserido() {\r\n return mysql_insert_id();\r\n }", "function nextID($table) {\n\t\t$key = query(\"SHOW TABLE STATUS LIKE '{$table}'\");\n\t\treturn $key['Auto_increment'];\n\t}", "public function ultimo_id_generado_por_la_bd() {\n return $this->_insert_id;\n }", "function getInvoiceNum()\n{\n\t\n\t$res = executeQuery(\"SHOW TABLE STATUS LIKE 'orders'\");\n\treturn (int)$res[0]['Auto_increment'];\n}", "public function get_primary_key()\n {\n return self::$pk;\n }", "function Insert_ID() {\n\t\t$insert_query = pg_query(\"SELECT lastval();\");\n\t\t$insert_row = pg_fetch_row($insert_query);\n\t\t$insert_id = $insert_row[0];\n\t\treturn $insert_id;\n\t}", "function getNextIncrement(){\n $this->db->select('AUTO_INCREMENT');\n $this->db->from('information_schema.TABLES');\n $this->db->where('TABLE_SCHEMA', $this->db->database);\n $this->db->where('TABLE_NAME', $this->tp_tb);\n \t$resultAI = $this->db->get();\n \treturn $resultAI->result_array();\n }", "public function ultimoId(){\n\t\t\treturn $this->pdo->lastInsertId();\n\t\t}", "public function getPk()\n\t{\n\t\treturn $this->offsetGet( $this->getTable()->getPkField() );\n\t}", "public function getUltimoId() {\n return $this->_conexion->lastInsertId();\n }", "public function __getUniqueId()\n\t{\n\t\t$adb = \\PearDatabase::getInstance();\n\t\treturn $adb->getUniqueID('vtiger_field');\n\t}", "public function getFieldID() {\n\t\treturn $this->_fieldID;\n\t}", "function produkItem_CreateID( $tbl_produk ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_produk ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "function sql_nextid () {\n return $this->db->insert_id;\n }" ]
[ "0.8421127", "0.83421946", "0.7761375", "0.7654174", "0.74766064", "0.73036397", "0.71493536", "0.71099174", "0.70699567", "0.70286816", "0.70096534", "0.7008616", "0.69820374", "0.69467926", "0.693892", "0.69249743", "0.6915341", "0.689709", "0.6893194", "0.68637383", "0.67978716", "0.679154", "0.6782024", "0.6769289", "0.67636395", "0.6745752", "0.6738997", "0.67362535", "0.67262936", "0.67262936", "0.67262936", "0.6712977", "0.6709796", "0.6699905", "0.6691059", "0.66762275", "0.6670545", "0.6670545", "0.6670347", "0.66676164", "0.66524255", "0.66462725", "0.66360575", "0.6600244", "0.6595836", "0.658435", "0.6574632", "0.65569156", "0.65229553", "0.65124935", "0.6505674", "0.6496996", "0.649681", "0.6488607", "0.64784276", "0.64738303", "0.6469321", "0.6467268", "0.6463925", "0.64583665", "0.6456851", "0.64464724", "0.6430903", "0.6420236", "0.6411214", "0.63945717", "0.63818276", "0.6378205", "0.6374961", "0.6374309", "0.637037", "0.6355852", "0.6346553", "0.6341393", "0.6340228", "0.633553", "0.6334319", "0.631826", "0.6315287", "0.6310904", "0.63082904", "0.6300169", "0.6297426", "0.62921894", "0.6285154", "0.62736356", "0.62690395", "0.6266901", "0.6264976", "0.62609005", "0.62541366", "0.624733", "0.6242294", "0.623746", "0.62367994", "0.6228719", "0.62164813", "0.6211905", "0.62086666", "0.6207139" ]
0.8721693
0
trim the text to trimNumber amount of words
отсечь текст на trimNumber слов
function trimText ( $text, $trimNumber ) { $text = str_replace(" ", " ", $text); $trimmed = NULL; $string = explode(" ", $text); if ( count($string) > $trimNumber ) { for ( $wordCounter = 0 ; $wordCounter <= $trimNumber ; $wordCounter++ ){ $trimmed .= $string[$wordCounter]; if ( $wordCounter < $trimNumber ){ $trimmed .= " "; } else { $trimmed .= "..."; } } } else { $trimmed = $text; } $trimmed = stripslashes(trim($trimmed)); return ($trimmed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_trim_words($text, $num_words = 55, $more = \\null)\n{\n}", "function trim_text ($string, $truncation=25) {\n\t\tif (str_word_count($string) > $truncation) {\n\t\t\t$string = preg_split(\"/\\s+/\",$string,($truncation+1));\n\t\t\tunset($string[(sizeof($string)-1)]);\n\t\t\treturn implode(' ',$string);\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}", "function local_my_course_trim_words($str, $w = 10, $endchar = '...') {\n\n // Preformatting.\n $str = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), ' ', $str); // Remove all endlines\n $str = preg_replace('/\\s+/', ' ', $str); // Reduce spaces.\n\n $words = explode(' ', $str);\n\n if (count($words) <= $w) {\n return $str;\n }\n\n $shortened = array_slice($words, 0, $w);\n $out = implode(' ', $shortened).' '.$endchar;\n return $out;\n}", "function trim_words($str, $w = 10, $endchar = '...') {\n\n // Preformatting.\n $str = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), ' ', $str); // Remove all endlines\n $str = preg_replace('/\\s+/', ' ', $str); // Reduce spaces.\n\n $words = explode(' ', $str);\n\n if (count($words) <= $w) {\n return $str;\n }\n\n $shortened = array_slice($words, 0, $w);\n $out = implode(' ', $shortened).' '.$endchar;\n return $out;\n }", "function words($text){\n$text = explode(' ', $text);\n$first_15_words = array_slice($text, 0, 15);\n$words= implode(' ', $first_15_words);\nreturn $words;\n}", "function remove_words($text, $count = 1)\n {\n if (str_word_count($text) > $count) {\n return explode (' ', $text, $count + 1)[$count];\n }\n\n return '';\n }", "function the_content_max_words( $text ) {\n $length = 200;\n // don't cut if too short\n if ( strlen($text)<$length+10 ) return $text;\n\n // find next space after desired length\n $break_pos = strpos( $text, ' ', $length );\n $visible = substr( $text, 0, $break_pos );\n return balanceTags( $visible ) . \"\";\n}", "function limitWords($text, $num = 5, $saveTags = null, $more = '...') {\r\n $cText = $saveTags !== null ? strip_tags($text, $saveTags) : $text;\r\n $words = explode(' ', $cText);\r\n if (count($words) > $num) {\r\n $words = array_slice($words, 0, $num);\r\n $lText = implode(' ', $words);\r\n $lText .= $more;\r\n } else {\r\n $lText = implode(' ', $words);\r\n }\r\n return $lText;\r\n}", "function improved_trim_excerpt($text = '',$wordLimit = 20) {\n if ( '' == $text ) {\n $text = get_the_content('');\n }\n\n $text = apply_filters('the_content', $text);\n $text = str_replace('\\]\\]\\>', ']]&gt;', $text);\n $text = strip_tags($text, '<ol>,<h1>,<h2>,<h3>,<h4>,<ul>,<li>,<p>');\n $excerpt_length = $wordLimit;\n $words = explode(' ', $text, $excerpt_length + 1);\n\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '[...]');\n $text = implode(' ', $words);\n }\n\n return $text;\n}", "function clean($text) {\n $text = trim($text);\n $text = preg_replace('/\\s{2,}/ism', ' ', $text);\n return $text; \n }", "function LimitWordCount($numWords = 26) {\n\t\t$this->value = Convert::xml2raw($this->value);\n\t\t$ret = explode(\" \", $this->value, $numWords);\n\t\t\n\t\tif( Count($ret) < $numWords-1 ){\n\t\t\t$ret=$this->value;\n\t\t}else{\n\t\t\tarray_pop($ret);\n\t\t\t$ret=implode(\" \", $ret).\"...\";\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "public static function wf_wp_trim_excerpt($text) { // Wingfinger version\n\t\t\t$raw_excerpt = $text;\n\t\t\t$text = strip_shortcodes( $text );\n\t\t\n\t\t\t$text = apply_filters('mimic_content', $text); // 3.30\n\t\t\t$text = str_replace(']]>', ']]&gt;', $text);\n\t\t\t$text = strip_tags($text);\n\t\t\t$excerpt_length = apply_filters('excerpt_length', 55); // set this in functions.php\n\t\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); // set this in functions.php\n\t\t\t$words = preg_split(\"/[\\n\\r\\t ]+/\", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);\n\t\t\tif ( count($words) > $excerpt_length ) {\n\t\t\t\tarray_pop($words);\n\t\t\t\t$text = implode(' ', $words);\n\t\t\t\t$text = $text . $excerpt_more;\n\t\t\t} else {\n\t\t\t\t$text = implode(' ', $words);\n\t\t\t}\n\t\t\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n\t\t}", "function trim_text_to_word($review, $opts) {\n\t\t\t$text = $review['content'];\n\t\t\t$text = str_replace(\"<br\", \" <br\", $text);\n\t\t\t$text = trim(strip_tags($text));\n\t\t\t$len = $opts->snippet;\n\t\t\t\n\t\t\tif (strlen($text) > $len) {\n\t\t\t\tpreg_match('/^.{0,'.$len.'}(?:.*?)\\b/siu', $text, $matches);\n\t\t\t\t$text = $matches[0] . \"... \";\n\t\t\t\tif (strlen(trim($opts->morelink)) > 0) {\n\t\t\t\t\t$postLink = $review['postLink'].\"#wpcr3_id_\".$review['id'];\n\t\t\t\t\t$text .= \"<a href='{$postLink}'>$opts->morelink</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $text;\n\t\t}", "function wptouch_trim_excerpt($text) {\n\t$raw_excerpt = $text;\n\tif ( '' == $text ) {\n\t\t$text = get_the_content('');\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]&gt;', $text);\n\t\t$text = strip_tags($text);\n\t\t$excerpt_length = apply_filters('excerpt_length', 30);\n\t\t$words = explode(' ', $text, $excerpt_length + 1);\n\t\tif (count($words) > $excerpt_length) {\n\t\t\tarray_pop($words);\n\t\t\tarray_push($words, '...');\n\t\t\t$text = implode(' ', $words);\n\t\t\t$text = force_balance_tags( $text );\n\t\t}\n\t}\n\treturn apply_filters('wptouch_trim_excerpt', $text, $raw_excerpt);\n}", "function truncate3($mytext) {\n$chars = 120; \n$mytext = substr($mytext,0,$chars); \n$mytext = substr($mytext,0,strrpos($mytext,' ')); \nreturn $mytext; \n}", "function trim_by_words($string, $count, $ellipsis = false){\n $words = explode(' ', $string);\n if (count($words) > $count){\n array_splice($words, $count);\n $string = implode(' ', $words);\n if (is_string($ellipsis)){\n $string .= $ellipsis;\n } elseif ($ellipsis){\n $string .= '...';\n }\n }\n return $string;\n }", "function smart_trim($instring, $truncation) {\n $instring = strip_shortcodes( $instring );\n //a little regex kills scripts\n $instring = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $instring);\n //a little more regex kills datelines\n $instring = preg_replace(\"/\\A((([A-Z ]+)\\\\,\\s?([a-zA-Z ]+)\\\\.?)|[A-Z]+)\\s?(&#8211;|&#8212;?)\\s?/u\", \"\", $instring);\n //replace closing paragraph tags with a space to avoid collisions after punctuation\n $instring = str_replace(\"</p>\", \" \", $instring);\n //strip the HTML tags and then kill the entities\n $string = html_entity_decode( strip_tags($instring), ENT_QUOTES, 'UTF-8');\n\n $matches = preg_split(\"/\\s+/\", $string);\n $count = count($matches);\n\n if($count > $truncation) {\n //Grab the last word; we need to determine if\n //it is the end of the sentence or not\n $last_word = strip_tags($matches[$truncation-1]);\n $lw_count = strlen($last_word);\n\n //The last word in our truncation has a sentence ender\n if($last_word[$lw_count-1] == \".\" || $last_word[$lw_count-1] == \"?\" || $last_word[$lw_count-1] == \"!\") {\n for($i=$truncation;$i<$count;$i++) {\n unset($matches[$i]);\n }\n\n //The last word in our truncation doesn't have a sentence ender, find the next one\n } else {\n //Check each word following the last word until\n //we determine a sentence's ending\n $ending_found = false;\n for($i=($truncation);$i<$count;$i++) {\n if($ending_found != true) {\n $len = strlen(strip_tags($matches[$i]));\n if($matches[$i][$len-1] == \".\" || $matches[$i][$len-1] == \"?\" || $matches[$i][$len-1] == \"!\") {\n //Test to see if the next word starts with a capital\n if( isset($matches[$i+1][0]) && $matches[$i+1][0] == strtoupper($matches[$i+1][0])) {\n $ending_found = true;\n }\n }\n } else {\n unset($matches[$i]);\n }\n }\n }\n $body = implode(' ', $matches);\n return $body;\n } else {\n return $string;\n }\n }", "function truncate2($mytext) {\n$chars = 250; \n$mytext = substr($mytext,0,$chars); \n$mytext = substr($mytext,0,strrpos($mytext,' ')); \nreturn $mytext; \n}", "static function filter_nr_words($str, $word_limit, &$has_more){\n\t\t$has_more=false;\n\t $str=self::to_plain($str);\n\t\t$words = explode(' ', $str, ($word_limit + 1));\n\t\tif(count($words) > $word_limit) {\n\t\t\tarray_pop($words);\n\t\t\t$has_more=true;\n\t\t}\n\t\treturn implode(' ', $words);\n\t}", "public static function trim_to_word_count($str, $desired_word_count){\n\t\t$dissected_str = explode(\" \", $str);\n\t\t$dissected_str_length = count($dissected_str);\n\t\t$new_str = $space = \"\";\n\t\tfor($x=0;$x<$desired_word_count;$x++){ \n\t\t\tif($x >= $dissected_str_length) break;\n\t\t\t$new_str.= $space.$dissected_str[$x];\n\t\t\t$space = \" \";\n\t\t}\n\t\treturn $new_str;\n\t}", "function _trunc($phrase, $max_words, $offset = 0)\n {\n if (trim($phrase) == '') return \"\";\n\n $phrase_array = explode(' ',$phrase);\n if(count($phrase_array) > $max_words && $max_words > 0)\n $phrase = implode(' ',array_slice($phrase_array, $offset, $max_words)); \n return $phrase;\n }", "public function trim_excerpt( $text='' ) {\n $text = strip_shortcodes( $text );\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]&gt;', $text);\n $excerpt_length = apply_filters('excerpt_length', 55);\n $excerpt_more = apply_filters('excerpt_more', '... ' . self::get_more_link());\n return wp_trim_words($text, $excerpt_length, $excerpt_more);\n }", "function wc_trim_string($string, $chars = 200, $suffix = '...')\n {\n }", "function firstnwords($text, $limit) {\n $word_arr = explode(\" \", $text);\n if (count($word_arr) > $limit) {\n $words = implode(\" \", array_slice($word_arr , 0, $limit) );\n return $words . \" [...] \";\n }\n return $text;\n}", "function limitWords ($aText, $wordCountLimit)\n {\n if (strlen($aText) > 0)\n {\n $tagStrippedText = strip_tags($aText);\n if (str_word_count($tagStrippedText) <= $wordCountLimit)\n {\n return $tagStrippedText;\n }\n return implode(' ', array_slice(explode(' ', $tagStrippedText, $wordCountLimit), 0, ($wordCountLimit - 1))) . '...';\n }\n return '';\n }", "function trimToWord($str, $width){\n //echo \"str = \" . $str . \"<br />\";\n\t//$trim_str=strip_tags(substr($str, 0, strpos(wordwrap($str, $width), \"\\n\")),\"<b>\");\n\t$trim_str=strip_tags($str,\"<b>\");\n\t$trim_str=substr($trim_str, 0, $width);\n\t//$trim_str=substr($trim_str, 0, strpos(wordwrap($trim_str, $width), \"\\n\"));\n\t//echo \"trim_str = \" . $trim_str . \"<br />\";\n\treturn $trim_str;\n}", "function TrimStringX($chuoi,$number) {\n\t\n\t$Temp=strip_tags($chuoi); //,'<p><br><b><i><u>');\n\n\tif (strlen($Temp)>$number) {\n\t\t$Temp=substr($Temp,0,$number);\n\t\t$post=strpos($Temp,' ');\n\t\tif ($post>0) {\n\t\t\t$i=$number;\n\t\t\twhile ($Temp[strlen($Temp)-1]!=' ') {\n\t\t\t\t$Temp=substr($Temp,0,strlen($Temp)-1);\n\t\t\t}\n\t\t}\n\t\t$Temp.='...';\n\t}\n\treturn $Temp;\n}", "function mantra_trim_excerpt($text) {\n\tglobal $mantra_excerptwords;\n\tglobal $mantra_excerptcont;\n\tglobal $mantra_excerptdots;\n\t$raw_excerpt = $text;\n\tif ( '' == $text ) {\n\t //Retrieve the post content.\n\t $text = get_the_content('');\n\n\t //Delete all shortcode tags from the content.\n\t $text = strip_shortcodes( $text );\n\n\t $text = apply_filters('the_content', $text);\n\t $text = str_replace(']]>', ']]&gt;', $text);\n\n\t $allowed_tags = '<a>,<img>,<b>,<strong>,<ul>,<li>,<i>,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<pre>,<code>,<em>,<u>,<br>,<p>';\n\t $text = strip_tags($text, $allowed_tags);\n\n\t $words = preg_split(\"/[\\n\\r\\t ]+/\", $text, $mantra_excerptwords + 1, PREG_SPLIT_NO_EMPTY);\n\t if ( count($words) > $mantra_excerptwords ) {\n\t array_pop($words);\n\t $text = implode(' ', $words);\n\t $text = $text .' '.$mantra_excerptdots. ' <a href=\"' . esc_url( get_permalink() ) . '\">' .$mantra_excerptcont.' <span class=\"meta-nav\">&rarr; </span>' . '</a>';\n\t } else {\n\t $text = implode(' ', $words);\n\t }\n\t}\n\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n}", "function pmc_wp_trim_excerpt($text = '') {\n\t$raw_excerpt = $text;\n\tif ( '' == $text ) {\n\t\t$text = get_the_content('');\n\t\t//$text = strip_shortcodes( $text ); //Comment out the part we don't want\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]&gt;', $text);\n\t\t$excerpt_length = apply_filters('excerpt_length', 55);\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t}\n\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n}", "function custom_trim_excerpt($text) {\nglobal $post;\nif ( '' == $text ) {\n$text = get_the_content('');\n$text = apply_filters('the_content', $text);\n$text = str_replace(']]>', ']]>', $text);\n$text = strip_tags($text);\n$excerpt_length = 25;\n$words = explode(' ', $text, $excerpt_length + 1);\nif (count($words) > $excerpt_length) {\narray_pop($words);\narray_push($words, '...');\n$text = implode(' ', $words);\n}\n}\nreturn $text;\n}", "public static function trimString($text){\n\t\t$text = trim($text);\n\t\t$text = preg_replace('/\\s+/',' ',$text);\n\t\treturn $text;\n\t}", "function truncate($mytext) {\n$chars = 400; \n$mytext = substr($mytext,0,$chars); \n$mytext = substr($mytext,0,strrpos($mytext,' ')); \nreturn $mytext; \n}", "function custom_length_excerpt( $word_count_limit ){\n\t$content = wp_strip_all_tags(get_the_content(), true);\n\techo wp_trim_words($content, $word_count_limit);\n}", "static function limit($text,$wordSize=35,$totalText=null){\n\t\twhile(preg_match('@((?>[^\\s]{'.$wordSize.'}))([^\\s])@',$text)){\n\t\t\t$text = preg_replace('@((?>[^\\s]{'.$wordSize.'}))([^\\s])@','$1 $2',$text,1);\n\t\t}\n\t\tif($totalText && strlen($text) > $totalText){\n\t\t\t$text = '<span class=\"shortened\" title=\"'.htmlspecialchars($text).'\">'.htmlspecialchars(substr($text,0,$totalText)).'</span>';\n\t\t}\n\t\treturn $text;\n\t}", "public function doTrim();", "function get_summary($text, $wordnum = 15) {\n\t\tif(empty($text)) return \"\";\n /* count multiple spaces as one space */\n $text = preg_replace(\"/ +/\", \" \", $text);\n $pos = 0;\n $count = 0;\n \n while(($pos = strpos($text, ' ', $pos + 1)) !== false) {\n if (++$count >= $wordnum) {\n break;\n }\n }\n if ($pos<=$wordnum) return($text); \n $summary = substr($text, 0, $pos);\n return($summary.' ...');\n\t}", "function truncate_to_n_words($text, $number_of_words, $url, $readmore = 'read more') {\n\t\t$text = strip_tags($text);\n\t\t$excerpt = first_n_words($text, $number_of_words);\n\t\t// we can't just look at the length or try == because we strip carriage returns\n\t\t//if( str_word_count($text) !== str_word_count($excerpt) ) {\n\t\t\t$excerpt .= '... <a href=\"'.$url.'\">'.$readmore.'</a>';\n\t\t//}\n\t\treturn $excerpt;\n\t}", "function oneConfluence_trim_excerpt($length) {\n global $post;\n $explicit_excerpt = $post->post_excerpt;\n if ('' == $explicit_excerpt) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n } else {\n $text = apply_filters('the_content', $explicit_excerpt);\n }\n $text = strip_shortcodes($text); // optional\n $text = strip_tags($text);\n $excerpt_length = $length;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words) > $excerpt_length) {\n array_pop($words);\n array_push($words, '...');\n $text = implode(' ', $words);\n $text = apply_filters('the_excerpt', $text);\n }\n return $text;\n}", "function limit_words($string, $word_limit = 35)\n{\n\t$words = explode(\" \",$string);\n\treturn implode(\" \",array_splice($words,0,$word_limit));\n}", "function truncate_words($text, $length = 30, $truncate_string = \"&hellip;\", $truncate_lastspace = false)\n{\n $string = substr($text, 0, $length);\n if((strlen($text) > $length) && $last_space = strrpos($string, \" \"))\n {\n $length = $last_space < $length ? $last_space + strlen($truncate_string) : $length;\n }\n return truncate_text($text, $length, $truncate_string, $truncate_lastspace);\n}", "public static function trimText(string $text):string {\r\n\t\t$text = '';\r\n\t\tforeach (explode(\"\\n\", $text) as $value) {\r\n\t\t\t$row = trim($value);\r\n\t\t\tif ($row != '') {\r\n\t\t\t\t$text .= $row.\"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $text;\r\n\t}", "function truncateWords($text, $maxLength = 20)\r\n{\r\n\t$wordArray = explode(' ', $text);\r\n\r\n\t// do we have too many?\r\n\tif( sizeof($wordArray) > $maxLength )\r\n\t{\r\n\t\t// remove the unwanted words\r\n\t\t$wordArray = array_slice($wordArray, 0, $maxLength);\r\n\r\n\t\t// turn the word array back into a string and add our ...\r\n\t\treturn implode(' ', $wordArray) . '&hellip;';\r\n\t}\r\n\r\n\t// if our array is under the limit, just send it straight back\r\n\treturn $text;\r\n}", "function limit_words($string,$word_count)\n{\n if (strlen($string) > $word_count) {\n\n // truncate string\n $stringCut = substr($string, 0, $word_count);\n\n // make sure it ends in a word so assassinate doesn't become ass...\n $string = substr($stringCut, 0, strrpos($stringCut, ' ')).'';\n }\n return $string;\n}", "function limit_words($string, $word_count)\n{\n if (strlen($string) > $word_count) {\n\n // truncate string\n $stringCut = substr($string, 0, $word_count);\n\n // make sure it ends in a word so assassinate doesn't become ass...\n $string = substr($stringCut, 0, strrpos($stringCut, ' ')) . '';\n }\n return $string;\n}", "function limit_words($string, $word_limit) {\n $words = explode(\" \", $string);\n return implode(\" \", array_splice($words, 0, $word_limit));\n}", "function improved_trim_excerpt($text) {\n global $post;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n $text = str_replace('\\]\\]\\>', ']]&gt;', $text);\n $text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n $text = strip_tags($text, '<p> <img> <iframe>');\n $excerpt_length = 55;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '[...] <br /><br /><a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">Read More &rarr;</a>');\n $text = implode(' ', $words);\n }\n }\nreturn $text;\n}", "function pm_hope_string_limit_words($string, $word_limit){\n\t $words = explode(' ', $string, ($word_limit + 1));\n\t if(count($words) > $word_limit)\n\t array_pop($words);\n\t return implode(' ', $words);\n\t}", "public static function trim()\n\t{\n\t}", "public static function striphtml_and_trim($str, $desired_word_count){\n\t\t$str = strip_tags($str);\n\t\treturn StringTools::trim_to_word_count($str, $desired_word_count);\n\t}", "function trim_excerpt($text)\r\n{\r\n return rtrim($text, '[...]');\r\n}", "function wordsCut($words, $howmany) {\n\n\t$result = '';\n\n\t$expWords = explode(\" \", $words);\n\n\tif(count($expWords) > $howmany) {\n\t\tfor($i = 0; $i < $howmany; $i++) {\n\t\t\t$result .= \" \". $expWords[$i];\n\t\t}\n\t\t$result .= \"...\";\n\t} \n\telse $result = $words;\n\t\n\n\treturn $result;\n\n}", "public static function trimEntireWords($string, $limit = 40) {\n // return string when lenght is < then limit\n if (mb_strlen($string, 'UTF-8') < $limit) {\n return $string;\n }\n\n $regex = '/(.{1, $limit})\\b/';\n $matches = array('', '');\n \n preg_match($regex, $string, $matches);\n return $matches[1] . ' ...';\n }", "function limit_text( $text, $limit, $succeder='')\n\t\t \n\t\t{\n\t\t \n\t\tif( strlen($text)>$limit )\n\t\t{\n\t\t$text = substr( $text,0,$limit );\n\t\t// lose any incomplete word at the end\n\t\t//$text = substr( $text,0,-(strlen(strrchr($text,' '))) );\n\t\t}\n\t\t\n\t\t// return the processed string\n\t\t\n\t\treturn $text . $succeder;\n\t\t\n\t\t}", "public static function trimWords($text, $limit = 8, $more = '...')\n {\n $textLen = mb_strlen($text, 'utf8');\n if ($textLen > $limit) {\n $text = mb_substr($text, 0, $limit, 'utf8') . $more;\n }\n return $text;\n }", "function onepress_trim_excerpt( $text, $excerpt_length = null ) {\n\t$text = strip_shortcodes( $text );\n\t/** This filter is documented in wp-includes/post-template.php */\n\t$text = apply_filters( 'the_content', $text );\n\t$text = str_replace( ']]>', ']]&gt;', $text );\n\n\tif ( ! $excerpt_length ) {\n\t\t/**\n\t\t * Filters the number of words in an excerpt.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param int $number The number of words. Default 55.\n\t\t */\n\t\t$excerpt_length = apply_filters( 'excerpt_length', 55 );\n\t}\n\n\t/**\n\t * Filters the string in the \"more\" link displayed after a trimmed excerpt.\n\t *\n\t * @since 2.9.0\n\t *\n\t * @param string $more_string The string shown within the more link.\n\t */\n\t$excerpt_more = apply_filters( 'excerpt_more', ' ' . '&hellip;' );\n\n\treturn wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\n}", "function trim_excerpt($text) {\r\n return rtrim($text,'[...]');\r\n}", "function new_wp_trim_excerpt($text) {\r\n\t$raw_excerpt = $text;\r\n\tif ( '' == $text ) {\r\n\t\t$text = get_the_content('');\r\n\r\n\t\t$text = strip_shortcodes( $text );\r\n\r\n\t\t$text = apply_filters('the_content', $text);\r\n\t\t$text = str_replace(']]>', ']]>', $text);\r\n\t\t$text = strip_tags($text, '<a>');\r\n\t\t$excerpt_length = apply_filters('excerpt_length', 55);\r\n\r\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\r\n\t\t$words = preg_split('/(<a.*?a>)|\\n|\\r|\\t|\\s/', $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE );\r\n\t\tif ( count($words) > $excerpt_length ) {\r\n\t\t\tarray_pop($words);\r\n\t\t\t$text = implode(' ', $words);\r\n\t\t\t$text = $text . $excerpt_more;\r\n\t\t} else {\r\n\t\t\t$text = implode(' ', $words);\r\n\t\t}\r\n\t}\r\n\treturn apply_filters('new_wp_trim_excerpt', $text, $raw_excerpt);\r\n\r\n}", "function shortenText($text, $chars = 450) { // if didnt pass integer 450 word shows by default\n $text = $text.\" \";\n $text = substr($text, 0, $chars); //return part of string\n $text = substr($text, 0, strrpos($text, ' '));\n $text = $text.\"...\";\n return $text;\n}", "function max_words($str, $num)\n\t{\n\t\t$words = explode(\" \", $str);\n\t\tif(count($words) < $num)\n\t\t\treturn $str;\n\t\telse\n\t\t\treturn implode(\" \", array_slice($words, 0, $num));\n\t}", "function SimplyCivi_trim_text($text, $length = 150) {\n // remove any HTML or line breaks so these don't appear in the text\n $text = trim(str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\"), ' ', strip_tags(html_entity_decode($text, ENT_QUOTES, 'UTF-8'))));\n $text = trim(substr($text, 0, $length));\n $lastchar = substr($text, -1, 1);\n // check to see if the last character in the title is a non-alphanumeric character, except for ? or !\n // if it is strip it off so you don't get strange looking titles\n if (preg_match('/[^0-9A-Za-z\\!\\?]/', $lastchar)) {\n $text = substr($text, 0, -1);\n }\n // ? and ! are ok to end a title with since they make sense\n if ($lastchar != '!' && $lastchar != '?') {\n $text .= '...';\n }\n return $text;\n}", "function cutStringToWord($str, $n, $delim=' ...') {\n $len = strlen($str);\n if ($len > $n) {\n return substr($str,0,strrpos(substr($str,0,$n),' ')).$delim;\n }\n else {\n return $str;\n }\n}", "function max_words($str, $num)\n\t{\n\t\t$words = explode(\" \", $str);\n\t\tif(count($words) < $num)\n\t\t\treturn $str;\n\t\telse\n\t\t\timplode(\" \", array_slice($words, 0, $num));\n\t}", "function bootstrap_foundation_trim_text($text, $length = 150) {\n // remove any HTML or line breaks so these don't appear in the text\n $text = trim(str_replace(array(\"\\n\", \"\\r\", \"\\r\\n\"), ' ', strip_tags(html_entity_decode($text, ENT_QUOTES, 'UTF-8'))));\n $text = trim(substr($text, 0, $length));\n $lastchar = substr($text, -1, 1);\n // check to see if the last character in the title is a non-alphanumeric character, except for ? or !\n // if it is strip it off so you don't get strange looking titles\n if (preg_match('/[^0-9A-Za-z\\!\\?]/', $lastchar)) {\n $text = substr($text, 0, -1);\n }\n // ? and ! are ok to end a title with since they make sense\n if ($lastchar != '!' && $lastchar != '?') {\n $text .= '...';\n }\n return $text;\n}", "public function testCleanUndetectedUnspacedWord()\n {\n $filter = new LeoProfanity();\n\n $this->assertEquals($filter->clean('Buy classic watches online'), 'Buy classic watches online');\n }", "function wp_trim_all_excerpt($text)\n{\n global $post;\n if ('' == $text) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n }\n $text = strip_shortcodes($text); // optional\n $text = strip_tags($text);\n $excerpt_length = apply_filters('excerpt_length', 40);\n $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words) > $excerpt_length) {\n array_pop($words);\n $text = implode(' ', $words);\n $text = $text . $excerpt_more;\n } else {\n $text = implode(' ', $words);\n }\n return $text;\n}", "function word_cut($texte, $limit, $end = '', $tags = '') {//$tags = '<br><div>' $end = '...'\n\t$texte = strip_tags($texte.' ', $tags);// texte sans html\n\t$word_cut = preg_replace('/\\s+?(\\S+)?$/u', '', substr($texte, 0, $limit));// /u > pour l'utf8\n\tif(strlen($word_cut) < strlen(trim($texte))) $word_cut .= $end;// Si coupure on ajoute une ponctuation à la fin\n\treturn $word_cut;\n}", "function reduce_word_length($word,$length=9)\r\n{\r\n return substr_replace($word,'',0,($length));\r\n}", "function limit_text($text, $limit) {\n\t\t if (str_word_count($text, 0) > $limit) {\n\t\t\t $words = str_word_count($text, 2);\n\t\t\t $pos = array_keys($words);\n\t\t\t $text = substr($text, 0, $pos[$limit]) . '...';\n\t\t }\n\t\t return $text;\n }", "function word_teaser($string,$count){\n\t$original_string = $string;\n\t$words = explode(' ',$original_string);\n\tif(count($words) > $count){\n\t\t$sliced = array_slice($words,0,$count);\n\t\t$final = implode(' ', $sliced);\n\t\treturn $final;\n\t}else{\n\t\treturn $original_string;\n\t}\n}", "function get_the_trimmed_title(){\n $title = get_the_title();\n $title = clean_string($title);\n if(strlen($title)<=40){\n return $title;\n } else {\n $title = substr($title, 0, 40);\n $title = substr($title, 0, strripos($title, ' '));\n $title = trim(preg_replace( '/\\s+/', ' ', $title));\n $title = $title.'&hellip; ';\n return $title;\n }\n}", "function smartTrim(\n\tstring\t\t$val, \n\tint\t\t$max\t\t= 100\n) : string {\n\t$val\t= \\trim( $val );\n\t$len\t= strsize( $val );\n\t\n\tif ( $len <= $max ) {\n\t\treturn $val;\n\t}\n\t\n\t$out\t= '';\n\t$words\t= \\preg_split( '/([\\.\\s]+)/', $val, -1, \n\t\t\t\\PREG_SPLIT_OFFSET_CAPTURE | \n\t\t\t\\PREG_SPLIT_DELIM_CAPTURE );\n\t\n\tfor ( $i = 0; $i < \\count( $words ); $i++ ) {\n\t\t$w\t= $words[$i];\n\t\t// Add if this word's length is less than length\n\t\tif ( $w[1] <= $max ) {\n\t\t\t$out .= $w[0];\n\t\t}\n\t}\n\t\n\t$out\t= \\preg_replace( \"/\\r?\\n/\", '', $out );\n\t\n\t// If there's too much overlap\n\tif ( strsize( $out ) > $max + 10 ) {\n\t\t$out = truncate( $out, 0, $max );\n\t}\n\t\n\treturn $out;\n}", "public static function limitSentences($text, $num, $strip = false) {\n\t\t$text = strip_tags($text);\n\t\t// shall we strip?\n\t\tif ($strip) {\n\t\t\t// brackets are for uniqueness - if we just removed the \n\t\t\t// dots, then \"Mr\" would match \"Mrs\" when we reconvert.\n\t\t\t$replace = array(\n\t\t\t\t'Dr.' => '<Dr>',\n\t\t\t\t'Mrs.' => '<Mrs>',\n\t\t\t\t'Mr.' => '<Mr>',\n\t\t\t\t'Ms.' => '<Ms>',\n\t\t\t\t'Co.' => '<Co>',\n\t\t\t\t'Ltd.' => '<Ltd>',\n\t\t\t\t'Inc.' => '<Inc>',\n\t\t\t);\n\t\t\t// add extra strings to strip\n\t\t\tif (is_array($strip)) {\n\t\t\t\tforeach($strip as $s) {\n\t\t\t\t\t$replace[$s] = '<'.str_replace('.', '', $s).'>';\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t// replace with placeholders and set the key/value vars\n\t\t\t$text = str_replace(\n\t\t\t\t$replace_keys = array_keys($replace), \n\t\t\t\t$replace_vals = array_values($replace), \n\t\t\t\t$text\n\t\t\t);\n\t\t}\n\t\t// get given number of strings delimited by \".\", \"!\", or \"?\"\n\t\tpreg_match('/^([^.!?]*[\\.!?]+){0,'.$num.'}/', $text, $match);\n\t\t// replace the placeholders with originals\n\t\treturn $strip ? str_replace($replace_vals, $replace_keys, $match[0]) : $match[0];\n\t}", "private function truncate_words( $str, $words_count = 10 ) {\n\n $pieces = explode(' ', $str);\n $output = array();\n\n foreach ($pieces as $i => $word) {\n if ( $i < $words_count ) {\n $output[] = $word;\n }\n }\n\n if ( empty($output) ) {\n return $str;\n }\n\n return implode(' ', $output);\n }", "function split_into_words($text){\n return explode(\" \",$text);\n }", "function stag_trim_text($text, $cut, $suffix = '...') {\n if ($cut < strlen($text)) {\n return substr($text, '0', $cut) . $suffix;\n } else {\n return substr($text, '0', $cut);\n }\n}", "function display_limited_words($str, $word_count = 0) {\n\n\t$exp_str = explode(\" \", $str);\n\t$new_exp = array();\n\tfor($i = 0; $i < $word_count-1; $i++) {\n\t\t$new_exp[$i] = $exp_str[$i];\n\t}\n\t$final_str = implode(\" \", $new_exp);\n\n\treturn $final_str;\n}", "public function snippet($text,$limit) {\n\t\t$text = $this->cleanString($text);\n\t\tif (str_word_count($text, 0) > $limit) {\n\t\t\t$words = str_word_count($text, 2);\n\t\t\t$pos = array_keys($words);\n\t\t\t$text = substr($text, 0, $pos[$limit]);\n\t\t\t$text = trim($text,\" .\") . '...';\n\t\t}\n\t\treturn $text;\n\t}", "function summary($textOrHtml, $maxWords) { \r\n \t\t$text = strip_tags($textOrHtml, \"<b></b><i></i>\"); \r\n \t\t$words = preg_split(\"/\\s+/\", $text, $maxWords+1);\r\n\r\n \t\tif (count($words) > $maxWords) { unset($words[$maxWords]); } \r\n \t\t$output = join(' ', $words); \r\n\r\n\t return $output; \r\n\t }", "function publisher_limit_words( $string, $width = 100, $append = '&hellip;' ) {\n\n\t\tif ( $width < 1 ) {\n\t\t\treturn $string;\n\t\t}\n\n\t\t// do nothing if length is smaller or equal filter!\n\t\tif ( strlen( $string ) <= $width ) {\n\t\t\treturn $string;\n\t\t}\n\n\t\t$parts = preg_split( '/([\\s\\n\\r]+)/u', $string, null, PREG_SPLIT_DELIM_CAPTURE );\n\t\t$parts_count = count( $parts );\n\n\t\t$length = 0;\n\t\t$last_part = 0;\n\t\tfor ( ; $last_part < $parts_count; ++ $last_part ) {\n\t\t\t$length += mb_strlen( $parts[ $last_part ] );\n\n\t\t\tif ( $length > $width ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ( $length > $width ) {\n\t\t\treturn trim( implode( array_slice( $parts, 0, $last_part ) ) ) . $append;\n\t\t} else {\n\t\t\treturn implode( array_slice( $parts, 0, $last_part ) );\n\t\t}\n\t}", "function word_limit($string, $max_words){\n\n$post_words = explode(' ', $string);\n\n$count = count($post_words);\n\n$post_words = implode(' ', array_slice($post_words, 0, $max_words));\n\nif($count > $max_words):\n\nreturn $post_words . '...';\n\nelse:\n\nreturn $post_words;\n\nendif;\n\n}", "function removeNumbersWithDashes($text)\n{\n $tags = detectNumbersWithDashes($text);\n if(!empty($tags)) {\n foreach($tags AS $key => $value) {\n $text = str_ireplace($value, '', $text);\n }\n }\n\n return trim($text);\n}", "function cleanup($words)\n\t{\n\t\treturn trim(strip_tags($words));\n\t}", "protected static function stripSpaces(string $text = '') {\n \n return str_replace(' ', '', $text);\n }", "function string_limit_words($string, $word_limit)\n{\n $words = explode(' ', $string, ($word_limit + 1));\n if(count($words) > $word_limit)\n array_pop($words);\n return implode(' ', $words);\n}", "function flux_trim_excerpt( $excerpt )\n{\n\tglobal $post;\n\n\tif ( '' == $excerpt ) {\n\t\t$excerpt = get_the_content( '' );\n\t\t$excerpt = apply_filters( 'the_content', $excerpt );\n\n\t\t$excerpt = str_replace( '\\]\\]\\>', ']]&gt;', $excerpt );\n\t\t$excerpt = strip_tags( $excerpt, '<p>' );\n\t\t$excerpt_length = 60;\n\n\t\t$words = explode( ' ', $excerpt, $excerpt_length + 1 );\n\t\tif ( count( $words ) > $excerpt_length ) {\n\t\t\t array_pop( $words );\n\t\t\t array_push( $words, '[...]' );\n\t\t\t $excerpt = implode( ' ', $words );\n\t\t}\n\t}\n\n\treturn $excerpt;\n}", "function filter( $text ) {\n\t\t$lc = $this->legalSearchChars();\n\t\treturn trim( preg_replace( \"/[^{$lc}]/\", \" \", $text ) );\n\t}", "function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') {\n $zv_paragraph = \"\";\n $word = explode(\" \", $paragraph);\n $zv_total = count($word);\n if ($zv_total > $size) {\n for ($x=0; $x < $size; $x++) {\n $zv_paragraph = $zv_paragraph . $word[$x] . \" \";\n }\n $zv_paragraph = trim($zv_paragraph);\n } else {\n $zv_paragraph = trim($paragraph);\n }\n return $zv_paragraph;\n }", "private function limit_text($text, $length) {\r\n\t\t// strip HTML - too many potential issues if we try to allow for html\r\n\t\t$text = strip_tags($text);\r\n\r\n \t// return text immediately if shorter than length\r\n \tif (strlen($text) <= $length) {\r\n\t\t\treturn $text;\r\n \t}\r\n\r\n\t\t// find last space within length\r\n\t\t$last_space = strrpos(substr($text, 0, $length), ' ');\r\n\t\t$trimmed_text = substr($text, 0, $last_space);\r\n\r\n\t\t// Add ellipsis character, first removing , and . chars\r\n\t\t$trimmed_text = trim($trimmed_text, ',.');\r\n\t\t$trimmed_text .= \"&hellip;\";\r\n\r\n\t\treturn $trimmed_text;\r\n\t}", "function wp_trim_excerpt_modified($text, $content_length = 55, $remove_breaks = false) {\n if ( '' != $text ) {\n $text = strip_shortcodes( $text );\n $text = excerpt_remove_blocks( $text );\n $text = apply_filters( 'the_content', $text );\n $text = str_replace(']]>', ']]&gt;', $text);\n $num_words = $content_length;\n $more = $excerpt_more ? $excerpt_more : null;\n if ( null === $more ) {\n $more = __( '&hellip;' );\n }\n $original_text = $text;\n $text = preg_replace( '@<(script|style)[^>]*?>.*?</\\\\1>@si', '', $text );\n\n // Here is our modification\n // Allow <p> and <strong>\n $text = strip_tags($text, '<p>,<strong>');\n\n if ( $remove_breaks )\n $text = preg_replace('/[\\r\\n\\t ]+/', ' ', $text);\n $text = trim( $text );\n if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\\-?8$/i', get_option( 'blog_charset' ) ) ) {\n $text = trim( preg_replace( \"/[\\n\\r\\t ]+/\", ' ', $text ), ' ' );\n preg_match_all( '/./u', $text, $words_array );\n $words_array = array_slice( $words_array[0], 0, $num_words + 1 );\n $sep = '';\n } else {\n $words_array = preg_split( \"/[\\n\\r\\t ]+/\", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );\n $sep = ' ';\n }\n if ( count( $words_array ) > $num_words ) {\n array_pop( $words_array );\n $text = implode( $sep, $words_array );\n $text = $text . $more;\n } else {\n $text = implode( $sep, $words_array );\n }\n }\n return $text;\n}", "function trim_text($input, $length, $ellipses = true, $strip_tag = true,$strip_style = true) {\n if ($strip_tag) {\n $input = strip_tags($input, '<br>');\n }\n\n //strip tags, if desired\n if ($strip_style) {\n $input = preg_replace('/(<[^>]+) style=\".*?\"/i', '$1',$input);\n }\n\n if($length=='full')\n {\n\n $trimmed_text=$input;\n\n }\n else\n {\n //no need to trim, already shorter than trim length\n if (strlen($input) <= $length) {\n return $input;\n }\n\n //find last space within length\n $last_space = strrpos(mb_substr($input, 0, $length, 'UTF-8'), ' ');\n $trimmed_text = substr($input, 0, $last_space);\n\n //add ellipses (...)\n if ($ellipses) {\n $trimmed_text .= '...';\n }\n }\n\n return $trimmed_text;\n}", "function the_excerpt($text, $string = 400) {\r\n $sanitized = htmlentities($text, ENT_COMPAT, 'UTF-8');\r\n if(strlen($sanitized) > $string) {\r\n $cutString = substr($sanitized,0,$string);\r\n $words = substr($sanitized, 0, strrpos($cutString, ' '));\r\n return $words;\r\n } else {\r\n return $sanitized;\r\n }\r\n \r\n }", "public static function smartTrim(\n\t\tstring\t\t$val, \n\t\tint\t\t$max\t\t= 100\n\t) : string {\n\t\t$val\t= \\trim( $val );\n\t\t$len\t= static::strsize( $val );\n\t\t\n\t\tif ( $len <= $max ) {\n\t\t\treturn $val;\n\t\t}\n\t\t\n\t\t$out\t= '';\n\t\t$words\t= \\preg_split( '/([\\.\\s]+)/', $val, -1, \n\t\t\t\t\\PREG_SPLIT_OFFSET_CAPTURE | \n\t\t\t\t\\PREG_SPLIT_DELIM_CAPTURE );\n\t\t\n\t\tfor ( $i = 0; $i < \\count( $words ); $i++ ) {\n\t\t\t$w\t= $words[$i];\n\t\t\t// Add if this word's length is less than length\n\t\t\tif ( $w[1] <= $max ) {\n\t\t\t\t$out .= $w[0];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$out\t= \\preg_replace( \"/\\r?\\n/\", '', $out );\n\t\t\n\t\t// If there's too much overlap\n\t\tif ( static::strsize( $out ) > $max + 10 ) {\n\t\t\t$out = static::truncate( $out, 0, $max );\n\t\t}\n\t\t\n\t\treturn $out;\n\t}", "protected static function cleanLeadingSpace($text)\n {\n $i = 0;\n\n while (! $firstLine = explode(\"\\n\", $text)[$i]) {\n $i ++;\n }\n\n preg_match('/^( *)/', $firstLine, $matches);\n\n return preg_replace('/^[ ]{'.strlen($matches[1]).'}/m', '', $text);\n }", "function truncateStringWords($str, $maxlen) {\r\n if (strlen($str) <= $maxlen) return $str;\r\n $newstr = substr($str, 0, $maxlen);\r\n if (substr($newstr, -1, 1) != ' ') $newstr = substr($newstr, 0, strrpos($newstr, \" \"));\r\n return $newstr;\r\n}", "function CutText($text, $n=80) \n\t{\n\t\tif (strlen($text) <= $n) {\n\t\t\treturn $text;}\n\t\t$text= substr($text, 0, $n);\n\t\tif ($text[$n-1] == ' ') {\n\t\t\treturn trim($text).\"...\";\n\t\t}\n\t\t$x = explode(\" \", $text);\n\t\t$sz = sizeof($x);\n\t\tif ($sz <= 1) {\n\t\t\treturn $text.\"...\";}\n\t\t$x[$sz-1] = '';\n\t\treturn trim(implode(\" \", $x)).\"...\";\n\t}", "protected function reduceDescription($text)\n\t{\n\t\t$keywords = $this->getKeywords();\n\t\t$text = preg_replace(\"/\\s\\s([\\s]+)?/\", \" \", $text);\n\n\t\tforeach ($keywords as $keyword) {\n\t\t\tif (strlen($keyword) > 2) {\n\t\t\t\t$pos = stripos($text, $keyword);\n\t\t\t\tif ($pos !== FALSE) {\n\t\t\t\t\t$start = max(0, $pos - 100);\n\t\t\t\t\t$length = 200;\n\t\t\t\t\twhile ($start > 0 && $text[$start] != ' ') $start--; // whole words\n\t\t\t\t\twhile ($length < 250 && $text[$start + $length] != ' ') $length++; // whole words\n\t\t\t\t\t$line = substr($text, $start, $length) . \"&hellip;\";\n\t\t\t\t\tif (strlen($line) > 100) return $line;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn substr($text, 0, 200) . \"&hellip;\";\n\t}", "private static function truncateOnWord(string $text, int $maxLength): string\n {\n $text = self::truncateToLength($text, $maxLength);\n\n if (false !== $index = mb_strrpos($text, ' ')) {\n return mb_substr($text, 0, $index);\n }\n\n return $text;\n }", "function string_limit_words($string, $word_limit) {\n $words = explode(' ', $string, ($word_limit + 1));\n if (count($words) > $word_limit) {\n array_pop($words);\n echo implode(' ', $words).\"...\";\n } else {\n echo implode(' ', $words);\n }\n}", "function limitText($string = null){\n $string = strip_tags($string);\n\n if (strlen($string) > 100) {\n\n // truncate string\n $stringCut = substr($string, 0, 100);\n $endPoint = strrpos($stringCut, ' ');\n\n //if the string doesn't contain any space then it will cut without word basis.\n $string = $endPoint? substr($stringCut, 0, $endPoint) : substr($stringCut, 0);\n $string .= '... ';\n }\n\n return $string;\n }", "function trimed_excerpt($charlength) {\n $excerpt = get_the_excerpt();\n $charlength++;\n if ( mb_strlen( $excerpt ) > $charlength ) {\n $subex = mb_substr( $excerpt, 0, $charlength - 5 );\n $exwords = explode( ' ', $subex );\n $excut = -( mb_strlen(mb_strwidth( $exwords[ count( $exwords ) - 1 ] ) ));\n if ( $excut < 0 ) {\n echo mb_substr( $subex, 0, $excut );\n } else {\n echo $subex;\n }\n echo '...';\n\n } else {\n echo $excerpt;\n }\n }" ]
[ "0.74418277", "0.6934533", "0.6890033", "0.6880798", "0.6815208", "0.6813299", "0.6757643", "0.6591416", "0.65708584", "0.65597284", "0.6480878", "0.6458832", "0.64586407", "0.64367104", "0.6429382", "0.6394227", "0.63720965", "0.63665", "0.6347749", "0.63473994", "0.63160723", "0.62973565", "0.62959003", "0.6279658", "0.625027", "0.62435085", "0.62401426", "0.62120605", "0.6209549", "0.618357", "0.6156292", "0.6150258", "0.6147481", "0.6133167", "0.6115668", "0.6110522", "0.6103291", "0.6100041", "0.60948503", "0.6093337", "0.6069513", "0.60664475", "0.60524976", "0.6019773", "0.6010309", "0.59655774", "0.5950646", "0.5933174", "0.5929306", "0.5926097", "0.5921194", "0.5916802", "0.59164333", "0.5905807", "0.5890721", "0.5878973", "0.58700484", "0.58641577", "0.58632356", "0.58555084", "0.5848838", "0.58479977", "0.5844413", "0.58387744", "0.5838065", "0.58183914", "0.5815367", "0.5798447", "0.5782364", "0.57777476", "0.5764521", "0.57549417", "0.5738633", "0.57063156", "0.57036906", "0.5695527", "0.56940776", "0.56616855", "0.565274", "0.56518894", "0.56354845", "0.56305885", "0.5628661", "0.5624832", "0.5622445", "0.56201446", "0.56174004", "0.56157535", "0.56124246", "0.55937344", "0.5585661", "0.55833083", "0.55804896", "0.5575976", "0.55728465", "0.55679786", "0.5561591", "0.5561186", "0.5558534", "0.5558457" ]
0.8003808
0
MySQL AES Encryption replication in PHP These methods will replicate MySQL's AES encryption methods MySQL Equivalent: SELECT AES_ENCRYPT('test', '') AS enc EXAMPLE : Group 1 $a = mysql_aes_encrypt('test'); echo base64_encode($a).''; $result = $this>getApplication()>getDatabase()>query("SELECT AES_ENCRYPT('test', '" . constant('__ENCRYPTION_KEY__') ."') AS enc"); $b = $result[0]['enc']; echo base64_encode($b).''; Group 2 $result = $this>getApplication()>getDatabase()>query("SELECT AES_DECRYPT('" . $a . "', '". constant('__ENCRYPTION_KEY__') ."') AS decc"); $c = $result[0]['decc']; echo $c.""; $d = mysql_aes_decrypt($b); echo $d.""; Comparison var_dump($a===$b); var_dump($c===$d); this method will generate the AES encryption salt from a key
MySQL AES шифрование репликация в PHP Эти методы будут реплицировать методы шифрования AES MySQL MySQL эквивалент: SELECT AES_ENCRYPT('test', '') AS enc ПРИМЕР: Группа 1 $a = mysql_aes_encrypt('test'); echo base64_encode($a).''; $result = $this->getApplication()->getDatabase()->query("SELECT AES_ENCRYPT('test', '" . constant('__ENCRYPTION_KEY__') ."') AS enc"); $b = $result[0]['enc']; echo base64_encode($b).''; Группа 2 $result = $this->getApplication()->getDatabase()->query("SELECT AES_DECRYPT('" . $a . "', '". constant('__ENCRYPTION_KEY__') ."') AS decc"); $c = $result[0]['decc']; echo $c.""; $d = mysql_aes_decrypt($b); echo $d.""; Сравнение var_dump($a===$b); var_dump($c===$d); этот метод будет генерировать соль шифрования AES из ключа
function genetate_mysql_aes_key($key) { $new_key = str_repeat(chr(0), 16); for($i=0,$len=strlen($key);$i<$len;$i++) { $new_key[$i%16] = $new_key[$i%16] ^ $key[$i]; } return $new_key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mysql_aes_encrypt($val)\r\n{\r\n\t$key = genetate_mysql_aes_key(constant('__ENCRYPTION_KEY__'));\r\n\t$pad_value = 16-(strlen($val) % 16);\r\n\t$val = str_pad($val, (16*(floor(strlen($val) / 16)+1)), chr($pad_value));\r\n\treturn (mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $val, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM)));\r\n}", "function encryptAES($plaintext) {\n $cipher = new Crypt_AES(CRYPT_MODE_ECB);\n $aesKeyFileName = \"./.data/.aes_key.txt\";\n $key = file_get_contents($aesKeyFileName);\n\n $cipher->setKey($key);\n $cipher->disablePadding();\n return base64_encode($cipher->encrypt($plaintext));\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n\n\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n}", "function je_crypt( $string, $action = 'e' ) {\n // you may change these values to your own\n $secret_key = '616CFC9E0918EBA1C7792E5FC6CE4A644FB35C251DB2BC33';\n $secret_iv = '19F31EF5BA2C35CE045A19BEE4C8FDF5';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n\n return $output;\n}", "Public function encrypt($string) {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n \n \n return $output;\n}", "public static function encrypt($plaintext) {\n if (apc_exists('DBKEY')) {\n $iv_size = openssl_cipher_iv_length('AES-128-CBC');\n $iv = openssl_random_pseudo_bytes($iv_size);\n $ret = base64_encode($iv.openssl_encrypt($plaintext, 'AES-128-CBC', apc_fetch('DBKEY'), OPENSSL_RAW_DATA, $iv));\n return $ret;\n } else {\n return false;\n }\n }", "function my_simple_crypt($string, $action ) {\n $secret_key = 'hfhdfhf';\n $secret_iv = 'hdfhfghdfghhfdhfghfdgh';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n } \n return $output;\n}", "function mysql_aes_decrypt($val)\r\n{\r\n\t$key = genetate_mysql_aes_key(constant('__ENCRYPTION_KEY__'));\r\n\t$val = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $val, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM));\r\n\treturn rtrim($val, \"\\0..\\16\");\r\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n $secret_key = 'mwa_encyption';\n $secret_iv = '9886162566';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n\n return $output;\n}", "function custom_encrypt($string) {\n\n $secure_key = \"0008754063617000\";\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $secret_key = $secure_key;\n $secret_iv = strrev($secure_key);\n // hash\n $key = hash('sha256', $secret_key);\n \n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n $output_str = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = rtrim(strtr(base64_encode($output_str), '+/', '-_'), '='); \n return $output;\n}", "function my_simple_crypt($string, $action = 'e')\n {\n $secret_key = 'mwa_encyption';\n $secret_iv = '9886162566';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n \n if ($action == 'e') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } elseif ($action == 'd') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n \n return $output;\n }", "function my_simple_crypt( $string, $action = 'e' ) {\n $secret_key = 'my@simple#secret-key234';\n $secret_iv = 'my@simple#secret-iv345';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n}", "function encryptAES($str,$key) {\n\t//echo $this->$str;\n\t//die();\n\t//$key=\"01922918104401922918104401922918\";\n\t$iv = 'PGKEYENCDECIVSPC';\n\t$encrypted = openssl_encrypt($str, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);\n\t$encrypted=unpack('C*', ($encrypted));\n\t$encrypted=$this->byteArray2Hex($encrypted);\n\t$encrypted = urlencode($encrypted);\n return $encrypted;\n}", "function aplCustomEncrypt($string, $key)\n {\n $encrypted_string=null;\n\n if (!empty($string) && !empty($key))\n {\n $iv=openssl_random_pseudo_bytes(openssl_cipher_iv_length(\"aes-256-cbc\")); //generate an initialization vector\n\n $encrypted_string=openssl_encrypt($string, \"aes-256-cbc\", $key, 0, $iv); //encrypt the string using AES 256 encryption in CBC mode using encryption key and initialization vector\n $encrypted_string=base64_encode($encrypted_string.\"::\".$iv); //the $iv is just as important as the key for decrypting, so save it with encrypted string using a unique separator \"::\"\n }\n\n return $encrypted_string;\n }", "function encript($key,$plaintext)\n{\n\n //$key = base64_decode($key1);\n \n # create a random IV to use with CBC encoding\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n \n # creates a cipher text compatible with AES (Rijndael block size = 128)\n # to keep the text confidential \n # only suitable for encoded input that never ends with value 00h\n # (because of default zero padding)\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n\n # prepend the IV for it to be available for decryption\n $ciphertext = $iv . $ciphertext; \n \n \n //----check how to decode------\n //if (decript($ciphertext,$key)!=$plaintext)\n {\n echo \"<div >text: <i> \". $plaintext .\"</i><br>key: <br><b>\". $key.\"</b><br>to64<br>\". base64_encode($key);\n echo \"<br>from64<br>\".base64_decode($key).\"</div>\";\n }\n return $ciphertext;\n\n # === WARNING ===\n # Resulting cipher text has no integrity or authenticity added\n # and is not protected against padding oracle attacks.\n}", "function encrypt($s) {\n\t\t$s = serialize($s);\n\t\t$value = NULL;\n\t\t// Check key. If key is NULL alert user and die\n\t\tif($this->key !== NULL) {\n\t\t\t// Key good start encrypting\n\t\t\n\t\t\t//$iv_size = mcrypt_get_iv_size($this->cipher, $this->mode);\n\t\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t\n\t\t\t//$value = mcrypt_encrypt($this->cipher, $this->key, $s, $this->mode, $iv);\n\t\t\t$value = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $s, MCRYPT_MODE_ECB, $iv);\n\t\t} else {\n\t\t\tdie(\"You MUST generate a key to encrypt! Key must be the same for decrypt to work properly. Encryption.encrypt\");\n\t\t}\n\t\t\n\t\treturn $value;\t\n\t}", "function pass_encrypt($string,$key)\n{\n \n $iv = mcrypt_create_iv(\n mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC),\n MCRYPT_DEV_URANDOM\n);\n\n$encrypted = base64_encode(\n $iv .\n mcrypt_encrypt(\n MCRYPT_RIJNDAEL_128,\n hash('sha256', $key, true),\n $string,\n MCRYPT_MODE_CBC,\n $iv\n )\n);\nreturn $encrypted;\n}", "function encryptAESold($str,$key) {\n$str = $this->pkcs5_pad($str);\n$ivlen = openssl_cipher_iv_length($cipher=\"aes-192-cbc\");\n//$key=substr($key,0,16);\n//echo $key;\n//die();\n$iv=\"PGKEYENCDECIVSPC\";\n$encrypted = openssl_encrypt($str, \"aes-192-cbc\",$key, OPENSSL_ZERO_PADDING, $iv);\n$encrypted = base64_decode($encrypted);\n$encrypted=unpack('C*', ($encrypted));\n$encrypted=$this->byteArray2Hex($encrypted);\n$encrypted = urlencode($encrypted);\nreturn $encrypted;\n}", "function MAIL_AESencode($key,$text)\n{\n\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);\n\treturn($crypttext);\n}", "function simple_encrypt($text, $salt = \"VUHuiU6b8jgieEG0p79Yx9T4G8Zqp880\") {\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n\t\t\t$secret_key = '123456789876543212';\n\t\t\t$secret_iv = 'abcdefrgthytujkloinbvfd';\n\t\t \n\t\t\t$output = false;\n\t\t\t$encrypt_method = \"AES-256-CBC\";\n\t\t\t$key = hash( 'sha256', $secret_key );\n\t\t\t$iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\t\t \n\t\t\tif( $action == 'e' ) {\n\t\t\t\t$output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n\t\t\t}\n\t\t\telse if( $action == 'd' ){\n\t\t\t\t$output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n\t\t\t}\n\t\t \n\t\t\treturn $output;\n\t}", "function my_simple_crypt( $string, $action ) {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n }", "function my_encrypt($data , $key) {\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n}", "function rinjdael_enc(string $text, string $key)\n{\n\t//generar structura\n\t/*\n\t\t#define KS_LENGTH\t\t60\n\t*/\n\t//$cipher->aesencrypt_key();\n\t//$cipher->aesencrypt();\n\n\t$code = openssl_encrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t//$code = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB);\n\n\treturn $code;\n}", "function IDcryptor( $string, $action = 'encrypt' ) {\n\n $secret_key = 'something';\n\n $secret_iv = 'something_secret_iv';\n\n \n\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n\n $key = hash( 'sha256', $secret_key );\n\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n \n\n if( $action == 'encrypt' ) {\n\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n\n }\n\n else if( $action == 'decrypt' ){\n\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n\n }\n\n \n\n return $output;\n\n}", "function aes_decrypt($encrypted,$key)\n{\n $encrypted = pack('H*',$encrypted);\n\n $key = mysql_aes_key($key);\n return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$encrypted,MCRYPT_MODE_ECB,''),\"\\x00..\\x1F\");\n}", "function encrypt($data, $key = MY_KEY) {\r\n $encryption_key = base64_decode($key);\r\n // Generate an initialization vector\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\r\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\r\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\r\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\r\n return base64_encode($encrypted . '::' . $iv);\r\n}", "function cryptor_crypt( $string, $action = 'e' ) {\n $key = 'secret_key_secret';\n $iv = 'secret_iv_secret';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $key );\n $iv = substr( hash( 'sha256', $iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n\n return $output;\n}", "function encrypt($data, $key)\n{\n return strtoupper(bin2hex(openssl_encrypt($data, 'aes-128-ecb', $key, OPENSSL_PKCS1_PADDING)));\n}", "function fnEncrypt($sValue, $sSecretKey) {\n global $iv;\n return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_CBC, $iv)), \"\\0\\3\");\n}", "function encryptAes($string, $key)\n{\n // Add PKCS5 padding to the text to be encypted.\n $string = addPKCS5Padding($string);\n\n // Perform encryption with PHP's openssl module.\n $encrypted = openssl_encrypt($string, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $key);\n\n // Perform hex encoding and return.\n return \"@\" . strtoupper(bin2hex($encrypted));\n}", "function encrypt($plain_text, $password=\"nicecode\", $iv_len = 16)\n{\n$plain_text .= \"\\x13\";\n$n = strlen($plain_text);\nif ($n % 16) $plain_text .= str_repeat(\"\\0\", 16 - ($n % 16));\n$i = 0;\n$enc_text = $iv_len;\n$iv = substr($password ^ $enc_text, 0, 512);\nwhile ($i < $n) {\n$block = substr($plain_text, $i, 16) ^ pack('H*', md5($iv));\n$enc_text .= $block;\n$iv = substr($block . $iv, 0, 512) ^ $password;\n$i += 16;\n}\n$hasil=base64_encode($enc_text);\n$hasil=str_replace('=', '1', $hasil);\nreturn str_replace('+', '2', $hasil);\n}", "function encrypt($data){\n\t$encrypted = openssl_encrypt($data, \"AES-256-CBC\", \"The goodest key\", 0, \"The bestest 1key\");\n\treturn $encrypted;\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n // you may change these values to your own\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n\n return $output;\n }", "function my_encrypt($data, $key) {\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n}", "function encryptit($decrypted, $password, $salt='!kQm*fF3pXe1Kbm%9') {\n$key = hash('SHA256', $salt . $password, true);\n// Build $iv and $iv_base64. We use a block size of 128 bits (AES compliant) and CBC mode. (Note: ECB mode is inadequate as IV is not used.)\nsrand(); $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC), MCRYPT_RAND);\nif (strlen($iv_base64 = rtrim(base64_encode($iv), '=')) != 22) return false;\n// Encrypt $decrypted and an MD5 of $decrypted using $key. MD5 is fine to use here because it's just to verify successful decryption.\n$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $decrypted . md5($decrypted), MCRYPT_MODE_CBC, $iv));\n// We're done!\nreturn $iv_base64 . $encrypted;\n}", "function taiga_crypt( $string, $action = 'e' ) {\n $secret_key = 'taigacorporation';\n $secret_iv = 'mytaigasecret';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n\n return $output;\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n $secret_key = '9k037tgK3jLDd0DigqSthF9jo';\n $secret_iv = 'VrABdhbs62wqbuQGDDTytgP3x';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n $values = explode('|', $output);\n $date = time();\n if($string!=my_simple_crypt($output) || $date < $values[5] || $date > $values[6] || $values[2]!=$ritrovamiDopo)\n return false;\n }\n\n return $output;\n}", "function encrypt_simple($string){\n return base64_encode(base64_encode(base64_encode($string)));\n}", "function encryptor($action, $string) {\n\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n //pls set your unique hashing key\n $secret_key = 'Labels';\n $secret_iv = 'Behlah';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n //do the encyption given text/string/number\n if( $action == 'encrypt' ) {\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = base64_encode($output);\n }\n else if( $action == 'decrypt' ){\n //decrypt the given text/string/number\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function encrypt_data($data,$privateKey = \"a2dc2a99e649f147bcabc5a99bea7d96\"){\n $query = \"select HEX(AES_ENCRYPT('{$data}','{$privateKey}'))\";\n $result = @mysql_query($query);\n if ($result) {\n return @mysql_result($result, 0);\n }\n return \"\";\n }", "function encryptIt( $q ) {\r\n $cryptKey = 'qJB0rGtIn5UB1xG03efyCp';\r\n $qEncoded= base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );\r\n return( $qEncoded );\r\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n $secret_key = env('SECRET_KEY');\n $secret_iv = env('SECRET_IV');\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = substr( hash( 'sha256', $secret_key ), 0 ,32);\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n return $output;\n }", "function fnEncrypt($sValue, $sSecretKey) {\n return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_CBC)), \"\\0\\3\");\n}", "function encrypt( $plaintext, $key ){\n\n // Set up encryption parameters.\n $plaintext_utf8 = utf8_encode($plaintext);\n $inputData = cryptoHelpers::convertStringToByteArray($plaintext);\n $keyAsNumbers = cryptoHelpers::toNumbers(bin2hex($key));\n $keyLength = count($keyAsNumbers);\n $iv = cryptoHelpers::generateSharedKey(16);\n\n $encrypted = AES::encrypt(\n $inputData,\n AES::modeOfOperation_CBC,\n $keyAsNumbers,\n $keyLength,\n $iv\n );\n\n // Set up output format \"plaintextsize-iv-cipher\")\n $retVal = $encrypted['originalsize'] . \"-\"\n . cryptoHelpers::toHex($iv) . \"-\"\n . cryptoHelpers::toHex($encrypted['cipher']);\n\n return $retVal;\n}", "function mc_encrypt($encrypt){\n\tglobal $config;\n\t$key = $config['encryption_key'];\n $encrypt = serialize($encrypt);\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);\n $key = pack('H*', $key);\n $mac = hash_hmac('sha256', $encrypt, substr(bin2hex($key), -32));\n $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $encrypt.$mac, MCRYPT_MODE_CBC, $iv);\n $encoded = base64_encode($passcrypt).'|'.base64_encode($iv);\n return $encoded;\n}", "public function testAesEncrypt()\n {\n if (!extension_loaded('openssl')) {\n $this->setExpectedException('\\SimpleSAML_Error_Exception');\n }\n\n $secret = 'SUPER_SECRET_SALT';\n $e = new ReflectionMethod('\\SimpleSAML\\Utils\\Crypto', '_aesEncrypt');\n $d = new ReflectionMethod('\\SimpleSAML\\Utils\\Crypto', '_aesDecrypt');\n $e->setAccessible(true);\n $d->setAccessible(true);\n\n $original_plaintext = 'SUPER_SECRET_TEXT';\n $ciphertext = $e->invokeArgs(null, array($original_plaintext, $secret));\n $decrypted_plaintext = $d->invokeArgs(null, array($ciphertext, $secret));\n $this->assertEquals($original_plaintext, $decrypted_plaintext);\n }", "function my_encrypt($data, $key)\n{\n\t$encryption_key = base64_decode($key);\n\t// Generate an initialization vector\n\t$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n\t// Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n\t$encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n\t// The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n\treturn base64_encode($encrypted . '::' . $iv);\n}", "function my_encrypt($data, $key) {\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n }", "function sonEncode( $string) {\n\t $secret_key = '#sismik123';\n \t$secret_iv = '#sismik123';\n\t \n\t $output = false;\n\t $encrypt_method = \"AES-256-CBC\";\n\t $key = hash( 'sha256', $secret_key );\n\t $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\t \n \t$output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n\t \n\t return $output;\n\t}", "function encriptar($cadena)\r\n{\r\n //$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));\r\n $cadena = $cadena;\r\n return $cadena;//$encrypted; //Devuelve el string encriptado\r\n\r\n}", "function encrypt($message, $encryption_key){\r\n $key = hex2bin($encryption_key);\r\n $nonceSize = openssl_cipher_iv_length('aes-256-ctr');\r\n $nonce = openssl_random_pseudo_bytes($nonceSize);\r\n $ciphertext = openssl_encrypt(\r\n $message, \r\n 'aes-256-ctr', \r\n $key,\r\n OPENSSL_RAW_DATA,\r\n $nonce\r\n );\r\n return base64_encode($nonce.$ciphertext);\r\n }", "function encrypt_decrypt($action, $string) {\n $secret_key = $GLOBALS['ENCRYPT_KEY'];\n $secret_iv = $GLOBALS['ENCRYPT_KEY'];\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n if ($action == 'encrypt') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } else if ($action == 'decrypt') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function encrypt($str) \n\t\t{\n\t\t$iv = bin2hex(mcrypt_create_iv( 8, MCRYPT_RAND ));\n\t\t/*open encryption module for AES128 CBC*/\n\t\t$td = mcrypt_module_open('rijndael-128', '', 'cbc', $iv);\n\t\t/*init module*/\n\t\tmcrypt_generic_init($td, $this->key, $iv);\n\t\t/*encrypt*/\n\t\t$encrypted = mcrypt_generic($td, padstring($str));\n\t\t/*cleanup*/\n\t\tmcrypt_generic_deinit($td);\n\t\tmcrypt_module_close($td);\n\t\t//concat iv and message\n\t\t/** concat iv and message,\n\t\t * TODO scramble iv into message more thoroughly\n\t\t */\n\t\treturn $iv.bin2hex($encrypted);\n\t}", "function _encrypt($text)\n{\n $secret = _cfg('securitySecret');\n if (!$secret || !function_exists('openssl_encrypt')) {\n return md5($text);\n }\n\n $method = _cipher();\n $ivlen = openssl_cipher_iv_length($method);\n $iv = openssl_random_pseudo_bytes($ivlen);\n\n $textRaw = openssl_encrypt($text, $method, $secret, OPENSSL_RAW_DATA, $iv);\n $hmac = hash_hmac('sha256', $textRaw, $secret, true);\n\n return base64_encode($iv . $hmac . $textRaw );\n}", "function encrypt($message, $encryption_key){\n $key = hex2bin($encryption_key);\n $nonceSize = openssl_cipher_iv_length('aes-256-ctr');\n $nonce = openssl_random_pseudo_bytes($nonceSize);\n $ciphertext = openssl_encrypt(\n $message, \n 'aes-256-ctr', \n $key,\n OPENSSL_RAW_DATA,\n $nonce\n );\n return base64_encode($nonce.$ciphertext);\n }", "abstract protected function _AESKWAlgo(): AESKeyWrapAlgorithm;", "function _recaptcha_aes_encrypt($val, $ky)\n {\n if (!function_exists(\"mcrypt_encrypt\"))\n {\n die(\"To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.\");\n }\n $mode = MCRYPT_MODE_CBC;\n $enc = MCRYPT_RIJNDAEL_128;\n $val = _recaptcha_aes_pad($val);\n return mcrypt_encrypt($enc, $ky, $val, $mode, \"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\");\n }", "function one_way_encrypt($plain){\n\t\treturn trim($this->replace_encrypt_string(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))));\n\t}", "function encryptData($data, $key, $str){\n $encryption_key = base64_decode($key);\n $ivlength = substr(md5($str.\"users\"),1, 16);\n $encryptedData = openssl_encrypt($data, \"aes-256-cbc\", $encryption_key, 0, $ivlength);\n\n return base64_encode($encryptedData.'::'.$ivlength);\n}", "function encryptIt( $q ) {\n $cryptKey = ENC_STRING;\n $qEncoded = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );\n return( $qEncoded );\n}", "function encrypt_decrypt($action, $string) {\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n $secret_key = '9716545921';\n $secret_iv = '1295456179';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n if ($action == 'encrypt') {\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = base64_encode($output);\n } else if ($action == 'decrypt') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function encrypt($data, $key) {\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n}", "public function encrypt( $value ) {\n\t\tif ( ! extension_loaded( 'openssl' ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$method = 'aes-256-ctr';\n\t\t$ivlen = openssl_cipher_iv_length( $method );\n\t\t$iv = openssl_random_pseudo_bytes( $ivlen );\n\n\t\t$raw_value = openssl_encrypt( $value . $this->salt, $method, $this->key, 0, $iv );\n\t\tif ( ! $raw_value ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn base64_encode( $iv . $raw_value );\n\t}", "function mc_encrypt($encrypt) {\n $key = ENCRYPTION_KEY;\n $encrypt = serialize($encrypt);\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);\n $key = pack('H*', $key);\n $mac = hash_hmac('sha256', $encrypt, substr(bin2hex($key), -32));\n $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $encrypt . $mac, MCRYPT_MODE_CBC, $iv);\n $encoded = base64_encode($passcrypt) . '|' . base64_encode($iv);\n return $encoded;\n }", "function _recaptcha_aes_encrypt($val, $ky) {\n\tif (! function_exists ( \"mcrypt_encrypt\" )) {\n\t\tdie ( \"To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.\" );\n\t}\n\t$mode = MCRYPT_MODE_CBC;\n\t$enc = MCRYPT_RIJNDAEL_128;\n\t$val = _recaptcha_aes_pad ( $val );\n\treturn mcrypt_encrypt ( $enc, $ky, $val, $mode, \"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\" );\n}", "function twofish_enc(string $text, string $key)\n{\n\t//$cipher = new twofish();\n\t//$cipher->twoset_key($instance, $key, 4);\n\t//$code=$cipher->twofish_encrypt($instance, $text, $code);\n\t$code = openssl_encrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t//$code = mcrypt_encrypt(MCRYPT_TWOFISH_256, $key, $text, MCRYPT_MODE_ECB);\n\n\treturn $code;\n}", "function encrypt($pure_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n return $encrypted_string;\n}", "function serpent_enc(string $text, string $key)\n\t{\n\t\t//$cipher->serset_key($key);\n\t\t//$cipher->serencrypt($text);\n\t\t$code = openssl_encrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t\t//$code = mcrypt_encrypt(MCRYPT_SERPENT_256, $key, $text, MCRYPT_MODE_ECB);\n\n\t\treturn $code;\n\t}", "public function encrypt_decrypt($action, $string) {\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $secret_key = 'hackcaigi';\n $secret_iv = 'hacklamcho';\n $key = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n if ($action == 'encrypt') {\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = base64_encode($output);\n } else if ($action == 'decrypt') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n return $output;\n}", "function encryptIt($value)\n{\n // The encodeKey MUST match the decodeKey\n $encodeKey = 'Li1KUqJ4tgX14dS,A9ejk?uwnXaNSD@fQ+!+D.f^`Jy';\n $encoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($encodeKey), $value, MCRYPT_MODE_CBC, md5(md5($encodeKey))));\n return ($encoded);\n}", "public function enc($string){\n\t\t$secret_iv = hash('sha256', $this->secret_key);\n\t\t$key = hash('sha256', $secret_iv);\n\t\t$initialization_vector = substr(hash('sha256', $secret_iv), 0, 16);\n\t\t$a = openssl_encrypt($string, $this->encrypt_method, $key, 0, $initialization_vector);\n\t\treturn base64_encode($a); \n\t}", "function encrypt_decrypt($action, $string) {\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n $secret_key = 'This is my secret key';\n $secret_iv = 'This is my secret iv';\n\n // hash\n $key = hash('sha256', $secret_key);\n \n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n if( $action == 'encrypt' ) {\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = base64_encode($output);\n }\n else if( $action == 'decrypt' ){\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function encryptPassword($pwd)\n {\n $key = \"123\";\n $admin_pwd = bin2hex(openssl_encrypt($pwd,'AES-128-CBC', $key)); \n return $admin_pwd;\n }", "function encryptUser($userId){\n\t$encrypted = openssl_encrypt($userId, \"AES-256-CBC\", \"The goodest user\", 0, \"The bestest user\");\n\treturn $encrypted;\n}", "function encriptar($cadena){\n //Una clave de codificacion, debe usarse la misma para encriptar y desencriptar\n // $key='abcdef123456()[]{}ghi789';\n // $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));\n //Devuelve el string encriptado\n $encrypted = md5($cadena);\n return $encrypted;\n }", "protected static function encrypter($string){\r\n $output=FALSE;\r\n $key=hash('sha256', parent::SECRET_KEY);\r\n $iv=substr(hash('sha256', parent::SECRET_IV), 0, 16);\r\n $output=openssl_encrypt($string, parent::METHOD, $key, 0, $iv);\r\n $output=base64_encode($output);\r\n return $output;\r\n }", "function encryptAesArray($plainArray){\n\t\t \n\t\n\t\t$uniqueRandonStr = function($lenght){ $bytes = openssl_random_pseudo_bytes($lenght); return bin2hex($bytes); };\n\t\t \n\t\t$uniqueKey = function($lenght){ \n\t\t\t$bytes = openssl_random_pseudo_bytes($lenght);\n\t\t\t$uniqueRandonStr = bin2hex($bytes);\n\t\t\treturn AES::keygen( AES::KEYGEN_256_BITS, $uniqueRandonStr ); \n\t\t}; //dinamico\n\n\n\t\techo $this->keyUniq = $uniqueKey(32);\n\t\t\n\t\tforeach ( $plainArray as $key => $value ){\n\t\t\t\n\t\t\t\n\t\t\t$encodedKey = base64_encode( mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->keyUniq, $key, MCRYPT_MODE_ECB) );\n\t\t\t$encodedValue = base64_encode( mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->keyUniq, $value, MCRYPT_MODE_ECB) );\n\t\t\t\n\t\t\t$encryptedArray [ $encodedKey ] = $encodedValue ;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $encryptedArray;\n\t}", "public function encryptString($plaintext, $key = null) {\r\n\t\t//$plaintext = \"message to be encrypted\";\r\n\t\t$key = 'Q29EZTJkMGIxbzZlZW9kYkNvRGUyZDBiMW82ZWVvZGI==';\r\n\t\t// Remove the base64 encoding from our key\r\n\t\t$encryption_key = base64_decode($key);\r\n\t\t// Generate an initialization vector\r\n\t\t$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\r\n\t\t// Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\r\n\t\t$encrypted = openssl_encrypt($plaintext, 'aes-256-cbc', $encryption_key, 0, $iv);\r\n\t\t// The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\r\n\t\treturn base64_encode($encrypted . '::' . $iv);\t\t\r\n\t}", "function encrypt($plain) {\t\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "function encrypt_easy($string, $key){\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM);\n $string = mcrypt_encrypt(MCRYPT_BLOWFISH, $key,\n $string, MCRYPT_MODE_CBC, $iv);\n\n return array(base64_encode($string), base64_encode($iv));\n }", "function encrypted($kode){\n\t$ciphering = \"AES-128-CTR\"; \n \n\t// Use OpenSSl Encryption method \n\t$iv_length = openssl_cipher_iv_length($ciphering); \n\t$options = 0; \n \n\t// Non-NULL Initialization Vector for encryption \n\t$encryption_iv = '1234567891011121'; \n \n\t// Store the encryption key \n\t$encryption_key = \"orcoiste\"; \n \n\t// Use openssl_encrypt() function to encrypt the data \n\t$encryption = openssl_encrypt($kode, $ciphering, \n $encryption_key, $options, $encryption_iv); \n\treturn $encryption;\n}", "static public function encryptAes($string, $key)\n {\n // AES encryption, CBC blocking with PKCS5 padding then HEX encoding.\n // Add PKCS5 padding to the text to be encypted.\n $string = self::addPKCS5Padding($string);\n\n // Perform encryption with PHP's MCRYPT module.\n $crypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $string, MCRYPT_MODE_CBC, $key);\n\n // Perform hex encoding and return.\n return \"@\" . strtoupper(bin2hex($crypt));\n }", "public function encrypt($data);", "public function encrypt($data);", "public function encrypt($data);", "public function encryption($string){\n\t\t\t$output=FALSE;\n\t\t\t$key=hash('sha256', SECRET_KEY);\n\t\t\t$iv=substr(hash('sha256', SECRET_IV), 0, 16);\n\t\t\t$output=openssl_encrypt($string, METHOD, $key, 0, $iv);\n\t\t\t$output=base64_encode($output);\n\t\t\treturn $output;\n\t\t}", "protected function generateEncryptionKey()\n {\n return 'base64:'.base64_encode(random_bytes(\n config('app.cipher') == 'AES-128-CBC' ? 16 : 32\n ));\n }", "function encryption($string ,$salt = \"\")\n{\n return sha1($salt.$string); \n}", "function encrypt($str, $key) {\n $key = str_pad($key, 16);\n //$key = $this->hex2bin($key);\n $iv = $this->iv;\n\n $td = mcrypt_module_open('rijndael-128', '', 'cbc', $iv);\n\n mcrypt_generic_init($td, $key, $iv);\n $encrypted = mcrypt_generic($td, $str);\n\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n\n return bin2hex($encrypted);\n }", "function createLogin(){\r\n $query = \" INSERT\r\n INTO\r\n login\r\n SET\r\n username=:username,\r\n password=AES_ENCRYPT(:password,:key),\r\n email=:email,\r\n salt=:salt\";\r\n\r\n // prepare query\r\n $stmt = $this->conn->prepare($query);\r\n\r\n // sanitize values\r\n $this->password=htmlspecialchars(strip_tags($this->password));\r\n $this->username=htmlspecialchars(strip_tags($this->username));\r\n $this->email=htmlspecialchars(strip_tags($this->email));\r\n $this->key=htmlspecialchars(strip_tags($this->key));\r\n $this->salt=htmlspecialchars(strip_tags($this->salt));\r\n\r\n // bind values\r\n $stmt->bindParam(\":password\", $this->password);\r\n $stmt->bindParam(\":username\", $this->username);\r\n $stmt->bindParam(\":email\", $this->email);\r\n $stmt->bindParam(\":key\", $this->key);\r\n $stmt->bindParam(\":salt\", $this->salt);\r\n\r\n \r\n // execute query\r\n if($stmt->execute()){\r\n return true;\r\n }\r\n \r\n return false;\r\n \r\n }", "public static function sqlEncriptar($Str_Message) {\r\n $Len_Str_Message=STRLEN($Str_Message); \r\n $Str_Encrypted_Message=\"\"; \r\n for($Position = 0;$Position<$Len_Str_Message;$Position++){ \r\n // long code of the function to explain the algoritm \r\n //this function can be tailored by the programmer modifyng the formula \r\n //to calculate the key to use for every character in the string. \r\n $Key_To_Use = (($Len_Str_Message+$Position)+1); // (+5 or *3 or ^2) \r\n //after that we need a module division because can´t be greater than 255 \r\n $Key_To_Use = (255+$Key_To_Use) % 255; \r\n $Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1); \r\n $Ascii_Num_Byte_To_Encrypt = ORD($Byte_To_Be_Encrypted); \r\n $Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use; //xor operation \r\n $Encrypted_Byte = CHR($Xored_Byte); \r\n $Str_Encrypted_Message .= $Encrypted_Byte;\r\n }\r\n return $Str_Encrypted_Message; \r\n }", "#[Deprecated(since: '7.1')]\nfunction mcrypt_encrypt($cipher, $key, $data, $mode, $iv = null) {}", "function XCrypt ($parm0,$parm1,$parm2) {\r\r\n // if ($testcrypt == \"1\") { print\"<P>Instring - $parm0\\n\"; }\r\r\n $inarray = str_split($parm0);\r\r\n $ekey = $parm1.$parm1.$parm1.$parm1.$parm1.$parm1.$parm1.$parm1;\r\r\n $ekeyarray = str_split($ekey);\r\r\n $nemax = sizeof($inarray);\r\r\n $outarray = array(); $outstring = \"\";\r\r\n $blank = array(\" \");\r\r\n $alphanuma = array_merge(explode(\",\",$GLOBALS{'STATIC_numerica'}), \r\r\n explode(\",\",$GLOBALS{'STATIC_upperalpha'}));\r\r\n $alphanuma = array_merge($blank, $alphanuma);\r\r\n for ($ne = 0; $ne < $nemax; $ne++) {\r\r\n $echar = $inarray[$ne];\r\r\n $ekeychar = $ekeyarray[$ne];\r\r\n $echarn = ord($echar);\r\r\n $ekeycharn = ord($ekeychar); \r\r\n $inalphanuma = \"0\";\r\r\n if (($echarn > 96)&&($echarn < 123)) {$echarni = $echarn - 60; $inalphanuma = \"1\"; }\r\r\n if (($echarn > 64)&&($echarn < 91)) {$echarni = $echarn - 54; $inalphanuma = \"1\"; } \r\r\n if (($echarn > 47)&&($echarn < 58)) {$echarni = $echarn - 47; $inalphanuma = \"1\"; } \r\r\n if ($echarn == 32) {$echarni = 0; $inalphanuma = \"1\"; } \r\r\n if (($ekeycharn > 96)&&($ekeycharn < 123)) {$ekeycharni = $ekeycharn - 60; }\r\r\n if (($ekeycharn > 64)&&($ekeycharn < 91)) {$ekeycharni = $ekeycharn - 54; } \r\r\n if (($ekeycharn > 47)&&($ekeycharn < 58)) {$ekeycharni = $ekeycharn - 47; } \r\r\n if ($ekeycharn == 32) {$ekeycharni = 0; $keyinalphanuma = \"1\"; }\r\r\n if ( $inalphanuma == \"1\" ) {\r\r\n if ($parm2 == \"encrypt\" ) { $rcharni = $echarni - $ekeycharni;} else { $rcharni = $echarni + $ekeycharni; }\r\r\n if ($rcharni < 0) { $rcharni = $rcharni + 63; }\r\r\n if ($rcharni > 62) { $rcharni = $rcharni - 63; }\r\r\n array_push($outarray, $alphanuma[$rcharni]);\r\r\n } else {\r\r\n array_push($outarray, $echar);\t\r\r\n } \r\r\n }\r\r\n foreach ($outarray as $bit) {\r\r\n $outstring = $outstring.$bit;\r\r\n }\r\r\n // if ($testcrypt == \"1\") { print\"<P>Outstring - $outstring\\n\"; }\r\r\n // print\"<P>Outstring - |$outstring|\\n\";\r\r\n return $outstring;\r\r\n}", "#[Deprecated(since: '7.1')]\nfunction mcrypt_enc_self_test($td) {}", "function double_encrypt($input_text, $key) {\n//fill all the characters of input into an array, # for space\n$info = create_arr($key, $input_text);\n$arr = $info[0];\n$row = $info[1];\n$col = $info[2]; \n// shuffle rows and columns\n$row_range = range(0, $row-1);\nshuffle($row_range);\n$col_range = range(0, $col-1);\nshuffle($col_range);\n// create new array to hold the new order of rows\n$row_arr = array(array());\n$counter = 0; // iterate through the string\nforeach($row_range as $r) {\n$row_arr[$counter] = $arr[$r];\n$counter++;\n} \n//the complete array with the new order of columns\n$cipher_arr = $row_arr;\n$counter = 0;\nforeach ($col_range as $c) {\nfor($i=0; $i<$row; $i++) {\n$cipher_arr[$i][$counter] = $row_arr[$i][$c];\n}\n$counter++;\n}\n//convert to text\n$output_text = \"\";\nfor($i=0; $i<$row; $i++) {\nfor($j=0; $j<$col; $j++) {\n$output_text .= $cipher_arr[$i][$j];\n}\n}\nreturn array($output_text, $row_range, $col_range);\n}", "public static function encrypt_aes_cbc($key, $data) {\n $iv = str_repeat(\"\\0\", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC));\n return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv);\n }", "function aes256Encrypt_unity($key, $data, $mode = MCRYPT_MODE_CBC, $block_size = MCRYPT_RIJNDAEL_256) {\n\t\t$cipher = mcrypt_module_open($block_size, '', $mode, '');\n\t\t$iv_size = mcrypt_enc_get_iv_size($cipher);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\tif (mcrypt_generic_init($cipher, $key, $iv) != -1){\n\t\t\t$encrypted = mcrypt_generic($cipher, $data);\n\t\t\tmcrypt_generic_deinit($cipher);\n\t\t\treturn $iv.$encrypted;\n\t\t}\n\t\treturn;\n\t}", "function encript_value($q) {\n $cryptKey = 'qJB0rGtIn7dsnbt3efyCp';\n $qEncoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($cryptKey), $q, MCRYPT_MODE_CBC, md5(md5($cryptKey))));\n return( $qEncoded );\n}", "public function encrypt($string);" ]
[ "0.80324954", "0.7058521", "0.7040508", "0.6987216", "0.6972717", "0.6914716", "0.69106245", "0.68980724", "0.6879728", "0.6867153", "0.6840199", "0.680175", "0.679666", "0.672067", "0.6718179", "0.6705085", "0.66954327", "0.667347", "0.66673136", "0.66524535", "0.6617439", "0.6615772", "0.66029006", "0.6601528", "0.6589169", "0.6548677", "0.6545409", "0.6533692", "0.65245044", "0.6505422", "0.64869225", "0.6479502", "0.64727813", "0.6457425", "0.6445291", "0.64422446", "0.64375156", "0.64328986", "0.6427237", "0.6413429", "0.6407062", "0.63829815", "0.63619167", "0.6343906", "0.6343662", "0.6325927", "0.63242084", "0.6322368", "0.6321855", "0.63185567", "0.6305733", "0.6287701", "0.62858665", "0.6260601", "0.6249372", "0.62473935", "0.6246246", "0.6235852", "0.62316996", "0.6229242", "0.62221056", "0.6206784", "0.62062556", "0.6204216", "0.62015206", "0.6200045", "0.61942506", "0.6186714", "0.6184908", "0.61560774", "0.6152887", "0.6146409", "0.61300766", "0.6120486", "0.61187017", "0.6116107", "0.610777", "0.6100047", "0.6093974", "0.6088471", "0.6084917", "0.6064631", "0.60643244", "0.6060256", "0.6060256", "0.6060256", "0.60582244", "0.60571975", "0.6049782", "0.60380965", "0.60350704", "0.6025056", "0.602027", "0.60080385", "0.6001676", "0.5996205", "0.59941393", "0.5990031", "0.5977325", "0.59676063" ]
0.7097407
1
This method encrypts a value in the MySQL AES methods
Этот метод шифрует значение с использованием методов AES MySQL
function mysql_aes_encrypt($val) { $key = genetate_mysql_aes_key(constant('__ENCRYPTION_KEY__')); $pad_value = 16-(strlen($val) % 16); $val = str_pad($val, (16*(floor(strlen($val) / 16)+1)), chr($pad_value)); return (mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $val, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function encrypt($value);", "public function encrypt($value);", "function fnEncrypt($sValue, $sSecretKey) {\n global $iv;\n return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_CBC, $iv)), \"\\0\\3\");\n}", "function __encrypt($value) {\n\t\tif (is_array($value)) {\n\t\t\t$value = $this->__implode($value);\n\t\t}\n\n\t\tif ($this->__encrypted === true) {\n\t\t\t$type = $this->__type;\n\t\t\t$value = \"Q2FrZQ==.\" .base64_encode(Security::$type($value, $this->key));\n\t\t}\n\t\treturn $value;\n\t}", "function encryptIt($value)\n{\n // The encodeKey MUST match the decodeKey\n $encodeKey = 'Li1KUqJ4tgX14dS,A9ejk?uwnXaNSD@fQ+!+D.f^`Jy';\n $encoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($encodeKey), $value, MCRYPT_MODE_CBC, md5(md5($encodeKey))));\n return ($encoded);\n}", "function fnEncrypt($sValue, $sSecretKey) {\n return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_CBC)), \"\\0\\3\");\n}", "public function encrypt( $value ) {\n\t\tif ( ! extension_loaded( 'openssl' ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$method = 'aes-256-ctr';\n\t\t$ivlen = openssl_cipher_iv_length( $method );\n\t\t$iv = openssl_random_pseudo_bytes( $ivlen );\n\n\t\t$raw_value = openssl_encrypt( $value . $this->salt, $method, $this->key, 0, $iv );\n\t\tif ( ! $raw_value ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn base64_encode( $iv . $raw_value );\n\t}", "public function encrypt($data);", "public function encrypt($data);", "public function encrypt($data);", "public function encrypt($value) {\n\t\t$key = $this->config->get('config_encryption');\n\t\t$my_key = hash('sha256', $key, true);\n\t\treturn strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $my_key, true), $value, MCRYPT_MODE_ECB)), '+/=', '-_,');\n\t}", "function MAIL_AESencode($key,$text)\n{\n\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);\n\treturn($crypttext);\n}", "function encrypt($s) {\n\t\t$s = serialize($s);\n\t\t$value = NULL;\n\t\t// Check key. If key is NULL alert user and die\n\t\tif($this->key !== NULL) {\n\t\t\t// Key good start encrypting\n\t\t\n\t\t\t//$iv_size = mcrypt_get_iv_size($this->cipher, $this->mode);\n\t\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t\n\t\t\t//$value = mcrypt_encrypt($this->cipher, $this->key, $s, $this->mode, $iv);\n\t\t\t$value = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $s, MCRYPT_MODE_ECB, $iv);\n\t\t} else {\n\t\t\tdie(\"You MUST generate a key to encrypt! Key must be the same for decrypt to work properly. Encryption.encrypt\");\n\t\t}\n\t\t\n\t\treturn $value;\t\n\t}", "function encriptar($cadena)\r\n{\r\n //$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));\r\n $cadena = $cadena;\r\n return $cadena;//$encrypted; //Devuelve el string encriptado\r\n\r\n}", "function encrypt_data($data,$privateKey = \"a2dc2a99e649f147bcabc5a99bea7d96\"){\n $query = \"select HEX(AES_ENCRYPT('{$data}','{$privateKey}'))\";\n $result = @mysql_query($query);\n if ($result) {\n return @mysql_result($result, 0);\n }\n return \"\";\n }", "abstract public function encryptData($data);", "public function encrypt($value=\"\",$key=\"\")\n {\n $iv = $this->generate_iv();\n // Clear output\n $out = '';\n // First block of output is ($this->_key XOR IV)\n for($c=0;$c < $this->_hash_lenght;$c++) {\n $out .= chr(ord($iv[$c]) ^ ord($this->_key[$c]));\n } \n\n // Use IV as first key\n $key = $iv;\n $c = 0;\n\n // Go through input string\n while($c < strlen($value)) {\n // If we have used all characters of the current key we switch to a new one\n if(($c != 0) and ($c % $this->_hash_lenght == 0)) {\n // New key is the hash of current key and last block of plaintext\n $key = $this->hash_value($key . substr($value,$c - $this->_hash_lenght,$this->_hash_lenght));\n }\n // Generate output by xor-ing input and key character for character\n $out .= chr(ord($key[$c % $this->_hash_lenght]) ^ ord($value[$c]));\n $c++;\n }\n // Apply base64 encoding if necessary\n //echo \"output not base 64 coded--->\". $out. \"</br>\";\n if($this->_base64) $out =$this->base64_url_encode($out);\n //echo \"output base 64 encoded--->\". $out. \"</br>\";\n return $out;\n }", "function updateField($fieldName, $value, $id){\n //var_dump($fieldName);\n try{\n $query = \"UPDATE players SET $fieldName = AES_ENCRYPT(:value, '!trN8xLnaHcA@cKu') WHERE id = :id\";\n $stmt = $this->dbConn->prepare($query);\n $stmt->execute(array(\n \":value\"=>$value,\n \":id\"=>$id\n ));\n }catch(PDOException $e){\n return \"A problem occurred updating $tableName\";\n }\n }", "function cryptoJsAesEncrypt($passphrase, $value){ /* character encrypter */\r\n\t\t\t$salt = openssl_random_pseudo_bytes(8);\r\n\t\t\t$salted = '';\r\n\t\t\t$dx = '';\r\n\t\t\twhile (strlen($salted) < 48) {\r\n\t\t\t\t$dx = md5($dx.$passphrase.$salt, true);\r\n\t\t\t\t$salted .= $dx;\r\n\t\t\t}\r\n\t\t\t$key = substr($salted, 0, 32);\r\n\t\t\t$iv = substr($salted, 32,16);\r\n\t\t\t$encrypted_data = openssl_encrypt(json_encode($value), 'aes-256-cbc', $key, true, $iv);\r\n\t\t\t$data = array(\"ct\" => base64_encode($encrypted_data), \"iv\" => bin2hex($iv), \"s\" => bin2hex($salt));\r\n\t\t\treturn json_encode($data);\r\n\t\t}", "function encryptAES($plaintext) {\n $cipher = new Crypt_AES(CRYPT_MODE_ECB);\n $aesKeyFileName = \"./.data/.aes_key.txt\";\n $key = file_get_contents($aesKeyFileName);\n\n $cipher->setKey($key);\n $cipher->disablePadding();\n return base64_encode($cipher->encrypt($plaintext));\n}", "function encryptAES($str,$key) {\n\t//echo $this->$str;\n\t//die();\n\t//$key=\"01922918104401922918104401922918\";\n\t$iv = 'PGKEYENCDECIVSPC';\n\t$encrypted = openssl_encrypt($str, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);\n\t$encrypted=unpack('C*', ($encrypted));\n\t$encrypted=$this->byteArray2Hex($encrypted);\n\t$encrypted = urlencode($encrypted);\n return $encrypted;\n}", "function custom_encrypt($string) {\n\n $secure_key = \"0008754063617000\";\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $secret_key = $secure_key;\n $secret_iv = strrev($secure_key);\n // hash\n $key = hash('sha256', $secret_key);\n \n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n $output_str = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = rtrim(strtr(base64_encode($output_str), '+/', '-_'), '='); \n return $output;\n}", "function encript_value($q) {\n $cryptKey = 'qJB0rGtIn7dsnbt3efyCp';\n $qEncoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($cryptKey), $q, MCRYPT_MODE_CBC, md5(md5($cryptKey))));\n return( $qEncoded );\n}", "function pass_encrypt($string,$key)\n{\n \n $iv = mcrypt_create_iv(\n mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC),\n MCRYPT_DEV_URANDOM\n);\n\n$encrypted = base64_encode(\n $iv .\n mcrypt_encrypt(\n MCRYPT_RIJNDAEL_128,\n hash('sha256', $key, true),\n $string,\n MCRYPT_MODE_CBC,\n $iv\n )\n);\nreturn $encrypted;\n}", "public function encrypt($value)\n {\n return $this->getEncrypter()->encrypt($value);\n }", "function _recaptcha_aes_encrypt($val, $ky)\n {\n if (!function_exists(\"mcrypt_encrypt\"))\n {\n die(\"To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.\");\n }\n $mode = MCRYPT_MODE_CBC;\n $enc = MCRYPT_RIJNDAEL_128;\n $val = _recaptcha_aes_pad($val);\n return mcrypt_encrypt($enc, $ky, $val, $mode, \"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\");\n }", "public static function encode($value){ \n $key = PasswordHelper::check_keylength();\n if (!$value) {\n return false;\n }\n $text = $value;\n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);\n $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);\n return trim(PasswordHelper::safe_b64encode($crypttext)); \n }", "public function encrypt($value)\n {\n return $value;\n }", "function encrypt($data, $key)\n{\n return strtoupper(bin2hex(openssl_encrypt($data, 'aes-128-ecb', $key, OPENSSL_PKCS1_PADDING)));\n}", "function mysql_aes_decrypt($val)\r\n{\r\n\t$key = genetate_mysql_aes_key(constant('__ENCRYPTION_KEY__'));\r\n\t$val = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $val, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM));\r\n\treturn rtrim($val, \"\\0..\\16\");\r\n}", "public function encrypt($value, bool $serialize = true): string;", "public static function encrypt($value): string\n {\n return encrypt($value);\n }", "Public function encrypt($string) {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n \n \n return $output;\n}", "public static function encrypt($value)\n\t{\n\t\t// Determine the most appropriate random number generator for the\n\t\t// OS and system and environment the application is running on.\n\t\tif (defined('MCRYPT_DEV_URANDOM'))\n\t\t{\n\t\t\t$randomizer = MCRYPT_DEV_URANDOM;\n\t\t}\n\t\telseif (defined('MCRYPT_DEV_RANDOM'))\n\t\t{\n\t\t\t$randomizer = MCRYPT_DEV_RANDOM;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$randomizer = MCRYPT_RAND;\n\t\t}\n\n\t\t$iv = mcrypt_create_iv(static::iv_size(), $randomizer);\n\n\t\treturn base64_encode($iv.mcrypt_encrypt(static::$cipher, Config::get('application.key'), $value, static::$mode, $iv));\n\t}", "public function encrypt($input) {\n $iv = mcrypt_create_iv(32);\n return base64_encode($iv.mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->securekey, $input, MCRYPT_MODE_ECB, $iv));\n }", "function encryptIt( $q ) {\r\n $cryptKey = 'qJB0rGtIn5UB1xG03efyCp';\r\n $qEncoded= base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );\r\n return( $qEncoded );\r\n}", "function _recaptcha_aes_encrypt($val, $ky) {\n\tif (! function_exists ( \"mcrypt_encrypt\" )) {\n\t\tdie ( \"To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.\" );\n\t}\n\t$mode = MCRYPT_MODE_CBC;\n\t$enc = MCRYPT_RIJNDAEL_128;\n\t$val = _recaptcha_aes_pad ( $val );\n\treturn mcrypt_encrypt ( $enc, $ky, $val, $mode, \"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\" );\n}", "function hcgs_cryptoJsAesEncrypt( $value, $passphrase=''){\n\tif(!$passphrase) $passphrase = hcgs_getSiteKey();\n $salt = openssl_random_pseudo_bytes(8);\n $salted = '';\n $dx = '';\n while (strlen($salted) < 48) {\n $dx = md5($dx.$passphrase.$salt, true);\n $salted .= $dx;\n }\n $key = substr($salted, 0, 32);\n $iv = substr($salted, 32,16);\n $encrypted_data = openssl_encrypt(json_encode($value), 'aes-256-cbc', $key, true, $iv);\n $data = array(\"ct\" => base64_encode($encrypted_data), \"iv\" => bin2hex($iv), \"s\" => bin2hex($salt));\n return json_encode($data);\n}", "function mc_encrypt($encrypt){\n\tglobal $config;\n\t$key = $config['encryption_key'];\n $encrypt = serialize($encrypt);\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);\n $key = pack('H*', $key);\n $mac = hash_hmac('sha256', $encrypt, substr(bin2hex($key), -32));\n $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $encrypt.$mac, MCRYPT_MODE_CBC, $iv);\n $encoded = base64_encode($passcrypt).'|'.base64_encode($iv);\n return $encoded;\n}", "function encryptIt( $q ) {\n $cryptKey = ENC_STRING;\n $qEncoded = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );\n return( $qEncoded );\n}", "public function encrypt($text);", "function encrypt_simple($string){\n return base64_encode(base64_encode(base64_encode($string)));\n}", "function encryptData($data, $key, $str){\n $encryption_key = base64_decode($key);\n $ivlength = substr(md5($str.\"users\"),1, 16);\n $encryptedData = openssl_encrypt($data, \"aes-256-cbc\", $encryption_key, 0, $ivlength);\n\n return base64_encode($encryptedData.'::'.$ivlength);\n}", "function encriptar($cadena){\n\t $encrypted = base64_encode(urlencode($cadena));\n\t //$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));\n\t return $encrypted;\n}", "public function recaptcha_aes_encrypt($val, $ky)\n {\n if (!function_exists(\"mcrypt_encrypt\")) {\n die(\"To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.\");\n }\n $mode = MCRYPT_MODE_CBC;\n $enc = MCRYPT_RIJNDAEL_128;\n $val = $this->recaptcha_aes_pad($val);\n return mcrypt_encrypt($enc, $ky, $val, $mode, \"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\");\n }", "public function encrypt($string);", "function aplCustomEncrypt($string, $key)\n {\n $encrypted_string=null;\n\n if (!empty($string) && !empty($key))\n {\n $iv=openssl_random_pseudo_bytes(openssl_cipher_iv_length(\"aes-256-cbc\")); //generate an initialization vector\n\n $encrypted_string=openssl_encrypt($string, \"aes-256-cbc\", $key, 0, $iv); //encrypt the string using AES 256 encryption in CBC mode using encryption key and initialization vector\n $encrypted_string=base64_encode($encrypted_string.\"::\".$iv); //the $iv is just as important as the key for decrypting, so save it with encrypted string using a unique separator \"::\"\n }\n\n return $encrypted_string;\n }", "function encrypt($data){\n\t$encrypted = openssl_encrypt($data, \"AES-256-CBC\", \"The goodest key\", 0, \"The bestest 1key\");\n\treturn $encrypted;\n}", "function encryptAes($string, $key)\n{\n // Add PKCS5 padding to the text to be encypted.\n $string = addPKCS5Padding($string);\n\n // Perform encryption with PHP's openssl module.\n $encrypted = openssl_encrypt($string, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $key);\n\n // Perform hex encoding and return.\n return \"@\" . strtoupper(bin2hex($encrypted));\n}", "function encryptUser($userId){\n\t$encrypted = openssl_encrypt($userId, \"AES-256-CBC\", \"The goodest user\", 0, \"The bestest user\");\n\treturn $encrypted;\n}", "function encrypt($plain_text, $password=\"nicecode\", $iv_len = 16)\n{\n$plain_text .= \"\\x13\";\n$n = strlen($plain_text);\nif ($n % 16) $plain_text .= str_repeat(\"\\0\", 16 - ($n % 16));\n$i = 0;\n$enc_text = $iv_len;\n$iv = substr($password ^ $enc_text, 0, 512);\nwhile ($i < $n) {\n$block = substr($plain_text, $i, 16) ^ pack('H*', md5($iv));\n$enc_text .= $block;\n$iv = substr($block . $iv, 0, 512) ^ $password;\n$i += 16;\n}\n$hasil=base64_encode($enc_text);\n$hasil=str_replace('=', '1', $hasil);\nreturn str_replace('+', '2', $hasil);\n}", "function rinjdael_enc(string $text, string $key)\n{\n\t//generar structura\n\t/*\n\t\t#define KS_LENGTH\t\t60\n\t*/\n\t//$cipher->aesencrypt_key();\n\t//$cipher->aesencrypt();\n\n\t$code = openssl_encrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t//$code = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB);\n\n\treturn $code;\n}", "function acf_encrypt($data = '') {}", "function encryptValue($val)\n{\n $num = strlen($val);\n $numIndex = $num - 1;\n $val1 = \"\";\n\n // Reverse the order of characters\n for ($x = 0; $x < strlen($val); $x++) {\n $val1 .= substr($val, $numIndex, 1);\n $numIndex--;\n }\n\n // Encode the reversed value\n $val1 = base64_encode($val1);\n return $val1;\n}", "public static function encrypt($value)\n {\n $value = json_encode($value);\n $return = base64_encode($value);\n return $return;\n }", "function genetate_mysql_aes_key($key)\r\n{\r\n\t$new_key = str_repeat(chr(0), 16);\r\n\tfor($i=0,$len=strlen($key);$i<$len;$i++)\r\n\t{\r\n\t\t$new_key[$i%16] = $new_key[$i%16] ^ $key[$i];\r\n\t}\r\n\treturn $new_key;\r\n}", "function encrypt($value){\n\t\t\n\t\tif($this->rc4key){\n\t\t\t$value = $this->rc4->_encrypt (\n\t\t\t\t$this->rc4key, $value\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $value;\n\t\t\n\t}", "function _encrypt($text)\n{\n $secret = _cfg('securitySecret');\n if (!$secret || !function_exists('openssl_encrypt')) {\n return md5($text);\n }\n\n $method = _cipher();\n $ivlen = openssl_cipher_iv_length($method);\n $iv = openssl_random_pseudo_bytes($ivlen);\n\n $textRaw = openssl_encrypt($text, $method, $secret, OPENSSL_RAW_DATA, $iv);\n $hmac = hash_hmac('sha256', $textRaw, $secret, true);\n\n return base64_encode($iv . $hmac . $textRaw );\n}", "public function enc($string){\n\t\t$secret_iv = hash('sha256', $this->secret_key);\n\t\t$key = hash('sha256', $secret_iv);\n\t\t$initialization_vector = substr(hash('sha256', $secret_iv), 0, 16);\n\t\t$a = openssl_encrypt($string, $this->encrypt_method, $key, 0, $initialization_vector);\n\t\treturn base64_encode($a); \n\t}", "function cryptoJsAesEncrypt($passphrase, $value){\n $salt = openssl_random_pseudo_bytes(8);\n $salted = '';\n $dx = '';\n while (strlen($salted) < 48) {\n $dx = md5($dx.$passphrase.$salt, true);\n $salted .= $dx;\n }\n $key = substr($salted, 0, 32);\n $iv = substr($salted, 32,16);\n $encrypted_data = openssl_encrypt(json_encode($value), 'aes-256-cbc', $key, true, $iv);\n $data = array(\"ct\" => base64_encode($encrypted_data), \"iv\" => bin2hex($iv), \"s\" => bin2hex($salt));\n return json_encode($data);\n }", "public static function encrypt($plaintext) {\n if (apc_exists('DBKEY')) {\n $iv_size = openssl_cipher_iv_length('AES-128-CBC');\n $iv = openssl_random_pseudo_bytes($iv_size);\n $ret = base64_encode($iv.openssl_encrypt($plaintext, 'AES-128-CBC', apc_fetch('DBKEY'), OPENSSL_RAW_DATA, $iv));\n return $ret;\n } else {\n return false;\n }\n }", "function je_crypt( $string, $action = 'e' ) {\n // you may change these values to your own\n $secret_key = '616CFC9E0918EBA1C7792E5FC6CE4A644FB35C251DB2BC33';\n $secret_iv = '19F31EF5BA2C35CE045A19BEE4C8FDF5';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n\n return $output;\n}", "function encriptar($cadena){\n //Una clave de codificacion, debe usarse la misma para encriptar y desencriptar\n // $key='abcdef123456()[]{}ghi789';\n // $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));\n //Devuelve el string encriptado\n $encrypted = md5($cadena);\n return $encrypted;\n }", "function my_encrypt($data , $key) {\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n}", "public function encrypt($value)\n {\n $cipher = mcrypt_module_open(\n $this->_encryption['algorithm'],\n $this->_encryption['algorithm_directory'],\n $this->_encryption['mode'],\n $this->_encryption['mode_directory']);\n\n if ($cipher === false) {\n require_once 'Zend/Filter/Exception.php';\n throw new Zend_Filter_Exception('Mcrypt can not be opened with your settings');\n }\n\n srand();\n $keysize = mcrypt_enc_get_key_size($cipher);\n $key = substr(md5($this->_encryption['key']), 0, $keysize);\n\n mcrypt_generic_init($cipher, $key, $this->_encryption['vector']);\n $encrypted = mcrypt_generic($cipher, $value);\n mcrypt_generic_deinit($cipher);\n mcrypt_module_close($cipher);\n\n return $encrypted;\n }", "function crypt_sql($strKey, $strValue)\n{\n return 'md5(`'. $strKey . '`)=\"' . $strValue . '\"';\n}", "function my_simple_crypt( $string, $action = 'e' ) {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n\n\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n}", "public function encrypt($value, string $key, bool $base64 = false): string\n {\n $ret = $this->encryptBinary(serialize($value), $key);\n return ($base64) ? base64_encode($ret) : $ret;\n }", "private function encrypt($data) {\n\t\t$key = hash(\"sha1\", $this->enckey);\n\t\t$encrypted = openssl_encrypt($data, \"aes-256-ecb\", $key, 0);\n\t\treturn $encrypted;\n\t}", "function encryptor($action, $string) {\n\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n //pls set your unique hashing key\n $secret_key = 'Labels';\n $secret_iv = 'Behlah';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n //do the encyption given text/string/number\n if( $action == 'encrypt' ) {\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n $output = base64_encode($output);\n }\n else if( $action == 'decrypt' ){\n //decrypt the given text/string/number\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function my_encrypt($data, $key) {\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n }", "function encrypt($value, bool $serialize = true): string\n{\n return ApplicationContext::getContainer()\n ->get(Encrypter::class)\n ->encrypt($value, $serialize);\n}", "function encrypt($data, $key = MY_KEY) {\r\n $encryption_key = base64_decode($key);\r\n // Generate an initialization vector\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\r\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\r\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\r\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\r\n return base64_encode($encrypted . '::' . $iv);\r\n}", "function my_encrypt($data, $key)\n{\n\t$encryption_key = base64_decode($key);\n\t// Generate an initialization vector\n\t$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n\t// Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n\t$encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n\t// The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n\treturn base64_encode($encrypted . '::' . $iv);\n}", "function mc_encrypt($encrypt) {\n $key = ENCRYPTION_KEY;\n $encrypt = serialize($encrypt);\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);\n $key = pack('H*', $key);\n $mac = hash_hmac('sha256', $encrypt, substr(bin2hex($key), -32));\n $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $encrypt . $mac, MCRYPT_MODE_CBC, $iv);\n $encoded = base64_encode($passcrypt) . '|' . base64_encode($iv);\n return $encoded;\n }", "function my_encrypt($data, $key) {\n $encryption_key = base64_decode($key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted . '::' . $iv);\n}", "public function encrypt($data) {\n $blockSize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);//16\n if ($blockSize !== strlen($this->_key)) {\n $this->_key = hash('MD5', $this->_key, true);\n }\n if ($blockSize !== strlen($this->_iv)) {\n $this->_iv = hash('MD5', $this->_iv, true);\n }\n\n $padding = $blockSize - (strlen($data) % $blockSize);\n $data .= str_repeat(chr($padding), $padding);\n $encriptado = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->_key, $data, MCRYPT_MODE_CBC, $this->_iv);\n return base64_encode($encriptado);\n }", "public static function encrypt($data){ \r\n return base64_encode($data);\r\n }", "public function encrypt($input, $cipherKey);", "function encrypt(){\n $lenText=strlen($this->text);\n $lenKey=strlen($this->key);\n $str=\"\";\n $j=0;\n for($i=0;$i<$lenText;$i++,$j++){\n if($j==$lenKey){\n $j=0;\n } \n $val=(ord($this->text[$i])*2)+ord($this->key[$j]);\n $str.=$val; \n }\n return $str;\n }", "function encrypt($string) {global $C_CONFIG_KEY; $key=$C_CONFIG_KEY;$result = '';for($i=0; $i<strlen($string); $i++) {$char = substr($string, $i, 1);$keychar = substr($key, ($i % strlen($key))-1, 1);$char = chr(ord($char)+ord($keychar));$result.=$char;}return base64_encode($result);}", "function my_simple_crypt($string, $action = 'e')\n {\n $secret_key = 'mwa_encyption';\n $secret_iv = '9886162566';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n \n if ($action == 'e') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } elseif ($action == 'd') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n \n return $output;\n }", "function encryptPassword($pwd)\n {\n $key = \"123\";\n $admin_pwd = bin2hex(openssl_encrypt($pwd,'AES-128-CBC', $key)); \n return $admin_pwd;\n }", "abstract public function encender();", "function one_way_encrypt($plain){\n\t\treturn trim($this->replace_encrypt_string(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))));\n\t}", "function encryptAESold($str,$key) {\n$str = $this->pkcs5_pad($str);\n$ivlen = openssl_cipher_iv_length($cipher=\"aes-192-cbc\");\n//$key=substr($key,0,16);\n//echo $key;\n//die();\n$iv=\"PGKEYENCDECIVSPC\";\n$encrypted = openssl_encrypt($str, \"aes-192-cbc\",$key, OPENSSL_ZERO_PADDING, $iv);\n$encrypted = base64_decode($encrypted);\n$encrypted=unpack('C*', ($encrypted));\n$encrypted=$this->byteArray2Hex($encrypted);\n$encrypted = urlencode($encrypted);\nreturn $encrypted;\n}", "public function encrypt($key, $data)\n {\n // create secretkey from APP_KEY + password from user\n \t$secretKey = md5(config('app.key').$key);\n // initialize Encrypter from laravel\n $newEncrypter = new Encrypter($secretKey,'AES-256-CBC');\n\n // convert to string from array data & encrypt it\n $result = $newEncrypter->encrypt(serialize($data));\n return $result;\n }", "function my_simple_crypt($string, $action ) {\n $secret_key = 'hfhdfhf';\n $secret_iv = 'hdfhfghdfghhfdhfghfdgh';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n } \n return $output;\n}", "function simple_encrypt($text, $salt = \"VUHuiU6b8jgieEG0p79Yx9T4G8Zqp880\") {\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n}", "public function encrypt($value) {\n\t\treturn $this->hassPass->create_hash($value);\n\t}", "public function encrypt($input) {\n return base64_encode(\n mcrypt_encrypt(\n MCRYPT_RIJNDAEL_256,\n $this->_secureKey,\n $input,\n MCRYPT_MODE_ECB,\n $this->_iv\n )\n );\n }", "public function encryptedAttribute($value): ?string\n {\n return DatabaseEncryption::buildHeader($value).Crypt::encrypt($value);\n }", "function twofish_enc(string $text, string $key)\n{\n\t//$cipher = new twofish();\n\t//$cipher->twoset_key($instance, $key, 4);\n\t//$code=$cipher->twofish_encrypt($instance, $text, $code);\n\t$code = openssl_encrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t//$code = mcrypt_encrypt(MCRYPT_TWOFISH_256, $key, $text, MCRYPT_MODE_ECB);\n\n\treturn $code;\n}", "function encrypt($plain) {\t\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "function sonEncode( $string) {\n\t $secret_key = '#sismik123';\n \t$secret_iv = '#sismik123';\n\t \n\t $output = false;\n\t $encrypt_method = \"AES-256-CBC\";\n\t $key = hash( 'sha256', $secret_key );\n\t $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n\t \n \t$output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n\t \n\t return $output;\n\t}", "public function encryption($string){\n\t\t\t$output=FALSE;\n\t\t\t$key=hash('sha256', SECRET_KEY);\n\t\t\t$iv=substr(hash('sha256', SECRET_IV), 0, 16);\n\t\t\t$output=openssl_encrypt($string, METHOD, $key, 0, $iv);\n\t\t\t$output=base64_encode($output);\n\t\t\treturn $output;\n\t\t}", "function encrypt( $plaintext, $key ){\n\n // Set up encryption parameters.\n $plaintext_utf8 = utf8_encode($plaintext);\n $inputData = cryptoHelpers::convertStringToByteArray($plaintext);\n $keyAsNumbers = cryptoHelpers::toNumbers(bin2hex($key));\n $keyLength = count($keyAsNumbers);\n $iv = cryptoHelpers::generateSharedKey(16);\n\n $encrypted = AES::encrypt(\n $inputData,\n AES::modeOfOperation_CBC,\n $keyAsNumbers,\n $keyLength,\n $iv\n );\n\n // Set up output format \"plaintextsize-iv-cipher\")\n $retVal = $encrypted['originalsize'] . \"-\"\n . cryptoHelpers::toHex($iv) . \"-\"\n . cryptoHelpers::toHex($encrypted['cipher']);\n\n return $retVal;\n}", "protected static function encrypter($string){\r\n $output=FALSE;\r\n $key=hash('sha256', parent::SECRET_KEY);\r\n $iv=substr(hash('sha256', parent::SECRET_IV), 0, 16);\r\n $output=openssl_encrypt($string, parent::METHOD, $key, 0, $iv);\r\n $output=base64_encode($output);\r\n return $output;\r\n }", "function encrypt($pure_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n return $encrypted_string;\n}", "public function encrypt($value)\n\t{\n\t\t$iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());\n\n\t\t$value = base64_encode($this->padAndMcrypt($value, $iv));\n\n\t\t// Once we have the encrypted value we will go ahead base64_encode the input\n\t\t// vector and create the MAC for the encrypted value so we can verify its\n\t\t// authenticity. Then, we'll JSON encode the data in a \"payload\" array.\n\t\t$mac = $this->hash($iv = base64_encode($iv), $value);\n\n\t\treturn base64_encode(json_encode(compact('iv', 'value', 'mac')));\n\t}" ]
[ "0.7920617", "0.7920617", "0.7406333", "0.74042046", "0.7271434", "0.7267906", "0.72603035", "0.71719134", "0.71719134", "0.71719134", "0.71558684", "0.69614756", "0.69546527", "0.6948834", "0.69369876", "0.69002455", "0.6854905", "0.6849619", "0.6848351", "0.6846382", "0.68299943", "0.68259627", "0.6803774", "0.6788702", "0.6782053", "0.6775337", "0.6771802", "0.6727664", "0.67265475", "0.67135185", "0.6712242", "0.67066205", "0.6705227", "0.66900545", "0.66564506", "0.66509664", "0.66434896", "0.66402584", "0.66319865", "0.66177505", "0.66148865", "0.6614092", "0.6608237", "0.66063756", "0.66042", "0.65973985", "0.65874225", "0.65789807", "0.6577288", "0.6577014", "0.65464646", "0.6546066", "0.6540442", "0.6533958", "0.6526336", "0.65244746", "0.650856", "0.649474", "0.6486417", "0.64824337", "0.6471156", "0.6466014", "0.6451052", "0.6439165", "0.6413415", "0.64094204", "0.64088744", "0.6385108", "0.636677", "0.63641727", "0.6362349", "0.6361392", "0.63611805", "0.6351274", "0.6346168", "0.63453555", "0.63406366", "0.63394016", "0.6337633", "0.6328237", "0.63244945", "0.63224256", "0.63195896", "0.63192093", "0.6303947", "0.6303549", "0.62982005", "0.6276288", "0.62758964", "0.6268792", "0.6256551", "0.62554735", "0.6251051", "0.6239385", "0.6239128", "0.62353593", "0.6235014", "0.62331665", "0.6232881", "0.6231806" ]
0.82888377
0
This method decrpts a value in the MySQL AES methods
Этот метод расшифровывает значение в методах MySQL AES
function mysql_aes_decrypt($val) { $key = genetate_mysql_aes_key(constant('__ENCRYPTION_KEY__')); $val = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $val, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM)); return rtrim($val, "\0..\16"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function desencriptar($cadena)\r\n{\r\n //$decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($cadena), MCRYPT_MODE_CBC, md5(md5($key))), \"\\0\");\r\n $cadena = $cadena;\r\n return $cadena;//$decrypted; //Devuelve el string desencriptado\r\n}", "public function decrypt($value);", "public function decrypt($value);", "function aes_decrypt($encrypted,$key)\n{\n $encrypted = pack('H*',$encrypted);\n\n $key = mysql_aes_key($key);\n return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$encrypted,MCRYPT_MODE_ECB,''),\"\\x00..\\x1F\");\n}", "function decrypt($val)\r\n{\r\n # Support for both obfuscated and unobfuscated passwords\r\n\t$encryptionstr = 'Encrypted ';\r\n\tif ( strstr($val,$encryptionstr) )\r\n\t\t$val = substr( $val,strlen($encryptionstr) );\r\n\telse\r\n\t\treturn $val;\r\n\t\r\n\t# decryption logic\r\n\t$decconst = new Math_BigInteger('933910847463829827159347601486730416058');\r\n\t$decrparam = new Math_BigInteger($val,16);\r\n\t$decryptedval = $decrparam->bitwise_xor($decconst)->toBytes();\r\n\t$result = \"\";\r\n\tfor($i=0;$i<strlen($decryptedval);$i=$i+1)\r\n\t{\r\n\t\t$result.=$decryptedval[$i];\r\n\t}\r\n\treturn $result;\r\n}", "function desencriptar($cadena){\n $key='abcdef123456()[]{}ghi789';\n $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($cadena), MCRYPT_MODE_CBC, md5(md5($key))), \"\\0\");\n //Devuelve el string desencriptado\n return $decrypted;\n }", "function decryptIt($value)\n{\n // The decodeKey MUST match the encodeKey\n $decodeKey = 'Li1KUqJ4tgX14dS,A9ejk?uwnXaNSD@fQ+!+D.f^`Jy';\n $decoded = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($decodeKey), base64_decode($value), MCRYPT_MODE_CBC, md5(md5($decodeKey))), \"\\0\");\n return ($decoded);\n}", "function decrypt_data($data,$privateKey){\n $query = \"select AES_DECRYPT(UNHEX('{$data}'),'{$privateKey}')\";\n $result = @mysql_query($query);\n if ($result) {\n return @mysql_result($result, 0);\n }\n return \"\";\n }", "function decipher($str, $key = null)\n{\n\tif (!$key) {\n\t\t$key = Configure::read('Security.cipherKey');\n\t}\n\tif ($str = hex2bin($str)) {\n\t\treturn Security::cipher($str, $key);\n\t}\n\treturn false;\n}", "function decryptValue($dval)\n{\n // Decode value\n $dval = base64_decode($dval);\n\n $dnum = strlen($dval);\n $dnumIndex1 = $dnum - 1;\n $dval1 = \"\";\n\n // Reverse the order of characters\n for ($x = 0; $x < strlen($dval); $x++) {\n $dval1 .= substr($dval, $dnumIndex1, 1);\n $dnumIndex1--;\n }\n return $dval1;\n}", "public function dec($string) {\n\t\t$secret_iv = hash('sha256', $this->secret_key);\n\t \t$key = hash('sha256', $secret_iv);\n\t\t$initialization_vector = substr(hash('sha256', $secret_iv), 0, 16);\n\t\treturn openssl_decrypt(base64_decode($string), $this->encrypt_method, $key, 0, $initialization_vector);\n\t}", "function decryptValue($dval)\n{\n #Decode value\n $dval = base64_decode($dval);\n\n $dnum = strlen($dval);\n $dnumIndex1 = $dnum - 1;\n $dval1 = \"\";\n\n #Reverse the order of characters\n for ($x = 0; $x < strlen($dval); $x++) {\n $dval1 .= substr($dval, $dnumIndex1, 1);\n $dnumIndex1--;\n }\n return $dval1;\n}", "function mysql_aes_encrypt($val)\r\n{\r\n\t$key = genetate_mysql_aes_key(constant('__ENCRYPTION_KEY__'));\r\n\t$pad_value = 16-(strlen($val) % 16);\r\n\t$val = str_pad($val, (16*(floor(strlen($val) / 16)+1)), chr($pad_value));\r\n\treturn (mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $val, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM)));\r\n}", "function rinjdael_dec(string $text, string $key)\n{\n\t//generar structura\n\t/*\n\t#define KS_LENGTH\t\t60\n\t*/\n\t//$cipher->aesdecrypt_key();\n\t//$cipher->aesdecrypt();\n\n\t$code = openssl_decrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t//$code = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB);\n\n\treturn $code;\n}", "#[Deprecated(since: '7.1')]\nfunction mcrypt_generic_deinit($td) {}", "function decrypt($value){\n\t\t\n\t\tif($this->rc4key){\n\t\t\t$value = $this->rc4->_decrypt (\n\t\t\t\t$this->rc4key,\n\t\t\t\t$this->_handle_magic_quotes($value)\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $value;\n\t\t\n\t}", "function genetate_mysql_aes_key($key)\r\n{\r\n\t$new_key = str_repeat(chr(0), 16);\r\n\tfor($i=0,$len=strlen($key);$i<$len;$i++)\r\n\t{\r\n\t\t$new_key[$i%16] = $new_key[$i%16] ^ $key[$i];\r\n\t}\r\n\treturn $new_key;\r\n}", "function pass_decrypt($encrypted,$key)\n{\n\n $data = base64_decode($encrypted);\n$iv = substr($data, 0, mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC));\n\n$decrypted = rtrim(\n mcrypt_decrypt(\n MCRYPT_RIJNDAEL_128,\n hash('sha256', $key, true),\n substr($data, mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)),\n MCRYPT_MODE_CBC,\n $iv\n ),\n \"\\0\"\n);\nreturn $decrypted;\n}", "function decrypt($encrypted_string)\n{\n\tglobal $encryption_key ;\n\treturn openssl_decrypt($encrypted_string,\"AES-128-ECB\",$encryption_key);\n}", "public function decrypt($data);", "public function decrypt($data);", "public function decrypt($data);", "public function decrypt($data);", "function custom_decrypt($string) {\n\n $secure_key = \"0008754063617000\";\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $secret_key = $secure_key;\n $secret_iv = strrev($secure_key);\n\n // hash\n $key = hash('sha256', $secret_key);\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n $decode_str = base64_decode(str_pad(strtr($string, '-_', '+/'), strlen($string) % 4, '=', STR_PAD_RIGHT)); \n $output = openssl_decrypt($decode_str, $encrypt_method, $key, 0, $iv);\n\n return $output;\n}", "abstract public function decryptData($data);", "function decryptDataold($code,$key) { \n\n\t $code = $this->hex2ByteArray(trim($code));\n\t $code=$this->byteArray2String($code);\n\t $iv = \"PGKEYENCDECIVSPC\"; \n\t $code = base64_encode($code);\n\t $decrypted = openssl_decrypt($code, 'AES-192-CBC', $key, OPENSSL_ZERO_PADDING, $iv);\n\t return $this->pkcs5_unpad($decrypted);\n\t}", "function decrypt($s) {\n\t\t$value = NULL;\n\t\t// Check key. If key is NULL alert user and die\n\t\tif($this->key !== NULL) {\n\t\t\t// Key good start encrypting\n\t\t\n\t\t\t//$iv_size = mcrypt_get_iv_size($this->cipher, $this->mode);\n\t\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t\n\t\t\t//$value = mcrypt_decrypt($this->cipher, $this->key, $s, $this->mode, $iv);\n\t\t\t$value = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, $s, MCRYPT_MODE_ECB, $iv));\n\t\t\t$value = unserialize($value);\n\t\t} else {\n\t\t\tdie(\"You MUST have a key to decrypt! Key must be the same as key used to encrypt. Encryption.decrypt\");\n\t\t}\n\t\t\n\t\treturn $value;\t\n\t}", "function acf_decrypt($data = '') {}", "function type_mcrypt_de($string){\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_SAFER128, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n \t\t$key = \"superdau\";\n\t\treturn $crypttext = mcrypt_decrypt(MCRYPT_SAFER128, $key, $string, MCRYPT_MODE_ECB, $iv);\n\t}", "public function decrypt($value=\"\",$key=\"\")\n {\n // Apply base64 decoding if necessary\n if($this->_base64) $value = $this->base64_url_decode($value);\n\n // Extract encrypted IV from input\n $tmp_iv = substr($value,0,$this->_hash_lenght);\n\n // Extract encrypted message from input\n $value = substr($value,$this->_hash_lenght,strlen($value) - $this->_hash_lenght);\n $iv = $out = \"\";\n\n // Regenerate IV by xor-ing encrypted IV from block 1 and $this->hashed_key\n // Mathematics: (IV XOR KeY) XOR Key = IV\n for($c=0;$c < $this->_hash_lenght;$c++) {\n $iv .= chr(ord($tmp_iv[$c]) ^ ord($this->_key[$c]));\n }\n // Use IV as key for decrypting the first block cyphertext\n $key = $iv;\n //echo \" key--->\".$key.\"!!!!\";\n $c = 0;\n\n // Loop through the whole input string\n while($c < strlen($value)) {\n // If we have used all characters of the current key we switch to a new one\n if(($c != 0) and ($c % $this->_hash_lenght == 0)) {\n // New key is the hash of current key and last block of plaintext\n $key = $this->hash_value(($key . substr($out,$c - $this->_hash_lenght,$this->_hash_lenght)));\n }\n // Generate output by xor-ing input and key character for character\n $out .= chr(ord($key[$c % $this->_hash_lenght]) ^ ord($value[$c]));\n $c++;\n }\n return $out;\n }", "function MAIL_AESDecode($key, $ctext)\n{\n\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t$decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $ctext, MCRYPT_MODE_ECB, $iv);\n\treturn($decrypttext);\n}", "public static function decode($value){ \n $key = PasswordHelper::check_keylength();\n if (!$value) {\n return false;\n }\n $crypttext = PasswordHelper::safe_b64decode($value); \n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);\n $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext, MCRYPT_MODE_ECB, $iv);\n return trim($decrypttext);\n }", "function _desordenar($string) {\n\n /* require(\"variables_config.php\");\n\n $key = $ecret;\n\n $result = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n $keychar = substr($key, ($i % strlen($key)) - 1, 1);\n $char = chr(ord($char) + ord($keychar));\n $result.=$char;\n }\n return base64_encode($result);*/\n\treturn $string;\n}", "public function decrypt( $raw_value ) {\n\t\tif ( ! extension_loaded( 'openssl' ) ) {\n\t\t\treturn $raw_value;\n\t\t}\n\n\t\t$raw_value = base64_decode( $raw_value, true );\n\n\t\t$method = 'aes-256-ctr';\n\t\t$ivlen = openssl_cipher_iv_length( $method );\n\t\t$iv = substr( $raw_value, 0, $ivlen );\n\n\t\t$raw_value = substr( $raw_value, $ivlen );\n\n\t\t$value = openssl_decrypt( $raw_value, $method, $this->key, 0, $iv );\n\t\tif ( ! $value || substr( $value, - strlen( $this->salt ) ) !== $this->salt ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn substr( $value, 0, - strlen( $this->salt ) );\n\t}", "function decrypt($data, $key = MY_KEY) {\r\n $encryption_key = base64_decode($key);\r\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\r\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\r\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\r\n}", "function demcrypt_data( $input ) {\n $key1 = \"ShareSpark\";\n $key2 = \"Org\";\n $key = $key1.$key2;\n $decrypted = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $key ), base64_decode( $input ), MCRYPT_MODE_CBC, md5( md5( $key ) ) ), \"\\0\" );\n return $decrypted;\n\n }", "function decryptData($code,$key) {\n \n\t $code = $this->hex2ByteArray(trim($code));\n\t $code=$this->byteArray2String($code);\n\t $iv = 'PGKEYENCDECIVSPC';\n\t $code = base64_encode($code);\n\t $decrypted = openssl_decrypt($code, 'AES-256-CBC', $key, OPENSSL_ZERO_PADDING, $iv);\n\t \n\t //echo \"hii\";\n\t //echo $decrypted;\n\t /// die();\n\t //return $this->$decrypted;\n\t return $this->pkcs5_unpad($decrypted);\n\t}", "function twofish_dec(string $text, string $key)\n{\n\t//$cipher = new twofish();\n\t//$cipher->twoset_key($instance, $key, 4);\n\t//$cipher->twofish_decrypt($instance, $text, $code);\n\t$code = openssl_decrypt($text, 'aes-256-ecb', $key);//, OPENSSL_RAW_DATA, $iv);\n\n\t//$code = mcrypt_decrypt(MCRYPT_TWOFISH_256, $key, $text, MCRYPT_MODE_ECB);\n\n\treturn $code;\n}", "public function dec($key, $amount = 1);", "public static function decrypt_aes_cbc($key, $data) {\n $iv = str_repeat(\"\\0\", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC));\n return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv);\n }", "function dcrypt($value, $driver = null)\n {\n return Crypt::driver($driver)->decrypt($value);\n }", "function my_decrypt($data , $key) {\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n}", "function encryptValue($val)\n{\n $num = strlen($val);\n $numIndex = $num - 1;\n $val1 = \"\";\n\n // Reverse the order of characters\n for ($x = 0; $x < strlen($val); $x++) {\n $val1 .= substr($val, $numIndex, 1);\n $numIndex--;\n }\n\n // Encode the reversed value\n $val1 = base64_encode($val1);\n return $val1;\n}", "public abstract function dec($key, $value);", "public static function decrypt($value)\n\t{\n\t\t// Since all encrypted strings generated by this class are base64 encoded, we will\n\t\t// first attempt to base64 decode the string. If we can't do it, we'll bail out.\n\t\tif ( ! is_string($value = base64_decode($value, true)))\n\t\t{\n\t\t\tthrow new \\Exception('Decryption error. Input value is not valid base64 data.');\n\t\t}\n\n\t\t// Extract the input vector and the encrypted string from the value.\n\t\t// These will be used by Mcrypt to properly decrypt the value.\n\t\t$iv = substr($value, 0, static::iv_size());\n\n\t\t$value = substr($value, static::iv_size());\n\n\t\treturn rtrim(mcrypt_decrypt(static::$cipher, Config::get('application.key'), $value, static::$mode, $iv), \"\\0\");\n\t}", "public function dec($key)\n {\n $key = mysql_real_escape_string($key);\n \n $current_value = $this->fetch($key);\n \n if( $current_value == '' )\n {\n if( $this->store($key, '-1') ) { return -1; }\n }\n else if( is_int($current_value) )\n {\n $sql = \"UPDATE `cache` SET `cache_value`=`cache_value`-1 WHERE `cache_key` = '$key'\";\n $result = $this->db->query( $sql, 1 );\n \n if( (int)$result > 0 ) { return --$current_value; }\n }\n \n return false;\n }", "public function encrypt($value);", "public function encrypt($value);", "function decrypt_solt($value) {\n\t$value_part1 = substr($value, 7,10);\n\t$value_part2 = substr($value, 20,10);\n\t$value_part3 = substr($value, 34,10);\n\t$value_part4 = substr($value, 47,10);\n\t$decrypted_value = $value_part1.$value_part2.$value_part3.$value_part4;\n\treturn $decrypted_value;\n}", "private function decrypt($data) {\n\t\t$key = hash(\"sha1\", $this->enckey);\n\t\t$decrypted = openssl_decrypt($data, \"aes-256-ecb\", $key, 0);\n\t\treturn $decrypted;\n\t}", "function decrypt( $input, $key ){\n $cipherSplit = explode( \"-\", $input);\n $originalSize = intval($cipherSplit[0]);\n $iv = cryptoHelpers::toNumbers($cipherSplit[1]);\n $cipherText = $cipherSplit[2];\n\n // Set up encryption parameters\n $cipherIn = cryptoHelpers::toNumbers($cipherText);\n $keyAsNumbers = cryptoHelpers::toNumbers(bin2hex($key));\n $keyLength = count($keyAsNumbers);\n\n $decrypted = AES::decrypt(\n $cipherIn,\n $originalSize,\n AES::modeOfOperation_CBC,\n $keyAsNumbers,\n $keyLength,\n $iv\n );\n\n // Byte-array to text.\n $hexDecrypted = cryptoHelpers::toHex($decrypted);\n $retVal = pack(\"H*\" , $hexDecrypted);\n\n return $retVal;\n}", "function my_decrypt($data, $key) {\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n\n return $iv;\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n}", "function fnEncrypt($sValue, $sSecretKey) {\n global $iv;\n return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_CBC, $iv)), \"\\0\\3\");\n}", "protected function decryption($string){\n\t\t\t$key=hash('sha256', SECRET_KEY);\n\t\t\t$iv=substr(hash('sha256', SECRET_IV), 0, 16);\n\t\t\t$output=openssl_decrypt(base64_decode($string), METHOD, $key, 0, $iv);\n\t\t\treturn $output;\n\t\t}", "#[Deprecated(since: '7.1')]\nfunction mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null) {}", "function my_decrypt($data, $key)\n{\n\t$encryption_key = base64_decode($key);\n\t// To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n\tlist($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n\treturn openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n}", "function decryptData($string, $key) { \r\n \t $iv_size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_ECB); \r\n \t $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); \r\n \t return trim(mcrypt_decrypt(MCRYPT_3DES, $key, base64_decode($string), MCRYPT_MODE_ECB, $iv)); \r\n\t}", "function unhashit($val) {\n\treturn PseudoCrypt::unhash($val);\n}", "public function getTwoFactorSecretAttribute($value)\n {\n return decrypt($value);\n }", "public function decr()\n {\n }", "public function setUnsecureValue($value){\r\n \t$key = $this->getUnsecureKey();\r\n\t\t$this->unsecureValue[$key] = $value;\r\n\t\treturn $key;\r\n }", "function encryptAESold($str,$key) {\n$str = $this->pkcs5_pad($str);\n$ivlen = openssl_cipher_iv_length($cipher=\"aes-192-cbc\");\n//$key=substr($key,0,16);\n//echo $key;\n//die();\n$iv=\"PGKEYENCDECIVSPC\";\n$encrypted = openssl_encrypt($str, \"aes-192-cbc\",$key, OPENSSL_ZERO_PADDING, $iv);\n$encrypted = base64_decode($encrypted);\n$encrypted=unpack('C*', ($encrypted));\n$encrypted=$this->byteArray2Hex($encrypted);\n$encrypted = urlencode($encrypted);\nreturn $encrypted;\n}", "function decrypt($cypher, $field, $order) {\n\t\t// get the cypher from the url\n\t\tif($field!=''){\n\t\t\t$explode_url = explode(\"&\", $_SERVER['QUERY_STRING']);\n\t\t\t$order = $order - 1;\n\t\t\t$encrypt_id = explode($field.'=', $explode_url[$order]);\n\t\t\t$encrypt_id[1] = str_replace('%20','+',$encrypt_id[1]);\n\t\t\t$cypher = ($encrypt_id[1]);\t\t\n\t\t}else{\n\t\t\t$cypher =str_replace('%20','+',str_replace(' ','+',$cypher));\n\n\t\t}\n\t\treturn trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, base64_decode($cypher), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n }", "function fnEncrypt($sValue, $sSecretKey) {\n return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_CBC)), \"\\0\\3\");\n}", "function encript($key,$plaintext)\n{\n\n //$key = base64_decode($key1);\n \n # create a random IV to use with CBC encoding\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n \n # creates a cipher text compatible with AES (Rijndael block size = 128)\n # to keep the text confidential \n # only suitable for encoded input that never ends with value 00h\n # (because of default zero padding)\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n\n # prepend the IV for it to be available for decryption\n $ciphertext = $iv . $ciphertext; \n \n \n //----check how to decode------\n //if (decript($ciphertext,$key)!=$plaintext)\n {\n echo \"<div >text: <i> \". $plaintext .\"</i><br>key: <br><b>\". $key.\"</b><br>to64<br>\". base64_encode($key);\n echo \"<br>from64<br>\".base64_decode($key).\"</div>\";\n }\n return $ciphertext;\n\n # === WARNING ===\n # Resulting cipher text has no integrity or authenticity added\n # and is not protected against padding oracle attacks.\n}", "public static function decrypt($sValue, $sSecretKey)\n\t{\n\t return rtrim(\n\t mcrypt_decrypt(\n\t MCRYPT_RIJNDAEL_256, \n\t $sSecretKey, \n\t base64_decode($sValue), \n\t MCRYPT_MODE_ECB,\n\t mcrypt_create_iv(\n\t mcrypt_get_iv_size(\n\t MCRYPT_RIJNDAEL_256,\n\t MCRYPT_MODE_ECB\n\t ), \n\t MCRYPT_RAND\n\t )\n\t ), \"\\0\"\n\t );\n\t}", "function _getDecryptValue($prop, $value) {\n\t\tif(isset($prop['crypt']) && $prop['crypt'] == 'true') {\n\t\t\tLumineLog::Logger(1,'Decriptografando o campo ' . $prop['name'],__FILE__,__LINE__);\n\t\t\t$value = Util::decrypt($value, $this);\n\t\t\t// o valor foi \"escapado\" antes de inserir/atualizar... tempos que retirar as contra-barras\n\t\t\tif(isset($this->oTable->config->config['escape']) && $this->oTable->config->config['escape'] == 1) {\n\t\t\t\t$value = stripslashes( $value );\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "public static function decrypt(string $value)\n {\n return decrypt($value);\n }", "static function GetDecryptValue($text, $key ) {\n\t\tif($key == \"\") {\n\t\t\t$key = ENCRYPT_KEY;\n\t\t}\n\t\treturn trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n\t}", "function decrypt($string) { \r\n\tglobal $key;\r\n\t$result = Cryptor::Decrypt($string,$key);\r\n\treturn $result;\r\n}", "#[Deprecated(since: \"5.5\")]\nfunction mcrypt_cbc($cipher, $key, $data, $mode, $iv = null) {}", "function decrypt($data, $key) {\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n }", "function decryptData($data, $key){\n $encryption_key = base64_decode($key);\n list($encrypted_data, $iv) = array_pad(explode('::', base64_decode($data), 2),2,null);\n $decryptedData = openssl_decrypt($encrypted_data, \"aes-256-cbc\", $encryption_key, 0, $iv);\n\n return $decryptedData;\n}", "function zRem( $value, $key = '' ){\n $key = $key ? $key : $this->key;\n return $this->handler->zRem($key, $value );\n }", "public static function decrypt($ciphertext) {\n if (apc_exists('DBKEY')) {\n $iv_size = openssl_cipher_iv_length('AES-128-CBC');\n $iv = substr(base64_decode($ciphertext), 0, $iv_size);\n $ciphertext = substr(base64_decode($ciphertext), $iv_size);\n return openssl_decrypt($ciphertext, 'AES-128-CBC', apc_fetch('DBKEY'), OPENSSL_RAW_DATA, $iv);\n } else {\n return false;\n }\n }", "function encriptar($cadena)\r\n{\r\n //$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));\r\n $cadena = $cadena;\r\n return $cadena;//$encrypted; //Devuelve el string encriptado\r\n\r\n}", "function decrypt_stuff($ciphertext, $key_size = 16) {\n\t$key = substr(hash('sha256', ENC_K), 0, 16);\n\t$iv = substr(hash('sha256', EN_V), 0, 16);\n\treturn openssl_decrypt($ciphertext, ENC_M, $key, OPENSSL_RAW_DATA, $iv);\n}", "abstract public function desaturate($amount);", "function decryptData($data){\r\n\t\r\n\t/**\r\n\t* Decripta un dato precedentemente criptato\r\n\t* \r\n\t* @param $data\r\n\t* @return String (decrypted data)\r\n\t*/ \r\n\r\n\r\n $td = mcrypt_module_open('rijndael-256', '', 'ofb', '');\r\n $ks = mcrypt_enc_get_key_size($td);\r\n $key = substr(md5('la mia super chiave privata'), 0, $ks);\r\n\t\t \r\n\t\t \r\n $iv = $data -> getIV();\r\n $value = $data -> getValue();\r\n\t\t \r\n mcrypt_generic_init($td, $key, $iv);\r\n\r\n $decrypted = mdecrypt_generic($td, $value);\r\n\r\n mcrypt_generic_deinit($td);\r\n mcrypt_module_close($td);\r\n\r\n return trim($decrypted);\r\n\r\n}", "function decrypt(string $value, bool $unserialize = true)\n{\n return ApplicationContext::getContainer()\n ->get(Encrypter::class)\n ->decrypt($value, $unserialize);\n}", "function aplCustomDecrypt($string, $key)\n {\n $decrypted_string=null;\n\n if (!empty($string) && !empty($key))\n {\n $string=base64_decode($string); //remove the base64 encoding from string (it's always encoded using base64_encode)\n if (stristr($string, \"::\")) //unique separator \"::\" found, most likely it's valid encrypted string\n {\n $string_iv_array=explode(\"::\", $string, 2); //to decrypt, split the encrypted string from $iv - unique separator used was \"::\"\n if (!empty($string_iv_array) && count($string_iv_array)==2) //proper $string_iv_array should contain exactly two values - $encrypted_string and $iv\n {\n list($encrypted_string, $iv)=$string_iv_array;\n\n $decrypted_string=openssl_decrypt($encrypted_string, \"aes-256-cbc\", $key, 0, $iv);\n }\n }\n }\n\n return $decrypted_string;\n }", "protected static function decryption($string){\r\n $key=hash('sha256', parent::SECRET_KEY);\r\n $iv=substr(hash('sha256', parent::SECRET_IV), 0, 16);\r\n $output=openssl_decrypt(base64_decode($string), parent::METHOD, $key, 0, $iv);\r\n return $output;\r\n }", "function decryptSimple($data) {\n\t\t$result = '';\n\t\t$data=base64_decode(str_replace(array('-', '_'),array('+', '/'),$data));\n\t\tfor($i=0; $i<strlen($data); $i++) {\n\t\t\t$char = substr($data, $i, 1);\n\t\t\t$keychar = substr($this->encPassword, ($i % strlen($this->encPassword))-1, 1);\n\t\t\t$char = chr(ord($char)-ord($keychar));\n\t\t\t$result.=$char;\n\t\t}\n\t\treturn $result;\n\t}", "public function decrypt($value)\n {\n $cipher = mcrypt_module_open(\n $this->_encryption['algorithm'],\n $this->_encryption['algorithm_directory'],\n $this->_encryption['mode'],\n $this->_encryption['mode_directory']);\n\n srand();\n $keysize = mcrypt_enc_get_key_size($cipher);\n $key = substr(md5($this->_encryption['key']), 0, $keysize);\n\n mcrypt_generic_init($cipher, $key, $this->_encryption['vector']);\n $decrypted = mdecrypt_generic($cipher, $value);\n mcrypt_generic_deinit($cipher);\n mcrypt_module_close($cipher);\n\n return $decrypted;\n }", "public function decrypt($input) {\n $input = base64_decode($input);\n $iv = substr($input, 0, 32);\n $input = substr($input, 32);\n return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->securekey, $input, MCRYPT_MODE_ECB, $iv);\n }", "public function desencrypt_data($datos){\n $encoded = $datos; // <-- encoded string from the request\n $decoded = \"\";\n //$strlen = strlen( $str );\n for( $i = 0; $i < strlen($encoded); $i++ ) {\n $b = ord($encoded[$i]);\n $a = $b ^ 123; // <-- must be same number used to encode the character\n $decoded.=chr($a); \n }\n return $decoded;\n }", "public function getUnsecureKey(){\r\n \t$key = \":\".$this->valPrefix.$this->valVar.'opoink';\r\n \t$this->valVar++;\r\n \treturn $key;\r\n }", "public function decode($input)\n {\n $this->value = trim(\n mcrypt_decrypt(\n MCRYPT_RIJNDAEL_256,\n $this->secureKey,\n base64_decode($input),\n MCRYPT_MODE_ECB,\n $this->iv\n )\n );\n\n return $this->value;\n }", "function decrypt($string) \n{\n $key = PIN_KEY;\n $result = '';\n $string = base64_decode($string);\n for($i=0; $i<strlen($string); $i++) \n {\n $char = substr($string, $i, 1);\n $keychar = substr($key, ($i % strlen($key))-1, 1);\n $char = chr(ord($char)-ord($keychar));\n $result.=$char;\n }\n return $result;\n}", "public function decrypt($en)\n {\n\t\t $decryption_iv = '1234567891011121';\n\t\t $ciphering = \"AES-128-CTR\";\n\t\t $options = 0;\n\n\t\t// Store the decryption key\n\t\t $decryption_key = \"sT/7DI+yMdv8aj6t\";\n\n\t\t// Use openssl_decrypt() function to decrypt the data\n\t\t$decryption=openssl_decrypt ($en, $ciphering, $decryption_key, $options, $decryption_iv);\n\t\t\n\t\treturn $decryption;\n\t}", "function BASE64URL_symmetric_decipher($dato, $key, $vector){\n\t\t\t$tamVI = strlen($vector);\n\n\t\t\tif($tamVI != 16){\n\t\t\t\ttrigger_error(\"Initialization Vector must have 16 hexadecimal characters\", E_USER_ERROR);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif(strlen($key) != 16){\n\t\t\t\ttrigger_error(\"Simetric Key doesn't have length of 16\", E_USER_ERROR);\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$binvi = pack(\"H*\", $vector);\n\n\t\t\tif($binvi == null){\n\t\t\t\ttrigger_error(\"Initialization Vector is not valid, must contain only hexadecimal characters\", E_USER_ERROR);\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$key .= substr($key,0,8); // agrega los primeros 8 bytes al final\n\n\t\t\t$pas = preg_replace('(_)','/',$dato);\n\t\t\t$pas = preg_replace('(-)','+',$pas);\n\t\t\t$pas = preg_replace('(\\.)','=',$pas);\n\n\t\t\t$crypttext = base64_decode($pas);\n\n\t\t\t$crypttext2 = mcrypt_decrypt(MCRYPT_3DES, $key, $crypttext, MCRYPT_MODE_CBC, $binvi);\n\n\t\t\t$block = mcrypt_get_block_size('tripledes', 'cbc');\n\t\t\t$packing = ord($crypttext2{strlen($crypttext2) - 1});\n\t\t\tif($packing and ($packing < $block)){\n\t\t\t\tfor($P = strlen($crypttext2) - 1; $P >= strlen($crypttext2) - $packing; $P--){\n\t\t\t\t\tif(ord($crypttext2{$P}) != $packing){\n\t\t\t\t\t\t$packing = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$crypttext2 = substr($crypttext2,0,strlen($crypttext2) - $packing);\n\n\t\t\treturn $crypttext2;\n\t\t}", "function decrypt($message,$encryption_key){\r\n $key = hex2bin($encryption_key);\r\n $message = base64_decode($message);\r\n $nonceSize = openssl_cipher_iv_length('aes-256-ctr');\r\n $nonce = mb_substr($message, 0, $nonceSize, '8bit');\r\n $ciphertext = mb_substr($message, $nonceSize, null, '8bit');\r\n $plaintext= openssl_decrypt(\r\n $ciphertext, \r\n 'aes-256-ctr', \r\n $key,\r\n OPENSSL_RAW_DATA,\r\n $nonce\r\n );\r\n return $plaintext;\r\n }", "function clearKeyValStore() {\n\n }", "function my_decrypt($data, $key) {\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n if(list($encrypted_data, $iv) = explode('::', base64_decode($data), 2)){\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n }\n else{\n return false;\n }\n }", "function unmask($string) {\n if(!ctype_xdigit($string)){\n return 0;\n }\n if(!function_exists('mcrypt_decrypt')){\n return $string;\n }\n $secretKey = 'tplus@!zKaC$3<!?';\n $pack = pack('H*', $string);\n $urldecode = urldecode($pack);\n $base64_decode = base64_decode($urldecode);\n $mcrypt_decrypt = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $secretKey, $base64_decode, MCRYPT_MODE_ECB);\n return trim($mcrypt_decrypt);\n }", "function ODODecrypt($encData) {\n\tif ((function_exists ( 'sodium_crypto_secretbox_open' )) && (function_exists ( 'sodium_unpad' )) && (defined ( 'SODIUM_LIBRARY_VERSION' ))) {\n\t\t\n\t\t// order a-z so iv works correctly\n\t\t// if we are in the wrong order the decryption will fail\n\t\tksort ( $encData->encArray );\n\t\t\n\t\t/* Decrypt encrypted string */\n\t\tforeach ( $encData->encArray as $Name => $Value ) {\n\t\t\t\n\t\t\t$paddedMsg = sodium_crypto_secretbox_open ( $Value, \"\", $enc->getAesKey () );\n\t\t\t$encData->decArray [$Name] = sodium_unpad ( $paddedMsg, 16 );\n\t\t}\n\t\t\n\t\treturn $encData;\n\t} else {\n\t\tforeach ( $encData->encArray as $Name => $Value ) {\n\t\t\t$encData->decArray [$Name] = $Value;\n\t\t}\n\t\treturn $encData;\n\t}\n}", "protected function safelyDecrypt($value)\n {\n try {\n return $this->getEncrypter()->decrypt($value);\n } catch (DecryptException $e) {\n }\n\n return $value;\n }", "public function decrypt($string);", "public function decrypt($string);", "public function decrypt($value, $type = 2)\n {\n if ($type === 1) {\n if (!function_exists('mcrypt_decrypt')) {\n $this->xpdo->log(MODx::LOG_LEVEL_ERROR, '[FormIt] mcrypt_decrypt is not available. See http://php.net/manual/en/mcrypt.requirements.php for more information.');\n\n return false;\n }\n\n return rtrim(\n mcrypt_decrypt(\n MCRYPT_RIJNDAEL_256,\n md5($this->oldEncryptKey),\n base64_decode($value),\n MCRYPT_MODE_CBC,\n md5(md5($this->oldEncryptKey))\n ),\n \"\\0\"\n );\n }\n if (!function_exists('openssl_decrypt')) {\n $this->xpdo->log(MODx::LOG_LEVEL_ERROR, '[FormIt] openssl_decrypt is not available. Please install OpenSSL. See http://www.php.net/manual/en/openssl.requirements.php for more information.');\n\n return false;\n }\n\n /* Return default openssl decrypted values */\n\n return openssl_decrypt(base64_decode($value), $this->method, $this->encryptKey, 0, $this->ivKey);\n }" ]
[ "0.6586331", "0.65180576", "0.65180576", "0.6408004", "0.6208227", "0.61033124", "0.6081545", "0.60696137", "0.59813654", "0.5949197", "0.5948739", "0.5948111", "0.5944134", "0.5896072", "0.5894872", "0.5891855", "0.58679724", "0.5793876", "0.5729231", "0.57291293", "0.57291293", "0.57291293", "0.57291293", "0.5673254", "0.566566", "0.5619309", "0.5586278", "0.5568247", "0.55580884", "0.5556915", "0.55389446", "0.5535694", "0.55273926", "0.55235827", "0.5523507", "0.5508121", "0.55034256", "0.55000657", "0.5496341", "0.5476703", "0.54702485", "0.5448905", "0.54484975", "0.544353", "0.54168993", "0.5415253", "0.54150766", "0.54150766", "0.5413211", "0.5410909", "0.54030216", "0.53972614", "0.53941905", "0.5368425", "0.53630835", "0.535328", "0.53524774", "0.5335558", "0.53298086", "0.5329661", "0.53229666", "0.53143984", "0.53141594", "0.5311325", "0.5311165", "0.52946913", "0.5294609", "0.5292218", "0.5284385", "0.52787566", "0.5275541", "0.5274033", "0.5268079", "0.5266865", "0.5256918", "0.5256138", "0.52483714", "0.5247233", "0.5241124", "0.5239054", "0.5233597", "0.52260286", "0.521416", "0.5212271", "0.5210582", "0.52037644", "0.51991105", "0.51960844", "0.51942", "0.5170746", "0.5170091", "0.5169518", "0.5168208", "0.5165362", "0.5159143", "0.5152493", "0.5142776", "0.51403093", "0.51403093", "0.5140099" ]
0.72609544
0
Lists all Agent models.
Список всех моделей агента.
public function actionIndex() { $searchModel = new AgentSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex() {\n\t\t//die();\n\n\t\t$agents = Agent::find()->asArray()->all();\n\n\n\t\t$searchModel = new LandingSearch();\n\t\t$dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n\t\t$dataProvider->setSort(['defaultOrder' => ['request_id'=>SORT_DESC]]);\n\n\t\treturn $this->render('index', [\n\t\t\t'searchModel' => $searchModel,\n\t\t\t'dataProvider' => $dataProvider,\n\t\t\t'agents' => $agents\n\t\t]);\n\t}", "public function index()\n {\n $agents = $this->agentRepository->all();\n\n return $this->sendResponse($agents->toArray(), \"Agents retrieved successfully\");\n }", "public function index()\n {\n// $agents = DB::table(\"agent\")->get();\n $agents = Agent::All();\n return view('agents.index',compact('agents'));\n }", "public function listarAgentes()\n {\n // Definir pagina para listagem\n $agentes = Agente::all();\n return view('/', [ 'agentes' => $agentes ]);\n }", "public function index()\n { \n $agents = Agent::all();\n return view('agent/index', ['agents' => $agents]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $agents = $em->getRepository('AppBundle:Agent')->findAll();\n\n return $this->render('agent/index.html.twig', array(\n 'agents' => $agents,\n ));\n }", "public function index()\n {\n $agents = User::whereHas('roles', function($q){$q->whereIn('display_name', ['agent']);})->get();\n\n return view('agent.all-agents',['agents'=>$agents,'count'=>1]);\n }", "public function index()\n {\n $agents = AdAgent::query()->paginate(10);\n return view('admin.pages.Estates.agents.index', compact('agents'));\n }", "public function index()\n {\n return $this->model->all();\n }", "public function index()\n {\n return $this->model->all();\n }", "public function index()\n {\n if (!Bouncer::allows('manage-agents')) {\n abort(403);\n }\n\n $agents = User::whereHas('roles', function($q){\n $q->where('name', 'agent');\n })->paginate(10);\n\n return view('agent.index', compact('agents'));\n }", "public function all()\n {\n return $this->modelClassName->all();\n }", "public function index(){\n\n return $this->model->all();\n }", "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "public function all()\r\n {\r\n return $this->model->get();\r\n }", "public function index()\n {\n return Vehicle::all();\n }", "public function index(Request $request)\n {\n $agents = $this->agentRepository->all(\n $request->except(['skip', 'limit']),\n $request->get('skip'),\n $request->get('limit')\n );\n\n return $this->sendResponse($agents->toArray(), 'Agents retrieved successfully');\n }", "public function index()\n {\n return Mobil::all();\n }", "public function index()\n {\n return Mobil::all();\n }", "public function index()\n {\n return Objava::all();\n }", "public function getAll()\n {\n return $this->model->get();\n }", "public static function getAll(){\n return Model::factory(__CLASS__)\n ->find_many();\n }", "public function getModels();", "public function all()\n {\n return $this->model->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function index()\n {\n $models = $this->modelRepository->getAll();\n return $this->respondOk([\n 'models' => $this->modelTransformer->transformCollection($models)\n ]);\n }", "public function index()\n {\n $model=User::findByType('agent');\n return view('admin.agents.index',compact('model'));\n }", "public function getAll()\n {\n return $this->_model::all();\n }", "public function index()\n {\n $lists=User::whereHas('roles',function($q){\n $q->where('name','agent');\n })->get();\n return view('admin.agentList')->with('lists',$lists);\n }", "public function agents(){\n return $this->hasMany(config('web-call-center.agent_model'), config('web-call-center.organization_foreign_key'));\n }", "public function index()\n {\n $objeto = Objeto::all();\n return $this->showAll($objeto);\n }", "public function listAgents() {\n\t\t//Sending the request\n\t\t$request = $this->send(\"GET\", \"GetAgents\");\n\t\treturn $request;\n\t}", "function index() {\n $this->set('roles', $this->Role->find('all'));\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function all()\n {\n return $this->model->all();\n }", "public function index()\n {\n\n $agents = Agent::latest()->paginate(5);\n return view('agent.auth.show', compact('agences', 'agents'));\n }", "public function all() {\n return $this->model->all();\n }", "public function getAll() {\n return $this->getModel()->all();\n }", "public function actionAll()\n {\n $users = new Users($this->sql);\n $advs = new Advertisements($this->sql);\n return $this->render('all.php', ['users' => $users->findAllUser(), 'advs' => $advs->findAllAdvertisements()]);\n }", "public static function getAll() {\n $list = array(); //create list\n $connection = MySqlConnection::getConnection();//get connection\n\t\t\t$query = 'select id, name, photo from agents order by id';//query\n\t\t\t$command = $connection->prepare($query);//prepare statement\n\t\t\t$command->execute();//execute\n $command->bind_result($id, $name, $photo);//bind results\n //fetch data\n\t\t\twhile ($command->fetch()) {\n\t\t\t\tarray_push($list, new Agent($id, $name, $photo));//add contact to list\n\t\t\t}\n return $list; //return list\n }", "public function index()\n {\n return Brand::with('models')->get();\n }", "public function index(Request $request)\n {\n $types = Type::all();\n $name = $request->get('name');\n $agents = Agent::orderBy('id', 'ASC')\n ->name($name)\n ->where('user_id', auth()->user()->id)\n\n ->paginate(140);\n\n return view('admin.agents.index', compact('agents', 'types'));\n }", "public function getAll()\n {\n return $this->model->newQuery()->orderBy('name')->get();\n }", "public function all()\n {\n return $this->getModel()->all();\n }", "public function all()\n {\n return $this->getModel()->all();\n }", "public function getModelsList(){\n return $this->_get(1);\n }", "public function getAll()\n {\n $this->all();\n }", "public function index()\n {\n return Mensal::all();\n }", "public function all(){\n\t\treturn $this->model->all();\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ItesACBackendBundle:Modelo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function listar() {\n $dados = $this->model->listar();\n echo $this->toJson($dados);\n }", "public function actionIndex()\n {\n $searchModel = new AgendamentoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination = ['pageSize' => 20];\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAll()\n {\n if (!$this->modelAdmin->hasSoftDeleting()) {\n return $this->missingMethod();\n }\n\n return view('flare::admin.modeladmin.all', [\n 'modelItems' => $this->modelAdmin->allItems(),\n 'totals' => $this->modelAdmin->totals(),\n ]\n );\n }", "public function index(Request $request)\n {\n $this->filterTable();\n return $this->getResultList($this->model->orderBy('name'));\n }", "public function ShowAll()\n {\n return Attestation::all();\n }", "public function index()\n {\n $pageTitle = 'All Staff List';\n return view('admin.agents', compact('pageTitle'));\n }", "function index()\n\t\t{\n\t\t\t$this->%lcaseModels% = (new %Model%)->find();\n\t\t}", "public function actionIndexAll($purgeBefore = false)\n {\n foreach ($this->module->models as $model) {\n $this->run('index-model', [$model, $purgeBefore]);\n $this->stdout(\"\\n\");\n }\n }", "function getAll() {\n return Amphoe::all();\n }", "public function agencyList()\n\t{\n\t\t$agency = new Agency();\n\t\t$rs = $agency->getAllAgency();\n return View::make('agency.list')->with('rs',$rs);\n\t}", "public function index()\n {\n $oCarModels = CarModel::paginate(15);\n return view('admin.fleet_management.models.index', compact('oCarModels'));\n }", "public function index()\n\t{\n\t\treturn Actividad::all();\n\t}", "public function index()\n {\n $agents = Agent::all();\n if ($agents) {\n return view('admin.Agents.index', compact('agents'));\n }\n return view('404');\n }", "public function actionAlldomains() {\n\t\t$model = new AllDomainsModel();\n Utility::writeActionToSession('domainreports/alldomains');\n\t\t$this->render('alldomains',array('model'=>$model));\n\t\t}", "public function getListOfModels() {\n $requestBody = null;\n $inputArray = [];\n $ret = $this->fetch('GET', 'repository/models', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates request was successful and the models are returned',\n 400 => 'Indicates a parameter was passed in the wrong format. The status-message contains additional information.',\n ));\n return $ret;\n }", "public function getAllModels()\n {\n if (!isset($this->model)) {\n $this->model = $this->modelRepo->findBy([], ['name' => 'asc']);\n }\n\n return $this->model;\n }", "public function index()\n {\n return Laratables::recordsOf(Ambassador::class);\n }", "public function all()\n {\n return response()->json(Company::paginate(20));\n }", "public function findAll() {\n\n \t$sPortal = preg_replace('/^Venus\\\\\\\\src\\\\\\\\([a-zA-Z]+)\\\\\\\\Model\\\\\\\\.+$/', '$1', get_called_class());\n \t\n \t$aResults = $this->orm\n \t\t\t\t\t ->select(array('*'))\n \t\t\t\t\t ->from($this->_sTableName)\n \t\t\t\t\t ->load(false, $sPortal);\n\n \treturn $aResults;\n }", "public function index()\n\t{\n $model = new Model();\n\n $response = $model->list()->toArray();\n\n\n\t\treturn $this->sendResponse($response, $this->name . 's retrieved successfully.');\n\t}", "public function all() {\n\t\t$this->_getAll ();\n\t}", "public function getAgents(){\n $query = \"select * from tbl_agents\";\n $result = $this->rq($query);\n return $result;\n }", "public function index(Request $request)\n {\n $this->loadWithRelatedModel();\n $this->_search();\n\n return $this->getResultList($this->model->latest());\n\n\n }", "public function index()\n {\n return Vet::all();\n }", "public function index()\n {\n $agents =RemoteAgent::all();\n return response()->json(['data'=> $agents], 200) ; \n }", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();" ]
[ "0.6676386", "0.6641991", "0.66166794", "0.64911133", "0.6431228", "0.63950336", "0.6360094", "0.6346962", "0.6329126", "0.6329126", "0.6288809", "0.6257495", "0.62278837", "0.6191854", "0.61681867", "0.61495465", "0.61490226", "0.614493", "0.614493", "0.6137975", "0.61350006", "0.6134035", "0.61258584", "0.612571", "0.612571", "0.612571", "0.612571", "0.612571", "0.612571", "0.612571", "0.61219513", "0.61219513", "0.60521334", "0.6051024", "0.6040881", "0.60130703", "0.6010663", "0.5993988", "0.59831977", "0.5976665", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5969259", "0.5963889", "0.59488314", "0.59488285", "0.5945605", "0.59394056", "0.59311926", "0.59243965", "0.59195065", "0.5917147", "0.5917147", "0.59043276", "0.5892066", "0.588662", "0.5883001", "0.58673525", "0.5842428", "0.5841955", "0.5837399", "0.58152413", "0.5803109", "0.5795081", "0.5790826", "0.5787752", "0.5753141", "0.5750518", "0.5748145", "0.5739544", "0.57345086", "0.57207793", "0.571357", "0.5707167", "0.5690806", "0.5690601", "0.5687276", "0.5651288", "0.56457937", "0.5642102", "0.56390095", "0.5628751", "0.56285423", "0.5624038", "0.5624038", "0.5624038", "0.5624038", "0.5624038", "0.5624038", "0.5624038", "0.5624038", "0.5624038" ]
0.71099406
0
Creates a new Agent model. If creation is successful, the browser will be redirected to the 'view' page.
Создаёт новый модель Agent. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Agent(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Agendamento();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new VehicleManagement();\n $model->aliyeingiza = Yii::$app->user->identity->username;\n $model->muda = date('Y-m-d H:i:s');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n\n return view('admin.agents.create');\n }", "public function create(Agent $agent)\n {\n $idAgent = $agent->id;\n \n if (Gate::denies('edit-users')){\n\n return redirect()->route('admin.users.index');\n }\n\n $agents = Agent::all();\n\n $personne = new Personne();\n\n return view('personneaprevenir.create',compact('agents','personne','idAgent')); \n }", "public function actionCreate()\n {\n $model = new AllocationMaster();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('agent/create');\n }", "public function actionCreate()\n {\n $model = new $this->modelClass;\n\n if ($model->load($this->_request->post()) && $model->save()) {\n return $this->redirect([$this->viewView, 'id' => $model->$this->primaryKey]);\n } else {\n return $this->render($this->createView, [\n 'model' => $model,\n ]);\n }\n }", "public function store(CreateOrUpdateAgentsRequest $request)\n {\n AdAgent::query()->create($request->all());\n session()->flash('success', 'تم اضافة الوكيل بنجاح');\n return redirect()->route('admin.estates.agents.index');\n }", "public function actionCreate() {\n\n $model = new Robot();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('agent.create');\n }", "public function actionCreate()\n {\n $model = new Apartment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n /*return $this->render('create', [\n 'model' => $model,\n ]);*/\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Apartment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Visitors();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $model = Visitors::findOne(['id' => $model->id]);\n //发送通知\n $this->sendNotice($model);\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n if (!Bouncer::allows('manage-agents')) {\n abort(403);\n }\n\n $this->setTemplateVars();\n\n return view('agent.create');\n }", "public function actionCreate()\n {\n $model = new Missions();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Admin();\n\n $model->setScenario('create');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new Attendence();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n //\n $type = Agent::all();\n return view('admin.Agents.edit')->with('types', $type);\n }", "public function actionCreate()\n\t{\n\t\t$model=new GuestLedger;\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\tif(isset($_POST['GuestLedger']))\n\t\t{\n\t\t\t$model->attributes=$_POST['GuestLedger'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\t\t$this->render('create',array(\t'model'=>$model,));\n\t}", "public function actionCreate()\n {\n $model = new Anggota();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $this->layout = static::FORM_LAYOUT;\n $model = new $this->MainModel;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $this->afterCreate($model);\n if ($this->hasView) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect(['index']);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model=new Target();\n\n if($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new VacanteAspirante(['scenario' => VacanteAspirante::SCENARIO_CREATE]);\n\n $model->id_vacante = Yii::$app->request->post('id');\n\n if ($model->save()) {\n return $this->redirect(['indexmovil']);\n }\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\r\n\t{\r\n\t\t$model=new Ads('create');\r\n\t\t$user=Users::model()->findByPk(Yii::app()->user->id);\r\n\r\n\t\t// $this->performAjaxValidation($model);\r\n\t\t\r\n\t\tif(isset($_POST['Ads']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Ads'];\r\n\t\t\tif($model->save()) {\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->ad_id));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t\t'user'=>$user\r\n\t\t));\r\n\t}", "public function actionCreate()\n {\t$this->changeDBPuid();\n $model = new Tracking();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{ \n\t\t$model=new Clients;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Clients']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Clients']; \n\t\t\tif($model->save()) \n { \n $this->redirect(array('view','id'=>$model->id));\n }\n\t\t} \n \n\t\t$this->render('create',array('model'=>$model));\n\t}", "public function create()\n {\n return view('agentes.create');\n }", "public function actionCreate() {\n $model = new Rent();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Actor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->actor_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n\t\t$model = new Order ();\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'create', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}", "function addNewAgent() {\n\t\t\n\t\t$values = new Agent();\n\t\t$aValues = $values -> toArray();\n\t\t$message = \"\";\n\t\t\n\t\t$aValues = getDataForm($aValues);\n\t\t$values -> setAgentFromArray($aValues);\n\n\t\tif(isset($aValues['AgtFirstName'])) {\n\t\t\tif(addNewAgentToDB($values)) {\n\t\t\t\t$message = \"New Agent was added successfully\";\n\t\t\t} else {\n\t\t\t\t$message = \"Cannot add New Agent right now. Please try again.\";\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$message = \"Invalid Information.Please check the information again.\";\n\t\t}\n\t\tredirectPage(\"agententry.php\", $message);\n\t}", "public function actionCreate() {\n $model = new Trabajador();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Request();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->delivery_status = '2';\n $model->user_id = Yii::$app->user->getId();\n $model->save();\n return $this->redirect(['view', 'id' => $model->tracking_number]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\r\n\t{\r\n\t\t$model = new Caja;\r\n\r\n $this->performAjaxValidation($model, 'caja-form');\r\n\r\n if(isset($_POST['Caja']))\r\n\t\t{\r\n\t\t\t$model->attributes = $_POST['Caja'];\r\n\t\t\tif($model->save()) {\r\n $this->redirect(array('view', 'id' => $model->ID));\r\n }\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model' => $model,\r\n\t\t));\r\n\t}", "public function actionCreate()\n {\n $modelClass = $this->modelClass;\n $model = new $modelClass();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'treeArray' => $this->getTreeArray()\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Cvpersonal();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Adsmanager();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Company();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Absen;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Absen']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Absen'];\n $is_success=$model->save();\n $this->notice($is_success,'Absen','create');\n\t\t\tif($is_success){\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n }else{\n $this->render('create',array(\n 'model'=>$model\n ));\n }\n\t\t}else{\n if($_GET['ajax'])\n $this->renderModal('create',array(\n 'model'=>$model,\n ));\n else\n $this->render('create',array(\n 'model'=>$model,\n ));\n }\n\t}", "public function actionCreate()\n {\n //$model = new DetalleMatricula();\n\t\t/*\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }*/\n\t\treturn $this->redirect(Yii::$app->request->referrer);\n }", "public function actionCreate() {\n $model = new A2Caja();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_caja]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Entity();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create() {\n\n\n\n $order_model = $this->loadModel('order');\n $order_model->create($_POST);\n\n header('location: ' . URL . 'order/index');\n }", "public function actionCreate()\n {\n $model = new Activity();\n\n if ($model->load(Yii::$app->request->post())){ \n\t\t\tif($model->save()) {\n\t\t\t\tYii::$app->getSession()->setFlash('success', 'New data have saved.');\n\t\t\t}\n\t\t\telse{\n\t\t\t\tYii::$app->getSession()->setFlash('error', 'New data is not saved.');\n\t\t\t}\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n $agents = Agent::all();\n $cities = City::where('country_id', 191)->get();\n return view('admin.ambassadors.create')->with('cities', $cities)->with('agents', $agents);\n }", "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function addAgentAction(){\n\t\tif($this->getRequest()->isPost()){\n\t\t\t$post=$this->getRequest()->getPost();\n\t\t\t$update_agent = new sales_Model_DbTable_DbSalesAgent();\n\t\t\t$agent_id = $update_agent ->addNewAgent($post);\n\t\t\t$result = array(\"agent_id\"=>$agent_id);\n\t\t\techo Zend_Json::encode($result);\n\t\t\texit();\n\t\t}\n\t\t\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new Ordenmtto;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Ordenmtto']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Ordenmtto'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new AmCoa();\n\n if ($model->load(Yii::$app->request->post()) ) {\n\n $transaction = \\Yii::$app->db->beginTransaction();\n\n try {\n\n if($model->save()){\n $transaction->commit();\n // Set success data\n \\Yii::$app->getSession()->setFlash('success', 'Successfully Inserted'); \n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n \n\n }catch (\\Exception $e) {\n\n \\Yii::$app->getSession()->setFlash('error', $e->getMessage());\n $transaction->rollBack();\n }\n\n \n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Objects();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n\t\t$model = new Landing();\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->request_id]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "public function actionCreate()\n {\n $model = new Grade();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Area;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Area'])) {\n $model->attributes = $_POST['Area'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function actionCreate()\n {\n $model = new OrderBasic();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Trabajadores;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Trabajadores']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Trabajadores'];\n\t\t\tif($model->save()) {\n Yii::app()->user->setFlash('success', \"..La carga inicial se ha anulado!\");\n\t\t\t\t$this->redirect(array('update','id'=>$model->codigotra));\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new QueTracker();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\r\n {\r\n $model = new Departments();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n {\n $model = new Opportunity();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Tuman();\n\n if ($model->load(Uni::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_Tuman]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n if (!auth()->user()->can('user.create')) {\n abort(403, 'Unauthorized action.');\n }\n\n return view('sales_commission_agent.create');\n }", "public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Campaign();\n $model ->campaignType =1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->campaignID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new CPartner;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect('index');\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function addAgentAction(){\r\n\t\tif($this->getRequest()->isPost()){\n\t\t\t$post=$this->getRequest()->getPost();\n\t\t\t$update_agent = new sales_Model_DbTable_DbSalesAgent();\r\n\t\t\t$agent_id = $update_agent ->addNewAgent($post);\r\n\t\t\t$result = array(\"agent_id\"=>$agent_id);\n\t\t\techo Zend_Json::encode($result);\r\n\t\t\texit();\n\t\t}\r\n\t\t\n\t}", "public function actionCreate()\n {\n $model = new Raschet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $class = $this->modelClass;\n $this->model = new $class();\n $this->setDefaultAttributes();\n if (isset($_POST[$this->modelClass]))\n {\n $this->model->attributes=$_POST[$this->modelClass];\n $this->performAjaxValidation();\n\n if($this->model->save()) {\n $data = $this->afterSave();\n if ($this->do_rendering) {\n Yii::app()->user->setFlash('saveobject',$this->messageObjectSaved);\n if ($this->redirect)\n $this->redirect(\n (isset($_POST['buttonSave']) && $_POST['buttonSave']=='Сохранить') ? '/admin/'.$this->crudalias\n : '/admin/'.$this->crudalias.'/update?id='.$this->model->primaryKey);\n else\n return $data;\n } else return $data;\n } else {\n $this->errorSave();\n Yii::log('AFTER CREATE ERROR:'.var_export($this->model->errors,true));\n if ( ! $this->do_rendering) return false;\n }\n }\n\n if ($this->do_rendering) \n $this->render('_form');\n else return true;\n }", "public function actionCreate()\n {\n $model = new Enroll();\n\n $activities = ArrayHelper::map(Activity::find()->all(), 'id', 'activity_name');\n\n $model->id = JdhnCommonHelper::createGuid();\n $model->created_at = time();\n $model->modified_at = $model->created_at;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'activities' => $activities,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new ExpoStand();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n print_r($model->getErrors());\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Maestroclipro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n $pageTitle = 'Add new staff';\n $shops = Shop::where('status', 1)->get();\n\n return view('admin.agent_create', compact('pageTitle', 'shops'));\n }", "public function create()\n {\n return view('admin.pages.Estates.agents.create-update');\n }", "public function actionCreate()\n {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n\t\tif(Yii::$app->user->can('frontend-announcement-create')){\n $model = new AnnouncementForm();\n\n if ($model->load(Yii::$app->request->post())) {\n\t\t\tif($announcement = $model->create()){\n \treturn false;//$this->redirect(['view', 'id' => $announcement->id]);\n\t\t\t}\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n\t\t}\n }", "public function actionCreate()\n {\n $model = new Clients();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Cms();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Vote();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new $this->modelName;\n\n $this->performAjaxValidation($model);\n\n// print_r($_POST);\n// die();\n if (isset($_POST[$this->modelName])) {\n $model->attributes = $_POST[$this->modelName];\n if ($model->save()) {\n $this->redirect(array('update', 'id' => $model->id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function create()\n {\n $fiche_agents =Fiche_agents::all();\n return view('admin.agent_fiche.create', compact('fiche_agents'));\n }", "public function actionCreate() {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n if (Yii::$app->user->isGuest) {\n return $this->goHome();\n }else{\n $model = new TblDealer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new Asistencia;\n\n $this->performAjaxValidation($model, 'asistencia-form');\n\n if (isset($_POST['Asistencia'])) {\n $model->attributes = $_POST['Asistencia'];\n $model->COD_USUARIO = (Yii::app()->getSession()->get('id_usuario'));\n if ($model->save()) {\n $this->redirect(array('view', 'id' => $model->CODIGO_ASISTENCIA));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function actionCreate()\n {\n $model = new User(['scenario' => 'admin-create']);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// Yii::$app->authManager->assign(Yii::$app->authManager->getRole($model->role), $model->id);\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new RoleForm();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n { \n $clientesagente = DB::table('agentes')->orderBy('nome')->get();\n return view('mbl.create', compact('clientesagente'));\n }", "public function actionCreate()\n {\n $model = new MenuForm();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $modelName = $this->getModel();\n\t\t$model = new $modelName;\n\t\t$model->dt_create = date('c');\n\t\t$model->dt_update = date('c');\n\t\t$model->id_user_create = 1;\n\t\t$model->id_user_update = 1;\n\t\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t \n\t\t\t\t\treturn $this->redirect(['index']);\n\t\t\t\n } else {\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new FormComReport();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new OaGoodsinfo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->pid]);\n } else {\n\n return $this->render('create', [\n 'model' => $model,\n\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new tarjetacanon();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'nroTarjeta' => $model->nroTarjeta, 'idcanon' => $model->idcanon]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new COrders;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->o_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Meeting();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->MM_ID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n \treturn view('model.create');\n }", "public function actionCreate(){\n $model = new \\frontend\\models\\Party();\n \n $model->created_at = date('Y-m-d');\n $model->updated_at = date('Y-m-d');\n $model->created_by = \\Yii::$app->user->id;\n $model->updated_by = \\Yii::$app->user->id;\n\n if(($model->load(\\Yii::$app->request->post())) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create',[\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Domain();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n if( !in_array($this->role_id, [1,6]) ) {\n yii::$app->getSession()->setFlash('error', '没有该权限');\n echo \"<script>window.history.go(-1)</script>\";exit;\n }\n $model = new AdminCharge();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $class = $this->getModelClass();\n $modelName = \\CHtml::modelName($class);\n /** @var $model ActiveRecord */\n $model = new $class();\n\n \\Yii::import('bootstrap.widgets.TbForm');\n\n if (isset($_POST[$modelName])) {\n $model->setAttributes($_POST[$modelName]);\n }\n\n /** @var $form \\CForm */\n $form = \\TbForm::createForm(\n $model->prepareFormConfig($model->getFormConfig()),\n $this,\n array(\n 'enableAjaxValidation' => false,\n 'type' => 'horizontal',\n ),\n $model\n );\n\n if ($form->submitted('submit') && $form->validate()) {\n $transaction = $model->getDbConnection()->beginTransaction();\n try {\n if ($model->save()) {\n $transaction->commit();\n $this->redirect(array('view', 'id' => $model->getPrimaryKey()));\n }\n } catch (\\Exception $exception) {\n $model->addError($model->tableSchema->primaryKey, $exception->getMessage());\n $transaction->rollback();\n }\n }\n\n $this->render(\n '//templates/admin/create',\n array(\n 'model' => $model,\n 'form' => $form,\n )\n );\n }", "public function actionCreate()\n\t{\n\t\t$model=new Tournament;\n\n\t\t$catCategory = new Category();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Tournament']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Tournament'];\n\t\t\t\n\t\t\t/**\n\t\t\t * Default values.\n\t\t\t */\n\t\t\t$model->ACTIVE = 1;\n\t\t\t$model->TYPE = 0;\n\t\t\t$model->START_E = 8;\n\t\t\t\n\t\t\t\n\t\t\tif($model->save()){\n\t\t\t\t\n\t\t\t\tYii::app()->user->setFlash('success', '<strong>!Listo</strong> Se ha creado el torneo y puede configurarlo.');\n\t\t\t\t\n\t\t\t\t$this->redirect(array('manage','id'=>$model->ID));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t\t'model'=>$model,\n\t\t\t\t'catCategory'=>$catCategory,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Rmodel();\n\n /**\n * Try - 使用异常的函数应该位于 \"try\" 代码块内。如果没有触发异常,\n * 则代码将照常继续执行。但是如果异常被触发,会抛出一个异常。\n */\n try {\n if ($model->load(Yii::$app->request->post()))\n {\n \n $model->created = date('Y-m-d H:i:s');\n $model->save();\n \n //获取插入主键并作为mid值当前条插入的记录\n $mid = $model->getPrimaryKey();\n $model->mid = $mid;\n $model->save();\n \n return $this->redirect(['view', 'id' => $model->id]);\n }\n \n } catch (Exception $e) {\n echo 'Message: ' .$e->getMessage();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }" ]
[ "0.7011105", "0.6988782", "0.6967453", "0.69214225", "0.6844043", "0.6829928", "0.6821386", "0.6807075", "0.6785979", "0.6781844", "0.67736167", "0.6756884", "0.6723861", "0.67213726", "0.67044574", "0.66760164", "0.6674415", "0.6672053", "0.6659266", "0.6645087", "0.6644683", "0.66443473", "0.6636408", "0.65969723", "0.65966994", "0.6593108", "0.65830135", "0.6571422", "0.6569797", "0.65691036", "0.65651155", "0.6561383", "0.6552429", "0.6552333", "0.6551232", "0.6537291", "0.6534081", "0.6514955", "0.6503415", "0.6496902", "0.6488956", "0.6484042", "0.64798075", "0.6476549", "0.6464196", "0.64173925", "0.64173925", "0.64173925", "0.641609", "0.6413706", "0.64093864", "0.6400407", "0.63912636", "0.6388514", "0.63870555", "0.636323", "0.635561", "0.63535184", "0.63501173", "0.6349058", "0.6344194", "0.6343608", "0.6335674", "0.63348734", "0.63347787", "0.6333396", "0.6332915", "0.6331748", "0.6328032", "0.6322374", "0.6322182", "0.6321555", "0.63214654", "0.6319733", "0.6314975", "0.63117933", "0.6311601", "0.6308448", "0.63080937", "0.6306969", "0.6305975", "0.63054466", "0.6303565", "0.6299182", "0.62928736", "0.6291213", "0.62882227", "0.628472", "0.62822115", "0.6268528", "0.62654704", "0.6262678", "0.62612027", "0.6260948", "0.6260511", "0.62555796", "0.62443507", "0.62436074", "0.6242248", "0.62371826" ]
0.8752268
0
Get the first cell that cancels the given cell. More precisely, get the first cell that: is in the same row, column or block of the given cell; contains the given value. The order used for the "first" is not defined, but is garanteed to be consistent across multiple invications.
Получите первую ячейку, которая отменяет заданную ячейку. Более точно, получите первую ячейку, которая: находится в той же строке, столбце или блоке заданной ячейки; содержит заданное значение. Порядок, используемый для определения "первой", не определен, но гарантируется, что он будет последовательным при нескольких вызовах.
public function getFirstCancellerOf(Zwe_Sudoku_Cell $Target, $Value) { foreach(self::getRegionTypes() as $RegionType) { $Region = $this->getRegionAt($RegionType, $Target->getX(), $Target->getY()); for($i = 0; $i < 9; ++$i) { $Cell = $Region->getCell($i); if($Cell != $Target && $Cell->getValue() == $Value) return $Cell; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCell($row)\n {\n foreach ($this->cells as $cell) {\n if ($cell->getCsvRow()->getRowPosition() === $row) {\n return $cell;\n }\n }\n\n throw new CellNotFoundException(\n 'That cell doesn\\'t exist in the column');\n }", "public function current(): ?Cell\n {\n $cellAddress = Coordinate::stringFromColumnIndex($this->currentColumnIndex) . $this->rowIndex;\n\n return $this->cellCollection->has($cellAddress)\n ? $this->cellCollection->get($cellAddress)\n : (\n $this->ifNotExists === self::IF_NOT_EXISTS_CREATE_NEW\n ? $this->worksheet->createNewCell($cellAddress)\n : null\n );\n }", "public function rowFirstCellIndex($position = null);", "protected function getCell($worksheet,$row,$col,$default_val='') {\n $row += 1; // we use 0-based, PHPExcel uses 1-based row index\n $val = ($worksheet->cellExistsByColumnAndRow($col,$row)) ? $worksheet->getCellByColumnAndRow($col,$row)->getCalculatedValue() : $default_val;\n if ($val===null) {\n $val = $default_val;\n }\n return trim(ltrim($val));\n }", "public function topLeftCell($value) {\n return $this->setProperty('topLeftCell', $value);\n }", "public function getActiveCell()\n {\n return $this->getActiveSheet()->getActiveCell();\n }", "private function __find_smallest() {\n $minval = 2147483647;\n for ($i = 0; $i < $this->n; $i++) {\n \tfor ($j = 0; $j < $this->n; $j++) {\n if (($this->row_covered[$i] === FALSE) && ($this->col_covered[$j] === FALSE)) {\n if ($minval > $this->C[$i][$j]) {\n $minval = $this->C[$i][$j];\n }\n }\n }\n }\n return $minval;\n }", "private function get_branch($cell) {\n if(count($this->tree) == 0) {\n array_push($this->tree, Array($cell));\n return 0;\n }\n $found_branches = Array();\n foreach($this->tree as $branch_id => $branch) {\n foreach($branch as $tree_cell_id => $tree_cell) {\n if($cell->X == $tree_cell->X && $cell->Y == $tree_cell->Y) {\n $found_branch['branch_id'] = $branch_id;\n $found_branch['cell_id'] = $tree_cell_id;\n array_push($found_branches, $found_branch);\n }\n }\n }\n if(count($found_branches) > 0) {\n $branch = null;\n foreach($found_branches as $branch_info_id => $branch_info) {\n if($branch_info['cell_id'] == count($this->tree[$branch_info['branch_id']]) - 1) {\n $branch = $branch_info['branch_id'];\n }\n }\n if(is_null($branch)) {\n $source_branch = $this->tree[$found_branches[0]['branch_id']];\n $new_branch = Array();\n foreach($source_branch as $cell_id => $branch_cell) {\n array_push($new_branch, $branch_cell);\n if($cell->X == $branch_cell->X && $cell->Y == $branch_cell->Y) {\n break;\n }\n }\n $branch = array_push($this->tree, $new_branch) - 1;\n }\n return $branch;\n }\n return null;\n }", "public function getFreeCell()\n {\n $cells = $this->getCells();\n\n return array_filter($cells, function ($var) {\n return empty($var);\n });\n }", "function sgs_get_cell( $sheet, $col, $row ) {\n\tglobal $SGS;\n\treturn $SGS->fetch( $sheet, $col, $row, false );\n}", "function findNextCell($tab,&$x,&$y){\r\n for($i=0;$i<9;$i++)\r\n for($j=0;$j<9;$j++)\r\n if($tab[$i][$j] == 0 || $tab[$i][$j] == \"\" ){\r\n $x=$i;\r\n $y=$j;\r\n return true;\r\n }\r\n return false;\r\n }", "public function getCell(Point $point) {\n $x = $point->getX();\n\n if (!array_key_exists('' . $x, $this->grid)) {\n return null;\n }\n\n $y = $point->getY();\n\n if (!array_key_exists('' . $y, $this->grid[$x])) {\n return null;\n }\n\n return $this->grid[$x][$y];\n }", "public function findWhereFirst() {\n return $this->model->where($column, $value)->firstOrFail();\n }", "public function getFirst() {\n \tif ($this->first != null) {\n\t\t return ($this->first);\n\t\t}\n\t\t$ve = $this->getValueExpression(\"first\");\n\t\tif ($ve != null) {\n\t\t\treturn ($ve->getValue($this->getFacesContext()->getELContext()));\n\t\t}\n\t\telse {\n return (0);\n }\n }", "private function getUnassignedInterviewee() {\n for ($r = 0; $r < $this->dimension; $r++) {\n if ($this->assignedSlotForInterviewee[$r] == -1) {\n return $r;\n }\n }\n return -1;\n }", "public function getCell($row, $col){\n return $this->data[$row+1][$col];\n }", "public function getValueCellFromArray($celda)\r\n {\r\n $excelOriginal = array_values($this->_excel);\r\n list($columna, $fila) = PHPExcel_Cell::coordinateFromString($celda);\r\n $columna = PHPExcel_Cell::columnIndexFromString($columna);\r\n \r\n if ( ($fila) > $this->_filas || ($columna) > $this->_columnas ) {\r\n return null;\r\n }\r\n \r\n $retorno = null;\r\n if ($fila == 1) {\r\n $retorno = $this->_titulos[$columna - 1];\r\n } else {\r\n $excelOriginal = array_values($excelOriginal[$fila - 2]);\r\n $retorno = $excelOriginal[$columna - 1];\r\n }\r\n return $retorno ;\r\n }", "public function first()\n {\n return array_shift($this->working_array);\n }", "public function getFirstEntry ()\n {\n $retval = null;\n\n if (isset($this->stack[0]))\n {\n $retval = $this->stack[0];\n }\n\n return $retval;\n }", "public function first()\n {\n return reset($this->rows);\n }", "public function getFirstArrayByIndex0($value)\n\t{\n\t\tfor ($i=0; $i <sizeof($this->data) ; $i++) { \n\t\t\tif ($this->data[$i][0]==$value) {\n\t\t\t\treturn $this->data[$i];\n\t\t\t}\n\t\t}\n\t}", "public function getFirstEntry()\n {\n $retval = null;\n\n if (isset($this->stack[0]))\n {\n $retval = $this->stack[0];\n }\n\n return $retval;\n }", "public function first() {\n foreach ($this as $value) {\n return $value;\n }\n\n return null;\n }", "public function getCell() {return $this->_cell;}", "public function getCell($x,$y,$z)\n {\n \treturn $this->matriz[$x][$y][$z];\n }", "public function findWhereFirst($column, $value);", "public function row($column, $value)\n {\n\n return $this->where($column, $value)[0];\n }", "public function getCell($row_num, $col_num, $val_only = true) {\n // check whether the cell exists\n if (!$this->isCellExists($row_num, $col_num)) {\n throw new \\Exception('Cell '.$row_num.','.$col_num.' doesn\\'t exist', SimpleExcelException::CELL_NOT_FOUND);\n }\n return $this->table_arr[$row_num-1][$col_num-1];\n }", "public function first()\n {\n if ($this->valid()) {\n $this->rewind();\n return $this->current();\n }\n }", "function get_first(){\n\t\tif( count($this->tickets) > 0 ){\n\t\t\tforeach($this->tickets as $EM_Ticket){\n\t\t\t\treturn $EM_Ticket;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getFirst()\n\t{\n\t\treturn isset($this->rows[0]) ? $this->rows[0] : null;\n\t}", "public function first() {\n\t\tif ( empty( $this->data ) ) {\n\t\t\tthrow new UnderflowException( 'Collection is empty, can not get first value' );\n\t\t}\n\t\treturn array_values( $this->data )[0];\n\t}", "public function getFirst()\n {\n return $this->rows[0];\n }", "protected final function _fetchCell($field, $where, $table=false, $order=null)\n\t{\n\t\t$this->_formTableName($table);\n\n\t\t$this->_query(\n 'SELECT '.$field.' as cell FROM '.$table,\n array('where'=>$where, 'order'=>$order, 'limit'=>array(1))\n );\n return $this->_driver->_fetchOne();\n\t}", "public function getFirst()\n {\n return $this->getByIndex(0);\n }", "public function first()\n {\n return reset($this->element);\n }", "public function getFirstElement() {\r\n\t\t$tmp = $this->toArray();\r\n\t\treset($tmp);\r\n\t\treturn current($tmp);\r\n\t}", "public function first()\n {\n return array_values($this->data)[0] ?? null;\n }", "public function getCfirst()\n\t{\n\t\treturn $this->cfirst;\n\t}", "public function elementForValue($value)\n {\n $result = NULL;\n\n foreach ($this->elements as $element)\n {\n if ($element->getValue() === $value)\n {\n $result = $element;\n break;\n }\n }\n\n return ($result);\n }", "function get_first_value( array $arr, array $values ) {\n foreach( $values as $val ) {\n if( in_array($val, $arr) ) {\n return $val;\n }\n }\n\n grokit_error('None of supplied values found in array');\n}", "public function getFirst() {\r\n return $this->value[0];\r\n }", "public function queryFirstCell($s)\n {\n $args = func_get_args();\n array_shift($args);\n if (strpos($s, \" LIMIT \") === false)\n $s .= \" LIMIT 1\";\n $s = $this->parseVals($s, $args);\n $t1 = microtime(true);\n $res = $this->sql_link->query($s, MYSQLI_USE_RESULT);\n $t2 = microtime(true);\n $this->time = $t2 - $t1;\n if ($this->sql_link->error != '')\n $this->queryError($this->sql_link->errno, $this->sql_link->error, $s);\n if ($res === false)\n return false;\n if (is_bool($res))\n return true;\n $row = $res->fetch_assoc();\n if (!is_array($row))\n return NULL;\n if ($this->decode_queries && $this->encoding != $this->db_encoding)\n foreach ($row as $key => &$value)\n $value = iconv($this->db_encoding, $this->encoding, $value);\n return reset($row);\n }", "public function first()\n {\n reset($this->array);\n return $this->array[key($this->array)];\n }", "function getFirstOf()\r\n\t{\r\n\t\t$this->first_of=$this->range1 + 1;\r\n\t\treturn $this->first_of;\r\n\t}", "public function getValueLocation($value){\n foreach($this->tiles as $row=>$col){\n foreach($col as $kol => $val) {\n if($val === $value){\n $location = $row.$kol;\n }\n }\n }\n return $location;\n }", "public function getFirstAvailablePosition() {\r\n $position = $this->getFirstPosition();\r\n while ($position <= $this->getLastPosition()) {\r\n if (!isset($this->_equipementsByPosition[$position])) {\r\n return $position;\r\n }\r\n $position++;\r\n }\r\n return null;\r\n }", "private function getFirstDataCol()\n {\n for ($row = 1; $row <= 3; $row++) {\n $isLocationHeaderRow = false;\n for ($col = 1; $col <= 5; $col++) {\n $isLocationHeader = $this->isLocationHeader($col, $row);\n if ($isLocationHeader) {\n $isLocationHeaderRow = true;\n } elseif ($isLocationHeaderRow) {\n return $col;\n }\n }\n }\n\n throw new Exception('First data col could not be found');\n }", "public function cell($row=0, $column=0) {\n\t\tif (!is_object($this->result)) return false;\n\n\t\t$data = $this->result->fetch(PDO::FETCH_BOTH, PDO::FETCH_ORI_ABS, $row);\n\n\t\treturn (pudl_array($data) && array_key_exists($column, $data))\n\t\t\t? $data[$column] : false;\n\t}", "function getCell($row, $col){\n\n global $board;\n global $winner;\n\n $val = $board[$row][$col];\n\n if((is_null($val)) && (!$winner)){\n // if there's no value, put in the submit button for this cell\n return \"<input type='submit' value='$row,$col' name='select' />\";\n } else {\n\n // otherwise, print the value for this cell.\n return \"<h1>$val</h1><input type='hidden' name='board[$row][$col]' value='$val' />\";\n }\n}", "function getCellValue($cell) {\n if (startsWith($cell, '{\\footnotesize')) {\n preg_match_all('/footnotesize{(.*?)}}/s', $cell, $matches);\n $output = '';\n foreach ($matches[1] as $m) {\n $output .= $m . ' ';\n }\n return str_replace('\\_', '_', $output);\n }\n return $cell;\n}", "private function getTemplateCell()\n\t{\n\t\t$template = array();\n\t\t\n\t\tif (!is_null($this->options['CELL_TEMPLATE']))\n\t\t{\n\t\t\t$cell_db = wed_getDBObject('animation_cells');\n\t\t\t\n\t\t\tif ($cell_db->loadCellCode($this->options['CELL_TEMPLATE']))\n\t\t\t{\n\t\t\t\t$template = $cell_db->getDetails();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $template;\n\t}", "public function pop():Cell;", "public function getCellInRowAndColumn($row, $column)\n {\n $filledGrid =& $this->getFilledGridData();\n\n if (!isset($filledGrid[$row])) {\n return false;\n }\n if (!isset($filledGrid[$row][$column])) {\n return false;\n }\n\n return $filledGrid[$row][$column];\n }", "public function getHeaderCell()\n {\n return $this->headerCell;\n }", "public function getStartX() {\n return $this->cells[0]->x;\n }", "public function getCellStart()\r\n {\r\n $this->getCellCount();\r\n return $this->cell_start;\r\n }", "protected function getRandomInnerWall(array $cell): int\n {\n // Determine which row the cell is in\n $row = floor($cell['idx'] / $this->xCoordinate);\n\n // Wall indexes for the north, west, east, and south\n $northX = (int)($cell['idx'] + ($row * $this->xCoordinate) + $row);\n $westX = $northX + $this->xCoordinate;\n $eastX = $northX + $this->xCoordinate + 1;\n $southX = $northX + (2 * $this->xCoordinate) + 1;\n\n $possibleResults = [];\n if (!($cell['idx'] < $this->xCoordinate)) {\n $possibleResults[] = $northX;\n }\n if (!($cell['idx'] % $this->xCoordinate == 0)) {\n $possibleResults[] = $westX;\n }\n if (!($cell['idx'] % $this->xCoordinate == ($this->xCoordinate - 1))) {\n $possibleResults[] = $eastX;\n }\n if (!($cell['idx'] >= ($this->cellCount - $this->xCoordinate))) {\n $possibleResults[] = $southX;\n }\n if (empty($possibleResults)) {\n throw new \\Exception('internal error');\n }\n return $possibleResults[array_rand($possibleResults)];\n }", "public function indexOfOne($member)\r\n {\r\n $script = $this->loadScript('queue_indexof');\r\n $raw = $this->runScript($script, $this->composePushArgs($member));\r\n\r\n return $raw[0] >= 0 ? $raw[0] : null;\r\n }", "public function getCellStart()\n {\n $this->getCellCount();\n return $this->cell_start;\n }", "public function first()\n {\n $this->rewind();\n\n if (count($this->current_result)) {\n return $this->current_result[0];\n }\n }", "function findFirst($data) {\n //retourne l'élement courant du tableau\n return current($this->find($data));\n }", "public function getMinimum($value, $table, $col, $classCode){\r\n\t\t\r\n\t\t\t//$seat=$this->model_users->getMinimum('circle_id','seatplan','stdNo', $class_id);\r\n\t\t\t$this->db->select_min($value);\r\n\t\t\t$query = $this->db->get_where($table, array($col => null, 'classCode' => $classCode));\r\n\t\t\t//$query = $this->db->query(\"SELECT MIN($value) AS dataName FROM $table WHERE $col is NULL AND classCode='$class_id';\");\r\n\t\t\t\r\n\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t{\r\n\t\t\t \r\n\t\t\t return $query->row();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t}", "public function first()\n {\n return $this->data_seek(0);\n }", "public function first()\n\t{\n\t\treturn isset( $this->data[0] ) ? $this->data[0] : null;\n\t}", "public function getValueFromRow($row) { return null; }", "public function get_cell($query, $valtype, $value) {\n if (!$this->conn_err) {\n $stmt = $this->conn->prepare($query);\n $stmt->bind_param($valtype, $value);\n $stmt->execute();\n $result = $stmt->get_result();\n $stmt->close();\n\n if ($result != NULL) {\n $result = $result->fetch_assoc();\n $cellname = array_keys($result)[0];\n\n if (strcmp($cellname, 'passwordHash') != 0) {\n return $result[$cellname];\n }\n\n } else {\n return NULL;\n }\n }\n }", "function getSingle($table,$column,$where,$value){\n\tglobal $conn;\n\t$sql = \"SELECT $column FROM $table WHERE $where = '$value' LIMIT 0,1\";\n\n\t$result = mysqli_query($conn,$sql) or die(mysqli_error($conn));\n\t$v =FALSE;\n\twhile ($row = mysqli_fetch_assoc($result)) { \n\t\t$v = $row[$column];\n\t}\n\n\n\treturn $v;\n}", "public function getFirst()\n {\n $first = reset($this->items);\n return $first !== false ? $first : null;\n }", "public static function first()\n { return self::IndexSegment(1); }", "protected function getNextCellToMove(Game $game, string $piece, string $opponentPiece): ?Cell\n {\n return $game->cells()\n ->where('location', $this->robot->nextMoveIn($game, $piece, $opponentPiece))\n ->first();\n }", "public static function firstHeader($message, $header)\n {\n if (!empty($message['headers'])) {\n foreach ($message['headers'] as $name => $value) {\n if (!strcasecmp($name, $header)) {\n // Return the match itself if it is a single value.\n $pos = strpos($value[0], ',');\n return $pos ? substr($value[0], 0, $pos) : $value[0];\n }\n }\n }\n\n return null;\n }", "public function findFirst($req){\n\n \t\treturn current($this->find($req)); //current renvoi l'element courant , cest a dire le premier element dans ce cas là\n\n \t}", "public function firstOrNull()\n {\n return count($this->data) === 0 ? null : $this->data[0];\n }", "private function __find_a_zero() {\n $rowcol = array();\n $row = -1;\n $col = -1;\n $rowcol[0] = $row;\n $rowcol[1] = $col;\n $i = 0;\n $n = $this->n;\n $done = FALSE;\n\n while ($done === FALSE) {\n $j = 0;\n while (TRUE) {\n if (($this->C[$i][$j] == 0)\n && ($this->row_covered[$i] === FALSE)\n && ($this->col_covered[$j] === FALSE)) {\n $row = $i;\n $col = $j;\n $rowcol[0] = $row;\n $rowcol[1] = $col;\n $done = TRUE;\n\n }\n $j += 1;\n\n if ($j >= $n) {\n break;\n }\n }\n $i += 1;\n if ($i >= $n) {\n $done = TRUE;\n }\n\t\t}\n\n return $rowcol;\n }", "private function getFirstDataRow()\n {\n for ($row = 1; $row <= 3; $row++) {\n for ($col = 1; $col <= 4; $col++) {\n if ($this->isLocationHeader($col, $row)) {\n return $row + 1;\n }\n }\n }\n\n throw new Exception('First data row could not be found');\n }", "public function startCell(): string{\n return 'B2';\n }", "public function getCellByKey(string $key): TableCell {\n return $this->cellsByKey[$key];\n }", "public function getByColVal($col, $value) {\n return $this->where($col, $value)->first();\n }", "public function getPosition(int $value): ? int\n {\n\n foreach ($this->pool as $key => $domino) {\n /**\n * @var $domino Domino\n */\n if (in_array($value, $domino->getPlayableValues())) {\n return $key;\n }\n }\n\n return null;\n }", "public function getCell($col, $row)\n {\n return $this->spreadsheet->getActiveSheet()->getCellByColumnAndRow($col, $row);\n }", "public function first(){\n collect([1, 2, 3, 4])->first(function ($value, $key) {\n return $value > 2;\n });\n }", "public function first() {\n return $this->data[0];\n }", "public function getOne()\n {\n if ($this->count() > 0)\n {\n $this->seek(0);\n return $this->current();\n } else\n return null;\n }", "public function getOne()\n {\n if ($this->count() > 0)\n {\n $this->seek(0);\n return $this->current();\n } else\n return null;\n }", "public function getOne()\n {\n if ($this->count() > 0)\n {\n $this->seek(0);\n return $this->current();\n } else\n return null;\n }", "public function first()\n {\n return array_values($this->items)[0];\n }", "public function getFirstBlockFound() {\n $this->debug->append(\"STA \" . __METHOD__, 4);\n if ($data = $this->memcache->get(__FUNCTION__)) return $data;\n $stmt = $this->mysqli->prepare(\"\n SELECT IFNULL(MIN(time), 0) AS time FROM \" . $this->block->getTableName());\n if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result())\n return $result->fetch_object()->time;\n return false;\n }", "public function getContestant($slot) {\n if (!is_numeric($slot)) {\n throw new Exception(t('$slot must be a number'));\n }\n $contestants = $this->getMatchContestants(true);\n if (!$contestants) {\n return NULL;\n }\n $first = reset($contestants);\n if ($first->slot !== NULL) {\n foreach ($contestants as $eid => $contestant) {\n if ($contestant->slot == $slot) {\n return $contestant;\n }\n }\n return NULL;\n }\n $values = array_values($contestants);\n return $values[$slot - 1];\n }", "public function peek()\n {\n if($this->top<0)\n {\n return -1; //stack underflow\n }\n else\n {\n //returns top data\n $x = $this->array[$this->top];\n return $x;\n }\n }", "public function first()\n\t{\n\t\t$builder = $this->builder();\n\n\t\t$row = $builder->limit(1, 0)->get();\n\t\t$row = $row->getFirstRow($this->tempReturnType);\n\n\t\t$this->tempReturnType = $this->returnType;\n\n\t\treturn $row;\n\t}", "public function getFirstPosition() {\r\n \treturn $this->_firstPosition;\r\n }", "public function current()\n\t\t{\n\t\t\tif ($this -> Index == 0 && $this -> CurrentRow === false)\n\t\t\t{\n\t\t\t\t$this -> next();\n\t\t\t\t$this -> Index--;\n\t\t\t}\n\t\t\treturn $this -> CurrentRow;\n\t\t}", "public function pickWithValue(int $value): ? Domino\n {\n\n foreach ($this->pool as $key => $domino) {\n /**\n * @var $domino Domino\n */\n if (in_array($value, $domino->getPlayableValues())) {\n $domino = array_splice($this->pool, $key, 1);\n\n //Return a single domino\n return $domino[0];\n }\n }\n\n return null;\n }", "function first($arr, $value = true) {\r\n $crr = $arr;\r\n if (!$value) return array('key'=>key($crr), 'value'=>current($crr)) ;//return each($crr);\r\n //list($k, $v) = each($crr);\r\n return current($crr);\r\n }", "public function getFirst()\n {\n return reset($this->_data);\n }", "public function fetchCellValue($_cellName)\r\n {\r\n $record = mysql_fetch_assoc($this->result);\r\n return $record !== false ? $record[$_cellName] : null;\r\n }", "public function first()\n {\n return $this->get()[0];\n }", "function get_cell_by_pos_by_number($number,$pos,$as_html)\n\t{\n\t\treturn $this->call(\"Table.GetCellByPosByNumber?number=\".urlencode($number).\"&pos=\".urlencode($pos).\"&as_html=\".urlencode($as_html));\n\t}", "public function getCell(int $index):Cell;" ]
[ "0.5393277", "0.5353821", "0.5319437", "0.5175311", "0.51576", "0.5152985", "0.50925475", "0.5049276", "0.49436587", "0.48900267", "0.4819488", "0.47998172", "0.47192118", "0.47085324", "0.47060645", "0.4704234", "0.47038502", "0.4701121", "0.4683631", "0.46833068", "0.4670451", "0.4669688", "0.46470016", "0.46336558", "0.4625226", "0.4596833", "0.45912567", "0.4577569", "0.45705745", "0.45618805", "0.45429432", "0.45343557", "0.45228598", "0.4520367", "0.45169678", "0.45102364", "0.4499085", "0.44956467", "0.44863915", "0.44765857", "0.4474967", "0.44495317", "0.44461507", "0.44330913", "0.44250837", "0.4422624", "0.4413859", "0.44108522", "0.44080138", "0.44002452", "0.43903032", "0.43854868", "0.43790263", "0.43739608", "0.43738812", "0.43701035", "0.43604183", "0.43592113", "0.43521893", "0.43510267", "0.43502542", "0.43357137", "0.4323933", "0.4314498", "0.4304074", "0.42945945", "0.42795944", "0.42777595", "0.42757794", "0.4271871", "0.42580202", "0.42542136", "0.42535716", "0.42527428", "0.42483708", "0.42442977", "0.42435092", "0.42423996", "0.42411268", "0.42312872", "0.42309606", "0.4228757", "0.42276347", "0.42262506", "0.42262506", "0.42262506", "0.4222733", "0.42190814", "0.42186517", "0.4218545", "0.42158693", "0.42120272", "0.42108768", "0.42102587", "0.42035702", "0.42019233", "0.42015776", "0.4198786", "0.41984808", "0.4198149" ]
0.7115825
0
Get the number of occurrences of a given value in this grid.
Получите количество вхождений заданного значения в этой сетке.
public function getCountOccurrencesOfValue($Value) { $Ret = 0; for($y = 0; $y < 9; ++$y) for($x = 0; $x < 9; ++$x) if($this->_cells[$y][$x]->getValue() == $Value) $Ret++; return $Ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countValue($value)\n {\n $i = 0;\n foreach ($this as $v) {\n if ($v === $value) {\n $i += 1;\n }\n }\n\n return $i;\n }", "public function count() {\n $count = 0;\n\n foreach ($this as $value) {\n $count++;\n }\n\n return $count;\n }", "public function count(): int {\n return count($this->values);\n }", "public function count()\n {\n return count($this->values);\n }", "public function count() : int\n {\n return $this->values->count();\n }", "public function count() {\n return count($this->values);\n }", "public function count() {\n return count($this->values);\n }", "public function count(): int\n\t{\n\t\treturn size($this->value);\n\t}", "public function count(string $column, $value): int\n {\n return $this->entity()->where($column, $value)->count();\n }", "public function count()\n {\n return $this->cell_count;\n }", "public function getNumberOfOccurrences()\n {\n if (array_key_exists(\"numberOfOccurrences\", $this->_propDict)) {\n return $this->_propDict[\"numberOfOccurrences\"];\n } else {\n return null;\n }\n }", "public function cellCount() {\n $cell_Count = 0; // start the counter at 0\n foreach ($this->cells as $y => $row) { // for every row of cells...\n foreach ($row as $x => $cell) { // and for every position on that row...\n if ($cell) { // if there's a cell there...\n $cell_Count++; // add 1 to the counter\n }\n }\n }\n return $cell_Count; // return count for display\n }", "public function getCount(){\n\t\treturn count($this->values);\n\t}", "public function count()\n {\n return count($this->arr);\n }", "public function count()\n {\n return count($this->arr);\n }", "public function count()\n\t{\n\t\treturn intval( $this->createQuery()->execute( true )->cell() );\n\t}", "public function count(): int\n {\n return count($this->map);\n }", "public static function count($value): int\n {\n if (is_array($value) || $value instanceof \\Countable) {\n return count($value);\n }\n return 0;\n }", "public function count() {\r\n\t\treturn count($this->arr);\r\n\t}", "public function count() : int\n {\n return $this->n;\n }", "function countOccurrencesInArr($array, $value){\n $counter = 0;\n // go through each value in array\n foreach($array as $valueInArr) \n {\n if($valueInArr === $value){ \n $counter++; \n }\n }\n return $counter;\n}", "function countValues();", "public function count()\n {\n return (int) $this->engine()->count($this);\n }", "public function getNumberOccurances() {\n return (int) count($this->_stringFoundIn);\n }", "final public function count()\n\t{\n\t\treturn count((array) $this);\n\t}", "public function count() {\n\t\treturn count($this->map);\n\t}", "public function count() : int\n {\n return \\count($this->tiles);\n }", "public function count()\n {\n return count($this->cellViews);\n }", "public function count()\n {\n return count(Arr::dot($this->all()));\n }", "public static function count($value): int\n {\n if (is_null($value)) {\n return 0;\n }\n if (is_scalar($value) || is_object($value)) {\n return 1;\n }\n\n return is_countable($value) ? count($value) : 1;\n }", "public function count():int\n {\n return count($this->data);\n }", "public function count() {\n\t\treturn $this->getCount();\n\t}", "public function getAnCount(): int;", "public function count()\n {\n $data = $this->_get_data();\n return $data['count'];\n }", "public function count()\n\t{\n\t\treturn $this->getCount();\n\t}", "public function count()\n\t{\n\t\treturn $this->getCount();\n\t}", "public function count()\n\t{\n\t\treturn $this->getCount();\n\t}", "public function getCount() {\r\n return count($this->indices);\r\n }", "public function count()\n {\n return count($this->rows);\n }", "public function count()\n {\n return count($this->rows);\n }", "public function get_count()\n\t{\n\t\treturn $this->_counter;\n\t}", "public function count()\n\t\t{\n\t\t\treturn count($this->heap);\n\t\t}", "public function count()\n {\n return count($this->element);\n }", "public function count(): int\n {\n return count($this->data);\n }", "public function count(): int\n {\n return count($this->data);\n }", "public function count(): int\n {\n return count($this->data);\n }", "public function count(): int\n {\n return count($this->data);\n }", "public function count(): int\n {\n return count($this->data);\n }", "final public static function getCount() {\n\t\treturn self::$counts;\n\t}", "public function count()\r\n {\r\n return count($this->data);\r\n }", "public function count()\n {\n return count($this->expressions);\n }", "public function count(array $criteria): int;", "public function count ()\n {\n return count($this->data);\n }", "public function count(): int\n {\n return \\count($this->A);\n }", "public function count(): int {\n return count($this->data);\n }", "public function count() {\n $stm = $this->db->prepare('SELECT COUNT(*) c\n FROM codepoints\n WHERE cp >= ? AND cp <= ?');\n $stm->execute($this->limits);\n $r = $stm->fetch(\\PDO::FETCH_ASSOC);\n return (int)$r['c'];\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->_entries);\n }", "public function count()\n {\n return count((array) $this->data);\n }", "public function count()\n\t{\n\t\tif ( $this->isInfinite() ) {\n\t\t\tthrow new \\LogicException('Cannot count an infinite recurrence set.');\n\t\t}\n\n\t\tif ( $this->total === null ) {\n\t\t\tforeach ( $this as $occurrence ) {}\n\t\t}\n\n\t\treturn $this->total;\n\t}", "public function count()\n {\n return count($this->data());\n }", "protected function getCounts()\n\t{\n\t\tpreg_match_all('/,?([a-z_]*_count),?/', join(',',array_keys(self::$config)), $m);\n\t\treturn $m[1];\n\t}", "public function count()\n {\n return count($this->data);\n }", "function cnt ($q) {\n\t\treturn intval($this->cnt[$q]);\n\t}", "public function count()\n {\n return count($this->tree);\n }", "public function getCounts()\n {\n return $this->counts;\n }", "public function getCounts()\n {\n return $this->counts;\n }", "public function count()\n {\n return count($this->toArray());\n }", "public function count() {\n\t\treturn count($this->toArray());\n\t}", "public function count() {\n\t\treturn count($this->data);\n\t}", "public function count()\n {\n return count($this->get());\n }", "public function count() \n {\n return count($this->data);\n }", "public function count(): int\n {\n return count($this->_data);\n }", "public function count()\n{\n\treturn count($this->registry);\n}", "public function getRepeatedCount();", "public function count()\n\t\t{\n\t\t\treturn $this -> Index + 1;\n\t\t}", "public function count()\n {\n return count($this->points);\n }", "public function count(): int\n {\n return $this->entryCount;\n }", "public function count() {\n\t\treturn count($this->getIterator());\n\t}", "public function count()\n {\n return $this->currentRowIndex;\n }", "public function count() : int\n {\n $var = count($this->conditionals);\n return $var;\n }", "public function count() {\r\n\t\tif(is_int($this->count)):\r\n\t\t\treturn $this->count;\r\n\t\telse:\r\n\t\t\treturn 0;\r\n\t\tendif;\r\n\t}", "public function count()\n {\n return $this->getIterator()->count();\n }", "public function count()\n\t{\n\t\treturn count($this->data);\n\t}", "public function count()\n\t{\n\t\treturn count($this->data);\n\t}", "public function count()\n\t{\n\t\treturn count($this->data);\n\t}", "public function count()\n\t{\n\t\treturn count($this->data);\n\t}", "public function getCounter()\n \t{\n \t\treturn $this->countValue;\n \t}", "public static function getCounter()\n {\n return self::$count;\n }", "public function count()\n {\n return count($this->stack);\n }" ]
[ "0.7465518", "0.72393364", "0.7034492", "0.6955243", "0.6952484", "0.68913823", "0.68913823", "0.6845005", "0.68056864", "0.6799885", "0.6792768", "0.6725792", "0.6697379", "0.669318", "0.669318", "0.6691576", "0.66070026", "0.6600221", "0.65968424", "0.658258", "0.65340686", "0.65280914", "0.65158874", "0.6515804", "0.64712036", "0.6467066", "0.6456787", "0.6453336", "0.6442084", "0.64410025", "0.6435712", "0.6429483", "0.6427881", "0.64135736", "0.6408188", "0.6408188", "0.6408188", "0.63994575", "0.6392551", "0.6392551", "0.63906634", "0.63892895", "0.6381544", "0.63806844", "0.63806844", "0.63806844", "0.63806844", "0.63806844", "0.63724804", "0.6367497", "0.63648224", "0.63642275", "0.6349773", "0.634844", "0.63480324", "0.6346627", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.63438135", "0.6341849", "0.6341462", "0.6332371", "0.63319296", "0.63316685", "0.6326707", "0.63250834", "0.632179", "0.6313678", "0.6313678", "0.631156", "0.6307749", "0.629822", "0.628222", "0.6274268", "0.6273464", "0.62720716", "0.6268147", "0.62561184", "0.6256118", "0.62464654", "0.62457234", "0.62389094", "0.62359875", "0.62347996", "0.62334275", "0.6232082", "0.6232082", "0.6232082", "0.6232082", "0.6231762", "0.62296814", "0.6223753" ]
0.74278075
1
Clever little function that takes a table structure defined in PHP, and turns into a mySQL table, and creates it in the db.
Умная маленькая функция, которая принимает структуру таблицы, определенную на PHP, и преобразует ее в таблицу mySQL, создавая ее в базе данных.
function create_table(&$table_structure) { global $db; $sql = ''; foreach ( $table_structure as $type => $fields ) { if ( ! is_array($fields) ) continue; foreach ($fields as $key => $field) { switch ($type) { case 'INDEX': $sql .= "INDEX {$field}_idx ($field),\n"; break; case 'FULLTEXT': $sql .= "FULLTEXT ($field),\n"; break; case 'KEY': $sql .= "KEY ($field),\n"; break; case 'PRIMARY KEY': $sql .= "PRIMARY KEY ($field),\n"; break; case 'ENUM': $sql .= "$key ENUM("; $enum_vals = ''; foreach ( $field['values'] as $enum_val ) { $enum_vals .= "'$enum_val',"; } $sql .= substr($enum_vals,0,-1).')'; if ( $field['default'] ) { $sql .= " DEFAULT '{$field['default']}'"; } $sql .= ",\n"; break; default: $sql .= "$field $type,\n"; } } } $name = $table_structure['table_name']; $sql = rtrim($sql,",\n"); /** * Execute the SQL to make this thing happen */ $db->query("DROP TABLE IF EXISTS $name"); $db->query("CREATE TABLE $name ( $sql ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_new_table($table_name, $rows) {\n\t$connection = connect();\n\t$expanded_array = \"\";\n\tforeach ($rows as $key => $value) {\n\t\t$expanded_array = $expanded_array . $key . \" \" . $value . \",\";\n\t}\n\t$query = \"CREATE TABLE IF NOT EXISTS `$table_name` (\" . substr($expanded_array, 0, -1) . \")\";\n\t$run = mysqli_query($connection, $query);\n\treturn $run;\n}", "function create_table()\n\t\t{\n\t\t\t$n_args = func_num_args();\n\t\t\t$args = func_get_args();\n\t\t\t\t//args[0] = tablename\n\t\t\t\t//args[$i > 0] = array('fieldname' => \"\", 'type' => \"\", 'size' => \"\", 'null' => \"\", 'flags' => \"\")\n\t\t\t\t// ... ... ...\n\t\t\t\t//args[] = array('PK' => array(PK_fields))\n\t\t\t\t//args[] = array('FK' => array(FK_fields))\n\t\t\t\t//args[] = array('CHECK' => array(check_fields))\n\t\t\t\t//args[] = array('UNIQUE' => array(unique_fields))\n\n\t\t\tif($args[1][0] == \"fields\")\n\t\t\t\t$fields = array_slice($args[1], 1);\n\t\t\telse\n\t\t\t\t$fields = array_slice($args, 1);\n\n\t\t\t$query = \"CREATE TABLE {$args[0]} (\";\n\t\t\tfor($i = 0; $i < $n_args && array_key_exists(\"fieldname\", $fields[$i]); $i++) {\n\t\t\t\t$query .= $fields[$i]['fieldname'];\n\n\t\t\t\tswitch($fields[$i]['type']) {\n\t\t\t\t\tcase 'integer':\n\t\t\t\t\tcase 'varchar':\n\t\t\t\t\tcase 'char':\n\t\t\t\t\tcase 'date':\n\t\t\t\t\tcase 'time':\n\t\t\t\t\tcase 'blob':\n\t\t\t\t\tcase 'boolean':\n\t\t\t\t\t\t$type = strtoupper($fields[$i]['type']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif($fields[$i]['size'] > 0)\n\t\t\t\t\t$type .= \"(\" . $fields[$i]['size'] . \")\";\n\n\t\t\t\t$query .= \" $type\";\n\t\t\t\tforeach($fields[$i]['flags'] as $flag) {\n\t\t\t\t\t//references TABLE FIELD ON_UPDATE ON_DELETE\n\t\t\t\t\tif(preg_match(\"/^references (.+?) (.+?) (.+?) (.+?)$/\", $flag, $data))\n\t\t\t\t\t\t$query .= \" REFERENCES $data[1]($data[2]) ON UPDATE $data[3] ON DELETE $data[4]\";\n\t\t\t\t\telseif($flag == \"primary\")\n\t\t\t\t\t\t$query .= \" PRIMARY KEY\";\n\t\t\t\t\telseif($flag == \"AI\")\n\t\t\t\t\t\t$query .= \"\";\n\t\t\t\t\telseif(preg_match(\"/^check (.+)$/\", $flag, $data))\n\t\t\t\t\t\t$query .= \" CHECK (\" . $args[$i]['fieldname'] . \" $data[1])\";\n\t\t\t\t\telseif($flag == \"unique\")\n\t\t\t\t\t\t$query .= \" UNIQUE\";\n\t\t\t\t\telseif(preg_match(\"/^default:(.+)$/\", $flag, $data)) {\n\t\t\t\t\t\t$sep = \"\";\n\t\t\t\t\t\tif(!is_numeric($data[1]))\n\t\t\t\t\t\t\t$sep = \"\\\"\";\n\t\t\t\t\t\t$query .= \" DEFAULT {$sep}{$data[1]}{$sep}\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($fields[$i]['null'] == 'not')\n\t\t\t\t\t$query .= \" NOT NULL, \";\n\t\t\t\telse\n\t\t\t\t\t$query .= \", \";\n\t\t\t}\n\n\t\t\tfor( ; $i < $n_args; $i++) {\n\t\t\t\tif(array_key_exists(\"PK\", $fields[$i]))\n\t\t\t\t\t$query .= \"PRIMARY KEY (\" . implode(\", \", $fields[$i][\"PK\"]) . \"), \";\n\t\t\t\telseif(array_key_exists(\"UNIQUE\", $fields[$i]))\n\t\t\t\t\t$query .= \"UNIQUE (\" . implode(\", \", $fields[$i][\"UNIQUE\"]) . \"), \";\n\t\t\t\telseif(array_key_exists(\"FK\", $fields[$i])) {\n\t\t\t\t\tforeach($fields[$i][\"FK\"] as $fk => $val) {\n\t\t\t\t\t\tpreg_match(\"/^(.+?) (.+?) (.+?) (.+?)$/\", $val, $data);\n\t\t\t\t\t\t$query .= \"FOREIGN KEY ($fk) REFERENCES $data[1]($data[2]) ON UPDATE $data[3] ON DELETE $data[4], \";\n\t\t\t\t\t}\n\t\t\t\t} elseif(array_key_exists(\"CHECK\", $fields[$i])) {\n\t\t\t\t\tforeach($fields[$i][\"CHECK\"] as $check) {\n\t\t\t\t\t\t$query .= \"CHECK ($check), \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(substr($query, -2) == \", \")\n\t\t\t\t$query = substr($query, 0, -2);\n\n\t\t\t$query .= \")\";\n\n\t\t\t$this->_dbhandle->exec($query);\n\t\t}", "function create_db_table(){\n $shabbos_tablestructure = array(\n \"zipcode\" => array(\"varchar(5) not null\",\"zipcode\"),\n \"candlelighting_date\" => array(\"DATE\",\"Date of lighting candles\"),\n \"candlelighting\" => array(\"varchar(80) not null\",\"Time of Candlelighting\"),\n \"parsha\" => array(\"varchar(80) not null\",\"Parsha\")\n );\n\n $req = Sql_Query(sprintf('select table_name from information_schema.tables where table_schema = \"'.$GLOBALS['database_name'].'\" AND table_name=\"%s\"', $this->shabbos_tablename));\n if (! Sql_Fetch_Row($req)) {\n Sql_create_Table ($this->shabbos_tablename,$shabbos_tablestructure);\n }\n\n }", "public function create_table() \n\t{\n\t\tif (empty($this->table)) die('No table defined in ' . get_class($this) . '.');\n\t\t$this->dbforge->add_field($this->table_fields);\n\t\tforeach($this->primary_keys as $key) $this->dbforge->add_key($key, TRUE);\n\n\t\t$this->dbforge->add_key($this->table_keys);\n\t\treturn $this->dbforge->create_table($this->table, TRUE);\n\t}", "protected function create_table() {\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n global $wpdb;\n $full_table_name = $wpdb->prefix . $this->table_name;\n $charset = $wpdb->get_charset_collate();\n\n $sql = \"CREATE TABLE $full_table_name ( ID mediumint NOT NULL AUTO_INCREMENT, \";\n // Build each column individually.\n foreach( $this->columns as $col_name => $col_settings ) {\n // If there isn't a default passed, default is 'null'\n $default = isset( $col_settings['default'] ) ? 'DEFAULT \\'' . $col_settings['default'] . '\\'' : null;\n // Check if the column should allow NULL values\n $not_null = isset( $col_settings['allow_null'] ) ? '' : 'NOT NULL';\n // Put together the query string pieces\n $sql .= sprintf( '%s %s %s %s, ', $col_name, $col_settings['type'], $default, $not_null);\n }\n $sql .= \"PRIMARY KEY (ID) ) $charset;\";\n dbDelta( $sql );\n update_option( $this->table_name . '_table_version', $this->version );\n }", "function createNewTable($table) {\r\n try {\r\n $db = new PDO(DBHandlerClass::$DNS, DBHandlerClass::$USER, DBHandlerClass::$PASS);\r\n $queryS = \"CREATE TABLE \" . $table . \" (pID INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\" .\r\n \" postContent LONGBLOB, uID INT(6), pDT TIMESTAMP DEFAULT CURRENT_TIMESTAMP)\";\r\n\r\n $stmt = $db->prepare($queryS);\r\n $stmt->execute();\r\n $db = NULL; /* Closes database connection */\r\n\r\n } catch (PDOException $ex) {\r\n $db = NULL;\r\n }\r\n\r\n }", "protected function create_table($table) \n\t{\n\t $sql = \"CREATE TABLE IF NOT EXISTS `$table` (`id` int(11) NOT NULL \n\t auto_increment, `obj` text character set utf8 collate utf8_bin \n\t NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;\";\n\t $result = mysql_query($sql, $this->db);\n\t}", "function populate_database_table($table_name, $rows_of_data) {\n\t$connection = connect();\n\t$expanded_keys = \"\";\n\t$expanded_values = \"\";\n\tforeach ($rows_of_data as $key => $value) {\n\t\t$expanded_keys = $expanded_keys . $key . \",\";\n\t\t$expanded_values = $expanded_values . \"'\" . $value . \"',\";\n\t}\n\t$query = \"INSERT INTO `$table_name`(\" . substr($expanded_keys, 0, -1) . \") values(\" . substr($expanded_values, 0, -1) . \")\";\n\t$run = mysqli_query($connection, $query);\n\treturn $run;\n}", "function createDatabaseTable($tableJSON,$typeTrans){\n $table = json_decode($tableJSON);\n $cols = array();\n foreach ($table->fields as $field){\n $myCol = \"'\".$field->name.\"' \".$typeTrans[$field->type];\n if ($field->name==$table->identifier_field){\n $myCol .= ' PRIMARY KEY';\n } else if ($field->required){\n $myCol .= \" NOT NULL\";\n }\n foreach ($field->properties as $prop){\n $myCol .= \" \".$prop;\n }\n $cols[] = $myCol;\n }\n $createTableSQL = \"CREATE TABLE \".$table->name.\" (\n \".implode($cols,\",\\n\").\"\n );\";\n return $createTableSQL;\n}", "public function createTable() {\n\t\t// create the table\n\t\t$sql = 'CREATE TABLE '.$this->table.\" (\\n\";\n\n\t\t// add the columns\n\t\t$index = 0;\n\t\tforeach ($this->columns as $column => $data) {\n\t\t\tif ($index++) $sql .= \",\\n\";\n\t\t\t$sql .= \"\\t$column \".$this->getDataType($data);\n\t\t}\n\n\t\t// add the primary key\n\t\tif ($this->primary_key) {\n\t\t\t$sql .= \",\\n\\tPRIMARY KEY (\".$this->primary_key.\")\";\n\t\t}\n\n\t\t// make an InnoDB type database\n\t\t$sql .= \"\\n);\\n\";\n\n\t\treturn $this->database->executeQuery($sql, TRUE);\n\t}", "function createTable($mysqli)\n{\n global $usertable;\n if($result = $mysqli->query(\"select id from $usertable limit 1\"))\n {\n $row = $result->fetch_object();\n\t\t$id = $row->id;\n $result->close();\n }\n if(!$id)\n {\n\t $sql = \"CREATE TABLE table01 \n\t\t (id INT NOT NULL AUTO_INCREMENT,PRIMARY KEY( id ),\";\n\t $sql .= \"type VARCHAR(20),\";\n\t $sql .= \"brand VARCHAR(30),\";\n\t $sql .= \"model VARCHAR(20),\";\n\t $sql .= \"color VARCHAR(30),\";\n\t $sql .= \"strWind VARCHAR(20),\";\n\t $sql .= \"price VARCHAR(30),\";\n\t $sql .= \"descript VARCHAR(100),\";\n\t\t$sql .= \"location_id INT,\";\n\t\t$sql .= \"user_id INT,\";\n\t\t$sql .= \"FOREIGN KEY (location_id) REFERENCES locations (location_id),\";\n $sql .= \"FOREIGN KEY (user_id) REFERENCES users (user_id)\";\n\t $sql .= \")\";\n\n if($stmt = $mysqli->prepare($sql))\n {\n $stmt->execute();\n }\n }\n}", "function createTable($table,$fields)\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `$table` (\";\n $pk = '';\n\n foreach($fields as $field => $type) {\n $sql.= \"`$field` $type,\";\n if (preg_match('/AUTO_INCREMENT/i', $type))\n {\n $pk = $field;\n }\n }\n\n $sql = rtrim($sql,',') . ', PRIMARY KEY (`'.$pk.'`)';\n $sql .= \") CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n return self::conn()->exec($sql);\n }", "abstract function createTable($tablename);", "function buildTable($conn, $name)\n{\n if ($conn->connect_error)\n die(mysql_fatal_error(\"Could not access DB when building table: \" . $conn->error));\n $query = \"CREATE TABLE IF NOT EXISTS {$name} (\n\t\tAdvisor VARCHAR(30) NOT NULL,\n Student VARCHAR(30) NOT NULL,\n StudentID VARCHAR(9) NOT NULL,\n ClassCode VARCHAR(5) NOT NULL\n\t)\";\n if (! $conn->query($query))\n die(mysql_fatal_error(\"Could not build table: \" . $conn->error));\n}", "function setupTable()\r\n\t{\r\n\t\tif(!sql::TableExists(dkpPointsHistoryTableEntry::tablename)) {\r\n\t\t\t$tablename = dkpPointsHistoryTableEntry::tablename;\r\n\t\t\tglobal $sql;\r\n\t\t\t$sql->Query(\"CREATE TABLE `$tablename` (\r\n\t\t\t\t\t\t`id` INT NOT NULL AUTO_INCREMENT ,\r\n\t\t\t\t\t\t`user` INT NOT NULL,\r\n\t\t\t\t\t\t`award` INT NOT NULL,\r\n\t\t\t\t\t\t`guild` INT NOT NULL,\r\n\t\t\t\t\t\tPRIMARY KEY ( `id` ),\r\n KEY `user` (`guild`,`user`,`award`),\r\n KEY `award` (`award`)\r\n\t\t\t\t\t\t) TYPE = innodb;\");\r\n\t\t}\r\n\t}", "public function createTable()\n {\n $sql = \"CREATE TABLE $this->tableName (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name VARCHAR(255) DEFAULT '' NOT NULL,\n type VARCHAR(255) DEFAULT '' NOT NULL,\n max VARCHAR(255) DEFAULT '' NOT NULL,\n columns TEXT DEFAULT '' NOT NULL,\n remote_id VARCHAR(255) DEFAULT '' NOT NULL,\n UNIQUE KEY id (id)\n );\";\n\n dbDelta($sql);\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$charset_collate = '';\n\n\t\tif ( ! empty( $wpdb->charset ) ) {\n\t\t\t$charset_collate .= \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t}\n\t\tif ( ! empty( $wpdb->collate ) ) {\n\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t}\n\n\t\t$sql = \"CREATE TABLE {$this->table_name} (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\taction varchar(255) NOT NULL,\n\t\t\tdata longtext NOT NULL,\n\t\t\tdate datetime NOT NULL,\n\t\t\tPRIMARY KEY (id)\n\t\t) {$charset_collate};\";\n\n\t\tdbDelta( $sql );\n\t}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$charset_collate = '';\n\n\t\tif ( ! empty( $wpdb->charset ) ) {\n\t\t\t$charset_collate .= \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t}\n\t\tif ( ! empty( $wpdb->collate ) ) {\n\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t}\n\n\t\t$sql = \"CREATE TABLE {$this->table_name} (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\tentry_id bigint(20) NOT NULL,\n\t\t\tform_id bigint(20) NOT NULL,\n\t\t\tfield_id int(11) NOT NULL,\n\t\t\tvalue longtext NOT NULL,\n\t\t\tdate datetime NOT NULL,\n\t\t\tPRIMARY KEY (id),\n\t\t\tKEY entry_id (entry_id),\n\t\t\tKEY form_id (form_id),\n\t\t\tKEY field_id (field_id)\n\t\t) {$charset_collate};\";\n\n\t\tdbDelta( $sql );\n\t}", "public function createTable( $table ) {\n\t\t$idfield = $this->getIDfield($table, true);\n\t\t$table = $this->safeTable($table);\n\t\t$sql = \"\n CREATE TABLE $table (\n $idfield INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT ,\n PRIMARY KEY ( $idfield )\n ) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\n\t\t\t\t \";\n\t\t$this->adapter->exec( $sql );\n\t}", "function create_table()\n {\n }", "function create_table()\n {\n }", "function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name\t= $this->make_table_name();\n\n\t\t// check that table already exist\n\t\t$table = $wpdb->get_var(\n\t\t\t$wpdb->prepare( \"SHOW TABLES LIKE '$table_name'\", \"%s\" )\n\t\t);\n\n\t\tif ( $table !== $table_name ) {\n\n\t\t\t// create table\n\t\t\t$sql = \"CREATE TABLE {$table_name} (\n\t\t\t\tid \t\t\t\tint \t\t NOT NULL AUTO_INCREMENT,\n\t\t\t\tuser_id\t \t\tvarchar(255) NOT NULL,\n\t\t\t\tprimary_pages \tvarchar(255),\n\t\t\t\tcustom_pages \tvarchar(255),\n\t\t\t\ttags \t\t\tvarchar(255),\n\t\t\t\tcategories \t\tvarchar(255),\n\t\t\t\tPRIMARY KEY (id)\n\t\t\t);\";\n\n\t\t\t// execute statement\n\t\t\t$stat = $wpdb->query( $sql );\n\t\t}\n\t}", "abstract protected function createTable(Table $table);", "function create_table($table_name,$fields,$skip_size_check=false,$skip_null_check=false)\n\t{\n\t\trequire_code('database_helper');\n\t\t_helper_create_table($this,$table_name,$fields,$skip_size_check,$skip_null_check);\n\t}", "public function createTable() {\n\t\t\treturn Symphony::Database()->query(\n\t\t\t\t\"CREATE TABLE IF NOT EXISTS `tbl_entries_data_\" . $this->get('id') . \"` (\n\t\t\t\t\t`id` int(11) unsigned NOT NULL auto_increment,\n\t\t\t\t\t`entry_id` int(11) unsigned NOT NULL,\n\t\t\t\t\t`relation_id` int(11) unsigned NULL,\n\t\t\t\t\t`xpos` float default NULL,\n\t\t\t\t\t`ypos` float default NULL,\n\t\t\t\t\tPRIMARY KEY\t (`id`),\n\t\t\t\t\tKEY `entry_id` (`entry_id`),\n\t\t\t\t\tKEY `relation_id` (`relation_id`)\n\t\t\t\t);\"\n\t\t\t);\n\t\t}", "public function create_table ()\n {\n $this->_query .= 'CREATE TABLE `' . $this->_db_name . '_' . $this->_tablename . '` (\n `id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY';\n }", "function createTable(string $tableName, array $columns, array $foreignKeys = null) {\n\t\t$query = \"CREATE TABLE IF NOT EXISTS {$tableName}(\n\t\t\t\t id INT NOT NULL AUTO_INCREMENT, \";\n\n\t\t// Create column parts of query string\n\t\tforeach ($columns as $column) {\n\t\t\t$query .= \"{$column}, \";\n\t\t}\n\n\t\t// Create key(s) parts of query string\n\t\t$query .= 'PRIMARY KEY (id), ';\n\n\t\tforeach ($foreignKeys as $fk) {\n\t\t\t$query .= \"{$fk}, \";\n\t\t}\n\n\t\t$query = rtrim($query, ', ');\n\t\t$query .= ');';\n\n\t\ttry {\n\t\t\t$this->connection->exec($query);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\techo '[DB Exception]: ' . $e->getMessage();\n\t\t}\n\t}", "function DBCreate($table,$data){\n\t\t$data = DBEscape($data);\n\t\t$fields = implode(\",\", array_keys($data));\n\t\t$values = \"'\".implode(\"', '\", $data).\"'\";\n\t\t$query = \"INSERT INTO {$table} ({$fields}) VALUES ($values)\";\n\t\treturn DBExecute($query);\n\t}", "function newNewsTable(){\n global $wpdb;\n $table_name = $wpdb->prefix . \"Simplenews\";\n $sql = \" CREATE TABLE $table_name(\n NewsID int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n NewsText VARCHAR(1000) NOT NULL,\n NewsImageUrl VARCHAR(1000) NOT NULL\n ) ;\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);}", "function creatTable($sql){\r\t\treturn(mysql_query($sql));\r\t}", "public function create_table() {\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t$meta_table = \"\n\t\tCREATE TABLE IF NOT EXISTS `{$this->wpdb->prefix}{$this->meta_type}meta` (\n\t\t\t`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t`{$this->meta_type}_id` bigint(20) unsigned NOT NULL DEFAULT '0',\n\t\t\t`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n\t\t\t`meta_value` longtext COLLATE utf8mb4_unicode_ci,\n\t\t\tPRIMARY KEY (`meta_id`),\n\t\t\tKEY `{$this->meta_type}_id` (`{$this->meta_type}_id`),\n\t\t\tKEY `meta_key` (`meta_key`(191))\n\t\t) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n\t\t\";\n\n\t\tdbDelta( $meta_table );\n\t}", "public function wsh_create_db_table() {\n\n\t\t\tglobal $wpdb;\n\t\t\t$charset_collate = $wpdb->get_charset_collate();\n\t\t\t$table_name = $wpdb->prefix . self::$table_name;\n\n\t\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\tproduct_id mediumint(9) NOT NULL,\n\t\t\t\tdata text NOT NULL,\n\t\t\t\tUNIQUE KEY id (id)\n\t\t\t) $charset_collate;\";\n\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\tdbDelta( $sql );\n\t\t}", "function create_table($tbl_name)\n\t{\n\t\t$this->load->dbforge();\n\t\t$this->dbforge->drop_table($tbl_name,TRUE);\n\t\t/* DEFAULT FIELDS */\n\t\t$fields = $this->{'table_'.$tbl_name}();\n\t\t// debug($fields);\n\t\t/* CREATE TABLE */\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_field($fields);\n\t\tif (! $result = $this->dbforge->create_table($tbl_name, TRUE)){\n\t\t\tdebug('FAILED !');\n\t\t}\n\t\tdebug('SUCCESS !');\n\t}", "protected function createTable()\n {\n $schema = $this->db->createSchema();\n $schema->create($this->table)\n ->int('id')->increment()\n ->varchar('key', 255)\n ->int('start')\n ->int('ttl')\n ->text('value')\n ->primary('id');\n\n $this->db->query($schema);\n }", "protected function createTable()\n {\n $stmt = 'CREATE TABLE IF NOT EXISTS \"' . $this->name;\n $stmt.= '\" (\"' . $this->keyColumnName . '\" TEXT PRIMARY KEY, \"';\n $stmt.= $this->valueColumnName . '\" TEXT);';\n $this->db->exec($stmt);\n }", "function cratetable($tablename){\r\n //conect to DB\r\n $this->dbconnect();\r\n $qry = \"CREATE TABLE IF NOT EXISTS \".$tablename.\" (\r\n userid int(11) NOT NULL auto_increment,\r\n useremail varchar(50) NOT NULL default '',\r\n password varchar(50) NOT NULL default '',\r\n userlevel int(11) NOT NULL default '0',\r\n PRIMARY KEY (userid)\r\n )\";\r\n $result = mysql_query($qry) or die(mysql_error());\r\n return;\r\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\t\t\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\ttype varchar(255) NOT NULL,\n\t\t\tname text NOT NULL,\n\t\t\tcolor text NOT NULL,\n\t\t\tcolor_text text,\n\t\t\tis_default tinyint(1) NOT NULL,\n\t\t\tis_visible tinyint(1) NOT NULL,\n\t\t\tis_bookable tinyint(1) NOT NULL,\n\t\t\tauto_pending varchar(20),\n\t\t\tcalendar_id bigint(10) NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "function createTable($theTable, $sql){\n\tglobal $wpdb;\n\t\n\t//using the get_var routine which is best to get a single value\n\tif($wpdb->get_var(\"show tables like '\". $theTable . \"'\") != $theTable) { \n\t\n\t\t//the query function lets us execute most MySQL querys\n\t\t$wpdb->query($sql); \n\t}\n}", "function cratetable($tablename){\n\t\t//conect to DB\n\t\t$this->dbconnect();\n\t\t$qry = \"CREATE TABLE IF NOT EXISTS \".$tablename.\" (\n\t\t\t id int(11) NOT NULL auto_increment,\n\t\t\t useremail varchar(50) NOT NULL default '',\n\t\t\t password varchar(50) NOT NULL default '',\n\t\t\t userlevel int(11) NOT NULL default '0',\n\t\t\t PRIMARY KEY (userid)\n\t\t\t)\";\n\t\t$result = mysql_query($qry) or die(mysql_error());\n\t\treturn;\n\t}", "function show_create_table($table);", "function createTable($name = '') {\n\t\tif (!$name) {\n\t\t\t$name = \"table\" . strval($this->id);\n\t\t\t$this->id++;\n\t\t}\n\t\tself::$db->exec(\"CREATE TABLE $name (id INT PRIMARY KEY AUTO_INCREMENT,\" .\n\t\t\t\t\" letters VARCHAR(20), number INT, big TEXT, appt DATE, gender ENUM('male', 'female'))\");\n\t}", "function db_create_table($table_name,$fields,$db,$if_not_exists=false)\n\t{\n\t\tif (!is_null($GLOBALS['XML_CHAIN_DB']))\n\t\t{\n\t\t\t// DB chaining: It's a write query, so needs doing on chained DB too\n\t\t\t$GLOBALS['XML_CHAIN_DB']->static_ob->db_create_table($table_name,$fields,$GLOBALS['XML_CHAIN_DB']->connection_write,$if_not_exists);\n\t\t}\n\n\t\t$path=$db[0].'/'.$table_name;\n\n\t\tif (($if_not_exists) && (!file_exists($path))) return;\n\n\t\t$found_key=false;\n\t\tforeach ($fields as $type)\n\t\t{\n\t\t\tif (strpos($type,'*')!==false) $found_key=true;\n\t\t}\n\t\tif (!$found_key)\n\t\t\tfatal_exit('No key specified for table '.$table_name);\n\n\t\t@mkdir($path,0777);\n\t\trequire_code('files');\n\t\tfix_permissions($path,0777);\n\t\tsync_file($path);\n\t}", "protected function create_table( $table_name )\n\t{\n\t\t$sql = \"\n\t\t\tCREATE TABLE \" . $table_name . \" (\n\t\t\t\t`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t`page` VARCHAR(255) NOT NULL,\n\t\t\t\t`utime` FLOAT NOT NULL,\n\t\t\t\t`stime` FLOAT NOT NULL,\n\t\t\t\t`wtime` FLOAT NOT NULL,\n\t\t\t\t`mysqlTime` FLOAT NOT NULL,\n\t\t\t\t`ttime` FLOAT NOT NULL,\n\t\t\t\t`mysqlCountQueries` INT UNSIGNED NOT NULL,\n\t\t\t\t`mysqlQueries` TEXT NOT NULL,\n\t\t\t\t`logged` TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,\n\t\t\t\t`userAgent` VARCHAR(255) NOT NULL,\n\t\t\t\t`ip` VARCHAR(15) NOT NULL,\n\t\t\t\t`referer` VARCHAR(255) NOT NULL,\n\t\t\t\t`identifier` VARCHAR(3) NOT NULL DEFAULT 'DEF',\n\t\t\t\tPRIMARY KEY(`id`)\n\t\t\t) ENGINE=ARCHIVE;\n\t\t\";\n\n\t\treturn $sql;\n\t}", "function create_data_table($tablename,$userlink)\n {\n $sqlquery = \"CREATE TABLE IF NOT EXISTS `\". $tablename. \"` (\n `sid` INTEGER(11) NOT NULL,\n `data` TEXT,\n\t PRIMARY KEY (`sid`)\n ) ENGINE=InnoDB;\";\n mysql_query($sqlquery,$userlink);\n echo(mysql_error());\n }", "function fetch_table_dump_sql($table)\r\n\t{\r\n\t\tglobal $vbulletin;\r\n\r\n\t\t$tabledump = \"DROP TABLE IF EXISTS $table;\\n\";\r\n\t\t$tabledump .= \"CREATE TABLE $table (\\n\";\r\n\r\n\t\t$firstfield = 1;\r\n\r\n\t\t// get columns and spec\r\n\t\t$fields = $vbulletin->db->query_write(\"SHOW FIELDS FROM $table\");\r\n\t\twhile ($field = $vbulletin->db->fetch_array($fields, DBARRAY_BOTH))\r\n\t\t{\r\n\t\t\tif (!$firstfield)\r\n\t\t\t{\r\n\t\t\t\t$tabledump .= \",\\n\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$firstfield = 0;\r\n\t\t\t}\r\n\t\t\t$tabledump .= \" $field[Field] $field[Type]\";\r\n\t\t\tif (!empty($field[\"Default\"]))\r\n\t\t\t{\r\n\t\t\t\t// get default value\r\n\t\t\t\t$tabledump .= \" DEFAULT '$field[Default]'\";\r\n\t\t\t}\r\n\t\t\tif ($field['Null'] != \"YES\")\r\n\t\t\t{\r\n\t\t\t\t// can field be null\r\n\t\t\t\t$tabledump .= \" NOT NULL\";\r\n\t\t\t}\r\n\t\t\tif ($field['Extra'] != \"\")\r\n\t\t\t{\r\n\t\t\t\t// any extra info?\r\n\t\t\t\t$tabledump .= \" $field[Extra]\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// get keys list\r\n\t\t$keys = $vbulletin->db->query_write(\"SHOW KEYS FROM $table\");\r\n\t\twhile ($key = $vbulletin->db->fetch_array($keys, DBARRAY_BOTH))\r\n\t\t{\r\n\t\t\t$kname = $key['Key_name'];\r\n\t\t\tif ($kname != \"PRIMARY\" and $key['Non_unique'] == 0)\r\n\t\t\t{\r\n\t\t\t\t$kname = \"UNIQUE|$kname\";\r\n\t\t\t}\r\n\t\t\tif(!is_array($index[\"$kname\"]))\r\n\t\t\t{\r\n\t\t\t\t$index[\"$kname\"] = array();\r\n\t\t\t}\r\n\t\t\t$index[\"$kname\"][] = $key['Column_name'];\r\n\t\t}\r\n\r\n\t\t// get each key info\r\n\t\tif (is_array($index))\r\n\t\t{\r\n\t\t\tforeach ($index as $kname => $columns)\r\n\t\t\t{\r\n\t\t\t\t$tabledump .= \",\\n\";\r\n\t\t\t\t$colnames = implode($columns,\",\");\r\n\r\n\t\t\t\tif($kname == \"PRIMARY\"){\r\n\t\t\t\t\t// do primary key\r\n\t\t\t\t\t$tabledump .= \" PRIMARY KEY ($colnames)\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// do standard key\r\n\t\t\t\t\tif (substr($kname,0,6) == 'UNIQUE')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// key is unique\r\n\t\t\t\t\t\t$kname = substr($kname,7);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$tabledump .= \" KEY $kname ($colnames)\";\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$tabledump .= \"\\n);\\n\\n\";\r\n\r\n\t\t// get data\r\n\t\t$rows = $vbulletin->db->query_write(\"SELECT * FROM $table\");\r\n\t\t$numfields = $vbulletin->db->num_fields($rows);\r\n\t\twhile ($row = $vbulletin->db->fetch_array($rows, DBARRAY_BOTH))\r\n\t\t{\r\n\t\t\t$tabledump .= \"INSERT INTO $table VALUES(\";\r\n\r\n\t\t\t$fieldcounter=-1;\r\n\t\t\t$firstfield = 1;\r\n\t\t\t// get each field's data\r\n\t\t\twhile (++$fieldcounter < $numfields)\r\n\t\t\t{\r\n\t\t\t\tif (!$firstfield)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tabledump .= \",\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$firstfield = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!isset($row[$fieldcounter]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$tabledump .= \"NULL\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$tabledump .= \"'\" . $vbulletin->db->escape_string($row[\"$fieldcounter\"]) . \"'\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$tabledump .= \");\\n\";\r\n\t\t}\r\n\t\treturn $tabledump;\r\n\t}", "function create_table($table,$define) {\n\t\t$query = \"CREATE TABLE {$table}({$define})\";\n\t\tif (!$this->table_exists($table))\n\t\t\t$this->db->exec($query);\n\t}", "function makeQuery($fields, $table) {\n $sql = \"CREATE TABLE $table (\";\n foreach($fields as $index=>$field) {\n $name = $field['field_name'];\n $type = $field['type'];\n $len = $field['length'];\n $length = $len ? \"($len)\" : \"\" ;\n $null = $field['null']? \"not null\" : \"\";\n $pk = $field['pk']? \" primary key\" : \"\";\n if ($index == count($fields)-1) {\n $sql .= \"$name $type $length $pk $null);\";\n } else {\n $sql .= \"$name $type $length $pk $null,\";\n }\n }\n\n return $sql;\n }", "function createTable($db, $table_name, $id_column, $columns) {\n\t$sql = \"CREATE TABLE IF NOT EXISTS $table_name (\" .\n\t\t\"$id_column INT NOT NULL AUTO_INCREMENT, \" .\n\t\t\"PRIMARY KEY($id_column), $columns)\";\n\t$result = $db->query($sql);\n\tif (!$result) die(\"Error creating table: $db->error\");\n}", "protected function createMysql() {\n $queries = array();\n $result = 'CREATE TABLE `' . $this->name . '` (';\n $columns = array();\n foreach ($this->columns as $column) {\n $columns[] = $column->create(Type::MYSQL);\n }\n $result .= implode(',', array_filter($columns));\n $result .= ')';\n foreach ($this->options as $option) {\n $result .= ' ' . $option->create(Type::MYSQL);\n }\n $queries[] = $result;\n foreach($this->indexes as $indexe){\n $queries[] = $indexe->add(Type::MYSQL);\n }\n foreach ($this->columns as $column) {\n if($column->hasAutoIncrement()){\n $queries[] = $column->alter(Type::MYSQL);\n }\n }\n return $queries;\n }", "public function createTable() {\r\n $mFieldDefs = array();\r\n\r\n// Add system generated primary key to file\r\n $mFieldDefs[] = sprintf(\"%s int(11) NOT NULL AUTO_INCREMENT\",\r\n $this->autoPkName);\r\n\r\n// Add fields to table\r\n foreach ($this->fields as $mField) {\r\n $mFieldDefs[] = sprintf(\"%s varchar(255)\",\r\n $mField);\r\n }\r\n $mFieldDefs[] = sprintf(\"PRIMARY KEY (%s)\",\r\n $this->autoPkName);\r\n $mSql = sprintf(\"CREATE TABLE %s (%s) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\",\r\n $this->tmpName,\r\n implode(\",\",\r\n $mFieldDefs));\r\n\r\n return $this->dbExec($mSql);\r\n }", "public static function rdv_create_table_function();", "function create_output_table($sqll, $tn){\r\n\t$q = \"CREATE TABLE IF NOT EXISTS `$tn`(`id` INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `\".$GLOBALS['output_col0'].\"` VARCHAR(50) UNIQUE KEY, `\".$GLOBALS['output_col1'].\"` VARCHAR(50)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1;\";\r\n\t$r = mysqli_query($sqll, $q) or die(mysqli_error($sqll));//\"num=2&v0=err&v1=bad read_one query\");\r\n\t//(tbc)table creation checking must be coded for better error tracking\r\n}", "public static function export_table_structure($table, $break = \"\\n\")\n\t{\n\n\t\t$db = JFactory::getDBO();\n\t\t$config = JFactory::getConfig();\n\t\t$dbprefix = version_compare(JVERSION,'3.0','lt') ? $config->getValue('config.dbprefix') : $config->get('dbprefix');\n\n\t\t$break = ($break == \"\\n\" OR $break == \"\\r\\n\" OR $break == \"\\r\") ? $break : \"\\n\";\n\n\t\t$sqlstring = \"\";\n\n\t\t$query = 'SHOW CREATE TABLE '. $table;\n\t\t$db->setQuery('SHOW CREATE TABLE '. $table);\n\t\t$data = $db->loadAssoc();\n\n\t\t$sqlstring .= str_replace(\"\\n\", $break, $data['Create Table']) . \";$break$break\";\n\t\t$sqlstring = preg_replace(\"! AUTO_INCREMENT=(.*);!\", ';', $sqlstring);\n\t\t$sqlstring = str_replace($dbprefix, '#__', $sqlstring);\n\t\t$sqlstring = str_replace(\"CREATE TABLE\", 'CREATE TABLE IF NOT EXISTS', $sqlstring);\n\t\t$sqlstring = str_replace(\" DEFAULT CHARSET=utf8\", '', $sqlstring);\n\n\t\treturn $sqlstring;\n\t}", "function g16_create_table($tblName, $tblObjects, $engine = NULL, $conn = NULL)\n{\n // =====================\n // = BEGIN TALLY PATCH =\n // =====================\n if(OPT_USE_DATABASE)\n {\n $objRet = new ERROR_ENGINE_DBOPS(ERROR_ENGINE_DBOPS::ERROR_NOT_ENABLED);\n return $objRet;\n }\n // =====================\n // = END TALLY PATCH =\n // =====================\n // Destruction flag\n $closeConn = true;\n // Verify engine availability, replace with INNODB if not available\n if(($engine == NULL || !g16_isAvailable_dbEngine($engine))\n && g16_isAvailable_dbEngine(\"innodb\"))\n $engine = \"INNODB\";\n // Create the connection if not specified\n if($conn == NULL)\n g16_create_dbConn($conn);\n // Disable connection destroying flag\n else\n $closeConn = false;\n // SQL query\n $query = \"CREATE TABLE \".$conn->escape_string(OPT_DB_TBLPREFIX.$tblName)\n .\" (\\n\";\n for($i = 0; $i < count($tblObjects); $i++)\n {\n $tblObj = $tblObjects[$i];\n // Verify that column and type exists and not empty\n if(isset($tblObj[\"column\"]) && strlen($tblObj[\"column\"]) > 0\n && isset($tblObj[\"type\"]) && strlen($tblObj[\"type\"]) > 0)\n {\n $query .= \"\\t\".$conn->escape_string($tblObj[\"column\"]).\" \"\n .strtoupper($tblObj[\"type\"]);\n // Specify the maximum length of the column if the length key exists and\n // the value is greater than zero.\n if(isset($tblObj[\"length\"]) && $tblObj[\"length\"] > 0)\n $query .= \"(\".$conn->escape_string($tblObj[\"length\"]).\")\";\n // Set primary key if the key exists and the value is true\n if(isset($tblObj[\"primary\"]) && $tblObj[\"primary\"])\n $query .= \" PRIMARY KEY\";\n $query .= \",\\n\";\n }\n }\n // Strip the last \",\" and add a new line\n $query = substr($query, 0, strlen($query) - 2).\"\\n\";\n $query .= \") ENGINE = \".$engine;\n // Execute the query\n $r = $conn->query($query);\n // Return stack\n $ret = array(\n \"status\" => $r,\n \"errno\" => $conn->errno,\n \"error\" => $conn->error,\n \"error_list\" => $conn->error_list,\n );\n // Destroy flagged connection.\n if($closeConn)\n $conn->close();\n return $ret;\n}", "static function create_the_table(){\n\t\t$table = self::get_table_name();\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS $table(\n\t\t\t`id` bigint unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t`term_id` bigint unsigned NOT NULL,\n\t\t\t`position` tinyint NOT NULL,\n\t\t\t`name` varchar(100) NOT NULL,\n\t\t\t`content` longtext DEFAULT NULL,\n\t\t\tPRIMARY KEY(id),\n\t\t\tUNIQUE(term_id)\t \n\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tdbDelta($sql);\n\t }", "function createtable($tablename){\n $qry = \"CREATE TABLE IF NOT EXISTS \".$tablename.\" (\n logid INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n ip VARCHAR( 16 ) NOT NULL ,\n host VARCHAR( 100 ) NOT NULL ,\n visitdate DATETIME NOT NULL ,\n visitedpage VARCHAR(255) NOT NULL ,\n referring VARCHAR( 255 ) NOT NULL\n )\";\n $result = mysql_query($qry) or die(mysql_error());\n return;\n }", "function create_blank_tbl($tbl)\n{\n global $db_name, $db_prefix;\n $row = array();\n $res = sql_query(\"SHOW COLUMNS FROM $tbl\");\n while ($foo = sql_fetch_array($res)) {\n $row[$foo['Field']] = '';\n }\n return $row;\n}", "function getCreateTableSQL( )\r\n {\r\n $table \t= $this->getGenericTableName( );\r\n $fields \t= $this->getDBFields( );\r\n $primaryKey = \"\";\r\n $sql \t\t= \"\";\r\n FabrikString::safeColName( $table );\r\n if (is_array( $fields )) {\r\n $sql .= \"CREATE table \" . $table .\" (\\n\";\r\n foreach ( $fields as $field ) {\r\n FabrikString::safeColName( $field->Field );\r\n if ($field->Key == 'PRI'){\r\n $primaryKey = \"PRIMARY KEY ($field->Field)\";\r\n }\r\n\r\n $sql .=\t\"$field->Field \";\r\n\r\n if ($field->Key == 'PRI'){\r\n $sql .= ' INT(6) ';\r\n } else {\r\n $sql .= ' ' . $field->Type . ' ';\r\n }\r\n if ($field->Null == '' ) {\r\n $sql .= \" NOT NULL \";\r\n }\r\n if ($field->Default != '' && $field->Key != 'PRI' ) {\r\n if($field->Default == 'CURRENT_TIMESTAMP'){\r\n $sql .= \"DEFAULT $field->Default\";\r\n } else {\r\n $sql .= \"DEFAULT '$field->Default'\";\r\n }\r\n }\r\n if ($field->Key == 'PRI') {\r\n $sql .= \" AUTO_INCREMENT \";\r\n }\r\n\r\n $sql .= $field->Extra . \",\\n\";\r\n }\r\n if ($primaryKey == '') {\r\n $sql = rtrim($sql,\",\\n\" );\r\n }\r\n $sql .= $primaryKey . \");\";\r\n }\r\n return $sql;\r\n }", "public function createTable(){\n\t\t\treturn Symphony::Database()->query(\t\t\t\n\t\t\t\t\"CREATE TABLE IF NOT EXISTS `tbl_entries_data_\" . $this->get('id') . \"` (\n\t\t\t\t `id` int(11) unsigned NOT NULL auto_increment,\n\t\t\t\t `entry_id` int(11) unsigned NOT NULL,\n\t\t\t\t `value` double default NULL,\n\t\t\t\t PRIMARY KEY (`id`),\n\t\t\t\t KEY `entry_id` (`entry_id`),\n\t\t\t\t KEY `value` (`value`)\n\t\t\t\t) TYPE=MyISAM;\"\t\t\t\n\t\t\t);\n\t\t}", "function create($array) {\n\t\t$out = false;\n\t\t\n\t\tif (!in_array($this->name, $this->db->getTables())) {\n\t\t\t// ****** Prepare\n\t\t\t$fields = array();\n\t\t\tforeach ($array as $name => $value) {\n\t\t\t\tif ($value == 'key' || $value == 'KEY') {\n\t\t\t\t\t$fields[] = '`' . $name . '` INT UNSIGNED NOT NULL AUTO_INCREMENT';\n\t\t\t\t\t$primarykey = $name;\n\t\t\t\t} else {\n\t\t\t\t\t$fields[] = '`' . $name . '` ' . $value . ' NOT NULL';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// ****** Create\n\t\t\t$query = '\n\t\t\t\tCREATE \n\t\t\t\tTABLE `' . $this->name . '` (\n\t\t\t\t\t' . join(', ', $fields) . ',\n\t\t\t\tPRIMARY KEY (`' . $primarykey . '`)\n\t\t\t\t);';\n\t\t\n\t\t\t$out = $this->db->query($query);\n\t\t}\n\t\t\n\t\treturn $out;\n\t}", "public function newTbl($name, $data) {\r\n $suffix = \"\";\r\n $query = \"CREATE TABLE `\".$this->selected_db.\"`.`\".$name.\"` (\";\r\n\r\n // $data is an Array containing col name, type, length, and other properties\r\n foreach($data as &$col) {\r\n if(isset($col[\"name\"]) && isset($col[\"type\"]) && isset($col[\"length\"]) && $col[\"name\"] != \"\" && $col[\"type\"] != \"\" && $col[\"length\"] != \"\") {\r\n \r\n // validate type data\r\n if(in_array(strtoupper($col[\"type\"]), $this->types)) {\r\n\r\n // validate length is numeric\r\n if(is_numeric($col[\"length\"])) {\r\n\r\n $query .= \"`\".$col[\"name\"].\"` \".strtoupper($col[\"type\"]).\"(\".$col[\"length\"].\") \".$col[\"params\"].\", \";\r\n if(isset($col[\"suffix\"])) {\r\n $suffix .= $col[\"suffix\"].\", \";\r\n } \r\n\r\n } else {\r\n return Array(\"error\" => $lang[\"new_table\"][\"errors\"][\"mustbenumeric\"], \"query\" => \"Data: \".$col[\"name\"].\" - \".$col[\"type\"].\"(\".$col[\"length\"].\"), \".$col[\"params\"]);\r\n }\r\n\r\n } else {\r\n return Array(\"error\" => $lang[\"new_table\"][\"errors\"][\"invalidtype\"], \"query\" => \"Data: \".$col[\"name\"].\" - \".$col[\"type\"].\"(\".$col[\"length\"].\"), \".$col[\"params\"]);\r\n }\r\n } else {\r\n return Array(\"error\" => $lang[\"new_table\"][\"errors\"][\"missing\"], \"query\" => \"Data: \".$col[\"name\"].\" - \".$col[\"type\"].\"(\".$col[\"length\"].\"), \".$col[\"params\"]);\r\n }\r\n }\r\n\r\n // Finalize string\r\n $query = substr($query, 0, -2);\r\n if($suffix != \"\") {\r\n $suffix = \", \".$suffix;\r\n }\r\n $suffix = substr($suffix, 0, -2);\r\n $query .= \"\".$suffix.\") Engine = InnoDB;\";\r\n\r\n // query\r\n if($this->dbc->query($query)) {\r\n return Array(\"error\" => \"success\");\r\n } else {\r\n return Array(\"error\" => $this->dbc->error, \"query\" => $query);\r\n }\r\n\r\n }", "function createTable($tableName, $columns)\n {\n $statement = \"CREATE TABLE $tableName (\";\n for ($i = 0; $i < count($columns); $i++)\n {\n $statement .= $columns[$i];\n if ($i < count($columns) - 1)\n {\n $statement .= \",\";\n }\n }\n $statement .= \");\";\n $preparedStatement = $this->conn->prepare($statement);\n $preparedStatement->execute();\n }", "function create_structure() {\n\trun_query('\n\t\tCREATE TABLE IF NOT EXISTS scores (\n\t\t\tid \t\t\t\tINT(11) NOT NULL AUTO_INCREMENT,\n\t\t\tscore\t\t\tINT(11) DEFAULT 0,\n\t\t\tattempts\t\tINT(11) DEFAULT 0,\n\t\t\tfirst_name\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\tlast_name\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\temail\t\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\taddress_1\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\taddress_2\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\taddress_3\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\tpostcode\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\torganisation\tVARCHAR(255) DEFAULT NULL,\n\t\t\tcreated\t\t\tDATETIME DEFAULT NULL,\n\t\t\tupdated\t\t\tDATETIME DEFAULT NULL,\n\t\t\tip_address\t\tVARCHAR(255) DEFAULT NULL,\n\t\t\tprofanity\t\tBOOLEAN DEFAULT NULL,\n\t\t\tPRIMARY KEY (id)\n\t\t);\n\t');\n\n\t// create_dummy_content();\n}", "function create_table($conn, $table) {\n\t\t$result = null;\n\t\tif (strcmp($table, TABLE1) == 0) {\n\t\t\t$query = \"CREATE TABLE $table(un VARCHAR(128) NOT NULL, \n\t\t\t\t\t\t\t\t\t\tpw VARCHAR(128) NOT NULL, \n\t\t\t\t\t\t\t\t\t\tpresalt VARCHAR(128) NOT NULL,\n\t\t\t\t\t\t\t\t\t\tpostsalt VARCHAR(128) NOT NULL,\n\t\t\t\t\t\t\t\t\t\tis_admin BOOLEAN NOT NULL,\n\t\t\t\t\t\t\t\t\t\tPRIMARY KEY(un))\";\n\t\t\t$result = $conn->query($query);\n\t\t} else if (strcmp($table, TABLE2) == 0) {\n\t\t\t// Signature = sequence of 20 bytes after header of file.\n\t\t\t$query = \"CREATE TABLE $table(malware_name VARCHAR(128) NOT NULL, \n\t\t\t\t\t\t\t\t\t\tbyte_signature CHAR(20) NOT NULL,\n\t\t\t\t\t\t\t\t\t\tun VARCHAR(128) NOT NULL, \n\t\t\t\t\t\t\t\t\t\tid SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t\t\tPRIMARY KEY(id))\";\n\t\t\t$result = $conn->query($query);\n\t\t}\n\t\tif (!$result) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function db_createProductTable()\n{\n db_run(\"DROP TABLE IF EXISTS \" . TBL_PRODUCTS);\n\n db_run(\"CREATE TABLE \" . TBL_PRODUCTS .\n \"(prodid varchar(32) primary key,\n creation_date datetime,\n ownerid int unsigned,\n title text,\n paypal text,\n provision int,\n index owner_index(ownerid))\");\n}", "public function create($table) {\r\n\t\t$st = $this->db->exec ( $table->getSqlCreate () );\r\n\t}", "function create_table()\r\r\n {\r\r\n \t$sql = \"CREATE TABLE {$this->table_category} (\r\r\n \t\t{$this->col_c_prefix} CHAR(1) NOT NULL,\r\r\n \t\t{$this->col_c_code} INT(2) NOT NULL,\r\r\n \t\t{$this->col_c_name} VARCHAR(255) NOT NULL,\r\r\n {$this->col_description} TEXT ,\r\r\n \t\t{$this->col_c_link_to} VARCHAR(255) ,\r\r\n {$this->col_featured} INT(1) ,\r\r\n \t\tPRIMARY KEY ({$this->col_c_prefix}, {$this->col_c_code})\r\r\n )\";\r\r\n\r\r\n \t$query = $this->db->query($sql);\r\r\n\r\r\n \treturn $query;\r\r\n }", "function qw_query_wrangler_table(){\r\n global $wpdb;\r\n $table_name = $wpdb->prefix.\"query_wrangler\";\r\n $sql = \"CREATE TABLE \" . $table_name . \" (\r\n\t id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n name varchar(255) NOT NULL,\r\n slug varchar(255) NOT NULL,\r\n type varchar(16) NOT NULL,\r\n path varchar(255),\r\n\t data text NOT NULL,\r\n\t UNIQUE KEY id (id)\r\n\t);\";\r\n\r\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\r\n dbDelta($sql);\r\n}", "public static function export_table_structure($table, $break = \"\\n\")\n\t{\n\n\t\t$db = JFactory::getDBO();\n\t\t$config =JFactory::getConfig();\n\t\t$dbprefix= $config->getValue('config.dbprefix');\n\n\t\t$break = ($break == \"\\n\" OR $break == \"\\r\\n\" OR $break == \"\\r\") ? $break : \"\\n\";\n\n\t\t$sqlstring = \"\";\n\n\t\t$query = 'SHOW CREATE TABLE '. $table;\n\t\t$db->setQuery('SHOW CREATE TABLE '. $table);\n\t\t$data = $db->loadAssoc();\n\n\t\t$sqlstring .= str_replace(\"\\n\", $break, $data['Create Table']) . \";$break$break\";\n\t\t$sqlstring = preg_replace(\"! AUTO_INCREMENT=(.*);!\", ';', $sqlstring);\n\t\t$sqlstring = str_replace($dbprefix, '#__', $sqlstring);\n\t\t$sqlstring = str_replace(\"CREATE TABLE\", 'CREATE TABLE IF NOT EXISTS', $sqlstring);\n\t\t$sqlstring = str_replace(\" DEFAULT CHARSET=utf8\", '', $sqlstring);\n\n\t\treturn $sqlstring;\n\t}", "static function build_create_table($name,$columns,$driver)\n\t{\n\t\t$tick = DingoSQL::backtick($driver);\n\t\t$sql = \"CREATE TABLE $tick$name$tick\\n(\";\n\t\t$primary = FALSE;\n\t\t$x = 0;\n\t\t\n\t\tforeach($columns as $name=>$col)\n\t\t{\n\t\t\tif($x != 0)\n\t\t\t{\n\t\t\t\t$sql .= ',';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$x++;\n\t\t\t}\n\t\t\t\n\t\t\t// If specific length is set\n\t\t\tif(isset($col['length']))\n\t\t\t{\n\t\t\t\t$sql .= \"\\n$tick$name$tick {$col['type']}({$col['length']})\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql .= \"\\n$tick$name$tick {$col['type']}\";\n\t\t\t}\n\t\t\t\n\t\t\t// NOT NULL\n\t\t\tif(isset($col['not_null']))\n\t\t\t{\n\t\t\t\t$sql .= ' NOT NULL';\n\t\t\t}\n\t\t\t\n\t\t\t// AUTO_INCREMENT\n\t\t\tif(isset($col['auto_increment']))\n\t\t\t{\n\t\t\t\t$sql .= ' AUTO_INCREMENT';\n\t\t\t\t$primary = $name;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// PRIMARY KEY\n\t\tif($primary)\n\t\t{\n\t\t\t$sql .= \",\\nPRIMARY KEY ($tick$primary$tick)\";\n\t\t}\n\t\t\n\t\t$sql .= \"\\n)\";\n\t\t\n\t\treturn $sql;\n\t}", "private function create_table()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS $this->table_name (\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, \n dns_type VARCHAR(10) NOT NULL,\n domain VARCHAR(30) NOT NULL,\n content VARCHAR(30) NOT NULL,\n ttl INT(6) DEFAULT 120\n )\";\n if ($this->conn->query($sql) !== TRUE) {\n die(\"Error creating table: \" . $this->conn->error);\n }\n }", "public function createTable($tableName = '', $structure = [], $loadForge = true) {\n\n\t\tif($loadForge) { $this->load->dbforge(); }\n\n\t\t# add fields, primary keys and indexes in dbforge cache\n\t\t$structure = $this->_appendDefaults($structure);\n\t\t$this->dbforge->add_field($structure['fields']);\n\t\tforeach($structure['pkeys'] as $val) { $this->dbforge->add_key($val, true); }\n\t\tforeach($structure['keys'] as $val) { $this->dbforge->add_key($val); }\n\n\t\t# create table\n\t\t$out = $this->dbforge->create_table($tableName, false, ['ENGINE' => 'InnoDB']);\n\t\tif($out && isset($structure['meta'])) {\n\t\t\t$out = $this->_createTableMeta($structure['meta'], $structure['id']);\n\t\t}\n\t\treturn $out;\n\t}", "function sqlCriaTabela() {\n $sql = \"CREATE TABLE MyGuests (\n id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n nome VARCHAR(50) NOT NULL,\n email VARCHAR(50) NOT NULL,\n telefone VARCHAR(13) NOT NULL,\n mensagem VARCHAR(75) NOT NULL\n )\";\n return $sql;\n}", "function my_movie_list_generate_table_script(){\r\n global $wpdb;\r\n require_once(ABSPATH.'wp-admin/includes/upgrade.php');\r\n\r\n $sql_query_to_create_table=\"CREATE TABLE `wp_my_movie_list` (\r\n\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t `movie_name` varchar(255) NOT NULL,\r\n\t\t `director` varchar(255) NOT NULL,\r\n\t\t `category` varchar(255) NOT NULL,\r\n\t\t `description` text NOT NULL,\r\n\t\t `movie_image` text NOT NULL,\r\n\t\t `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\r\n\t\t PRIMARY KEY (`id`)\r\n\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1\";\r\n\tdbDelta($sql_query_to_create_table);\r\n}", "function createTable() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\\dbDelta( \"CREATE TABLE IF NOT EXISTS $this->table\n\t\t\t(\n\t\t\t post_id bigint(20) unsigned not null,\n\t\t\t primary key (post_id)\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\" );\n\t}", "public function createTable($name, $table);", "private function importSqlTable()\n {\n $this->db->query(\"\n CREATE TABLE `oc_order_pending_by_paynow` (\n `order_id` int(11) NOT NULL AUTO_INCREMENT,\n `total` decimal(15,4) NOT NULL DEFAULT '0.0000',\n `currency_id` int(11) NOT NULL,\n `currency_code` varchar(3) NOT NULL,\n `currency_value` decimal(15,8) NOT NULL DEFAULT '1.00000000',\n `date_added` datetime NOT NULL,\n `date_modified` datetime NOT NULL,\n PRIMARY KEY (`order_id`)\n ) ENGINE=MyISAM AUTO_INCREMENT=171 DEFAULT CHARSET=utf8;\n \");\n\n }", "private static function create_tables() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$wpdb->hide_errors();\r\n\r\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\r\n\r\n\t\t$sql_file = LUMISE_ABSPATH . 'sample-data' . DS . 'database.sql';\r\n\t\t$handle = fopen( $sql_file, 'r' );\r\n\t\t$lines = fread( $handle, filesize( $sql_file ) );\r\n\r\n\t\t$lines = explode( \"\\n\", $lines );\r\n\t\t$templine = '';\r\n\t\tforeach ( $lines as $line ) {\r\n\t\t\t$s1 = substr( $line, 0, 2 );\r\n\t\t\tif ( $s1 != '--' && $line !== '' ) {\r\n\t\t\t\t$templine .= $line;\r\n\r\n\t\t\t\t$line = trim( $line );\r\n\t\t\t\t$s2 = substr( $line, -1, 1 );\r\n\r\n\t\t\t\tif ( $s2 == ';' ) {\r\n\t\t\t\t\t$sql = $templine;\r\n\t\t\t\t\tdbDelta( $sql );\r\n\t\t\t\t\t$templine = '';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose( $handle );\r\n\t}", "function createTable() {\n return Symphony::Database()->query(\n \"CREATE TABLE IF NOT EXISTS `tbl_entries_data_\" . $this->get('id') . \"` (\n\t\t\t\t`id` int(11) unsigned NOT NULL auto_increment,\n\t\t\t\t`entry_id` int(11) unsigned NOT NULL,\n\t\t\t\t`start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t\t`end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n PRIMARY KEY (`id`),\n KEY `entry_id` (`entry_id`)\n );\"\n );\n }", "public function makeTable($name)\n\t{\n\t\t$names = $name . 's';\n\t\t$query = \"create table $names ( id integer unsigned not null primary key auto_increment, $name varchar(128) not null );\";\n\t\t$this->runAndPrint( $query );\n\n\t\techo \" Created $name table.\\n\";\n\t}", "function new_table($in=null){\nglobal $indb;\n\t//\n\tif ( $indb && connected($indb[\"db\"]) && $in!=null ) {\n\t\t//check table existant \n\t\tif( table_exists($in) ) {\n\t\t\ttrigger_error(\"table already exists\",E_USER_NOTICE);\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tif(db_type()==\"f\") mix_it(); //if database is free and mixd database is enable : mix it\n\t\t\t$countac = get_counter() + 1 ; // database elements count\n\t\t\t$newtbl = _FFDBDIR_.$indb[\"db\"].\"/\".$indb[\"db\"].\"_\".$countac.\".tbl\";\n\t\t\t$onew = @fopen($newtbl,\"x+\");// make and open files\n\t\t\tif($onew){\n\t\t\ttik_counter(\"+\"); // add count\n\t\t\tfwrite($onew,\"[Table]\");\n\t\t\tfclose($onew);\n\t\t\t} else return false;\n\t\t\t// inport to src\n\t\t\t$tosrc1 = \"\\n[tbl]\".pure_encode($in).\"[+tbl][loc]\".$indb[\"db\"].\"_\".$countac.\"[+loc][=]\";\n\t\t\t$aralia = func_get_args();\n\t\t\tif(count($aralia)>1) $aramis = $aralia[1];\n\t\t\t$tosrc2 = \"\";\n\t\t\tif( count($aralia)>1 && @count($aramis)>0 && @current($aramis) ){\n\t\t\t\tfor($ie=0;$ie<count($aramis);$ie++){\n\t\t\t\t\t$tosrc2 .= $aramis[$ie].($ie!=count($aramis)-1?\"[|]\":\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor($ie=1;$ie<count($aralia);$ie++){\n\t\t\t\t\t$tosrc2 .= $aralia[$ie].($ie!=count($aralia)-1?\"[|]\":\"\");\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t$tosrc = $tosrc1.$tosrc2.\"[+]\";\n\t\t\t$fosrc = @fopen(_FFDBDIR_.$indb[\"db\"].\"/\".$indb[\"db\"].\".src\",\"a+\");\n\t\t\tset_file_buffer($fosrc,0);\n\t\t\tif($fosrc){\n\t\t\tfwrite($fosrc,$tosrc);\n\t\t\tif($fosrc) fclose($fosrc);\n\t\t\t} else return false;\n\t\t\treturn true;\n\t\t}\n\t}\n\telseif($in==null){\n\t\ttrigger_error(\"bad function invoking: input is null\",E_USER_WARNING);\n\t\treturn false;\n\t\t}\n\telse{\n\t\ttrigger_error(\"first connect to database\",E_USER_WARNING);\n\t\treturn false;\n\t\t}\t\n}", "function views_pgsql_create_table_sql($name, $table) {\n $sql_fields = array();\n foreach ($table['fields'] as $field_name => $field) {\n $sql_fields[] = _views_pgsql_create_field_sql($field_name, _views_pgsql_process_field($field));\n }\n\n $sql_keys = array();\n if (isset($table['primary key']) && is_array($table['primary key'])) {\n $sql_keys[] = 'PRIMARY KEY ('. implode(', ', $table['primary key']) .')';\n }\n if (isset($table['unique keys']) && is_array($table['unique keys'])) {\n foreach ($table['unique keys'] as $key_name => $key) {\n $sql_keys[] = 'CONSTRAINT {'. $name .'}_'. $key_name .'_key UNIQUE ('. implode(', ', $key) .')';\n }\n }\n\n $sql = \"CREATE TABLE {\". $name .\"} (\\n\\t\";\n $sql .= implode(\",\\n\\t\", $sql_fields);\n if (count($sql_keys) > 0) {\n $sql .= \",\\n\\t\";\n }\n $sql .= implode(\",\\n\\t\", $sql_keys);\n $sql .= \"\\n)\";\n $statements[] = $sql;\n\n if (isset($table['indexes']) && is_array($table['indexes'])) {\n foreach ($table['indexes'] as $key_name => $key) {\n $statements[] = _views_pgsql_create_index_sql($name, $key_name, $key);\n }\n }\n\n return $statements;\n}", "private function get_create_table_sql_query()\n {\n $structure = $this->form_defn;\n $tbl_name = $this->table_name;\n // initiate statement, set id as primary key, autoincrement\n $statement = \"CREATE TABLE $tbl_name ( id INT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY \";\n // loop through xform definition array\n foreach ($structure as $key => $val) {\n // check if type is empty\n if (empty ($val ['type']))\n continue;\n $type = $val ['type'];\n $field_name = $val ['field_name'];\n //TODO Call helper function here to shorten column name\n if (strlen($field_name) > 64)\n $field_name = shorten_column_name($field_name);\n // check if field is required\n if (!empty ($val ['required'])) {\n $required = 'NOT NULL';\n } else {\n $required = '';\n }\n if ($type == 'string' || $type == 'binary') {\n $statement .= \", $field_name VARCHAR(300) $required\";\n }\n if ($type == 'select1') {\n // Mysql recommended way of handling single quotes for queries is by using two single quotes at once.\n $statement .= \", $field_name ENUM('\" . implode(\"','\", str_replace(\"'\", \"''\", $val ['option'])) . \"') $required\";\n }\n if ($type == 'select' || $type == 'text') {\n $statement .= \", $field_name TEXT $required \";\n }\n if ($type == 'date') {\n $statement .= \", $field_name DATE $required \";\n }\n if ($type == 'int') {\n $statement .= \", $field_name INT(20) $required \";\n }\n if ($type == 'geopoint') {\n $statement .= \",\" . $field_name . \" VARCHAR(150) $required \";\n $statement .= \",\" . $field_name . \"_point POINT $required \";\n $statement .= \",\" . $field_name . \"_lat DECIMAL(38,10) $required \";\n $statement .= \",\" . $field_name . \"_lng DECIMAL(38,10) $required \";\n $statement .= \",\" . $field_name . \"_acc DECIMAL(38,10) $required \";\n $statement .= \",\" . $field_name . \"_alt DECIMAL(38,10) $required \";\n }\n $statement .= \"\\n\";\n }\n $statement .= \")\";\n return $statement;\n }", "public function new_test_table($tb_name){\n\n\t\t\t$this->load->dbforge();\n\n\t\t\t$fields['id'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'INT',\n\t\t\t\t\t\t\t\t\t'constraint' => 11,\n\t\t\t\t\t\t\t\t\t'null' => FALSE,\n\t\t\t\t\t\t\t\t\t'auto_increment' =>TRUE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['col_name'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t\t\t\t\t'null' => FALSE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['col_slug'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t\t\t\t\t'null' => FALSE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['cat'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t\t\t\t\t'null' => FALSE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['interpretations'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'null' => TRUE\n );\n \n\t\t\t$this->dbforge->add_field($fields);\n\t\t\t$this->dbforge->add_key('id',TRUE);\n\t\t\t$this->dbforge->create_table($tb_name);\n }", "function create_table(){\r\n\t\t$tables = array();\r\n\r\n\t\t/**\r\n\t\t* Table structure for table 'embed_libertas_form'\r\n\t\t*/\r\n\t\t/*\r\n\t\t$fields = array(\r\n\t\t\tarray(\"embed_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\r\n\t\t\tarray(\"trans_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"client_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"form_int_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"form_str_identifier\"\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"module_starter\"\t\t\t,\"varchar(50)\"\t\t,\"NOT NULL\"\t,\"default ''\")\r\n\t\t);\r\n\t\t$primary =\"embed_identifier\";\r\n\t\t$tables[count($tables)] = array(\"embed_libertas_form\", $fields, $primary);\r\n\t\t*/\r\n\t\treturn $tables;\r\n\t}", "function createMonsterTable($conn){\n $sql = \"CREATE TABLE adventureDB.MonsterTable (\n MonsterID INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n Name VARCHAR(60) NOT NULL,\n Size VARCHAR(20) NOT NULL,\n CR FLOAT(10) NOT NULL,\n Alignment VARCHAR(20) NOT NULL,\n Type VARCHAR(20) NOT NULL\n )\";\t\n $mtCreated = $conn->query($sql);\n if($GLOBALS['debug']){\n if ($mtCreated) {\n echo \"<br>DEBUG:MonsterTable created successfully\";\n } else {\n echo \"<br>DEBUG:Error creating MonsterTable: \" . $conn->error;\n }\n } \n}", "function CreateDBSQL()\r\n\t{\r\n\t\t$langs = $this->m_site->GetLanguages ();\r\n\t\t$fields = '';\r\n\t\t\r\n\t\tforeach ( $langs as $lang )\r\n\t\t{\r\n\t\t\t$fields .= \"`name_{$lang}` varchar(255) NOT NULL,\r\n\t\t\t\t\t\t`header_{$lang}` text,\r\n \t\t\t\t\t\t`footer_{$lang}` text,\";\r\n\t\t}\r\n\t\t\r\n\t\t$str = \"CREATE TABLE `videogallery_pattern` (\r\n\t\t\t\t `ID` smallint(6) NOT NULL auto_increment,\r\n\t\t\t\t $fields\r\n\t\t\t\t PRIMARY KEY (`ID`)\r\n\t\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8\";\r\n\t\t\t\t\r\n\t\treturn $str;\r\n\t}", "public function dumpTable( $table, $structure_only = false, $remove_prefix = false, $ignore = false ) {\n $output = array();\n $fields = \"\";\n $sep2 = \"\";\n $stmt = $this->query(\"SHOW CREATE TABLE $table\");\n $row = $stmt->fetch(\\PDO::FETCH_NUM);\n\n if($remove_prefix) //CREATE TABLE `wb_users` (\n $row[1] = preg_replace('~`'.$this->prefix.'~i', '`', $row[1]);\n\n $output[] = $row[1].\";\\n\\n\";\n\n if(!$structure_only)\n {\n $stmt = $this->query(\"SELECT * FROM $table\");\n $line = '';\n while($row = $stmt->fetch(\\PDO::FETCH_OBJ)){\n // runs once per table - create the INSERT INTO clause\n if($fields == \"\"){\n $fields = \"INSERT \" . ( $ignore ? 'IGNORE ' : '' )\n . \"INTO `\" . ( $remove_prefix ? str_ireplace($this->prefix, '', $table) : $table ) . \"` (\";\n $sep = \"\";\n // grab each field name\n foreach($row as $col => $val){\n $fields .= $sep . \"`$col`\";\n $sep = \", \";\n }\n $fields .= \") VALUES\";\n $line .= $fields . \"\\n\";\n }\n // grab table data\n $sep = \"\";\n $line .= $sep2 . \"(\";\n foreach($row as $col => $val){\n // add slashes to field content\n $search = array(\"\\n\", \"\\r\");\n $replace = array(\"\\\\n\", \"\\\\r\");\n $val = str_replace($search, $replace, $val);\n $line .= $sep . \\PDO::quote($val);\n $sep = \", \";\n }\n // terminate row data\n $line .= \")\";\n $sep2 = \",\\n\";\n }\n if($line)\n {\n // terminate insert data\n $line .= \";\\n\";\n $output[] = $line;\n }\n }\n return implode(\"\\n\",$output);\n }", "function make_db_widget(){\nglobal $dbi,$prefix;\n$result = mysql_query(\"CREATE TABLE IF NOT EXISTS \".$prefix.\"_ele_widget (\n `id` int(10) NOT NULL auto_increment,\n `nome_file` varchar(255) NOT NULL default '',\n `titolo` varchar(255) NOT NULL default '',\n `pos_or` int(1) NOT NULL default '1',\n `pos_ver` int(3) NOT NULL default '0',\n `attivo` int(1) NOT NULL default '0',\n PRIMARY KEY (`id`)\n)\",$dbi);\n\n\n}", "function create_table(){\r\n\t\t$tables = array();\r\n\t\t/**\r\n\t\t* Table structure for table ''\r\n\t\t*/\r\n\t\t$fields = array(\r\n\t\t\tarray(\"es_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\r\n\t\t\tarray(\"es_client\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\r\n\t\t\tarray(\"es_label\"\t\t\t,\"varchar(255)\"\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_date_created\"\t\t,\"datetime\"\t\t\t\t\t,\"NOT NULL\"\t,\"default '0000-00-00 00:00:00'\"),\r\n\t\t\tarray(\"es_status\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"es_menu\"\t\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"es_base_uri\"\t\t\t,\"text\"\t\t\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_cache\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_auto_clean\"\t\t,\"unsigned small integer\"\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_last_cached\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\")\r\n\t\t);\r\n\t\t$primary =\"es_identifier\";\r\n\t\t$tables[count($tables)] = array(\"embedscript_list\", $fields, $primary);\r\n\r\n\t\treturn $tables;\r\n\t}", "function createtable(){\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$table_name = $wpdb->prefix . \"custom_widget\";\r\n\r\n\t\t$charset_collate = $wpdb->get_charset_collate();\r\n\r\n\t\t$sql = \"CREATE TABLE $table_name (\r\n\t\t widget_id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n\t\t name tinytext NOT NULL,\r\n\t\t emailaddress varchar(255) DEFAULT '' NOT NULL,\r\n\t\t subject varchar(255) NOT NULL,\r\n\t\t pnumber varchar(255) NOT NULL,\r\n\t\t website varchar(255) NOT NULL,\r\n\t\t message varchar(255) DEFAULT '' NOT NULL,\r\n\t\t PRIMARY KEY (widget_id)\r\n\t\t) $charset_collate;\";\r\n\r\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n\t\tdbDelta( $sql );\r\n\t}", "function create_table($link)\n{\n $sql = \"CREATE TABLE IF NOT EXISTS `\" . TABLE_NAME . \"` (\n `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, \n `text` VARCHAR(255) NOT NULL, \n `checked` TINYINT(1) NOT NULL DEFAULT '0',\n UNIQUE KEY (`id`)\n )\";\n mysqli_query($link, $sql);\n}", "function define_table($table) {\n // The first field should be the primary key\n switch ($table) {\n case \"staff\":\n $table_name = \"TUSERS\";\n $structure_array = [\n array(\"db_name\" => \"UserCode\", \"type\" => \"text\", \"primary\" => TRUE),\n array(\"db_name\" => \"Email\", \"type\" => \"text\", \"isams\" => \"SchoolEmailAddress\", \"primary\" => FALSE),\n array(\"db_name\" => \"StaffID\", \"type\" => \"int\", \"isams\" => \"Id\", \"primary\" => FALSE),\n array(\"db_name\" => \"PersonID\", \"type\" => \"int\", \"isams\" => \"PersonId\", \"primary\" => FALSE),\n array(\"db_name\" => \"Initials\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"Title\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"First Name\", \"type\" => \"text\", \"isams\" => \"Forename\", \"primary\" => FALSE),\n array(\"db_name\" => \"Surname\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"Preferred Name\", \"type\" => \"text\", \"isams\" => \"PreferredName\", \"primary\" => FALSE),\n array(\"db_name\" => \"TeachingStaff\", \"type\" => \"int\", \"primary\" => FALSE)\n ];\n break;\n case \"pupils\":\n $table_name = \"TUSERS\";\n $structure_array = [\n array(\"db_name\" => \"UserCode\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"Email\", \"type\" => \"text\", \"isams\" => \"EmailAddress\", \"primary\" => FALSE),\n array(\"db_name\" => \"PupilID\", \"type\" => \"int\", \"isams\" => \"Id\", \"primary\" => TRUE),\n array(\"db_name\" => \"SchoolID\", \"type\" => \"text\", \"isams\" => \"SchoolId\", \"primary\" => FALSE),\n array(\"db_name\" => \"Initials\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"Title\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"First Name\", \"type\" => \"text\", \"isams\" => \"Forename\", \"primary\" => FALSE),\n array(\"db_name\" => \"Surname\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"Preferred Name\", \"type\" => \"text\", \"isams\" => \"Preferredname\", \"primary\" => FALSE)\n ];\n break;\n /*case \"boardinghouses\":\n $table_name = \"tblboardinghouses\";\n $structure_array = [\n [\"BoardingHouseID\", \"int\", \"Id\"],\n [\"HouseMaster\", \"text\"],\n [\"AssistantHouseMaster\", \"text\"],\n [\"Name\", \"text\"],\n [\"Code\", \"text\"],\n [\"Type\", \"text\"]\n ];\n break;\n case \"forms\":\n $table_name = \"tblforms\";\n $structure_array = [\n [\"FormID\", \"text\", \"Id\"],\n [\"Tutor\", \"text\"],\n [\"AssistantFormTutor\", \"text\"],\n [\"SecondAssistantFormTutor\", \"text\"],\n [\"NationalCurriculumYear\", \"int\"],\n [\"Author\", \"text\"],\n [\"Form\", \"text\"],\n [\"LastUpdated\", \"text\"]\n ];\n break;*/\n case \"terms\":\n $table_name = \"TTERMS\";\n $structure_array = [\n array(\"db_name\" => \"TermID\", \"type\" => \"int\", \"isams\" => \"Id\", \"primary\" => TRUE),\n array(\"db_name\" => \"Author\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"SchoolYear\", \"type\" => \"int\", \"primary\" => FALSE),\n array(\"db_name\" => \"Name\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"StartDate\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"FinishDate\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"LastUpdated\", \"type\" => \"text\", \"primary\" => FALSE)\n ];\n break;\n case \"sets\":\n $table_name = \"TGROUPS\";\n $structure_array = [\n array(\"db_name\" => \"SetID\", \"type\" => \"int\", \"isams\" => \"Id\", \"primary\" => TRUE),\n array(\"db_name\" => \"SubjectID\", \"type\" => \"int\", \"isams\" => \"SubjectId\", \"primary\" => FALSE),\n array(\"db_name\" => \"YearId\", \"type\" => \"int\", \"primary\" => FALSE),\n array(\"db_name\" => \"Name\", \"type\" => \"text\", \"primary\" => FALSE)\n ];\n break;\n case \"setteachers\":\n $table_name = \"TUSERGROUPS\";\n $structure_array = [\n array(\"db_name\" => \"SetListID\", \"type\" => \"int\", \"isams\" => \"SetTeacherId\", \"primary\" => TRUE),\n array(\"db_name\" => \"StaffId\", \"type\" => \"int\", \"primary\" => FALSE),\n array(\"db_name\" => \"SetId\", \"type\" => \"int\", \"isams\" => \"Id\", \"primary\" => FALSE),\n array(\"db_name\" => \"PrimaryTeacher\", \"type\" => \"int\", \"primary\" => FALSE),\n array(\"db_name\" => \"UserType\", \"type\" => \"text\", \"primary\" => FALSE),\n array(\"db_name\" => \"Name\", \"type\" => \"text\", \"primary\" => FALSE)\n ];\n break;\n case \"setlists\":\n $table_name = \"TUSERGROUPS\";\n $structure_array = [\n array(\"db_name\" => \"SetListID\", \"type\" => \"int\", \"isams\" => \"Id\", \"primary\" => TRUE),\n array(\"db_name\" => \"SetId\", \"type\" => \"int\", \"primary\" => FALSE),\n array(\"db_name\" => \"SchoolId\", \"type\" => \"text\", \"primary\" => FALSE)\n ];\n break;\n case \"subjects\":\n $table_name = \"TSUBJECTS\";\n $structure_array = [\n array(\"db_name\" => \"SubjectID\", \"type\" => \"int\", \"primary\" => TRUE),\n array(\"db_name\" => \"Title\", \"type\" => \"text\", \"primary\" => FALSE)\n ];\n break;\n default:\n return FALSE;\n break;\n }\n return [$table_name, $structure_array];\n}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$charset_collate = '';\n\n\t\tif ( ! empty( $wpdb->charset ) ) {\n\t\t\t$charset_collate .= \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t}\n\t\tif ( ! empty( $wpdb->collate ) ) {\n\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t}\n\n\t\t$sql = \"CREATE TABLE {$this->table_name} (\n\t\t\tentry_id bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\tform_id bigint(20) NOT NULL,\n\t\t\tpost_id bigint(20) NOT NULL,\n\t\t\tuser_id bigint(20) NOT NULL,\n\t\t\tstatus varchar(30) NOT NULL,\n\t\t\ttype varchar(30) NOT NULL,\n\t\t\tviewed tinyint(1) DEFAULT 0,\n\t\t\tstarred tinyint(1) DEFAULT 0,\n\t\t\tfields longtext NOT NULL,\n\t\t\tmeta longtext NOT NULL,\n\t\t\tdate datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tip_address varchar(128) NOT NULL,\n\t\t\tuser_agent varchar(256) NOT NULL,\n\t\t\tuser_uuid varchar(36) NOT NULL,\n\t\t\tPRIMARY KEY (entry_id),\n\t\t\tKEY form_id (form_id)\n\t\t) {$charset_collate};\";\n\n\t\tdbDelta( $sql );\n\t}", "function createCarsTable($db){\n $db->exec(\"CREATE TABLE IF NOT EXISTS cars (id INTEGER PRIMARY KEY, manufacturer TEXT, year INTEGER, price INTEGER)\");\n}", "abstract protected function create_db_structure();", "function create_table(){\r\n\r\n global $wpdb;\r\n $db = apply_filters( 'cfdb7_database', $wpdb );\r\n $table_name = $db->prefix.'db7_data';\r\n\r\n if( $db->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name ) {\r\n\r\n $charset_collate = $db->get_charset_collate();\r\n\r\n $sql = \"CREATE TABLE $table_name (\r\n form_id bigint(20) NOT NULL AUTO_INCREMENT,\r\n form_post_id bigint(20) NOT NULL,\r\n form_value longtext NOT NULL,\r\n form_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\r\n PRIMARY KEY (form_id)\r\n ) $charset_collate;\";\r\n\r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n dbDelta( $sql );\r\n }\r\n\t\r\n}", "function createTranslationTable($table_name){\n $tableName = Inflector::singularize($table_name);\n $this->query(\"CREATE TABLE `\".$tableName.\"_translations` (\n \t`id` INT(10) NOT NULL AUTO_INCREMENT,\n \t`locale` VARCHAR(6) NOT NULL,\n \t`model` VARCHAR(255) NOT NULL,\n \t`foreign_key` INT(10) NOT NULL,\n \t`field` VARCHAR(255) NOT NULL,\n \t`content` TEXT NULL,\n \tPRIMARY KEY (`id`),\n \tINDEX `locale` (`locale`),\n \tINDEX `model` (`model`),\n \tINDEX `row_id` (`foreign_key`),\n \tINDEX `field` (`field`)\n )COLLATE='utf8_general_ci' ENGINE=InnoDB;\");\n }", "function CreateTable($spec) {\r\n\t\t// create beginning of query\r\n\t\t$query = \"CREATE TABLE \" . $this->name . \" (\\n\";\r\n\t\t$key = NULL;\r\n\t\t$firsttime = true;\r\n\t\t\r\n\t\t// add each of the columns\r\n\t\tforeach($spec as $n => $s) {\r\n\t\t\t// if it is our first time, then no comma and newline\r\n\t\t\tif($firsttime) {\r\n\t\t\t\t$firsttime = false;\t\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, add seperator--coma and newline\r\n\t\t\t\t$query .= \",\\n\";\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// add the item\r\n\t\t\t$query .= \"\\t\" . $n . \" \" . $s[\"Type\"];\r\n\t\t\t\r\n\t\t\t// now, check to see if we are the key\r\n\t\t\tif(isset($s[\"Key\"])) {\r\n\t\t\t\t$key = $n;\t\r\n\t\t\t}\r\n\t\t\t// Possible TODO: make this more flexible and support more things\r\n\t\t}\r\n\t\t\r\n\t\t// now, check for key\r\n\t\tif($key != NULL) {\r\n\t\t\t$qurey .= \",\\n\\tPRIMARY KEY ($key)\";\t\r\n\t\t}\r\n\t\t\r\n\t\t// close the parenthesis out\r\n\t\t$query .= \")\";\r\n\t\t\r\n\t\t// actually execute the query\r\n\t\t\r\n\t\t// NOTE: This code is not user input safe to use.\r\n\t\t// this can be SQL injected!\r\n\t\t// Take care to only use this in setup!\r\n\t\t$this->db->queryDB($query,array());\r\n\t}", "abstract function createTable($tablename, $collation);" ]
[ "0.7075447", "0.68467337", "0.6844587", "0.6818616", "0.67480147", "0.67471695", "0.6700414", "0.669276", "0.66750365", "0.66495043", "0.6623398", "0.65973073", "0.6593019", "0.65884596", "0.6557792", "0.65315276", "0.65275985", "0.6519569", "0.65023786", "0.64947534", "0.64947534", "0.6485049", "0.6479931", "0.64721936", "0.64516467", "0.64453506", "0.64446807", "0.6437252", "0.6436231", "0.64243096", "0.64148", "0.641313", "0.6397552", "0.6361955", "0.6347929", "0.6330946", "0.63278705", "0.63274753", "0.63243604", "0.63109666", "0.63012785", "0.6299772", "0.62947625", "0.6287338", "0.6278729", "0.6277668", "0.62622565", "0.62612534", "0.6255884", "0.6250056", "0.6248013", "0.62469554", "0.6245253", "0.62390184", "0.623024", "0.62276417", "0.62255496", "0.622474", "0.62204015", "0.6213577", "0.62119836", "0.621007", "0.6206708", "0.6192036", "0.61901206", "0.6184698", "0.6183058", "0.6182275", "0.6179896", "0.61796117", "0.6177098", "0.61695296", "0.6169236", "0.6164408", "0.6163659", "0.6158661", "0.61526304", "0.6148673", "0.61430573", "0.6142734", "0.61387974", "0.6135118", "0.6132057", "0.6129778", "0.6129071", "0.61263007", "0.61223894", "0.6117508", "0.6111902", "0.611073", "0.60982394", "0.6090428", "0.60879415", "0.6083562", "0.607678", "0.60741305", "0.60719943", "0.60648865", "0.60630554", "0.60623974" ]
0.71741587
0
Stores a version of a file
Хранит версию файла
public function storeVersion(File $file, $version, $tempFile);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function store($filename) {\n\t\tif (\\OCP\\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {\n\n\t\t\t// if the file gets streamed we need to remove the .part extension\n\t\t\t// to get the right target\n\t\t\t$ext = \\pathinfo($filename, PATHINFO_EXTENSION);\n\t\t\tif ($ext === 'part') {\n\t\t\t\t$filename = \\substr($filename, 0, \\strlen($filename) - 5);\n\t\t\t}\n\n\t\t\t// we only handle existing files\n\t\t\tif (! Filesystem::file_exists($filename) || Filesystem::is_dir($filename)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlist($uid, $filename) = self::getUidAndFilename($filename);\n\t\t\t/** @var \\OCP\\Files\\Storage\\IStorage $storage */\n\t\t\tlist($storage, $internalPath) = Filesystem::resolvePath($filename);\n\t\t\tif ($storage->instanceOfStorage(IVersionedStorage::class)) {\n\t\t\t\t/** @var IVersionedStorage $storage */\n\t\t\t\tif ($storage->saveVersion($internalPath)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// fallback implementation below - need to go into class Common\n\t\t\t$files_view = new View('/'.$uid .'/files');\n\t\t\t$users_view = new View('/'.$uid);\n\n\t\t\t// no use making versions for empty files\n\t\t\tif ($files_view->filesize($filename) === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// create all parent folders\n\t\t\tself::createMissingDirectories($filename, $users_view);\n\n\t\t\tself::scheduleExpire($uid, $filename);\n\n\t\t\t$filename = \\ltrim($filename, '/');\n\n\t\t\t// store a new version of a file\n\t\t\t$mtime = $users_view->filemtime('files/' . $filename);\n\t\t\t$users_view->copy('files/' . $filename, 'files_versions/' . $filename . '.v' . $mtime);\n\t\t\t// call getFileInfo to enforce a file cache entry for the new version\n\t\t\t$users_view->getFileInfo('files_versions/' . $filename . '.v' . $mtime);\n\t\t}\n\t}", "protected function getVersionFile() : string\n {\n return Storage::get(static::NEW_VERSION_FILE);\n }", "function _write_version_cache($details)\n\t{\n\t\t$this->load->helper('file');\n\t\t\n\t\tif ( ! is_dir(APPPATH.'cache/ee_version'))\n\t\t{\n\t\t\tmkdir(APPPATH.'cache/ee_version', DIR_WRITE_MODE);\n\t\t}\n\n\t\tif (write_file(APPPATH.'cache/ee_version/current_version', serialize($details)))\n\t\t{\n\t\t\t@chmod(APPPATH.'cache/ee_version/current_version', FILE_WRITE_MODE);\t\t\t\n\t\t}\t\t\n\t}", "private function storeFile()\n {\n file_put_contents(\\Yii::getAlias('@runtime/data/' . $this->filename), $this->data. \"\\n\");\n }", "public function storeVersion(): void\n {\n try {\n $this->cache->setItem('browscap.version', $this->iniVersion, false);\n } catch (InvalidArgumentException $e) {\n $this->logger->error(new \\InvalidArgumentException('an error occured while writing the data version into the cache', 0, $e));\n }\n }", "public function retrieveVersion(File $file, $version);", "public function store($new_version) {\n $this->version = $new_version;\n\n Logger::instance()->debug(\"Storing version in local cache as \" . $new_version);\n\n $this->cache->store($this->getVersionedKey(self::TML_VERSION_KEY), array(\n 'version' => $new_version,\n 't' => $this->getTimestamp()\n ));\n }", "public function setStoredVersion($version);", "protected static function setVersion()\n {\n $version = collect(\n json_decode(file_get_contents(base_path('vendor/composer/installed.json')))\n )->where('name', 'laravel/scout')->first()->version;\n\n $manager = realpath(__DIR__ . '/../EngineManager.php');\n\n $content = preg_replace(\n \"/const VERSION = [^;]+;/\",\n \"const VERSION = '{$version}';\",\n file_get_contents($manager)\n );\n\n file_put_contents($manager, $content);\n }", "public function setVersionFile(string $content): bool\n {\n return Storage::put($this->versionFile, $content);\n }", "protected function _StoreVersion()\r\n {\r\n /*Do Nothing, Constant Tag*/\r\n }", "private function saveVersion()\n\t{\n\t\tupdate_option('nestedpages_version', $this->version);\n\t}", "private function writeFile() {\n $content = serialize($this->data);\n if (!file_put_contents($this->cache, $content)) {\n echo \"Could not write content: $content\";\n }\n }", "protected function setVersionFile(string $content) : bool\n {\n return Storage::put(static::NEW_VERSION_FILE, $content);\n }", "function store($file, $data) {\n $info = serialize($data); // var_export($data, true);\n // print_r($info);\n file_put_contents($file, $info);\n}", "public function storeDocument($file);", "private function update()\n {\n $file = $this->directory . DIRECTORY_SEPARATOR . $this->filename;\n $f = fopen($file, 'w+');\n fwrite($f, $this->serialize());\n fclose($f);\n }", "public function store(Storage_Model_File $model, $file);", "protected function _setVersionData()\n {\n // update json\n $filename = $this->_app->getWebrootDir().SELF::VERSION_FILENAME;\n $data = json_encode($this->_data);\n if (!file_put_contents($filename, $data)) {\n $this->echo('Could not update '.SELF::VERSION_FILENAME, SELF::RED);\n }\n // update static\n $filestatic = $this->_app->getWebrootDir().'pub'.DIRECTORY_SEPARATOR.'status.html';\n $data = $this->getVersion();\n if (!file_put_contents($filestatic, $data)) {\n $this->echo('Could not update pub/status.html', SELF::RED);\n }\n }", "protected function SaveWikiVersion() {\n\t\t\t$objWikiFile = new WikiFile();\n\t\t\t$objWikiFile->Description = trim($this->txtDescription->Text);\n\t\t\t$arrMethodParameters = array($this->flcFile->File, $this->flcFile->FileName);\n\n\t\t\t$objWikiVersion = $this->objWikiItem->CreateNewVersion(trim($this->txtTitle->Text), $objWikiFile, 'SaveFile', $arrMethodParameters, QApplication::$Person, null);\n\t\t\treturn $objWikiVersion;\n\t\t}", "public static function get_file_version($file)\n {\n }", "function x25_file_ver($fn)\n{\n\n\tif(!is_file($fn.\".ver\"))\n\t\tfile_put_contents($fn.\".ver\", \"1 \".filemtime($fn));\n\t$c=explode(\" \",file_get_contents($fn.\".ver\"));\n\t\n\t$curver=file_get_contents($fn.\".ver\");\n\t$curver=explode(\" \",$curver);\n\t$curver=$curver;\n\tif(filemtime($fn)!=$curver[1])\n\t{\n\t\tfile_put_contents($fn.\".ver\", (++$curver[0]).\" \".filemtime($fn));\n\t}\n\telse \n\t{\n\t\treturn \"0.0.\".$curver[0];\n\t}\n\treturn \"0.0.\".$curver[0]++;\n}", "private function updateCacheVersion()\n {\n $version = md5($this->app['bolt_version'].$this->app['bolt_name']);\n file_put_contents($this->getDirectory() . '/.version', $version);\n }", "function temporary_file() {\n $file = drupal_tempnam('temporary://', 'backup_migrate_');\n // Add the version without the extension. The tempnam function creates this for us.\n backup_migrate_temp_files_add($file);\n\n if ($this->extension()) {\n $file .= '.'. $this->extension();\n // Add the version with the extension. This is the one we will actually use.\n backup_migrate_temp_files_add($file);\n }\n $this->path = $file;\n }", "public function storeFile($sysName, $fileName);", "abstract public function save(SplFileInfo $file);", "public function save($file_name);", "function add_file_with_ver(String $file)\n {\n if (is_admin_folder()) {\n $ver = filemtime(ADMIN_VIEW.$file);\n return ADMIN_THEME.$file.\"?v=\".$ver;\n }\n $ver = filemtime(THEME_DIR.$file);\n return THEME.$file.\"?v=\".$ver;\n }", "function auto_version($filename, $path){\n $config = get_config();\n $base_dir = getcwd().$config['static_resource_path'];\n return filemtime($base_dir.$path.$filename);\n}", "public function getVersionFile(): string\n {\n return trim(Storage::get($this->versionFile));\n }", "public function testFilesStore(): void\n {\n /** @var User $user */\n $user = User::factory()->create();\n $this->be($user);\n /** @var Version $version */\n $version = Version::factory()->create();\n $response = $this\n ->actingAs($user)\n ->post('/files', ['name' => 'test.py', 'file_content' => '# test', 'version_id' => $version->id]);\n $response->assertRedirect('/projects/' . $version->project->slug . '/edit')\n ->assertSessionHas('successes');\n /** @var File $file */\n $file = File::all()->last();\n $this->assertEquals('test.py', $file->name);\n }", "public function store(string $filename, string $content) : bool;", "private function versionFile ( string $src ) {\n\t\treturn filemtime( JWA_CAR_PLUGIN_DIR . $src );\n\t}", "function storeFiles()\n {\n }", "public function saveChangesToSourceFile() {\n\t\t$fp = fopen($_SERVER['DOCUMENT_ROOT'].$this->file, 'w');\n\t\tfwrite($fp, json_encode($this->catalog->getCatalog()));\n\t\tfclose($fp);\n\t}", "public function store(Request $request, Response $response, $version);", "public function saveRevision($file, $content, $message, $timestamp = null, $is_new = false)\n\t{\n\t\t$this->core->saveRevision($file, $content, $message, $is_new);\n\t}", "private function store ($data){\n $data = json_encode($data);\n $filename = md5($data);\n file_put_contents(cleanSlash($this->asseticStore.'/'.$filename.\".json\"), $data);\n return $filename;\n }", "public function save($key, $value)\n {\n if (false === $this->enabled) {\n return;\n }\n $data = serialize([\n \"content\" => $value,\n \"date\" => time()\n ]);\n file_put_contents($this->getFile($key), $data);\n\n }", "function create_or_update_file($file_path, $data) {\n $handle = fopen($file_path, 'w') or die('Cannot open file: ' . $file_path);\n fwrite($handle, $data);\n}", "public function save($fileName, $data);", "public function publishVersion(File $file, $version, VersionProvider $versionProvider);", "public function publishVersion(File $file, $version, VersionProvider $versionProvider);", "private function storeFile(UploadedFile $file): void\n {\n Storage::disk('local')->put(\n $this->getFilename(),\n $file->getContent()\n );\n }", "public function getStoredVersion();", "abstract protected function saveFile();", "public function put(string $filename, string $content): void;", "function cache_var($var,$file) {\n\t$fh = fopen($file,'w+');\n\tfwrite($fh,serialize($var));\n\tfclose($fh);\n}", "public function store($path)\n {\n $data = $this->generate();\n\n File::put($path, $data);\n\n $this->reset();\n\n return $path;\n }", "function get_directory_version(){\n\t$filename = '../version.txt';\n\t$handle = fopen($filename,'r');\n\t$content = fread($handle,filesize($filename));\n\t\n\tfclose($handle);\n\t\n\treturn $content;\n\n}", "public function store(StorageFilesAbstract $model, $file);", "public function onSaved(Version $version){\r\n\t\t// $version->relativePath()\t// new image relative path , alias to $version->url()\r\n\t\t// $version->absolutePath() // new image relative path , alias to $version->url()\r\n\t\t// $version->id \t\t\t// Access your oroginal Eloquent model's attributes/methods\r\n }", "private function shareAssetVersion(): void\n {\n Inertia::version(static function () {\n return md5_file(public_path('mix-manifest.json'));\n });\n }", "function _kfield_upload_save($file) {\n $old_path = $file->filepath;\n $new_path = file_destination(str_replace($file->filename, \n $file->uid.'_'.$file->field_id.'_'.$file->filename, $file->filepath),\n FILE_EXISTS_REPLACE); \n /*TODO(paakwesi): Fix the copy operation--it doesn't seem to work\n if(file_copy($file, $new_path)) { //Copy to the new location\n file_delete($old_path); //And delete from old path\n $file->filepath = $new_path ? $new_path: $file->filepath;\n }*/\n file_set_status($file, FILE_STATUS_PERMANENT);\n # Add the file to the upload table\n // Create a new revision, or associate a new file needed.\n if ($file->new) {\n db_query(\"INSERT INTO {upload} (fid, nid, vid, list, description, weight) VALUES (%d, %d, %d, %d, '%s', %d)\", $file->fid, $file->nid, $file->vid, $file->list, $file->description, $file->weight);\n }else {\n // Update existing revision.\n db_query(\"UPDATE {upload} SET list = %d, description = '%s', weight = %d WHERE fid = %d AND vid = %d\", $file->list, $file->description, $file->weight, $file->fid, $file->vid);\n }\n\n return db_query(\"INSERT INTO {kentry_files} (fid, uid, field_id, \n filename, filepath, filemime, filesize, list, description) VALUES \n (%d, %d, %d, '%s', '%s', '%s', %d, %d, '%s')\", $file->fid, $file->uid, \n $file->field_id, $file->filename, $file->filepath, $file->filemime, \n $file->filesize, $file->list, $file->description);\n}", "private static function writePackageVersion($version, $targetDir)\n {\n file_put_contents($targetDir . '/version.txt', $version);\n }", "function savefile() {\n\n\t\t# Check it's not a directory\n\t\tif ($this->is_dir()) { return \"ERROR_FS_NOSAVEDIR\"; }\n\n\t\t$filepointer0 = fopen($this->absfilepath, \"wb\");\n\t\tfwrite($filepointer0, $this->filecontents, strlen($this->filecontents));\n\t\tfclose($filepointer0);\n\n\t\t$this->rescan();\n\n\t}", "function auto_version($file)\n{\n if(strpos($file, '/') !== 0 || !file_exists($_SERVER['DOCUMENT_ROOT'] . $file))\n return $file;\n\n $mtime = filemtime($_SERVER['DOCUMENT_ROOT'] . $file);\n return preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\", $file);\n}", "function auto_version($file)\n{\n if(strpos($file, '/') !== 0 || !file_exists($_SERVER['DOCUMENT_ROOT'] . $file))\n return $file;\n\n $mtime = filemtime($_SERVER['DOCUMENT_ROOT'] . $file);\n return preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\", $file);\n}", "static function put($file, $content = '', $fileOption = 'w+') {\n \tself::__checkFile($file);\n \n $handle = fopen($name, $fileOption);\n fwrite($handle, $data);\n fclose($handle);\n }", "function serge_auto_version($file){\n\tif ($file[0] != \"/\"){$file = \"/\" . $file;}\n\t$file_url = get_template_directory_uri() . $file;\n\t$file_path = get_template_directory() . $file;\n\n\tif ( !file_exists($file_path)){\n\t\techo \"<!-- file: '$file_path' does not exist -->\";\n\t\treturn $file_url;\n\t}\n\t$mtime = filemtime($file_path);\n\treturn $file_url . \"?t=\" . $mtime;\n}", "public function storeFile(File $file)\n {\n $hash = md5_file($file->getPathname());\n if (!$this->fileSystem->exists($this->getPath($hash))) {\n $this->fileSystem->rename(\n $file->getPathname(),\n $this->getPath($hash)\n );\n }\n\n return $hash;\n }", "public function save(): void\n {\n file_put_contents($this->filepath, $this->getSerializedStructure());\n }", "static public function StoreOneFile($sKey, $value, $iTTL)\n\t{\n\t\tif (empty($sKey))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t@unlink(self::GetCacheFileName($sKey));\n\t\t@unlink(self::GetCacheFileName('-'.$sKey));\n\t\tif ($iTTL > 0)\n\t\t{\n\t\t\t// hint for ttl management\n\t\t\t$sKey = '-'.$sKey;\n\t\t}\n\n\t\t$sFilename = self::GetCacheFileName($sKey);\n\t\t// try to create the folder\n\t\t$sDirname = dirname($sFilename);\n\t\tif (!file_exists($sDirname))\n\t\t{\n\t\t\tif (!@mkdir($sDirname, 0755, true))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$bRes = !(@file_put_contents($sFilename, serialize($value), LOCK_EX) === false);\n\t\tself::AddFile($sFilename);\n\t\treturn $bRes;\n\t}", "public function storeFilenameForRemove()\n {\n $this->temp = $this->getAbsolutePath();\n }", "function set__existing_version() {\n\n\t\t$this->set( 'existing_version', get_option( \"$this->option_name-version\" ) );\n\n\t}", "public function save($filename='archive.zip')\n {\n file_put_contents($filename, $this->file());\n }", "function storeCookieTime($time) {\n $content = file_get_contents('db/db.txt');\n //Append session id to file\n $content .= \"\\n[\".$this->getSessionID().\"]\\n\";\n // Append the time to the file\n $content .= $time.\"\\n\";\n // Write the contents back to the file\n file_put_contents('db/db.txt', $content);\n }", "public function store(File $file, $tempFile);", "public function save($filename = null);", "public function testFilesUpdateVerilog(): void\n {\n /** @var User $user */\n $user = User::factory()->create();\n $this->be($user);\n /** @var File $file */\n $file = File::factory()->create(['name' => 'test.v']);\n $data = '`default_nettype none\nmodule chip (\n output O_LED_R\n );\n wire w_led_r;\n assign w_led_r = 1\\'b0;\n assign O_LED_R = w_led_r;\nendmodule';\n $response = $this\n ->actingAs($user)\n ->call('put', '/files/' . $file->id, ['file_content' => $data]);\n $response->assertRedirect('/projects/' . $file->version->project->slug . '/edit')\n ->assertSessionHas('successes')\n ->assertSessionHasNoErrors();\n /** @var File $file */\n $file = File::find($file->id);\n $this->assertEquals($data, $file->content);\n }", "public function save($pFilename);", "public function store($path = null) {\r\n if ($path !== null) {\r\n $this->setPath($path);\r\n }\r\n // only store if data is changed\r\n if (!$this->changed) {\r\n return;\r\n }\r\n // check existence\r\n if (!is_file($this->path)) {\r\n throw new Error('While trying to store the settings file, Settings could not open the file: ' . $this->path . '. Ensure the file exists and is readable.', 404);\r\n }\r\n // use StorageFile to get data\r\n $this->getStorage()->begin();\r\n $this->getStorage()->create($this->data, $this->getFileName());\r\n $this->getStorage()->commit();\r\n }", "private static function set_version() {\n\n // Get plugin version\n // Note: Can't use `get_plugin_data()` because it doesn't work on the frontend\n $plugin_data = get_file_data( __FILE__, array('Version' => 'Version') );\n\n // Set the version property\n static::$version = $plugin_data['Version'];\n }", "protected function saveCurrentVersion()\n {\n $verion = CSBillCoreBundle::VERSION;\n\n $entityManager = $this->container->get('doctrine')->getManager();\n\n $repository = $entityManager->getRepository('CSBillCoreBundle:Version');\n\n return $repository->updateVersion($verion);\n }", "private function _save($response, $key, $version)\n {\n $this->_assignState($response);\n\n if ($this->cache && $version == 'published') {\n $this->cache->save($response, $key);\n }\n }", "public function setFile($file);", "public function setFile($file);", "public function setFile(File $file)\n {\n $this->rememberFile = $file;\n }", "public function save_version_no($value=''){\n update_option( $this->slug . '-current-version', $this->args['version'] );\n }", "public function store($file)\n {\n $file->move($this->directory, $this->originalImageName);\n }", "function saveNewInversion($archivo,$nombreOperador){\n\t\t$r = \"\";\n\t\t\n\t\t$extension = explode(\".\",$archivo['name']);\n\t\t$num = count($extension)-1;\n\t\t$noMatch = 0;\n\t\tforeach( $this->permitidos as $p ) {\n\t\t\tif ( strcasecmp( $extension[$num], $p ) == 0 ) $noMatch = 1;\n\t\t}\n\t\tif($archivo['name']!=null){\n\t\t\tif($noMatch==1){\n\t\t\t\tif($archivo['size'] < 30000000){\n\t\t\t\t\t$ruta = RUTA_INVERSION.\"/\".$nombreOperador.\"/\";\n\t\t\t\t\t$carpetas = explode(\"/\",substr($ruta,3,strlen($ruta)-1));\n\t\t\t\t\t$cad = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];\n\t\t\t\t\t$ruta_destino = '';\n\t\t\t\t\tforeach($carpetas as $c){\n\t\t\t\t\t\t$ruta_destino .= \"/\".strtolower($c);\n\t\t\t\t\t\tif(!is_dir($ruta_destino)) {\n\t\t\t\t\t\t\tmkdir($ruta_destino,0777);}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tchmod($ruta_destino, 0777);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!move_uploaded_file($archivo['tmp_name'], utf8_decode(strtolower($ruta).$archivo['name']))){\n\t\t\t\t\t\t$r = ERROR_COPIAR_ARCHIVO;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->nombre=$archivo['name'];\n\t\t\t\t\t\t$i = $this->dd->insertInversion($this->rubro,$this->fecha,$this->proveedor,\n\t\t\t\t\t\t\t\t\t\t$this->documento_proveedor,$this->monto,$this->observaciones,$this->nombre,$this->operador);\n\t\t\t\t\t\tif($i == \"true\"){\n\t\t\t\t\t\t\t$r = EJECUCION_AGREGADO;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$r = ERROR_ADD_EJECUCION;\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$r = ERROR_SIZE_ARCHIVO;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$r = ERROR_FORMATO_ARCHIVO;\n\t\t\t}\n\t\t}else{\n\t\t\t$r = ERROR_CONFIGURACION_RUTA;\n\t\t}\n\t\treturn $r;\n\t}", "public function save() {\n $cache = Location::get(\\Raptor\\Core\\Location::CACHE);\n if (!file_exists($cache . DIRECTORY_SEPARATOR . $this->name))\n mkdir($cache . DIRECTORY_SEPARATOR . $this->name);\n $this->instanceCache=NULL;\n file_put_contents($cache . DIRECTORY_SEPARATOR . $this->name . DIRECTORY_SEPARATOR . '52753' . $this->name, serialize($this), LOCK_EX);\n \n }", "public function save(){\n if($this->is_delete) return unlink(self::$filename);\n return file_put_contents(self::$filename, serialize($this));\n }", "public function store($type,$file)\n {\n $storage = match ($type) {\n 'avatar' => $this->locator->get(File::class),\n 'post' => $this->locator->get(S3::class),\n default => $this->locator->get(Cloudinary::class),\n };\n $storage->store($file);\n }", "public function store($data)\n {\n $this->clean();\n\n if (true === $this->_parameters->getParameter('serialize_content')) {\n $data = serialize($data);\n }\n\n if (true === $this->_parameters->getParameter('file.compress.active')) {\n $data = gzcompress(\n $data,\n $this->_parameters->getParameter('file.compress.level')\n );\n }\n\n $this->setId($this->getIdMd5());\n $directory =\n $this->_parameters->getFormattedParameter('file.cache.directory');\n\n @mkdir($directory, 0755, true);\n\n file_put_contents(\n $directory .\n $this->_parameters->getFormattedParameter('file.cache.file'),\n $data\n );\n\n return;\n }", "public function fileMetricsUpdate()\n {\n //$lm = filemtime($this->getDownloadPath());\n $this->filesize = filesize($this->getDownloadPath());\n $this->save();\n }", "public static function getVersion()\n {\n return FILE_THERION_VERSION;\n }", "function switch($version)\n {\n $version = $this->load($version);\n\n foreach ($version['sources'] as $filename => $content)\n file::write(fs::cntpath($this->cid, $this->iid, $filename), $content);\n }", "public function store(VersionRequest $request) {\n //\n $this->authorize('create', Version::class);\n Version::create($request->all());\n session()->flash('success', '版本创建成功');\n return redirect(route('project.show', ['id' => $request->project_id,'param'=>'versions']));\n }", "function auto_version($file)\n {\n $filepath = realpath(__DIR__ . '/../' . $file);\n if(strpos($filepath, '/') !== 0 || !file_exists($filepath))\n return $GLOBALS['rootdir'] . $file;\n\n $mtime = filemtime($filepath);\n return $GLOBALS['rootdir'] . preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\", $file);\n }", "function version_content($path,$file,$fileout)\n{\n echo \"version content\";\n if (copy ( \"$path/$fileout\", genera_newfile(\"$path/$fileout\",\"/vers/\") ))\n {\n echo \"copy success!\";\n }\n}", "public static function autoVersion($file)\r\n\t{\r\n\t\tif(strpos($file, '/') !== 0 || !file_exists($_SERVER['DOCUMENT_ROOT'] . $file))\r\n\t\t\treturn $file;\r\n\r\n\t\t$mtime = @filemtime($_SERVER['DOCUMENT_ROOT'] . $file);\r\n\t\treturn $file . \"?_=\" . $mtime;\r\n\t}", "public function saveFileContent($fileName, $content);", "public function saveFileContent($fileName, $content);", "private function store()\n {\n if (!is_file($this->backupConfiguration->getArchiveOutputPath())) {\n return;\n }\n\n $this->storeAtLongTermStorageProvider();\n $this->storeAtLocalBackup();\n }", "public function save(): void {\n file_put_contents($this->getFilename(), $this->getContent());\n }", "function writeFile() {\n global $directory, $hash, $class, $instance;\n\n $instance = hex2bin($instance);\n $class = hex2str($class);\n $hash = hex2str($hash);\n $path = prepareOutput();\n\n echo \"Extracting $directory/$class/$hash\\n\";\n file_put_contents($path, $instance);\n resetState();\n}", "public function saveFirstRevision($file)\n\t{\n\t\t$this->core->saveFirstRevision($file);\n\t}", "public function saveInfo($sFile, $sType, $sContent, $iSize)\n\t{\n\t\treturn;\n\t\t\n\t\tif (defined('PHPFOX_INSTALLER') || defined('PHPFOX_CACHE_SKIP_DB_STORE'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($sFile == 'sql_reserved_list')\n\t\t{\n\t\t\treturn;\n\t\t}\t\n\t\t\n\t\t$this->removeInfo($sFile);\n\t\t$oDb = Phpfox::getLib('database');\n\t\t$oDb->insert(Phpfox::getT('cache'), array(\n\t\t\t\t'file_name' => $sFile,\n\t\t\t\t'cache_data' => $sContent,\n\t\t\t\t'data_size' => (int) $iSize,\n\t\t\t\t'type_id' => $sType,\n\t\t\t\t'time_stamp' => PHPFOX_TIME\n\t\t\t)\n\t\t);\n\t}", "protected function newVersion()\n\t{\n\t\t\\IPS\\Output::i()->jsFiles = array_merge( \\IPS\\Output::i()->jsFiles, \\IPS\\Output::i()->js( 'front_submit.js', 'downloads', 'front' ) );\n\n\t\t/* Permission check */\n\t\tif ( !$this->file->canEdit() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'no_module_permission', '2D161/C', 403, '' );\n\t\t}\n\t\t\n\t\t$category = $this->file->container();\n\t\t\n\t\t/* Build form */\n\t\t$form = new \\IPS\\Helpers\\Form;\n\t\t$form->addHeader( 'new_version_details' );\n\n\t\tif ( $category->versioning !== 0 and \\IPS\\Member::loggedIn()->group['idm_bypass_revision'] )\n\t\t{\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\YesNo( 'file_save_revision', TRUE ) );\n\t\t}\n\n\t\tif( $category->version_numbers )\n\t\t{\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'file_version', $this->file->version, ( $category->version_numbers == 2 ) ? TRUE : FALSE, array( 'maxLength' => 32 ) ) );\n\t\t}\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Editor( 'file_changelog', $this->file->changelog, FALSE, array( 'app' => 'downloads', 'key' => 'Downloads', 'autoSaveKey' => \"downloads-{$this->file->id}-changelog\") ) );\n\t\t$form->addHeader( 'upload_files' );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Upload( 'files', iterator_to_array( $this->file->files( NULL, FALSE ) ), ( !\\IPS\\Member::loggedIn()->group['idm_linked_files'] and !\\IPS\\Member::loggedIn()->group['idm_import_files'] ), array( 'storageExtension' => 'downloads_Files', 'allowedFileTypes' => $category->types, 'maxFileSize' => $category->maxfile ? ( $category->maxfile / 1024 ) : NULL, 'multiple' => TRUE, 'retainDeleted' => TRUE ) ) );\n\n\t\t$linkedFiles = iterator_to_array( \\IPS\\Db::i()->select( 'record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=0', $this->file->id, 'link' ) ) );\n\n\t\tif ( \\IPS\\Member::loggedIn()->group['idm_linked_files'] )\n\t\t{\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Stack( 'url_files', $linkedFiles, FALSE, array( 'stackFieldType' => 'Url' ), array( 'IPS\\downloads\\File', 'blacklistCheck' ) ) );\n\t\t}\n\t\telse if ( \\count( $linkedFiles ) > 0 )\n\t\t{\n\t\t\t$form->addMessage( 'url_files_no_perm' );\n\t\t}\n\n\t\tif ( \\IPS\\Member::loggedIn()->group['idm_import_files'] )\n\t\t{\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Stack( 'import_files', array(), FALSE, array( 'placeholder' => \\IPS\\ROOT_PATH ), function( $val )\n\t\t\t{\n\t\t\t\tif( \\is_array( $val ) )\n\t\t\t\t{\n\t\t\t\t\tforeach ( $val as $file )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !is_file( $file ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new \\DomainException( \\IPS\\Member::loggedIn()->language()->addToStack('err_import_files', FALSE, array( 'sprintf' => array( $file ) ) ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tif ( $category->bitoptions['allowss'] )\n\t\t{\n\t\t\t$screenshots = iterator_to_array( $this->file->screenshots( 2, FALSE ) );\n\n\t\t\tif( $this->file->_primary_screenshot and isset( $screenshots[ $this->file->_primary_screenshot ] ) )\n\t\t\t{\n\t\t\t\t$screenshots[ $this->file->_primary_screenshot ] = array( 'fileurl' => $screenshots[ $this->file->_primary_screenshot ], 'default' => true );\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Upload( 'screenshots', $screenshots, ( $category->bitoptions['reqss'] and !\\IPS\\Member::loggedIn()->group['idm_linked_files'] ), array(\n\t\t\t\t'storageExtension'\t=> 'downloads_Screenshots',\n\t\t\t\t'image'\t\t\t\t=> $category->maxssdims ? explode( 'x', $category->maxssdims ) : TRUE,\n\t\t\t\t'maxFileSize'\t\t=> $category->maxss ? ( $category->maxss / 1024 ) : NULL,\n\t\t\t\t'multiple'\t\t\t=> TRUE,\n\t\t\t\t'retainDeleted'\t\t=> TRUE,\n\t\t\t\t'template'\t\t\t=> \"downloads.submit.screenshot\",\n\t\t\t) ) );\n\n\t\t\tif ( \\IPS\\Member::loggedIn()->group['idm_linked_files'] )\n\t\t\t{\n\t\t\t\t//iterator_to_array( \\IPS\\Db::i()->select( 'record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=0', $this->file->id, 'sslink' ) ) )\n\t\t\t\t//\n\t\t\t\t$form->add( new \\IPS\\downloads\\Form\\LinkedScreenshots( 'url_screenshots', array(\n\t\t\t\t\t'values'\t=> iterator_to_array( \\IPS\\Db::i()->select( 'record_id, record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=0', $this->file->id, 'sslink' ) )->setKeyField('record_id')->setValueField('record_location') ),\n\t\t\t\t\t'default'\t=> $this->file->_primary_screenshot\n\t\t\t\t), FALSE, array( 'IPS\\downloads\\File', 'blacklistCheck' ) ) );\n\t\t\t}\n\t\t}\n\n\t\t/* Output */\n\t\t\\IPS\\Output::i()->title = $this->file->name;\n\n\t\t/* Handle submissions */\n\t\tif ( $values = $form->values() )\n\t\t{\t\t\t\n\t\t\t/* Check */\n\t\t\tif ( empty( $values['files'] ) and empty( $values['url_files'] ) and empty( $values['import_files'] ) )\n\t\t\t{\n\t\t\t\t$form->error = \\IPS\\Member::loggedIn()->language()->addToStack('err_no_files');\n\t\t\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'submit' )->newVersion( $form, $category->versioning !== 0 );\n\t\t\t\treturn (string) $form;\n\t\t\t}\n\t\t\tif ( $category->bitoptions['reqss'] and empty( $values['screenshots'] ) and empty( $values['url_screenshots'] ) )\n\t\t\t{\n\t\t\t\t$form->error = \\IPS\\Member::loggedIn()->language()->addToStack('err_no_screenshots');\n\t\t\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'submit' )->newVersion( $form, $category->versioning !== 0 );\n\t\t\t\treturn (string) $form;\n\t\t\t}\n\t\t\t\n\t\t\t/* Versioning */\n\t\t\t$existingRecords = array();\n\t\t\t$existingScreenshots = array();\n\t\t\t$existingLinks = array();\n\t\t\t$existingScreenshotLinks = array();\n\t\t\tif ( $category->versioning !== 0 and ( !\\IPS\\Member::loggedIn()->group['idm_bypass_revision'] or $values['file_save_revision'] ) )\n\t\t\t{\n\t\t\t\t$this->file->saveVersion();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$existingRecords = array_unique( iterator_to_array( \\IPS\\Db::i()->select( 'record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=?', $this->file->id, 'upload', 0 ) ) ) );\n\t\t\t\t$existingScreenshots = array_unique( iterator_to_array( \\IPS\\Db::i()->select( 'record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=?', $this->file->id, 'ssupload', 0 ) ) ) );\n\t\t\t\t$existingLinks = array_unique( iterator_to_array( \\IPS\\Db::i()->select( 'record_id, record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=?', $this->file->id, 'link', 0 ) )->setKeyField('record_id')->setValueField('record_location') ) );\n $existingScreenshotLinks = array_unique( iterator_to_array( \\IPS\\Db::i()->select( 'record_id, record_location', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=?', $this->file->id, 'sslink', 0 ) )->setKeyField('record_id')->setValueField('record_location') ) );\n\t\t\t}\n\t\t\t\n\t\t\t/* Insert the new records */\n\t\t\tforeach ( $values['files'] as $file )\n\t\t\t{\n\t\t\t\t$key = array_search( (string) $file, $existingRecords );\n\t\t\t\t\n\t\t\t\tif ( $key !== FALSE )\n\t\t\t\t{\n\t\t\t\t\tunset( $existingRecords[ $key ] );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\\IPS\\Db::i()->insert( 'downloads_files_records', array(\n\t\t\t\t\t\t'record_file_id'\t=> $this->file->id,\n\t\t\t\t\t\t'record_type'\t\t=> 'upload',\n\t\t\t\t\t\t'record_location'\t=> (string) $file,\n\t\t\t\t\t\t'record_realname'\t=> $file->originalFilename,\n\t\t\t\t\t\t'record_size'\t\t=> $file->filesize(),\n\t\t\t\t\t\t'record_time'\t\t=> time(),\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $values['import_files'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $values['import_files'] as $path )\n\t\t\t\t{\n\t\t\t\t\t$file = \\IPS\\File::create( 'downloads_Files', mb_substr( $path, mb_strrpos( $path, DIRECTORY_SEPARATOR ) + 1 ), file_get_contents( $path ) );\n\t\t\t\t\t\n\t\t\t\t\t$key = array_search( (string) $file, $existingRecords );\n\t\t\t\t\tif ( $key !== FALSE )\n\t\t\t\t\t{\n\t\t\t\t\t\tunset( $existingRecords[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\\IPS\\Db::i()->insert( 'downloads_files_records', array(\n\t\t\t\t\t\t\t'record_file_id'\t=> $this->file->id,\n\t\t\t\t\t\t\t'record_type'\t\t=> 'upload',\n\t\t\t\t\t\t\t'record_location'\t=> (string) $file,\n\t\t\t\t\t\t\t'record_realname'\t=> $file->originalFilename,\n\t\t\t\t\t\t\t'record_size'\t\t=> $file->filesize(),\n\t\t\t\t\t\t\t'record_time'\t\t=> time(),\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $values['url_files'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $values['url_files'] as $url )\n\t\t\t\t{\n\t\t\t\t\t$key = array_search( $url, $existingLinks );\n\t\t\t\t\tif ( $key !== FALSE )\n\t\t\t\t\t{\n\t\t\t\t\t\tunset( $existingLinks[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\\IPS\\Db::i()->insert( 'downloads_files_records', array(\n\t\t\t\t\t\t\t'record_file_id'\t=> $this->file->id,\n\t\t\t\t\t\t\t'record_type'\t\t=> 'link',\n\t\t\t\t\t\t\t'record_location'\t=> (string) $url,\n\t\t\t\t\t\t\t'record_realname'\t=> NULL,\n\t\t\t\t\t\t\t'record_size'\t\t=> 0,\n\t\t\t\t\t\t\t'record_time'\t\t=> time(),\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $values['screenshots'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $values['screenshots'] as $_key => $file )\n\t\t\t\t{\n\t\t\t\t\t/* If this was the primary screenshot, convert back */\n\t\t\t\t\tif( \\is_array( $file ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $file['fileurl'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$key = array_search( (string) $file, $existingScreenshots );\n\t\t\t\t\tif ( $key !== FALSE )\n\t\t\t\t\t{\n\t\t\t\t\t\t\\IPS\\Db::i()->update( 'downloads_files_records', array(\n\t\t\t\t\t\t\t'record_default'\t\t=> ( \\IPS\\Request::i()->screenshots_primary_screenshot AND \\IPS\\Request::i()->screenshots_primary_screenshot == $_key ) ? 1 : 0\n\t\t\t\t\t\t), array( 'record_id=?', $_key ) );\n\n\t\t\t\t\t\tunset( $existingScreenshots[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$noWatermark = NULL;\n\t\t\t\t\t\t$watermarked = FALSE;\n\t\t\t\t\t\tif ( \\IPS\\Settings::i()->idm_watermarkpath )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$noWatermark = (string) $file;\n\t\t\t\t\t\t\t\t$watermark = \\IPS\\Image::create( \\IPS\\File::get( 'core_Theme', \\IPS\\Settings::i()->idm_watermarkpath )->contents() );\n\t\t\t\t\t\t\t\t$image = \\IPS\\Image::create( $file->contents() );\n\t\t\t\t\t\t\t\t$image->watermark( $watermark );\n\t\t\t\t\t\t\t\t$file = \\IPS\\File::create( 'downloads_Screenshots', $file->originalFilename, $image );\n\t\t\t\t\t\t\t\t$watermarked = TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch ( \\Exception $e ) { }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * We only need to generate a new thumbnail if we are using watermarking.\n\t\t\t\t\t\t * If we are not, then we can simply use the previous thumbnail, if this existed previously, rather than generating a new one every time we upload a new version, which is unnecessary extra processing as well as disk usage.\n\t\t\t\t\t\t * If we are, then it is impossible to know if the watermark has since changed, so we need to go ahead and do it anyway.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t$existing = NULL;\n\t\t\t\t\t\tif ( $watermarked !== TRUE )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$existing = \\IPS\\Db::i()->select( '*', 'downloads_files_records', array( \"record_location=? AND record_file_id=?\", (string) $file, $this->file->id ), NULL, NULL, NULL, NULL, \\IPS\\Db::SELECT_FROM_WRITE_SERVER )->first();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch( \\UnderflowException $e ) {}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\\IPS\\Db::i()->insert( 'downloads_files_records', array(\n\t\t\t\t\t\t\t'record_file_id'\t\t=> $this->file->id,\n\t\t\t\t\t\t\t'record_type'\t\t\t=> 'ssupload',\n\t\t\t\t\t\t\t'record_location'\t\t=> (string) $file,\n\t\t\t\t\t\t\t'record_thumb'\t\t\t=> ( $watermarked OR !$existing ) ? (string) $file->thumbnail( 'downloads_Screenshots' ) : $existing['record_thumb'],\n\t\t\t\t\t\t\t'record_realname'\t\t=> $file->originalFilename,\n\t\t\t\t\t\t\t'record_size'\t\t\t=> $file->filesize(),\n\t\t\t\t\t\t\t'record_time'\t\t\t=> time(),\n\t\t\t\t\t\t\t'record_no_watermark'\t=> $noWatermark,\n\t\t\t\t\t\t\t'record_default'\t\t=> ( \\IPS\\Request::i()->screenshots_primary_screenshot AND \\IPS\\Request::i()->screenshots_primary_screenshot == $_key ) ? 1 : 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\t\t\tif ( isset( $values['url_screenshots'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $values['url_screenshots'] as $_key => $url )\n\t\t\t\t{\n\t\t\t\t\t$key = array_search( (string) $file, $existingScreenshotLinks );\n\t\t\t\t\tif ( $key !== FALSE )\n\t\t\t\t\t{\n\t\t\t\t\t\t\\IPS\\Db::i()->update( 'downloads_files_records', array(\n\t\t\t\t\t\t\t'record_default'\t\t=> ( \\IPS\\Request::i()->screenshots_primary_screenshot AND \\IPS\\Request::i()->screenshots_primary_screenshot == $_key ) ? 1 : 0\n\t\t\t\t\t\t), array( 'record_id=?', $_key ) );\n\t\t\t\t\t\tunset( $existingScreenshotLinks[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\\IPS\\Db::i()->insert( 'downloads_files_records', array(\n\t\t\t\t\t\t\t'record_file_id'\t=> $this->file->id,\n\t\t\t\t\t\t\t'record_type'\t\t=> 'sslink',\n\t\t\t\t\t\t\t'record_location'\t=> (string) $url,\n\t\t\t\t\t\t\t'record_realname'\t=> NULL,\n\t\t\t\t\t\t\t'record_size'\t\t=> 0,\n\t\t\t\t\t\t\t'record_time'\t\t=> time(),\n\t\t\t\t\t\t\t'record_default'\t=> ( \\IPS\\Request::i()->screenshots_primary_screenshot AND \\IPS\\Request::i()->screenshots_primary_screenshot == $_key ) ? 1 : 0\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Delete any we're not using anymore */\n\t\t\tforeach ( $existingRecords as $url )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$file = \\IPS\\File::get( 'downloads_Files', $url )->delete();\n\t\t\t\t}\n\t\t\t\tcatch ( \\Exception $e ) { }\n\t\t\t\t\n\t\t\t\t\\IPS\\Db::i()->delete( 'downloads_files_records', array( 'record_location=?', $url ) );\n\t\t\t}\n\t\t\tforeach ( $existingScreenshots as $url )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$file = \\IPS\\File::get( 'downloads_Screenshots', $url )->delete();\n\t\t\t\t}\n\t\t\t\tcatch ( \\Exception $e ) { }\n\t\t\t\t\n\t\t\t\t\\IPS\\Db::i()->delete( 'downloads_files_records', array( 'record_location=?', $url ) );\n\t\t\t}\n\t\t\tforeach ( $existingLinks as $id => $url )\n\t\t\t{\t\t\t\t\n\t\t\t\t\\IPS\\Db::i()->delete( 'downloads_files_records', array( 'record_id=?', $id ) );\n\t\t\t}\n foreach ( $existingScreenshotLinks as $id => $url )\n {\n \\IPS\\Db::i()->delete( 'downloads_files_records', array( 'record_id=?', $id ) );\n }\n\t\t\t\n\t\t\t/* Set the new details */\n\t\t\t$this->file->version = ( isset( $values['file_version'] ) ) ? $values['file_version'] : NULL;\n\t\t\t$this->file->changelog = $values['file_changelog'];\n\t\t\t$this->file->size = \\floatval( \\IPS\\Db::i()->select( 'SUM(record_size)', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=0', $this->file->id, 'upload' ), NULL, NULL, NULL, NULL, \\IPS\\Db::SELECT_FROM_WRITE_SERVER )->first() );\n\t\t\t\n\t\t\t/* Work out the new primary screenshot */\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->file->primary_screenshot = \\IPS\\Db::i()->select( 'record_id', 'downloads_files_records', array( 'record_file_id=? AND ( record_type=? OR record_type=? ) AND record_backup=0', $this->file->id, 'ssupload', 'sslink' ), 'record_default DESC, record_id ASC', NULL, NULL, NULL, \\IPS\\Db::SELECT_FROM_WRITE_SERVER )->first();\n\t\t\t}\n\t\t\tcatch ( \\UnderflowException $e ) { }\n\t\t\t\n\t\t\t/* Does it have to be reapproved? */\n\t\t\tif ( $category->bitoptions['moderation'] and $category->bitoptions['moderation_edits'] and !$this->file->canUnhide() )\n\t\t\t{\n\t\t\t\t$this->file->open = 0;\n\t\t\t}\n\t\t\t\n\t\t\t/* Save */\n\t\t\t$this->file->updated = time();\n\t\t\t$this->file->save();\n\t\t\t\n\t\t\t/* Send notifications */\n\t\t\tif ( $this->file->open )\n\t\t\t{\n\t\t\t\t$this->file->sendUpdateNotifications();\n\t\t\t}\n\t\t\t\n\t\t\t$this->file->processAfterNewVersion( $values );\n\t\t\t\n\t\t\t/* Boink */\n\t\t\t\\IPS\\Output::i()->redirect( $this->file->url() );\n\t\t}\n\t\t\n\t\t/* Set navigation */\n\t\ttry\n\t\t{\n\t\t\tforeach ( $category->parents() as $parent )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->breadcrumb[] = array( $parent->url(), $parent->_title );\n\t\t\t}\n\t\t\t\\IPS\\Output::i()->breadcrumb[] = array( $category->url(), $category->_title );\n\t\t}\n\t\tcatch ( \\Exception $e ) { }\n\t\t\\IPS\\Output::i()->breadcrumb[] = array( $this->file->url(), $this->file->name );\n\n\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'submit' )->newVersion( $form, $category->versioning !== 0 );\n\t}" ]
[ "0.6968143", "0.6536738", "0.6495951", "0.64852333", "0.6469875", "0.6419708", "0.6259066", "0.6251129", "0.61760885", "0.6121667", "0.60605794", "0.6030391", "0.6024975", "0.6013538", "0.5988619", "0.5953834", "0.5951644", "0.59220576", "0.590778", "0.5838933", "0.58376795", "0.5830947", "0.5794768", "0.5792982", "0.5787745", "0.57504356", "0.5717705", "0.56940746", "0.56915843", "0.56660265", "0.5654721", "0.56539285", "0.5630318", "0.55682206", "0.55554974", "0.55513066", "0.5548778", "0.55079335", "0.5497085", "0.5494661", "0.54942775", "0.54831904", "0.54831904", "0.5482118", "0.5476047", "0.5473739", "0.54724365", "0.5471531", "0.54697216", "0.5458035", "0.5452409", "0.54279554", "0.5416724", "0.5414119", "0.54080176", "0.53929704", "0.5383434", "0.5383434", "0.5376125", "0.5364267", "0.53626436", "0.53567106", "0.5355108", "0.53442836", "0.5335637", "0.5334529", "0.53286177", "0.5317254", "0.52902627", "0.5288977", "0.5287114", "0.52813846", "0.5279747", "0.52773684", "0.5274924", "0.5273518", "0.5273518", "0.5265604", "0.5264872", "0.52575696", "0.52570474", "0.52558565", "0.5253225", "0.5251403", "0.52433044", "0.52427363", "0.5237899", "0.5235124", "0.5233269", "0.52128565", "0.5208518", "0.5208468", "0.52063113", "0.52063113", "0.519959", "0.5197326", "0.5194827", "0.51882046", "0.5185487", "0.51747215" ]
0.74184257
0
Retrieves a version of a file and temporarily stores it somewhere so it can be read.
Получает версию файла и временно хранит её в некотором месте, чтобы можно было её прочитать.
public function retrieveVersion(File $file, $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getVersionFile() : string\n {\n return Storage::get(static::NEW_VERSION_FILE);\n }", "function get_directory_version(){\n\t$filename = '../version.txt';\n\t$handle = fopen($filename,'r');\n\t$content = fread($handle,filesize($filename));\n\t\n\tfclose($handle);\n\t\n\treturn $content;\n\n}", "public static function get_file_version($file)\n {\n }", "public function getVersionFile(): string\n {\n return trim(Storage::get($this->versionFile));\n }", "function versioned_resource($relative_url){\n $file = $_SERVER[\"DOCUMENT_ROOT\"].$relative_url;\n $file_version = \"\";\n\n if(file_exists($file)) {\n $file_version = \"?v=\".filemtime($file);\n }\n\n return $relative_url.$file_version;\n}", "function versioned_resource($relative_url){\n $file = $_SERVER[\"DOCUMENT_ROOT\"].$relative_url;\n $file_version = \"\";\n\n if(file_exists($file)) {\n $file_version = \"?v=\".filemtime($file);\n }\n\n return $relative_url.$file_version;\n}", "final public function getFile() { }", "public function getCurrentVersion()\n {\n $version = File::get(public_path() . '/version.txt');\n return $version;\n }", "public static function get()\n {\n $full_version_file_path = base_path() . self::$version_file_path;\n $version = '0';\n\n if (file_exists($full_version_file_path)) {\n $version = trim(file_get_contents($full_version_file_path));\n }\n\n return $version;\n }", "function versioned_resource( $relative_url ) {\n\t$file = $_SERVER[\"DOCUMENT_ROOT\"] . $relative_url;\n\t$file_version = \"\";\n\n\tif ( file_exists( $file ) ) {\n\t\t$file_version = \"?v=\" . filemtime( $file );\n\t}\n\n\treturn $relative_url . $file_version;\n}", "public function storeVersion(File $file, $version, $tempFile);", "public function retrieve(File $file);", "public static function forgeFile()\n {\n return static::forge('file');\n }", "function &getRevisedFile() {\r\n\t\t$returner =& $this->getData('revisedFile');\r\n\t\treturn $returner;\r\n\t}", "function &getRevisedFile() {\r\n\t\t$returner =& $this->getData('revisedFile');\r\n\t\treturn $returner;\r\n\t}", "public function get_file(/* ... */)\n {\n return $this->_file;\n }", "public static function loadVersion() {\n return CacheManager::cache(__METHOD__, function() {\n $version = trim(file_get_contents(VENDOR_DIR . 'titon/toolkit/version.md'));\n\n if (strpos($version, '-') !== false) {\n $version = explode('-', $version)[0];\n }\n\n return $version;\n });\n }", "static function get_file($file)\n {\n return self::_file_force_download($file);\n }", "public function getFile();", "public function getFile();", "public function getFile();", "public function getFile();", "public function getFile();", "public function getFile();", "public function getFile();", "public function getFile();", "public function fetch() {\r\n\t\t$now = time();\r\n\t\tif (is_readable(FileManager::$storedir.$this->module->getName().DIRECTORY_SEPARATOR.$this->module->getInstanceId().DIRECTORY_SEPARATOR.$this->fileId)) {\r\n\t\t\tCore::getDatabaseConnection()->query('UPDATE `file` SET `touched` = $touched, `downloads` = `downloads`+1 WHERE `id` = $file AND `moduleInstance` = $instanceId', array(\r\n\t\t\t\t\t'touched' => $now,\r\n\t\t\t\t\t'file' => $this->fileId,\r\n\t\t\t\t\t'instanceId' => $this->module->getInstanceId(),\r\n\t\t\t));\r\n\t\t\t$this->filedata['touched'] = $now;\r\n\t\t\t$this->filedata['downloads']++;\r\n\t\t\treturn file_get_contents(FileManager::$storedir.$this->module->getName().DIRECTORY_SEPARATOR.$this->module->getInstanceId().DIRECTORY_SEPARATOR.$this->fileId);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getFile()\n {\n return \\Jazzee\\Globals::getFileStore()->getFileContents($this->fileHash);\n }", "function serge_auto_version($file){\n\tif ($file[0] != \"/\"){$file = \"/\" . $file;}\n\t$file_url = get_template_directory_uri() . $file;\n\t$file_path = get_template_directory() . $file;\n\n\tif ( !file_exists($file_path)){\n\t\techo \"<!-- file: '$file_path' does not exist -->\";\n\t\treturn $file_url;\n\t}\n\t$mtime = filemtime($file_path);\n\treturn $file_url . \"?t=\" . $mtime;\n}", "public function grabFile() {\n\t\t$fs = $this->getFilestore();\n\t\treturn $fs->grabFile($this);\n\t}", "public function getCurrentFile() {}", "public function get_file() {\n\t\t$file = '';\n\t\tif ( @file_exists( $this->get_file_path() ) ) { // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t\t$file = @file_get_contents( $this->get_file_path() ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents, WordPress.WP.AlternativeFunctions.file_system_read_file_get_contents\n\t\t} else {\n\t\t\t@file_put_contents( $this->get_file_path(), '' ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_file_put_contents, Generic.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents\n\t\t\t@chmod( $this->get_file_path(), 0664 ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.chmod_chmod, WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents, Generic.PHP.NoSilencedErrors.Discouraged\n\t\t}\n\t\treturn $file;\n\t}", "static function get($file, $length = FILE_SIZE_FULL) {\n \tself::__checkFile($file);\n \t\n $handle = fopen($file, (FILE_SIZE_FULL == $length ? filesize($file) : $length));\n return fread ($handle, $length);\n }", "function x25_file_ver($fn)\n{\n\n\tif(!is_file($fn.\".ver\"))\n\t\tfile_put_contents($fn.\".ver\", \"1 \".filemtime($fn));\n\t$c=explode(\" \",file_get_contents($fn.\".ver\"));\n\t\n\t$curver=file_get_contents($fn.\".ver\");\n\t$curver=explode(\" \",$curver);\n\t$curver=$curver;\n\tif(filemtime($fn)!=$curver[1])\n\t{\n\t\tfile_put_contents($fn.\".ver\", (++$curver[0]).\" \".filemtime($fn));\n\t}\n\telse \n\t{\n\t\treturn \"0.0.\".$curver[0];\n\t}\n\treturn \"0.0.\".$curver[0]++;\n}", "private function versionFile ( string $src ) {\n\t\treturn filemtime( JWA_CAR_PLUGIN_DIR . $src );\n\t}", "public static function store($filename) {\n\t\tif (\\OCP\\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {\n\n\t\t\t// if the file gets streamed we need to remove the .part extension\n\t\t\t// to get the right target\n\t\t\t$ext = \\pathinfo($filename, PATHINFO_EXTENSION);\n\t\t\tif ($ext === 'part') {\n\t\t\t\t$filename = \\substr($filename, 0, \\strlen($filename) - 5);\n\t\t\t}\n\n\t\t\t// we only handle existing files\n\t\t\tif (! Filesystem::file_exists($filename) || Filesystem::is_dir($filename)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlist($uid, $filename) = self::getUidAndFilename($filename);\n\t\t\t/** @var \\OCP\\Files\\Storage\\IStorage $storage */\n\t\t\tlist($storage, $internalPath) = Filesystem::resolvePath($filename);\n\t\t\tif ($storage->instanceOfStorage(IVersionedStorage::class)) {\n\t\t\t\t/** @var IVersionedStorage $storage */\n\t\t\t\tif ($storage->saveVersion($internalPath)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// fallback implementation below - need to go into class Common\n\t\t\t$files_view = new View('/'.$uid .'/files');\n\t\t\t$users_view = new View('/'.$uid);\n\n\t\t\t// no use making versions for empty files\n\t\t\tif ($files_view->filesize($filename) === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// create all parent folders\n\t\t\tself::createMissingDirectories($filename, $users_view);\n\n\t\t\tself::scheduleExpire($uid, $filename);\n\n\t\t\t$filename = \\ltrim($filename, '/');\n\n\t\t\t// store a new version of a file\n\t\t\t$mtime = $users_view->filemtime('files/' . $filename);\n\t\t\t$users_view->copy('files/' . $filename, 'files_versions/' . $filename . '.v' . $mtime);\n\t\t\t// call getFileInfo to enforce a file cache entry for the new version\n\t\t\t$users_view->getFileInfo('files_versions/' . $filename . '.v' . $mtime);\n\t\t}\n\t}", "protected function getFileH() {\n\t\ttry {\n\t\t\tif (is_resource($this->fileH)) {\n\t\t\t\treturn $this->fileH;\n\t\t\t}\n\t\t\treturn $this->fileH = fopen($this->getFilePath(), \"r\");\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function get(string $filename): FileInterface;", "public static function get() {\n\n if(!file_exists(self::$file)) {\n self::change();\n }\n return file_get_contents(self::$file);\n }", "function version() {\n $file = storage_path() . '/app/__version__';\n\n // The file should exist, so we shouldn't have to run any external commands.\n // If the file exists then we just return the contents of the file.\n\n if (file_exists($file))\n {\n return trim(file_get_contents($file));\n }\n\n // If the file does not exist, we should just return 0. It won't hurt to not\n // have anything in __version__ but it would help with caching problems to\n // have a __version__. Our gulpfile generates this file.\n\n return \"0\";\n}", "function auto_version($filename, $path){\n $config = get_config();\n $base_dir = getcwd().$config['static_resource_path'];\n return filemtime($base_dir.$path.$filename);\n}", "function get_file_contents_1($filename) {\n if (!function_exists('file_get_contents'))\n {\n $fhandle = fopen($filename, \"w+\");\n $fcontents = fread($fhandle, filesize($filename));\n fclose($fhandle);\n }\n else\n {\n $fcontents = file_get_contents($filename);\n }\n return $fcontents;\n}", "protected function getOversizedFile()\n {\n if(Kernel::VERSION_ID < 40400) {\n return new UploadedFile(\n $this->createTempFile(512),\n 'cat.ok',\n 'text/plain',\n 512\n );\n }\n\n return new UploadedFile(\n $this->createTempFile(512),\n 'cat.ok',\n 'text/plain'\n );\n }", "public function get($file)\n\t{\n\t\treturn $this->_dir . self::LIVE . DIRECTORY_SEPARATOR . $file;\n\t}", "public function getStoredFile($filename){\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n $safeName = md5($filename);\n $path = $this->getVarPath() . '/tmp/' . $safeName . '.' . $ext;\n $session = new \\Foundation\\Session();\n $store = $session->getStore('files');\n if(is_readable($path) and isset($store->$safeName) and $store->$safeName == $filename) \n return new \\Foundation\\Virtual\\RealFile($filename, $path);\n return false;\n }", "function auto_version($file)\n{\n if(strpos($file, '/') !== 0 || !file_exists($_SERVER['DOCUMENT_ROOT'] . $file))\n return $file;\n\n $mtime = filemtime($_SERVER['DOCUMENT_ROOT'] . $file);\n return preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\", $file);\n}", "function auto_version($file)\n{\n if(strpos($file, '/') !== 0 || !file_exists($_SERVER['DOCUMENT_ROOT'] . $file))\n return $file;\n\n $mtime = filemtime($_SERVER['DOCUMENT_ROOT'] . $file);\n return preg_replace('{\\\\.([^./]+)$}', \".$mtime.\\$1\", $file);\n}", "public static function getVersion()\n {\n return FILE_THERION_VERSION;\n }", "protected function _getFile()\n {\n if (is_null($this->_file)) {\n $filename = $this->_getFilename();\n if ($this->_getStorage() == 'original') {\n $this->_file = get_db()->getTable('File')->findBySql('filename = ?', array($filename), true);\n }\n // Get a derivative: this is functional only because filenames are\n // hashed.\n else {\n $originalFilename = substr($filename, 0, strlen($filename) - strlen(File::DERIVATIVE_EXT) - 1);\n $this->_file = get_db()->getTable('File')->findBySql('filename LIKE ?', array($originalFilename . '%'), true);\n }\n\n // Check rights: if the file belongs to a public item.\n if (empty($this->_file)) {\n $this->_file = false;\n }\n else {\n $item = $this->_file->getItem();\n if (empty($item)) {\n $this->_file = false;\n }\n }\n }\n\n return $this->_file;\n }", "function file($path, $return = FALSE){\n\t\t\treturn $this->_fury_load(array('_fury_path' => $path, '_fury_return' => $return));\n\t\t}", "function v6_FileContents($the_file)\n{\n $filename = __WEBSITE_ROOT_PATH . DS . 'views' . DS . $the_file;\n $handle = fopen($filename, \"r\");\n $contents = fread($handle, filesize($filename));\n fclose($handle);\n return $contents;\n}", "function load($version)\n {\n $versions = $this->ls();\n\n if (!isset($versions[(int)$version])) return;\n\n $version = $versions[$version];\n $filename = $version['filename'];\n\n return json::decode_file($this->path($filename));\n }", "public static function get_file() {\n return static::$file;\n }", "function get_content($file, $url, $hours = 24)\n{\n\n //vars\n $current_time = time();\n $expire_time = $hours * 60;\n $file_time = filemtime($file);\n\n //decisions, decisions\n if (file_exists($file) && ($current_time - $expire_time < $file_time)) {\n //echo 'returning from cached file';\n return file_get_contents($file);\n } else {\n $content = get_url($url);\n // $content.= '<!-- cached: '.time().'-->';\n file_put_contents($file, $content);\n //echo 'retrieved fresh from '.$url.':: '.$content;\n return $content;\n }\n\n}", "protected function getFileInstance()\r\n {\r\n return $this->fileInstance;\r\n }", "public function downloadVersion( $version = NULL );", "function GetFile($file, $length=0, $offset=0) {\n if(!is_file($file)) return \"\";\n if($length==0 && $offset==0) {\n $data = file_get_contents($file);\n } else {\n if($length==0) $length = 8192;\n $fp = fopen($file, \"rb\");\n fseek($fp, $offset);\n $data = fread($fp, $length);\n fclose($fp);\n }\n return $data;\n}", "function sb_read_file( $filename ) {\n\t\t//\n\t\t// Returns either the contents of the file or NULL on fail.\n\t\t\n\t\tif ( version_compare( phpversion(), '4.3.0' ) == -1 ) {\n\t\t\t$result = NULL;\n\t\t\tif ( file_exists( $filename ) ) {\n\t\t\t\t$fp = @fopen( $filename, 'r' );\n\t\t\t\tif ( $fp ) {\n\t\t\t\t\tflock( $fp, LOCK_SH );\n\t\t\t\t\t$result = fread( $fp, filesize( $filename )*100 );\n\t\t\t\t\tif ( ( strpos( $filename, '.gz' ) !== false ) && ( extension_loaded( 'zlib' ) ) ) {\n\t\t\t\t\t\t$result = gzinflate( substr( $result, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t\tflock( $fp, LOCK_UN );\n\t\t\t\t\tfclose( $fp );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$result=@file_get_contents( $filename );\n\t\t\tif ( ( strpos( $filename, '.gz' ) !== false ) && ( extension_loaded( 'zlib' ) ) ) {\n\t\t\t\t$result = gzinflate( substr( $result, 10 ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn( $result );\n\t}", "public function get(string $filename): string;", "function newVersion($url){\n\tif($last = trim(@file_get_contents($url))) if($last != VERSION) return $last;\n\treturn false;\n}", "function getFile($url, $filename) {\n if (file_exists($filename)) {\n $local = strtotime(date(\"F d Y H:i:s.\", filemtime($filename)));\n $headers = get_headers($url, 1);\n $remote = strtotime($headers[\"Last-Modified\"]);\n \n if ($local < $remote) {\n file_put_contents($filename, file_get_contents($url));\n }\n }\n else {\n $file_contents = file_get_contents($url);\n if ($file_contents)\n file_put_contents($filename, file_get_contents($url));\n } \n}", "public static function get($file) {\n\t\treturn File::get($file);\n\t}", "protected function getFileInstance()\n {\n return $this->fileInstance;\n }", "protected function getFile()\n {\n $hash = setting('favicon')->gain();\n\n if (!$hash) {\n return null;\n }\n\n $file = fileManager()->file($hash)->resolve();\n\n return $file->getUrl() ? $file : null;\n }", "abstract public function getFileInformation($file_path, $read_from_cache=true);", "public function get(string $filename) : string;", "function file_get_contents($name)\n{\n return FileInfoStub::get($name);\n}", "function temporary_file() {\n $file = drupal_tempnam('temporary://', 'backup_migrate_');\n // Add the version without the extension. The tempnam function creates this for us.\n backup_migrate_temp_files_add($file);\n\n if ($this->extension()) {\n $file .= '.'. $this->extension();\n // Add the version with the extension. This is the one we will actually use.\n backup_migrate_temp_files_add($file);\n }\n $this->path = $file;\n }", "protected function _file() {\n\t\treturn $this->file;\n\t}", "public function getLocalFile($path) {\n\t\tif ($this->encryptionManager->isEnabled()) {\n\t\t\t$cachedFile = $this->getCachedFile($path);\n\t\t\tif (is_string($cachedFile)) {\n\t\t\t\treturn $cachedFile;\n\t\t\t}\n\t\t}\n\t\treturn $this->storage->getLocalFile($path);\n\t}", "function getFile($name);", "function _version_check()\n\t{\n\t\t// Attempt to grab the local cached file\n\t\t$cached = $this->_check_version_cache();\n\n\t\t$download_url = $this->cp->masked_url('https://secure.expressionengine.com/download.php');\n\n\t\t$ver = '';\n\t\t\n\t\t// Is the cache current?\n\t\tif ( ! $cached)\n\t\t{\n\t\t\t$details['timestamp'] = time();\n\t\t\t\n\t\t\t$dl_page_url = 'http://expressionengine.com/eeversion2.txt';\n\t\t\t$target = parse_url($dl_page_url);\n\t\t\t\n\t\t\t$fp = @fsockopen($target['host'], 80, $errno, $errstr, 3);\n\t\t\t\n\t\t\tif (is_resource($fp))\n\t\t\t{\n\t\t\t\tfputs ($fp,\"GET \".$dl_page_url.\" HTTP/1.0\\r\\n\" );\n\t\t\t\tfputs ($fp,\"Host: \".$target['host'] . \"\\r\\n\" );\n\t\t\t\tfputs ($fp,\"User-Agent: EE/EllisLab PHP/\\r\\n\");\n\t\t\t\tfputs ($fp,\"If-Modified-Since: Fri, 01 Jan 2004 12:24:04\\r\\n\\r\\n\");\n\t\t\t\t\n\t\t\t\twhile ( ! feof($fp))\n\t\t\t\t{\n\t\t\t\t\t$ver .= trim(fgets($fp, 128));\n\t\t\t\t}\n\n\t\t\t\tfclose($fp);\n\t\t\t\t\n\t\t\t\tif ($ver != '')\n\t\t\t\t{\n\t\t\t\t\t$details['version'] = trim(str_replace('Version:', '', strstr($ver, 'Version:')));\n\t\t\t\t\n\t\t\t\t\tif ($details['version'] != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t// We have the version from ExpressionEngine.com, write a cache file\n\t\t\t\t\t\t$this->_write_version_cache($details);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Something went wrong.\n\t\t\t\t\t\tunset($details['version']);\n\n\t\t\t\t\t\t$details['error'] = TRUE;\n\t\t\t\t\t\t$this->_write_version_cache($details);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$details['error'] = TRUE;\n\t\t\t\t\t$this->_write_version_cache($details);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Something went wrong.\n\t\t\t\t$details['error'] = TRUE;\n\t\t\t\t\n\t\t\t\t$this->_write_version_cache($details);\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$details = $cached;\n\t\t}\n\t\t\n\t\tif (isset($details['version']))\n\t\t{\n\t\t\tif ($details['version'] > APP_VER)\n\t\t\t{\n\t\t\t\treturn sprintf($this->lang->line('new_version_notice'),\n\t\t\t\t\t\t\t $details['version'],\n\t\t\t\t\t\t\t $download_url,\n\t\t\t\t\t\t\t $this->cp->masked_url($this->config->item('doc_url').'installation/update.html'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn sprintf($this->lang->line('new_version_error'),\n\t\t\t\t\t\t\t$download_url);\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "private function updatesFile()\n {\n return $this->filePath('last-update-check.txt');\n }", "function &getFile($fileId, $revision = null) {\n\t\t$monographFileDao =& DAORegistry::getDAO('MonographFileDAO');\n\t\t$monographFile =& $monographFileDao->getMonographFile($fileId, $revision, $this->monographId);\n\t\treturn $monographFile;\n\t}", "public function getTemporaryFile() {}", "public static function autoVersion($file)\r\n\t{\r\n\t\tif(strpos($file, '/') !== 0 || !file_exists($_SERVER['DOCUMENT_ROOT'] . $file))\r\n\t\t\treturn $file;\r\n\r\n\t\t$mtime = @filemtime($_SERVER['DOCUMENT_ROOT'] . $file);\r\n\t\treturn $file . \"?_=\" . $mtime;\r\n\t}", "protected function getAppVersion() {\n\t\tif (self::$_appVersion === FALSE) {\n\t\t\t$path = $this->getAppVersionPath();\n\n\t\t\t// If the file is not present, return null, there is no info.\n\t\t\tif (!file_exists($path)) {\n\t\t\t\tself::$_appVersion = null;\n\t\t\t\treturn self::$_appVersion;\n\t\t\t}\n\n\t\t\t// Get the version (contents of the file)\n\t\t\t$version = file_get_contents($path);\n\n\t\t\t// Get the date it was tagged (modification date of the file)\n\t\t\t$timestamp = filemtime($path);\n\t\t\t$dateTagged = date('j-M-Y H:i:s', $timestamp);\n\n\t\t\tself::$_appVersion = array(\n\t\t\t\t'version' => $version,\n\t\t\t\t'dateTagged' => $dateTagged\n\t\t\t);\n\n\t\t}\n\n\t\treturn self::$_appVersion;\n\t}", "public function getFile($name);", "abstract public function getFile($path);", "protected function getVersion()\n {\n return file_exists($this->path) ? filemtime($this->path) : '';\n }", "public function addVersionOfFile(File $origFile, File $newFile, $version = null)\n {\n if(!$this->containsFile($origFile)){\n return null;\n }\n\n $name = $this->versionFileName($origFile, $version);\n\n $f = new FileImpl($origFile->getParentFolder()->getAbsolutePath().\"/\".$name);\n if($f->exists()){\n return $f;\n }\n\n return $this->addToLibraryHelper($origFile->getParentFolder(),$newFile, $name);\n }", "function openFile($url, $size) {\n\t\tif (file_exists($url)) {\n\t\t$myFile = $url;\n\t\t$fh = fopen($myFile, 'r');\n\t\t$dataToReturn = fread($fh, $size);\n\t\tfclose($fh);\t\n\t\t} else {\n\t\t\tsaveFile($url, \"\");\n\t\t\t$dataToReturn = \"\";\n\t\t}\n\t\treturn $dataToReturn;\n\t\n\t\n\t}", "private function get_original_file()\n\t{\n\t\tif($this->original_file === null)\n\t\t\t$this->original_file = file_get_contents(self::ORIGINAL_FILE);\n\t\t\n\t\treturn $this->original_file;\n\t}", "abstract protected function getFile(): File;", "function _open_file($file){\n\t\tif(($fp = @fopen($file, 'r'))){\n\t\t\t$content = fread($fp, filesize($file));\n\t\t\tfclose($fp);\n\t\t\treturn $content;\n\t\t}\n\t\treturn $this->_debug(5, $file);\n\t}", "function file($path, $return = FALSE)\n\t{\n\t\treturn $this->_load(array('path' => $path, 'return' => $return));\n\t}", "function update_file($file,$repos,$local,$force)\n{\n $file=rawurlencode($file);\n $req=\"$repos?file=$file&type=getDate\";\n $d=http_download($req);\n if($d == false)\n {\n echo \"FAILED: Cannot get date on $file ($repos)\";\n return false;\n }\n \n $ld=@filemtime($local);\n \n if($ld>=$d && !$force && $d!=false && $ld!=false)\n {\n echo \"Local file is the same or newer, aborting. ($repos)\";\n return false;\n }\n $req=\"$repos?file=$file&type=getGzip\";\n $data=http_download($req);\n // we got nothing\n if($data===false)\n {\n echo \"FAILED: Cannot retrieve $file ($repos)\";\n return false;\n }\n\n // if we got an error message\n if(substr($data,0,6)==\"FAILED\")\n {\n // not very safe on a rogue server\n echo $data.\" ($repos)\";\n return false;\n }\n \n echo \"OK ($repos)\";\n \n // let's update the file with data\n $data=gzdecode($data);\n $fp=@fopen($local,\"wb\");\n if(!$fp) die(\"FAILED: Cannot create output file '$path$file', aborting.\");\n fwrite($fp,$data);\n fclose($fp);\n return true;\n}", "protected function _getVersionData()\n {\n if (empty($this->_data)) {\n $filename = $this->_app->getWebrootDir().SELF::VERSION_FILENAME;\n $contents = file_get_contents($filename);\n $contents = json_decode($contents, true);\n if (!$contents) {\n return $this->$NEW;\n }\n $this->_data = $contents;\n }\n return $this->_data;\n }", "public function getFile()\r\r\n\t{\r\r\n\t\treturn $this->file;\r\r\n\t}", "public function get($fileName);", "function _dshedd_get_cache_version( $filename ) {\n\n\t$found = false;\n\t$cache_version = null;\n\n\tif ( defined('WP_DEBUG') && WP_DEBUG && !defined( 'ALWAYS_CACHE' ) ) {\n\t\t// always bust cache when WP_DEBUG is turned on \n\t\t$cache_version = wp_cache_get( 'cache_version', 'dshedd', false, $found );\n\n\t\tif( false === $found ) {\n\t\t\t$cache_version = bin2hex(random_bytes(4));\n\t\t\twp_cache_set( 'cache_version', $cache_version, 'dshedd' );\n\t\t}\n\n\t} else {\n\t\t$asset_manifest = wp_cache_get( 'asset_cache_manifest', 'dshedd', false, $found );\n\n\t\tif( false === $found ) {\n\n\t\t\t$asset_manifest = file_get_contents( get_template_directory() . '/asset_cache_manifest.json' );\n\n\t\t\tif ( false === $asset_manifest ) {\n\t\t\t\terror_log('warning: cache version is missing. run gulp to regenerate it.');\n\n\t\t\t\t// null will make sure WP \n\t\t\t\t// appends no cache version\n\t\t\t\t$cache_version = null;\n\t\t\t}\n\n\t\t\t// cache the asset manifest for this page load\n\t\t\twp_cache_set( 'asset_cache_manifest', $asset_manifest, 'dshedd' );\n\n\t\t}\n\n\t\t$asset_manifest_json = json_decode( $asset_manifest );\n\n\t\tif( !empty( $asset_manifest_json->$filename ) )\n\t\t\t$cache_version = $asset_manifest_json->$filename;\n\t}\n\n\treturn $cache_version;\n}", "function getFile() {\r\n\t\treturn $this->_file;\r\n\t}", "function getLiveHash(){\n global $lockfile;\n $hash=file_get_contents($lockfile);\n if($hash){\n return $hash;\n } else {\n return null;\n }\n}", "public function getStoredVersion();", "public function getFile() {\n\t\treturn $this->file;\n\t}", "public function getFile() {\n\t\treturn $this->file;\n\t}", "public function fetch($file);", "public function exportFile() {\n if (!$this->isFile()) {\n return NULL;\n }\n $filename = basename($file_item['path']);\n $destination = file_directory_temp() .'/versioncontrol-'. mt_rand() .'-'. $filename;\n if ($this instanceof VersioncontrolItemExportFile) {\n $success = $this->_exportFile($destination);\n }\n else {\n return NULL;\n }\n if ($success) {\n return $destination;\n }\n @unlink($destination);\n return NULL;\n }", "function file_cache_get() {\n backup_migrate_include('files');\n $cache = cache_get('backup_migrate_file_list:'. $this->get_id());\n if (!empty($cache->data) && $cache->created > (time() - $this->cache_expire)) {\n $this->fetch_time = $cache->created;\n return $cache->data;\n }\n $this->fetch_time = 0;\n return NULL;\n }", "public function getTimestampedFile()\n {\n $objOut = $this->getOutputFile();\n $mTime = 0;\n\n if ($objOut->exists())\n {\n $mTime = intval($objOut->getMTime());\n }\n\n return \\Disk\\File::getFromStorage($objOut->getBasename(FALSE) . '_' . $mTime . '.' . $objOut->getExtension());\n }" ]
[ "0.69453984", "0.6709108", "0.6580733", "0.6367437", "0.61993676", "0.61993676", "0.61888117", "0.615342", "0.6105794", "0.60921305", "0.60600907", "0.6008926", "0.59862363", "0.5942278", "0.5942278", "0.5903488", "0.5876944", "0.58318955", "0.5825823", "0.5825823", "0.5825823", "0.5825823", "0.5825823", "0.5825823", "0.5825823", "0.5825823", "0.5824379", "0.582388", "0.57908034", "0.5789636", "0.575902", "0.5758958", "0.5724785", "0.5717223", "0.57142264", "0.57098454", "0.57086605", "0.56931263", "0.56790566", "0.56782305", "0.5676997", "0.5663379", "0.56511307", "0.56506014", "0.5622244", "0.5619265", "0.5619265", "0.5591297", "0.5586084", "0.5579631", "0.5561663", "0.5558148", "0.5554315", "0.5551063", "0.5505251", "0.5499805", "0.54977447", "0.5497113", "0.5495638", "0.54954326", "0.5494694", "0.54897696", "0.5487229", "0.54762983", "0.5474382", "0.54739624", "0.547181", "0.54654014", "0.54548156", "0.5454741", "0.5454414", "0.54475605", "0.544704", "0.54449564", "0.5444407", "0.54431635", "0.5436104", "0.5431171", "0.54269433", "0.54235405", "0.54194134", "0.54185796", "0.54148304", "0.54096216", "0.5401135", "0.53893554", "0.5387744", "0.53790516", "0.5373838", "0.5370817", "0.53601384", "0.53461546", "0.5341307", "0.5327993", "0.53249997", "0.53249997", "0.5318781", "0.5317664", "0.5316246", "0.53155726" ]
0.766122
0
Deletes a version of a file
Удаляет версию файла
public function deleteVersion(File $file, $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function deleteVersionFile() : bool\n {\n return Storage::delete(static::NEW_VERSION_FILE);\n }", "public function deleteVersionFile(): bool\n {\n return Storage::delete($this->versionFile);\n }", "public static function delete($path) {\n\t\t$deletedFile = self::$deletedFiles[$path];\n\t\t$uid = $deletedFile['uid'];\n\t\t$filename = $deletedFile['filename'];\n\n\t\tif (!Filesystem::file_exists($path)) {\n\t\t\t$view = new View('/' . $uid . '/files_versions');\n\n\t\t\t$versions = self::getVersions($uid, $filename);\n\t\t\tif (!empty($versions)) {\n\t\t\t\tforeach ($versions as $v) {\n\t\t\t\t\t\\OC_Hook::emit('\\OCP\\Versions', 'preDelete', ['path' => $path . $v['version'], 'trigger' => self::DELETE_TRIGGER_MASTER_REMOVED]);\n\t\t\t\t\tself::deleteVersion($view, $filename . '.v' . $v['version']);\n\t\t\t\t\t\\OC_Hook::emit('\\OCP\\Versions', 'delete', ['path' => $path . $v['version'], 'trigger' => self::DELETE_TRIGGER_MASTER_REMOVED]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset(self::$deletedFiles[$path]);\n\t}", "public function deleteFile($fileName);", "public function deleteFile($fileName);", "function deleteVersion($logVersion, $version){\n\t$myfile = fopen($logVersion, \"r\");\n\t$contents = fread($myfile, filesize($logVersion));\n\tfclose($myfile);\n\t$versionArr = json_decode($contents);\n\t$tempArr = array();\n\t\n\tforeach($versionArr as $versionData){\n\t\t$versionData = (array)$versionData;\n\t\tif($versionData[\"version\"] != $version){\n\t\t\tarray_push($tempArr, $versionData);\n\t\t}\n\t\telse{\n\t\t\tunlink($versionData[\"location\"]) or die (\"\\n file does not exist \\n\");\n\t\t}\n\t}\n\t$myfile = fopen($logVersion, \"w\");\n\tfwrite($myfile, json_encode($tempArr));\n\tfclose($myfile);\n\tprint(\"$version has been deleted \\n\");\n\tprint(\"Tar of $version has been deleted \\n\");\n\t\n}", "public function delete($file=''){\n\t\tif($file!=\"\"){ $this->source = $file;}\n\t\tunlink($this->source);\n\t}", "public function deleteFile($fileName, $version){\n\t\t$filesDeleted = 0;\n\t\tif( $version==='' ){\n\t\t\tforeach( $this->getAllVersions($fileName) as $version => $timestamp ){\n\t\t\t\t$filesDeleted += $this->deleteFile($fileName, $version);\n\t\t\t}\n\t\t}else{\n\t\t\t$filePath = $this->getFilePath($fileName, $version);\n\t\t\tif( file_exists($filePath) ){\n\t\t\t\tunlink($filePath);\n\t\t\t\t$filesDeleted++;\n\t\t\t}\n\t\t}\n\t\treturn $filesDeleted;\n\t}", "public function delete(File $file) {\n\t\t//@TODO implement, check for existing references pointing to file first\n\t}", "protected static function deleteVersion($view, $path) {\n\t\t$view->unlink($path);\n\t\t/**\n\t\t * @var \\OC\\Files\\Storage\\Storage $storage\n\t\t * @var string $internalPath\n\t\t */\n\t\tlist($storage, $internalPath) = $view->resolvePath($path);\n\t\t$cache = $storage->getCache($internalPath);\n\t\t$cache->remove($internalPath);\n\t}", "public function DeleteUpdate() {\n $this->fileService->fileRemove();\n }", "function delete_file($filename){\n\n\t\tif($this->file_found($filename)){\n\t\t\tunlink($filename);\n\t\t}\n\n\t}", "public function delete_file() {\n\t\t$mainframe =& JFactory::getApplication();\n\t\t$filesModel =& $this->getModel ( 'files' );\n\t\t\n\t\t$file_id = JRequest::getVar('file_id');\n\t\t\n\t\t$result = $filesModel->deleteFile($file_id);\n\t\techo $result;\n\t\t\n\t\t$mainframe->close();\n\t}", "public function deleteFile() {\n\n\t\tif(isset($_POST['hash'])) {\n\t\t\t$this->removeFile($_POST['hash']);\n\t\t} else {\n\t\t\t$this->setResponseData('true', 'Invalid file.');\n\t\t}\n\n\t\treturn;\n\t}", "function file_delete($file_path){\n $this->clear_error();\n unlink($file_path) ? $this->return_result(true) : $this->trigger_error();\n }", "public function unlink(string $filename): void;", "#[ORM\\PostRemove]\n public function deleteFile(): void\n {\n $path = $this->getPath();\n global $container;\n $config = $container->get('config');\n $unlink = $config['files']['unlink'];\n\n if (file_exists($path) && is_file($path)) {\n if ($this->getFilename() !== 'dw4jV3zYSPsqE2CB8BcP8ABD0.jpg' && $unlink) {\n unlink($path);\n }\n }\n }", "function delete($path);", "public function del_file($file)\r\n\t{\r\n\t\tif(!@unlink($file))\r\n\t\t\t$this->report_error('Die Datei $file konnte nicht geloescht werden');\r\n\t}", "function delete_file($file_id) {\n $this->file_cache_clear();\n $this->_delete_file($file_id);\n }", "public static function delete_file($file)\n\t{\n\t\t// Select file to get file name.\n\t\t$file_name = DB::query('\n\t\t\t\t\t\tSELECT * FROM files\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\tid = :file\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t')\n\t\t\t\t\t->params(array(\n\t\t\t\t\t\t':file' => $file\n\t\t\t\t\t))\n\t\t\t\t\t->first();\n\t\t// Delete file using file id.\n\t\t$file = DB::query('\n\t\t\t\t\tDELETE FROM files\n\t\t\t\t\tWHERE\n\t\t\t\t\tid = :file\n\t\t\t\t\tLIMIT 1\n\t\t\t\t')\n\t\t\t\t->params(array(\n\t\t\t\t\t':file' => $file\n\t\t\t\t))\n\t\t\t\t->execute();\n\n\t\t// Get document root to find where to delete files from.\n\t\t$root = $_SERVER['DOCUMENT_ROOT'];\n\n\t\t// Delete file using $file_name->file_name.\n\t\tunlink($root.'/storage/'.Authenticate::user('user_id').'/'.$file_name->file_name);\n\t}", "public function delete(File $file)\n {\n // TODO: Implement delete() method.\n }", "public static function deleteFile($file_name)\r\n\t{\r\n\t\t$fh = fopen($file_name, 'w') or die(\"can't open file\");\r\n\t\tfclose($fh);\r\n\t\tunlink($file_name);\r\n\t}", "function deleteFile( $path ) {\n\t\t$fullPath = public_path() . '/' . $path;\n\t\tif ( File::exists( $fullPath ) ) {\n\t\t\t// File exists\n\t\t\tFile::delete( $fullPath );\n\t\t\n\t}\n}", "private function deleteFile() {\n $this->model_setting_setting->editSetting('pos', array('pos_user_group_id'=> 1, 'pos_status' => 0));\n\n //rename(DIR_APPLICATION.'../admin/controller/pos/pos.php',DIR_APPLICATION.'../admin/controller/pos/pos.php_'); \n rename(DIR_APPLICATION . '../vqmod/xml/pos.xml',DIR_APPLICATION . '../vqmod/xml/pos.xml_');\n \n $path = dirname(DIR_APPLICATION);\n rename($path . '/pos',$path . '/pos_');\n //unlink(DIR_APPLICATION . '../vqmod/xml/pos.xml');\n\t}", "public function deleteFile()\r\n\t{\r\n\t\t$this->validateSession();\r\n\t\t$this->validateUsuario();\r\n\t\t$oldname=$this->input->post('oldname');\r\n\t\tif (isset($oldname)) {\r\n\t\t\tif(unlink(utf8_decode($oldname))){\r\n\t\t\t\techo 'eliminado con exito';\r\n\t\t\t} else{\r\n\t\t\t\techo 'fallo al eliminar';\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tredirect('');\r\n\t\t}\r\n\t}", "public function delete()\n {\n parent::delete();\n\n $inspirationFile = $this->getInspirationFilePath();\n if (file_exists($inspirationFile)) {\n unlink($inspirationFile);\n }\n }", "private function deleteVersion($image,$version)\r\n\t{\r\n\t\tif(isset($this->versions[$version]))\r\n\t\t{\r\n\t\t\t$filepath=$this->resolveImageVersionPath($image,$version);\r\n\r\n\t\t\tif(file_exists($filepath)!==false && unlink($filepath)===false)\r\n\t\t\t\tthrow new ImgException(Img::t('error', 'Failed to delete the image version! File could not be deleted.'));\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new ImgException(Img::t('error', 'Failed to delete image version! Version is unknown.'));\r\n\t}", "public function deleteFiles();", "public function deleteFiles();", "public function delete($path);", "public function unlink();", "function deleteFile($path)\n\t{\n\t\tunlink(\"$path\");\n\n\t}", "public function deleteFile($path) {\n\t\t@unlink($this->root.$path);\n\t}", "function deleteFile(){\n //code...\n }", "public function deleteRevision();", "private function clean()\r\n\t{\r\n\t\r\n\t\t//get original info\r\n\t\t$path = dirname(self::$serverPath.$this->file);\r\n\t\t$file = basename($this->unaltered, self::BASE_EXTENSION);\r\n\t\t\r\n\t\t//build regular expressions based on what has been done to the file\r\n\t\t$regex = \"=\" . preg_replace(\"/\\./\",\"\\.\", $file . \".v\") . \".*\";\t\t\r\n\t\t$file .= \".v\" . $this->version;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$regex .= self::BASE_EXTENSION . '=';\r\n\t\t$file .= self::BASE_EXTENSION;\r\n\t\t\r\n\t\t\r\n\t\t//iterate through the directory and search for possible matches to remove.\r\n\t\tforeach( new DirectoryIterator( $path ) as $f )\r\n\t\t{\r\n\t\t\t$fileDir = $f->getPath();\r\n\t\t\t$fileName = $f->getFilename();\t\t\t\r\n\t\t\tif( $f->isFile() ) \t\t\t\r\n\t\t\t{\r\n\t\t\t\t//check to see if the file is versioned and should be removed\r\n\t\t\t\tif(preg_match($regex,$fileDir.\"/\".$fileName) > 0 && $fileDir.\"/\".$fileName != $file && preg_match(\"/\".$this->version.\"/\", $fileName) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//remove any file that matches\r\n\t\t\t\t\t@unlink($fileDir . \"/\" . $fileName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}", "function entity_metadata_delete_file($fid) {\n file_delete(file_load($fid), TRUE);\n}", "function _delete_file($file_id) {\n // This must be overriden.\n }", "private function deleteFile()\n {\n foreach ($this->getFilesystems() as $fileSystem)\n {\n $this->deleteFilesystemFile($fileSystem);\n }\n }", "public function deleted(File $file)\n {\n Storage::delete($file->path);\n }", "function _unl_fourone_delete_file($filename) {\n $path = variable_get('unl_custom_code_path', 'public://custom') . '/' . $filename;\n if (file_exists($path)) {\n return file_unmanaged_delete($path);\n }\n return FALSE;\n}", "public function actionDeleteFile()\n {\n ['key' => $key, 'dir' => $dir, 'fileName' => $fileName] = Yii::$app->request->post();\n\n $path = Url::to('@storage/') . $dir . '/' . $key . '/' . $fileName;\n if (file_exists($path) && unlink($path)) {\n return true;\n }\n return false;\n }", "public function deleteUploadedFile() {\n // delete file if exists\n if (file_exists(\"../uploaded_resources/\" . $this->filename)) {\n unlink(\"../uploaded_resources/\" . $this->filename);\n }\n }", "public function delete() {\n $this->storage_file->delete();\n }", "public function deleted(Version $version)\n {\n //\n }", "public function deleteVersionAction()\n {\n $version = $this->_initPageVersion();\n if ($version && $version->getId()) {\n try {\n $version->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n $this->__('The version has been deleted.')\n );\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n }\n } else {\n Mage::getSingleton('adminhtml/session')->addError(\n $this->__('Unable to find a version to delete.')\n );\n }\n\n $this->_redirect('*/*/');\n }", "function delete_file($file)\n\t{\n\t\tif (file_exists($file))\n\t\t{\n\t\t\t$delete = chmod ($file, 0777);\n\t\t\t$delete = unlink($file);\n\t\t\tif(file_exists($file))\n\t\t\t{\n\t\t\t\t$filesys = eregi_replace(\"/\",\"\\\\\",$file);\n\t\t\t\t$delete = system(\"del $filesys\");\n\t\t\t\tclearstatcache();\n\t\t\t\tif(file_exists($file))\n\t\t\t\t{\n\t\t\t\t\t$delete = chmod ($file, 0777);\n\t\t\t\t\t$delete = unlink($file);\n\t\t\t\t\t$delete = system(\"del $filesys\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearstatcache();\n\t\t\tif(file_exists($file))\n\t\t\t{\n\t\t\t\treturn 'Delete Faile : <font color=\\'#ff0000\\'>'.$file.'</font><br>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 'Delete Successs : <font color=\\'#6699cc\\'>'.$file.'</font><br>';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'Delete Successs : <font color=\\'#6699cc\\'>'.$file.'</font><br>';\n\t\t}\n\t}", "protected function deleteFile($file)\n {\n if (is_file($file)) {\n Storage::delete($file);\n unlink(storage_path('app/public/' . $file));\n }\n }", "private function delete ()\n\t{\n\t\ttry\n\t\t{\n\t\t\t//----------------------\n\t\t\t// Is it a duplicate?\n\t\t\t//----------------------\n\n\t\t\t$_file_processor_obj = $this->Registry->loader( \"Data_Processors__File\" );\n\t\t\tif ( ( $_file_info = $_file_processor_obj->file__info__do_get( $this->running_subroutine['request']['f_id'] ) ) == FALSE )\n\t\t\t{\n\t\t\t\tthrow new Exception( \"Delete failed! File does not exist...\" );\n\t\t\t}\n\n\t\t\t# Original file\n\t\t\tif\n\t\t\t(\n\t\t\t\tfile_exists( $_file_info['_f_location'] )\n\t\t\t\tand\n\t\t\t\t(\n\t\t\t\t\t! is_file( $_file_info['_f_location'] )\n\t\t\t\t\tor\n\t\t\t\t\t! is_writable( $_file_info['_f_location'] )\n\t\t\t\t)\n\t\t\t)\n\t\t\t{\n\t\t\t\tthrow new Exception( \"Delete failed! Check file permissions for: <i>\" . $_file_info['_f_location'] . \"</i> and/or its variations!\" );\n\t\t\t}\n\n\t\t\t# IMAGES - Variations\n\t\t\tif ( $_file_info['_f_type'] == 'image' )\n\t\t\t{\n\t\t\t\t# _M\n\t\t\t\tif ( $_file_info['_f_thumbs_medium'] )\n\t\t\t\t{\n\t\t\t\t\tif ( ! is_writable( $_path_to_delete = $this->Registry->Input->file__filename__attach_suffix( $_file_info['_f_location'] , \"_M\" ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception( \"Delete failed! Check file permissions for: <i>\" . $_path_to_delete . \"</i>!\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t# _S\n\t\t\t\tif ( $_file_info['_f_thumbs_small'] )\n\t\t\t\t{\n\t\t\t\t\tif ( ! is_writable( $_path_to_delete = $this->Registry->Input->file__filename__attach_suffix( $_file_info['_f_location'] , \"_S\" ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception( \"Delete failed! Check file permissions for: <i>\" . $_path_to_delete . \"</i>!\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t# _W\n\t\t\t\tif ( $_file_info['_f_wtrmrk'] )\n\t\t\t\t{\n\t\t\t\t\tif ( ! is_writable( $_path_to_delete = $this->Registry->Input->file__filename__attach_suffix( $_file_info['_f_location'] , \"_W\" ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception( \"Delete failed! Check file permissions for: <i>\" . $_path_to_delete . \"</i>!\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//--------------------\n\t\t\t// Actual deletion\n\t\t\t//--------------------\n\n\t\t\t@unlink( $_file_info['_f_location'] );\n\t\t\t@unlink( $this->Registry->Input->file__filename__attach_suffix( $_file_info['_f_location'] , \"_M\" ) );\n\t\t\t@unlink( $this->Registry->Input->file__filename__attach_suffix( $_file_info['_f_location'] , \"_S\" ) );\n\t\t\t@unlink( $this->Registry->Input->file__filename__attach_suffix( $_file_info['_f_location'] , \"_W\" ) );\n\n\t\t\t$this->Registry->logger__do_log( \"Modules - Static - delete() : Successfully deleted file [hash: \" . $_file_info['f_hash']. \"]\" , \"INFO\" );\n\n\t\t\t//----------------\n\t\t\t// Db cleanup\n\t\t\t//----------------\n\n\t\t\t$this->Registry->Db->cur_query = array(\n\t\t\t\t\t'do' => \"delete\",\n\t\t\t\t\t'table' => \"media_library\",\n\t\t\t\t\t'where' => \"f_id=\" . $this->Registry->Db->db->quote( $_file_info['f_id'] , \"INTEGER\" ),\n\t\t\t\t);\n\t\t\tif ( ! $this->Registry->Db->simple_exec_query() )\n\t\t\t{\n\t\t\t\tthrow new Exception( \"Delete failed! Couldn't remove Db-record...\" );\n\t\t\t}\n\n\t\t\t//-----------------\n\t\t\t// Cache cleanup\n\t\t\t//-----------------\n\n\t\t\t$this->Registry->Cache->cache__do_remove( \"fileinfo_\" . $_file_info['f_id'] );\n\t\t\t$this->Registry->Cache->cache__do_remove( \"fileinfo_\" . $_file_info['f_hash'] );\n\t\t\t$this->Registry->Cache->cache__do_recache( \"total_nr_of_attachments\" );\n\n\t\t\t//-----------------------\n\t\t\t// Still here? Good...\n\t\t\t//-----------------------\n\n\t\t\treturn array( 'responseCode' => 1, 'responseMessage' => \"Delete successful! Refreshing in 2 seconds...\" );\n\t\t}\n\t\tcatch ( Exception $e )\n\t\t{\n\t\t\t$this->Registry->logger__do_log( \"Modules - Static - delete() : \" . $e->getMessage() , \"ERROR\" );\n\t\t\treturn array( 'faultCode' => 0, 'faultMessage' => $e->getMessage() );\n\t\t}\n\t}", "private function deleteOldFile()\n {\n $row = DB::select('SELECT fname FROM video\n WHERE id_candidate = ?\n limit 1;', [session('user_id')]);\n\n\n if (isset($row[0]->fname)) {\n\n // del local\n Storage::delete('public/video/' . $row[0]->fname);\n\n //del on ftp\n //$this->deleteFileFromFtp($row[0]->fname);\n }\n }", "public function delete()\n\t{\n\t\tforeach ($this->iterator as $file)\n\t\t{\n \t\t\tunlink($file->getPathname());\n\t\t}\n\t}", "public function deleteFile(){\n $sql = $this->db->query(\"\n SELECT\n `id`,\n `name`,\n `extension`,\n `path`,\n `relative_id`,\n `relative_table`,\n `form_item`\n FROM\n `files`\n WHERE\n `id` = \".intval($_GET['file_id']).\"\n \");\n\n $f = mysql_fetch_assoc($sql);\n $file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $this->db->query(\"DELETE FROM `files` WHERE `id` = '\".$f['id'].\"'\");\n\n $this->db->query(\"\n UPDATE\n `\".DB::quote($f['relative_table']).\"`\n SET\n `\".DB::quote($f['form_item']).\"` = `\".DB::quote($f['form_item']).\"` - 1\n WHERE\n `id` = \".intval($f['relative_id']).\"\n \");\n }", "public function deleteRecord($fileName);", "public function unpublishVersion(File $file, $version, VersionProvider $versionProvider);", "public function unpublishVersion(File $file, $version, VersionProvider $versionProvider);", "public function destroy() {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "function smartdeletefile() {\n\t\tglobal $bhconfig;\n\n\t\tif ($bhconfig['usetrash'] == 0) { $this->deletefile(); }\n\t\telse { $this->safedeletefile(); }\n\n\t}", "public function destoryFile($file){\n\t\treturn Storage::delete(\"$file\");\n\t}", "public function deleted(File.php] $file.php])\n {\n //\n }", "public static function deleteFile($file)\n {\n return \\File::delete(public_path() . '/uploads/land_pages/files/' . $file);\n }", "public function safeDelete(OZFile $file)\n\t{\n\t\tif ($file->getId() || $file->getClone()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$path = $file->getPath();\n\n\t\tif ($path && \\file_exists($path)) {\n\t\t\t\\unlink($path);\n\t\t}\n\n\t\t$thumb = $file->getThumb();\n\n\t\tif ($thumb && \\file_exists($thumb)) {\n\t\t\t\\unlink($thumb);\n\t\t}\n\t}", "function cancelDeleteFile()\n\t{\n\t\t$this->ctrl->redirect($this, \"versions\");\n\t}", "function deleteMonographFile($args) {\n\t\t$monographId = isset($args[0]) ? (int) $args[0] : 0;\n\t\t$fileId = isset($args[1]) ? (int) $args[1] : 0;\n\t\t$revisionId = isset($args[2]) ? (int) $args[2] : 0;\n\n\t\t$this->validate($monographId, SERIES_EDITOR_ACCESS_REVIEW);\n\t\t$submission =& $this->submission;\n\t\tSeriesEditorAction::deleteMonographFile($submission, $fileId, $revisionId);\n\n\t\tRequest::redirect(null, null, 'submissionReview', $monographId);\n\t}", "public function deleteFile($file)\n {\n $result = $this->client->deleteObject(array('Bucket' => $this->bucket, 'Key' => $file));\n return $result;\n }", "function dos_storage_delete ($file) {\n\n try {\n\n if (get_option('dos_debug') == 1) {\n $log = new Katzgrau\\KLogger\\Logger(plugin_dir_path(__FILE__) . '/logs', Psr\\Log\\LogLevel::DEBUG,\n array('prefix' => __FUNCTION__ . '_', 'extension' => 'log'));\n }\n\n $filesystem = __DOS();\n\n $filesystem->delete( dos_filepath($file) );\n dos_file_delete($file);\n\n if (get_option('dos_debug') == 1 and isset($log)) {\n $log->info(\"Delete file:\\n\" . $file);\n }\n\n return $file;\n\n } catch (Exception $e) {\n\n return $file;\n\n }\n\n}", "public function deleteFile(string $imageName);", "public function deleted(FileUpload $file)\n {\n Storage::disk(env('HGA_STORAGE_DISK', 's3'))->delete($file->key);\n }", "public function remove()\n\t{\n\t\tFile::remove($this->getFilePath());\n\t}", "public function delete( $file )\n\t{\n\t\t// check for absolut path\n\t\tif ( substr( $file, 0, 1 ) == '/' ) \n\t\t{\n\t\t\treturn CCFile::delete( $file );\n\t\t}\n\t\t\n\t\treturn CCFile::delete( $this->path( $file ) );\n\t}", "public static function deleteFile($input){\n\t\t\t$log = Log::getLog();\n\t\t\t$ret = exec(\"rm \\\"\" .$input.\"\\\"\", $out, $err);\n\t\t\tif($err == 0)\n\t\t\t\t$log->info(\"Le fichier \".$input.\" a bien ete supprime!\");\n\t\t\telse\n\t\t\t\t$log->error(\"Le fichier \".$input.\" n'a pas pu etre supprime!\");\n\t\t}", "public function deletefileAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\tif (is_numeric ( $id )) {\n\t\t\ttry {\n\t\t\t\tif(Files::del( $id )){\n\t\t\t\t\t$this->_helper->redirector ( 'list', 'customers', 'admin', array ('mex' => $this->translator->translate ( 'The task requested has been executed successfully.' ), 'status' => 'success' ) );\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$this->_helper->redirector ( 'list', 'customers', 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ) . \": \" . $e->getMessage (), 'status' => 'danger' ) );\n\t\t\t}\n\t\t}\n\t}", "public function delete() {\n if($this->exists()) {\n unlink($this->path);\n }\n }", "public function action_deleteFile($id = null)\n {\n\n }", "public static function deleteFile($path) {\n if(self::fileExistWithPath($path)) {\n unlink($path);\n }\n }", "public function removeFile(FileReference $ref);", "protected function deletePhysicalFile() {}", "public function delete()\n {\n if ($this->exists()) {\n $this->filesystem->remove($this->path);\n }\n }", "public function deleteFile(){\n Storage::disk('public')->delete('patient/'.Input::get('id_patient').'/'.Input::get('name'));\n File::where('file_nome', Input::get('name'))->where('id_paziente', Input::get('id_patient'))->first()->delete();\n return Redirect::back();\n }", "public function delete($file_id){\n if (!isset($file_id))\n return true;\n //ErrorHandler::throwException(FILE_PARAM_ABSENT, \"page\");\n $validator = Validator::getInstance();\n $file_id = $validator->Check('Md5Type',$file_id,[]);\n if (!$file_id)\n ErrorHandler::throwException(DATA_FORMAT_ERROR);\n $file = new Files(['id'=>$file_id]);\n $file->checkFileRoles('d');\n $file_name = $file->getFileFromBase();\n $conn = DBConnection::getInstance();\n $conn->startTransaction();\n if (!$file->deleteLink()) {\n $conn->rollback();\n ErrorHandler::throwException(FILE_DELTE_BASE_ERROR,'page');\n }\n if (!$file->deleteFile()) {\n $conn->rollback();\n ErrorHandler::throwException(FILE_DELTE_BASE_ERROR,'page');\n }\n if (!$file->deleteFileRoles()) {\n $conn->rollback();\n ErrorHandler::throwException(FILE_DELTE_BASE_ERROR,'page');\n }\n if (!unlink(STORAGE.$file_name.'.zip')){\n $conn->rollback();\n ErrorHandler::throwException(FILE_DELTE_ERROR,'page');\n }\n @unlink(ROOTDIR . \"/images/previews/\".$file_name.'.png');\n $conn->commit();\n unset($file);\n unset($conn);\n return true;\n //ErrorHandler::throwException(FILE_DELTE_SUCCESS,'page');\n }", "public function deleteFile() {\n\t\tswitch ($this->request['type']) \n\t\t{\n\t\t\tcase 'LOA':\n\n\t\t\t\t// Delete the request\n\t\t\t\t$this->DB->delete( $this->settings['perscom_database_loa'], 'primary_id_field=' . $this->request['id'] );\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'TPR':\n\n\t\t\t\t// Delete the entry\n\t\t\t\t$this->DB->delete( $this->settings['perscom_database_tpr'], 'primary_id_field=' . $this->request['id'] );\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'Discharge':\n\n\t\t\t\t// Delete the entry\n\t\t\t\t$this->DB->delete( $this->settings['perscom_database_discharges'], 'primary_id_field=' . $this->request['relational'] );\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tbreak;\n\t\t}\n\t}", "function delete($r, $param)\n {\n $this->setUp($param);\n\n if (isset($_POST['file'])) {\n $file = _WWW.$this->articlePatch.basename(rawurldecode($_POST['file']));\n $mini = _WWW.$this->articlePatch.'mini_'.basename(rawurldecode($_POST['file']));\n\n if (file_exists($file)) {\n unlink($file);\n }\n if (file_exists($mini)) {\n unlink($mini);\n }\n }\n }", "public function destroy($id)\n {\n $file_show = $this->course_release_attachment->find($id);\n $path = 'app/public/course_release_attachment/'.$file_show->course_releases_id.'/'.$file_show->name;\n unlink(storage_path($path));\n $file_show->delete();\n return redirect()->back();\n\n \n }", "public function deleteUploadedFile($file, $date = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('deleteUploadedFile', func_get_args()));\n }", "public function delete()\n\t{\n\t\t/* Check permission */\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'versions_' . static::$_prefix . '_delete' );\n\n\t\t\\IPS\\Session::i()->csrfCheck();\n\n\t\ttry\n\t\t{\n\t\t\t$versionClass = static::$_versionClass;\n\t\t\t$version = $versionClass::load( \\IPS\\Request::i()->id );\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\treturn \\IPS\\Output::i()->error(\n\t\t\t\t'node_error', \"VERSIONS_\" . strtoupper( static::$_prefix ) . \"_NOT_FOUND\", 404\n\t\t\t);\n\t\t}\n\n\t\t$version->delete();\n\n\t\t/* Response */\n\t\tif ( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( 'OK' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( static::$_queryString ), '', 302 );\n\t\t}\n\t}", "protected function deleteProtocolFile() {}", "public function deleteFile(){\n try{\n $this->ftp->connect('stick');\n if($this->ftp->removeFile('/var/www/html/models/'.$_POST['file']))\n $this->sessions->set('message', 'Removed '.$_POST['file']);\n }catch(Exception $e){\n $this->sessions->set('error',$e->getMessage());\n }\n\n header(\"location:index.php?modules\");\n }", "public function destroy(File $file)\n {\n //\n }", "public function destroy(File $file)\n {\n //\n }", "public function destroy(File $file)\n {\n //\n }", "public function destroy(File $file)\n {\n //\n }", "function generateDemo_FileRemove () {\n // TODO: Maybe some security checks?\n $file = htmlspecialchars($_POST[\"file\"]);\n if (file_exists($file)) { unlink ($file); }\n }", "public static function delete($file, $path = NULL){\n\t\ttry{\n\t\t\t# Get path\n\t\t\tself::$delete = self::path($file, $path);\n\t\t\t# Delete file\n\t\t\tif(unlink(self::$delete)){\n\t\t\t\t# Return success if we can set file\n\t\t\t\tself::$return['code'] = \"400\";\n\t\t\t\treturn self::$return;\t\n\t\t\t}else{\n\t\t\t\t# Return error if we can't set the file\n\t\t\t\tself::$return['code'] = \"402\";\n\t\t\t\treturn self::$return;\t\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\t# Return error if we can't delete the file\n\t\t\tself::$return['code'] = \"403\";\n\t\t\treturn self::$return;\t\t\n\t\t}\n\t}", "public function deleteFile(Dhtechnologies_Ediconnectorbase_Model_Connector_Edi_Core_Documents_FileName $fn) ;", "public static function delete_file($filename)\n\t{\n\t if(file_exists($filename))\n\t {\n\t\t$os = php_uname();\n\t\tif(stristr($os, \"indows\")!==false)\n\t\t return exec(\"del \".$filename);\n\t\telse\n\t\t return unlink($filename);\n\t }\n\t return true;\n\t}", "protected function unlink($file)\n\t{\n\t\t$path = __DIR__.'/public/'.$file;\n\t\tif (file_exists($path)) {\n\t\t\tunlink($path);\n\t\t}\n\t}", "public function delete(string $path) \n {\n unlink(''.$path);\n }", "public function delete(): void\n {\n $this->fileSystem->remove($this->root);\n }", "public function delete_voice_file()\n {\n $sql=$this->db->select()\n ->from('personal', array(\"voice_path\"))\n ->where('userid = ?', $this->userid);\n $voice = $this->db->fetchRow($sql); \n $voice_path = $voice['voice_path']; \n unlink($this->path.$voice_path);\n $data = array('voice_path' => '');\n $where = \"userid = \".$this->userid;\n $this->db->update('personal' , $data , $where); \n }", "public function delete()\n {\n File::delete([\n $this->path,\n $this->thumbnail_path\n ]);\n\n parent::delete();\n }" ]
[ "0.7367289", "0.7345703", "0.72692496", "0.71598125", "0.71598125", "0.7043644", "0.6846617", "0.68219", "0.6814203", "0.6809942", "0.6804855", "0.67901754", "0.67839056", "0.67810535", "0.67765814", "0.6745827", "0.6736504", "0.67278653", "0.67197424", "0.6684765", "0.6670775", "0.6651038", "0.6631923", "0.66149634", "0.6611118", "0.6582025", "0.6576227", "0.65741426", "0.6573391", "0.6573391", "0.65723044", "0.6549982", "0.6545258", "0.6535345", "0.6528599", "0.6528332", "0.6524854", "0.6523617", "0.65179515", "0.65122527", "0.6509263", "0.6501078", "0.65002215", "0.6493898", "0.64737797", "0.646637", "0.64592147", "0.64369196", "0.64342165", "0.64321905", "0.64218044", "0.64203", "0.6413328", "0.6412287", "0.63826257", "0.63826257", "0.6369991", "0.6362354", "0.6360115", "0.6352924", "0.6345192", "0.63407147", "0.6336717", "0.63362074", "0.63212013", "0.63194585", "0.63171095", "0.6311598", "0.6309163", "0.6295823", "0.6293888", "0.62908596", "0.62896526", "0.62836325", "0.6281917", "0.6274609", "0.6273796", "0.6271651", "0.62641186", "0.62638336", "0.62610334", "0.625542", "0.6250494", "0.6240662", "0.6233575", "0.62299305", "0.62187374", "0.6215975", "0.6215975", "0.6215975", "0.6215975", "0.6212551", "0.62114096", "0.62111616", "0.6207083", "0.62017715", "0.6192491", "0.61908466", "0.6185029", "0.6180825" ]
0.858596
0
Usado para mudar senha pelo proprio usuario
Используется для изменения пароля самого пользователя
function mudarSenha() { if (!empty($this->data['Usuario']['nova_senha'])) { $this->Usuario->id = $this->Session->read('Auth.Usuario.id'); $this->Usuario->set('password', $this->Auth->password($this->data['Usuario']['nova_senha'])); if ($this->Usuario->save($this->data)) $this->Session->setFlash('Senha alterada!'); else $this->Session->setFlash('Erro ao gravar a nova senha!'); $this->redirect('/'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mudarSenhaUsuario() {\r\n if (!empty($this->data)) {\r\n $this->Usuario->set('password', $this->Auth->password($this->data['Usuario']['nova_senha']));\r\n if ($this->Usuario->save($this->data)) {\r\n $this->Session->setFlash('Senha alterada com sucesso!');\r\n } else {\r\n $this->Session->setFlash('Erro ao alterar senha do usuário!');\r\n }\r\n $this->redirect(array('controller' => $this->name, 'action' => 'index'));\r\n }\r\n $this->render('admin_index');\r\n }", "public function resetarSenha () {\n //\n }", "public function storeUser($nome, $email, $senha, $telefone) {\n\t\t$uuid = uniqid('', true);\n\t $hash = $this->hashSSHA($senha);\n\t $encrypted_password = $hash[\"encrypted\"];\n\t\t\n\t $stmt = $this->conn->prepare(\"INSERT INTO usuarios(nome, email, encrypted_password, telefone) VALUES(?, ?, ?, ?)\");\n\t $stmt->bind_param(\"ssss\",$nome, $email, $encrypted_password, $telefone);\n\t $result = $stmt->execute();\n\t $stmt->close();\n\t\n\t // check for successful store\n\t if ($result) {\n\t $stmt = $this->conn->prepare(\"SELECT * FROM usuarios WHERE email = ?\");\n\t $stmt->bind_param(\"s\", $email);\n\t $stmt->execute();\n\t $usuario = $stmt->get_result()->fetch_assoc();\n\t $stmt->close();\n\t\n\t return $usuario;\n\t } else {\n\t return false;\n\t }\n\t }", "function crear_usuario() {\n $documento = $_REQUEST[\"documento\"];\n $resultadousuario = $this->usuario_model->get_usuario($documento);\n if($resultadousuario){\n $datosUsuario = $_POST;\n $datosUsuario['password']=$resultadousuario->password;\n $this->usuario_model->actualizar_usuario($documento,$datosUsuario);\n echo \"OK\";\n }else{\n $usuario = $_POST;\n $usuario['password']=sha1($usuario['password']);\n $this->usuario_model->crear_usuario($usuario);\n echo \"OK\";\n } \n }", "public function save(){\n\t\t$conexion = new Database();\n\t\t\n if ($this->codigo){\n $sql = 'UPDATE CAU_USUARIOS SET usuario = ? password = ? WHERE codigo = ?';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->usuario );\n\t\t\t$conexion->bindParam( 2, $this->password );\n\t\t\t$conexion->bindParam( 3, $this->codigo );\n\t\t\t$conexion->execute();\n }\n else{\n $sql = 'INSERT INTO CAU_USUARIOS ( usuario, password) VALUES (?, ?)';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->usuario );\n\t\t\t$conexion->bindParam( 2, $this->password );\n\t\t\t$conexion->execute();\n\t\t\t$this->codigo = $conexion->lastInsertId();\n }\n }", "function tambah($data)\r\n{\r\n global $koneksi;\r\n $username = $data[\"username\"];\r\n $password = $data[\"password\"];\r\n $passwordConfirm = $data[\"passwordConfirm\"];\r\n $level = $data[\"level\"];\r\n\r\n // verifikasi username (username tidak boleh ada yang sama)\r\n // mengambil data berdasarkan username yang diinput\r\n $data = mysqli_query($koneksi, \"SELECT username FROM user WHERE username = '$username'\");\r\n\r\n // jika usernamenya sama akan muncul pop up informasi\r\n if (mysqli_fetch_assoc($data)) {\r\n echo \"<script>alert('username sudah digunakan');</script>\";\r\n return false;\r\n }\r\n\r\n // verifikasi password ==> cek apakah pasword dan konfirmasi pasword sama\r\n if ($password != $passwordConfirm) {\r\n echo \"<script>alert('pass dan konfirmasi pass tidak cocok');</script>\";\r\n return false;\r\n }\r\n\r\n // encrypt password menggunakan algoritma hash\r\n // tidak dianjurkan menggunakan algoritma md5\r\n $password = password_hash($password, PASSWORD_DEFAULT);\r\n\r\n $query = \"INSERT INTO user VALUES ('', '$username', '$password', '$level')\";\r\n\r\n mysqli_query($koneksi, $query);\r\n\r\n return mysqli_affected_rows($koneksi);\r\n}", "function addUser($pseudo, $password, $mail)\n{\n $hashPass = password_hash($password, PASSWORD_DEFAULT);\n $role = 'common_user'; // every new user is by default set as common_user\n $data = [\n 'role' => $role,\n 'pseudo' => $pseudo,\n 'password' => $hashPass,\n 'mail' => $mail\n ];\n $userManager = new Gaetan\\P5_2\\Model\\UserManager();\n\n if (!$userManager->pseudoExists($_POST['pseudo']) && !$userManager->mailExists($_POST['mail'])) {\n $user = new Gaetan\\P5_2\\Model\\User($data);\n $affectedLines = $userManager->add($user);\n if ($affectedLines == false) {\n throw new Exception('Impossible d\\'enregistrer l\\'utilisateur');\n }\n else {\n $userConnected = $userManager->getUser($pseudo);\n $_SESSION['user_id'] = $userConnected->id();\n $_SESSION['pseudo'] = $pseudo;\n $_SESSION['role'] = $userConnected->role();\n\n header('Location: index.php?action=registered');\n }\n }\n else {\n throw new Exception('Ces identifiants ne sont pas disponnibles, merci d\\'en choisir un autre ');\n }\n}", "public function postAlterarsenha(){\n $tipoLoginPaciente = $this->auth->user()['tipoLoginPaciente'];\n\n //Só libera a alteração de senha para o acesso do tipo CPF\n if($tipoLoginPaciente != 'CPF'){\n return response(['message'=>'Tipo de acesso não autorizado para alterar senha','data' => Request::all()],203);\n }\n //Valida os dados enviado pelo formulario de alteração de senha\n $validator = Validator::make(Request::all(), $this->clienteAcesso->getValidator());\n \n if ($validator->fails()) {\n return response(['message'=>'Erro - Senhas devem ter entre 6 e 15 caracteres.','data' => Request::all()],400);\n }\n //Cria o MD5 do registro\n $registro = strtoupper(md5($this->auth->user()['registro']));\n\n //Verifica se a senha atual esta correta para liberar a alteração\n $verifyAcesso = $this->clienteAcesso->findWhere(['id' => $registro, 'pure' => strtoupper(Request::input('senhaAtual'))])->count();\n\n if(!$verifyAcesso){\n return response(['message'=>'Senha atual não confere','data' => Request::all()],203);\n }\n\n //Altera a senha do usuario\n $acesso = $this->clienteAcesso->alterarSenha($registro,Request::input('novaSenha'));\n \n if(!$acesso){\n return response(['message' => 'Erro ao salvar.','data' => $acesso],500);\n }\n\n return response(['message' => 'Salvo com sucesso.','data' => $acesso],200);\n }", "public function salvarNoBanco(){\n\t\t\t// Insere os dados do usuario no bd\n\t\t\t$insert = \"\tINSERT INTO usuario (login, senha, recuperar_senha, pri_nome, ult_nome, email) \n\t\t\t\t\t\tVALUES('{$this->login}', '{$this->hashSenha}', '{$this->token}', \n\t\t\t\t\t\t'{$this->pnome}', '{$this->unome}', '{$this->email}')\";\n\t\t\t\n\t\t\tif ($this->mysqli->query($insert) === TRUE) { // Caso a insercao seja bem sucedidade, o usuario e informado\n\t\t\t\tFunctions::alertaRedirect(\"Conta criada com sucesso!\", \"../../../index.html\");\n\t\t\t} \n\t\t\t// Caso a operacao nao seja bem sucedidade, uma mensagem de erro e apresentada\n\t\t\tFunctions::alertaRedirect(\"Erro ao criar conta, tente novamente!\", \"../registrar.html\"); \n\t\t}", "public function novoUtilizador()\n\t\t{\n\t\t\tif($this->verifica() == 0)\n\t\t\t\t\treturn -1;\n\t\t\telse{\n\t\t\t\t$passwordCod = sha1($this->senha);\n\t\t\t\t$query = $this->mysql->query(\"insert into login values('$this->user','$passwordCod')\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "public function adicionarUsuario($nomeUsuario, $email, $senha, $privilegio){\r\n $usuarios = new Usuarios();\r\n $usuarios->adicionarUsuario($nomeUsuario, $email, $senha, $privilegio);\r\n }", "function actualiza_Usuario_clave($u_id, $clave)\n\t\t{\n\t\t\t//Encriptamos la clave\n\t\t\t$clave = md5($clave);\n\n\t\t\t$this->sql=\"update usuario set u_clave='$clave' where u_id=$u_id\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}", "public function alterarUsuario($id, $nomeUsuario, $email, $privilegio, $alt){\r\n $usuarios = new Usuarios();\r\n $usuarios->alterarUsuario($id, $nomeUsuario, $email, $privilegio, $alt);\r\n }", "function tambah_user($dtpost){\n\tglobal $db;\n\t$username = $dtpost[\"username\"];\n\t$password1 = mysqli_real_escape_string($db, $dtpost[\"password1\"] );\n\t$password2 = mysqli_real_escape_string($db, $dtpost[\"password2\"] );\n\t$level = $dtpost[\"level\"];\n\t// fungsi mysqli_real_escape_string = user bisa masukkan passwd dengan karakter kutip 1 dengan aman.\n\n\t// var_dump($dtpost);\n\n\t//koding cek password apa sama dengan password konfirmasi\n\tif ($password1 !== $password2) {\n\t\t?> \n\t\t<script>\n\t\t\talert(\"Konfirmasi Password Tidak Sesuai! Mohon Diulang.\");\n\t\t</script>\n\t\t<?php \n\t\treturn 0;\n\t}\n\n\t//ENKRIPSI PASSWORD DENGAN PASSWORD_DEFAULT\n\t//PASSWORD_DEFAULT MERUPAKAN TEKNIK ALGORITMA UNTUK ENKRIPSI PASSWORD DI PHP5\n\t//TIAP PHP UPDATE MAKA TEKNIK ALGORITMA ENKRIPSI JUGA AKAN DI UPDATE YG TERBARU\n\t$password_enkripsi = password_hash($password1, PASSWORD_DEFAULT);\n\t// echo $password_enkripsi;\n\t// die;\n\t//TAMBAHKAN DATA REGISTRASI KE TABLE USER\n\t$sqlregistrasi = \"INSERT INTO user (username,password,level) VALUES('$username','$password_enkripsi','$level')\";\n\tmysqli_query($db, $sqlregistrasi) or die($db -> error);\n\treturn mysqli_affected_rows($db);\n}", "function incluirNovoUsuario($email, $senha){\r\n\t\t$senhaMd5 = md5($senha);\r\n\r\n\t\t// insere um novo usuario\r\n\t\t$query = \"INSERT INTO USUARIO (Email, Senha) VALUES ('$email','$senhaMd5')\";\r\n\t\t$sql = mysql_query($query) or die (\"Erro ao inserir na tabela USUARIO\". mysql_error());\r\n\r\n\t\t// retorno a insercao\r\n\t\treturn $sql;\r\n\r\n\t}", "function updateSenhaUsuario()\n {\n // receber as variaveis usuario (e-mail) e senha\n $data = date('Y-m-d H:i:s');\n $cdusua = $_POST[\"cdusua\"];\n $desenh = md5($_POST[\"desenh\"]);\n $desenh1 = md5($_POST[\"desenh1\"]);\n\n if (empty($desenh) == true)\n {\n $demens = \"É obrigatório informar a nova senha!\";\n $detitu = \"Gerenciador Financeiro | Alterar Senha\";\n $devolt = \"minhasenha.php\";\n header('Location: mensagem.php?demens=' . $demens . '&detitu=' . $detitu . '&devolt=' . $devolt);\n } Else {\n\n if ($desenh !== $desenh1) {\n $demens = \"As senhas informadas estão diferentes! Favor corrigir.\";\n $detitu = \"Gerenciador Financeiro | Alterar Senha\";\n $devolt = \"minhasenha.php\";\n header('Location: mensagem.php?demens=' . $demens . '&detitu=' . $detitu . '&devolt=' . $devolt);\n } Else {\n\n $user = new Usuario();\n\n if ($user->updateSenha($cdusua, $desenh)) {\n\n $delog = \"Atualização senha usuario na tabela [usuarios] codigo \" . $cdusua;\n\n if (isset($_COOKIE['cdusua'])) {\n $cdusua = $_COOKIE['cdusua'];\n }\n\n $this->util->geraLogSistema($cdusua, $delog);\n\n return true;\n }\n\n }\n }\n\n return false;\n }", "public function alterarSenha($id, $senha){\r\n $usuarios = new Usuarios();\r\n $usuarios->alterarSenha($id, $senha);\r\n }", "private function savePassword()\r\n {\r\n $db = Sweia::getInstance()->getDB();\r\n return $db->updateFields(SystemTables::DB_TBL_USER, array(\"password\" => $this->password), \"uid='$this->uid'\");\r\n }", "function save(){\r\r\n if (!isset($this->username) || !isset($this->password)){\r\r\n $this->error[] = $_SESSION['translate']->it('Username and password must be set before user can be saved') . '.';\r\r\n return FALSE;\r\r\n }\r\r\n\r\r\n $sql['username'] = $this->username;\r\n $sql['password'] = $this->password;\r\n $sql['city'] = $this->city;\r\n $sql['state'] = $this->state;\r\n $sql['address'] = $this->address;\r\n $sql['zip'] = $this->zip;\r\n $sql['head'] = $this->head;\r\n $sql['email'] = $this->email;\r\n $sql['org'] = $this->org;\r\n $sql['rootOrg'] = $this->rootOrg;\r\n $sql['phone'] = $this->phone;\r\n $sql['realname'] = $this->realname;\r\n $sql['appuid'] = $this->appuid;\r\n\r\n if ($this->admin_switch)\r\r\n $sql['admin_switch'] = 1;\r\r\n else\r\r\n $sql['admin_switch'] = 0;\r\r\n\r\r\n if ($this->deity)\r\r\n $sql['deity'] = 1;\r\r\n else\r\r\n $sql['deity'] = 0;\r\r\n\r\r\n if (isset($this->groups)){\r\r\n $groups = $this->groups;\r\r\n PHPWS_Array::dropNulls($groups);\r\r\n $sql['groups'] = implode(':', array_keys($groups));\r\r\n }\r\r\n\r\r\n if ($this->user_id < 1)\r\r\n $this->user_id = $GLOBALS['core']->sqlInsert($sql, 'mod_users', FALSE, TRUE);\r\r\n else\r\r\n $GLOBALS['core']->sqlUpdate($sql, 'mod_users', 'user_id', $this->user_id);\r\r\n\r\r\n $this->updateUserGroups();\r\r\n return TRUE;\r\r\n }", "private function newUser ( ) {\r\n \r\n /** crida a la preparació la vista de la fitxa del usuari */\r\n $this->viewUser ( );\r\n\r\n }", "public function create_user($nombre,$contrasenna,$telefono,$correo){\n\t\t\t$sql = \"Insert into usuarios (name,password,correo,telefono) values('\" . $nombre .\"','\" . $contrasenna . \"','\" . $correo . \"','\" . $telefono . \"')\";\n\t\t\t$stmt = $this->con->prepare($sql);\n \t\t\t$stmt->execute();\n\t\t}", "public function crear(){\n\t\trequire_once 'model/Pais.php';\n\n\t\t\tif(isset($_POST[\"mail\"]) && isset($_POST[\"pass\"]) && isset($_POST['nombre']) && isset($_POST['apellido'])&& isset($_POST['pais'])&& isset($_POST['username']) ){\n \n\t\t\t\t//Creamos un usuario\n\t\t\t\t$usuario=new Usuario($this->adapter);\n\n\t$username= $_POST['username'];\n\t$password = $_POST['pass'];\n\t$apellido = $_POST['apellido'];\n\t$nombre = $_POST['nombre'];\n\t$mail = $_POST['mail'];\n\t$codigo = $_POST['pais'];\n\n\t$pais=new Pais($this->adapter);\n\t$allPaises= $pais->getPaises(); \n\tforeach ($allPaises as $pa){if ($pa->codigo == $codigo){$pais->__set('pais',$pa->pais);}}\n\n\t$salt = bin2hex(random_bytes(32)); \n $saltedPass = $password.$salt; \n $hashedPass = hash('sha256', $saltedPass);\n\t\t\t\t\n\t\t\t\t$usuario->__set('nombre',$nombre);\n\t\t\t\t$usuario->__set('apellido',$apellido);\n\t\t\t\t$usuario->__set('mail',$mail);\n\t\t\t\t$usuario->__set('pass',$hashedPass);\n\t\t\t\t$usuario->__set('salt',$salt);\n\t\t\t\t$usuario->__set('username',$username);\n\t\t\t\t$usuario->__set('pais',$pais);\n\n\n\n\t\t\t$existe;\n\t\t\t$existeuser;\n\tif ($usuario->consultar($mail)){ $existe=true;} else {$existe=false;}\n\tif ($usuario->consultar($username)){ $existeuser=true;} else {$existeuser=false;}\n\n\t\tif($existe){\t\t\t\t\t\n\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">El mail ingresado ya se encuentra registrado.</div>\";\n\t\t$this->registro();\n \t}else{ \n\n\t\t\tif($existeuser){\n\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">El nombre de usuario ya existe. Elija otro.</div>\";\n\t\t\t\t$this->registro();\n\t\t\t} else{\n\n\t\t\t\t$save=$usuario->save2($codigo);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$_SESSION['usuario']=$usuario;\n\t\t\t\t$_SESSION['mail']=$mail;\n\n\t\t\t\t\n\n\t\t\t\t//$usuario= $this->setearUsuario($usuario);\n\t\t\t\t$this->redirect(\"Muro\",\"modificarPerfil\");}\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t} else{ $this->registro();}\n}", "function tambah_user($datauser)\n{\n\tglobal $conn;\n\t$username = strtolower(stripcslashes(htmlspecialchars($datauser[\"username\"])));\n\t$password = mysqli_real_escape_string($conn, $datauser[\"password\"]);\n\n\n\t// cek username\n\t$cek_user = mysqli_query($conn, \"SELECT username FROM tbuser WHERE username = '$username'\");\n\tif (mysqli_num_rows($cek_user) > 0) {\n\t\t\techo \"<script>alert('Gagal Registrasi Username Sudah Terdaftar!!');</script>\";\n\t\t\treturn false;\n\t\t}\n\n\n\t// Password Enkripsi\n\t$password = password_hash($password, PASSWORD_DEFAULT);\n\n\t$password2 = mysqli_real_escape_string($conn, $datauser[\"password2\"]);\n\t$email = strtolower(htmlspecialchars($datauser[\"email\"]));\n\t$level = htmlspecialchars($datauser[\"level\"]);\n\n\tif ($username == \"\" || $password == \"\" || $email == \"\") {\n\t\t\techo \"<script>alert('Textbox Belum Terisi!');</script>\";\n\t\t\treturn false;\n\t\t}\n\n\t$query = \"INSERT INTO tbuser VALUES \n\t('','', '$username',\n\t'$password',\n\t'$email',\n\t'$level',\n\t'',''\n)\";\n\tmysqli_query($conn, $query);\n\treturn mysqli_affected_rows($conn);\n}", "public function iniciarCadastro($nomeUsuario, $email, $senha, $privilegio){\r\n $usuarios = new Usuarios();\r\n $usuarios->iniciarCadastro($nomeUsuario, $email, $senha, $privilegio);\r\n }", "public function login($usuario,$senha){\r\n \r\n }", "public function addUser(){\n\t\t$this->checkVars('username,password,htpasswdFile');\n\t\tif($this->existsUser()){\n\t\t\treturn false;\n\t\t}\n\t\t$data = $this->username.\":\".$this->getHtpasswd($this->password).\"\\n\";\n\t\t$filename = $this->htpasswdFile;\n\t\tif (is_writable($filename)) { \n if (!$handle = fopen($filename, 'a')) {\n\t\t\t\tthrow New Exception('Cannot open htpasswd file: '.$this->htpasswdFile);\n } \n if (fwrite($handle, $data) === FALSE) {\n\t\t\t\tthrow New Exception('Cannot write htpasswd file: '.$this->htpasswdFile);\n }\n fclose($handle);\n\t\t\treturn true;\n } \n\t\tthrow New Exception('htpasswd file is not writable: '.$this->htpasswdFile);\t\t\n\t}", "public function setEditUser($data){\n\t\t\t//var_dump($data);exit();\n\t\t\tif(!empty($data['id_usuario'])){\n\t\t\t\t$query =\"UPDATE usuarios SET nombre='\".$data['name'].\"',clave='\".$data['nuevopass'].\"' WHERE idusuario=\".$data['id_usuario'];\n\t\t\t\t//echo $query;exit();\n\t\t\t\t$result =mysqli_query($this->link,$query);\n\t\t\t\tif($result){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function inserirBD(){\n //inserir\n $this->setSenha( md5($this->senha) );//criptografar a senha\n if($this->id == null){\n try{\n \t$inserir = $this->pdo->prepare(\"INSERT INTO usuario(nome,email,senha) VALUES(:nome,:email,:senha)\");\n \t$inserir->bindValue(\":nome\", $this->nome);//Inserir com segurança\n \t$inserir->bindValue(\":email\", $this->email);\n $inserir->bindValue(\":senha\", $this->senha); \n \n $validar = $this->pdo->prepare(\"SELECT * FROM usuario WHERE senha = ?\");//prepara para procurar a senha\n $validar->execute(array($this->senha));//procura a senha\n\t\t\t\tif(!$validar)\n\t\t\t\t\tdie(\"Algo deu errado\");\n \tif($validar->rowCount() == 0){ //se não tiver nenhuma senha\n \t $inserir->execute();\n\t\t\t\t\tif(!$inserir)//se deu algo errado ao inserir\n\t\t\t\t\t\tdie(\"Algo deu errado\");\n\t\t\t\t\telse\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t }else//se ja tiver essa senha\n\t\t\t\t\t\treturn \"Já existe\";\t \n \t\t\t}catch(Exception $e){\n \t\techo e.getMessage(). \"<br>\";\n \t\t}\n }\n //atualizar\n else{\n $sql = \"UPDATE usuario SET nome=:nome, email=:email,senha=:senha WHERE id =:id\";\n\t\t\t$sql = $this->pdo->prepare($sql);\n\t\t\t$sql->bindValue(\":nome\",$this->nome);\n\t\t\t$sql->bindValue(\":email\", $this->email);\n\t\t\t$sql->bindValue(\":senha\", $this->senha);\n\t\t\t$sql->bindValue(\":id\", $this->id);\n $sql->execute();\n\t\t\tif(!$sql)\n\t\t\t\tdie(\"Algo deu errado\");\n\t\t\telse\n\t\t\t\treturn true;\n }\n }", "function oauth_crear_usuario($OAuth_servicio,$login_chk='',$nombre_chk='',$correo_chk='',$interno_chk=0,$plantilla_permisos_chk='')\n\t\t{\n\t\t\tglobal $TablasCore,$LlaveDePaso,$PCO_FechaOperacion,$ListaCamposSinID_usuario;\n\t\t\t// Inserta datos del usuario\n\t\t\t$clavemd5=MD5(PCO_TextoAleatorio(20));\n\t\t\t$pasomd5=MD5($LlaveDePaso);\n\t\t\t$descripcion=\"Auth:$OAuth_servicio\";\n\t\t\t//Agrega el registro de usuario si aun no existe\n\t\t\tif (!PCO_ExisteValor($TablasCore.\"usuario\",\"login\",$login_chk))\n\t\t\t\t{\n\t\t\t\t\t@PCO_EjecutarSQLUnaria(\"INSERT INTO \".$TablasCore.\"usuario (login,clave,nombre,estado,correo,ultimo_acceso,llave_paso,usuario_interno,plantilla_permisos,descripcion) VALUES ('$login_chk','$clavemd5','$nombre_chk',1,'$correo_chk','$PCO_FechaOperacion','$pasomd5','$interno_chk','$plantilla_permisos_chk','$descripcion')\");\n\t\t\t\t\tPCO_Auditar(\"OAuth:Agregado usuario $login_chk para \".$OAuth_servicio);\n\t\t\t\t}\n\t\t}", "public function setUserName($value);", "public function registraNuovoUtente($post)\n {\n foreach ($post as $key => $value) {\n $post[$key] = trim($this -> cleanInput($value, 'str'));\n }\n\n try {\n if ($this -> usernameExists($post['uname'])) {\n return \"L'username indicata è già presente\";\n }\n $this -> checkMod($post);\n // creazione password criptata\n $pwd_hash = password_hash($post['pwd'], PASSWORD_DEFAULT);\n // superati tutti i controlli realizzazione query per aggiungere l'utente al DB\n $token = bin2hex(random_bytes(32));\n $this -> addUser($post, $pwd_hash, $token);\n } catch (PDOException $e) {\n return \"Errore. Riprova più tardi\";\n } catch (Exception $e) {\n return $e -> getMessage();\n }\n \n return 'Sei stato correttamente registrato';\n }", "public function modificaUtente() {\n $session = USingleton::getInstance('USession');\n $view = USingleton::getInstance('VRegistrazione');\n $nuovi_dati = $view->getNuoviDati();\n //$datiEvento['citta'] = rtrim($datiEvento['citta']);\n // $datiEvento['interessi'] = rtrim($datiEvento['interessi']);\n $Fuser = new FUtente();\n $utente = $Fuser->load($session->leggi_valore('email'));\n if (!isset($nuovi_dati['idimg']))\n $nuovi_dati['idimg'] = 'utentedefaultimg.jpg';\n $utente->aggiornaUtente($nuovi_dati['data'], $nuovi_dati['citta'], $nuovi_dati['interessi'], $nuovi_dati['idimg']);\n $Fuser->update($utente);\n\n $view_ricerca = USingleton::getInstance('VRicerca');\n $view_ricerca->displayProfiloUtente($utente);\n }", "function agregar_usuario( $usuario = null, $clave = null) {\n global $usuarios;\n if( is_null($usuario) or is_null($clave) ) {\n return;\n }\n $u = $usuarios[ strtolower($usuario) ] = $clave; //Pasa el usuario a minus...\n return $u;\n}", "function adicionarUsuario($nome, $CPF, $email, $senha, $cidade,$endereco, $sexo){\n if ($email<>\"adm@adm.com\") {\n $tipoUsuario = \"user\";\n }else{\n $tipoUsuario = \"admin\";\n }\n\n \n \n $insert = \"INSERT INTO tblUsuario(Nome, Email, Senha, CPF, endereco, tipoUsuario, sexo) VALUES('$nome', '$email', '$senha', '$CPF', '$endereco', '$tipoUsuario', '$sexo')\";\n\n $resultado = mysqli_query($cnx = conexao(),$insert);\n if(!$resultado) { die('Erro ao cadastrar usuário' . mysqli_error($cnx)); }\n return 'Usuario cadastrado com sucesso!';\n}", "function modificarAlmacenUsuario(){\n $this->procedimiento='alm.ft_almacen_usuario_ime';\n $this->transaccion='SAL_ALMUSR_MOD';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_almacen_usuario','id_almacen_usuario','int4');\n $this->setParametro('id_usuario','id_usuario','int4');\n $this->setParametro('estado_reg','estado_reg','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "protected function create_super_admind(){\n \t$sql = \"UPDATE admind SET password = :password , email = :email WHERE id = :id\";\n \t$array = array('password' => Hash::make('112298') , 'email' => 'zizoumgs@gmail.com', 'id' => 1 );\n $this->exe_non_query($sql , $array);\n }", "private function saveUser ( ) {\r\n \r\n /** recuperem els valors de les variables POST que venen del formulari */\r\n $this->getPostValues ( );\r\n\r\n if ( ( filter_has_var ( INPUT_POST, 'idUsuari' ) ) && ( ( filter_input ( INPUT_POST, 'idUsuari' ) ) != \"\" ) ) { /** si s'ha sel·leccionat usuari executa el mètode Update */\r\n \r\n \r\n $this->updateUser( filter_input ( INPUT_POST, 'idUsuari' ) );\r\n \r\n \r\n } else { /** si no hi ha usuari sel·leccionat executa el mètode Insert */\r\n \r\n $this->insertUser ( );\r\n \r\n } \r\n \r\n }", "static function registerUser()\n\t{\n\t\tif ($_POST['username'] == null || $_POST['password'] == null || $_POST['naam'] == null || $_POST['voornaam'] == null || $_POST['email'] == null) {\n\t\t\t$_SESSION['mess'][sizeof($_SESSION['mess'])] = \"registerEmpty\";\n\t\t\tUtil::redirect(prevURL);\n\t\t}\n\t\telse{\n\t\t\t$_POST['password'] =password_hash($_POST['password'], PASSWORD_DEFAULT);\n\t $toAddUser = new UserEntity($_POST['username'], $_POST['password'], $_POST['naam'], $_POST['voornaam'], 0, $_POST['email'], 0 ,1);\n\t MainDAO::addUser($toAddUser);\n\t $_SESSION['user'] = $toAddUser;\n\n\t\t\tUtil::redirect(\"/\");\n\t die();\n\t }\n\t}", "function newUser(string $pseudo, string $mail, string $pass)\n{\n $userManager = new UserManager();\n $pass_hache = password_hash($pass, PASSWORD_DEFAULT);\n $user = $userManager->addUser($pseudo, $mail, $pass_hache);\n $success = null;\n\n if ($user === false) {\n throw new Exception('Impossible d\\'ajouter le nouvel utilisateur !');\n }\n else {\n $success = 'Le nouvel administrateur a bien été ajouté !';\n require(ADMINVIEW.'/addUserView.php');\n }\n}", "function setUsername($username);", "public function save(){\n\t\t$soxId = oxConfig::getParameter( \"oxid\" );\n\t\tif ( $this->_allowAdminEdit( $soxId ) ) {\n\n\t\t\t$aParams = oxConfig::getParameter( \"editval\");\n\n\t\t\t$oUser = oxNew( \"oxuser\" );\n\t\t\tif ( $soxId != \"-1\" ) {\n\t\t\t\t$oUser->load( $soxId );\n\t\t\t} else {\n\t\t\t\t$aParams['oxuser__oxid'] = null;\n\t\t\t}\n\t\t\t\n\t\t\t// checkbox handling\n\t\t\t$aParams['oxuser__oxactive'] = $oUser->oxuser__oxactive->value;\n\t\t\t\n\t\t\t$oUser->assign( $aParams );\n\t\t\t\n\t\t\t$oUser->save();\n\n\t\t\t// set oxid if inserted\n\t\t\tif ( $soxId == \"-1\" ) {\n\t\t\t\toxSession::setVar( \"saved_oxid\", $oUser->getId() );\n\t\t\t}\n\t\t}\n\t}", "function agregarUsuario(){\n\t\t\t$titulo = obtenerInformacionTitulo();\n\t\t\tif ($_POST[\"pass1\"] != $_POST[\"pass2\"]){\n\t\t\t\t$msjError = \"Las contrase&ntilde;as no coinciden\";\n\t\t\t\trequire '../vista/registrarse.html';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$user = $_POST[\"user\"];\n\t\t\t\t$pass = $_POST[\"pass1\"];\n\t\t\t\t$mail = $_POST[\"mail\"];\n\t\t\t\t$rol = \"\";\n\t\t\t\tswitch ($_POST[\"rol\"]) {\n\t\t\t\t\tcase '0':\n\t\t\t\t\t\t$rol = \"gestion\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '1':\n\t\t\t\t\t\t$rol = \"administracion\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '2':\n\t\t\t\t\t\t$rol = \"consulta\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Aca antes validabamos que no exista el usuario\n\t\t\t\t//Ahora la logica esta en el metodo registrar()\n\t\t\t\t//Y en el caso de que ya exista, se levanta una excepcion\n\t\t\t\ttry {\n\t\t\t\t\tregistrar($user,$pass,$rol,$mail);\n\t\t\t\t\t$msjExito = \"El usuario ha sido creado correctamente!\";\n\t\t\t\t\trequire '../vista/exito.html';\n\t\t\t\t}\n\t\t\t\t//Si ya existia, atrapo la excepcion y se la mando a la vista para que la muestre\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t \t$msjError = $e->getMessage();\n\t\t\t\t \trequire '../vista/registrarse.html';\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t}\n\t}", "protected function createCliUser() {}", "public function createUser($data) {\n $nombre = $data['nombre'];\n $apellido = $data['apellido'];\n $usuario = $data['usuario'];\n #verificamos que el email sea corporativo\n $valido = strstr($usuario, '@', FALSE);\n switch ($valido) {\n case '@garden.com.py':\n case '@tema.com.py':\n case '@nissan.com.py':\n #verificamos que la cuenta aún no se haya creado\n $existe = $this->db->select(\"select usuario from usuario where usuario = '$usuario'\");\n if (empty($existe)) {\n #creamos la cuenta\n $pass = Hash::create('sha256', PASS_REGENERAR, HASH_PASSWORD_KEY);\n $this->db->insert('usuario', array(\n 'usuario' => $usuario,\n 'contrasena' => $pass,\n 'nombre' => utf8_decode($nombre),\n 'apellido' => utf8_decode($apellido),\n 'estado' => 1,\n ));\n #Enviamos el email\n $para = $usuario;\n $asunto = 'Intranet - Garden Automotores';\n $mensaje = '<table width=\"800\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n <tr>\n <td colspan=\"2\">Hola, ' . $nombre . ':</td>\n </tr>\n <tr>\n <td colspan=\"2\">Tu cuenta para la intranet ha sido creada.</td>\n </tr>\n <tr>\n <td colspan=\"2\">Tus datos para ingresar:</td>\n </tr>\n <tr>\n <td width=\"155\" align=\"right\"><strong>Usuario:</strong></td>\n <td width=\"625\">' . $usuario . '</td>\n </tr>\n <tr>\n <td width=\"155\" align=\"right\"><strong>Contraseña:</strong></td>\n <td width=\"625\">' . PASS_REGENERAR . '</td>\n </tr>\n <tr>\n <td colspan=\"2\">Para proteger tu cuenta, te recomendamos que cambies esta contraseña lo antes posible.</td>\n </tr>\n </table>';\n $this->helper->sendMail($para, $asunto, $mensaje);\n Session::set('message', array(\n 'type' => 'success',\n 'mensaje' => 'Se ha generado su cuenta. Se le han enviado los datos de acceso a su email.Sí no ha recibido nada verifique su casilla de correo no deseado (SPAM).'));\n } else {\n Session::set('message', array(\n 'type' => 'error',\n 'mensaje' => 'Lo sentimos, pero la cuenta que está intentando registrar ya existe en el sistema'));\n }\n break;\n default :\n Session::set('message', array(\n 'type' => 'error',\n 'mensaje' => 'Lo sentimos, pero la cuenta que esta intentando registrar no pertenece a Garden,Tema o Nissan. Si el problema persiste contacte con raul.ramirez@garden.com.py'));\n break;\n }\n return true;\n }", "public function registrar(){\n\t\t$usuario = Container::getModel('Usuario');\n\t\t$usuario -> __set('nome', $_POST['nome']);\n\t\t$usuario -> __set('email', $_POST['email']);\n\t\t$usuario -> __set('senha', $_POST['senha']); //$usuario -> __set('senha', md5($_POST['senha']));\n\t\t$usuario -> __set('codPref', $_POST['cod']);\n\n\t\t//Salvando os DADOS\n\t\t\n\n\t\tif ($usuario -> validarDados() && count($usuario -> getUsuarioPorEmail()) == 0){\n\t\t\t\t$usuario -> salvarDados();\n\t\t\t\t$this -> render('cadastroRealizado');\n\t\t}else{\n\t\t\t$this -> view -> erroCadastro = true;\n\t\t\t$this -> render ('cadastro');\n\t\t}\n\t}", "public function registrarUsuarioControlador()\n\t\t{\n\t\t\t//Administrador\n\t\t\t$dni = modeloPrincipal::limpiarCadena($_POST['dni-regi']);\n\t\t\t$nombre = modeloPrincipal::limpiarCadena($_POST['nombre-regi']);\n\t\t\t$apellido = modeloPrincipal::limpiarCadena($_POST['apellido-regi']);\n\t\t\t$telefono = modeloPrincipal::limpiarCadena($_POST['telefono-regi']);\n\t\t\t$direccion = modeloPrincipal::limpiarCadena($_POST['direccion-regi']);\n\t\t\t\n\n\t\t\t//Cuenta\n\t\t\t$usuario = modeloPrincipal::limpiarCadena($_POST['usuario-regi']);\n\t\t\t$password1 = modeloPrincipal::limpiarCadena($_POST['password1-regi']);\n\t\t\t$password2 = modeloPrincipal::limpiarCadena($_POST['password2-regi']);\n\t\t\t$email = modeloPrincipal::limpiarCadena($_POST['email-regi']);\n\t\t\t$genero = modeloPrincipal::limpiarCadena($_POST['optionsGenero-regi']);\n\n\t\t\t$privilegio = modeloPrincipal::limpiarCadena($_POST['privilegio-regi']);\n\n\t\t\t//$privilegio = modeloPrincipal::desencriptar($_POST['optionsPrivilegio']);\n\t\t\tif ($privilegio == \"Docente\") \n\t\t\t{\n\t\t\t\t$rol = 2;\n\n\t\t\t\tif ($genero == \"Masculino\") \n\t\t\t\t{\n\t\t\t\t\t$foto = \"docenteHombre.png\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$foto = \"docenteMujer.png\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$rol = 3;\n\n\t\t\t\tif ($genero == \"Masculino\") \n\t\t\t\t{\n\t\t\t\t\t$foto = \"estudianteHombre.png\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$foto = \"estudianteMujer.png\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($password1 != $password2)\n\t\t\t{\n\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"Contraseñas NO coinciden, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$consultaDNI = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT PersonaDNI FROM persona WHERE PersonaDNI='$dni'\");\n\n\t\t\t\t\tif ($consultaDNI->rowCount()>=1) {\n\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\"Texto\" => \"El DNI ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($email != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaEmail = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail='$email'\");\n\t\t\t\t\t\t\t$resultadoEmail = $consultaEmail->rowCount();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resultadoEmail = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($resultadoEmail >= 1) {\n\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\"Texto\" => \"El EMAIL ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaUsuario = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\");\n\t\t\t\t\t\t\tif($consultaUsuario->rowCount() >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$consultaID = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT id FROM cuenta\");\n\n\t\t\t\t\t\t\t\t$numero = ($consultaID->rowCount())+1;\n\n\t\t\t\t\t\t\t\t$codigo = modeloPrincipal::generarCodigo(\"LM\", 5, $numero);\n\n\t\t\t\t\t\t\t\t$clave = modeloPrincipal::encriptar($password1);\n\n\t\t\t\t\t\t\t\t$datosCuenta = [\n\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\"Usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\t\"Clave\" => $clave,\n\t\t\t\t\t\t\t\t\t\"Email\" => $email,\n\t\t\t\t\t\t\t\t\t\"Estado\" => \"Activo\",\n\t\t\t\t\t\t\t\t\t\"Rol\" => $rol,\n\t\t\t\t\t\t\t\t\t\"Genero\" => $genero,\n\t\t\t\t\t\t\t\t\t\"Foto\" => $foto\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t$cuentaAgregada = modeloPrincipal::agregarCuenta($datosCuenta);\n\n\t\t\t\t\t\t\t\tif ($cuentaAgregada)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$datosRegistro = [\n\t\t\t\t\t\t\t\t\t\t\"DNI\" => $dni,\n\t\t\t\t\t\t\t\t\t\t\"Nombre\" => $nombre,\n\t\t\t\t\t\t\t\t\t\t\"Apellidos\" => $apellido,\n\t\t\t\t\t\t\t\t\t\t\"Telefono\" => $telefono,\n\t\t\t\t\t\t\t\t\t\t\"Direccion\" => $direccion,\n\t\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\t\"Privilegio\" => $privilegio\n\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t$registroAgregado = registroModelo::registrarUsuarioModelo($datosRegistro);\n\n\t\t\t\t\t\t\t\t\tif ($registroAgregado)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"redireccionar\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Registro completo\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"Usuario registrado en el sistema. Inicie sesion ahora.\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"success\",\n\t\t\t\t\t\t\t\t\t\t\t\"Pagina\" => \"login/\"\n\t\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t\treturn modeloPrincipal::mostrarAlertaRedireccion($alerta);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmodeloPrincipal::eliminarCuenta($codigo);\n\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO NO pudo ser registrado. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"La CUENTA NO pudo ser registrada. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\treturn modeloPrincipal::mostrarAlerta($alerta);\n\t\t\t\n\t\t}", "public function setSenha($valor){\n\t\t\t$this->senha = $valor;\n\t\t}", "function inserirUser($nome, $pwd, $idTipo, $idestado){\n\t\t\t$query = \"insert into utilizadores (nome, palavrapasse, id_tipoUtilizador, id_estado) values('$nome', '$pwd', $idTipo, $idestado)\";\n\t\t\t$this->connect();\n\t\t\t$this->execute($query); \n\t\t\t$this->disconnect(); \n\t\t}", "function edita_pass_usuario(){\n\t\t\n\t\t// 1. PHP debe loguearse ante MySQL\n\t\tif (mysql_connect(\"localhost\",\"root\",\"\")) {\n\t\t\tsession_start();\n\t\t\t// 2. Preparamos la consulta\n\t\t\tif($_POST['resetea']==0){\n\t\t\t\t$this->codigo = $_SESSION[\"id_usuario\"];\t\t\t\t\n\t\t\t}elseif($_POST['resetea']==1){\n\t\t\t\t$this->codigo = $_POST[\"codigo\"];\n\t\t\t}\n\t\t\t$this->pass = md5($_POST[\"pass\"]);\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t$consultaEdit = \"UPDATE usuario SET pass='$this->pass' WHERE id_usuario='$this->codigo'\";\n\t\t\t\n\t\t\t// 3. Ejecutar la consulta\n\t\t\tmysql_select_db(\"check\") or die('No pudo seleccionarse la BD.');\n\t\t\tif(mysql_query($consultaEdit)){\n\t\t\t\theader(\"location: principal.php\");//Envia la confirmacion de editado a administracioncliente.php\t\n\t\t\t} \t\t\n\t\t} \n\t}", "public function apiRegisterUser() {\n\t\t$db = Reader::get('bases');\n\t\t$db = $db['default'];\n\t\t$db['password'] = trim(Crypt::decrypt($db['password']));\n\t\tLogin::setDatabase($db);\n\t\tvar_dump(Login::createUser(array('user'=>'ivan', 'email'=>'ivan', 'password'=>'eco123')));\n\t}", "function changerPasse($idUser,$passe)\n{\n}", "function new_user($username, $email, $pasword1){\n\n\t\t$pasword_save = md5(sha1($pasword1,true)+1);\n\n\t\t// *********************************************\n\t\t// \t\tConsulta existencia o no del usuario\n\t\t// *********************************************\n\t\t// Conexion servidor y conexion base de datos\n\t\tinclude(\"Config_BD.php\");\n\t\t// SQLa mostrar\n\t\t$sql = \t\"SELECT *\n\t\t\t\t\tFROM usuarios\n\t\t\t\t\tWHERE \tnombre \t=\t'$username' AND\n\t\t\t\t\t\t\tpasword = \t'$pasword_save'\n\t\t\t\t\";\n\n\t\t// Generamos objeto sql\n\t\t$consulta = mysqli_query($conexion, $sql)\n\t\t\t\t\tor die (\"Fallo en la consulta\".mysqli_error($conexion));\n\t\techo \"$sql\";\n\n\t\t// Miramos la longitud de la informacion obtenida\n\t\t$nfila = mysqli_num_rows($consulta);\n\t\techo $nfila;\n\n\t\t// **********************************************\n\t\t// \tVerificacion existencia usuario y grabacion\n\t\t// **********************************************\n\t\tif ($nfila == 0 ){\n\t\t\t// Si = 0, Dar de alta usuario\n\n\t\t\t\t// -----------------------------\n\t\t\t\t// \t\tGrabacion de los datos\n\t\t\t\t// -----------------------------\n\n\t\t\t\t// SQL insertar campos\n\t\t\t\t$sql = \t\"INSERT INTO `usuarios`\n\t\t\t\t\t\t\t\t(`Id_usuario`, \n\t\t\t\t\t\t\t\t`Nombre`,\n\t\t\t\t\t\t\t\t`Email`, \n\t\t\t\t\t\t\t\t`Pasword`)\n\t\t\t\t\t\t\tVALUES \n\t\t\t\t\t\t\t\t(NULL,\n\t\t\t\t\t\t\t\t'$username',\n\t\t\t\t\t\t\t\t'$email',\n\t\t\t\t\t\t\t\t'$pasword_save')\n\t\t\t\t\t\t\";\n\t\t\t\t// Generamos objeto sql\n\t\t\t\tmysqli_query($conexion, $sql)\n\t\t\t\t\t\t\tor die (\"Fallo en la consulta\".mysqli_error($conexion));\n\t\t\t\t// *************** FIN Grabacion ****************\n\n\t\t\t// Cierre base de datos.\n\t\t\tmysqli_close($conexion);\n\n\t\t\t// Retorno data\n\t \t\treturn true;\n\t\t}else{\n\t\t\t// Cierre base de datos.\n\t\t\tmysqli_close($conexion);\n\n\t\t\t// Si Diferente CERO. Existe, no dar de alta otra vez\n\t\t\techo \"ERROR !!!! usuario existente\";\n\t\t\treturn false;\n\t\t} // FIN condicion =0\n\t}", "function createUser()\n{\n if (!verifyUser(htmlspecialchars($_POST['email']), htmlspecialchars($_POST['password'])))\n {\n addUser(htmlspecialchars($_POST['nom']), htmlspecialchars($_POST['prenom']), htmlspecialchars($_POST['district']), htmlspecialchars($_POST['email']), htmlspecialchars($_POST['password']));\n }\n else {\n throw new Exception(\"User already existing\");\n }\n}", "public function createUser()\n {\n if($_POST)\n {\n $result = $this->sso->createUser();\n if($result['status'] != 'success') die($result['data']);\n die('success');\n }\n }", "function createUser($data){\n\n $this->DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql=\"INSERT INTO usuarios(usuario,contraseña,email)VALUES (?,?,?)\";\n\n $query = $this->DB->prepare($sql);\n $query->execute(array($data['user'],$data['pass'],$data['email']));\n Database::disconnect(); \n\n }", "private function UserUpdate() {\n // $this->checkNivel();\n// if (!$this->Resultado):\n// $this->Erro = array(\"Este nivel não pode ser alterado!\", KL_ERROR);\n// $this->Resultado = false;\n// else:\n $alterar = new Update();\n $alterar->ExeUpdate(self::Tabela, $this->Dados, \"WHERE user_id = :id\", \"id={$this->Usuario_id}\");\n\n if ($alterar->getResult()):\n $this->Erro = array(\"Dados do usuário Alterado com sucesso no sistema! Modificações no proximo login.\", KL_ACCEPT);\n $this->Resultado = $alterar->getResult();\n else:\n $this->Erro = array(\"<b>Erro</b> Não foi possivel realizar a alteração!\", KL_ERROR);\n $this->Resultado = $alterar->getResult();\n endif;\n //endif;\n }", "public function registrarUsuario(){\n\n\t\t$nombre = $_POST['nombre'];\n\t\t$apellido= $_POST['apellido'];\n\t\t$nickname= $_POST['nickname'];\n\n\t\t$fechaNacimiento= $_POST['date'];\n\t\t//echo $fechaNacimiento;\n\t\t$mail= $_POST['mail'];\n\t\t$telefono= $_POST['telefono'];\n\t\t$password = $_POST['password'];\n\t\t$password_cifrada = password_hash($password,PASSWORD_DEFAULT); \n\t\t/* Coste de la función por defecto: 10\n\t\t\tpassword_hash($password,PASSWORD_DEFAULT,array(\"cost\")=>12);\n\t\t\thttp://php.net/manual/es/faq.passwords.php\n\t\t*/\n\t\t//echo $password_cifrada;\n\t\t$sexo= $_POST['sexo'];\n\t\t//$fotografia = \"no\";\n\t\t$usuarios = $this->Usuario->getUsuarios();\n\t\t$idUsuario = end($usuarios)['idUsuario'];\n\n\n\n\t\t$validarCampos = $this->validarCampos($nombre, $apellido, $nickname, $password);\n\n\t\tif (strlen($validarCampos) > 0){\n\t\t\t// Volver al formulario\n\t\t\t$data['nombre'] = $nombre;\n\t\t\t$data['apellido'] = $apellido;\n\t\t\t$data['nickname'] = $nickname;\n\t\t\t$data['fechaNacimiento'] = $fechaNacimiento;\n\t\t\t$data['mail'] = $mail;\n\t\t\t$data['telefono'] = $telefono;\n\t\t\t$data['sexo'] = $sexo;\n\t\t\t//echo $vars['sexo'];\n\t\t\t$data['msg'] = $_SESSION['msg'];\n\t\t\t$data['error'] = 2;\n\t\t\t$data['divs'] = $validarCampos;\n\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t} else {\n\n\t\t\t$this->Usuario->setUsuario($nombre,$apellido,$nickname, $mail, $sexo, $password_cifrada, $telefono, $fechaNacimiento,1,1);\n\n\t\t\t$usuarios = $this->Usuario->getUsuarios();\n\t\t\t$idUsuarioNuevo = end($usuarios)['idUsuario'];\n\n\t\t\tif ($idUsuario == $idUsuarioNuevo){\n\t\t\t\t$data['error'] = 1;\n\t\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t\t} else {\n\n\t\t\t\t$subirImagen = $this->guardarImagen($idUsuarioNuevo);\n\t\t\t\t$mensaje = 0;\n\t\t\t\tif ($subirImagen == 0 ){\t// hubo un error\n\t\t\t\t\t$data['error'] = 0;\n\t\t\t\t\t$this->Usuario->eliminarUsuario($idUsuarioNuevo);\n\t\t\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t\t\t} else {\t// todo ok\n\t\t\t\t\t$usuarioNuevo = $this->Usuario->getUsuario($idUsuarioNuevo);\n\t\t\t\t\t$data['nuevoUsuario'] = $usuarioNuevo;\n\t\t\t\t\theader('Location: ?controlador=Index&accion=inicio');\n\t\t\t\t\t//$this->view->show('inicio.php', $data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\t/*\n\t\t$this->Usuario->setUsuario($nombre,$apellido,$nickname, $mail, $sexo, $password_cifrada, $telefono, $fechaNacimiento,1,1);\n\n\t\t$usuarios = $this->Usuario->getUsuarios();\n\t\t$idUsuarioNuevo = end($usuarios)['idUsuario'];\n\n\t\tif ($idUsuario == $idUsuarioNuevo){\n\t\t\t$data['error'] = 1;\n\t\t\t//$this->Usuario->eliminarUsuario($idUsuario);\n\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t} else {\n\n\t\t\t$subirImagen = $this->guardarImagen($idUsuarioNuevo);\n\t\t\t$mensaje = 0;\n\t\t\tif ($subirImagen == 0 ){\t// hubo un error\n\t\t\t\t$data['error'] = 0;\n\t\t\t\t$this->Usuario->eliminarUsuario($idUsuarioNuevo);\n\t\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t\t} else {\t// todo ok\n\t\t\t\t$usuarioNuevo = $this->Usuario->getUsuario($idUsuarioNuevo);\n\t\t\t\t$data['nuevoUsuario'] = $usuarioNuevo;\n\t\t\t\theader('Location: ?controlador=Index&accion=inicio');\n\t\t\t\t//$this->view->show('inicio.php', $data);\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t\n\t\t\n\t}", "public function createUser() {}", "public function modificarClaveDeUsuario($correo,$clave,$usuario,$cambiaPass){\n\t\t\t$query = \"SELECT correo, usuario FROM usuario WHERE correo = '$correo' AND usuario = '$usuario'\";\n\t\t\t $res = $this->query($query);\n\t\t\t\t\t $num = @pg_num_rows($res);\n\t\t\t\t\t\tif($num>0){\n\t\t\t\t\t\t\t\t$clave='md5'.md5($clave.$usuario);\n\t\t\t\t\t\t\t\t$sql2=\"ALTER ROLE $usuario ENCRYPTED PASSWORD '$clave'\";\n\t\t\t\t\t\t\t\t$res = $this->query($sql2);\n\t\t\t\t\t\t\t\techo ' <script language=\"javascript\">alert(\"La clave se modifico con éxito\");</script> ';\n\t\t\t\t\t\t\t\tif($cambiaPass == 1){\n\t\t\t\t\t\t\t\t\techo ' <meta http-equiv=\"refresh\" content=\"0; url=../vista/configuracion.php\"> ';\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\techo ' <meta http-equiv=\"refresh\" content=\"0; url=../index.php\"> ';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\techo ' <script language=\"javascript\">alert(\"La clave no se modifico, no existe el usuario o el correo\");</script> ';\n\t\t\t\t\t\t\t\tif($cambiaPass == 1){\n\t\t\t\t\t\t\t\t\techo ' <meta http-equiv=\"refresh\" content=\"0; url=../vista/configuracion.php\"> ';\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\techo ' <meta http-equiv=\"refresh\" content=\"0; url=../index.php\"> ';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n}", "public function alterarSenha($id_usuario, $senha)\n {\n $ID_USUARIO = $this->session->userdata('id_usuario');\n if ($id_usuario != $ID_USUARIO) {\n $this->Util->verificaPermissao($this, 'Administrador');\n }\n\n $id_usuario = str_replace(\"\\'\", \"\", $id_usuario);\n $DADOS['senha'] = str_replace(\"\\'\", \"\", $senha);\n\n $this->db->where('id_usuario', $id_usuario);\n $this->db->update('usuario', $DADOS);\n }", "private function insertUser ( ) {\r\n \r\n /** @var string $fields Conté els camps per la consulta */\r\n $fields = \"'\" . $this->nom . \"','\" . $this->cognoms . \"','\" . $this->correu .\"',\" . $this->correuConfirmat . \",\" . $this->noCaduca . \",\" . $this->noBloqueja . \",\" . $this->canviInici . \",\" . $this->esAdministrador . \",\" . $this->intents . \",\" . $this->idPolitica;\r\n\r\n if ( $fields != \"\" ) { /** si s'han omplert els camps */\r\n \r\n /** executa el mètode per afegir un usuari nou */\r\n $this->usuari = $this->model->afegeixUsuari ( $fields );\r\n \r\n } \r\n \r\n /** recupera el identificador del últim usuari afegit a la bbdd */\r\n $idUsuari = $this->model->retornaUltimUsuariAfegit ( );\r\n \r\n /** genera un hash per la paraula de pas escollida */\r\n $newPasswordEncrypted = password_hash ( $this->paraulaPas, PASSWORD_BCRYPT );\r\n \r\n $dataPasword = date( \"Y-m-d H:i:s\" );\r\n \r\n $fields = $idUsuari . \",'\";\r\n\r\n $fields = $fields . $newPasswordEncrypted . \"','\" . $dataPasword . \"'\";\r\n \r\n /** afegeix la paraula de pas a la bbdd */\r\n $this->modelParuala->afegeixParaula( $fields );\r\n \r\n /** crida al mètode que mostra la llista d'usuaris */\r\n $this->viewList ( );\r\n \r\n }", "private function UserCreate() {\n $this->checkDados();\n if (!$this->Resultado):\n $this->Erro = array(\"Existe campos em branco, Verifique!\", KL_ERROR);\n $this->Resultado = false;\n else: \n $create = new Create();\n $create->exeCreate(self::Tabela, $this->Dados);\n if ($create->getResult()):\n $this->Erro = array(\"<b>Cadastro </b>realizado com sucesso no sistema!\", KL_ACCEPT);\n $this->Resultado = $create->getResult();\n else:\n $this->Erro = array(\"<b>Erro</b> Não foi possivel realizar o cadstro!\", KL_ERROR);\n $this->Resultado = $create->getResult();\n endif;\n endif;\n }", "public function registrar_usuario($nombres,$apellidos,$dni,$telefono,$correo,$direccion,$cargo,$usuario,$password,$password2,$estado){\n\n $conectar=parent::conexion();\n // parent::set_names();\n\n $sql=\"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\n\n $sql=$conectar->prepare($sql);\n\n $sql->bindValue(1, $_POST[\"nombres\"]);\n $sql->bindValue(2, $_POST[\"apellidos\"]);\n $sql->bindValue(3, $_POST[\"dni\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"correo\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->execute();\n \t }", "public function cadastroUsuarioExemplo()\n {\n $role = $this->em->getRepository(Role::class)\n ->findByName(RoleEnum::ADMINISTRADOR);\n $post = $this->em->find(Posting::class, 1);\n $answer = $this->em->find(Answer::class, 1);\n\n // configurando o usuario\n $user = new User;\n\n $user->setNome(\"ronaldo\");\n $user->setEmail(\"ronily.web@gmail.com\");\n $user->setUsername(\"ronaldo\");\n $user->setPassword(Hash::make(\"12345\"));\n $user->setRole($role);\n $user->addPost($post);\n $user->addAnswer($answer);\n\n $this->em->persist($user);\n $this->em->flush();\n }", "public function addUser()\n\t{\n\t\t$db = $this->dbCon;\n $usr = $this;\n $usr->hash();\n $table = \"Camagru.users\";\n $Col = ['userName','email','password','verificationStatus'];\n $values = [$usr->username,$usr->email,$usr->password,'i'];\n $query = $db->insert($table,$Col, $values);\n $query .= \"ON DUPLICATE UPDATE verificationStatus='$usr->vryfctnStatus',\"\n . \"password = '{$usr->password}';\";\n $statement = $this->dbCon->dbCon->prepare($query);\n $simple = \"userName:{$this->username}\";\n $complex = base64_encode($simple);\n $ar = array_flip(explode('/', ServerRoot));//get excution folder\n $sv = $ar[0];\n if ($statement->execute()){\n mail($usr->email,\n \"Confirm Registration\",\n \"Please Click follow http://localhost/$sv/?uri=$complex\");\n return $this;\n }\n return NULL;\n\t}", "function registra_usuario() {\n\n\t\t// COMPROBACIONES DE SEGURIDAD\n\t\tarray_walk($_REQUEST, 'limpiarCadena');\t\n\n\t\t$nombre = htmlspecialchars(trim(strip_tags($_REQUEST[\"nombre\"])));\n\t\t$apellido1 = htmlspecialchars(trim(strip_tags($_REQUEST[\"ape1\"])));\n\t\t$apellido2 = htmlspecialchars(trim(strip_tags($_REQUEST[\"ape2\"])));\n\n\t\t$edad = htmlspecialchars(trim(strip_tags($_REQUEST[\"edad\"])));\n\t\t$email = htmlspecialchars(trim(strip_tags($_REQUEST[\"email\"])));\n\n\n\t\t$password = htmlspecialchars(trim(strip_tags($_REQUEST[\"pass\"])));\n\t\t// HASH\n\t\t$password_hased = password_hash($password, PASSWORD_DEFAULT);\n\n\n\t\tif(empty($nombre) || empty($edad) || empty($email) || empty($password) || empty($apellido1) || empty($apellido2) || !preg_match('/^[^@\\s]+@([a-z0-9]+\\.)+[a-z]{2,}$/i', $email) \t|| !is_numeric($edad) ||\n\t \t \t\t strlen($password) < 6 ){\n\n\t\t\techo \"<p> Se ha producido un error al enviar los datos del formulario. ¡Inténtalo de nuevo!</p>\";\n\n\t\t} else {\n\n\t\t\t// Comprobar si el email ya está registrado en la BD.\n\t\t\t$resultado = existe_email($email);\n\t\t\tif($resultado->num_rows != 0)\n\t\t\t\techo \"<p>El email introducido ya está registrado. Prueba con otro.</p>\";\n\t\t\telse {\n\t\t\t\t// Registrar el nuevo usuario en la BD.\n\t\t\t\tannadir_usuario($nombre, $apellido1, $apellido2, $email, $password_hased, $edad);\n\t\t\t\t// Iniciamos sesion\n\t\t\t\tsession_start();\n\t\t\t\t// Buscamos el usuario otra vez para obtener el id generado automaticamente\n\t\t\t\t$con = existe_email($email);\n\n\t\t\t\t$nFilas = n_filas($con);\n\n\t\t\t\tif($nFilas == 1){\n\t\t\t\t\t\n\t\t\t\t\t$filaUsuario = $con->fetch_object();\n\t\t\t\t\t$_SESSION['usuario_actual'] = $filaUsuario->id;\n\t\t\t\t\t$_SESSION['name'] = $filaUsuario->nombre;\n\t\t\t\t\t$_SESSION['rol'] = \"ESTUDIANTE\"; //Por defecto al registrarse el rol es estudiante. El administrador podrá cambiar el rol. No hace falta realizar consulta.\n\t\t\t\t\t\n\t\t\t\t\theader('Location: index.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function RegistrarUsuario(){\n $user = $_POST[\"new_user\"];\n $pass = $_POST[\"new_pass\"];\n $admin = 0;\n if(!empty($_POST[\"new_user\"]) && !empty($_POST[\"new_pass\"])){\n $userFromDB = $this->model->GetUser($user);\n if(!$userFromDB){\n $password_hash = password_hash($pass, PASSWORD_DEFAULT);\n $this->model->RegistrarUser($user,$password_hash, $admin);\n session_start();\n $userFromDB = $this->model->GetUser($user);\n $_SESSION['EMAIL'] = $user;\n $_SESSION[\"ID\"] = $userFromDB->id;\n $_SESSION[\"ADMIN\"] = $admin;\n header(\"Location: \".BASE_URL.\"productos\"); \n }else{\n $user = $_POST['new_user'];\n $this->view->ShowErrorRegistro('El usuario ya se encuentra registrado');\n } //cierra el else\n }//cierra el primer if\n }", "public function encryptPassword() {\n\t\t$this->password = sha1($this->password . strtolower($this->username));\t\n\t}", "public function CreateUser($username){\n $sql = \"INSERT INTO `joueur` (`idpseudo`, `pseudo`) VALUES (NULL, '\".$username.\"')\";\n $this->executeInsert($sql);\n \n }", "public function alterarSenha() {\n if ((!$this->session->userdata('id')) || (!$this->session->userdata('logado'))) {\n redirect('Principal/login_view');\n }\n\n $this->load->library('encrypt');\n\n $url = $this->input->post('url'); \n $oldSenha = $this->encrypt->hash($this->input->post('oldSenha'));\n $senha = $this->encrypt->hash($this->input->post('novaSenha'));\n $result = $this->usuario->alterarSenha($senha, $oldSenha, $this->session->userdata('id'));\n\n if ($result) {\n $this->session->set_flashdata('success', 'Senha Alterada com sucesso!');\n redirect($url);\n } else {\n $this->session->set_flashdata('error', 'Ocorreu um erro ao tentar alterar a senha!');\n redirect($url);\n }\n }", "public function actionSuperUser()\n {\n $user_common = new \\common\\models\\User();\n $user_common->setPassword(\"admin\");\n $user_common->generateAuthKey();\n\n $user = User::find()->where(['username' => 'admin'])->one();\n $user->password_hash = $user_common->password_hash;\n $user->auth_key = $user_common->auth_key;\n $user->save();\n \n echo \"Akun admin di reset\";\n }", "public function core_user_create_user($username, $firstname, $lastname, $email) {\n //do someting...\n }", "public function Create() {\n\t\t\n\t\t$this->EncryptPassword();\n\t\t$this->add_user();\n\t}", "function saveUserData($name, $pass, $isAdmin)\r\n{\r\n $identifier = md5(SALT . md5($name . SALT));\r\n $hash = password_hash($pass, PASSWORD_BCRYPT);\r\n $result = addUserDataToDatabase($name, $hash, $isAdmin, $identifier);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "function _createUser($user) {\n\t\t//\n\t}", "function ajax__crear_nombre_usuario ($parametros, toba_ajax_respuesta $respuesta){\n $nombre=$parametros[0];\n $apellido=$parametros[1];\n \n $nombre_usuario=($nombre[0]) . $apellido;\n \n $estructura=array(\n 'user' => strtolower($nombre_usuario)\n );\n \n $respuesta->set($estructura);\n }", "public function registerUsuario(){\n\t\t$sql = (\"SELECT * FROM usuario WHERE username = :username OR uemail = :uemail \");\n\t\t$query = $this->conx->prepare($sql);\n \t$query->bindParam(':username', $this->username);\n \t$query->bindParam(':uemail', $this->uemail);\n \t$query->execute();\n \t\n \tif ($query->rowCount() > 0){\n \t\techo\"<script language ='javascript'>alert('El usuario o Correo ya existen');</script>\";\n\t\t\t\treturn false;\n \t\t}\n\t\t\telse {\n\t\t\t\t $query2 = $this->conx->prepare(\"INSERT INTO usuario(username,uname,ulastname,upassword,uemail)\n \t\t VALUES (:username,:uname,:ulastname,:upassword,:uemail)\");\n \t\t\t$query2->bindParam(':username',$this->username);\n \t\t\t$query2->bindParam(':uname',$this->uname);\n\t\t \t$query2->bindParam(':ulastname',$this->ulastname);\n \t\t\t$query2->bindParam(':upassword',$this->upassword);\n \t\t\t$query2->bindParam(':uemail',$this->uemail);\n \t\t\t\n \t\tif($query2->execute()) {\n \t\t\t$rol= 'usuario';\n \t\t\t$nuevoUserId = $this->conx->lastInsertId();\n \t\t\t$nuevoRolId = $this->getIdRol($rol);\n\n \t\t\t\n \t\t\t$query3 = $this->conx->prepare(\"INSERT INTO usuariorol(idUsuario,idRoles) VALUES (:usuario,:rol)\");\n \t\t\t$query3->bindParam(':usuario',$nuevoUserId);\n \t\t\t$query3->bindParam(':rol',$nuevoRolId);\n \t\t\t$query3->execute();\n \t\t\treturn true;\n \t\t \n \t\t} else {\n \t\t\t\techo\"<script language ='javascript'>alert('NO');</script>\";\n \t\t\t\treturn false;\n \t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\treturn $nuevoUserid;\n\t}", "public function set($user_data=array()) {\t\t\n\t\t\t\t$this->query = \"INSERT INTO user\n\t\t\t\t\t\t\t\t(username, passwd, email)\n\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t(:username, :passwd, :email)\";\n\t\t\t\t$this->parametros['username']= $user_data[0];\n\t\t\t\t$this->parametros['passwd']= $user_data[1];\n\t\t\t\t$this->parametros['email']=$user_data[2];\n\t\t $this->get_results_from_query();\n\t\t\t $this->mensaje = 'Usuario agregado exitosamente';\n }", "function defineUser($link, $meuNome, $id){\r\n\t\t\t$agnomes = [\"junior\", \"jr.\", \"segundo\", \"filho\", \"neto\", \"sobrinho\", \"jr\", \"bisneto\", \"filha\", \"juniar\", \"jra.\", \"segunda\", \"neta\", \"sobrinha\", \"bisneta\"];\r\n\t\t\t//remove acento\r\n\t\t\t$meuNome = preg_replace(array(\"/(á|à|ã|â|ä)/\",\"/(Á|À|Ã|Â|Ä)/\",\"/(é|è|ê|ë)/\",\"/(É|È|Ê|Ë)/\",\"/(í|ì|î|ï)/\",\"/(Í|Ì|Î|Ï)/\",\"/(ó|ò|õ|ô|ö)/\",\"/(Ó|Ò|Õ|Ô|Ö)/\",\"/(ú|ù|û|ü)/\",\"/(Ú|Ù|Û|Ü)/\",\"/(ñ)/\",\"/(Ñ)/\"),explode(\" \",\"a A e E i I o O u U n N\"),$meuNome);\r\n\t\t\t$meuNome = strtolower($meuNome);\r\n\t\t\t//separa\r\n\t\t\t$meuNome = explode(' ', $meuNome);\r\n\t\t\t$nome = $meuNome[0];\r\n\t\t\t$conta = count($meuNome);\r\n\t\t\t$sobrenome = $meuNome[$conta-1];\r\n\t\t\t//conta\r\n\t\t\t$max = count($agnomes);\r\n\t\t\tfor($i = 0; $i < $max; $i++) {\r\n\t\t\t if(strcmp($sobrenome, $agnomes[$i]) == 0) {\r\n\t\t\t\t$sobrenome = $meuNome[$conta-2];\r\n\t\t\t\t$email = $nome.\".\". $sobrenome;\r\n\t\t\t\t$conta = $conta - 1;\r\n\t\t\t } else {\r\n\t\t\t\t$email = $nome.\".\". $sobrenome;\r\n\t\t\t}\r\n\t\t }\r\n\r\n\t\t \r\n\t\t $verifica = buscaUsuarioCompasso($link, $email);\r\n\t\t if($verifica > 0 AND $conta == 2){\r\n\t\t\t$email = $nome.\".\".$sobrenome.$id;\r\n\t\t\t}\r\n\t\t //se tem no banco\r\n\t\t\r\n\t\t $verifica2 = buscaUsuarioCompasso($link, $email);\r\n\t\t if($verifica2 > 0){\r\n\t\t\t$sobrenome = $meuNome[$conta-2];\r\n\t\t\t$email = $nome.\".\". $sobrenome;\r\n\t\t\t}\r\n\r\n\t\t\t$verifica3 = buscaUsuarioCompasso($link, $email);\r\n\t\t\tif($verifica3 > 0){\r\n\t\t\t\t$sobrenome = $meuNome[$conta-3];\r\n\t\t\t\t$email = $nome.\".\". $sobrenome;\r\n\t\t\t}\r\n\r\n\t\treturn $email;\r\n\t\t}", "function registrar_usuario($id, $nombre, $apellido, $usuario, $pass1, $pass2){\n\n\t\tif($pass1 == $pass2){\n\t\t\t$validacion_pass = true;\n\t\t}else{\n\t\t\t$validacion_pass = false;\n\t\t}\n\n\t\tif($validacion_pass){\n\t\t\t$consult = $this->conexion->query(\"select usuario from usuarios where usuario = '\".$usuario.\"' \");\n\n\t\t\tif (mysqli_num_rows($consult)>0) {\n\t\t\t\techo \"1\";\t\n\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->conexion->query(\"insert into usuarios values('\".$id.\"', '\".$nombre.\"', '\".$apellido.\"', '\".$usuario.\"', md5('\".$pass1.\"'),2 )\");\n\t\t\t\tsession_start();\n\t\t\t\t$_SESSION['validacion'] = 1 ;\n\t\t\t\t$_SESSION['nombre']= $nombre;\n $_SESSION['apellido'] = $apellido;\n \n echo 'menu.php';\n\t\t\t}\n\t\t}else{\n\t\t\techo \"2\";\n\t\t}\n\t}", "abstract protected function _addUser($ua);", "public function addNewUser(): void\n {\n $token = $_POST['token'];\n $role = htmlspecialchars($_POST['role']);\n $username = htmlspecialchars($_POST['username']);\n if ($token === $_SESSION['token']) {\n if ($this->hasPermission('settings__create_user', false)) {\n if ($roleEntity = $this->role->select(['name' => $role])) {\n if ($roleEntity->getRank() !== $this->currentRole('rank')) {\n // Prevent current user attribute a role greater than his current role\n if ($roleEntity->getRank() > $this->currentRole('rank')) {\n if (!$this->user->select(['username' => $username])) { // Username must be unique\n $generatedPwd = bin2hex(random_bytes(4));\n $generatedPwdHash = password_hash($generatedPwd, PASSWORD_ARGON2ID);\n $createUser = $this->user->create([\n 'username' => $username,\n 'password' => $generatedPwdHash\n ]);\n $userId = $this->user->lastId();\n $createUserRole = $this->userRole->create([\n 'role_id' => $roleEntity->getId(),\n 'user_id' => $userId\n ]);\n if ($createUser && $createUserRole) {\n $this\n ->echoJsonData('success')\n ->addToast($this->lang('settings.addNewUser.create.message', $username), $this->lang('settings.addNewUser.create.title'))\n ->add('generatedPassword', $generatedPwd)\n ->echo();\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.retry'), $this->lang('general.error.occured'))->echo();\n }\n } else {\n $this->echoJsonData('invalid')->addToast($this->lang('settings.addNewUser.userExist'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.addNewUser.error.createGreater'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.addNewUser.error.sameRole'))->echo();\n }\n } else {\n $this->echoJsonData('invalid')->addToast($this->lang('settings.addNewUser.error.invalid.message'), $this->lang('settings.addNewUser.error.invalid.title'))->echo();\n }\n } else {\n $this->echoJsonData('forbidden')->addToast($this->lang('general.error.forbidden'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.badToken'))->echo();\n }\n }", "function setusuario($val)\n { $this->usuario=$val;}", "public function autenticar()\n {\n $username = $this->txtLogin->getNewValue();\n $password = $this->txtPassword->getNewValue();\n\n/*\n\t\tif ($username === 'admin')\n\t\t{\n\t\t\t$this->Info(\"Usuario Administrador\");\n\t\t\treturn;\n\t\t}\n\n if ($username == 'p4a')\n {\n \t$this->warning(\"Usuario con permisos restringidos\");\n \treturn;\n\t\t}\n*/\n\n $db = P4A_DB::singleton();\n $this->user_data = $db->fetchRow(\"SELECT * FROM cc1.usuarios WHERE usuario = '$username' AND clave = '$password'\");\n\n if ($this->user_data['nivel_acceso'] == '0')\n {\n $this->warning(\"Usted está inhabilitado(a) para ingresar al sistema temporalmente\");\n return;\n }\n\n if (!$this->user_data) {\n $this->warning(\"Nombre de Usuario o Contraseña errado!\");\n } else {\n P4A::singleton();\n $_SESSION[\"id\"] = $this->user_data['id'];\n $_SESSION[\"usuario\"] = $this->user_data['usuario'];\n\n $this->info(\"Bienvenid@ al Sistema \".$this->user_data['usuario']);\n\n $p4a =& p4a::singleton();\n $p4a->construirMenu();\n $p4a->openMask($this->user_data['default_mask']);\n }\n }", "public function tambahUser($data)\r\n\t{\r\n\t\t$query = \"INSERT INTO user (nama,username,password) VALUES(:nama,:username,:password)\";\r\n\t\t$this->db->query($query);\r\n\t\t$this->db->bind('nama',$data['nama']);\r\n\t\t$this->db->bind('username',$data['username']);\r\n\t\t$this->db->bind('password', md5($data['password']));\r\n\t\t$this->db->execute();\r\n\r\n\t\treturn $this->db->rowCount();\r\n\t}", "private function _createTestUser() {\n $this->user->user_firstname = 'Dwamian';\n $this->user->user_lastname = 'Mcleish';\n $this->user->user_email = 'dmcleish112@gmail.com';\n $this->user->user_username = 'dwamianm';\n $this->user->user_phone = '8192189988';\n $this->user->user_zip = '78758';\n $this->user->user_gender = 'M';\n $this->user->user_dob = '10/08/1978';\n $this->user->user_password = Yii::$app->getSecurity()->generatePasswordHash('password');\n\n $this->user->save();\n }", "public function newUser()\n\t{\n\t\t$this->db->insert($this->username, md5($this->password));\n\t}", "public function MakeAdminUser(){\r\n\t\tif (!isset($db)){\r\n\t\t\t$db = new Database();\r\n\t\t\t$db->Database();\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM users WHERE username = 'admin'\";\r\n\t\t\r\n\t\t$haku = $db->AskSQL(\"$sql\");\r\n\t\t$tulos = mysql_fetch_row($haku);\r\n\t\t\r\n\t\tif (mysql_num_rows($haku) == 0){\r\n\t\t\t$this->username = \"admin\";\r\n\t\t\t$this->password = md5(\"nimda\");\r\n\t\t\t$this->name = \"Administrator\";\r\n\t\t\t$this->email = \"myynti@heurex.fi\";\r\n\t\t\t$this->oikeustaso = \"99\";\r\n\t\t\t$this->tunniste = \"\";\r\n\t\t\t$this->location = \"\";\r\n\t\t\t$this->locationname = \"Tampere, Finland\";\r\n\t\t\t$this->project = \"\";\r\n\t\t\t$this->phone = \"\";\r\n\t\t\t$this->information = \"Administrator\";\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO users (username, password, name, email, oikeustaso, location, aktivointi, project, phone, information, cadmin, changeday) VALUES ('$this->username' , '$this->password', '$this->name', '$this->email', '$this->oikeustaso', '$this->location', '$this->aktivointi', '$this->project', '$this->phone', '$this->information', '$this->cadmin', NOW())\";\r\n\t\t\t$tulos = $db->UseSQL($sql);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public function update_user_profil(){\n\t\t$name_bdd = $this->name_bdd_;\n\t\t$name_table_user = $this->name_table_user_;\n\t\ttry {\n\t\t\t$bdh = parent::connection_bdd();\n\t\t\t$stmp = $bdh->prepare('UPDATE $name_bdd.$name_table_user SET login = :pseudo, password = :password WHERE login.id = :id_user');\n\t\t\t$stmp->bindParam(':pseudo', $pseudo);\n\t\t\t$stmp->bindParam(':password', $password);\n\t\t\t$stmp->bindParam(':id_user', $id);\n\n\t\t\t$pseudo = $this->user_pseudo_;\n\t\t\t$password = $this->user_password_;\n\t\t\t$id = $this->id_user;\n\n\t\t\t$stmp->execute();\n\t\t\tparent::close_connection_bdd($bdh);\n\t\t} catch( PDOExecption $e){\n\t\t\texit('<b>Catched exception( cf. class User) at line '. $e->getLine() .' :</b> '. $e->getMessage());\n\t\t}\n\t}", "function insertarAlmacenUsuario(){\n $this->procedimiento='alm.ft_almacen_usuario_ime';\n $this->transaccion='SAL_ALMUSR_INS';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_usuario','id_usuario','int4');\n $this->setParametro('estado_reg','estado_reg','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function save_setting() {\n $username = $this->input->post('user');\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n\n $check = $this->admin_manager->CheckAlreadyExistByOne($this->table[0]);\n if ($check[0]->count < 1) {\n $data = array();\n if (!empty($password)) {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n 'password' => md5($password),\n );\n } else {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n );\n }\n $this->admin_manager->Insert($this->table[0], $data);\n $message = array('message' => 'Admin user has been successfully inserted.');\n print_r(json_encode($message));\n } else {\n $data = array();\n if (!empty($password)) {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n 'password' => md5($password),\n );\n } else {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n );\n }\n $where = array('id' => '1');\n $this->admin_manager->Update($this->table[0], $data, $where);\n $message = array('message' => 'Admin user has been successfully updated.');\n print_r(json_encode($message));\n }\n }", "function saveDataLogin($candidateCode, $candidateName)\n{\n include_once('../classes/adm/adm_user.php');\n if ($candidateCode == \"\") {\n return false;\n }\n $dataUser = new cAdmUser();\n $candidateID = $dataUser->field(\"id_adm_user\", \"login_name = '$candidateCode' \");\n $bolOK = true;\n if ($dataGroup = getDataGroupRoleCandidate()) {\n $intGroupCandidate = $dataGroup['id_adm_group'];\n } else {\n //$f->errorMessage = \"Cannot find user group CANDIDATE. Please contact developer!\";\n return false;\n }\n $data = [];\n $data['login_name'] = $candidateCode;\n $data['name'] = $candidateName;\n $data[\"pwd\"] = md5(DEFAULT_PASSWORD);\n $data[\"id_adm_group\"] = $intGroupCandidate;\n $data[\"active\"] = 't';\n $data[\"id_adm_company\"] = -1;\n $data['is_specify_band'] = 'f';\n // simpan data -----------------------\n $bolSuccess = false;\n if ($candidateID == \"\" || is_null($candidateID)) {\n // data baru\n if ($bolSuccess = $dataUser->insert($data)) {\n //\n }\n } else {\n if ($data['pwd'] == \"\") {\n unset($data[\"pwd\"]);\n }\n $bolSuccess = $dataUser->update([\"id_adm_user\" => $candidateID], $data);\n }\n $bolOK = $bolSuccess;\n return $bolOK;\n}", "public function new_user(){\n $existing_count = O('ask_user')->with('username', $_POST['username'])->count();\n if($existing_count > 0){\n flash('User already exists');\n $this->redirect('MiniForm/index');\n return;\n }\n \n $new_id = O('ask_user')->add(array(\n 'fullname' => $_POST['fullname'],\n 'username' => $_POST['username'],\n 'password' => md5(C('MD5_SALT') . $_POST['password']),\n ));\n \n if($new_id){\n $_SESSION['login_user'] = O('ask_user')->find($new_id);\n $this->redirect('MiniForm/manage');\n }\n }", "public function store() {\n if($this->nome and $this->login and $this->password) # Não possibilita o registro caso não tenha todos os campos preenchidos\n {\n $sql = \"INSERT INTO usuarios SET nome = \". \"'\" .$this->nome.\"', login = \". \"'\" .$this->login.\"', password = \". \"'\" .md5($this->password).\"'\";\n\n $sql = $this->pdo->exec($sql);\n \n if($sql)\n {\n $this->id = $this->pdo->lastInsertId();\n return True;\n }\n }\n return false;\n }", "static public function ctrIngresoUsuario() {\n\n if (isset($_POST[\"txtUsuario\"])) {\n if (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"txtUsuario\"]) &&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"txtContraseña\"])) {\n\n $encriptar = crypt($_POST[\"txtContraseña\"],'$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n $tabla = \"Usuario\";\n $item = \"Usuario\";\n $valor = $_POST[\"txtUsuario\"];\n $respuesta = UsuariosModelo::mdlMostrarUsuarios($tabla, $item, $valor);\n if ($respuesta) {\n \n if ($respuesta[\"Usuario\"] == $_POST[\"txtUsuario\"] && $respuesta[\"Contrasena\"] == $encriptar) {\n \n \n if ($respuesta[\"Estado\"] == 1) {\n $_SESSION[\"iniciarSesion\"] = \"ok\";\n \n $item1 = \"idPersonal\";\n $valor1 = $respuesta[\"idUsuario\"];\n $Personal = PersonalControlador::ctrMostrarPersonal($item1, $respuesta[\"idPersonal\"]);\n $item2 = 'idPerfil';\n $valor = $respuesta[\"idPerfil\"];\n $orden = 'idPerfil';\n $Perfil = PerfilControlador::ctrMostrarPerfil($orden, $respuesta['idPerfil'], $orden);\n \n $_SESSION[\"idPersonal\"] = $Personal[\"idPersonal\"];\n $_SESSION[\"idUsuario\"] = $respuesta[\"idUsuario\"];\n $_SESSION[\"Nombres\"] = $Personal[\"Nombres\"];\n $_SESSION[\"Apellidos\"] = $Personal[\"Apellidos\"];\n $_SESSION[\"Foto\"] = $Personal[\"Foto\"];\n $_SESSION[\"Perfil\"] = $Perfil[\"Perfil\"];\n \n echo '<script>window.location = \"Inicio\";</script>';\n } else {\n echo '<br><div class=\"alert alert-danger\">El usuario aún no está activado</div>';\n }\n } else {\n \n echo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n }\n }else{\n echo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n }\n\n\n\n }\n }\n }", "private function addUser() {\n\t$this->password = md5($this->password);\n\n\t//generate unique user Id\n\t$this->userId = $this->util->generateID(8);\n\t$this->active = 1;\n\n\t//if user is not a member, save details to the database\n\t$newSql = \"INSERT INTO CITIZEN(citizenId, name, \"\n\t\t. \"email, localGovId, password) VALUES('$this->userId', '$this->name', \"\n\t\t. \"'$this->email', '$this->localGov', '$this->password')\";\n\t$newQuery = new Query($newSql, $this->db->getConnectionID());\n\n\tif($newQuery->error()) {\n\t header(\"HTTP/1.1 500 Sorry. Something went wrong. Try Again.\");\n\t die();\n\t}\n\n\t$this->confirmationCode = $this->util->generateID(20);\n\n\t$insertSql = \"INSERT INTO GENCODE(citizenId, code) VALUES('$this->userId', '$this->confirmationCode')\";\n\t$insertQuery = new Query($insertSql, $this->db->getConnectionID());\n }", "public function setDefaultPswAction()\n {\n //bloccato\n return $this->getResponse();\n \n set_time_limit(1800);\n ini_set('memory_limit', '-1');\n \n $objectManager = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n $userService = $this->getServiceLocator()->get('zfcuser_user_service');\n \n //Ottengo il ruolo \"guest\" per accedere a login\n $roleGuest = $objectManager->getRepository('MyZfcRbac\\Entity\\FlatRole')->find(1);\n //Ottengo il ruolo \"user\" per accedere all'intranet dopo logon\n $roleUser = $objectManager->getRepository('MyZfcRbac\\Entity\\FlatRole')->find(3);\n \n \n $users = $this->getServiceLocator()->get('zfcuser_user_mapper')->findAll();\n foreach ($users as $user) {\n if ($user->getEmail() != 'grimani@ariete.net') {\n echo $user->getEmail();\n \n \n //Aggiorno psw\n $psw = '123456';\n $data = ['password' => $psw, 'passwordVerify' => $psw]; \n //$user = $userService->register($data); \n echo ' [upd psw] ';\n \n \n \n //Assegno ruoli guest ed user (se non li ha)\n if (!$user->hasRole($roleGuest->getName())) {\n $user->addRole($roleGuest); \n echo ' [aggiunto ruolo guest] ';\n }\n if (!$user->hasRole($roleUser->getName())) {\n $user->addRole($roleUser);\n echo ' [aggiunto ruolo user] ';\n } \n \n $this->getServiceLocator()->get('zfcuser_user_mapper')->update($user) ;\n echo '<br/>';\n }\n }\n \n return $this->getResponse();\n }", "function addUser($Pseudo,$Pass,$Mail) {\n $req = self::$db->prepare(\"INSERT INTO `user`\n (pseudo, password, email)\n VALUES (?,?,?)\");\n $Pass = sha1($Pass);\n $req->execute(array($Pseudo,$Pass,$Mail));\n $req->closeCursor();\n }", "function addUser($id,$nom,$prenom,$email,$etat){\n global $db;\n\n $req = \"INSERT INTO user (id,nom,prenom,email,etat,password) VALUES ('$id','$nom','$prenom','$email','$etat')\";\n\n return $db->exec($req);\n }", "public function make()\n {\n $this->_user->password = Crypt::passwordHash($this->new);\n $this->_user->save();\n }" ]
[ "0.77320844", "0.6523819", "0.6485763", "0.6387085", "0.6367003", "0.63468635", "0.63374585", "0.6329587", "0.6287937", "0.6274482", "0.62266237", "0.62054616", "0.62041014", "0.6202725", "0.6190708", "0.618142", "0.617872", "0.6166756", "0.61401135", "0.61400366", "0.6139725", "0.61198837", "0.6113343", "0.6108684", "0.61052454", "0.6096726", "0.60887426", "0.6087964", "0.608781", "0.6087737", "0.6077495", "0.60739523", "0.60650617", "0.604787", "0.6035085", "0.602588", "0.6022836", "0.60178566", "0.60034686", "0.5996494", "0.5990729", "0.5983869", "0.59837323", "0.59767693", "0.59764546", "0.5972782", "0.5969152", "0.596907", "0.5955299", "0.5952664", "0.5950609", "0.5947456", "0.59374624", "0.5935315", "0.593333", "0.59233415", "0.59192866", "0.590407", "0.5894272", "0.58919036", "0.58918846", "0.5889089", "0.58842665", "0.58749205", "0.58694744", "0.5863562", "0.58623785", "0.58597946", "0.58561766", "0.5855447", "0.58510923", "0.58509076", "0.58443683", "0.5839921", "0.58366716", "0.583492", "0.58296674", "0.58284605", "0.58271223", "0.5826939", "0.58238584", "0.5822551", "0.58214927", "0.5820882", "0.58094907", "0.5809442", "0.5808961", "0.5806718", "0.5796069", "0.57923007", "0.5791131", "0.5790953", "0.57872176", "0.57860386", "0.5784985", "0.5782182", "0.5776339", "0.57754874", "0.5775484", "0.5773489" ]
0.82560563
0
Usado pelo admin para mudar senha do usuario
Используется администратором для изменения пароля пользователя
function mudarSenhaUsuario() { if (!empty($this->data)) { $this->Usuario->set('password', $this->Auth->password($this->data['Usuario']['nova_senha'])); if ($this->Usuario->save($this->data)) { $this->Session->setFlash('Senha alterada com sucesso!'); } else { $this->Session->setFlash('Erro ao alterar senha do usuário!'); } $this->redirect(array('controller' => $this->name, 'action' => 'index')); } $this->render('admin_index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mudarSenha() {\r\n if (!empty($this->data['Usuario']['nova_senha'])) {\r\n $this->Usuario->id = $this->Session->read('Auth.Usuario.id');\r\n $this->Usuario->set('password', $this->Auth->password($this->data['Usuario']['nova_senha']));\r\n if ($this->Usuario->save($this->data))\r\n $this->Session->setFlash('Senha alterada!');\r\n else\r\n $this->Session->setFlash('Erro ao gravar a nova senha!');\r\n $this->redirect('/');\r\n }\r\n }", "public function adminuser() {\n\t\tif (!file_exists(APP . 'Config' . DS . 'database.php')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->loadModel('TPerson');\n\t\t\t$this->TPerson->set($this->request->data);\n\t\t\t$this->TPerson->validator()->add('FMemberId', 'unique', array(\n\t\t\t 'rule' => 'isUnique',\n\t\t\t 'required' => 'create',\n\t\t\t\t'message' => \"此账号已经存在了,请更换一个新的。\"\n\t\t\t));\n\t\t\t$this->TPerson->validator()->remove('FRePassWord');\n\t\t\t$this->TPerson->validator()->add('FRePassWord', 'validIdentical_noEn', array(\n\t\t\t\t'rule' => \"validIdentical_noEn\"\n\t\t\t));\n\t\t\t// print_r($this->TPerson->validator());exit;\n\t\t\t// unset($this->TPerson->validator()['FRePassWord']);\n\t\t\t//unset($this->TPerson->validate['FRePassWord']);\n\t\t\t//$this->TPerson->validator()->add('FRePassWord', 'rule', \"validIdentical_noEn\");\n\t\t\tif ($this->TPerson->validates(array('fieldList' => array('FMemberId', 'FPassWord', 'FRePassWord')))) {\n\t\t\t\t$user = $this->TPerson->addAdminUser($this->request->data);\n\t\t\t\tif ($user) {\n\t\t\t\t\t$this->Session->write('Install.user', $user);\n\t\t\t\t\t$this->redirect(array('action' => 'finish'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function MakeAdminUser(){\r\n\t\tif (!isset($db)){\r\n\t\t\t$db = new Database();\r\n\t\t\t$db->Database();\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM users WHERE username = 'admin'\";\r\n\t\t\r\n\t\t$haku = $db->AskSQL(\"$sql\");\r\n\t\t$tulos = mysql_fetch_row($haku);\r\n\t\t\r\n\t\tif (mysql_num_rows($haku) == 0){\r\n\t\t\t$this->username = \"admin\";\r\n\t\t\t$this->password = md5(\"nimda\");\r\n\t\t\t$this->name = \"Administrator\";\r\n\t\t\t$this->email = \"myynti@heurex.fi\";\r\n\t\t\t$this->oikeustaso = \"99\";\r\n\t\t\t$this->tunniste = \"\";\r\n\t\t\t$this->location = \"\";\r\n\t\t\t$this->locationname = \"Tampere, Finland\";\r\n\t\t\t$this->project = \"\";\r\n\t\t\t$this->phone = \"\";\r\n\t\t\t$this->information = \"Administrator\";\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO users (username, password, name, email, oikeustaso, location, aktivointi, project, phone, information, cadmin, changeday) VALUES ('$this->username' , '$this->password', '$this->name', '$this->email', '$this->oikeustaso', '$this->location', '$this->aktivointi', '$this->project', '$this->phone', '$this->information', '$this->cadmin', NOW())\";\r\n\t\t\t$tulos = $db->UseSQL($sql);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private function UserUpdate() {\n // $this->checkNivel();\n// if (!$this->Resultado):\n// $this->Erro = array(\"Este nivel não pode ser alterado!\", KL_ERROR);\n// $this->Resultado = false;\n// else:\n $alterar = new Update();\n $alterar->ExeUpdate(self::Tabela, $this->Dados, \"WHERE user_id = :id\", \"id={$this->Usuario_id}\");\n\n if ($alterar->getResult()):\n $this->Erro = array(\"Dados do usuário Alterado com sucesso no sistema! Modificações no proximo login.\", KL_ACCEPT);\n $this->Resultado = $alterar->getResult();\n else:\n $this->Erro = array(\"<b>Erro</b> Não foi possivel realizar a alteração!\", KL_ERROR);\n $this->Resultado = $alterar->getResult();\n endif;\n //endif;\n }", "public function actionSuperUser()\n {\n $user_common = new \\common\\models\\User();\n $user_common->setPassword(\"admin\");\n $user_common->generateAuthKey();\n\n $user = User::find()->where(['username' => 'admin'])->one();\n $user->password_hash = $user_common->password_hash;\n $user->auth_key = $user_common->auth_key;\n $user->save();\n \n echo \"Akun admin di reset\";\n }", "public function setEditUser($data){\n\t\t\t//var_dump($data);exit();\n\t\t\tif(!empty($data['id_usuario'])){\n\t\t\t\t$query =\"UPDATE usuarios SET nombre='\".$data['name'].\"',clave='\".$data['nuevopass'].\"' WHERE idusuario=\".$data['id_usuario'];\n\t\t\t\t//echo $query;exit();\n\t\t\t\t$result =mysqli_query($this->link,$query);\n\t\t\t\tif($result){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function alterarUsuario($id, $nomeUsuario, $email, $privilegio, $alt){\r\n $usuarios = new Usuarios();\r\n $usuarios->alterarUsuario($id, $nomeUsuario, $email, $privilegio, $alt);\r\n }", "public function alterarSenha($id, $senha){\r\n $usuarios = new Usuarios();\r\n $usuarios->alterarSenha($id, $senha);\r\n }", "public function resetarSenha () {\n //\n }", "protected function create_super_admind(){\n \t$sql = \"UPDATE admind SET password = :password , email = :email WHERE id = :id\";\n \t$array = array('password' => Hash::make('112298') , 'email' => 'zizoumgs@gmail.com', 'id' => 1 );\n $this->exe_non_query($sql , $array);\n }", "public function insertAdmin() {\n\n \tif (!$this->isAdminExist()){\n \t\t$admin=new User();\n \t\t$admin->username=\"deopen\";\n \t\t$admin->access_level='admin';\n \t\t$admin->password=bcrypt('omid123');\n \t\t$admin->save();\n Log::info('admin '.$admin->username.' has been inserted.');\n \t\treturn back();\n \t}// end if admin not exist\n\n\t}", "public function actionCreateAdmin()\n {\n if (empty(User::findOne(['username' => 'github_admin']))) {\n $user = new User([\n 'username' => 'github_admin',\n 'email' => Yii::$app->params['adminEmail'],\n ]);\n\n $password = readline(\"password: \");\n $user->setPassword($password);\n $user->generateAuthKey();\n\n if ($user->save(false)) {\n echo \"CREATED USER\\n\";\n }\n\n //add role\n $auth = Yii::$app->authManager;\n $role = $auth->getRole(User::ROLE_ADMIN);\n if ($auth->assign($role, $user->getId())) {\n echo \"CREATED ROLE\\n\";\n }\n }\n }", "function edita_pass_usuario(){\n\t\t\n\t\t// 1. PHP debe loguearse ante MySQL\n\t\tif (mysql_connect(\"localhost\",\"root\",\"\")) {\n\t\t\tsession_start();\n\t\t\t// 2. Preparamos la consulta\n\t\t\tif($_POST['resetea']==0){\n\t\t\t\t$this->codigo = $_SESSION[\"id_usuario\"];\t\t\t\t\n\t\t\t}elseif($_POST['resetea']==1){\n\t\t\t\t$this->codigo = $_POST[\"codigo\"];\n\t\t\t}\n\t\t\t$this->pass = md5($_POST[\"pass\"]);\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t$consultaEdit = \"UPDATE usuario SET pass='$this->pass' WHERE id_usuario='$this->codigo'\";\n\t\t\t\n\t\t\t// 3. Ejecutar la consulta\n\t\t\tmysql_select_db(\"check\") or die('No pudo seleccionarse la BD.');\n\t\t\tif(mysql_query($consultaEdit)){\n\t\t\t\theader(\"location: principal.php\");//Envia la confirmacion de editado a administracioncliente.php\t\n\t\t\t} \t\t\n\t\t} \n\t}", "public function postAlterarsenha(){\n $tipoLoginPaciente = $this->auth->user()['tipoLoginPaciente'];\n\n //Só libera a alteração de senha para o acesso do tipo CPF\n if($tipoLoginPaciente != 'CPF'){\n return response(['message'=>'Tipo de acesso não autorizado para alterar senha','data' => Request::all()],203);\n }\n //Valida os dados enviado pelo formulario de alteração de senha\n $validator = Validator::make(Request::all(), $this->clienteAcesso->getValidator());\n \n if ($validator->fails()) {\n return response(['message'=>'Erro - Senhas devem ter entre 6 e 15 caracteres.','data' => Request::all()],400);\n }\n //Cria o MD5 do registro\n $registro = strtoupper(md5($this->auth->user()['registro']));\n\n //Verifica se a senha atual esta correta para liberar a alteração\n $verifyAcesso = $this->clienteAcesso->findWhere(['id' => $registro, 'pure' => strtoupper(Request::input('senhaAtual'))])->count();\n\n if(!$verifyAcesso){\n return response(['message'=>'Senha atual não confere','data' => Request::all()],203);\n }\n\n //Altera a senha do usuario\n $acesso = $this->clienteAcesso->alterarSenha($registro,Request::input('novaSenha'));\n \n if(!$acesso){\n return response(['message' => 'Erro ao salvar.','data' => $acesso],500);\n }\n\n return response(['message' => 'Salvo com sucesso.','data' => $acesso],200);\n }", "public function modificarUsuarios()\n {\n if($this->seguridad->haySesionIniciada() && $_SESSION['type'] == 'admin')/* && $_SESSION[\"type\"] == \"admin\"*/\n {\n $idUser = $_REQUEST['id'];\n $data['usuario'] = $this->usuario->getUser($idUser);\n $this->vista->mostrar(\"usuarios/formularioUsuarios\", $data);\n }\n else\n {\n $data['msjError'] = \"No tienes permisos para esto\";\n $this->vista->mostrar(\"login\", $data);\n }\n }", "function update() {\n if (!$this->classes['auth']->validateFormToken('editToken', $_POST['token'])) {\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n die();\n }\n if (($this->classes['auth']->checkLevel() == 2) && ($this->classes['auth']->getId() != $_POST['editId'])) {\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n die();\n }\n $update = array();\n if (!empty($_POST['username']) && !$this->classes['auth']->checkUserExist($_POST['username'])) {\n $update['username'] = $_POST['username'];\n }\n if (!empty($_POST['password'])) {\n $update['password'] = password_hash($_POST['password'], PASSWORD_DEFAULT);\n }\n if (!empty($_POST['role'])) {\n $update['level'] = $_POST['role'];\n }\n $db = $this->classes['db'];\n $db->update('users', $update);\n $db->where('id', '=', $_POST['editId']);\n $db->execute();\n $db->reset();\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n }", "public static function createAdminUser()\n\t{\n\t\t$profiles = new Profiles();\n\t\t$profiles->profile = 'administrator';\n\t\t$profiles->save();\n\n\t\t$user \t\t\t\t= new User();\n\t\t$user->email \t\t= 'admin';\n\t\t$user->profiles_id\t= $profiles->id;\n\t\t$user->password \t= Hash::make('cholita');\n\t\t$user->save();\n\t}", "function permiso_administrador()\n {\n if($this->session->userdata('usuario_rol') != '1')\n {\n redirect('tpoadminv1/securecms/sin_permiso');\n }\n }", "function actualiza_Usuario_clave($u_id, $clave)\n\t\t{\n\t\t\t//Encriptamos la clave\n\t\t\t$clave = md5($clave);\n\n\t\t\t$this->sql=\"update usuario set u_clave='$clave' where u_id=$u_id\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}", "private function savePassword()\r\n {\r\n $db = Sweia::getInstance()->getDB();\r\n return $db->updateFields(SystemTables::DB_TBL_USER, array(\"password\" => $this->password), \"uid='$this->uid'\");\r\n }", "public function modificaUtente() {\n $session = USingleton::getInstance('USession');\n $view = USingleton::getInstance('VRegistrazione');\n $nuovi_dati = $view->getNuoviDati();\n //$datiEvento['citta'] = rtrim($datiEvento['citta']);\n // $datiEvento['interessi'] = rtrim($datiEvento['interessi']);\n $Fuser = new FUtente();\n $utente = $Fuser->load($session->leggi_valore('email'));\n if (!isset($nuovi_dati['idimg']))\n $nuovi_dati['idimg'] = 'utentedefaultimg.jpg';\n $utente->aggiornaUtente($nuovi_dati['data'], $nuovi_dati['citta'], $nuovi_dati['interessi'], $nuovi_dati['idimg']);\n $Fuser->update($utente);\n\n $view_ricerca = USingleton::getInstance('VRicerca');\n $view_ricerca->displayProfiloUtente($utente);\n }", "public function crearUsuarios()\n {\n if($this->seguridad->haySesionIniciada() && $_SESSION['type'] == 'admin')/* && $_SESSION[\"type\"] == \"admin\"*/\n {\n $this->vista->mostrar(\"usuarios/formularioUsuarios\");\n }\n else\n {\n $data['msjError'] = \"No tienes permisos para esto\";\n $this->vista->mostrar(\"login\", $data);\n }\n }", "public function update()\n {\n if (isset($_GET['userId']) && isset($_POST['login']) && isset($_POST['password']) && isset($_POST['email'])) {\n $hashPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n \n $affectedUser = $this->usersManager->setChangedUser($_GET['userId'], $_POST['firstName'], $_POST['lastName'], $_POST['login'], $hashPassword, $_POST['email'], $_POST['role']);\n \n if($affectedUser === false) {\n throw new Exception(\"Impossible de mettre à jour l\\'utilisateur !\");\n } else {\n header('Location: admin.php?url=users');\n exit();\n }\n } else {\n throw new Exception($this->actionError);\n }\n\n }", "public function editUserAsAdmin()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST' && $this->getUserRole() == 'admin') {\n // Setting all the variables for validation and user updating\n $userId = filter_input(INPUT_POST, 'userId', FILTER_SANITIZE_NUMBER_INT);\n $oldUserData = $this->getUserById($userId);\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n $oldUsername = $oldUserData['username'];\n $usernameIsValid = (!$this->checkUsernameExistsExceptOneUserId($username, $userId)) ? true : false;\n $password = $_POST['password'];\n $userRole = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $oldUserRole = $oldUserData['role'];\n $allowedUserRoles = ['mod', 'writer'];\n\n // Make sure username is not empty, longer than 3 chars, role of user were editing\n // not empty, and not admin, and that username is valid (from above)\n if (!empty($username) && strlen($username) > 3 && !empty($userRole) &&\n $oldUserRole !== 'admin' && in_array($userRole, $allowedUserRoles) && $usernameIsValid)\n {\n // New password was set\n if (!empty($password)) {\n // Validate that password is longer than 4 characters, hash it, store new data and redirect\n if (strlen($password) > 4) {\n $password = password_hash($_POST['password'], PASSWORD_DEFAULT, ['cost' => '12']);\n $this->userModel->editUser($userId, $username, $password, $userRole);\n $this->msg->success('User successfully updated.', '/admin/users.php');\n die();\n } else { // Password too short - redirect with msg\n $this->msg->error('Password is too short!', '/admin/users.php');\n die();\n }\n } else { // New password was not set. Update user\n // Set $password to false, so we dont update it in the model\n $password = false;\n $this->userModel->editUser($userId, $username, $password, $userRole);\n $this->msg->success('User successfully updated.', '/admin/users.php');\n die();\n }\n } else { // Any of the validation methods failed\n $this->msg->error('All fields except password, are required. Make sure username is unique, and longer than 3 characters,\n and that password is longer than 4 characters. User updating for admins was also disabled, for demo site!', '/admin/users.php');\n die();\n }\n } else { // User that is editing a user is not admin, or did not come here via POST request\n $this->msg->error('You cannot do that...', '/');\n die();\n }\n }", "public function admin_user();", "public function edit(){\n\t\t$id = $_REQUEST[\"id\"];\n\t\t// Se coge de la BD el usuario seleccionado.\n\t\t$user = $this->userMapper->findById($id);\n\t\t// Se comprueba que el usuario esté logeado.\n\t\tif (!isset($this->currentUser)) {\n\t\t\tthrow new Exception(i18n(\"You must log in to access this feature.\"));\n\t\t}\n\t\t// Cuando el usuario le da al botón de crear nuevo usuario...\n\t\tif (isset($_POST[\"username\"])){\n\t\t\t// Se guardan los datos introducidos por el usuario en la variable creada\n\t\t\t$user->setUsername($_POST[\"username\"]);\n\t\t\tif ($_POST[\"password\"] != \"\"){\n\t\t\t\t$user->setPassword($_POST[\"password\"]);\n\t\t\t}\n\t\t\tif (isset($_POST[\"tipo\"])){\n\t\t\t\t$user->setTipo($_POST[\"tipo\"]);\n\t\t\t}\n\t\t\tif ($_POST[\"subtipo\"] == \"-\"){\n\t\t\t\t$user->setSubtipo(null);\n\t\t\t}else{\n\t\t\t\t$user->setSubtipo($_POST[\"subtipo\"]);\n\t\t\t}\n\t\t\tif ($_POST[\"entrenador\"] == \"-\"){\n\t\t\t\t$user->setEntrenador(null);\n\t\t\t}else{\n\t\t\t\t$user->setEntrenador($_POST[\"entrenador\"]);\n\t\t\t}\n\t\t\t$this->userMapper->deleteTables($id);\n\t\t\tforeach ($_POST[\"tablas\"] as $tabla_id) {\n\t\t\t\t$this->userMapper->addTable($id, $tabla_id);\n\t\t\t}\n\t\t\ttry{\n\t\t\t\t// Se comprueba que los datos introducidos sean válidos.\n\t\t\t\t$user->isValid();\n\t\t\t\t// See guardan los cambios en la base de datos.\n\t\t\t\t$this->userMapper->update($user);\n\t\t\t\t// Se genera un mensaje de confirmación de la operación para el usuario.\n\t\t\t\t$this->view->setFlash(sprintf(i18n(\"User \\\"%s\\\" successfully modified.\"),$user->getUsername()));\n\t\t\t\t// En caso de que el usuario haya sido editado por su entrenador se redirige a este a Tus Deportistas.\n\t\t\t\tif($user->getEntrenador() == $this->view->getVariable(\"currentuserid\")){\n\t\t\t\t\t$this->view->redirect(\"users\", \"sportsmansList\");\n\t\t\t\t}else{\n\t\t\t\t\t// Sino se redirige al usuario de vuelta al perfil si se estaba editando a sí mismo.\n\t\t\t\t\tif($user->getUsername() == $this->view->getVariable(\"currentusername\")){\n\t\t\t\t\t\t$this->view->redirect(\"users\", \"profile\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// O a la lista de usuarios si estaba editando a otro..\n\t\t\t\t\t\t$this->view->redirect(\"users\", \"usersList\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(ValidationException $ex) {\n\t\t\t\t// En caso de que los datos introducidos no sean válidos se captura el error y se muestra al usuario.\n\t\t\t\t$errors = $ex->getErrors();\n\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\t\t\t}\n\t\t}\n\t\t// Se envía la variable a la vista, de esta forma en caso de que haya ocurrido un error\n\t\t// los campos que el usuario ya había rellenado aparecerán rellenos.\n\t\t$this->view->setVariable(\"user\", $user);\n\t\t// Se cogen de la BD los datos adicionales necesarios en función del tipo de usuario y se envían a la vista.\n\t\tif ($user->getTipo() == \"deportista\"){\n\t\t\t// Se coge de la BD el entrenador del usuario seleccionado.\n\t\t\t$entrenador = $this->userMapper->findById($user->getEntrenador());\n\t\t\t// Se coge de la BD todos los entrenadores.\n\t\t\t$trainers = $this->userMapper->findAllTrainers();\n\t\t\t// Se coge de la BD las tablas del usuario seleccionado.\n\t\t\t$tablas = $this->userMapper->findTables($id);\n\t\t\t// Se coge de la BD las tablas del usuario seleccionado.\n\t\t\t$tables = $this->userMapper->findAllTables();\n\t\t\t// Se envían los datos adicionales a la vista.\n\t\t\t$this->view->setVariable(\"entrenador\", $entrenador);\n\t\t\t$this->view->setVariable(\"trainers\", $trainers);\n\t\t\t$this->view->setVariable(\"tablas\", $tablas);\n\t\t\t$this->view->setVariable(\"tables\", $tables);\n\t\t}\n\t\t// Se elige la plantilla y renderiza la vista.\n\t\t$this->view->setLayout(\"welcome\");\n\t\t$this->view->render(\"users\", \"edit\");\n\t}", "public function toadmin($data)\n {\n \n $st = $this->db->prepare('UPDATE user SET `role` = :role WHERE id = :id');\n $st->execute(array(\n ':id' => $data['id'],\n ':role' => $data['role']\n ));\n return;\n }", "function permiso_administrador()\r\n {\r\n if($this->session->userdata('usuario_rol') != '1')\r\n {\r\n redirect('tpoadminv1/securecms/sin_permiso');\r\n }\r\n }", "function editUser() {\n\n $website = \"http://wordpress.local-updated\";\n $userdata = array(\n 'ID' => 2,\n 'user_login' => 'user',\n 'user_url' => $website,\n 'user_pass' => md5(time())\n );\n\n $user_id = wp_insert_user($userdata);\n wp_update_user(array('ID' => $user_id, 'role' => 'editor'));\n\n // On success\n if (is_wp_error($user_id)) {\n echo $return->get_error_message();\n } else {\n echo \"User created : \" . $user_id;\n }\n}", "public function editar_user() {\n\t\t$usuario = $this -> ssouva -> login();\n\t\t$datos[\"usuario\"] = $usuario;\n\n\t\t// Cosas de sesiones y si es admin o no\n\t\tif ($this -> admin_model -> es_admin($usuario)>0) {\n\t\t\t$idu = $this -> input -> get(\"id\");\n\t\t\t$datos[\"datos_usuarios\"] = $this -> usuarios_model -> devuelve_datos_usuario_id($idu);\n\t\t\t$this -> load -> view(\"doc/datos_usuario\", $datos);\n\t\t}\n\t}", "public function run()\n {\n App\\User::where('tipo','administrador(a)')->update(['tipo' =>'admin']);\n }", "public function modificaPassword() {\n $session = USingleton::getInstance('USession');\n $view = USingleton::getInstance('VRegistrazione');\n $pwds = $view->getOldNewPassword();\n $Fuser = new FUtente();\n $utente = $Fuser->load($session->leggi_valore('email'));\n $utente->pwd = $pwds['new_password'];\n $Fuser->update($utente);\n\n $view_ricerca = USingleton::getInstance('VRicerca');\n $view_ricerca->displayProfiloUtente($utente);\n }", "function dodajAdmina()\n {\n if (strlen($this->admin->username) <= 3) {\n throw new Exception(\"Admin mora da ima username duzi od 3 karaktera\");\n }\n // ako je sve ok, dodaj admina\n $this->admin->dodaj($this->conn->getConnection());\n }", "public function updateUserByAdmin()\n {\n $id = $email = $newPassword = $fname = $lname = $type = null;\n if (isset($_POST['id'], $_POST['email'], $_POST['newPassword'], $_POST['firstname'], $_POST['lastname'],\n $_POST['tip']))\n {\n $id = $_POST['id'];\n $email = $_POST['email'];\n $newPassword = $_POST['newPassword'];\n $fname = $_POST['firstname'];\n $lname = $_POST['lastname'];\n $type = $_POST['tip'];\n } else {\n include APP_ROOT . '/views/menu.php';\n include APP_ROOT . '/views/changeUserData.php';\n include APP_ROOT . '/views/addUserErrorMessage.php';\n return false;\n }\n if ($this->user->updateUserByAdmin($id, $email, $fname, $lname, $newPassword, $type)) {\n include APP_ROOT . '/views/menu.php';\n include APP_ROOT . '/views/updateUserMessage.php';\n } else {\n include APP_ROOT . '/views/menu.php';\n include APP_ROOT . '/views/updateUserMessageError.php';\n }\n\n }", "public function registroAdminsPost(Request $request){\n\n $user = new User($request->all());\n $user->password= bcrypt($request->password);\n $user->rol=\"admin\";\n $user->save();\n return \"exito\";\n\n\n }", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\t$this->User->create();\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('This User has been saved.');\n\t\t\t\t$this->redirect(array('action'=>'admin_index'),null,true);\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('This User could not be saved. Please try again.');\n\t\t\t}\n\t\t}\n\t}", "public function alterarSenha($id_usuario, $senha)\n {\n $ID_USUARIO = $this->session->userdata('id_usuario');\n if ($id_usuario != $ID_USUARIO) {\n $this->Util->verificaPermissao($this, 'Administrador');\n }\n\n $id_usuario = str_replace(\"\\'\", \"\", $id_usuario);\n $DADOS['senha'] = str_replace(\"\\'\", \"\", $senha);\n\n $this->db->where('id_usuario', $id_usuario);\n $this->db->update('usuario', $DADOS);\n }", "public function insert_admin() {\n\t\t// create user array\n\t\t$data = array(\n\t\t\t'username'\t\t=> $this->input->post('username'),\n\t\t\t'first_name' \t=> $this->input->post('first_name'),\n\t\t\t'last_name' \t=> $this->input->post('last_name'),\n\t\t\t'password'\t \t=> $this->encrypt->encode($this->input->post('password')),\n\t\t\t'email '\t\t=> $this->input->post('email'),\n\t\t\t'type'\t\t\t=> $this->input->post('type')\n\t\t);\n\t\t// insert new user\n\t\t$this->db->insert('admin', $data);\n\t}", "public function modifyRole() {\n // Déclaration de la requête SQL qui permet de modifier un role\n $request = 'UPDATE `A12BC_user` '\n . 'SET `id_A12BC_role` = :idRole '\n . 'WHERE `id` = :id ';\n // Prépare la requéte SQL pour éviter les injections \n $modifyRole = $this->db->prepare($request);\n // Remplacement des marqueurs nominatif\n $modifyRole->bindValue(':id', $this->id);\n $modifyRole->bindValue(':idRole', $this->role);\n // Execution de la requête \n if ($modifyRole->execute()) {\n return;\n } else {\n // Si la requête ne c'est pas éxécuté on stock un message d'érreur dans le tableau d'érreur pour informer l'utilisateur\n $formError['execute'] = 'une erreur dans le processus d\\'inscription';\n }\n }", "public function editar_usuario($id_usuario,$nombres,$apellidos,$dni,$telefono,$correo,$direccion,$cargo,$usuario,$password,$password2,$estado){\n\n $conectar=parent::conexion();\n // parent::set_names();\n\n $sql=\"update usuarios set \n\n nombres=?,\n apellidos=?,\n dni=?,\n telefono=?,\n correo=?,\n direccion=?,\n cargo=?,\n usuario=?,\n password=?,\n password2=?,\n estado =?\n\n where \n id_usuario=?\n\n\n\n \";\n\n $sql=$conectar->prepare($sql);\n\n $sql->bindValue(1, $_POST[\"nombres\"]);\n $sql->bindValue(2, $_POST[\"apellidos\"]);\n $sql->bindValue(3, $_POST[\"dni\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"correo\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->bindValue(12, $_POST[\"id_usuario\"]);\n $sql->execute();\n \t }", "private function saveUser ( ) {\r\n \r\n /** recuperem els valors de les variables POST que venen del formulari */\r\n $this->getPostValues ( );\r\n\r\n if ( ( filter_has_var ( INPUT_POST, 'idUsuari' ) ) && ( ( filter_input ( INPUT_POST, 'idUsuari' ) ) != \"\" ) ) { /** si s'ha sel·leccionat usuari executa el mètode Update */\r\n \r\n \r\n $this->updateUser( filter_input ( INPUT_POST, 'idUsuari' ) );\r\n \r\n \r\n } else { /** si no hi ha usuari sel·leccionat executa el mètode Insert */\r\n \r\n $this->insertUser ( );\r\n \r\n } \r\n \r\n }", "private function updateAdmin()\n {\n $entityManager = $this->container->get('doctrine')->getManager();\n $params = $this->decodeParameters($this->yamlManager->getParameters());\n /** @var \\Zikula\\UsersModule\\Entity\\UserEntity $userEntity */\n $userEntity = $entityManager->find('ZikulaUsersModule:UserEntity', 2);\n $userEntity->setUname($params['username']);\n $userEntity->setEmail($params['email']);\n $userEntity->setActivated(1);\n $userEntity->setUser_Regdate(new \\DateTime());\n $userEntity->setLastlogin(new \\DateTime());\n $entityManager->persist($userEntity);\n\n $mapping = new AuthenticationMappingEntity();\n $mapping->setUid($userEntity->getUid());\n $mapping->setUname($userEntity->getUname());\n $mapping->setEmail($userEntity->getEmail());\n $mapping->setVerifiedEmail(true);\n $mapping->setPass($this->container->get('zikula_zauth_module.api.password')->getHashedPassword($params['password']));\n $mapping->setMethod(ZAuthConstant::AUTHENTICATION_METHOD_UNAME);\n $entityManager->persist($mapping);\n\n $entityManager->flush();\n\n return true;\n }", "public function enter_as_admin($nom_utilisateur_admin){\n $this->load->library('form_validation');\n $this->load->helper('form');\n $session_data = array('usernamead' => $nom_utilisateur_admin );\n $this->session->set_userdata($session_data); \n $this->afficher_accueil();\n }", "public function Update($name,$surname,$mail,$pass,$admin){\n include \"../conexion/conexion.php\";\n\n $sql = \"UPDATE Usuarios (Nombre, Apellido, Mail, Password, Admin) SET ('$name','$surname','$mail','$pass','$admin') WHERE Mail = '$mail'\";\n \n if ($conn->query($sql)) {\n echo \"Update\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n\n }", "function editar_usuario($dni, $rol, $nom, $ape, $dir, $cop, $loc, $pro, $ema, $tel, $pas, $act)\r\n{\r\n $conex = conectar();\r\n $codigo = \"UPDATE usuarios SET rol_usr = :rol, nom_usr = :nom, ape_usr = :ape, dir_usr = :dir,\r\n cop_usr = :cop, loc_usr = :loc, pro_usr = :pro, ema_usr = :ema,\r\n tel_usr = :tel, pas_usr = :pas, act_usr = :act WHERE dni_usr = :dni\";\r\n $insert = $conex->prepare($codigo);\r\n $fila = $insert->execute(array(\r\n ':dni' => $dni,\r\n ':rol' => $rol,\r\n ':nom' => $nom,\r\n ':ape' => $ape,\r\n ':dir' => $dir,\r\n ':cop' => $cop,\r\n ':loc' => $loc,\r\n ':pro' => $pro,\r\n ':ema' => $ema,\r\n ':tel' => $tel,\r\n ':pas' => $pas,\r\n ':act' => $act\r\n ));\r\n if ($fila == 1) {\r\n return \"<br>Modificacion completada\";\r\n } else {\r\n return \"<br>Error en la modificacion<br>\";\r\n }\r\n}", "function grant_super_admin($user_id)\n{\n}", "function tambah_user($dtpost){\n\tglobal $db;\n\t$username = $dtpost[\"username\"];\n\t$password1 = mysqli_real_escape_string($db, $dtpost[\"password1\"] );\n\t$password2 = mysqli_real_escape_string($db, $dtpost[\"password2\"] );\n\t$level = $dtpost[\"level\"];\n\t// fungsi mysqli_real_escape_string = user bisa masukkan passwd dengan karakter kutip 1 dengan aman.\n\n\t// var_dump($dtpost);\n\n\t//koding cek password apa sama dengan password konfirmasi\n\tif ($password1 !== $password2) {\n\t\t?> \n\t\t<script>\n\t\t\talert(\"Konfirmasi Password Tidak Sesuai! Mohon Diulang.\");\n\t\t</script>\n\t\t<?php \n\t\treturn 0;\n\t}\n\n\t//ENKRIPSI PASSWORD DENGAN PASSWORD_DEFAULT\n\t//PASSWORD_DEFAULT MERUPAKAN TEKNIK ALGORITMA UNTUK ENKRIPSI PASSWORD DI PHP5\n\t//TIAP PHP UPDATE MAKA TEKNIK ALGORITMA ENKRIPSI JUGA AKAN DI UPDATE YG TERBARU\n\t$password_enkripsi = password_hash($password1, PASSWORD_DEFAULT);\n\t// echo $password_enkripsi;\n\t// die;\n\t//TAMBAHKAN DATA REGISTRASI KE TABLE USER\n\t$sqlregistrasi = \"INSERT INTO user (username,password,level) VALUES('$username','$password_enkripsi','$level')\";\n\tmysqli_query($db, $sqlregistrasi) or die($db -> error);\n\treturn mysqli_affected_rows($db);\n}", "public function createAdmin()\n {\n return $this->createUser('test-admin', 'admin', 'test-admin@domain.com', ['ROLE_ADMIN']);\n }", "public function actualizar($permiso){\n $db=DB::conectar();\n $actualizar=$db->prepare('UPDATE roles set email=:email,tipo_rol=:tipo_rol,accion=:accion WHERE email=:email');\n $actualizar->bindValue('email' ,$permiso->getEmail());\n $actualizar->bindValue('tipo_rol',$permiso->getTipo_rol());\n $actualizar->bindValue('accion' ,$permiso->getaccion());\n $actualizar->execute();\t\t\t\n }", "public function updateUser()\n {\n }", "public function store_admin()\n {\n\n $user = new User;\n $admin = new Administrador;\n\n if ($admin->save())\n {\n if ($admin->user()->save($user))\n {\n Session::flash('message', 'Bienvenido a Sphellar');\n Auth::login($user);\n return Redirect::to('/');\n }\n else\n {\n $admin->delete();\n return Redirect::back()->withInput()->withErrors($user->errors());\n }\n }\n else\n {\n return Redirect::back()->withInput()->withErrors($admin->errors());\n }\n }", "private function createAdminUser()\n {\n $installTool = $this->container->get('contao.install_tool');\n\n if (!$installTool->hasTable('tl_user')) {\n $this->context['hide_admin'] = true;\n\n return null;\n }\n\n if ($installTool->hasAdminUser()) {\n $this->context['has_admin'] = true;\n\n return null;\n }\n\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n if ('tl_admin' !== $request->request->get('FORM_SUBMIT')) {\n return null;\n }\n\n $username = $request->request->get('username');\n $name = $request->request->get('name');\n $email = $request->request->get('email');\n $password = $request->request->get('password');\n $confirmation = $request->request->get('confirmation');\n\n $this->context['admin_username_value'] = $username;\n $this->context['admin_name_value'] = $name;\n $this->context['admin_email_value'] = $email;\n\n // All fields are mandatory\n if ('' === $username || '' === $name || '' === $email || '' === $password) {\n $this->context['admin_error'] = $this->trans('admin_error');\n\n return null;\n }\n\n // Do not allow special characters in usernames\n if (preg_match('/[#()\\/<=>]/', $username)) {\n $this->context['admin_username_error'] = $this->trans('admin_error_extnd');\n\n return null;\n }\n\n // The username must not contain whitespace characters (see #4006)\n if (false !== strpos($username, ' ')) {\n $this->context['admin_username_error'] = $this->trans('admin_error_no_space');\n\n return null;\n }\n\n // Validate the e-mail address (see #6003)\n if (filter_var($email, FILTER_VALIDATE_EMAIL) !== $email) {\n $this->context['admin_email_error'] = $this->trans('admin_error_email');\n\n return null;\n }\n\n // The passwords do not match\n if ($password !== $confirmation) {\n $this->context['admin_password_error'] = $this->trans('admin_error_password_match');\n\n return null;\n }\n\n $minlength = $installTool->getConfig('minPasswordLength');\n\n // The password is too short\n if (Utf8::strlen($password) < $minlength) {\n $this->context['admin_password_error'] = sprintf($this->trans('password_too_short'), $minlength);\n\n return null;\n }\n\n // Password and username are the same\n if ($password === $username) {\n $this->context['admin_password_error'] = sprintf($this->trans('admin_error_password_user'), $minlength);\n\n return null;\n }\n\n $installTool->persistConfig('adminEmail', $email);\n\n $installTool->persistAdminUser(\n $username,\n $name,\n $email,\n $password,\n $request->getLocale()\n );\n\n return $this->getRedirectResponse();\n }", "function tambah($data)\r\n{\r\n global $koneksi;\r\n $username = $data[\"username\"];\r\n $password = $data[\"password\"];\r\n $passwordConfirm = $data[\"passwordConfirm\"];\r\n $level = $data[\"level\"];\r\n\r\n // verifikasi username (username tidak boleh ada yang sama)\r\n // mengambil data berdasarkan username yang diinput\r\n $data = mysqli_query($koneksi, \"SELECT username FROM user WHERE username = '$username'\");\r\n\r\n // jika usernamenya sama akan muncul pop up informasi\r\n if (mysqli_fetch_assoc($data)) {\r\n echo \"<script>alert('username sudah digunakan');</script>\";\r\n return false;\r\n }\r\n\r\n // verifikasi password ==> cek apakah pasword dan konfirmasi pasword sama\r\n if ($password != $passwordConfirm) {\r\n echo \"<script>alert('pass dan konfirmasi pass tidak cocok');</script>\";\r\n return false;\r\n }\r\n\r\n // encrypt password menggunakan algoritma hash\r\n // tidak dianjurkan menggunakan algoritma md5\r\n $password = password_hash($password, PASSWORD_DEFAULT);\r\n\r\n $query = \"INSERT INTO user VALUES ('', '$username', '$password', '$level')\";\r\n\r\n mysqli_query($koneksi, $query);\r\n\r\n return mysqli_affected_rows($koneksi);\r\n}", "public function create_admin()\r\n\t\t{\r\n\t\t\t$this->form_validation->set_rules('username', 'User Name', 'trim|required|min_length[4]');\r\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]');\r\n\t\t\t$this->form_validation->set_rules('con_password', 'Password Confirmation', 'trim|required|matches[password]');\r\n\t\t\t\r\n\t\t\tif ($this->form_validation->run()){\r\n\t\t\t\t\r\n\t\t\t\t$message = $this->admin_model->create_admin_account($this->input->post('username'), $this->input->post('password')); \r\n\t\t\t\t$this->admin_creation($message);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\t\t$this->admin_creation();\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function EditDataUser()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\t\t$password = md5($password);\n\t\t$id_user = $_GET['id_user'];\n\n\t\t//update ke tabel pegawai\n\t\t$sql = \"UPDATE user SET username = ?, password = ? WHERE id_user = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('ssi', $username, $password, $id_user);\n\t\tif($stmt->execute()){\n\t\t\t$_SESSION['status_operasi_u'] = \"berhasil_memperbaharui\";\n\t\t}else{\n\t\t\t$_SESSION['status_operasi_u'] = \"gagal_memperbaharui\";\n\t\t}\n\t\t$stmt->close();\n\t}", "function UserEdit() {\n\t\t\n\t\ttry {\n\t\t\t$sth = DB::prep(\"UPDATE cms_messaging_admin SET pass = sha1(:pass), `group` = :group WHERE id = :id\");\n\t\t\t$sth->bindParam(\":pass\", $this->password, PDO::PARAM_STR, 40);\n\t\t\t$sth->bindParam(\":group\", $this->group, PDO::PARAM_INT);\n\t\t\t$sth->bindParam(\":id\", $this->user_id, PDO::PARAM_INT);\n\t\t\t\n\t\t\t$sth->execute();\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t\tExceptions::PrintOut($e);\n\t\t}\n\t}", "public function save_setting() {\n $username = $this->input->post('user');\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n\n $check = $this->admin_manager->CheckAlreadyExistByOne($this->table[0]);\n if ($check[0]->count < 1) {\n $data = array();\n if (!empty($password)) {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n 'password' => md5($password),\n );\n } else {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n );\n }\n $this->admin_manager->Insert($this->table[0], $data);\n $message = array('message' => 'Admin user has been successfully inserted.');\n print_r(json_encode($message));\n } else {\n $data = array();\n if (!empty($password)) {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n 'password' => md5($password),\n );\n } else {\n $data = array(\n 'username' => $username,\n 'email' => $email,\n );\n }\n $where = array('id' => '1');\n $this->admin_manager->Update($this->table[0], $data, $where);\n $message = array('message' => 'Admin user has been successfully updated.');\n print_r(json_encode($message));\n }\n }", "public function SaveUser()\n {\n if(AdminHelper::SaveUser($this->Core, Request::GetPost(\"userId\"), \n Request::GetPost(\"tbNameUser\"),\n Request::GetPost(\"tbFirstNameUser\"), \n Request::GetPost(\"tbEmailUser\"), \n Request::GetPost(\"lstGroup\")\n ))\n {\n \n echo \"<span class='sucess'>\".$this->Core->GetCode(\"SaveOk\").\"</span>\";\n }\n else\n {\n echo \"<span class='error'>\".$this->Core->GetCode(\"SaveError\").\"</span>\";\n \n $this->ShowAddUser();\n }\n }", "public function save(){\n\t\t$soxId = oxConfig::getParameter( \"oxid\" );\n\t\tif ( $this->_allowAdminEdit( $soxId ) ) {\n\n\t\t\t$aParams = oxConfig::getParameter( \"editval\");\n\n\t\t\t$oUser = oxNew( \"oxuser\" );\n\t\t\tif ( $soxId != \"-1\" ) {\n\t\t\t\t$oUser->load( $soxId );\n\t\t\t} else {\n\t\t\t\t$aParams['oxuser__oxid'] = null;\n\t\t\t}\n\t\t\t\n\t\t\t// checkbox handling\n\t\t\t$aParams['oxuser__oxactive'] = $oUser->oxuser__oxactive->value;\n\t\t\t\n\t\t\t$oUser->assign( $aParams );\n\t\t\t\n\t\t\t$oUser->save();\n\n\t\t\t// set oxid if inserted\n\t\t\tif ( $soxId == \"-1\" ) {\n\t\t\t\toxSession::setVar( \"saved_oxid\", $oUser->getId() );\n\t\t\t}\n\t\t}\n\t}", "function editUser($uid, $userName, $password){\n\n if(!$password == TRUE){\n\n $data = array('username' => $userName);\n $this->connection->where(\"uid\", $uid);\n $this->connection->update(\"users\", $data); \n\n }else{\n\n $encrypt = password_hash($password, PASSWORD_DEFAULT);\n\n $data = array('username' => $userName, 'password' => $encrypt);\n $this->connection->where(\"uid\", $uid);\n $this->connection->update(\"users\", $data);\n \n }\n\n }", "private function newUser ( ) {\r\n \r\n /** crida a la preparació la vista de la fitxa del usuari */\r\n $this->viewUser ( );\r\n\r\n }", "public function save(){\n\t\t$conexion = new Database();\n\t\t\n if ($this->codigo){\n $sql = 'UPDATE CAU_USUARIOS SET usuario = ? password = ? WHERE codigo = ?';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->usuario );\n\t\t\t$conexion->bindParam( 2, $this->password );\n\t\t\t$conexion->bindParam( 3, $this->codigo );\n\t\t\t$conexion->execute();\n }\n else{\n $sql = 'INSERT INTO CAU_USUARIOS ( usuario, password) VALUES (?, ?)';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->usuario );\n\t\t\t$conexion->bindParam( 2, $this->password );\n\t\t\t$conexion->execute();\n\t\t\t$this->codigo = $conexion->lastInsertId();\n }\n }", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\t$this->User->create();\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t}\n\t}", "public function makeAdmin()\n {\n $adminRole = Role::find(Role::ADMIN);\n\n $this->role()->associate($adminRole);\n $this->save();\n }", "public function registrarUsuarioControlador()\n\t\t{\n\t\t\t//Administrador\n\t\t\t$dni = modeloPrincipal::limpiarCadena($_POST['dni-regi']);\n\t\t\t$nombre = modeloPrincipal::limpiarCadena($_POST['nombre-regi']);\n\t\t\t$apellido = modeloPrincipal::limpiarCadena($_POST['apellido-regi']);\n\t\t\t$telefono = modeloPrincipal::limpiarCadena($_POST['telefono-regi']);\n\t\t\t$direccion = modeloPrincipal::limpiarCadena($_POST['direccion-regi']);\n\t\t\t\n\n\t\t\t//Cuenta\n\t\t\t$usuario = modeloPrincipal::limpiarCadena($_POST['usuario-regi']);\n\t\t\t$password1 = modeloPrincipal::limpiarCadena($_POST['password1-regi']);\n\t\t\t$password2 = modeloPrincipal::limpiarCadena($_POST['password2-regi']);\n\t\t\t$email = modeloPrincipal::limpiarCadena($_POST['email-regi']);\n\t\t\t$genero = modeloPrincipal::limpiarCadena($_POST['optionsGenero-regi']);\n\n\t\t\t$privilegio = modeloPrincipal::limpiarCadena($_POST['privilegio-regi']);\n\n\t\t\t//$privilegio = modeloPrincipal::desencriptar($_POST['optionsPrivilegio']);\n\t\t\tif ($privilegio == \"Docente\") \n\t\t\t{\n\t\t\t\t$rol = 2;\n\n\t\t\t\tif ($genero == \"Masculino\") \n\t\t\t\t{\n\t\t\t\t\t$foto = \"docenteHombre.png\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$foto = \"docenteMujer.png\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$rol = 3;\n\n\t\t\t\tif ($genero == \"Masculino\") \n\t\t\t\t{\n\t\t\t\t\t$foto = \"estudianteHombre.png\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$foto = \"estudianteMujer.png\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($password1 != $password2)\n\t\t\t{\n\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"Contraseñas NO coinciden, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$consultaDNI = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT PersonaDNI FROM persona WHERE PersonaDNI='$dni'\");\n\n\t\t\t\t\tif ($consultaDNI->rowCount()>=1) {\n\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\"Texto\" => \"El DNI ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($email != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaEmail = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail='$email'\");\n\t\t\t\t\t\t\t$resultadoEmail = $consultaEmail->rowCount();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resultadoEmail = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($resultadoEmail >= 1) {\n\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\"Texto\" => \"El EMAIL ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaUsuario = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\");\n\t\t\t\t\t\t\tif($consultaUsuario->rowCount() >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$consultaID = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT id FROM cuenta\");\n\n\t\t\t\t\t\t\t\t$numero = ($consultaID->rowCount())+1;\n\n\t\t\t\t\t\t\t\t$codigo = modeloPrincipal::generarCodigo(\"LM\", 5, $numero);\n\n\t\t\t\t\t\t\t\t$clave = modeloPrincipal::encriptar($password1);\n\n\t\t\t\t\t\t\t\t$datosCuenta = [\n\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\"Usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\t\"Clave\" => $clave,\n\t\t\t\t\t\t\t\t\t\"Email\" => $email,\n\t\t\t\t\t\t\t\t\t\"Estado\" => \"Activo\",\n\t\t\t\t\t\t\t\t\t\"Rol\" => $rol,\n\t\t\t\t\t\t\t\t\t\"Genero\" => $genero,\n\t\t\t\t\t\t\t\t\t\"Foto\" => $foto\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t$cuentaAgregada = modeloPrincipal::agregarCuenta($datosCuenta);\n\n\t\t\t\t\t\t\t\tif ($cuentaAgregada)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$datosRegistro = [\n\t\t\t\t\t\t\t\t\t\t\"DNI\" => $dni,\n\t\t\t\t\t\t\t\t\t\t\"Nombre\" => $nombre,\n\t\t\t\t\t\t\t\t\t\t\"Apellidos\" => $apellido,\n\t\t\t\t\t\t\t\t\t\t\"Telefono\" => $telefono,\n\t\t\t\t\t\t\t\t\t\t\"Direccion\" => $direccion,\n\t\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\t\"Privilegio\" => $privilegio\n\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t$registroAgregado = registroModelo::registrarUsuarioModelo($datosRegistro);\n\n\t\t\t\t\t\t\t\t\tif ($registroAgregado)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"redireccionar\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Registro completo\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"Usuario registrado en el sistema. Inicie sesion ahora.\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"success\",\n\t\t\t\t\t\t\t\t\t\t\t\"Pagina\" => \"login/\"\n\t\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t\treturn modeloPrincipal::mostrarAlertaRedireccion($alerta);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmodeloPrincipal::eliminarCuenta($codigo);\n\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO NO pudo ser registrado. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"La CUENTA NO pudo ser registrada. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\treturn modeloPrincipal::mostrarAlerta($alerta);\n\t\t\t\n\t\t}", "public function adminLogin()\n {\n extract($_POST);\n $error = 'Les identifiants ne correspondent pas à ceux qui ont été enregistrer !';\n\n $login = new \\Projet\\Models\\BackManager();\n $login = $login->login($connectNameAdmin);\n \n if (password_verify($connectPasswordAdmin, $login['password'])) {\n $_SESSION['admin'] = $login['id'];\n $_SESSION['pseudo'] = $login['pseudo'];\n \n \n $this->admin();\n } else {\n return $error;\n }\n }", "public function insert_admin(){\n\t\tif ($this->checkcookieadmin()) {\n\t\t\t$data = array(\n\t\t\t\t'username' => $this->input->post('username'),\n\t\t\t\t'password' => md5($this->input->post('password'))\n\t\t\t);\n\t\t\t$insertStatus = $this->Default_model->insert_admin($data);\n\t\t\techo $insertStatus;\n\t\t}else{\n\t\t\techo \"access denied\";\n\t\t}\n\t}", "public function alterar()\n {\n //dados do usuario\n $dados = [\n \"id\" => Auth::user()->id,\n \"name\" => Auth::user()->name,\n \"email\" => Auth::user()->email,\n \"palavraPasse\" => Auth::user()->palavraPasse,\n \"activeUser\" => \"class=active\",\n ];\n\n //Chamado a view\n return view('alterar-user-login', $dados);\n }", "function crear_usuario() {\n $documento = $_REQUEST[\"documento\"];\n $resultadousuario = $this->usuario_model->get_usuario($documento);\n if($resultadousuario){\n $datosUsuario = $_POST;\n $datosUsuario['password']=$resultadousuario->password;\n $this->usuario_model->actualizar_usuario($documento,$datosUsuario);\n echo \"OK\";\n }else{\n $usuario = $_POST;\n $usuario['password']=sha1($usuario['password']);\n $this->usuario_model->crear_usuario($usuario);\n echo \"OK\";\n } \n }", "function admin_change_pass($id = null){\r\n\t\t$this->User->unbindValidation('password','password_confirm');\r\n\t\t$this->User->id = $id;\r\n\t\t$this->User->read();\r\n\t\tif(!empty($this->data)){\r\n\t\t\t$this->User->save($this->data, array('validates'=>false));\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//\t\t\t$this->Session->setFlash(__('Id not provided',true));\r\n\t\t}\r\n\r\n\r\n\t}", "function save(){\r\r\n if (!isset($this->username) || !isset($this->password)){\r\r\n $this->error[] = $_SESSION['translate']->it('Username and password must be set before user can be saved') . '.';\r\r\n return FALSE;\r\r\n }\r\r\n\r\r\n $sql['username'] = $this->username;\r\n $sql['password'] = $this->password;\r\n $sql['city'] = $this->city;\r\n $sql['state'] = $this->state;\r\n $sql['address'] = $this->address;\r\n $sql['zip'] = $this->zip;\r\n $sql['head'] = $this->head;\r\n $sql['email'] = $this->email;\r\n $sql['org'] = $this->org;\r\n $sql['rootOrg'] = $this->rootOrg;\r\n $sql['phone'] = $this->phone;\r\n $sql['realname'] = $this->realname;\r\n $sql['appuid'] = $this->appuid;\r\n\r\n if ($this->admin_switch)\r\r\n $sql['admin_switch'] = 1;\r\r\n else\r\r\n $sql['admin_switch'] = 0;\r\r\n\r\r\n if ($this->deity)\r\r\n $sql['deity'] = 1;\r\r\n else\r\r\n $sql['deity'] = 0;\r\r\n\r\r\n if (isset($this->groups)){\r\r\n $groups = $this->groups;\r\r\n PHPWS_Array::dropNulls($groups);\r\r\n $sql['groups'] = implode(':', array_keys($groups));\r\r\n }\r\r\n\r\r\n if ($this->user_id < 1)\r\r\n $this->user_id = $GLOBALS['core']->sqlInsert($sql, 'mod_users', FALSE, TRUE);\r\r\n else\r\r\n $GLOBALS['core']->sqlUpdate($sql, 'mod_users', 'user_id', $this->user_id);\r\r\n\r\r\n $this->updateUserGroups();\r\r\n return TRUE;\r\r\n }", "function modificarAlmacenUsuario(){\n $this->procedimiento='alm.ft_almacen_usuario_ime';\n $this->transaccion='SAL_ALMUSR_MOD';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_almacen_usuario','id_almacen_usuario','int4');\n $this->setParametro('id_usuario','id_usuario','int4');\n $this->setParametro('estado_reg','estado_reg','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "private function editUser ( ) {\r\n\r\n if ( filter_has_var ( INPUT_POST, 'idModificar' ) ) { /** si s'ha sel·leccionat usuari */\r\n \r\n /** crida a la preparació la vista de la fitxa del usuari */\r\n $this->viewUser ( );\r\n \r\n /** crida al mètode que recupera l'usuari indicat */\r\n $this->usuari = $this->model->getUsuariById ( filter_input ( INPUT_POST, 'idModificar' ) );\r\n \r\n /** crea un nou objecte politica */\r\n $politica = new politica ( );\r\n\r\n /** crida al mètode que recupera la política indicada */\r\n $this->politica = $politica->getPoliticaById ( $this->usuari['idPolitica'] );\r\n \r\n }\r\n \r\n }", "public function admin_add() {\n\t\tif ($this->request->is('post')) { // if data was posted therefore a submitted form\n\t\t\t$this->User->create();\n\t\t\t// Fudge in a random password to stop it looking like an external account\n\t\t\t// TODO FUDGE FACTOR 15 until #273 is resolved and we have an is_internal flag\n\t\t\t$this->request->data['User']['password'] = $this->__generateKey(25);\n\n\t\t\tif ($this->User->save($this->request->data['User'])) {\n\t\t\t\t$id = $this->User->getLastInsertID();\n\t\t\t\t$this->log(\"[UsersController.admin_add] user[${id}] created by user[\" . $this->Auth->user('id') . \"]\", 'devtrack');\n\n\t\t\t\t//Now to create the key and send the email\n\t\t\t\t$this->User->LostPasswordKey->save(\n\t\t\t\t\tarray('LostPasswordKey' => array(\n\t\t\t\t\t\t'user_id' => $id,\n\t\t\t\t\t\t'key' => $this->__generateKey(25),\n\t\t\t\t\t))\n\t\t\t\t);\n\t\t\t\t$this->__sendAdminCreatedUserMail($id, $this->User->LostPasswordKey->getLastInsertID());\n\t\t\t\t$this->Session->setFlash(__('New User added successfully.'), 'default', array(), 'success');\n\t\t\t\t$this->log(\"[UsersController.admin_add] user[\" . $id . \"] added by user[\" . $this->Auth->user('id') . \"]\", 'devtrack');\n\t\t\t\t$this->redirect(array('action' => 'view', $id));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__(\"<h4 class='alert-heading'>Error</h4>One or more fields were not filled in correctly. Please try again.\"), 'default', array(), 'error');\n\t\t\t}\n\t\t}\n\t}", "public function novoUtilizador()\n\t\t{\n\t\t\tif($this->verifica() == 0)\n\t\t\t\t\treturn -1;\n\t\t\telse{\n\t\t\t\t$passwordCod = sha1($this->senha);\n\t\t\t\t$query = $this->mysql->query(\"insert into login values('$this->user','$passwordCod')\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "public function create()\n {\n if(Gate::denies('usuario-edit')) {\n abort(403);\n }\n }", "public function run()\n {\n $adminstrator = new User;\n $adminstrator->name = \"Site Adminstrator\";\n $adminstrator->email = \"administrator@larashop.test\";\n $adminstrator->username = \"administrator\";\n $adminstrator->password = Hash::make(\"administrator\");\n $adminstrator->roles = json_encode([\"ADMIN\"]);\n $adminstrator->address = \"Tuban, Jawa Timur\";\n $adminstrator->phone = \"08166521275\";\n $adminstrator->avatar = \"saat-ini-tidak-ada-file-avatar.jpg\";\n $adminstrator->status = \"ACTIVE\";\n\n $adminstrator->save();\n\n $this->command->info(\"User admin berhasil di insert\");\n\n }", "function promouvoirAdmin($idUser)\n{\n}", "function editUser(int $userId, string $newPseudo, string $newMail)\n{\n $userManager = new UserManager();\n $editedUser = $userManager->editUser($userId, $newPseudo, $newMail);\n $users = $userManager->getUsers();\n $msgEditUserOk = 'Les informations de l\\'administrateur ont bien été modifiées.';\n require(ADMINVIEW.'/listUsersView.php');\n\n if ($editedUser === false) {\n throw new Exception('Impossible de modifier l\\'administrateur !');\n }\n}", "function es_admin() {\n\tglobal $zerdb;\n\tif( false == ($u = obt_usuario_actual() ) ) //removí la doble comprobación de sesión iniciada...\n\t\treturn false;\n\t$u = $zerdb->select($zerdb->usuarios, \"rango\", array(\"id\" => $u->id) )->_();\n\treturn 2 == $u->rango || es_super_admin();\n}", "public function action_create() {\r\n\t\t\r\n\t\t$user = User_Model::create();\r\n\t\t\r\n\t\tif($user->save($_POST, User_Model::SAVE_ADMIN_CREATE)){\r\n\t\t\tMessenger::get()->addSuccess('Новый пользователь успешно создан');\r\n\t\t\treturn TRUE;\r\n\t\t}else{\r\n\t\t\tMessenger::get()->addError('При регистрации нового пользователя возникли ошибки:', $user->getError());\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "public function edit_admin()\r\n\t\t{\r\n\t\t\t$this->form_validation->set_rules('user_id', 'Username', 'required');\r\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]');\r\n\t\t\t$this->form_validation->set_rules('con_password', 'Password Confirmation', 'trim|required|matches[password]');\r\n\r\n\t\t\tif ($this->form_validation->run())\r\n\t\t\t{\r\n\t\t\t\t$admin_id = $this->input->post('user_id');\r\n\t\t\t\t$password = $this->input->post('password');\r\n\r\n\t\t\t\t$message = $this->admin_model->edit_account($admin_id,$password);\r\n\r\n\t\t\t\t$this->admin_edit($message);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\t\r\n\t\t\t\t$this->admin_edit();\r\n\t\t\t}\r\n\t\t}", "public function editarUsuario()\r\n {\r\n $sql = \"UPDATE usuario\r\n SET nombres_Usuario = '{$this-> nombres_Usuario}',\r\n id_TipoDocumento= '{$this-> id_TipoDoc}',\r\n apellidos_Usuario = '{$this-> apellidos_Usuario}',\r\n telefono_Usuario = '{$this-> telefono_Usuario}',\r\n celular_Usuario = '{$this-> celular_Usuario}',\r\n email = '{$this-> email_Usuario}',\r\n id_Ciudad = '{$this-> id_Ciudad}',\r\n foto_Usuario = '{$this-> foto_Usuario}',\r\n id_Centro = '{$this-> id_Centro}',\r\n id_Programa = '{$this-> id_Programa}',\r\n id_Regional = '{$this-> id_Regional}',\r\n numeroFicha_Usuario= '{$this-> numeroFicha_Usuario}'\r\n WHERE id_Usuario = '{$this-> id_Usuario}'\";\r\n $this-> conex-> consultaSimple($sql);\r\n }", "function modifyUser()\n{\n\t$userId = (int)$_POST['hidUserId'];\t\n\t$password = $_POST['txtPassword'];\n\t\n\t$sql = \"UPDATE tbl_user \n\t SET user_password = PASSWORD('$password')\n\t\t\t WHERE user_id = $userId\";\n\n\tdbQuery($sql);\n\theader('Location: index.php');\t\n\n}", "public function insertar()\n {\n $datos = [\n 'titulo' => 'Registro Usuarios Administrador',\n 'titulo_vista' => 'Registrar Usuario'\n ];\n $this->vista('Insertar', $datos, $this->nombreModulo);\n }", "public function registraNuovoUtente($post)\n {\n foreach ($post as $key => $value) {\n $post[$key] = trim($this -> cleanInput($value, 'str'));\n }\n\n try {\n if ($this -> usernameExists($post['uname'])) {\n return \"L'username indicata è già presente\";\n }\n $this -> checkMod($post);\n // creazione password criptata\n $pwd_hash = password_hash($post['pwd'], PASSWORD_DEFAULT);\n // superati tutti i controlli realizzazione query per aggiungere l'utente al DB\n $token = bin2hex(random_bytes(32));\n $this -> addUser($post, $pwd_hash, $token);\n } catch (PDOException $e) {\n return \"Errore. Riprova più tardi\";\n } catch (Exception $e) {\n return $e -> getMessage();\n }\n \n return 'Sei stato correttamente registrato';\n }", "function changerPasse($idUser,$passe)\n{\n}", "public function addNewUser(): void\n {\n $token = $_POST['token'];\n $role = htmlspecialchars($_POST['role']);\n $username = htmlspecialchars($_POST['username']);\n if ($token === $_SESSION['token']) {\n if ($this->hasPermission('settings__create_user', false)) {\n if ($roleEntity = $this->role->select(['name' => $role])) {\n if ($roleEntity->getRank() !== $this->currentRole('rank')) {\n // Prevent current user attribute a role greater than his current role\n if ($roleEntity->getRank() > $this->currentRole('rank')) {\n if (!$this->user->select(['username' => $username])) { // Username must be unique\n $generatedPwd = bin2hex(random_bytes(4));\n $generatedPwdHash = password_hash($generatedPwd, PASSWORD_ARGON2ID);\n $createUser = $this->user->create([\n 'username' => $username,\n 'password' => $generatedPwdHash\n ]);\n $userId = $this->user->lastId();\n $createUserRole = $this->userRole->create([\n 'role_id' => $roleEntity->getId(),\n 'user_id' => $userId\n ]);\n if ($createUser && $createUserRole) {\n $this\n ->echoJsonData('success')\n ->addToast($this->lang('settings.addNewUser.create.message', $username), $this->lang('settings.addNewUser.create.title'))\n ->add('generatedPassword', $generatedPwd)\n ->echo();\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.retry'), $this->lang('general.error.occured'))->echo();\n }\n } else {\n $this->echoJsonData('invalid')->addToast($this->lang('settings.addNewUser.userExist'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.addNewUser.error.createGreater'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.addNewUser.error.sameRole'))->echo();\n }\n } else {\n $this->echoJsonData('invalid')->addToast($this->lang('settings.addNewUser.error.invalid.message'), $this->lang('settings.addNewUser.error.invalid.title'))->echo();\n }\n } else {\n $this->echoJsonData('forbidden')->addToast($this->lang('general.error.forbidden'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.badToken'))->echo();\n }\n }", "public function insert()\n {\n if (isset($_POST['login']) && isset($_POST['password']) && isset($_POST['email'])) {\n $hashPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n $affectedUser = $this->usersManager->setNewUser($_POST['firstName'], $_POST['lastName'], $_POST['login'], $hashPassword, $_POST['email'], $_POST['role']);\n \n if ($affectedUser === false) {\n throw new Exception(\"Impossible d'ajouter l'utilisateur\");\n } else {\n header('Location: admin.php?url=users');\n exit();\n }\n } else {\n throw new Exception($this->actionError);\n }\n }", "function administrarUsuarios(){\n\t\t$this->listarUsuarios();\n\t}", "public function executeEditUser() {\n \tif(isset($_POST['eu_id']) && isset($_POST['eu_mail']) && isset($_POST['eu'])){\n \t\t\n \t\t$user = $this->getUserInfo($_POST['eu_id']);\n \t\tif($this->checkRight('edit_user', $user->getId()) || $this->checkRight('administer_group', $user->getGroup())){\n \t\t\t$newpwd = (isset($_POST['eu_pwd_new']) && isset($_POST['eu_pwd_new2']) && $_POST['eu_pwd_new'] == $_POST['eu_pwd_new2']) ? $_POST['eu_pwd_new'] : '';\n\n \t\t\tif($this->editUser($_POST['eu_id'], $_POST['eu_mail'], (isset($_POST['eu_group']) ? $_POST['eu_group']: -1), (isset($_POST['eu_status']) ? $_POST['eu_status']: -1), $newpwd , $_POST['eu'])) {\n\t \t\t\t$this->_msg($this->_('_User Update success', 'core'), Messages::INFO);\n\t \t\t} else $this->_msg($this->_('_User Update error', 'core'), Messages::ERROR);\n \t\t} else $this->_msg($this->_('You are not authorized', 'core'), Messages::ERROR);\n \t}\n }", "function updateSenhaUsuario()\n {\n // receber as variaveis usuario (e-mail) e senha\n $data = date('Y-m-d H:i:s');\n $cdusua = $_POST[\"cdusua\"];\n $desenh = md5($_POST[\"desenh\"]);\n $desenh1 = md5($_POST[\"desenh1\"]);\n\n if (empty($desenh) == true)\n {\n $demens = \"É obrigatório informar a nova senha!\";\n $detitu = \"Gerenciador Financeiro | Alterar Senha\";\n $devolt = \"minhasenha.php\";\n header('Location: mensagem.php?demens=' . $demens . '&detitu=' . $detitu . '&devolt=' . $devolt);\n } Else {\n\n if ($desenh !== $desenh1) {\n $demens = \"As senhas informadas estão diferentes! Favor corrigir.\";\n $detitu = \"Gerenciador Financeiro | Alterar Senha\";\n $devolt = \"minhasenha.php\";\n header('Location: mensagem.php?demens=' . $demens . '&detitu=' . $detitu . '&devolt=' . $devolt);\n } Else {\n\n $user = new Usuario();\n\n if ($user->updateSenha($cdusua, $desenh)) {\n\n $delog = \"Atualização senha usuario na tabela [usuarios] codigo \" . $cdusua;\n\n if (isset($_COOKIE['cdusua'])) {\n $cdusua = $_COOKIE['cdusua'];\n }\n\n $this->util->geraLogSistema($cdusua, $delog);\n\n return true;\n }\n\n }\n }\n\n return false;\n }", "public function update_user_profil(){\n\t\t$name_bdd = $this->name_bdd_;\n\t\t$name_table_user = $this->name_table_user_;\n\t\ttry {\n\t\t\t$bdh = parent::connection_bdd();\n\t\t\t$stmp = $bdh->prepare('UPDATE $name_bdd.$name_table_user SET login = :pseudo, password = :password WHERE login.id = :id_user');\n\t\t\t$stmp->bindParam(':pseudo', $pseudo);\n\t\t\t$stmp->bindParam(':password', $password);\n\t\t\t$stmp->bindParam(':id_user', $id);\n\n\t\t\t$pseudo = $this->user_pseudo_;\n\t\t\t$password = $this->user_password_;\n\t\t\t$id = $this->id_user;\n\n\t\t\t$stmp->execute();\n\t\t\tparent::close_connection_bdd($bdh);\n\t\t} catch( PDOExecption $e){\n\t\t\texit('<b>Catched exception( cf. class User) at line '. $e->getLine() .' :</b> '. $e->getMessage());\n\t\t}\n\t}", "function create_admin($admin)\n\t{\n\t\t$this->db->insert('users', $admin);\n\t}", "function defaut_adminPass() { return \"*********\"; }", "public function add()\n {\n // Si no está loggeado o si es SuperAdmin\n if(!$this->Auth->user() || ($this->Auth->user() && $this->Auth->User('role_id') == 3))\n {\n $user = $this->Users->newEntity();\n \n if ($this->request->is('post'))\n {\n $user = $this->Users->patchEntity($user, $this->request->data);\n\n try\n {\n if ($this->Users->save($user))\n {\n // Si soy SuperAdmin\n if ($this->Auth->user() && $this->Auth->User('role_id') == 3)\n {\n // Se acepta de una vez.\n $user->state = 1;\n \n if ($this->Users->save($user))\n {\n $this->Flash->success('Usuario agregado.',\n ['key' => 'success']);\n \n return $this->redirect(['controller' => 'Users','action' => 'index']);\n }\n }\n \n $this->Flash->success('Procesando solicitud de registro. Confirmación enviada al correo electrónico.',\n ['key' => 'success']);\n \n return $this->redirect(['controller' => 'Pages','action' => 'home']); \n }\n }\n catch(Exception $ex)\n {\n $this->Flash->error(__('Solicitud de registro NO procesada.'),\n ['key' => 'error']);\n }\n }\n $this->set('user', $user); \n }\n else\n {\n return $this->redirect(['controller'=>'pages','action'=>'home']);\n }\n }", "public function modificarContrasena($idUsuario, $claveNueva);", "public function run()\n {\n $administrator = new \\App\\User;\n $administrator->name = \"admin\";\n $administrator->email = \"administrator@gmail.com\";\n $administrator->password = Hash::make(\"kepegawaian\");\n $administrator->role = \"admin\";\n $administrator->nama = \"administrator\";\n $administrator->jenis_kelamin = \"pria\";\n $administrator->alamat = \"Jl. Patroman\";\n $administrator->nomor_telepon = \"081333333333\";\n $administrator->save();\n $this->command->info(\"User Admin berhasil diinsert\");\n }", "function adicionarUsuario($nome, $CPF, $email, $senha, $cidade,$endereco, $sexo){\n if ($email<>\"adm@adm.com\") {\n $tipoUsuario = \"user\";\n }else{\n $tipoUsuario = \"admin\";\n }\n\n \n \n $insert = \"INSERT INTO tblUsuario(Nome, Email, Senha, CPF, endereco, tipoUsuario, sexo) VALUES('$nome', '$email', '$senha', '$CPF', '$endereco', '$tipoUsuario', '$sexo')\";\n\n $resultado = mysqli_query($cnx = conexao(),$insert);\n if(!$resultado) { die('Erro ao cadastrar usuário' . mysqli_error($cnx)); }\n return 'Usuario cadastrado com sucesso!';\n}", "public function Editar()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif($this->cn->leer(\"call SPUsuarioGet('','\".$this->seguridad->Encrypt(Login::getUserName()).\"')\"))\n\t\t\t{\n\t\t\t\t//por medio del objeto de la clase datos llamamos el metodo encargado de hacer modificaciones en la base de datos\n\t\t\t\tif($this->cn->ejecutar(\"call SPUsuarioLoginUpdate('\".Login::getIdLogin().\"','\".$this->seguridad->Encrypt(Login::getClave()).\"')\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t$this->log->write('Error en la clase Login metodo editar '.$e->getMessage());\n\t\t}\n\t}" ]
[ "0.82059455", "0.6627835", "0.6563661", "0.65426284", "0.64990556", "0.6478475", "0.6445614", "0.6364669", "0.634681", "0.63382536", "0.6329761", "0.6309557", "0.63035417", "0.6271096", "0.6252177", "0.62426627", "0.62366945", "0.6226829", "0.62251574", "0.6222775", "0.62227243", "0.6208192", "0.61898535", "0.618877", "0.6188493", "0.6165958", "0.6155394", "0.61525095", "0.61341214", "0.61191225", "0.6113196", "0.61101043", "0.6097502", "0.60974705", "0.6095943", "0.60852593", "0.60815966", "0.60724616", "0.6063635", "0.60633504", "0.60582775", "0.60551685", "0.6052001", "0.60505164", "0.6049578", "0.6049494", "0.6043749", "0.6038392", "0.60353196", "0.6035003", "0.6017704", "0.6013002", "0.60054195", "0.59968466", "0.5988514", "0.59868765", "0.5986224", "0.5986011", "0.5967002", "0.5966379", "0.5963153", "0.59598994", "0.5949559", "0.5946199", "0.59378636", "0.59342074", "0.59329396", "0.5930794", "0.592815", "0.5927045", "0.59258795", "0.5924036", "0.5923198", "0.5919875", "0.5914508", "0.5914323", "0.5911804", "0.5907754", "0.59043646", "0.5900063", "0.5895972", "0.58918566", "0.5890317", "0.58827704", "0.58776385", "0.5874617", "0.5874173", "0.5873376", "0.58717114", "0.5867438", "0.58634496", "0.58606714", "0.5859315", "0.5858894", "0.58562803", "0.5854084", "0.5849428", "0.58415604", "0.5839918", "0.58381057" ]
0.8176741
1
Gets the number of character replacements required to turn a into b
Получает количество замен символов, необходимых для преобразования a в b
private function getReplacementCount($a, $b) { $count = 0; $length = strlen($a); for ($i = 0; $i < $length; $i++) { $aChar = substr($a, $i, 1); $bChar = substr($b, $i, 1); if ($aChar !== $bChar) { $count++; } } return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberOfIdenticalCharacters(string $a, string $b): int\n {\n $set = [];\n $aLength = strlen($a);\n $bLength = strlen($b);\n $number = 0;\n\n for ($i = 0; $i < $aLength; $i++) {\n $set[$a[$i]] = true;\n }\n\n for ($i = 0; $i < $bLength; $i++) {\n if (isset($set[$b[$i]])) {\n $number++;\n }\n }\n\n return $number;\n }", "function cmpr_strlen($a, $b) {\n return strlen($b) - strlen($a);\n }", "public function cmpr_strlen( $a, $b ) {\n\t\t\treturn strlen( $b ) - strlen( $a );\n\t\t}", "public static function _cmpr_strlen( $a, $b ) {\n\t\treturn strlen( $b ) - strlen( $a );\n\t}", "public function cmpr_strlen($a, $b)\n {\n }", "public static function getReplaceCounter(): int\r\n {\r\n return self::$replaceCounter;\r\n }", "function longest($a, $b)\n{\n $str = $a . $b;\n\n return count_chars($str, 3);\n}", "function str_replace_count($search, $replace, $subject, $times){\n\t\t$subject_original = $subject;\n\t\t$len = strlen($search);\n\t\t$pos = 0;\n\t\tfor($i=1; $i<=$times; $i++){\n\t\t\t$pos = strpos($subject, $search, $pos);\n\t\t\tif($pos!==false){\n\t\t\t\t$subject = substr($subject_original, 0, $pos);\n\t\t\t\t$subject .= $replace;\n\t\t\t\t$subject .= substr($subject_original, $pos+$len);\n\t\t\t\t$subject_original = $subject;\n\t\t\t}else{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $subject;\n\t}", "private function _compare(string $a, string $b):int\n\t {\n\t\tif (mb_strlen($a) >= mb_strlen($b))\n\t\t {\n\t\t\t$first = $a;\n\t\t\t$second = $b;\n\t\t }\n\t\telse\n\t\t {\n\t\t\t$first = $b;\n\t\t\t$second = $a;\n\t\t }\n\n\t\t$expla = $this->_strSplitUnicode($first, 1);\n\t\t$explb = $this->_strSplitUnicode($second, 1);\n\n\t\t$result = 0;\n\t\t$n = 0;\n\t\tforeach ($expla as $a)\n\t\t {\n\t\t\tforeach ($explb as $key => $b)\n\t\t\t {\n\t\t\t\tif ($b === $a)\n\t\t\t\t {\n\t\t\t\t\t$n++;\n\t\t\t\t\tunset($explb[$key]);\n\t\t\t\t } //end if\n\n\t\t\t } //end foreach\n\n\t\t } //end foreach\n\n\t\tif (count($expla) === 0)\n\t\t {\n\t\t\t$result1 = 0;\n\t\t }\n\t\telse\n\t\t {\n\t\t\t$result1 = (100 * $n) / count($expla);\n\t\t } //end if\n\n\t\t$expla = explode(\" \", $first);\n\t\t$explb = explode(\" \", $second);\n\n\t\t$result = 0;\n\t\t$n = 0;\n\t\tforeach ($expla as $a)\n\t\t {\n\t\t\tforeach ($explb as $key => $b)\n\t\t\t {\n\t\t\t\tif ($b === $a)\n\t\t\t\t {\n\t\t\t\t\t$n++;\n\t\t\t\t\tunset($explb[$key]);\n\t\t\t\t } //end if\n\n\t\t\t } //end foreach\n\n\t\t } //end foreach\n\n\t\t$result2 = (100 * $n) / count($expla);\n\n\t\t$result = ($result1 + $result2) / 2;\n\n\t\treturn (int) ceil($result);\n\t }", "function getReplacementString($lettersCount)\n{\n return str_pad('', $lettersCount, REPLACEMENT_CHAR);\n}", "function matchStart($a, $b)\n\t{\n\t\tfor($i = 0; $i < strlen($a); $i++) \n\t\t{ \n\t\t\tif($i >= strlen($b)) return $i;\n\t\t\tif($a[$i] != $b[$i]) return $i;\n\t\t}\n\t\t\n\t\treturn strlen($a);\n\t}", "static function reemplazarPattern(&$cadena,$patterns){\n $totalReemplazos=0;\n foreach($patterns as $clave=>$valor){\n $numeroReemplazoConcreto=0;\n $cadena=str_replace(\"[\".$clave.\"]\",$valor,$cadena,$numeroReemplazoConcreto);\n $totalReemplazos+=$numeroReemplazoConcreto;\n }//end foreach\n \n return $totalReemplazos;\n \n }", "public function count()\n {\n return count($this->chars);\n }", "function urutPanjang($a, $b){\n if (is_scalar($a) && is_scalar($b)) {\n if (strlen($a) == strlen($b)) {\n return 0;\n } else {\n return (strlen($a) > strlen($b)) ? 1 : -1;\n }\n \n }\n}", "public function charsCount() {\n return count($this->chars());\n }", "function d_and_c($people, $transformations) {\n if (strlen($people) <= 1024) {\n list($search, $replace) = $transformations;\n return str_replace($search, $replace, $people);\n }\n\n echo strlen($people) . \"\\n\";\n $chunks = array_filter(explode(\"\\r\\n\", chunk_split($people, 1024)));\n foreach ($chunks as $key => $chunk) {\n $chunks[$key] = d_and_c($chunk, $transformations);\n }\n\n return implode('', $chunks);\n}", "public function getNumberOccurances() {\n return (int) count($this->_stringFoundIn);\n }", "function count_chars($string,$mode=0)\n{\n\treturn '';\n}", "function compareStrLengthNegatively($a,$b){\n return strlen($b)-strlen($a);\n\t}", "function duplicateCount($text) {\n $text = mb_strtolower($text);//mb_strtolower - casts a string to lowercase\n $m = 0;\n foreach(count_chars($text, 1) as $i => $val)//iterate over the string\n {\n if ($val > 1)// checking if the character occurs more than once\n {\n $m++;\n }\n }\n return $m;\n}", "function mb_substr_count($haystack, $needle, $encoding = 'mb_internal_encoding()')\n{\n}", "function myFunc4($y) { \n\n$count = 0; \n//for each symbol of the string the following check is performed...\nfor($i = 0; $i < strlen($y); $i++) { \n\n$c = ord($y[$i]); \n// if ASCII code of the symbol is not in range between 97 and 122 (is not a letter a-z)...\nif($c < 97 || $c > 122) { \n//...$count is increased to +1 \n$count++; \n\n} \n\n} \n//function myFunc4 returns $count\n\nreturn $count;\n\n}", "function count_chars($string, $mode = 0)\n{\n return '';\n}", "function contarPalabras2 ($frase) {\n//\treturn count($cant);\n\treturn count(explode(' ', $frase));\n}", "protected function compare()\n {\n $this->points = 0;\n\n foreach($this->stringBase->getCharacters() as $key => $characterBase) {\n if($characterBase == $this->string->getCharacter($key)) {\n $this->points ++;\n }\n }\n\n return $this->points;\n }", "public static function getMatchedCharsCount($text1, $text2, $startIndex = 0)\n {\n if ($startIndex >= strlen($text1) || $startIndex >= strlen($text2))\n return 0;\n\n $matchedCharsCount = 0;\n for($i = $startIndex; $i < strlen($text1); $i++) {\n if ($i >= strlen($text2) || $text1[$i] != $text2[$i])\n break;\n\n $matchedCharsCount++;\n }\n\n return $matchedCharsCount;\n }", "public function getHighlightRegexMaxAnalyzedChars(): int {}", "public function getHighlightRegexMaxAnalyzedChars(): int {}", "public function lettersCount(){\n if(extension_loaded('mb_strlen')){\n return mb_strlen($this->content);\n }\n return strlen($this->content);\n }", "function _smarty_sort_length($a, $b)\n{\n if($a == $b)\n return 0;\n\n if(strlen($a) == strlen($b))\n return ($a > $b) ? -1 : 1;\n\n return (strlen($a) > strlen($b)) ? -1 : 1;\n}", "public function numberOfCharactersProvider()\n {\n return [[1]];\n }", "function strlen_sort($a,$b)\n{\n\tif (!isset($a)) $a='';\n\tif (!isset($b)) $b='';\n\tif ($a==$b) return 0;\n\tif (!is_string($a))\n\t{\n\t\tglobal $M_SORT_KEY;\n\t\treturn (strlen($a[$M_SORT_KEY])<strlen($b[$M_SORT_KEY]))?-1:1;\n\t}\n\treturn (strlen($a)<strlen($b))?-1:1;\n}", "function imperfect_anagram(&$s1, &$nb) {\n\n}", "function substr_count($haystack,$needle)\n{\n\treturn 0;\n}", "function GetCodepointCount(string $text): int { return 0; }", "function distance($a, $b)\n{\n $hamCount = 0;\n if (strlen($a) == strlen($b)) {\n for ($i = 0; $i < strlen($a); $i++){\n\n // have to find the index of each string with [$i]\n if ($a[$i] != $b[$i]) {\n // doesn't match \n $hamCount += 1;\n }\n }\n return $hamCount; \n }\n else {\n // struggled in invalid \n // help via https://stackoverflow.com/questions/28853513/phpunit-test-cases-for-invalidargumentexception\n throw new \\InvalidArgumentException('DNA strands must be of equal length.');\n }\n \n}", "function hammingDist($str1, $str2)\r\n{\r\n $i = 0; $count = 0;\r\n\t$lengthstr1 = strlen($str1);\r\n\t$lengthstr2 = strlen($str2);\r\n\r\n if ($lengthstr1 > $lengthstr2)\t\r\n\t\t$space = $lengthstr1;\r\n\telse\r\n\t\t$space = $lengthstr2;\r\n\t\r\n while ($i < $space) \r\n\t\t{\r\n if ($str1[$i] != $str2[$i])\r\n $count++;\r\n $i++;\r\n }\r\n return $count;\r\n}", "public function countWordAppers(){\n\t\t$mtx\t=& $this->getMatrix();\n\n\t\t$firt_letter\t= []; // Coordenadas donde aparece la letra O\n\t\tforeach ($mtx as $row_index => &$row) {\n\t\t\tforeach ($row as $column_index => &$letter) {\n\t\t\t\tif($letter == $this->__word[0])\n\t\t\t\t\t$firt_letter[]\t= [$row_index, $column_index];\n\t\t\t}\n\t\t}\n\n\t\t$countTimes\t= function ($letterCalc=null){\n\t\t\t$count = 0;\n\t\t\tforeach ($letterCalc as $letter_coordinate) {\n\t\t\t\tif($letter_coordinate !== null)\n\t\t\t\t\t$count++;\n\t\t\t}\n\t\t\treturn $count;\n\t\t};\n\t\t\n\t\t$count\t= 0;\n\t\tforeach ($firt_letter as $let) {\n\t\t\t$searchLetter\t= null;\n\t\t\tforeach ($this->__word as $letter_word) {\n\t\t\t\tif($letter_word === $this->__word[0])\n\t\t\t\t\tcontinue;\n\t\t\t\tif($searchLetter === null)\n\t\t\t\t\t$searchLetter\t= $this->__nextLetter($let, $mtx, $letter_word); // Coordenadas donde aparece la letra I\n\t\t\t\telse\n\t\t\t\t\t$searchLetter\t= $this->__nextLetter($searchLetter, $mtx, $letter_word); // Coordenadas donde aparece la letra E\n\t\t\t}\n\n\t\t\t$count = $count + $countTimes($searchLetter);\n\t\t}\n\n\t\treturn $count;\n\t}", "function count_chars($string, $mode = 0)\r\n{\r\n return \\count_chars($string, $mode);\r\n}", "function distance($a, $b)\n{\n //\n // YOUR CODE GOES HERE\n //\n if(strlen($a) != strlen($b)){\n throw new InvalidArgumentException(\"DNA strands must be of equal length.\");\n } else {\n if (strtolower($a) === strtolower($b)) {\n //strings are identical\n return 0;\n } else {\n //calculate difference between strands\n $difference = 0;\n\n //loop through string $a\n for ($i = 0; $i < strlen($a); $i++) {\n if ($a[$i] != $b[$i]) {\n //add 1 to $difference if they differ in that position\n $difference += 1;\n }\n }\n\n //return the sum of differences = distance between DNA strands.\n return $difference;\n }\n }\n}", "function lookandsay($s) {\n $r = '';\n // $m holds the character we're counting, initialize to the first\n // character in the string\n $m = $s[0];\n // $n is the number of $m's we've seen, initialize to 1\n $n = 1;\n for ($i = 1, $j = strlen($s); $i < $j; $i++) {\n // if this character is the same as the last one\n if ($s[$i] == $m) {\n // increment the count of this character\n $n++;\n } else {\n // otherwise, add the count and character to the return value \n $r .= $n.$m;\n // set the character we're looking for to the current one \n $m = $s[$i];\n // and reset the count to 1\n $n = 1;\n }\n }\n // return the built up string as well as the last count and character\n return $r.$n.$m;\n}", "function sort_max_length($a,$b) {\n if ( strlen($a) == strlen($b) ) return 0;\n return ( strlen($a) < strlen($b) ) ? 1 : -1;\n }", "function sort_max_length($a,$b) {\n if ( strlen($a) == strlen($b) ) return 0;\n return ( strlen($a) < strlen($b) ) ? 1 : -1;\n }", "private function modificaCaracter($string){\n$listaSubstituicao \t= array('a1','a2','a3','a4','a5','a6','a7','a8','a9','b1','b2','b3','b4','b5',\n 'b6','b7','b8','b9','c1','c2','c3','c4','c5','c6','c7','c8','c9',\n 'd1','d2','d3','d4','d5','d6','d7','d8','d9','e1','e2','e3','e4',\n 'e5','e6','e7','e8','e9','f1','f2','f3','f4','f5','f6','f7','f8',\n 'f9','g1','g2','g3','g4','g5','g6','g7','g8','g9','h1','h2','h3',\n 'h4','h5','h6','h7','h8','h9','i1','i2','i3','i4','i5','i6','i7',\n 'i8','i9','j1','j2','j3','j4','j5','j6','j7','j8','j9','k1','k2',\n 'k3','k4','k5','k6','k7','k8','k9','l1','l2','l3','l4','l5','l6',\n 'l7','l8','l9','m1','m2','m3','m4','m5','m6','m7','m8','m9','n1',\n 'n2','n3','n4','n5','n6','n7','n8','n9','o1','o2','o3','o4','o5',\n 'o6','o7','o8','o9','p1','p2','p3','p4','p5','p6','p7','p8','p9',\n 'q1','q2','q3','q4','q5','q6','q7','q8','q9','r1','r2','r3','r4',\n 'r5','r6','r7','r8','r9','s1','s2','s3','s4','s5','s6','s7','s8',\n 's9','t1','t2','t3','t4','t5','t6','t7','t8','t9','u1','u2','u3',\n 'u4','u5','u6','u7','u8','u9','v1','v2','v3','v4','v5','v6','v7',\n 'v8','v9','w1','w2','w3','w4','w5','w6','w7','w8','w9','y1','y2',\n 'y3','y4','y5','y6','y7','y8','y9','ab','ac','ad','ae','af','ag',\n 'ah','ai','aj','al','am','an','ao','ap','aq','ar','as','at','au',\n 'av','ax','az','ba','bb','bc','bd','be','bf','bg','bh','bi','bj',\n 'bl','bm','bn','bo','bp','bq','bu','bv');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \n \n for ($i=0;$i<255;$i++){\n if( $string == $i){\n\t\t\t return $listaSubstituicao[$i];\n }\n\t\t\n\t}\n}", "public function count(): int\n\t{\n\t\treturn count($this->delimiters);\n\t}", "public function count(): int\n {\n return count($this->matches);\n }", "static private function sortMessageMatches($a, $b)\n\t{\n\t\tif (strlen($a) == strlen($b)) {\n\t\t\treturn 0;\t\n\t\t}\n\t\tif (strlen($a) > strlen($b)) {\n\t\t\treturn -1;\t\n\t\t}\n\t\treturn 1;\n\t}", "public function getCharacters() : int {\n\t\treturn strlen($this->phpCode);\n\t}", "function repeatedString($s, $n) {\n if ($s === 'a') {\n return $n;\n }\n\n $length = strlen($s);\n // echo $length . PHP_EOL;\n // echo intval($n / $length) . PHP_EOL;\n // echo substr_count($s, 'a') . PHP_EOL;\n $countA = intval($n / $length) * substr_count($s, 'a');\n // echo $countA . PHP_EOL;\n // echo $n % $length . PHP_EOL;\n // echo substr($s, 0, ($n % $length)) . PHP_EOL;\n // echo substr_count(substr($s, 0, ($n % $length)), 'a') . PHP_EOL;\n $countA += substr_count(substr($s, 0, ($n % $length)), 'a');\n // echo $countA . PHP_EOL;\n\n return $countA;\n}", "function string_compare($str_a, $str_b) {\n $length = strlen($str_a);\n $length_b = strlen($str_b);\n\n $i = 0;\n $segmentcount = 0;\n $segmentsinfo = array();\n $segment = '';\n while ($i < $length) {\n $char = substr($str_a, $i, 1);\n if (strpos($str_b, $char) !== FALSE) {\n $segment = $segment . $char;\n if (strpos($str_b, $segment) !== FALSE) {\n $segmentpos_a = $i - strlen($segment) + 1;\n $segmentpos_b = strpos($str_b, $segment);\n $positiondiff = abs($segmentpos_a - $segmentpos_b);\n $posfactor = ($length - $positiondiff) / $length_b; // <-- ?\n $lengthfactor = strlen($segment) / $length;\n $segmentsinfo[$segmentcount] = array('segment' => $segment, 'score' => ($posfactor * $lengthfactor));\n } else {\n $segment = '';\n $i--;\n $segmentcount++;\n }\n } else {\n $segment = '';\n $segmentcount++;\n }\n $i++;\n }\n\n // PHP 5.3 lambda in array_map \n $totalscore = array_sum(array_map(function($v) {\n return $v['score'];\n }, $segmentsinfo));\n return $totalscore;\n }", "public function count() {\n return count($this->strg);\n }", "function encode(string $str) : string\n{\n return preg_replace_callback('/(.)\\1+/', function ($match) { return strlen($match[0]) . $match[1]; }, $str);\n}", "function slow_equals($a, $b)\n\t{\n\t\t$diff = strlen($a) ^ strlen($b);\n\t\tfor($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\n\t\t\t$diff |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\t\treturn $diff === 0; \n\t}", "function ocp_mb_strlen($in,$force=false)\n{\n\tif ((!$force) && (strtolower(get_charset())!='utf-8')) return strlen($in);\n\tif (function_exists('mb_strlen')) return @mb_strlen($in,$force?'utf-8':get_charset()); // @ is because there could be invalid unicode involved\n\tif (function_exists('iconv_strlen')) return @iconv_strlen($in,$force?'utf-8':get_charset());\n\treturn strlen($in);\n}", "public function testConsigmentAlgorithmLength(): void \n {\n $ancConsignmentNoAlgorithm = function() : string\n {\n $randomNumber = date('Ymd').\"\";\n for ($i = 0; $i < 6; $i++) {\n $randomNumber .= strval(rand(0,9));\n }\n return $randomNumber;\n };\n $ANC = new Courier(\"ANC\", \"email\", [], $ancConsignmentNoAlgorithm);\n $this->assertEquals(strlen(date('Ymd').\"123456\"), \n strlen($ANC->getConsignmentNumber()));\n }", "function substr_count($haystack, $needle, $offset = 0, $maxlen = null)\n{\n return 0;\n}", "function getConsecRefactor($n) {\n $binN = str_split(base_convert($n,10,2));\n $maxCount = 0;\n $count = 0;\n foreach($binN as $char) {\n $count = ($char == 0) ? 0 : $count=$count+1;\n if ($count > $maxCount) {\n $maxCount = $count;\n }\n }\n echo $maxCount;\n}", "public static function getNumSpecialChars(): int {\n\t\treturn self::$numSpecialChars;\n\t}", "public function getHighlightMaxAnalyzedChars(): int {}", "public function getHighlightMaxAnalyzedChars(): int {}", "function str_word_count($input, $format = 0, $chars = '')\n{\n return array();\n}", "protected function syllablesCount()\r\n {\r\n foreach ($this->words as $word) {\r\n $word = $this->prefixAndSuffix($word);\r\n $word = $this->problemWord($word);\r\n $word = $this->addSyllable($word);\r\n $word = $this->subtractSyllable($word);\r\n $this->wordRemnant($word);\r\n }\r\n }", "function getStrLenTH($string)\n{\n\t$array = getMBStrSplit($string);\n\t$count = 0;\n\t\n\tforeach($array as $value)\n\t{\n\t\t$ascii = ord(iconv(\"UTF-8\", \"TIS-620\", $value ));\n\t\t\n\t\tif( !( $ascii == 209 || ($ascii >= 212 && $ascii <= 218 ) || ($ascii >= 231 && $ascii <= 238 )) )\n\t\t{\n\t\t\t$count += 1;\n\t\t}\n\t}\n\treturn $count;\n}", "function countChar($string,$c){\n $numChars = preg_match_all(\"/$c/\", $string, $num);\n return count($num[0]);\n}", "function slow_equals($a, $b)\n{\n $diff = strlen($a) ^ strlen($b);\n for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n return $diff === 0; \n}", "function distance($str1, $str2, $insertion, $substitution) {\n // Return trivial case - where they are equal\n if ($str1 == $str2)\n return 0;\n \n $len1 = strlen($str1);\n $len2 = strlen($str2);\n\n // Return trivial case - where one is empty\n if ($len1 == 0 || $len2 == 0)\n return $len1 + $len2;\n\t$M = array();\n\tfor ($i = 0; $i <= $len1; $i++)\n\t\t$M[$i][0] = $i * $insertion;\n\tfor ($i = 0; $i <= $len2; $i++)\n\t\t$M[0][$i] = $i * $insertion;\n\tfor ($i = 1; $i <= $len1; $i++) {\n\t\tfor ($j = 1; $j <= $len2; $j++) {\n\t\t\tif ($str1[$i-1] == $str2[$j-1]) {\n\t\t\t\t$cost = 0;\n\t\t\t} else {\n\t\t\t\t$cost = $substitution;\n\t\t\t}\n\t\t\t$M[$i][$j] = min($M[$i-1][$j] + $insertion, $M[$i][$j-1] + $insertion, $M[$i-1][$j-1] + $cost);\n\t\t\tif ($i > 1 && $j > 1 && $str1[$i-1] == $str2[$j-2] && $str1[$i-2] == $str2[$j-1]) {\n\t\t\t\t$M[$i][$j] = min($M[$i][$j], $M[$i-2][$j-2]+$substitution); //transposition\n\t\t\t}\n\t\t}\n\t}\n\treturn $M[$len1][$len2];\n}", "public function count () : int\n {\n return strlen($this->string);\n }", "function slow_equals($a, $b)\n{\n $diff = strlen($a) ^ strlen($b);\n for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n return $diff === 0;\n}", "function str_count_letra($letra,$string) {\r\n $largo=strlen($string);\r\n $counter=0;\r\n for($i=0;$i<$largo;$i++)\r\n {\r\n if($string[$i]==$letra)\r\n $counter++;\r\n }\r\n return $counter;\r\n\r\n}", "function str_count_letra($letra,$string) {\r\n $largo=strlen($string);\r\n $counter=0;\r\n for($i=0;$i<$largo;$i++)\r\n {\r\n if($string[$i]==$letra)\r\n $counter++;\r\n }\r\n return $counter;\r\n\r\n}", "function lineUp($commands) {\n $array = str_split($commands);\n $counter = 0;\n $facingSame = true;\n\n // handle case for empty input\n // (str_sprit unfortunately creates array with one empty element)\n if (empty($commands)) {\n $array = [];\n }\n\n foreach ($array as $letter) {\n switch ($letter) {\n case 'L':\n case 'R':\n $facingSame = !$facingSame;\n\n break;\n case 'A':\n // no action needed, just consume the command\n break;\n }\n\n if ($facingSame) {\n $counter++;\n }\n }\n\n return $counter;\n}", "private function matchLetterCounts() {\n\t\t\n\t\t\tforeach($this->dictionary as $key => $dictionary_word) {\n\t\t\t\t$dictionary_word_count_values = array_count_values(str_split(strtolower($dictionary_word)));\n\t\t\t\t$word_count_values = array_count_values($this->word);\n\t\t\t\t\n\t\t\t\tforeach($word_count_values as $letter_count_value => $letter_count_amount) {\n\t\t\t\t\tif(isset($dictionary_word_count_values[$letter_count_value]) && ($letter_count_amount < $dictionary_word_count_values[$letter_count_value])) {\n\t\t\t\t\t\tunset($this->dictionary[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "protected function getStringsFrequency()\n\t{\n\t\t$regexp = '(' . implode('|', $this->deduplicateTargets) . ')S';\n\t\tpreg_match_all($regexp, $this->xsl, $matches);\n\n\t\treturn array_count_values($matches[0]);\n\t}", "function countChar($arr1, $character)\n{\n $count = 0;\n $arr = str_split($arr1);\n $arrLength = count($arr);\n\n for ($i = 0; $i < $arrLength; $i++) {\n if ($arr[$i] === $character) {\n $count++;\n }\n }\n\n return $count;\n}", "function prefixLength( $string1, $string2, $MINPREFIXLENGTH = 4 ){\n\t\t$n = min( array( $MINPREFIXLENGTH, strlen($string1), strlen($string2) ) );\n \tfor($i = 0; $i < $n; $i++){\n\t\t\tif( $string1[$i] != $string2[$i] ){\n\t\t\treturn $i;\n\t\t\t}\n\t\t}return $n;\n\t}", "public function testIsReturnCorrectStringCount()\n {\n //Create object\n $passwordGenerator = new RandomPasswordGenerator();\n\n //checking password's characters count correct or not\n $this->assertEquals(9, strlen($passwordGenerator->useNumbers()->generatePassword(9) ));\n }", "function sameLength($s1, $s2){\r\n\t\t\t\tif(strlen($s1) !== strlen($s2))\r\n\t\t\t\t\treturn strlen($s1) - strlen($s2);\r\n\t\t\t\treturn true;\r\n\t\t\t}", "public function getCharacterCount()\n {\n return $this->characters->count();\n }", "function levenshtein($str1, $str2)\n{\n return 0;\n}", "public function length(): int\n {\n return \\count($this->A);\n }", "function Task3( $s1, $s2 ){\n\t$ret = '';\n\tforeach ( str_split($s1) as $k => $l){\n\t\t# $s1 is longer than $s2\n\t\tif ( !isset( $s2[$k]) ){\n\t\t\t$ret = 'First difference between two strings at position '. $k .': Second string has no character at position!';\n\t\t\tbreak;\n\t\t}\n\n\t\t# standard character mismatch\n\t\tif ( $l !== $s2[$k] ) {\n\t\t\t$ret = 'First difference between two strings at position '. $k .': \"'.$l.'\" vs \"'.$s2[$k].'\"';\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t# s2 is longer than s1 and no mismatch so far\n\tif ( strlen ($s2) > strlen ($s1) &&\n\t \t $ret == ''\n\t ){\n\t\t$ret = 'First difference between two strings at position '. strlen ($s1) .': Firat string has no character at position!';\n\t}\n\n\t# no difference\n\tif ( $ret == ''){\n\t\t$ret = 'No difference between the two strings';\n\t}\n\n\treturn $ret;\n}", "public static function char_length()\n\t{\n\t}", "public function complexity()\n {\n $dynamicPartsCount = substr_count($this->pattern, ':') + substr_count($this->pattern, '?');\n\n return (substr_count($this->pattern, '/') - $dynamicPartsCount) * 100 + $dynamicPartsCount;\n }", "function zen_word_count($string, $needle) {\n $temp_array = preg_split('/'.$needle.'/', $string);\n\n return sizeof($temp_array);\n }", "function CountOccurence($strIn, $strSought)\n{\n\t$intOut=0;\n \tfor($i = 0; $i < strlen($strIn)+1; $i++) \n\t{\n\t\t$thisChar=substr($strIn,$i,strlen($strSought));\n \t\tif($thisChar==$strSought)\n\t\t{\n\t\t\t$intOut++;\n\t\t\t$i=$i+strlen($strSought)-1;\n\t\t}\n\t}\n\treturn $intOut;\n}", "public static function prefix_len($str1, $str1_len, $str2, $str2_len, $default_len = 4)\n {\n $min = min([$str1_len, $str2_len, $default_len]);\n $result = 0;\n\n $nextGraphemeOffset1 = 0;\n $nextGraphemeOffset2 = 0;\n for ($i = 0; $i < $min; $i++, $result++) {\n $currentGraphemeOffset1 = $nextGraphemeOffset1;\n $currentGraphemeOffset2 = $nextGraphemeOffset2;\n\n $grapheme1 = IntlString::grapheme($str1, $currentGraphemeOffset1, $nextGraphemeOffset1);\n $grapheme2 = IntlString::grapheme($str2, $currentGraphemeOffset2, $nextGraphemeOffset2);\n\n $codepoint1 = \\IntlChar::ord($grapheme1);\n $codepoint2 = \\IntlChar::ord($grapheme2);\n\n if ($codepoint1 != $codepoint2)\n break;\n }\n\n return $result;\n }", "function tep_word_count($string, $needle) {\n $temp_array = split($needle, $string);\n\n return sizeof($temp_array);\n }", "public static function character_length()\n\t{\n\t}", "function textlen ($t){\n $i = 0;\n\nwhile ($t[$i] != '') {\n $i++;\n}\nreturn $i;\n}", "function wordlen($w){\n $l = strlen($w);\n // If left alone, all chinese \"words\" will get put into w3.idx\n // So the \"length\" of a \"word\" is faked\n if(preg_match('/'.IDX_ASIAN2.'/u',$w))\n $l += ord($w) - 0xE1; // Lead bytes from 0xE2-0xEF\n return $l;\n}", "public function moarStrings(string $input): int\n {\n $hasTwoPairs = '.*([a-z]{2}).*\\1.*';\n $hasRepeatingLetterAroundOne = '.*([a-z])[a-z]\\1.*';\n\n $count = 0;\n\n foreach (explode(\"\\n\", trim($input)) as $line) {\n if (preg_match(\"/$hasTwoPairs/i\", $line) && preg_match(\"/$hasRepeatingLetterAroundOne/i\", $line)) {\n $count++;\n }\n }\n\n return $count;\n }", "function countVowels( $str )\n{\n $vowels = ['a','u','o','i','e'];\n // The following statement performs the following tasks:\n // Removes all vowels from the input text $str\n // Returns the subtraction of $str length - $str without vowels which is the number of vowels in a string.\n return strlen($str) - strlen(str_replace($vowels, \"\", strtolower($str)));\n}", "function addVowels($answer)\n{\n $stringLength = str_split($answer);\n\n foreach ($stringLength as $letter) {\n $vowelCount += countVowels($letter);\n }\n return $vowelCount;\n}", "protected function slowEquals($a, $b) {\n\t\t$diff = strlen($a) ^ strlen($b);\n\t\tfor ($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\n\t\t\t$diff |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\t\treturn $diff === 0;\n\t}", "public static function slow_equals($a, $b)\n\t{\n\t\t$diff = strlen($a) ^ strlen($b);\n\t\tfor($i = 0; $i < strlen($a) AND $i < strlen($b); $i++)\n\t\t{\n\t\t\t$diff |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\t\treturn $diff === 0;\n\t}", "function calc_bytes($codes){\n\t\tif (!$codes) return '';\n\t\t$out = '';\n\t\t$codes = explode('-', $codes);\n\t\tforeach ($codes as $code){\n\t\t\t$out .= format_codepoint($code);\n\t\t}\n\t\treturn $out;\n\t}", "private static function calculatePreReleaseDifference($a, $b)\n {\n $retval = 0;\n if ($a !== null) {\n $retval -= 1;\n }\n if ($b !== null) {\n $retval += 1;\n }\n\n return $retval;\n }", "function strsize( string $text ) : int {\n\treturn missing( 'mb_strlen' ) ? \n\t\t\\strlen( $text ) : \\mb_strlen( $text, '8bit' );\n}", "public function nbAleatoire($length)\n {\n $tab_match = [];\n while (count($tab_match) < $length) {\n preg_match_all('#\\d#', hash(\"sha512\", openssl_random_pseudo_bytes(\"128\", $cstrong)), $matches);\n $tab_match = array_merge($tab_match, $matches[0]);\n }\n shuffle($tab_match);\n return implode('', array_slice($tab_match, 0, $length));\n\n }", "function compTab($tab){\r\n $c=0;\r\n foreach ($tab as $key => $value) {\r\n $c=$c+1;\r\n }\r\n return $c;\r\n}" ]
[ "0.6659242", "0.6170879", "0.60684663", "0.6042461", "0.58299744", "0.56666124", "0.5653821", "0.5615992", "0.56157446", "0.56142753", "0.56133014", "0.5548136", "0.55242217", "0.5509795", "0.5382315", "0.5369354", "0.53438276", "0.5327885", "0.53198963", "0.5289708", "0.5277926", "0.5271654", "0.5263969", "0.5226427", "0.5207734", "0.5194325", "0.5167398", "0.5167398", "0.5146266", "0.51325184", "0.51255757", "0.5100512", "0.50953126", "0.50530905", "0.50505793", "0.502845", "0.5027725", "0.50228125", "0.50201637", "0.49973163", "0.4982417", "0.49807298", "0.49807298", "0.49779493", "0.49486932", "0.4946755", "0.49390274", "0.4926742", "0.49261305", "0.49208623", "0.49175993", "0.49127272", "0.4904924", "0.48851535", "0.48822013", "0.4876086", "0.48628038", "0.48607236", "0.4858966", "0.4858966", "0.48520538", "0.48281202", "0.4825906", "0.4821689", "0.481793", "0.4816507", "0.48047966", "0.48035577", "0.480277", "0.480277", "0.48017722", "0.4798025", "0.47963443", "0.47924173", "0.47922635", "0.47800258", "0.47796488", "0.47677708", "0.4758371", "0.47552097", "0.4747905", "0.474647", "0.4746142", "0.47407663", "0.47392556", "0.47387612", "0.47142708", "0.47118205", "0.4704217", "0.47000355", "0.46905735", "0.46872565", "0.46835142", "0.4674662", "0.4660681", "0.46452987", "0.46416277", "0.46370035", "0.4625824", "0.4624446" ]
0.7902229
0
Gets an array of all words with one repeat sequence removed from given word
Получает массив всех слов с одной последовательностью повторов, удаленной из заданного слова
public function getCollapsedWords($word) { // Find short tandem repeat sequences in string $matches = array(); preg_match_all('/(.{1,2}?)\1+/', $word, $matches); if ($matches === FALSE) { return array(); } // Collect words with one repeat removed $collapsedWords = array(); $numMatches = count($matches[0]); for ($i = 0; $i < $numMatches; $i++) { $rangeSequence = $matches[0][$i]; $repeatSequence = $matches[1][$i]; // find all occurances of range sequence in word $rangePos = 0; while (($rangePos = strpos($word, $rangeSequence, $rangePos)) !== FALSE) { // Remove first repeat sequence and add to collaped words $endLeft = $rangePos + strlen($repeatSequence); $endRight = strlen($word); $collapsedWord = substr($word, 0, $rangePos) . substr($word, $endLeft, $endRight); $collapsedWords[] = $collapsedWord; $rangePos += strlen($rangeSequence); } } return $collapsedWords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUniqueWords(string $text) : array {\n $result = [];\n $countableWordsFromText = [];\n $clearedText = preg_replace (\"/[^a-zA-ZА-Яа-я0-9\\'\\-\\s]/\",\"\", $text);\n $wordsFromText = explode(' ', $clearedText);\n foreach ($wordsFromText as $word) {\n $word = strtolower($word);\n if (!array_key_exists($word, $countableWordsFromText)) {\n $countableWordsFromText[$word] = 1;\n } else {\n $countableWordsFromText[$word]++;\n }\n }\n $arrayOfUniqueWords = array_filter($countableWordsFromText, function ($value) {\n return $value === 1;\n });\n foreach ($arrayOfUniqueWords as $key => $word) {\n $result[] = $key;\n }\n return $result;\n}", "public function generateUnwantedWords(){\r\r\n\t\t// add more words to the space separated string to exclude them from keywords list.\r\r\n\t\t$unwantedWords = \"all from of to and as write next dd mmm yyyy pin d.o.b call age sex type\";\t\t\r\r\n\t\tmb_regex_encoding( \"utf-8\" );\r\r\n\t\t$unwantedWordsArray = mb_split( ' +', $unwantedWords );\r\r\n\t\tforeach ( $unwantedWordsArray as $key => $word )\r\r\n\t\t\t$unwantedWordsArray[$key] = PorterStemmer::Stem( $word, true );\r\r\n\t\treturn $unwantedWordsArray;\r\r\n\t}", "function find_delete_edits( $word)\n{\n\t$word_length = strlen($word);\n\t/*\n\t *deletes from words of length one\n\t *never produce valid words (it would\n\t *be the empty ). So we just return\n\t *an empty array.\n\t */\n\tif( $word_length <= 1) \t{\n\treturn Array();\n\t}\n\telse\n\t{\n\t\t$deletes= Array();\n\t\tfor( $i=0; $i<$word_length; $i++ )\n\t\t{\n\t\t\t//calculate deletes\n\t\t\t//Exclude letter at index i from this 'edit' of the word\n\t\t\t$del_edit = substr($word, 0, $i).substr($word,$i+1,$word_length-($i+1));\n\t\t\tarray_push($deletes, $del_edit);\n\t\t} \n\t\treturn $deletes;\n\t}\n}", "private function getFilteredAlphabetArray() {\n\t\t\n\t\t\t$alphabet = str_split(\"abcdefghijklmnopqrstuvwxyz\");\n\t\t\t\n\t\t\tforeach($this->word as $wordLetter) {\n\t\t\t\tforeach($alphabet as $key => $alphabetLetter) {\n\t\t\t\t\tif($wordLetter == $alphabetLetter) {\n\t\t\t\t\t\tunset($alphabet[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn (array) $alphabet;\n\t\t\t\n\t\t}", "public function removeRepeatedElements(&$array) {\n\t\tfor ($i = 0; $i < count($array); $i++) {\n\t\t\tfor ($j = $i+1; $j < count($array); $j++) {\n\t\t\t\tif ($array[$i] == $array[$j]) {\n\t\t\t\t\tunset($array[$j]);\n\t\t\t\t\t$array = array_merge($array, array());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function extract_cont($word_list) {\r\n\t$n = count($word_list);\r\n\t$last = \"\";\r\n\t$num_ems = 0;\r\n\tfor ($h=1;$h<$n;$h++) {\r\n\t\t$primo = key($word_list);\r\n\t\tnext($word_list);\r\n\t\t$secondo = key($word_list);\r\n\t\t$dist = $secondo - $primo;\r\n\t\tif ($dist>1) {\r\n\t\t\tif ($last<>\"continuos\") {\r\n\t\t\t\t$word_list[$primo] = \"\";\r\n\t\t\t}\r\n\t\t\t$last = \"\";\r\n\t\t}\r\n\t\telse { $last = \"continuos\"; }\r\n\r\n\t}\r\n\t// CANCELLA L'ULTIMO ELEMENTO SE DISCONTINUO\r\n\tif ($dist>1) { $word_list[$secondo] = \"\"; }\r\n\t$word_list = array_diff($word_list,array(\"\"));\r\n\r\n\tif (swd($word_list)<>0) {\r\n\t\t// echo \"CA N CE STA NIENT A FA\\n\";\r\n\t\t$word_list = false;\r\n\t}\r\n\treturn $word_list;\r\n}", "private static function getBadWordsArray(){\r\n\r\n $fp = @fopen('list.txt', 'r'); \r\n if ($fp) {\r\n $array = explode(\"\\n\", fread($fp, filesize('list.txt')));\r\n $array = array_unique($array);\r\n }\r\n return $array;\r\n \r\n }", "function removeCommonWords($str){\n\t// call by reference (actually changes the variable)\n\t$remove = array (\n\t\t'at',\n\t\t'the',\n\t\t'and',\n\t\t'of',\n\t\t'in',\n\t\t'with',\n\t\t'&');\n\tfor ($x = 0; $x < count($remove); $x++) {\n\t\t$str = preg_replace('/\\b' . $remove[$x] .'\\b/i', '', $str);\n\t}\n\n\treturn($str);\n}", "function firstNonRepeat2($string) { \n\t$array = str_split($string);\n\t$characters = [];\n\tforeach ($array as $value) { \n\t\tif (array_key_exists($value, $characters)) {\n\t\t\tunset($characters[$value]);\n\t\t} else {\n $characters[$value] = 1;\n\t\t}\n\t}\n\tforeach ($characters as $key => $value) {\n\t\treturn $key;\n\t}\n}", "function removeRepition(array $a)\n{ $j=1;\n $result[] = $a[0];\n for ($i = 1; $i < count($a); $i++) {\n if (in_array($a[$i], $result)) {\n continue;\n\n } else {\n $result[$j] = $a[$i];\n $j++;\n }\n\n }\n sort($result);\n return ($result);\n}", "public static function strip_words ($text_array) {\n\t\tfor ($i = 0; $i < count($text_array); $i++) {\n\t\t\t$word = $text_array[$i];\n\t\t\tif (in_array($word, self::$to_ignore)) {\n\t\t\t\tunset($text_array[$i]);\n\t\t\t}\n\t\t}\n\t\treturn $text_array;\n\t}", "public function Words($phrase) {\n\t\t$phrase = explode(' ', $phrase);\n\t\t$filtered = array();\n\t\t\n\t\tforeach ($phrase as $word) {\n\t\t\t// Remove excluded words\n\t\t\tif (!isset(self::$EXCLUDE[$word]) && isset($word[self::MIN_LETTERS - 1])) {\n\t\t\t\tarray_push($filtered, $word);\n\t\t\t}\n\t\t}\n\t\treturn $filtered;\n\t}", "function get_missed_char_typos ($word) {\n\t\t$word\t= strtolower($word);\n\t\t$typos\t= array();\n\t\t$length = strlen($word);\n\t\t// check each character\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$tempWord = '';\n\t\t\tif ($i == 0) {\n\t\t\t\t// at first character\n\t\t\t\t$tempWord = substr($word, ($i + 1));\n\t\t\t} else if (($i + 1) == $length) {\n\t\t\t\t// at last character\n\t\t\t\t$tempWord = substr($word, 0, $i) ;\n\t\t\t} else {\n\t\t\t\t// in between\n\t\t\t\t$tempWord = substr($word, 0, $i) ;\n\t\t\t\t$tempWord .= substr($word, ($i + 1)) ;\n\t\t\t}\n\t\t\tif ($tempWord != $word) { \n\t\t\t\tarray_push($typos, $tempWord);\n\t\t\t}\n\t\t}\n\t\treturn $typos;\n\t}", "function filterAnagrams(string $word, array $coll): array\n{\n $letters = str_split($word);\n sort($letters);\n return array_values(array_filter($coll, function ($str) use ($letters) {\n $letters2 = str_split($str);\n sort($letters2);\n return $letters === $letters2;\n }));\n}", "private static function filterDuplicatedBadWords($sentence, $replace){\r\n\r\n $words = preg_split('/\\s+/', $sentence);\r\n $array = self::getBadWordsArray();\r\n $res = $sentence;\r\n foreach($words as $word) {\r\n $correctForm = self::removeDuplicateCharacters($word);\r\n if (in_array($correctForm, $array,true) ) {\r\n self::$count ++;\r\n \r\n $res = str_ireplace($word, $replace, $res);\r\n }\r\n }\r\n return $res;\r\n\r\n }", "public function getUniqueTags($word){\n $sql = \"SELECT * FROM WordList WHERE Word=?\";\n $results=[];\n $this->query($sql,[$word]);\n $resultsQuery = $this->_db->results();\n\n if($resultsQuery){\n foreach($resultsQuery as $result) {\n\n $obj = new Word();\n $obj->populateObjData($result);\n $results[] =$obj;\n }\n }\n// dnd($results);\n $res=[];\n foreach ($results as $result){\n $res[]=$result->Tags;\n $res[]=$result->Counts;\n }\n// dnd($res);\n return $res;\n }", "public function wordsCounter(){\n $array = array_unique(str_word_count($this->content,1));\n $result = array();\n foreach($array as $word){\n $total = substr_count($this->content,$word);\n $result[$word] = $total;\n }\n return $result;\n }", "public static function uniqueWords($sentence)\n {\n $words = explode(' ', $sentence);\n $words = array_filter($words); // filter out extra spaces\n $words = array_unique($words); // remove duplicate words\n // sort words from longest to shortest\n usort(\n $words,\n function ($a, $b) {\n return mb_strlen($b) - mb_strlen($a);\n }\n );\n\n return $words;\n }", "function RemoveRepeatingLetters($str, $repetitions = 4)\n{\n\t$i = 0;\n\twhile ($i < mb_strlen($str,'UTF-8')){\n\t\t$j = $i;\n\t\t// Traverses the string comparing the first character with the others.\n\t\twhile(mb_substr($str,$j,1,'UTF-8') == mb_substr($str,$j+1,1,'UTF-8'))\n\t\t\t$j++;\n\t\t// Removes the repetition if needed\n\t\tif ($j >= $i+$repetitions)\n\t\t\t$str = mb_substr($str,0,$i,'UTF-8') . mb_substr($str,$j,mb_strlen($str)-$j,'UTF-8');\t\t\n\t\t$i++;\n\t}\n\treturn $str;\n}", "private function filterLoose() {\n\t\t\tforeach($this->alphabet as $letter) {\n\t\t\t\tforeach($this->dictionary as $key => $word) {\n\t\t\t\t\t$wordArr = str_split(strtolower($word));\n\t\t\t\t\tif(in_array($letter, $wordArr)) {\n\t\t\t\t\t\tunset($this->dictionary[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "function permute($word) {\n $length = strlen($word);\n // if the length of the string is 1, there aren't any permutations for it.\n\t// so return the incoming string (BASE CASE)\n\t// Note: need to return as an array to be a good arg for the rest of permute\n\t// function when returned\n\tif ($length === 1) {\n\t\treturn array($word);\n\t}\t\t\n\telse {\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t// separate out each letter in the string from the others in the\n\t\t\t// string\n\t\t\t$singleLetter = substr($word, $i, 1);\n\t\t\t$restOfString = substr($word, 0, $i) . substr($word, $i+1);\n\t\t\t\n\t\t\t// then permute the rest of the string\n\t\t\t$permutedWord = array();\n\t\t\t$permutedWord = permute($restOfString);\n\n\t\t\t//then move the single letter we put aside \"between\" each position\n\t\t\t//in the string returned by permute\n\t\t\tforeach ($permutedWord as $w) {\n\t\t\t\tfor ($j = 0; $j < strlen($w); $j++) {\n\t\t\t\t// note: could check to see if value is already in returned\n\t\t\t\t// array to prevent duplicates\n\t\t\t\t\t$returnArray[] = substr($w, 0, $j) . $singleLetter \n\t\t\t\t\t\t\t\t . substr($w, $j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $returnArray;\n\t}\n}", "public function findRelatedWords($word)\n {\n return Word::where('word','!=',$word)->where('word', 'LIKE' ,'%'.$word.'%')->get();\n }", "function uniqueTerms( string $value ) : array {\n\treturn \n\t\\array_unique( \n\t\t\\preg_split( \n\t\t\t'/[[:space:]]+/', trim( $value ), -1, \n\t\t\t\\PREG_SPLIT_NO_EMPTY \n\t\t) \n\t);\n}", "private function reverseArrayCompile(array $wordChars, array $hiraganaChars)\n {\n $reverseHiragana = array_reverse($hiraganaChars);\n\n $reverseHiraganaCopy = $reverseHiragana;\n\n foreach ($reverseHiragana as $key => $char) {\n if (in_array($char, $wordChars)) {\n unset($wordChars[array_search($char, $wordChars)]);\n\n unset($reverseHiraganaCopy[$key]);\n }\n }\n\n return array_diff(array_reverse($reverseHiraganaCopy), $wordChars);\n }", "public function checkWord($word){\n $wordPairs = array();\n for($x=1; $x<6; $x++){\n $word1 = substr($word, 0, $x);\n $word2 = substr($word, $x);\n if($this->checkWordPair($word1, $word2)){\n $wordPairs[] = array($word1, $word2);\n }\n }\n return $wordPairs;\n }", "function find_duplicated($a) {\r\n array_unshift($a, '|>###$$$###$$$##<|');\r\n $b = array_flip(array_unique($a));\r\n foreach ($a as $k => $v) {\r\n if (isset($b[$v])) {\r\n unset($a[$k]);\r\n unset($b[$v]);\r\n }\r\n }\r\n return array_unique($a);\r\n }", "function elementosrepetidos($array, $returnWithNonRepeatedItems = false){\n\t$repeated = array();\n\n\tforeach( (array)$array as $value ){\n\t\t$inArray = false;\n\n\t\tforeach( $repeated as $i => $rItem ){\n\t\t\tif( $rItem['value'] === $value ){\n\t\t\t\t$inArray = true;\n\t\t\t\t++$repeated[$i]['count'];\n\t\t\t}\n\t\t}\n\n\t\tif( false === $inArray ){\n\t\t\t$i = count($repeated);\n\t\t\t$repeated[$i] = array();\n\t\t\t$repeated[$i]['value'] = $value;\n\t\t\t$repeated[$i]['count'] = 1;\n\t\t}\n\t}\n\n\tif(!$returnWithNonRepeatedItems){\n\t\tforeach( $repeated as $i => $rItem ){\n\t\t\tif($rItem['count'] === 1){\n\t\t\t\tunset($repeated[$i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tsort($repeated);\n\n\treturn $repeated;\n}", "private function filterStrict() {\n\t\t\tforeach($this->word as $wordLetter) {\n\t\t\t\tforeach($this->dictionary as $key => $word) {\n\t\t\t\t\t$wordArr = str_split($word);\n\t\t\t\t\tif(!in_array($wordLetter, $wordArr)) {\n\t\t\t\t\t\tunset($this->dictionary[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function eliminateDuplicates($keys, &$words = array()) {\n foreach ($keys as $i => $word) {\n if (!element_child($i)) {\n continue;\n }\n if (is_scalar($word)) {\n if (isset($words[$word])) {\n unset($keys[$i]);\n }\n else {\n $words[$word] = TRUE;\n }\n }\n else {\n $keys[$i] = $this->eliminateDuplicates($word, $words);\n }\n }\n return $keys;\n }", "private function _getWords() {\n\t\tif($this->includeFiller){\n\t\t\t$words = array_merge($this->meat, $this->filler);\n\t\t}\n\t\telse{\n\t\t\t$words = $this->meat;\n\t\t}\n\n\t\tshuffle($words);\n\n\t\treturn $words;\n\t}", "function _removeStopWords( $words) {\r\n return array_diff($words, $this->stopWords);\r\n }", "static function remove_prefix($array, $prefix)\n\t{\t\t\t\n\t\treturn array_combine(\n\t\t\tarray_map(\n\t\t\t\tfunction($k,$prefix){\n\t\t\t\t\treturn preg_replace(\"/^$prefix/\", '', $k);\n\t\t\t\t},\n\t\t\t\tarray_keys($array),\n\t\t\t\tarray_fill(0 , count($array) , $prefix)\n\t\t\t),\n\t\t\t$array\n\t\t);\n\t}", "function Trigrams($word) {\n // wrapping\n $word = '__'.$word.'__';\n\n $ngrams = array();\n $len = strlen($word);\n for($i=0;$i+2<$len;$i++){\n $ngrams[$i]=$word[$i].$word[$i+1].$word[$i+2];\n }\n return $ngrams;\n}", "protected function wordRemnant($word)\r\n {\r\n for ($i = 0; $i < strlen($word); $i++) {\r\n if (stripos(static::VOWELS, $word[$i]) !== false) {\r\n $this->syllables_count++;\r\n }\r\n }\r\n }", "private static function r1($word) {\n\t $v = self::$regex_vowels;\n\t $nv = self::$regex_non_vowels;\n\n\t $substrings = preg_split(\"#$v+$nv#\", $word, 2);\n\n\t if (count($substrings) < 2) {\n\t return '';\n\t }\n\n\t $r1 = $substrings[1];\n\n\t while (self::count($r1) > 0 && self::count(preg_replace(\"#$r1$#\", '', $word)) < 3) {\n\t $r1 = substr($r1, 1);\n\t }\n\n\t return $r1;\n\t }", "public function getRandomWords($count)\r\n {\r\n $words = array();\r\n\r\n for ($i = 0; $i < $count; $i++) {\r\n $word = $this->getWords()[array_rand($this->getWords())];\r\n if ($i > 0 && $words[$i - 1] === $word) {\r\n $i--;\r\n continue;\r\n }\r\n\r\n $words[] = $word;\r\n }\r\n\r\n return $words;\r\n }", "public function unduplicate($array)\n\t\t\t{\n\t\t\t\t// Create a temporal array\n\t\t\t\t$temp = array();\n\n\t\t\t\t// Loop all content in the array\n\t\t\t\tfor($i = 0; $i < count($array); $i++){\n\t\t\t\t\t// Assume current item is set\n\t\t\t\t\t$isset = false;\n\n\t\t\t\t\t// Loop to check current item against the entire array\n\t\t\t\t\tfor($j = $i; $j < count($array); $j++ ){\n\t\t\t\t\t\t// If this has been set before, specify\n\t\t\t\t\t\tif( ($array[$j] == $array[$i]) && $i != $j ){\n\t\t\t\t\t\t\t$isset = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the current item has no been set before\n\t\t\t\t\t// then set, it unique\n\t\t\t\t\tif(!$isset) $temp[] = $array[$i];\n\t\t\t\t}\n\n\t\t\t\t// Copy unique items from 'temp'\n\t\t\t\t$array = $temp;\n\n\t\t\t\t// Empty temp array\n\t\t\t\tunset($temp);\n\n\t\t\t\t// Return to the caller\n\t\t\t\treturn $array;\n\t\t\t}", "public function removeStopwords()\r\n {\r\n\t\tif(!empty($this->contentTokenization()))\r\n\t\t{\t\r\n\t\t\t$query = array();\r\n\t\t\tforeach($this->contentTokenization() as $value)\r\n\t\t\t{\r\n\t\t\t\tif((!in_array($value, $this->stopwordsVector())) && (!empty($value)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$query[] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $query;\r\n\t\t}\t\r\n }", "protected function get_words() {\n\t\t$words = array (\n\t\t\t'*.ru*',\n\t\t// '*sex*', positive for sex and the city\n\t'*pharmac*',\n\t\t// '*CIALIS*', positive for gespecialiseerd\n\t'*viagra*',\n\t\t\t'*mortgage*',\n\t\t\t'*drug*',\n\t\t\t'*blogspot.com*',\n\t\t\t'*casino*',\n\t\t\t'*rumer*',\n\t\t\t'*porn*',\n\t\t\t'*diet*',\n\t\t\t'*tramad*',\n\t\t\t'*credit*',\n\t\t\t'*invest*',\n\t\t\t'*adult',\n\t\t\t'*pharm*',\n\t\t\t'*free-*',\n\t\t\t'*pill*',\n\t\t\t'*.by*',\n\t\t\t'*-and*',\n\t\t\t'*-video*',\n\t\t\t'*poker*',\n\t\t\t'*t35*',\n\t\t\t'*games.*',\n\t\t\t'*meds*',\n\t\t\t'*spam.*',\n\t\t\t'*squidoo*',\n\t\t\t'*rdto*',\n\t\t\t'*-buy*',\n\t\t\t'*PHENTERMINE*',\n\t\t\t'*bitch*',\n\t\t\t'*penis*',\n\t\t\t'*fuck*',\n\t\t\t'*asian*',\n\t\t\t'*shippin*',\n\t\t\t'*nude*',\n\t\t\t'*gay*',\n\t\t\t'*wares*',\n\t\t\t'*gambl*',\n\t\t\t'*SEOPlugins.org*'\n\t\t\t);\n\t\t\treturn $words;\n\t}", "private function getWordGroups()\n\t{\n\t\t$groups = [];\n\n\t\tforeach ($this->words as $word)\n\t\t{\n\t\t\t$signature = $this->getSignature($word);\n\n\t\t\t$groups[$signature][] = $word;\n\t\t}\n\n\t\treturn $groups;\n\t}", "public static function remove_words($input,$replace,$words_array = array(),$unique_words = true)\n\t{\n\t\t//separate all words based on spaces\n\t\t$input_array = explode(' ',$input);\n\t\t\n\t\t//create the return array\n\t\t$return = array();\n\t\t\n\t\t//loops through words, remove bad words, keep good ones\n\t\tforeach($input_array as $word)\n\t\t{\n\t\t//if it's a word we should add...\n\t\t\tif(!in_array($word,$words_array) && ($unique_words ? !in_array($word,$return) : true))\n\t\t\t{\n\t\t\t $return[] = $word;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//return good words separated by dashes\n\t\treturn implode($replace,$return);\n\t}", "private function remove_words($input, $replace, $words_array = array(), $unique_words = true)\n\t\t{\n\t\t\t//separate all words based on spaces\n\t\t\t$input_array = explode(' ',$input);\n\n\t\t\t//create the return array\n\t\t\t$return = array();\n\n\t\t\t//loops through words, remove bad words, keep good ones\n\t\t\tforeach($input_array as $word)\n\t\t\t{\n\t\t\t\t//if it's a word we should add...\n\t\t\t\tif(!in_array($word,$words_array) && ($unique_words ? !in_array($word,$return) : true))\n\t\t\t\t{\n\t\t\t\t\t$return[] = $word;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//return good words separated by dashes\n\t\t\treturn implode($replace,$return);\n\t\t}", "function deleteDoubleItems($array) {\n\t\t$item;\n\n\t\tfor ($i = 0; $i < count($array); $i++) {\n\t\t\t$item = $array[$i];\n\n\t\t\tfor ($j = $i + 1; $j < count($array); $j++) {\n\t\t\t\tif ($array[$j] == $item) {\n\t\t\t\t\tarray_splice($array, $j, 1);\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\n\t\treturn $array;\n\t}", "public function get_all_unmarked_keywords()\r\n{\r\n\t\r\n\t$all_keywords = array_column($this->keyword_data,'id');\r\n\treturn array_diff($all_keywords,$this->user_keywords);\r\n}", "public function remove($word)\n {\n if (!isset($this->_list[$word])) {\n return;\n }\n \n unset($this->_list[$word]);\n }", "public static function uniqueTerms( string $value ) : array {\n\t\treturn \n\t\t\\array_unique( \n\t\t\t\\preg_split( \n\t\t\t\t'/[[:space:]]+/', trim( $value ), -1, \n\t\t\t\t\\PREG_SPLIT_NO_EMPTY \n\t\t\t) \n\t\t);\n\t}", "function getNgrams($word, $n = 3)\n{\n $ngrams = array();\n $len = strlen($word);\n\n for($i = 0; $i < $len; $i++) {\n if($i > ($n - 2)) {\n $ng = '';\n for($j = $n-1; $j >= 0; $j--) {\n $ng .= $word[$i-$j];\n }\n $ngrams[] = $ng;\n }\n }\n\n return $ngrams;\n}", "private static function badword_filter() {\n if(empty(self::$words) || !is_array(self::$words)) {\n self::$words = trim(settings::get('badwords', true));\n if(empty(self::$words)) return;\n self::$words = explode(\",\",self::$words);\n }\n\n if(count(self::$words) >= 1) {\n foreach(self::$words as $word) {\n self::$string = preg_replace_callback(\"#\".$word.\"#i\",\n create_function('$matches','return str_repeat(\"*\", strlen($matches[0]));'),self::$string);\n } unset($word);\n }\n }", "public function removeIndexed($pattern);", "function & _split_words( & $string )\n {\n $string = preg_replace($this->_pattern, \"\", $string);\n $string = str_replace($this->_convert_str,\" \",$string);\n $content_array = explode(\" \",$string); \n $array_content = array_count_values($content_array);\n $_tmp = array();\n\n while ($word = each ($array_content))\n { \n if(strlen($word[0])>$this->_word_length)\n {\n $word[0] = strtolower($word[0]);\n if(!isset($this->bad_word_array[$word[0]]))\n { \n $_tmp[] = $word[0];\n }\n }\n }\n return $_tmp;\n }", "private static function removeDuplicateCharacters($sentence) {\r\n\r\n $i =0;\r\n while ($i<(mb_strlen($sentence, 'utf-8'))-1) {\r\n $char1 = mb_substr($sentence, $i, 1, 'utf-8');\r\n $char2 = mb_substr($sentence, $i+1, 1, 'utf-8');\r\n if(strcmp($char1, $char2)==0) {\r\n $str1 = mb_substr($sentence,0,$i);\r\n $str2 = mb_substr($sentence,$i+1,strlen($sentence));\r\n $sentence = $str1.$str2;\r\n }else {\r\n $i = $i+1;\r\n }\r\n }\r\n return $sentence;\r\n\r\n }", "function generateAllPossibilities($inputString) {\n\n $all = [];\n\n for ($i = 1; $i < strlen($inputString); $i++) {\n\n // ------------------------------------------------------------------\n // Part with a single space within the string (so only 2 words) !\n // ------------------------------------------------------------------\n $currentString = substr($inputString, 0, $i) . \" \" . substr($inputString, $i);\n array_push($all, $currentString);\n\n // ----------------------------------------------------------------\n // Part with a two spaces within the string (so only 3 words) !\n // ----------------------------------------------------------------\n $subStringWithSingleSpace = substr($inputString, $i);\n for ($j = 1; $j < strlen($subStringWithSingleSpace); $j++) {\n\n $currentString = substr($inputString, 0, $i) . \" \" . substr($subStringWithSingleSpace, 0, $j) . \" \" . substr($subStringWithSingleSpace, $j);\n array_push($all, $currentString);\n\n // -----------------------------------------------------------------\n // Part with a three spaces within the string (so only 4 words) !\n // -----------------------------------------------------------------\n $subStringWithTwoSpaces = substr($subStringWithSingleSpace, $j);\n for ($k = 1; $k < strlen($subStringWithTwoSpaces); $k++) {\n\n $currentString = substr($inputString, 0, $i) . \" \" . substr($subStringWithSingleSpace, 0, $j) . \" \" . substr($subStringWithTwoSpaces, 0, $k) . \" \" . substr($subStringWithTwoSpaces, $k);\n array_push($all, $currentString);\n\n }\n\n }\n\n }\n\n return $all;\n\n }", "public function arrayUniq($arr) {\n\t\t$out = array();\n\t\tforeach ($arr as $e) {\n\t\t\t$prev = (empty($out)) ? NULL : $out[count($out) - 1];\n\t\t\tif ($e !== $prev) {\n\t\t\t\t$out[] = $e;\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "public function removeIrrelevantTerm($term){\n if(empty($term))\n return; \n $this->irrelevant= preg_replace('/\\|'.trim(preg_quote($term, '\\|/')).'\\|/', '|', '|'.$this->irrelevant.'|');\n $this->irrelevant = substr($this->irrelevant, 1, strlen($this->irrelevant)-2);// quita los pipes puestos al principio y final\n }", "function clear_words($words)\n {\n //\n // 1. If there is no foreign word or word at all\n // then nothing is saved to the field Words in the Database\n // 2. If the last rows are empty they will be removed\n\n $nafl = \"/[a-zа-яё]/i\"; // Native and foreign letters\n\n // 1\n preg_match($nafl, $words) ? $words = $words : $words = \"\";\n\n // 2\n $words_arr = explode(\"\\r\\n\", $words);\n $to = count($words_arr);\n if ($to > 0) {\n for ($i = 0; $i < $to; $i++) {\n if ($words_arr[$i] != \"|\")\n $full_row = $i;\n }\n array_splice($words_arr, $full_row + 1);\n $words = implode($words_arr, \"\\r\\n\");\n }\n\n return $words;\n }", "public function getWords(): array;", "protected function getWordList()\n {\n if ($this->wordList === null) {\n $words = $this->getStripedContents();\n // replace non letter characters with single space\n $words = preg_replace('/[^\\p{L}]+/u', \" \", $words);\n $this->wordList = explode(\" \", $words);\n $this->wordList = array_unique($this->wordList);\n }\n return $this->wordList;\n }", "public function getLoremIpsumArray ()\n {\n\t return $this->words;\n }", "static protected function removeAdverb($word) {\n if (preg_match(\"/ly$/\", $word)) {\n return '';\n }\n\n return $word;\n }", "function WordFilter($badWords) {\r\n $this->badWords=array();\r\n srand ((float)microtime()*1000000);\r\n $censors=array ('$','@','#','*','£');\r\n foreach ($badWords as $badWord) {\r\n $badWord = preg_quote($badWord);\r\n $replaceStr='';\r\n $size=strlen($badWord);\r\n for ($i=0;$i<$size;$i++) {\r\n shuffle($censors);\r\n $replaceStr.=$censors[0];\r\n }\r\n $this->badWords[$badWord]=$replaceStr;\r\n }\r\n }", "function uniqueArray($array){\n\t$cleanArray = array();\n\tforeach($array as $a){\n\t\tif(!in_array($a,$cleanArray))\n\t\t\t{$cleanArray[]=$a;}\n\t}\nreturn $cleanArray;\n}", "private function buildKanaArray(array $hiraganaChars, array $wordChars)\n {\n $intersect = array_intersect($wordChars, $hiraganaChars);\n\n foreach ($hiraganaChars as $hiraganaChar) {\n if ($this->shouldReverseCompile($hiraganaChars, $hiraganaChar, $intersect)) {\n return $this->reverseArrayCompile($wordChars, $hiraganaChars);\n }\n }\n\n return array_diff($hiraganaChars, $wordChars);\n }", "function arry_fu(array $array)\n{\n return array_unique(array_filter($array));\n}", "function antiword(string $string): string\n {\n $words = file_get_contents(STORAGEDIR . \"bad_words.dat\");\n $wordlist = explode(\"|\", $words);\n\n foreach($wordlist as $value) {\n if (!empty($value)) {\n $string = preg_replace(\"/$value/i\", \"***\", $string);\n }\n }\n return $string;\n }", "function getWords(string $text): array\n{\n preg_match_all('/([a-zA-Z]+)/', strtolower($text), $resultArray);\n return array_count_values($resultArray [0]);\n}", "protected function remove_words($input, $replace, $words_array = array(), $unique_words = true) {\n $input_array = explode(' ', $input);\n\n //create the return array\n $return = array();\n\n //loops through words, remove bad words, keep good ones\n foreach ($input_array as $word) {\n //if it's a word we should add...\n if (!in_array($word, $words_array) && ($unique_words ? !in_array($word, $return) : true)) {\n $return[] = $word;\n }\n }\n\n //return good words separated by dashes\n return implode($replace, $return);\n }", "function array_remove($needle, $haystack) {\n\t$tmp = array();\n\n\tforeach ($haystack as $key=>$value) if ($key !== $needle) $tmp[$key] = $value;\n\n\treturn $tmp;\n}", "public function getWords(): array {\n $words = [];\n $this->buildWord($this->root, $words);\n return $words;\n }", "public function getWords();", "function getUnique($array)\n\t{\n\t\t//combine all arrays\n\t\t$combined = array();\n\t\tforeach($array as $v)\n\t\t{\n\t\t\tforeach($v as $type=>$arr)\n\t\t\t{\n\t\t\t\tforeach($arr as $id)\n\t\t\t\t{\n\t\t\t\t\tif(!array_key_exists($type,$combined))\n\t\t\t\t\t{\n\t\t\t\t\t\t$combined[$type] = array();\n\t\t\t\t\t}\n\t\t\t\t\tif(!in_array($id, $combined[$type]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$combined[$type][] = $id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//$combined is combined array of ALL values\n\t\tforeach($combined as $ntype=>$narr)\n\t\t{\n\t\t\tforeach($narr as $nid)\n\t\t\t{\n\t\t\t\t//$array is the array containing all results for each word seperately\n\t\t\t\tforeach($array as $ov)\n\t\t\t\t{\n\t\t\t\t\t//if an id value is not present in the result $array, remove it from the combined array\n\t\t\t\t\tif(!in_array($nid, $ov[$ntype]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$key = array_search($nid, $combined[$ntype]);\n\t\t\t\t\t\tunset($combined[$ntype][$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//finally remove empty areas from the array\n\t\tforeach($combined as $ntype=>$narr)\n\t\t{\n\t\t\tsort($combined[$ntype]);\n\t\t\tif(empty($combined[$ntype]))\n\t\t\t{\n\t\t\t\tunset($combined[$ntype]);\n\t\t\t}\n\n\t\t}\n\t\treturn $combined;\n\t}", "static public function words() : array {\n return [\n \"backi\",\n \"bacru\",\n \"badna\",\n \"badri\",\n \"bajra\",\n \"bakfu\",\n \"bakni\",\n \"bakri\",\n \"baktu\",\n \"balji\",\n \"balni\",\n \"balre\",\n \"balvi\",\n \"bambu\",\n \"bancu\",\n \"bandu\",\n \"banfi\",\n \"bangu\",\n \"banli\",\n \"banro\",\n \"banxa\",\n \"banzu\",\n \"bapli\",\n \"barda\",\n \"bargu\",\n \"barja\",\n \"barna\",\n \"bartu\",\n \"basfa\",\n \"basna\",\n \"basti\",\n \"batci\",\n \"batke\",\n \"bavmi\",\n \"baxso\",\n \"bebna\",\n \"bekpi\",\n \"bemro\",\n \"bende\",\n \"bengo\",\n \"benji\",\n \"benre\",\n \"benzo\",\n \"bergu\",\n \"bersa\",\n \"berti\",\n \"besna\",\n \"besto\",\n \"betfu\",\n \"betri\",\n \"bevri\",\n \"bidju\",\n \"bifce\",\n \"bikla\",\n \"bilga\",\n \"bilma\",\n \"bilni\",\n \"bindo\",\n \"binra\",\n \"binxo\",\n \"birje\",\n \"birka\",\n \"birti\",\n \"bisli\",\n \"bitmu\",\n \"bitni\",\n \"blabi\",\n \"blaci\",\n \"blanu\",\n \"bliku\",\n \"bloti\",\n \"bolci\",\n \"bongu\",\n \"boske\",\n \"botpi\",\n \"boxfo\",\n \"boxna\",\n \"bradi\",\n \"brano\",\n \"bratu\",\n \"brazo\",\n \"bredi\",\n \"bridi\",\n \"brife\",\n \"briju\",\n \"brito\",\n \"brivo\",\n \"broda\",\n \"bruna\",\n \"budjo\",\n \"bukpu\",\n \"bumru\",\n \"bunda\",\n \"bunre\",\n \"burcu\",\n \"burna\",\n \"cabna\",\n \"cabra\",\n \"cacra\",\n \"cadga\",\n \"cadzu\",\n \"cafne\",\n \"cagna\",\n \"cakla\",\n \"calku\",\n \"calse\",\n \"canci\",\n \"cando\",\n \"cange\",\n \"canja\",\n \"canko\",\n \"canlu\",\n \"canpa\",\n \"canre\",\n \"canti\",\n \"carce\",\n \"carfu\",\n \"carmi\",\n \"carna\",\n \"cartu\",\n \"carvi\",\n \"casnu\",\n \"catke\",\n \"catlu\",\n \"catni\",\n \"catra\",\n \"caxno\",\n \"cecla\",\n \"cecmu\",\n \"cedra\",\n \"cenba\",\n \"censa\",\n \"centi\",\n \"cerda\",\n \"cerni\",\n \"certu\",\n \"cevni\",\n \"cfale\",\n \"cfari\",\n \"cfika\",\n \"cfila\",\n \"cfine\",\n \"cfipu\",\n \"ciblu\",\n \"cicna\",\n \"cidja\",\n \"cidni\",\n \"cidro\",\n \"cifnu\",\n \"cigla\",\n \"cikna\",\n \"cikre\",\n \"ciksi\",\n \"cilce\",\n \"cilfu\",\n \"cilmo\",\n \"cilre\",\n \"cilta\",\n \"cimde\",\n \"cimni\",\n \"cinba\",\n \"cindu\",\n \"cinfo\",\n \"cinje\",\n \"cinki\",\n \"cinla\",\n \"cinmo\",\n \"cinri\",\n \"cinse\",\n \"cinta\",\n \"cinza\",\n \"cipni\",\n \"cipra\",\n \"cirko\",\n \"cirla\",\n \"ciska\",\n \"cisma\",\n \"cisni\",\n \"ciste\",\n \"citka\",\n \"citno\",\n \"citri\",\n \"citsi\",\n \"civla\",\n \"cizra\",\n \"ckabu\",\n \"ckafi\",\n \"ckaji\",\n \"ckana\",\n \"ckape\",\n \"ckasu\",\n \"ckeji\",\n \"ckiku\",\n \"ckilu\",\n \"ckini\",\n \"ckire\",\n \"ckule\",\n \"ckunu\",\n \"cladu\",\n \"clani\",\n \"claxu\",\n \"cletu\",\n \"clika\",\n \"clinu\",\n \"clira\",\n \"clite\",\n \"cliva\",\n \"clupa\",\n \"cmaci\",\n \"cmalu\",\n \"cmana\",\n \"cmavo\",\n \"cmene\",\n \"cmeta\",\n \"cmevo\",\n \"cmila\",\n \"cmima\",\n \"cmoni\",\n \"cnano\",\n \"cnebo\",\n \"cnemu\",\n \"cnici\",\n \"cnino\",\n \"cnisa\",\n \"cnita\",\n \"cokcu\",\n \"condi\",\n \"conka\",\n \"corci\",\n \"cortu\",\n \"cpacu\",\n \"cpana\",\n \"cpare\",\n \"cpedu\",\n \"cpina\",\n \"cradi\",\n \"crane\",\n \"creka\",\n \"crepu\",\n \"cribe\",\n \"crida\",\n \"crino\",\n \"cripu\",\n \"crisa\",\n \"critu\",\n \"ctaru\",\n \"ctebi\",\n \"cteki\",\n \"ctile\",\n \"ctino\",\n \"ctuca\",\n \"cukla\",\n \"cukre\",\n \"cukta\",\n \"culno\",\n \"cumki\",\n \"cumla\",\n \"cunmi\",\n \"cunso\",\n \"cuntu\",\n \"cupra\",\n \"curmi\",\n \"curnu\",\n \"curve\",\n \"cusku\",\n \"cusna\",\n \"cutci\",\n \"cutne\",\n \"cuxna\",\n \"dacru\",\n \"dacti\",\n \"dadjo\",\n \"dakfu\",\n \"dakli\",\n \"damba\",\n \"damri\",\n \"dandu\",\n \"danfu\",\n \"danlu\",\n \"danmo\",\n \"danre\",\n \"dansu\",\n \"danti\",\n \"daplu\",\n \"dapma\",\n \"darca\",\n \"dargu\",\n \"darlu\",\n \"darno\",\n \"darsi\",\n \"darxi\",\n \"daski\",\n \"dasni\",\n \"daspo\",\n \"dasri\",\n \"datka\",\n \"datni\",\n \"datro\",\n \"decti\",\n \"degji\",\n \"dejni\",\n \"dekpu\",\n \"dekto\",\n \"delno\",\n \"dembi\",\n \"denci\",\n \"denmi\",\n \"denpa\",\n \"dertu\",\n \"derxi\",\n \"desku\",\n \"detri\",\n \"dicma\",\n \"dicra\",\n \"didni\",\n \"digno\",\n \"dikca\",\n \"diklo\",\n \"dikni\",\n \"dilcu\",\n \"dilma\",\n \"dilnu\",\n \"dimna\",\n \"dindi\",\n \"dinju\",\n \"dinko\",\n \"dinso\",\n \"dirba\",\n \"dirce\",\n \"dirgo\",\n \"disko\",\n \"ditcu\",\n \"divzi\",\n \"dizlo\",\n \"djacu\",\n \"djedi\",\n \"djica\",\n \"djine\",\n \"djuno\",\n \"donri\",\n \"dotco\",\n \"draci\",\n \"drani\",\n \"drata\",\n \"drudi\",\n \"dugri\",\n \"dukse\",\n \"dukti\",\n \"dunda\",\n \"dunja\",\n \"dunku\",\n \"dunli\",\n \"dunra\",\n \"dutso\",\n \"dzena\",\n \"dzipo\",\n \"facki\",\n \"fadni\",\n \"fagri\",\n \"falnu\",\n \"famti\",\n \"fancu\",\n \"fange\",\n \"fanmo\",\n \"fanri\",\n \"fanta\",\n \"fanva\",\n \"fanza\",\n \"fapro\",\n \"farka\",\n \"farlu\",\n \"farna\",\n \"farvi\",\n \"fasnu\",\n \"fatci\",\n \"fatne\",\n \"fatri\",\n \"febvi\",\n \"fegli\",\n \"femti\",\n \"fendi\",\n \"fengu\",\n \"fenki\",\n \"fenra\",\n \"fenso\",\n \"fepni\",\n \"fepri\",\n \"ferti\",\n \"festi\",\n \"fetsi\",\n \"figre\",\n \"filso\",\n \"finpe\",\n \"finti\",\n \"firca\",\n \"fisli\",\n \"fizbu\",\n \"flaci\",\n \"flalu\",\n \"flani\",\n \"flecu\",\n \"flese\",\n \"fliba\",\n \"flira\",\n \"foldi\",\n \"fonmo\",\n \"fonxa\",\n \"forca\",\n \"forse\",\n \"fraso\",\n \"frati\",\n \"fraxu\",\n \"frica\",\n \"friko\",\n \"frili\",\n \"frinu\",\n \"friti\",\n \"frumu\",\n \"fukpi\",\n \"fulta\",\n \"funca\",\n \"fusra\",\n \"fuzme\",\n \"gacri\",\n \"gadri\",\n \"galfi\",\n \"galtu\",\n \"galxe\",\n \"ganlo\",\n \"ganra\",\n \"ganse\",\n \"ganti\",\n \"ganxo\",\n \"ganzu\",\n \"gapci\",\n \"gapru\",\n \"garna\",\n \"gasnu\",\n \"gaspo\",\n \"gasta\",\n \"genja\",\n \"gento\",\n \"genxu\",\n \"gerku\",\n \"gerna\",\n \"gidva\",\n \"gigdo\",\n \"ginka\",\n \"girzu\",\n \"gismu\",\n \"glare\",\n \"gleki\",\n \"gletu\",\n \"glico\",\n \"glife\",\n \"glosa\",\n \"gluta\",\n \"gocti\",\n \"gomsi\",\n \"gotro\",\n \"gradu\",\n \"grafu\",\n \"grake\",\n \"grana\",\n \"grasu\",\n \"grava\",\n \"greku\",\n \"grusi\",\n \"grute\",\n \"gubni\",\n \"gugde\",\n \"gugle\",\n \"gumri\",\n \"gundi\",\n \"gunka\",\n \"gunma\",\n \"gunro\",\n \"gunse\",\n \"gunta\",\n \"gurni\",\n \"guska\",\n \"gusni\",\n \"gusta\",\n \"gutci\",\n \"gutra\",\n \"guzme\",\n \"jabre\",\n \"jadni\",\n \"jakne\",\n \"jalge\",\n \"jalna\",\n \"jalra\",\n \"jamfu\",\n \"jamna\",\n \"janbe\",\n \"janco\",\n \"janli\",\n \"jansu\",\n \"janta\",\n \"jarbu\",\n \"jarco\",\n \"jarki\",\n \"jaspu\",\n \"jatna\",\n \"javni\",\n \"jbama\",\n \"jbari\",\n \"jbena\",\n \"jbera\",\n \"jbini\",\n \"jdari\",\n \"jdice\",\n \"jdika\",\n \"jdima\",\n \"jdini\",\n \"jduli\",\n \"jecta\",\n \"jeftu\",\n \"jegvo\",\n \"jelca\",\n \"jemna\",\n \"jenca\",\n \"jendu\",\n \"jenmi\",\n \"jensi\",\n \"jerna\",\n \"jersi\",\n \"jerxo\",\n \"jesni\",\n \"jetce\",\n \"jetnu\",\n \"jgalu\",\n \"jganu\",\n \"jgari\",\n \"jgena\",\n \"jgina\",\n \"jgira\",\n \"jgita\",\n \"jibni\",\n \"jibri\",\n \"jicla\",\n \"jicmu\",\n \"jijnu\",\n \"jikca\",\n \"jikfi\",\n \"jikni\",\n \"jikru\",\n \"jilka\",\n \"jilra\",\n \"jimca\",\n \"jimpe\",\n \"jimte\",\n \"jinci\",\n \"jinda\",\n \"jinga\",\n \"jinku\",\n \"jinme\",\n \"jinru\",\n \"jinsa\",\n \"jinto\",\n \"jinvi\",\n \"jinzi\",\n \"jipci\",\n \"jipno\",\n \"jirna\",\n \"jisra\",\n \"jitfa\",\n \"jitro\",\n \"jivbu\",\n \"jivna\",\n \"jmaji\",\n \"jmifa\",\n \"jmina\",\n \"jmive\",\n \"jonse\",\n \"jordo\",\n \"jorne\",\n \"jubme\",\n \"judri\",\n \"jufra\",\n \"jukni\",\n \"jukpa\",\n \"julne\",\n \"julro\",\n \"jundi\",\n \"jungo\",\n \"junla\",\n \"junri\",\n \"junta\",\n \"jurme\",\n \"jursa\",\n \"jutsi\",\n \"juxre\",\n \"jvinu\",\n \"jviso\",\n \"kabri\",\n \"kacma\",\n \"kadno\",\n \"kafke\",\n \"kagni\",\n \"kajde\",\n \"kajna\",\n \"kakne\",\n \"kakpa\",\n \"kalci\",\n \"kalri\",\n \"kalsa\",\n \"kalte\",\n \"kamju\",\n \"kamni\",\n \"kampu\",\n \"kamre\",\n \"kanba\",\n \"kancu\",\n \"kandi\",\n \"kanji\",\n \"kanla\",\n \"kanpe\",\n \"kanro\",\n \"kansa\",\n \"kantu\",\n \"kanxe\",\n \"karbi\",\n \"karce\",\n \"karda\",\n \"kargu\",\n \"karli\",\n \"karni\",\n \"katci\",\n \"katna\",\n \"kavbu\",\n \"kazra\",\n \"kecti\",\n \"kekli\",\n \"kelci\",\n \"kelvo\",\n \"kenka\",\n \"kenra\",\n \"kensa\",\n \"kerfa\",\n \"kerlo\",\n \"kesri\",\n \"ketco\",\n \"ketsu\",\n \"kevna\",\n \"kibro\",\n \"kicne\",\n \"kijno\",\n \"kilto\",\n \"kinda\",\n \"kinli\",\n \"kisto\",\n \"klaji\",\n \"klaku\",\n \"klama\",\n \"klani\",\n \"klesi\",\n \"kliki\",\n \"klina\",\n \"kliru\",\n \"kliti\",\n \"klupe\",\n \"kluza\",\n \"kobli\",\n \"kogno\",\n \"kojna\",\n \"kokso\",\n \"kolme\",\n \"komcu\",\n \"konju\",\n \"korbi\",\n \"korcu\",\n \"korka\",\n \"korvo\",\n \"kosmu\",\n \"kosta\",\n \"krali\",\n \"kramu\",\n \"krasi\",\n \"krati\",\n \"krefu\",\n \"krici\",\n \"krili\",\n \"krinu\",\n \"krixa\",\n \"kruca\",\n \"kruji\",\n \"kruvi\",\n \"kubli\",\n \"kucli\",\n \"kufra\",\n \"kukte\",\n \"kulnu\",\n \"kumfa\",\n \"kumte\",\n \"kunra\",\n \"kunti\",\n \"kurfa\",\n \"kurji\",\n \"kurki\",\n \"kuspe\",\n \"kusru\",\n \"labno\",\n \"lacni\",\n \"lacpu\",\n \"lacri\",\n \"ladru\",\n \"lafti\",\n \"lakne\",\n \"lakse\",\n \"laldo\",\n \"lalxu\",\n \"lamji\",\n \"lanbi\",\n \"lanci\",\n \"landa\",\n \"lanka\",\n \"lanli\",\n \"lanme\",\n \"lante\",\n \"lanxe\",\n \"lanzu\",\n \"larcu\",\n \"larva\",\n \"lasna\",\n \"lastu\",\n \"latmo\",\n \"latna\",\n \"lazni\",\n \"lebna\",\n \"lelxe\",\n \"lenga\",\n \"lenjo\",\n \"lenku\",\n \"lerci\",\n \"lerfu\",\n \"libjo\",\n \"lidne\",\n \"lifri\",\n \"lijda\",\n \"limfa\",\n \"limna\",\n \"lince\",\n \"lindi\",\n \"linga\",\n \"linji\",\n \"linsi\",\n \"linto\",\n \"lisri\",\n \"liste\",\n \"litce\",\n \"litki\",\n \"litru\",\n \"livga\",\n \"livla\",\n \"logji\",\n \"loglo\",\n \"lojbo\",\n \"loldi\",\n \"lorxu\",\n \"lubno\",\n \"lujvo\",\n \"luksi\",\n \"lumci\",\n \"lunbe\",\n \"lunra\",\n \"lunsa\",\n \"luska\",\n \"lusto\",\n \"mabla\",\n \"mabru\",\n \"macnu\",\n \"majga\",\n \"makcu\",\n \"makfa\",\n \"maksi\",\n \"malsi\",\n \"mamta\",\n \"manci\",\n \"manfo\",\n \"mango\",\n \"manku\",\n \"manri\",\n \"mansa\",\n \"manti\",\n \"mapku\",\n \"mapni\",\n \"mapra\",\n \"mapti\",\n \"marbi\",\n \"marce\",\n \"marde\",\n \"margu\",\n \"marji\",\n \"marna\",\n \"marxa\",\n \"masno\",\n \"masti\",\n \"matci\",\n \"matli\",\n \"matne\",\n \"matra\",\n \"mavji\",\n \"maxri\",\n \"mebri\",\n \"megdo\",\n \"mekso\",\n \"melbi\",\n \"meljo\",\n \"melmi\",\n \"menli\",\n \"menre\",\n \"mensi\",\n \"mentu\",\n \"merko\",\n \"merli\",\n \"metfo\",\n \"mexno\",\n \"midju\",\n \"mifra\",\n \"mikce\",\n \"mikri\",\n \"milti\",\n \"milxe\",\n \"minde\",\n \"minji\",\n \"minli\",\n \"minra\",\n \"mintu\",\n \"mipri\",\n \"mirli\",\n \"misno\",\n \"misro\",\n \"mitre\",\n \"mixre\",\n \"mlana\",\n \"mlatu\",\n \"mleca\",\n \"mledi\",\n \"mluni\",\n \"mogle\",\n \"mokca\",\n \"moklu\",\n \"molki\",\n \"molro\",\n \"morji\",\n \"morko\",\n \"morna\",\n \"morsi\",\n \"mosra\",\n \"mraji\",\n \"mrilu\",\n \"mruli\",\n \"mucti\",\n \"mudri\",\n \"mugle\",\n \"mukti\",\n \"mulno\",\n \"munje\",\n \"mupli\",\n \"murse\",\n \"murta\",\n \"muslo\",\n \"mutce\",\n \"muvdu\",\n \"muzga\",\n \"nabmi\",\n \"nakni\",\n \"nalci\",\n \"namcu\",\n \"nanba\",\n \"nanca\",\n \"nandu\",\n \"nanla\",\n \"nanmu\",\n \"nanvi\",\n \"narge\",\n \"narju\",\n \"natfe\",\n \"natmi\",\n \"natsi\",\n \"navni\",\n \"naxle\",\n \"nazbi\",\n \"nejni\",\n \"nelci\",\n \"nenri\",\n \"nerde\",\n \"nibli\",\n \"nicfa\",\n \"nicte\",\n \"nikle\",\n \"nilce\",\n \"nimre\",\n \"ninja\",\n \"ninmu\",\n \"nirna\",\n \"nitcu\",\n \"nivji\",\n \"nixli\",\n \"nobli\",\n \"norgo\",\n \"notci\",\n \"nudle\",\n \"nukni\",\n \"nunmu\",\n \"nupre\",\n \"nurma\",\n \"nusna\",\n \"nutka\",\n \"nutli\",\n \"nuzba\",\n \"nuzlo\",\n \"pacna\",\n \"pagbu\",\n \"pagre\",\n \"pajni\",\n \"palci\",\n \"palku\",\n \"palma\",\n \"palne\",\n \"palpi\",\n \"palta\",\n \"pambe\",\n \"pamga\",\n \"panci\",\n \"pandi\",\n \"panje\",\n \"panka\",\n \"panlo\",\n \"panpi\",\n \"panra\",\n \"pante\",\n \"panzi\",\n \"papri\",\n \"parbi\",\n \"pardu\",\n \"parji\",\n \"pastu\",\n \"patfu\",\n \"patlu\",\n \"patxu\",\n \"paznu\",\n \"pelji\",\n \"pelxu\",\n \"pemci\",\n \"penbi\",\n \"pencu\",\n \"pendo\",\n \"penmi\",\n \"pensi\",\n \"pentu\",\n \"perli\",\n \"pesxu\",\n \"petso\",\n \"pevna\",\n \"pezli\",\n \"picti\",\n \"pijne\",\n \"pikci\",\n \"pikta\",\n \"pilda\",\n \"pilji\",\n \"pilka\",\n \"pilno\",\n \"pimlu\",\n \"pinca\",\n \"pindi\",\n \"pinfu\",\n \"pinji\",\n \"pinka\",\n \"pinsi\",\n \"pinta\",\n \"pinxe\",\n \"pipno\",\n \"pixra\",\n \"plana\",\n \"platu\",\n \"pleji\",\n \"plibu\",\n \"plini\",\n \"plipe\",\n \"plise\",\n \"plita\",\n \"plixa\",\n \"pluja\",\n \"pluka\",\n \"pluta\",\n \"pocli\",\n \"polje\",\n \"polno\",\n \"ponjo\",\n \"ponse\",\n \"poplu\",\n \"porpi\",\n \"porsi\",\n \"porto\",\n \"prali\",\n \"prami\",\n \"prane\",\n \"preja\",\n \"prenu\",\n \"preri\",\n \"preti\",\n \"prije\",\n \"prina\",\n \"pritu\",\n \"proga\",\n \"prosa\",\n \"pruce\",\n \"pruni\",\n \"pruri\",\n \"pruxi\",\n \"pulce\",\n \"pulji\",\n \"pulni\",\n \"punji\",\n \"punli\",\n \"pupsu\",\n \"purci\",\n \"purdi\",\n \"purmo\",\n \"racli\",\n \"ractu\",\n \"radno\",\n \"rafsi\",\n \"ragbi\",\n \"ragve\",\n \"rakle\",\n \"rakso\",\n \"raktu\",\n \"ralci\",\n \"ralju\",\n \"ralte\",\n \"randa\",\n \"rango\",\n \"ranji\",\n \"ranmi\",\n \"ransu\",\n \"ranti\",\n \"ranxi\",\n \"rapli\",\n \"rarna\",\n \"ratcu\",\n \"ratni\",\n \"rebla\",\n \"rectu\",\n \"rekto\",\n \"remna\",\n \"renro\",\n \"renvi\",\n \"respa\",\n \"rexsa\",\n \"ricfu\",\n \"rigni\",\n \"rijno\",\n \"rilti\",\n \"rimni\",\n \"rinci\",\n \"rindo\",\n \"rinju\",\n \"rinka\",\n \"rinsa\",\n \"rirci\",\n \"rirni\",\n \"rirxe\",\n \"rismi\",\n \"risna\",\n \"ritli\",\n \"rivbi\",\n \"rokci\",\n \"romge\",\n \"romlo\",\n \"ronte\",\n \"ropno\",\n \"rorci\",\n \"rotsu\",\n \"rozgu\",\n \"ruble\",\n \"rufsu\",\n \"runme\",\n \"runta\",\n \"rupnu\",\n \"rusko\",\n \"rutni\",\n \"sabji\",\n \"sabnu\",\n \"sacki\",\n \"saclu\",\n \"sadjo\",\n \"sakci\",\n \"sakli\",\n \"sakta\",\n \"salci\",\n \"salpo\",\n \"salri\",\n \"salta\",\n \"samcu\",\n \"sampu\",\n \"sanbu\",\n \"sance\",\n \"sanga\",\n \"sanji\",\n \"sanli\",\n \"sanmi\",\n \"sanso\",\n \"santa\",\n \"sarcu\",\n \"sarji\",\n \"sarlu\",\n \"sarni\",\n \"sarxe\",\n \"saske\",\n \"satci\",\n \"satre\",\n \"savru\",\n \"sazri\",\n \"sefsi\",\n \"sefta\",\n \"sekre\",\n \"selci\",\n \"selfu\",\n \"semto\",\n \"senci\",\n \"sengi\",\n \"senpi\",\n \"senta\",\n \"senva\",\n \"sepli\",\n \"serti\",\n \"sesre\",\n \"setca\",\n \"sevzi\",\n \"sfani\",\n \"sfasa\",\n \"sfofa\",\n \"sfubu\",\n \"sibli\",\n \"siclu\",\n \"sicni\",\n \"sicpi\",\n \"sidbo\",\n \"sidju\",\n \"sigja\",\n \"sigma\",\n \"sikta\",\n \"silka\",\n \"silna\",\n \"simlu\",\n \"simsa\",\n \"simxu\",\n \"since\",\n \"sinma\",\n \"sinso\",\n \"sinxa\",\n \"sipna\",\n \"sirji\",\n \"sirxo\",\n \"sisku\",\n \"sisti\",\n \"sitna\",\n \"sivni\",\n \"skaci\",\n \"skami\",\n \"skapi\",\n \"skari\",\n \"skicu\",\n \"skiji\",\n \"skina\",\n \"skori\",\n \"skoto\",\n \"skuba\",\n \"skuro\",\n \"slabu\",\n \"slaka\",\n \"slami\",\n \"slanu\",\n \"slari\",\n \"slasi\",\n \"sligu\",\n \"slilu\",\n \"sliri\",\n \"slovo\",\n \"sluji\",\n \"sluni\",\n \"smacu\",\n \"smadi\",\n \"smaji\",\n \"smaka\",\n \"smani\",\n \"smela\",\n \"smoka\",\n \"smuci\",\n \"smuni\",\n \"smusu\",\n \"snada\",\n \"snanu\",\n \"snidu\",\n \"snime\",\n \"snipa\",\n \"snuji\",\n \"snura\",\n \"snuti\",\n \"sobde\",\n \"sodna\",\n \"sodva\",\n \"softo\",\n \"solji\",\n \"solri\",\n \"sombo\",\n \"sonci\",\n \"sorcu\",\n \"sorgu\",\n \"sorni\",\n \"sorta\",\n \"sovda\",\n \"spaji\",\n \"spali\",\n \"spano\",\n \"spati\",\n \"speni\",\n \"spero\",\n \"spisa\",\n \"spita\",\n \"spofu\",\n \"spoja\",\n \"spuda\",\n \"sputu\",\n \"sraji\",\n \"sraku\",\n \"sralo\",\n \"srana\",\n \"srasu\",\n \"srera\",\n \"srito\",\n \"sruma\",\n \"sruri\",\n \"stace\",\n \"stagi\",\n \"staku\",\n \"stali\",\n \"stani\",\n \"stapa\",\n \"stasu\",\n \"stati\",\n \"steba\",\n \"steci\",\n \"stedu\",\n \"stela\",\n \"stero\",\n \"stici\",\n \"stidi\",\n \"stika\",\n \"stizu\",\n \"stodi\",\n \"stuna\",\n \"stura\",\n \"stuzi\",\n \"sucta\",\n \"sudga\",\n \"sufti\",\n \"suksa\",\n \"sumji\",\n \"sumne\",\n \"sumti\",\n \"sunga\",\n \"sunla\",\n \"surla\",\n \"sutra\",\n \"tabno\",\n \"tabra\",\n \"tadji\",\n \"tadni\",\n \"tagji\",\n \"taksi\",\n \"talsa\",\n \"tamca\",\n \"tamji\",\n \"tamne\",\n \"tanbo\",\n \"tance\",\n \"tanjo\",\n \"tanko\",\n \"tanru\",\n \"tansi\",\n \"tanxe\",\n \"tapla\",\n \"tarbi\",\n \"tarci\",\n \"tarla\",\n \"tarmi\",\n \"tarti\",\n \"taske\",\n \"tasmi\",\n \"tasta\",\n \"tatpi\",\n \"tatru\",\n \"tavla\",\n \"taxfu\",\n \"tcaci\",\n \"tcadu\",\n \"tcana\",\n \"tcati\",\n \"tcaxe\",\n \"tcena\",\n \"tcese\",\n \"tcica\",\n \"tcidu\",\n \"tcika\",\n \"tcila\",\n \"tcima\",\n \"tcini\",\n \"tcita\",\n \"temci\",\n \"temse\",\n \"tende\",\n \"tenfa\",\n \"tengu\",\n \"terdi\",\n \"terpa\",\n \"terto\",\n \"tifri\",\n \"tigni\",\n \"tigra\",\n \"tikpa\",\n \"tilju\",\n \"tinbe\",\n \"tinci\",\n \"tinsa\",\n \"tirna\",\n \"tirse\",\n \"tirxu\",\n \"tisna\",\n \"titla\",\n \"tivni\",\n \"tixnu\",\n \"toknu\",\n \"toldi\",\n \"tonga\",\n \"tordu\",\n \"torni\",\n \"torso\",\n \"traji\",\n \"trano\",\n \"trati\",\n \"trene\",\n \"tricu\",\n \"trina\",\n \"trixe\",\n \"troci\",\n \"tsaba\",\n \"tsali\",\n \"tsani\",\n \"tsapi\",\n \"tsiju\",\n \"tsina\",\n \"tsuku\",\n \"tubnu\",\n \"tubra\",\n \"tugni\",\n \"tujli\",\n \"tumla\",\n \"tunba\",\n \"tunka\",\n \"tunlo\",\n \"tunta\",\n \"tuple\",\n \"turko\",\n \"turni\",\n \"tutci\",\n \"tutle\",\n \"tutra\",\n \"vacri\",\n \"vajni\",\n \"valsi\",\n \"vamji\",\n \"vamtu\",\n \"vanbi\",\n \"vanci\",\n \"vanju\",\n \"vasru\",\n \"vasxu\",\n \"vecnu\",\n \"vedli\",\n \"venfu\",\n \"vensa\",\n \"vente\",\n \"vepre\",\n \"verba\",\n \"vibna\",\n \"vidni\",\n \"vidru\",\n \"vifne\",\n \"vikmi\",\n \"viknu\",\n \"vimcu\",\n \"vindu\",\n \"vinji\",\n \"vinta\",\n \"vipsi\",\n \"virnu\",\n \"viska\",\n \"vitci\",\n \"vitke\",\n \"vitno\",\n \"vlagi\",\n \"vlile\",\n \"vlina\",\n \"vlipa\",\n \"vofli\",\n \"voksa\",\n \"volve\",\n \"vorme\",\n \"vraga\",\n \"vreji\",\n \"vreta\",\n \"vrici\",\n \"vrude\",\n \"vrusi\",\n \"vubla\",\n \"vujnu\",\n \"vukna\",\n \"vukro\",\n \"xabju\",\n \"xadba\",\n \"xadji\",\n \"xadni\",\n \"xagji\",\n \"xagri\",\n \"xajmi\",\n \"xaksu\",\n \"xalbo\",\n \"xalka\",\n \"xalni\",\n \"xamgu\",\n \"xampo\",\n \"xamsi\",\n \"xance\",\n \"xango\",\n \"xanka\",\n \"xanri\",\n \"xansa\",\n \"xanto\",\n \"xarci\",\n \"xarju\",\n \"xarnu\",\n \"xasli\",\n \"xasne\",\n \"xatra\",\n \"xatsi\",\n \"xazdo\",\n \"xebni\",\n \"xebro\",\n \"xecto\",\n \"xedja\",\n \"xekri\",\n \"xelso\",\n \"xendo\",\n \"xenru\",\n \"xexso\",\n \"xigzo\",\n \"xindo\",\n \"xinmo\",\n \"xirma\",\n \"xislu\",\n \"xispo\",\n \"xlali\",\n \"xlura\",\n \"xorbo\",\n \"xorlo\",\n \"xotli\",\n \"xrabo\",\n \"xrani\",\n \"xriso\",\n \"xrotu\",\n \"xruba\",\n \"xruki\",\n \"xrula\",\n \"xruti\",\n \"xukmi\",\n \"xulta\",\n \"xunre\",\n \"xurdo\",\n \"xusra\",\n \"xutla\",\n \"zabna\",\n \"zajba\",\n \"zalvi\",\n \"zanru\",\n \"zarci\",\n \"zargu\",\n \"zasni\",\n \"zasti\",\n \"zbabu\",\n \"zbani\",\n \"zbasu\",\n \"zbepi\",\n \"zdani\",\n \"zdile\",\n \"zekri\",\n \"zenba\",\n \"zepti\",\n \"zetro\",\n \"zevla\",\n \"zgadi\",\n \"zgana\",\n \"zgike\",\n \"zifre\",\n \"zinki\",\n \"zirpu\",\n \"zivle\",\n \"zmadu\",\n \"zmiku\",\n \"zucna\",\n \"zukte\",\n \"zumri\",\n \"zungi\",\n \"zunle\",\n \"zunti\",\n \"zutse\",\n \"zvati\",\n \"zviki\",\n \"jbobau\",\n \"jbopre\",\n \"karsna\",\n \"cabdei\",\n \"zunsna\",\n \"gendra\",\n \"glibau\",\n \"nintadni\",\n \"pavyseljirna\",\n \"vlaste\",\n \"selbri\",\n \"latro'a\",\n \"zdakemkulgu'a\",\n \"mriste\",\n \"selsku\",\n \"fu'ivla\",\n \"tolmo'i\",\n \"snavei\",\n \"xagmau\",\n \"retsku\",\n \"ckupau\",\n \"skudji\",\n \"smudra\",\n \"prulamdei\",\n \"vokta'a\",\n \"tinju'i\",\n \"jefyfa'o\",\n \"bavlamdei\",\n \"kinzga\",\n \"jbocre\",\n \"jbovla\",\n \"xauzma\",\n \"selkei\",\n \"xuncku\",\n \"spusku\",\n \"jbogu'e\",\n \"pampe'o\",\n \"bripre\",\n \"jbosnu\",\n \"zi'evla\",\n \"gimste\",\n \"tolzdi\",\n \"velski\",\n \"samselpla\",\n \"cnegau\",\n \"velcki\",\n \"selja'e\",\n \"fasybau\",\n \"zanfri\",\n \"reisku\",\n \"favgau\",\n \"jbota'a\",\n \"rejgau\",\n \"malgli\",\n \"zilkai\",\n \"keidji\",\n \"tersu'i\",\n \"jbofi'e\",\n \"cnima'o\",\n \"mulgau\",\n \"ningau\",\n \"ponbau\",\n \"mrobi'o\",\n \"rarbau\",\n \"zmanei\",\n \"famyma'o\",\n \"vacysai\",\n \"jetmlu\",\n \"jbonunsla\",\n \"nunpe'i\",\n \"fa'orma'o\",\n \"crezenzu'e\",\n \"jbojbe\",\n \"cmicu'a\",\n \"zilcmi\",\n \"tolcando\",\n \"zukcfu\",\n \"depybu'i\",\n \"mencre\",\n \"matmau\",\n \"nunctu\",\n \"selma'o\",\n \"titnanba\",\n \"naldra\",\n \"jvajvo\",\n \"nunsnu\",\n \"nerkla\",\n \"cimjvo\",\n \"muvgau\",\n \"zipcpi\",\n \"runbau\",\n \"faumlu\",\n \"terbri\",\n \"balcu'e\",\n \"dragau\",\n \"smuvelcki\",\n \"piksku\",\n \"selpli\",\n \"bregau\",\n \"zvafa'i\",\n \"ci'izra\",\n \"noltruti'u\",\n \"samtci\",\n \"snaxa'a\",\n ];\n }", "function get_words($doc) {\r\n\t//Split the words by non-alpha characters\r\n\t$splitter = preg_split('/[^A-Za-z]/', $doc);\r\n\t\r\n\t$words = array();\r\n\t//Lower case and remove short and long words and check if the word is not already in the array\r\n\tforeach ($splitter as $item) {\t\t\r\n\t\tif (strlen($item) > 2 && strlen($item) < 20 && !array_key_exists($item, $words)) {\r\n\t\t\t$item = strtolower($item);\r\n\t\t\t\r\n\t\t\t$words[$item] = 1;\r\n\t\t}\r\n\t}\t\r\n\t\r\n\treturn $words;\r\n}", "static function getKeywords($text,$bCreole=False) {\n\t$words=explode(' ',self::getSearchableText($text,$bCreole));\n\tsort($words);\n\t$count=0;\n\t$retval=array();\n\tfor ($i=0; $i<sizeof($words); ++$i) {\n\t\t++$count;\n\t\tif ($i >= sizeof($words)-1 || $words[$i+1] != $words[$i]) {\n\t\t\t$retval[$words[$i]]=$count;\n\t\t\t$count=0;\n\t\t}\n\t}\n\treturn $retval;\n}", "private function removeWords($input, $separator, $words_array = array(), $unique_words = true) {\n\n\t\t/**\n\t\t * Separate all words based on spaces\n\t\t */\n\t\t$input_array = explode(' ',$input);\n\t\t\n\t\t/**\n\t\t * Create the return array\n\t\t */\n\t\t$return = array();\n\t\t\n\t\t/**\n\t\t * Loops through words, remove bad words, keep good ones\n\t\t */\n\t\tforeach($input_array as $word) {\n\n\t\t\t/**\n\t\t\t * If it's a word we should add...\n\t\t\t */\n\t\t\tif(!in_array($word, $words_array) and ($unique_words ? !in_array($word, $return) : true)) {\n\t\t\t\t$return[] = $word;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Return good words separated by dashes\n\t\t */\n\t\treturn implode($separator, $return);\n\t}", "private static function removeSimilarBadWords($sentence, $replace, $treshhold = 90) {\r\n\r\n $resStr = $sentence;\r\n $data = preg_split('/\\s+/', $sentence);\r\n $array = self::getBadWordsArray();\r\n foreach ($array as $badword) {\r\n if($badword != \"\") {\r\n foreach ($data as $word) {\r\n similar_text($word, $badword, $per);\r\n if ($per > $treshhold) {\r\n $resStr = str_replace($word, $replace, $resStr);\r\n self::$count ++;\r\n }\r\n }\r\n }\r\n }\r\n return $resStr;\r\n\r\n }", "function fixArray($strWords) {\n\t$special = array('!','&','*','.','?','#8217;','#8230;','#8221;','@','$','(',')','-','nbsp;','amp;',':',',','/','\\\\','á','à','é','è','ü','\\'',';','#0160','#160','©','\"','#8220','#8211','+','´','’','”','|');\n\t$strWords = str_replace($special,' ',$strWords);\n\t$strWords = preg_replace('/\\s\\s+/', ' ', $strWords);\n\t$strWords = preg_replace('/\\n\\r|\\n|\\r/', ' ', $strWords);\n\t\n\t// Replace whitespace with comma, and explode into an array.\n\t$strWords = str_replace(' ', ',', $strWords);\n\t$arrWords = explode(',', $strWords);\n\t\n\t// Only keep words that are unique.\n\t$arrWords = array_unique($arrWords);\n\t\n\t// Remove empty elements.\n\t$arrWords = array_filter($arrWords);\n\t\n\t// No need to search for domains with 2 charcaters.\n\tforeach ($arrWords as $key => $value) { \n\t\tif (strlen($value) <= 2) { \n\t\t\tunset($arrWords[$key]); \n\t\t} \n\t}\n\t\n\t// Replace non-breaking spaces.\n\tforeach ($arrWords as $key => $value) { \n\t\t$arrWords[$key] = str_replace('\\u00a0', '', $value);\n\t}\n\t\n\t// Remove elements that isn't alphanumeric.\n\tforeach ($arrWords as $key => $value) { \n\t\tif (!ctype_alnum($value)) {\n\t\t\tunset($arrWords[$key]); \n\t\t}\n\t}\n\t\n\t// Return a clean array of words.\n return $arrWords;\n}", "function get_mask($word, $letters){\n $arr = str_split($letters);\n\n // fill with 0s\n $mask = array_fill(0, strlen($word), 0);\n \n \n foreach($arr as $letter){\n $count = substr_count($word, $letter);\n while(true){\n $occurence = rand(1, $count);\n $idx = get_nth_occurence($word, $letter, $occurence);\n \n // Make sure we have not set this location yet \n if($mask[$idx] == 0){\n // Choose this index to set a circle in\n $mask[$idx] = 1;\n break;\n } \n }\n }\n return $mask;\n}", "public function getWords() {\n\t\t\n\t\t\t$sortArray = function($a, $b) {\n\t\t\t\treturn strlen($b)-strlen($a);\n\t\t\t};\n\t\t\n\t\t\tusort($this->dictionary, $sortArray);\n\t\t\treturn $this->dictionary;\n\t\t\n\t\t}", "function removeDups($array) {\r\n $UniqueArray = array_unique($array);\r\n foreach($UniqueArray as $number) {\r\n echo \"$number\". \"<br>\";\r\n }\r\n }", "private function generateWordArrays(){\n\t\t\n\t\t$i = 0;\n\t\t$indexShuffle = [];\n\t\t\n\t\t//Generate the character list, in case swimPuzzle needs it\n\t\tforeach($this->wordList as $word){\n\t\t\t$chars = $this->splitWord($word);\n\n\t\t\tforeach($chars as $char){\n\t\t\t\tif($char == ' '){}\n\t\t\t\telse{\n\t\t\t\t\tarray_push($this->characterList, $char);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//For each word, put it in wordlist as an array\n\t\tforeach($this->wordList as $word) {\n\t\t\t$chars = $this->splitWord($word);\n\n\t\t\t$this->wordList[$i] = $chars;\n\n\t\t\tfor($j = 0; $j < count($this->wordList[$i]);){\n\t\t\t\tif($this->wordList[$i][$j] == ' '){\n\t\t\t\t\tarray_splice($this->wordList[$i], $j, 1);\n\t\t\t\t} else {\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tarray_push($this->fullWords, $this->wordList[$i]);\n\t\t\tarray_push($this->scrambledFullWords, $this->wordList[$i]);\n\t\t\t\n\t\t\tshuffle($this->scrambledFullWords[$i]);\n\n\t\t\t$i = $i + 1;\n\t\t}\n\t\t\n\t\tfor ($i = 0; $i < $this->wordCount; $i++) {\n\t\t\t$this->sparseWords[$i] = [];\n\t\t\t$this->scrambledSparseWords[$i] = [];\n\t\t}\n\n\t\tfor($i = 0; $i < $this->maxLength; $i++) {\n\t\t\t$indexShuffle = null;\n\t\t\t$indexShuffle = [];\n\t\t\t$testArray = null;\n\t\t\t$testArray = [];\n\t\t\tfor($j = 0; $j < $this->wordCount; $j++) {\n\t\t\t\tarray_push($indexShuffle, $this->fullWords[$j][$i]);\t\t\t\t\n\t\t\t}\n\n\t\t\tshuffle($indexShuffle);\n\n\t\t\tfor($j = 0; $j < $this->wordCount; $j++) {\n\t\t\t\t$this->fullWords[$j][$i] = $indexShuffle[$j];\n\t\t\t\tif(!in_array($indexShuffle[$j], $testArray)){\n\t\t\t\t\tarray_push($testArray, $indexShuffle[$j]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor($j = 0; $j < $this->wordCount; $j++) {\n\t\t\t\tif($j < count($testArray)) {\n\t\t\t\t\t$this->sparseWords[$j][$i] = $testArray[$j];\n\t\t\t\t} else {\n\t\t\t\t\t$this->sparseWords[$j][$i] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor($i = 0; $i < $this->maxLength; $i++) {\n\t\t\t$indexShuffle = null;\n\t\t\t$indexShuffle = [];\n\t\t\t$testArray = null;\n\t\t\t$testArray = [];\n\t\t\tfor($j = 0; $j < $this->wordCount; $j++) {\n\t\t\t\tarray_push($indexShuffle, $this->scrambledFullWords[$j][$i]);\t\t\t\t\n\t\t\t}\n\n\t\t\tshuffle($indexShuffle);\n\n\t\t\tfor($j = 0; $j < $this->wordCount; $j++) {\n\t\t\t\t$this->scrambledFullWords[$j][$i] = $indexShuffle[$j];\n\t\t\t\tif(!in_array($indexShuffle[$j], $testArray)){\n\t\t\t\t\tarray_push($testArray, $indexShuffle[$j]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor($j = 0; $j < $this->wordCount; $j++) {\n\t\t\t\tif($j < count($testArray)) {\n\t\t\t\t\t$this->scrambledSparseWords[$j][$i] = $testArray[$j];\n\t\t\t\t} else {\n\t\t\t\t\t$this->scrambledSparseWords[$j][$i] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function remove(string $s): string {\n return implode(' ' ,array_filter(explode(' ', $s), function ($x) {\n return count(explode('!', $x)) !== 2;\n }));\n}", "function removeCommonWordsFromIndex($start)\n{\n\tglobal $modSettings;\n\n\t$db = database();\n\n\t$stop_words = $start === 0 || empty($modSettings['search_stopwords']) ? array() : explode(',', $modSettings['search_stopwords']);\n\t$stop = time() + 3;\n\t$max_occurrences = ceil(60 * $modSettings['totalMessages'] / 100);\n\t$complete = false;\n\t$step_size = 100000000;\n\t$max_size = 4294967295; // FFFF FFFF\n\n\twhile (time() < $stop)\n\t{\n\t\t// Find indexed words that appear to often\n\t\t$db->fetchQuery('\n\t\t\tSELECT\n\t\t\t\tid_word, COUNT(id_word) AS num_words, id_msg\n\t\t\tFROM {db_prefix}log_search_words\n\t\t\tWHERE id_word BETWEEN {int:starting_id} AND {int:ending_id}\n\t\t\tGROUP BY id_word\n\t\t\tHAVING COUNT(id_word) > {int:minimum_messages}',\n\t\t\tarray(\n\t\t\t\t'starting_id' => $start,\n\t\t\t\t'ending_id' => min($start + $step_size - 1, $max_size),\n\t\t\t\t'minimum_messages' => $max_occurrences,\n\t\t\t)\n\t\t)->fetch_callback(\n\t\t\tfunction ($row) use (&$stop_words) {\n\t\t\t\t$stop_words[] = $row['id_word'];\n\t\t\t}\n\t\t);\n\n\t\t// Add them to the stopwords list since we are removing them as to common\n\t\tupdateSettings(array('search_stopwords' => implode(',', $stop_words)));\n\n\t\t// Pfft ... commoners\n\t\tif (!empty($stop_words))\n\t\t{\n\t\t\t$db->query('', '\n\t\t\t\tDELETE FROM {db_prefix}log_search_words\n\t\t\t\tWHERE id_word in ({array_int:stop_words})',\n\t\t\t\tarray(\n\t\t\t\t\t'stop_words' => $stop_words,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$start += $step_size;\n\t\tif ($start >= $max_size)\n\t\t{\n\t\t\t$complete = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t$percentage = 90 + (min(round($start / $max_size, 2), 1) * 10);\n\n\treturn array($start, $complete, $percentage);\n}", "function ArrayRemove ($array, $indice) {\n\t\tif (array_key_exists($indice, $array)) {\n\t\t\t$temp = $array[0];\n\t\t\t$array[0] = $array[$indice];\n\t\t\t$array[$indice] = $temp;\n\t\t\tarray_shift($array);\n\n\t\t\tfor ($i = 0 ; $i < $indice ; $i++)\n\t\t\t{\n\t\t\t\t$dummy = $array[$i];\n\t\t\t\t$array[$i] = $temp;\n\t\t\t\t$temp = $dummy;\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}", "public function getAnagrams()\n\t{\n\t\treturn array_filter($this->getWordGroups(), function($words)\n\t\t{\n\t\t\treturn count($words) > 1;\n\t\t});\n\t}", "function rec_remove( $arry )\n\t{\n\t\twhile( list( $var ) = each( $arry ) )\n\t\t{\n\t\t\tif ( is_array( ${$var} ) )\n\t\t\t{\n\t\t\t\trec_remove( $var );\n\t\t\t}else\n\t\t\t{\n\t\t\t\tglobal ${$var};\n\t\t\t\tunset( ${$var} );\n\t\t\t}\n\t\t}\t\n\t}", "function getListWordsRelatedContent($content,$count,$replace = array()){\n $list_words = array();\n\n $list_words = getListWords($content);\n\n while ( count($list_words) < $count) {\n $parts = split('-', $content);\n $num = factorial(count($parts)); // Total words from content given\n $remain = $count - count($list_words); // Get remain words need to get\n $mod = ceil($remain/$num) < count($replace) ? ceil($remain/$num) : count($replace) ;\n // Get random text in content\n \n shuffle($parts); // Shuffle \n $tmp = $parts;\n $random_part = array_shift($parts);\n $tmp1 = $parts;\n $rand_arr = array_rand($replace,$mod);\n $rand_arr = is_array($rand_arr) ? $rand_arr : array($rand_arr);\n foreach( $rand_arr as $index ){\n // Set prefix or suffix\n $is_prefix = mt_rand(1,100) % 2 == 0 ;\n if( $is_prefix ){\n array_push($parts, $replace[$index].$random_part);\n } else {\n array_push($parts, $random_part.$replace[$index]); \n }\n \n $content = implode(\"-\", $parts);\n \n $list_words = array_merge($list_words, getListWords($content));\n $parts = $tmp1;\n }\n if( count($parts) > 1){\n $content = implode(\"-\".$replace[ array_rand($replace)], $tmp);\n } else {\n $content = $is_prefix ? $replace[ array_rand($replace)]. $content : $content.$replace[ array_rand($replace)];\n }\n \n }\n\n return $list_words;\n}", "public static function getDuplicates($array) {\n return array_unique(array_diff_assoc($array, array_unique($array)));\n }", "public static function duplicates( $array ) {\n return array_unique( array_diff_assoc( $array, array_unique( $array )));\n }", "function stop_words($contenido, $stopwords_file)\n{\n $stopword = file($stopwords_file);\n $total = count($stopword);\n for ($i=0; $i< $total; $i++)\n {\n $stopword[$i] = trim(strtolower($stopword[$i]));\n }\n\n //lista todas las palabras del contenido del texto\n $_terms = explode(\" \", $contenido);\n\n foreach ($_terms as $line) //busca y remplaza las stopwords dentro del contenido del texto\n {\n if (in_array(strtolower(trim($line)), $stopword))\n {\n $removeKey = array_search($line, $_terms);\n unset($_terms[$removeKey]);\n }\n else\n {\n $clean_term = \" \".$line;\n }\n }\n return $clean_term;\n}", "private function fixDuplicateWords(string $query): string\n\t{\n\t\t$return = '';\n\t\t$usedWords = [];\n\t\tforeach (explode(' ', $query) as $word) {\n\t\t\tif (isset($usedWords[$word]) === false) {\n\t\t\t\t$return .= ($return !== '' ? ' ' : '') . $word;\n\t\t\t\t$usedWords[$word] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "function array_not_unique($raw_array) {\n $dupes = array();\n natcasesort($raw_array);\n reset($raw_array);\n\n $old_key = NULL;\n $old_value = NULL;\n foreach ($raw_array as $key => $value) {\n if ($value === NULL) { continue; }\n if (strcasecmp($old_value, $value) === 0) {\n $dupes[$old_key] = $old_value;\n $dupes[$key] = $value;\n }\n $old_value = $value;\n $old_key = $key;\n }\n return $dupes;\n}", "private function EliminarEmpleadosRepetidos()\n\t{\n\t\t$this->_empleados = array_unique($this->_empleados,SORT_REGULAR);\n\t}", "public function removeRelevantTerm($term){\n if(empty($term))\n return; \n $this->relevant= preg_replace('/\\|'.trim(preg_quote($term, '\\|/')).'\\|/', '|', '|'.$this->relevant.'|');\n $this->relevant = substr($this->relevant, 1, strlen($this->relevant)-2);// quita los pipes puestos al principio y final\n }", "function remDup($tempString){\n\t#calculate the original length of the string\n\t$initLength = strlen($tempString);\n\t\n\t#i represents the reference/unique charcters. As the string is iterated,all duplicates of any character in i will be removed. This maintains the order of the string. \n\n\tfor ($i =0; $i < $initLength ; $i++){\n\t\t#iterate through the remaining characters of the string, starting with the character ADJACENT to the current reference character\n\t\tfor ($j =$i+1; $j<$initLength ; $j++){\n\t\t\t#if j is a duplicate of a current reference, then remove it\n\t\t\tif($tempString[$i]==$tempString[$j]){\n\t\t\t\t$tempString=removeChar($tempString,$j);\n\t\t\t\t#once the duplicate is removed, update the length of the return string\n\t\t\t\t$initLength--;\n\t\t\t\t#reinitialize the inner loop to find more duplicates.\n\t\t\t\t$j=$i+1;\n\t\t\t}\t\n\t\t}\n\t}\nreturn $tempString;\n\n}", "function getSentences($corpus, $array_word) {\n foreach ($corpus as $value) {\n if (containsArray($value, $array_word)) {\n $text[] = $value;\n }\n }\n return $text;\n}", "public function ingredients_without_groups() {\n\t\t$ingredients = $this->ingredients();\n\t\t$ingredients_without_groups = array();\n\n\t\tforeach ( $ingredients as $ingredient_group ) {\n\t\t\t$ingredients_without_groups = array_merge( $ingredients_without_groups, $ingredient_group['ingredients'] );\n\t\t}\n\n\t\treturn $ingredients_without_groups;\n\t}", "private function getWords(){\t\t\t\t\t\t\t\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyz123456789'; //characters to use in image generation\n\t\t$numchars = strlen($chars); \n\t\t$wordlength = rand(4,7);\n\t\t$word = '';\n\t\tfor ($i=0;$i<$wordlength;$i++){\n\t\t\t$pos=rand(0, $numchars);\n\t\t\t$word.=substr($chars, $pos, 1);\n\t\t}\n\t\treturn $word; \n\t}", "public function get_dictionary_words($lines) // $page_no - Ang No.\n {\n $keywords = array();\n foreach ($lines as $line) {\n $SQL = \"\n\t\t\tSELECT punjabi, concat(`roman`,' - ',`English`) as `meaning`\n\t\t\tFROM `SK01`\n\t\t\tWHERE '\" . $line->punjabi . \"' LIKE concat( '% ', `punjabi` , ' %' )\n\t\t\tOR '\" . $line->punjabi . \"' LIKE concat( `punjabi` , ' %' ) \";\n// $rs = $this->db->query($SQL);\n// if ($rs->num_rows() > 0) {\n// foreach ($rs->result() as $row) {\n// $keywords[$row->punjabi] = $row->meaning;\n// }\n// }\n $rs = DB::select($SQL);\n if (count($rs) > 0) {\n foreach ($rs as $row) {\n $keywords[$row->punjabi] = $row->meaning;\n }\n }\n }\n return array_unique($keywords);\n }", "public function noDuplicates();", "function get_orignal_phrases_for_search_term($term, $language) {\n $n = '%';\n $term = esc_sql(html_entity_decode($term, ENT_NOQUOTES, 'UTF-8'));\n $language = esc_sql($language);\n $query = \"SELECT original\" .\n \" FROM `{$this->translation_table}`\" .\n \" WHERE `lang` = '$language'\" .\n \" AND `translated` LIKE '{$n}{$term}{$n}'\";\n //TODO wait for feedbacks to see if we should put a limit here.\n tp_logger($query, 4);\n $result = array();\n if (strlen($term) < 3)\n return $result;\n $rows = $GLOBALS['wpdb']->get_results($query);\n\n foreach ($rows as $row) {\n $addme = true;\n // now lets use the a-priori for reduction\n // two possibilities for reduction, new is included in old, or some old includes this new\n foreach ($result as $k => $r) {\n // if our original is included in a string in the result, that is no longer needed...\n if (stripos($r, $row->original) !== false) {\n unset($result[$k]);\n }\n // if the other way around is true, we won't have to add it\n if (stripos($row->original, $r) !== false) {\n $addme = false;\n }\n }\n if ($addme)\n $result[] = $row->original;\n }\n\n return $result;\n }" ]
[ "0.6097654", "0.5771132", "0.5731454", "0.5707609", "0.5702156", "0.55021656", "0.54767597", "0.5432228", "0.5400023", "0.53491133", "0.53161275", "0.5273379", "0.52193373", "0.51947844", "0.51920134", "0.5191007", "0.5179947", "0.50968033", "0.5061476", "0.5047539", "0.50346375", "0.5024124", "0.50237304", "0.4941414", "0.49412504", "0.49394414", "0.4909846", "0.4905205", "0.48781237", "0.4855223", "0.48342717", "0.48233244", "0.48058775", "0.48016766", "0.4790254", "0.4786241", "0.47842026", "0.47744748", "0.47698203", "0.47409192", "0.47257835", "0.47031322", "0.46946874", "0.4669704", "0.46677145", "0.46533832", "0.46514213", "0.46374765", "0.46290824", "0.46194798", "0.46180815", "0.46146497", "0.46114397", "0.46083653", "0.46025056", "0.45993465", "0.4598882", "0.45917875", "0.45897186", "0.45886648", "0.4571971", "0.4567491", "0.45553106", "0.45500332", "0.45490476", "0.4539271", "0.45334134", "0.45283774", "0.452483", "0.45191044", "0.45130187", "0.4512703", "0.45123753", "0.4511859", "0.45037335", "0.4487775", "0.44723615", "0.44722414", "0.4470706", "0.44664744", "0.44661272", "0.44624266", "0.44560364", "0.44542193", "0.44489983", "0.44470078", "0.44462508", "0.44396397", "0.44277093", "0.4424362", "0.44148833", "0.44091144", "0.4408046", "0.44016224", "0.43996358", "0.4398368", "0.43966037", "0.43903276", "0.4382037", "0.43758217" ]
0.73989123
0
Return whether the check is muted
Вернуть, является ли проверка отключенной
public function isMuted();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isMuted(): bool;", "public static function is_muted(): bool {\n\t\ttry {\n\t\t\treturn self::instance()->is_muted;\n\t\t} catch ( Instance_Not_Ready ) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function isMuted()\n {\n $this->muted = true;\n return $this;\n }", "public function isMuted()\n {\n $this->attribute['muted'] = false;\n\n return $this;\n }", "public function getMute() {\n $domain_settings = $this->getDomainSettingsObject();\n \n if ($domain_settings && array_key_exists(\"mute\", $domain_settings)) {\n return $domain_settings[\"mute\"];\n }\n \n return 60;\n }", "public function mute(bool $muted = true);", "public function canPause(): bool;", "public function canPlay(): bool\n {\n return !(bool)Yii::$app->session->get('prizeAccepted');\n }", "public function mute();", "public function checkPlaying() {\n return $this->run('current') ? true : false;\n }", "public function canPause(): bool\n {\n\n $command = new Commands\\CanPause();\n return $command->getFormattedOutput();\n\n }", "public function isSilent();", "public function getIsAllowspeak()\n {\n return $this->is_allowspeak;\n }", "public function whitesTurn() {\n return (boolean) ($this->status & Game::STATUS_WHITES_TURN);\n }", "public function playbackStatus(): bool;", "protected function check(){\n\t\t$this->under->set('on',1);\n\t\tif(!$this->under->get('on')){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isMaked(): bool;", "public function notOnCooldown(): bool\n {\n return ! $this->isOnCooldown();\n }", "public function isSpam() {\n\t\treturn $this->raw_result == 'true';\n\t}", "public function isPositive()\n {\n return $this->tone() > 0;\n }", "function _UpMusic()\r\n{\r\n return ((get_option('mp3rule', 1) == 1) || is_moderator());\r\n}", "public function isSilent() {\n\t\treturn $this->hasFlags( [ 'silent', 'porcelain' ], 'shh' );\n\t}", "public function playbackStatus(): bool\n {\n\n $command = new Commands\\PlaybackStatus();\n return $command->getFormattedOutput();\n\n }", "public function hasTimestampMachineSteamguardEnabled()\n {\n return $this->timestamp_machine_steamguard_enabled !== null;\n }", "protected function hasUserMon() {\n $uid = $this->currentUser()->id();\n $query = $this->database->select('drupal_monsters_user_mon', 'um')\n ->fields('um', ['uid'])\n ->condition('uid', $uid)\n ->range(0, 1)\n ->execute();\n $results = $query->fetch();\n return (!empty($results)) ? TRUE : FALSE;\n }", "public function paused(): bool\n {\n return (bool) $this->paused;\n }", "public static function isMonitoring(): bool\n {\n return static::$shouldMonitor;\n }", "public function canPlay(): bool;", "public function muted(bool $muted)\n {\n $this->muted = $muted;\n\n return $this;\n }", "public function isManagement() {\n return ($this->auth->isManagement() == '1');\n }", "public function canPlay(): bool\n {\n\n $command = new Commands\\CanPlay();\n return $command->getFormattedOutput();\n\n }", "function canUnclaim() {\r\n return ($this->isAdmin()) ? true : $this->perm_canUnclaim;\r\n }", "public function alarm()\n {\n if(!isset($this->state)) {\n return true;\n }\n\n return $this->state <= $this->threshold;\n }", "public function getVideoMute()\n\t{\n\t\t$command = '$mute = $prj->get_av_mute();\n\t\tif ($mute[1] == Net::PJLink::MUTE_VIDEO) {\n\t\t\tprint(\\'1\\');\n\t\t} else {\n\t\t\tprint(\\'0\\');\n\t\t}';\n\t\treturn self::executePJLink($command);\n\t}", "public function alarm()\n {\n if(!isset($this->state)) {\n return true;\n }\n\n return $this->state >= $this->threshold;\n }", "public function userCanBeInfluencer()\n {\n return !$this->user->influencer;\n }", "public function isNeutral()\n {\n return $this->tone() == 0;\n }", "public function isCheck() {\n return (boolean) ($this->status & Game::STATUS_CHECK);\n }", "public function getIsClaimedAttribute()\n {\n return $this->claimed_at !== null;\n }", "public function isWhite() {\n return $this->white;\n }", "public function isNegative()\n {\n return $this->tone() < 0;\n }", "private function can_log( Event_Type $event_type ): bool {\n\t\treturn ! $this->is_muted() && $this->volume >= $event_type->get_volume();\n\t}", "public function testMuteUser()\n {\n $this->markTestIncomplete(\n 'Test of \"muteUser\" method has not been implemented yet.'\n );\n }", "public function has_user_opted_out() {\n // Different opt-out methods for plugins and themes\n if( $this->what_am_i === 'theme' ) {\n // Look for the theme mod\n $mod = get_theme_mod( 'wisdom-allow-tracking', 0 );\n if( false === $mod ) {\n // If the theme mod is not set, then return true - the user has opted out\n return true;\n }\n } else {\n // Iterate through the options that are being tracked looking for wisdom_opt_out setting\n if( ! empty( $this->options ) ) {\n foreach( $this->options as $option_name ) {\n // Check each option\n $options = get_option( $option_name );\n // If we find the setting, return true\n if( ! empty( $options['wisdom_opt_out'] ) ) {\n return true;\n }\n }\n }\n }\n return false;\n }", "public function isSuspended()\n\t{\n\t\t$timeToday = strtotime(date(\"Y-m-d\"));\n\t\t$query = \"SELECT * FROM sn_playersuspend WHERE ID_PLAYER={$this->ID_PLAYER} AND isHistory=0\";\n\t\t$playerSuspend = Doo::db()->fetchAll($query);\n\t\tif (isset($playerSuspend[0]))\n\t\t{\n\t\t\t$sus = $playerSuspend[0];\n\t\t\t$isHistory = $sus['isHistory'];\n\t\t\t$Unlimited = $sus['Unlimited'];\n\t\t\t$StartDate = $sus['StartDate'];\n\t\t\t$EndDate = $sus['EndDate'];\n\t\t\t$timeStart = strtotime($StartDate);\n\t\t\t$timeEnd = strtotime($EndDate);\n\t\t\tif ($Unlimited==0)\n\t\t\t{\n\t\t\t\t//Limited suspension\n\t\t\t\tif ($timeStart <= $timeToday && $timeToday <= $timeEnd) \n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Unlimited suspension\n\t\t\t\tif ($timeStart <= $timeToday) \n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function CheckMonet() {\n\n\t\t\t// if ( $this->UnitTestFlg ) $this->AddConsoleMsg( \"Check Monet State\" );\n\t\t\t$StrtTime = microtime(true);\n\n\n\n\t\t\treturn( 0 );\n }", "public function getIsDisabled() {}", "public function getSuspended()\n {\n return (bool) $this->suspended;\n }", "public function notOnAnyCooldown(): bool\n {\n return ! $this->isOnAnyCooldown();\n }", "public function isDisabled(): bool;", "public function canResetStatus()\n {\n return $this->isStatusProcessing();\n }", "protected function isMe()\n {\n return $this->speaker->MemberID == Member::currentUserID();\n }", "public function isSuspended(): bool;", "public function isBlatantSpam() {\n\t\treturn ($this->isSpam() && $this->hasProTip() && $this->getProTip() == 'discard');\n\t}", "function _EmbedMusic()\r\n{\r\n return ((get_option('musicembed', 1) == 1) || is_moderator());\r\n}", "public function getIsMonster()\n {\n $value = $this->get(self::IS_MONSTER);\n return $value === null ? (boolean)$value : $value;\n }", "public function check()\n {\n return (bool) $this->user();\n }", "public function isUnsubscribed(): bool;", "public function isSuspended()\n {\n return (bool) $this->suspended;\n }", "public function getShouldCheckRemittance()\n {\n return $this->should_check_remittance;\n }", "public function has_autoplay() {\n\t\t$autoplay = $this->_get( 'a' );\n\n\t\treturn ! empty( $autoplay ) && in_array( $autoplay, array( 1, 'true' ) );\n\t}", "public function is_disabled() {\n\t\treturn $this->status == Notifications::STATUS_READ;\n\t}", "public function silenced()\n {\n return $this->silenced;\n }", "public function getLoudness(): bool;", "function IsMusicStreamPlaying(\\raylib\\Music $music): bool { return false; }", "public function hasKillmvps(){\n return $this->_has(3);\n }", "function irc_bot_toggle_silence_mode( bool $is_silent ) : bool\n{\n // Require administrator rights to run this action\n user_restrict_to_administrators();\n\n // Decide which mode to toggle to\n $is_silent = ($is_silent) ? 0 : 1;\n\n // Update the system variable\n system_variable_update('irc_bot_is_silenced', $is_silent, 'int');\n\n // Write a log in the database\n $timestamp = sanitize(time(), 'int', 0);\n $silenced_log = ($is_silent) ? '** Silencing IRC bot **' : '** Unsilencing IRC bot **';\n query(\" INSERT INTO logs_irc_bot\n SET logs_irc_bot.sent_at = '$timestamp' ,\n logs_irc_bot.body = '$silenced_log' ,\n logs_irc_bot.is_manual = 1 ,\n logs_irc_bot.is_action = 1 \");\n\n // Return the new value of silent mode\n return $is_silent;\n}", "public function isVerified()\n {\n return (bool) $this->session->get(self::$name, false);\n }", "public static function isSetup(): bool\n {\n\n return ! is_null(setting('herpaderp.seatnotifications.discord.credentials.bot_token', true));\n }", "public function isSessionCheck()\n {\n return ((int) $this->get('SessionCheck')) === 1;\n }", "public function is_claimed() {\n if ( method_exists( $this->wpjmcl->listing, 'is_claimable' ) ) {\n return $this->wpjmcl->listing->is_claimable();\n } else {\n return ! $this->wpjmcl->listing->is_claimed();\n }\n }", "public function hasReminderSettings()\n {\n return $this->reminder != null;\n }", "public static function checkTmEnable()\n\t{\n\t\t$userModel = new Timemanagement_Model_Users();\n\t\t$checkTmEnable = $userModel->checkTmEnable();\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$loginuserGroup = '';\n\t\t$result = 1;\n\t\tif($auth->hasIdentity())\n\t\t\t$loginuserGroup = $auth->getStorage()->read()->group_id;\n\t\t\t\n\t\tif(!$checkTmEnable || $loginuserGroup == USERS_GROUP){\n\t\t\t$result = 0;\n\t\t}\t\n\t\treturn $result;\n\t}", "public function isSubscribed(): bool;", "public function paused()\n {\n return $this->paddle_status === Paddle::STATUS_PAUSED;\n }", "public function isReadonly() {\n return $this->_getProduct()->getVideoReadonly();\n }", "public function isWatched()\n {\n return $this->watched;\n }", "protected function _suspend()\n {\n\t\t// PHP does the trick automatically\n return true;\n }", "public function isShowtime() {\n $result = DBConnection::exec($this->databaseType, \"SELECT showtime FROM profile WHERE profile_id = \" . $this->identifier);\n $resultRow = mysqli_fetch_row($result);\n if ($resultRow[0] == \"0\") {\n return FALSE;\n }\n return TRUE;\n }", "public function checkSuspended()\n {\n if ($this->is_suspended && $this->suspended_at) {\n $this->removeSuspensionIfAllowed();\n return (bool) $this->is_suspended;\n }\n\n return false;\n }", "public function isOnCooldown(): bool\n {\n return Cache::has($this->getCooldownCacheKey());\n }", "public function isBanned()\n {\n return (bool)$this->getProfileData('is_write_banned');\n }", "public static function check_lock_media($media_id, $type)\n {\n $sql = 'SELECT `object_id` FROM `now_playing` WHERE ' .\n '`object_id` = ? AND `object_type` = ?';\n $db_results = Dba::read($sql, array($media_id, $type));\n\n if (Dba::num_rows($db_results)) {\n debug_event('Stream', 'Unable to play media currently locked by another user', 3);\n return false;\n }\n\n return true;\n }", "public function paused(): bool\n {\n return $this->status === self::STATUS_PAUSED;\n }", "public function isPaused(): bool\n {\n return $this->paused;\n }", "public function isSubscribed()\n {\n return (bool) $this->getIsActive();\n }", "public function mute(): OMXPlayer;", "public function isDisabled() {}", "function isActuallyEnabled ();", "public function hasDisableHealthCheck(){\n return $this->_has(1);\n }", "function _EmbedVideo()\r\n{\r\n return ((get_option('sharingrule', 1) == 1) || is_moderator());\r\n}", "public function checkStatus()\n {\n $interval = Carbon::now()->subDays(366);\n $penyimpanan_shu = PenyimpananSHU::where('created_at', '>', $interval)->count();\n\n if($penyimpanan_shu > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function post_is_taken_down() {\n return 'on' === get_post_meta( get_the_ID(), '_rns_taken_down', true );\n }", "public static function isTimeManActive(): bool\n\t{\n\t\t$result = false;\n\n\t\tif(Loader::includeModule('timeman'))\n\t\t{\n\t\t\tif(Loader::includeModule('bitrix24'))\n\t\t\t{\n\t\t\t\tif(Feature::isFeatureEnabled(\"timeman\"))\n\t\t\t\t{\n\t\t\t\t\t$result = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(class_exists('CBXFeatures'))\n\t\t\t\t{\n\t\t\t\t\tif(\\CBXFeatures::IsFeatureEnabled('timeman'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$result = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getModerationTimestamps(): bool;", "public function canSendTest()\n {\n return !in_array($this->getStatus(), array('sent', 'sending', 'schedule'));\n }", "public function isAllowable()\n {\n return $this->newsletterCookie->get() != Subscriber::STATUS_SUBSCRIBED;\n\n }", "public function canUnschedule()\n {\n return $this->isScheduled();\n }", "public function canBroadcast()\n { $constraint = config('watchout.constraint');\n $quota = $this->quota($constraint['interval']);\n return ($constraint['stream_count'] >= $quota['stream_count'])\n && ($constraint['stream_size'] >= $quota['stream_size']);\n }", "function is_sopa_message_displayed() {\r\n\t$sopa_opts = get_sopa_options();\r\n\t$blackout_dates = array_map( 'trim', explode( ',', $sopa_opts['blackout_dates'] ) );\r\n\t\r\n\t$time = @date( \"Y-m-d\", current_time( 'timestamp' ) );\r\n\treturn in_array( $time, $blackout_dates );\r\n}" ]
[ "0.82457256", "0.7940962", "0.68179005", "0.6635542", "0.6494036", "0.6317881", "0.60770375", "0.6036864", "0.6033434", "0.5994543", "0.5956197", "0.5875003", "0.5870164", "0.58557093", "0.5794399", "0.5792948", "0.569581", "0.56817216", "0.5647172", "0.5598564", "0.55537075", "0.553406", "0.5514936", "0.55144066", "0.5502579", "0.54970294", "0.54870313", "0.54812133", "0.54542416", "0.54471993", "0.54435265", "0.54260945", "0.5401715", "0.5375984", "0.53543705", "0.53493035", "0.53123057", "0.5301544", "0.52959573", "0.5292963", "0.5288577", "0.5287472", "0.5280318", "0.5280316", "0.5273669", "0.52572614", "0.524728", "0.52449083", "0.5240893", "0.52383345", "0.52362305", "0.52315575", "0.5225123", "0.52234185", "0.5221026", "0.52209044", "0.5214408", "0.5205421", "0.52048093", "0.52018243", "0.5200747", "0.51982087", "0.51959413", "0.51949674", "0.5192769", "0.517605", "0.51680464", "0.51646376", "0.5164607", "0.51636636", "0.5155974", "0.51461005", "0.51426905", "0.51383936", "0.51371133", "0.5135961", "0.51252675", "0.5124911", "0.51229876", "0.51225483", "0.51134086", "0.5113042", "0.5111402", "0.5109023", "0.5106248", "0.5105346", "0.51045555", "0.5102766", "0.5098514", "0.509745", "0.50921917", "0.50905013", "0.50901926", "0.50872105", "0.50864077", "0.50825727", "0.50794935", "0.5071535", "0.506929", "0.5069104" ]
0.8274749
0
Get the value of docenciaTecnicoSuperiorId
Получить значение docenciaTecnicoSuperiorId
public function getDocenciaTecnicoSuperiorId() { return $this->docenciaTecnicoSuperiorId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getTbResenhaIdusuario(){\n\treturn $this->tbResenhaIdusuario;\n}", "public function getIdDocumento(){\n return $this->idDocumento;\n }", "public function getIdTecnico()\n {\n return $this->idTecnico;\n }", "public function getTerceiroId()\n {\n return $this->terceiroId;\n }", "public function getIdDocumento()\n {\n return $this->id_documento;\n }", "public function getIdLiderTecnico() {\n return $this->idLiderTecnico;\n }", "public function getTbResenhaId(){\n\treturn $this->tbResenhaId;\n}", "public function getCarnet_supervigilancia_idcarne(){\n return $this->carnet_supervigilancia_idcarne;\n }", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public static function getSuperId(){\n return config('super_id',static::$SUPER_ID);\n }", "public function getSubGradoId()\n {\n if (!is_null($this->subGrados))\n {\n return $this->subGrados->first()->id;\n }\n\n }", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function getIdGerente(){\n\t\t\treturn $this->idGerente;\n\t\t}", "public function getTbResenhaIdlivro(){\n\treturn $this->tbResenhaIdlivro;\n}", "function getIdPersonne() {\n return $this->idpersonne;\n }", "public function getIdPerduTrouve()\n {\n return $this->idPerduTrouve;\n }", "function get_idObjeto( ) {\n // returns the value of idObjeto\n return $this->idObjeto;\n }", "public function setDocenciaTecnicoSuperiorId($docenciaTecnicoSuperiorId)\n\t{\n\t\t$this->docenciaTecnicoSuperiorId = $docenciaTecnicoSuperiorId;\n\n\t\treturn $this;\n\t}", "private function getID(){\n\t\treturn $this->ultimoID;\n\t}", "public function getIdComprobante() {\n return $this->idComprobante;\n }", "public function getSubid()\n {\n return $this->subid;\n }", "public function getIdUsu()\n {\n return $this->idUsu;\n }", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "function DameIdProximoTecnica()\r\n {\r\n return $this->modeltecnica->buscaridproximo();\r\n\r\n }", "public function getDocente(){\n return $this->docente;\n }", "public function getidUtilisateur()\n {\n return $this->idUtilisateur;\n }", "public function getIdusuario(){\n\t\treturn $this->idusuario;\n\t}", "public function getIdusuario(){\n\t\treturn $this->idusuario;\n\t}", "public function getIdEdificio()\n {\n return $v_id_edificio;\n \n }", "public function getIdSub()\n {\n return $this->id_sub;\n }", "public function getIdConvenio()\n {\n return $this->idConvenio;\n }", "public function getIdDocumentosbene()\n {\n return $this->id_documentosbene;\n }", "public function getSubUsuario()\n {\n return $this->subUsuario;\n }", "public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior)\n\t{\n\t\t$this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior;\n\n\t\treturn $this;\n\t}", "public function getTipo_vinculacion_id(){\n return $this->tipo_vinculacion_id;\n }", "function get_idUsuario( ) {\n // returns the value of idUsuario\n return $this->idUsuario;\n }", "public function getIdEmpleadoRecive()\n {\n return $this->idEmpleadoRecive;\n }", "public function getIdUsuario()\n {\n private $v_id_usuario;\n \n }", "public function idRespo()\n {\n return $this->idRespo;\n }", "public function getIdusuario()\r\n {\r\n return $this->idusuario;\r\n }", "public function getSub(): int\n {\n return $this->getId();\n }", "public function getIdusuario()\n {\n return $this->idusuario;\n }", "public function getIdusuario()\n {\n return $this->idusuario;\n }", "public function getIdUtilisateur()\n {\n return $this->idUtilisateur;\n }", "public function getIdUtilisateur()\n {\n return $this->idUtilisateur;\n }", "public function getIdUtilisateur()\n {\n return $this->idUtilisateur;\n }", "public function getIdUtilisateur()\n {\n return $this->idUtilisateur;\n }", "public function getIdSeccion() {\r\n return $this->idSeccion;\r\n }", "public function getFkTcepeFonteRecurso()\n {\n return $this->fkTcepeFonteRecurso;\n }", "function get_idLegajo( ) {\n return $this->idLegajo;\n }", "public function getIdpersona()\r\n {\r\n return $this->idpersona;\r\n }", "public function getId(){\n return $this->idPersona;\n }", "function getIdUsuario () { \n \treturn $this -> usrId; \n }", "public function getIdcliente() {\n return $this->_idcliente;\n }", "public function getIdcliente()\n {\n\n return $this->idcliente;\n }", "function getId_tipo() {\n return $this->id_tipo;\n }", "public function getRutaDocumento(){\n return $this->rutaDocumento;\n }", "function getId_tipo_proceso()\n {\n if (!isset($this->iid_tipo_proceso) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_tipo_proceso;\n }", "public function getCodPersonaUsuario()\n {\n return $this->codPersonaUsuario;\n }", "public function getId_Usuario(){\n\t\treturn $this->id_usuario;\n\t}", "public function getId_usuario(){\n\t\treturn $this->id_usuario;\n\t}", "public function getDocumentId() {}", "public function getIdUsuarioCadastrante () {\n\t\treturn $this->ug_usu_resp_cad_id;\n\t}", "public function getIdUsuario()\n {\n return $this->idUsuario;\n }", "public function getIdUsuario()\n {\n return $this->idUsuario;\n }", "public function getIdUsuario()\n {\n return $this->idUsuario;\n }", "public function getFkTcernTipoVeiculoVinculo()\n {\n return $this->fkTcernTipoVeiculoVinculo;\n }", "public function getIdusuario(){\n return $this->idusuario;\n }", "public function getIdUsuario()\n {\n\n return $this->idusuario;\n }", "public function getUsuario_idUsuario(){\n return $this->Usuario_idUsuario;\n }", "public function getUsuario_idUsuario(){\n return $this->Usuario_idUsuario;\n }", "public function getUsuario_idUsuario(){\n return $this->Usuario_idUsuario;\n }", "public function getIdUsuario() {\n return $this->id_usuario;\n }", "public function getIdUsuario()\n {\n return $this->id_usuario;\n }", "public function getEstudiante_estudiante_id(){\n return $this->estudiante_estudiante_id;\n }", "public function getId()\n\t{\n\t\treturn (int)$this->id_cliente;\n\t}", "public function getId_estudiante()\n {\n return $this->id_estudiante;\n }", "public function getIdGenero()\n {\n return $this->idGenero;\n }", "public function getIdGenero()\n {\n return $this->idGenero;\n }", "public function getCodPersonaUsuario() {\n return $this->codPersonaUsuario;\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getDocentePkPedido($pkPedido) {\n $query=$this->db\n ->query('SELECT FROM reservas as r,docentes s WHERE');\n \n return $query->row();\n }", "public function getId_cliente()\n {\n return $this->id_cliente;\n }", "function DameIdProximoOrgano()\r\n {\r\n return $this->modelorgano->buscaridproximo();\r\n\r\n }", "public function getCandidatoPrincipaleId()\n {\n return $this->candidato_principale_id;\n }", "public function getIdUsuario() {\n return $this->idUsuario;\n }", "function get_proyecto()\n\t{\n\t\tif (!isset($this->proyecto_id)) {\n\t\t\tthrow new toba_error('Punto de montaje: el punto de montaje\n\t\t\t\t\t\t\t\t no tiene un proyecto válido');\n\t\t}\n\t\treturn $this->proyecto_id;\n\t}", "public function getIdCompra()\n {\n $this->delete->truncar(\"tb_precio_compra_temporal\");\n $idUser = $this->session->userdata('idUser');\n // // obtener el ultimo id de ventas del mismo usuario\n $maxIdVentas = $this->consultas->getMaxIdVentasByUser($idUser);\n $dataVenta = array(\n 'idUsuario' => $idUser,\n );\n if($maxIdVentas!=0)\n {\n if($maxIdVentas['Total']<=0)\n {\n $this->delete->delMovimientosFallidos($maxIdVentas['id']);\n }\n if($maxIdVentas['Total']<=0)\n {\n return $maxIdVentas['id'];\n }\n else{\n $idVenta = $this->insertar->newVenta($dataVenta);\n return $idVenta;\n }\n }\n // asignar nueva venta a este usuario\n $idVenta = $this->insertar->newVenta($dataVenta);\n }", "public function getId_usuario()\n {\n return $this->id_usuario;\n }", "public function GetId_vehiculo()\n\t{\n\t\treturn $this->Id_vehiculo;\n\t}", "public function getDIERECCION_TIENDA(){\n return $this->DIERECCION_TIENDA;\n }", "public function getIdcorrecao()\n {\n return $this->idcorrecao;\n }", "public function getIdUtilisateur()\n\t {\n\t return $this->idUtilisateur;\n\t }", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function getId()\n {\n return $this->response['sub'] ?: null;\n }", "public function getPkClienteUsuario() {\n\t\treturn $this->pkClienteUsuario;\n\t}", "public function getIdEntreprise()\n {\n return $this->idEntreprise;\n }" ]
[ "0.7322086", "0.6471894", "0.64057714", "0.6307427", "0.62978894", "0.62460184", "0.62283766", "0.6227694", "0.61430484", "0.61257696", "0.6098401", "0.6043181", "0.60257", "0.5999434", "0.59783053", "0.5971451", "0.59392667", "0.5936872", "0.5914631", "0.5903064", "0.58931804", "0.5881955", "0.58644956", "0.58579445", "0.5857495", "0.5837239", "0.5835942", "0.5826742", "0.5826742", "0.5822272", "0.582147", "0.5819979", "0.5808539", "0.58073336", "0.58043003", "0.579866", "0.5794966", "0.5791107", "0.5789167", "0.57823503", "0.5774221", "0.576713", "0.57614285", "0.57614285", "0.5750693", "0.5750693", "0.5750693", "0.5750693", "0.57487905", "0.5740754", "0.5740217", "0.5738354", "0.57378256", "0.5737484", "0.57371527", "0.5728083", "0.572743", "0.5715697", "0.5714466", "0.5691433", "0.5688599", "0.5687881", "0.56827", "0.56818545", "0.56816244", "0.56816244", "0.56816244", "0.56812894", "0.5681168", "0.5674341", "0.5673851", "0.5673851", "0.5673851", "0.5673574", "0.5669636", "0.56688404", "0.5668746", "0.566711", "0.5663819", "0.5663819", "0.5663026", "0.5662637", "0.5662637", "0.5662637", "0.5662571", "0.56577384", "0.56571776", "0.5654417", "0.5650224", "0.56484234", "0.5645001", "0.56403846", "0.5630697", "0.5630075", "0.56291103", "0.5619464", "0.5614373", "0.5606327", "0.56001157", "0.55980116" ]
0.86926556
0
Get the value of docenciatecnicosuperiorcodigo
Получить значение docenciatecnicosuperiorcodigo
public function getDocenciatecnicosuperiorcodigo() { return $this->docenciatecnicosuperiorcodigo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function getComunicazioneCodice()\n {\n return $this->comunicazione_codice;\n }", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "function consultarInfo($codigo){\n log_message('DEBUG','#TRAZA|TRAZ-PROD-TRAZASOFT|NOCONSUMIBLES $codigo >> '.json_encode($codigo));\n\t\t\t\t$empr_id = empresa();\n\t\t\t\t$codigo = urlencode($codigo);\n\t\t\t\t$url = REST_PRD_NOCON.'/noConsumible/porCodigo/'.$codigo.'/porEmpresa/'.$empr_id;\n\n\t\t\t\t$aux = $this->rest->callAPI(\"GET\",$url);\n $aux =json_decode($aux[\"data\"]);\n return $aux->noConsumible;\n }", "public function getRicerca() {\n if (isset($_REQUEST['ricerca'])) {\n return $_REQUEST['ricerca'];\n } else\n return 0;\n }", "public function getDocente(){\n return $this->docente;\n }", "public function getCodigo(){\n\t\treturn $this->comentariocod;\n\t}", "function getCodice_prodotto() {\r\n return $this->codice_prodotto;\r\n }", "public function getCodigo(){\n\t\treturn $this->agendacod;\n\t}", "function getCodPro() {\n return $this->codPro;\n }", "public function getCodigo() {\n \n return $this->iCodigo;\n }", "public function getLicencia()\r\n\t\t{\r\n\t\t\treturn $this->_nro_licencia;\r\n\t\t}", "public function getDOCUMENT_PRODUCT_COD()\n {\n return $this->DOCUMENT_PRODUCT_COD;\n }", "function getDocumento(){ return $this->documento; }", "public function getDoc_entrega()\r\r\n {\r\r\n return $this->doc_entrega;\r\r\n }", "public function getDataCriado()\n {\n return $this->data_criado;\n }", "public function contractorLicence()\n {\n $doc = CompanyDoc::where('category_id', 7)->where('for_company_id', $this->id)->where('status', '1')->first();\n return ($doc && $doc->ref_no) ? $doc->ref_no : '';\n }", "public function getCodiRecinte() {\n\t\treturn $this->codiRecinte;\n\t}", "public function getNombreDocumento(){\n return $this->nombreDocumento;\n }", "public function getCodigo() {\n return $this -> codigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function get_pruebas_generica_codigo() {\n return $this->pruebas_generica_codigo;\n }", "public function getCodigo () {\n\t\treturn $this->codigo;\n\t}", "function get_codigo()\n\t{\n\t\treturn parent::getCode(false, true);\n\t}", "public function getCodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getNro_doc_madre()\r\n\t{\r\n\t\treturn($this->nro_doc_madre);\r\n\t}", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCarnet_supervigilancia_idcarne(){\n return $this->carnet_supervigilancia_idcarne;\n }", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "public function getCodigo(){\n\t\treturn $this->catcod;\n\t}", "public function getCodigo()\n\t{\n\t\treturn $this->codigo;\n\t}", "public function determinarNroLicencia()\r\n\t\t{\r\n\t\t\t$this->_nro_licencia = '';\r\n\t\t\t$findModel = self::getLicenciaModel();\r\n\t\t\tif ( ContribuyenteBase::getTipoNaturalezaDescripcionSegunID($this->_id_contribuyente) == 'JURIDICO' ) {\r\n\t\t\t\t$contribuyente = ContribuyenteBase::findOne($this->_id_contribuyente);\r\n\r\n\t\t\t\t$this->_nro_licencia = $contribuyente->id_sim;\r\n\t\t\t\t// if ( strlen(trim($nro)) > 1 ) {\r\n\t\t\t\t// \t$this->_nro_licencia = $nro;\r\n\t\t\t\t// }\r\n\t\t\t}\r\n\t\t}", "public function getRutaDocumento(){\n return $this->rutaDocumento;\n }", "public function getPsicofisico(){\n return $this->psicofisico;\n }", "public function getCodigoContrato() {\n\n $oDaoEmpenhoContrato = db_utils::getDao(\"empempenhocontrato\");\n $sSqlContrato = $oDaoEmpenhoContrato->sql_query_file(null,\n \"e100_acordo\",\n null,\n \"e100_numemp = {$this->getNumero()}\"\n );\n\n $rsContrato = $oDaoEmpenhoContrato->sql_record($sSqlContrato);\n if ($oDaoEmpenhoContrato->numrows > 0) {\n return db_utils::fieldsMemory($rsContrato, 0)->e100_acordo;\n }\n }", "function obtenerCodigo(){\r\n\t\treturn $codigoEmpleado;\r\n\t}", "public function getIdConvenio()\n {\n return $this->idConvenio;\n }", "public function getApellido_benef_otro()\r\n\t{\r\n\t\treturn($this->apellido_benef_otro);\r\n\t}", "function get_sgd_pnufe_codi() {\n\treturn $this->sgd_pnufe_codi;\n}", "public function getCoPessoa()\n {\n return $this->co_pessoa;\n }", "public function getCobrodomicilio(){\r\n\treturn $this->cobrodomicilio;\r\n}", "public function getProyectoCodProy() {\n return $this->proyectoCodProy;\n }", "public function getNro_doc_padre()\r\n\t{\r\n\t\treturn($this->nro_doc_padre);\r\n\t}", "public function getRangoQuiebre() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_quiebre');\n\n\t\t$query = $query->getArrayResult();\n\t\t\n\t\tif(isset($query[0])) $this->rangoquiebre = intval($query[0]['valor']);\n\t\telse $this->rangoquiebre = 0;\n\n\t\treturn $this->rangoquiebre;\n }", "public function getCodigo() {\n return $this->iCodigoMunicipio;\n }", "public function getCodigo()\n {\n return $this->Codigo;\n }", "public function getParroquiascodigo()\n {\n return $this->parroquiascodigo;\n }", "public function getDocumento()\r\n {\r\n return $this->Documento;\r\n }", "function DameIdProximoCatOcup()\r\n {\r\n return $this->modelcatocup->buscaridproximo();\r\n\r\n }", "public function getCni()\n {\n return $this->cni;\n }", "public function getCodiSalo($value)\r\n {\r\n return $this->codi_salo;\r\n }", "static function getCodiceCatasto($provincia,$comune) {\n\t\trequire('config.inc.php');\n\t\t$col = \"$dbms:host=\".$config[$dbms]['host'].\";dbname=\".$config[$dbms]['database'];\n\t\t$db = new PDO($col, $config[$dbms]['user'], $config[$dbms]['password']);\n\t\t$sql = \"SELECT codice FROM codici WHERE provincia = '$provincia' and comune = '$comune'\";\n\t\t$interrogazione = $db->prepare($sql);\n\t\t$interrogazione->execute();\n\t\t$risultato = $interrogazione->fetchColumn();\n\t\tunset($db);\n\t\tif (isset($risultato)) {\n\t\t\treturn $risultato;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getDocumento()\n {\n return $this->documento;\n }", "public function getDocumento()\n {\n return $this->documento;\n }", "function DameIdProximoSbCate()\r\n {\r\n return $this->modelsubcate->buscaridproximo();\r\n\r\n }", "public function getCarrera( ){\n\t\treturn $this->carrera;\n\t}", "public function getlineadeDocumentoC() {\n $ar = array();\n $value = new \\Area4\\ContableBundle\\Entity\\lineadeDocumento();\n foreach ($this->lineadeDocumento as $value) {\n if ($value->getCantidad() > 0) {\n $ar[] = $value;\n }\n }\n return $ar;\n }", "function DameIdProximoCatCvil()\r\n {\r\n return $this->modelcatcvil->buscaridproximo();\r\n\r\n }", "function sgd_doc_secuencia2() {\n\n\tif ($this->sgd_doc_secuencia)\n\t\treturn $this->sgd_doc_secuencia;\n\telse\n\t\treturn (\"null\");\n\n}", "function getCodReq() {\n return $this->codReq;\n }", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function getCarrera( ){\n\t\treturn $this->carrera;\n\t}", "public function getCarrera( ){\n\t\treturn $this->carrera;\n\t}", "public function getLicenciaConducir() {\n return $this->LicenciaConducir;\n }", "public function getIdDocumento(){\n return $this->idDocumento;\n }", "public function ConsultaCicloUnico($cod){\n $resultado = $this->bd->query(\"SELECT * FROM snp_cicl WHERE CIC_CODI = $cod\");\n return $resultado;\n\n }", "function getContingencia(){\r\n return $this->contingencia;\r\n }", "public function getFinanciamientobecadocentescodigo()\n\t{\n\t\treturn $this->financiamientobecadocentescodigo;\n\t}", "public function getNro_doc_tutor()\r\n\t{\r\n\t\treturn($this->nro_doc_tutor);\r\n\t}", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getCuie() {\n return $this->cuie;\n }", "public function getValorCodigo() {\n return $this->valorCodigo;\n }" ]
[ "0.7995349", "0.7896575", "0.75334233", "0.72918797", "0.71138304", "0.68551964", "0.66142666", "0.65074086", "0.6358993", "0.63467723", "0.6340258", "0.62530994", "0.62530994", "0.62427163", "0.6230801", "0.6218532", "0.61867046", "0.61760676", "0.6166761", "0.61629367", "0.6148204", "0.61384434", "0.6119146", "0.6109125", "0.6102019", "0.6072344", "0.605012", "0.6047307", "0.6040864", "0.60051334", "0.6003544", "0.6001622", "0.5993719", "0.59824526", "0.59824526", "0.59745073", "0.59745073", "0.59745073", "0.59745073", "0.59745073", "0.59745073", "0.59745073", "0.59745073", "0.59745073", "0.5970417", "0.5962168", "0.59558934", "0.5928241", "0.59259397", "0.59225774", "0.59225774", "0.59225774", "0.59225774", "0.59225774", "0.59225774", "0.5921364", "0.59153116", "0.5907629", "0.59057385", "0.5887555", "0.58682495", "0.58671385", "0.5866314", "0.5853241", "0.58516693", "0.5850368", "0.5849667", "0.5841872", "0.58372986", "0.58321625", "0.5830321", "0.5828421", "0.5815971", "0.57977724", "0.5797385", "0.5794787", "0.5792823", "0.5770983", "0.5756317", "0.5755627", "0.5743232", "0.5743232", "0.57418275", "0.57239306", "0.5717861", "0.5716435", "0.5713724", "0.5708492", "0.5704255", "0.5703715", "0.5703715", "0.5700975", "0.5699996", "0.56982225", "0.569266", "0.5689964", "0.568941", "0.5684926", "0.5682537", "0.56751835" ]
0.8590021
0
Set the value of docenciatecnicosuperiorcodigo
Установите значение docenciatecnicosuperiorcodigo
public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo) { $this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function setCobrodomicilio($p_cobrodomicilio){\r\n\t$this->cobrodomicilio=$p_cobrodomicilio;\r\n}", "private function setCodigoCidadao($iCodigoCidadao) {\n \n $this->iCodigoCidadao = $iCodigoCidadao;\n }", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "public function carga_cliente_manual_controlador($codigo_cliente, $cedula, $nombre, $direccion, $telefono, $pais, $webpage, $cumple, $email, $vendedor, $precio){\r\n\r\n $tipo_documento = \"Cedula\";\r\n $numero_documento= $cedula;\r\n\t\t\t$cliente_tipo= \"Personal\";\r\n\t\t\t$metodo_pago=\"Efectivo\";\r\n\r\n\t\t\tif($tipo_documento == null || $tipo_documento == \"\"){\r\n\t\t\t\t$tipo_documento = \"Cedula\";\r\n\t\t\t}\r\n\r\n\t\t\tif($pais == null || $pais == \"\"){\r\n\t\t\t\t$pais = \"PANAMA\";\r\n\t\t\t}\r\n\r\n\t\t\t$precio_valor = \"2.50\";\r\n\t\t\tif($precio == \"1 Precio Platinum\"){\r\n\t\t\t\t$precio_valor = \"2.35\";\r\n\t\t\t}\r\n\t\t\telseif ($precio == \"2 Precio de Gold\"){\r\n\t\t\t\t$precio_valor = \"2.40\";\r\n\t\t\t}\r\n\t\t\t/*== Buscando el nombre del vendedor ==*/\r\n\t\t\tif(isset($vendedor) || $vendedor != \"\" || $vendedor != null){\r\n\t\t\t\t$check_usuario=mainModel::ejecutar_consulta_simple(\"SELECT ifnull(usuario_nombre, 'Sin vendedor') as usuario_nombre FROM usuario WHERE usuario_id=$vendedor\");\r\n\t\t\t\t$usuario=$check_usuario->fetch();\r\n\t\t\t\t$usuario_nombre = $usuario['usuario_nombre'];\r\n\r\n\t\t\t\t$check_usuario->closeCursor();\r\n\t\t\t\t$check_usuario=mainModel::desconectar($check_usuario);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$vendedor = \"\";\r\n\t\t\t\t$usuario_nombre = \"\";\r\n\t\t\t}\r\n \r\n /*== Preparando datos para enviarlos al modelo ==*/\r\n\t\t\t$datos_cliente_reg=[\r\n \t\"cliente_codigo\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Codigo\",\r\n\t\t\t\t\t\"campo_valor\"=>$codigo_cliente\r\n ],\r\n\t\t\t\t\"cliente_tipo_documento\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Tipo\",\r\n\t\t\t\t\t\"campo_valor\"=>$tipo_documento\r\n ],\r\n \"cliente_numero_documento\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Numero\",\r\n\t\t\t\t\t\"campo_valor\"=>$numero_documento\r\n ],\r\n \"cliente_nombre\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Nombre\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($nombre)\r\n ],\r\n \"cliente_estado\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Pais\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($pais)\r\n ],\r\n \"cliente_direccion\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Direccion\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($direccion)\r\n ],\r\n \"cliente_cordenada\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Coordenada\",\r\n\t\t\t\t\t\"campo_valor\"=>\"\"\r\n ],\r\n \"cliente_telefono\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Telefono\",\r\n\t\t\t\t\t\"campo_valor\"=>$telefono\r\n ],\r\n \"cliente_email\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Email\",\r\n\t\t\t\t\t\"campo_valor\"=>$email\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_tipo\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":TipoCliente\",\r\n\t\t\t\t\t\"campo_valor\"=>$cliente_tipo\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_sitioweb\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Webpage\",\r\n\t\t\t\t\t\"campo_valor\"=>$webpage\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_vendedor_id\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":VendedorId\",\r\n\t\t\t\t\t\"campo_valor\"=>$vendedor\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_vendedor_nombre\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":VendedorNombre\",\r\n\t\t\t\t\t\"campo_valor\"=>$usuario_nombre\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_metodo_pago\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":MetodoPago\",\r\n\t\t\t\t\t\"campo_valor\"=>$metodo_pago\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_precio\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Precio\",\r\n\t\t\t\t\t\"campo_valor\"=>$precio_valor\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_cumpleaños\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Cumpleano\",\r\n\t\t\t\t\t\"campo_valor\"=>$cumple\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_ruta\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Ruta\",\r\n\t\t\t\t\t\"campo_valor\"=>\"\"\r\n\t\t\t\t]\r\n ];\r\n\r\n $agregar_cliente=mainModel::guardar_datos(\"cliente\",$datos_cliente_reg);\r\n\t\t\tif($agregar_cliente->rowCount()==0){\r\n\t\t\t\t$alerta=[\r\n\t\t\t\t\t\"Alerta\"=>\"simple\",\r\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\r\n\t\t\t\t\t\"Texto\"=>\"No hemos podido registrar el cliente, por favor intente nuevamente \".$codigo_cliente,\r\n\t\t\t\t\t\"Datos\"=>\"tipo_documento: \".$tipo_documento.\" numero_documento: \".$numero_documento.\" nombre: \".$nombre.\" pais: \".$pais.\" direccion: \".$direccion.\" telefono: \".$telefono.\" email: \".$email.\" cliente_tipo\".$cliente_tipo.\" vendedor: \".$vendedor.\" usuario_nombre: \".$usuario_nombre.\" precio_valor: \".$precio_valor.\" cumple: \".$cumple,\r\n\t\t\t\t\t\"Tipo\"=>\"error\"\r\n\t\t\t\t];\r\n\t\t\t\techo json_encode($alerta);\r\n\t\t\t}\r\n\r\n\t\t\t$agregar_cliente->closeCursor();\r\n\t\t\t$agregar_cliente=mainModel::desconectar($agregar_cliente);\r\n }", "public function setCodiCont($value)\n {\n //validando de que el valor sea un id\n if ($this->validateId($value)) {\n //seteando valor a la variable codigo\n $this->codi_cont = $value;\n //retornar true\n return true;\n } else {\n //retornar respuesta falso\n return false;\n }\n }", "public function setNumero_doc($numero_doc)\r\n\t{\r\n\t\t$this->numero_doc = $numero_doc;\r\n\t}", "function set_codigo($codigo)\n\t{\n\t\t$this->display_value = $codigo;\n\t}", "public function setCodigo ($codigo) {\n\t\t$this->codigo = $codigo;\n\t}", "public function setCodiSalo($value)\r\n {\r\n //validando de que el valor sea un id\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_salo = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "public function setCodiCasa($value)\r\n {\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_casa = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "public function setCodigo($codigo)\n\t{\n\t\t$this->codigo = $codigo;\n\t}", "public function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }", "function setCodUsuario($codUsuario) {\r\n $this->codUsuario = $codUsuario;\r\n }", "public function setDocente($docente){\n $this->docente = $docente;\n }", "function modificarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_documento_categoria_clasificacion','id_documento_categoria_clasificacion','int4');\n\t\t$this->setParametro('id_categoria','id_categoria','int4');\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('documento','documento','varchar');\n\t\t$this->setParametro('presentar_legal','presentar_legal','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function modificarDocConcepto(){\n\t\t$this->procedimiento='conta.ft_doc_concepto_ime';\n\t\t$this->transaccion='CONTA_DOCC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_doc_concepto','id_doc_concepto','int4');\n\t\t$this->setParametro('id_doc_compra_venta','id_doc_compra_venta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_orden_trabajo','id_orden_trabajo','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad_sol','numeric');\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('precio_total_final','precio_total_final','numeric');\n\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 setCodigo($codigo)\n {\n $this->codigo = $codigo;\n }", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function setCodigo( $iCodigo ) {\n\t\t$this->iCodigo = $iCodigo;\n\t}", "function imprimirRusiaChina($idCert,$idPais,$tresIdiomas,$esConsumoAnimal,$esMuestra){\n\t//Traer los datos para completar el modelo \n\t$datos = certificadosRetornaDatosParaImprimir($idCert);\n\n\t//creamos codigo de barra\n\t$codeBar = \"../classes/barcode/SAN\".$_SESSION['id_usuario'].\"-\".$datos['NumCert'].\".gif\";\n\t$anio = $datos['AñoAutorizacion'];\n\t$idCode = zerofill($datos['NumCert'], 8);\n\t$code = \"SAN\".$anio.$idCode;\t//lo usa sample-gd\n\trequire(\"../classes/barcode/sample-gd.php\");\n\t$codeBar = str_replace('..','',$codeBar);\n\t\n\tif ($idPais == 130){\n\t\t//CHINA 130\n\t\t$nombreArchivo = \"CHINA\";\n\t\t$nombreCSS = \"chinese.css\";\n\t\t//sale $codigo = \"...\";\n\t\trequire(\"../archivosPDF/chinaPDF.php\");\n\t}else{\n\t\t//RUSIA 133\n\t\t$nombreArchivo = \"RUSIA\";\n\t\t$nombreCSS = \"cyrillic.css\";\n\t\t//sale $codigo = \"...\";\n\t\trequire(\"../archivosPDF/rusiaPDF.php\");\n\t}\t\n\t\n\tforeach($datos as $key => $value){\t\t\n\t\t$codigo = str_replace(utf8_encode(\"#\".$key.\"#\"), utf8_encode($value), $codigo);\n\t}\n\t\n\t//marca de agua\n\t$retCircuito = admNoHayCircuitoAbierto($idCert ,'CERTIFICADOS');\n\tif (($retCircuito == 0) || (($datos['NumCert'] == 0) || ($_SESSION['tipo_acceso'] == 2))){\n\t\t$_SESSION['marcaAgua'] = true;\n\t}else{\n\t\t$_SESSION['marcaAgua'] = false;\t\t\n\t}\n\t\n\tif ($datos['NumeroCertR'] != 0){\n\t\t//#NumeroCertR#\n\t\t$codigo = str_replace(\"#NumeroCertR#\", $datos['NumeroCertR'], $codigo);\n\t\t//#FechaCertificadoR#\n\t\t$codigo = str_replace(\"#FechaCertificadoR#\", $datos['FechaCertificadoR'], $codigo);\n\t}\t\n\t\n\t//Traer leyendas\n\t$leyendas = certificadosRetornaTraduccionesImpresion();\t\t\n\tforeach ($leyendas as $each){\n\t\tif (($datos['NumeroCertR'] == 0) && (stristr($each['Rotulo'], 'ANULA'))){\n\t\t\t$codigo = str_replace(utf8_encode(\"#\".$each['Rotulo'].\"#\"), \"\", $codigo);\t\t\t\t\n\t\t}else{\n\t\t\t$codigo = str_replace(utf8_encode(\"#\".$each['Rotulo'].\"#\"), utf8_encode($each['Traduccion']), $codigo);\t\t\t\t\n\t\t}\n\t}\t\n\t\n\t$codigoListo = cargarCodigoHTML($codigo,$nombreCSS);\n\texportarAPDFOficio($codigoListo, $nombreArchivo ,$codeBar, traerCuve($idCert,'CERTIFICADOS'));\n\texit();\n}", "public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior)\n\t{\n\t\t$this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior;\n\n\t\treturn $this;\n\t}", "public function setCodigo($iCodigo) {\n\t\t$this->iCodigo = $iCodigo;\n\t}", "public function setCodiRecinte($codiRecinte) {\n\t\t$this->codiRecinte=$codiRecinte;\n\t}", "public function setCodigoReduzido($iCodigoReduzido) {\n \t$this->iCodigoReduzido = $iCodigoReduzido;\n }", "public function setTelefono($p_telefono){\r\n\t$this->telefono=$p_telefono;\r\n}", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "protected function setDocumentosCidadao($oLinha) {\n\n if ($oLinha->num_identidade_pessoa == '') {\n $oLinha->num_identidade_pessoa = '0';\n }\n if (trim($oLinha->num_cpf_pessoa) == '') {\n $oLinha->num_cpf_pessoa = '00000000000';\n }\n $this->oCidadao->setIdentidade($oLinha->num_identidade_pessoa);\n $this->oCidadao->setCpfCnpj($oLinha->num_cpf_pessoa);\n }", "public function set_codigo ($codigo)\n\t{\n\n\n \t\t $azar = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n\n \t\t for($i = 1; $i < 8; $i++) \n \t\t { \n\n $codigo .= $azar{rand(0, 35)};\n\n\t\t\t\t\n \t } \n \t $this->codigo=$codigo;\n\t \t}", "public function set_imagenC($valor){\n $this->ImagenC = \"02\".trim($valor);\n }", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function setLlenadoObligatorio($data)\n {\n\n if ($this->_llenadoObligatorio != $data) {\n $this->_logChange('llenadoObligatorio');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_llenadoObligatorio = $data;\n } else if (!is_null($data)) {\n $this->_llenadoObligatorio = (int) $data;\n } else {\n $this->_llenadoObligatorio = $data;\n }\n return $this;\n }", "public function getComunicazioneCodice()\n {\n return $this->comunicazione_codice;\n }", "public function setCadEnderRuaTipo($iCodigoRuaTipo) {\n\n $this->db85_ruastipo = $iCodigoRuaTipo;\n }", "public function determinarNroLicencia()\r\n\t\t{\r\n\t\t\t$this->_nro_licencia = '';\r\n\t\t\t$findModel = self::getLicenciaModel();\r\n\t\t\tif ( ContribuyenteBase::getTipoNaturalezaDescripcionSegunID($this->_id_contribuyente) == 'JURIDICO' ) {\r\n\t\t\t\t$contribuyente = ContribuyenteBase::findOne($this->_id_contribuyente);\r\n\r\n\t\t\t\t$this->_nro_licencia = $contribuyente->id_sim;\r\n\t\t\t\t// if ( strlen(trim($nro)) > 1 ) {\r\n\t\t\t\t// \t$this->_nro_licencia = $nro;\r\n\t\t\t\t// }\r\n\t\t\t}\r\n\t\t}", "public function setCodiTipoUsua($value)\r\n {\r\n //validando de que el valor sea un id\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_tipo_usua = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "function modificarCorreoOficina(){\n\t\t$this->procedimiento='rec.ft_correo_oficina_ime';\n\t\t$this->transaccion='REC_cof_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_correo_oficina','id_correo_oficina','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('id_oficina','id_oficina','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_funcionario','id_funcionario','varchar');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\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 setLicencia($nroLicencia)\r\n\t\t{\r\n\t\t\t$this->_nro_licencia = $nroLicencia;\r\n\t\t}", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "public function setCodigoCalle($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_codigoCalle != $data) {\n $this->_logChange('codigoCalle');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_codigoCalle = $data;\n } else if (!is_null($data)) {\n $this->_codigoCalle = (int) $data;\n } else {\n $this->_codigoCalle = $data;\n }\n return $this;\n }", "public function setCantidadCocina($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->cantidad_cocina !== $v) {\n $this->cantidad_cocina = $v;\n $this->modifiedColumns[] = RequerimientoPeer::CANTIDAD_COCINA;\n }\n\n\n return $this;\n }", "function setNumeroDeRecibo($codigo_de_recibo, $inicializar = false, $arrInicial = false){\n\t\tif($codigo_de_recibo != $this->mCodigoDeRecibo){ $this->mMessages\t.= \"OK\\tSe Inicializa el Recibo Num $codigo_de_recibo. Antes \" . $this->mCodigoDeRecibo . \"\\r\\n\"; }\n\t\t$this->mCodigoDeRecibo\t= $codigo_de_recibo;\n\t\tif ( $inicializar == true ){ $this->init(); }\n\t}", "public function setCodiInteContEtiq($value)\n {\n //validando de que el valor sea un id\n if ($this->validateId($value)) {\n //seteando valor a la variable codigo\n $this->codi_inte_cont_etiq = $value;\n //retornar true\n return true;\n } else {\n //retornar respuesta falso\n return false;\n }\n }", "public function SetNumerodaConta($valor){\n\t\t $this->numerodaConta= $valor;\n\t }", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public function set_taplicacion_codigo(string $taplicacion_codigo) : void {\n $this->taplicacion_codigo = $taplicacion_codigo;\n $this->setId($taplicacion_codigo);\n }", "public function setIdDocumento($idDocumento){\n $this->idDocumento = $idDocumento;\n }", "public function setValorCalculado($nValorCalculado) {\n $this->nValorCalculado = $nValorCalculado;\n }", "public function setIdcliente($p_idcliente){\r\n\t$this->idcliente=$p_idcliente;\r\n}", "function uploadCertification($doc){\n\t\t//category nya di set di term(certification) dan taxonomy(document_type)\n\t}", "public function setCodigo($pcod) {\n\t\t\t\t$this->codSala = $pcod;\n\t\t\t}", "function conf__cuadro(toba_ei_cuadro $cuadro) {\n $cuadro->desactivar_modo_clave_segura();//para que no muestre la posición de la fila en el cuadro al volver del popUp\n if (!is_null($this->s__where)) {\n $datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre($this->s__where);\n $cuadro->set_datos($datos);\n } else {\n //no se hace nada para que el cuadro que no tenga datos de entrada (no carga todos los datos al inicio)\n //para evitar cargar todos los alumnos al comienzo\n //$datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre();\n }\n \n }", "public function setCantidadOficina($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->cantidad_oficina !== $v) {\n $this->cantidad_oficina = $v;\n $this->modifiedColumns[] = RequerimientoPeer::CANTIDAD_OFICINA;\n }\n\n\n return $this;\n }", "public function setCedula($cedula)\n{\n$this->cedula = $cedula;\n\nreturn $this;\n}", "public function setColeccionPropio($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->coleccion_propio !== $v || $this->isNew()) {\n\t\t\t$this->coleccion_propio = $v;\n\t\t\t$this->modifiedColumns[] = AlpzaMiembroAnexoPeer::COLECCION_PROPIO;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setIdprovincia($p_idprovincia){\r\n\t$this->idprovincia=$p_idprovincia;\r\n}", "public function getCarnet_supervigilancia_idcarne(){\n return $this->carnet_supervigilancia_idcarne;\n }", "function setSumaDeRecibo($monto = 0){ \t$this->mSumaDeRecibo = $monto;\t}", "public function setCnpj($Novo_Cnpj){\r\n\t\t\t\t$this->cnpj = $Novo_Cnpj;\r\n\t\t\t}", "public function _setDataCarrera($data_carrera)\n {\n $this->data_carrera = $data_carrera;\n }", "function Setceldas($cc)\n{\n \n $this->celdas=$cc;\n}", "public function setCoeficienteEntornoContribuyente($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_coeficienteEntornoContribuyente != $data) {\n $this->_logChange('coeficienteEntornoContribuyente');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_coeficienteEntornoContribuyente = $data;\n } else if (!is_null($data)) {\n $this->_coeficienteEntornoContribuyente = (string) $data;\n } else {\n $this->_coeficienteEntornoContribuyente = $data;\n }\n return $this;\n }", "public function validateDocument() {\r\n $numero = $this->cedula;\r\n if (strlen($numero) == '10') {\r\n $suma = 0;\r\n $residuo = 0;\r\n $pri = 0;\r\n $pub = 0;\r\n $nat = 0;\r\n $numeroProvincias = 22;\r\n $modulo = 11;\r\n /* Aqui almacenamos los digitos de la cedula en variables. */\r\n $d1 = substr($numero, 0, 1);\r\n $d2 = substr($numero, 1, 1);\r\n $d3 = substr($numero, 2, 1);\r\n $d4 = substr($numero, 3, 1);\r\n $d5 = substr($numero, 4, 1);\r\n $d6 = substr($numero, 5, 1);\r\n $d7 = substr($numero, 6, 1);\r\n $d8 = substr($numero, 7, 1);\r\n $d9 = substr($numero, 8, 1);\r\n $d10 = substr($numero, 9, 1);\r\n /* El tercer digito es: */\r\n /* 9 para sociedades privadas y extranjeros */\r\n /* 6 para sociedades publicas */\r\n /* menor que 6 (0,1,2,3,4,5) para personas naturales */\r\n if ($d3 == 7 || $d3 == 8) {\r\n //echo\"El tercer d&iacute;gito ingresado es inv&aacute;lido\";\r\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n /* Solo para personas naturales (modulo 10) */\r\n if ($d3 < 6) {\r\n $nat = 1;\r\n $p1 = $d1 * 2;\r\n if ($p1 >= 10)\r\n $p1 -= 9;\r\n $p2 = $d2 * 1;\r\n if ($p2 >= 10)\r\n $p2 -= 9;\r\n $p3 = $d3 * 2;\r\n if ($p3 >= 10)\r\n $p3 -= 9;\r\n $p4 = $d4 * 1;\r\n if ($p4 >= 10)\r\n $p4 -= 9;\r\n $p5 = $d5 * 2;\r\n if ($p5 >= 10)\r\n $p5 -= 9;\r\n $p6 = $d6 * 1;\r\n if ($p6 >= 10)\r\n $p6 -= 9;\r\n $p7 = $d7 * 2;\r\n if ($p7 >= 10)\r\n $p7 -= 9;\r\n $p8 = $d8 * 1;\r\n if ($p8 >= 10)\r\n $p8 -= 9;\r\n $p9 = $d9 * 2;\r\n if ($p9 >= 10)\r\n $p9 -= 9;\r\n $modulo = 10;\r\n }\r\n /* Solo para sociedades publicas (modulo 11) */\r\n /* Aqui el digito verficador esta en la posicion 9, en las otras 2 en la pos. 10 */\r\n else if ($d3 == 6) {\r\n $pub = 1;\r\n $p1 = $d1 * 3;\r\n $p2 = $d2 * 2;\r\n $p3 = $d3 * 7;\r\n $p4 = $d4 * 6;\r\n $p5 = $d5 * 5;\r\n $p6 = $d6 * 4;\r\n $p7 = $d7 * 3;\r\n $p8 = $d8 * 2;\r\n $p9 = 0;\r\n }\r\n /* Solo para entidades privadas (modulo 11) */ else if ($d3 == 9) {\r\n $pri = 1;\r\n $p1 = $d1 * 4;\r\n $p2 = $d2 * 3;\r\n $p3 = $d3 * 2;\r\n $p4 = $d4 * 7;\r\n $p5 = $d5 * 6;\r\n $p6 = $d6 * 5;\r\n $p7 = $d7 * 4;\r\n $p8 = $d8 * 3;\r\n $p9 = $d9 * 2;\r\n }\r\n $suma = $p1 + $p2 + $p3 + $p4 + $p5 + $p6 + $p7 + $p8 + $p9;\r\n $residuo = $suma % $modulo;\r\n /* Si residuo=0, dig.ver.=0, caso contrario 10 - residuo */\r\n $digitoVerificador = $residuo == 0 ? 0 : $modulo - $residuo;\r\n /* ahora comparamos el elemento de la posicion 10 con el dig. ver. */\r\n if ($pub == 1) {\r\n if ($digitoVerificador != $d9) {\r\n //echo\"El ruc de la empresa del sector p&uacute;blico es incorrecto.\";\r\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n /* El ruc de las empresas del sector publico terminan con 0001 */\r\n if (substr($numero, 9, 4) != '0001') {\r\n //echo \"El ruc de la empresa del sector p&uacute;blico debe terminar con 0001\";\r\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n } elseif ($pri == 1) {\r\n if ($digitoVerificador != $d10) {\r\n //echo\"El ruc de la empresa del sector privado es incorrecto.\";\r\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n if (substr($numero, 10, 3) != '001') {\r\n //echo\"El ruc de la empresa del sector privado debe terminar con 001\";\r\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n } elseif ($nat == 1) {\r\n if ($digitoVerificador != $d10) {\r\n //echo\"El n&uacute;mero de c&eacute;dula de la persona natural es incorrecto.\";\r\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n if (strlen($numero) > 10 && substr($numero, 10, 3) != '001') {\r\n //echo\"El ruc de la persona natural debe terminar con 001\";\r\n $this->addError('cedula', 'Ingresa correctamente el Número de Cédula');\r\n return 0;\r\n }\r\n }\r\n } else {\r\n $this->addError('cedula', 'El número ingresado no tiene 10 dígitos');\r\n return 0;\r\n }\r\n return 1;\r\n }", "public function setConta($valor) {\n\t\t$this->conta = $valor;\n\t}", "public function setIradokizunBerria($data)\n {\n\n if ($this->_iradokizunBerria != $data) {\n $this->_logChange('iradokizunBerria');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_iradokizunBerria = $data;\n\n } else if (!is_null($data)) {\n $this->_iradokizunBerria = (int) $data;\n\n } else {\n $this->_iradokizunBerria = $data;\n }\n return $this;\n }", "function dibujaCuadrosIguales($pdf,$objt,$cuadros,$estiloCell,$ancho=186){\n\t\t$objetos=array('pdf','objt');\n\t\tforeach($objetos as $objT){\n\t\t\t//\t\t\t$$objT->setY($this->limite);\n\t\t\t$$objT->SetFont('helvetica', $estiloCell[1], $estiloCell[0]);\n\t\t\t\n\t\t\t$tf=$estiloCell[0];\n\t\t\t$ef=$estiloCell[1];\n\t\t\t$h=$estiloCell[3];\n\t\t\t$borde=$estiloCell[4];\n\n\t\t\t$align=$estiloCell[6];\n\t\t\t$fill=$estiloCell[7];\n\t\t\t$str=$estiloCell[8];\n\t\t\t$calign=$estiloCell[9];\n\t\t\t$valign=$estiloCell[10];\n\t\t\t//$$objT->setFont($this->fuenteArreglo,$ef,$tf);\n\t\t\tforeach($cuadros as $cuadro){\n\t\t\t\t$cant=count($cuadro);\n\t\t\t\tif($estiloCell[2]!=0 && $estiloCell[2]<=186){\n\t\t\t\t\t$ancho=$estiloCell[2];\n\t\t\t\t}\n\n\t\t\t\t$w=$ancho/$cant;\n\t\t\t\tforeach($cuadro as $c){\n\t\t\t\t\t$$objT->Cell($w,$h,$c,$borde,0,$align,$fill,'',$str,false,$calign,$valign);\n\n\t\t\t\t}\n\t\t\t\tif($estiloCell[5]==1) $$objT->Ln();\n\t\t\t}\n\t\t}\n\t}", "public function validateDocument() {\n $numero = $this->cedula;\n if (strlen($numero) == '10') {\n $suma = 0;\n $residuo = 0;\n $pri = 0;\n $pub = 0;\n $nat = 0;\n $numeroProvincias = 22;\n $modulo = 11;\n /* Aqui almacenamos los digitos de la cedula en variables. */\n $d1 = substr($numero, 0, 1);\n $d2 = substr($numero, 1, 1);\n $d3 = substr($numero, 2, 1);\n $d4 = substr($numero, 3, 1);\n $d5 = substr($numero, 4, 1);\n $d6 = substr($numero, 5, 1);\n $d7 = substr($numero, 6, 1);\n $d8 = substr($numero, 7, 1);\n $d9 = substr($numero, 8, 1);\n $d10 = substr($numero, 9, 1);\n /* El tercer digito es: */\n /* 9 para sociedades privadas y extranjeros */\n /* 6 para sociedades publicas */\n /* menor que 6 (0,1,2,3,4,5) para personas naturales */\n if ($d3 == 7 || $d3 == 8) {\n //echo\"El tercer d&iacute;gito ingresado es inv&aacute;lido\";\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\n return 0;\n }\n /* Solo para personas naturales (modulo 10) */\n if ($d3 < 6) {\n $nat = 1;\n $p1 = $d1 * 2;\n if ($p1 >= 10)\n $p1 -= 9;\n $p2 = $d2 * 1;\n if ($p2 >= 10)\n $p2 -= 9;\n $p3 = $d3 * 2;\n if ($p3 >= 10)\n $p3 -= 9;\n $p4 = $d4 * 1;\n if ($p4 >= 10)\n $p4 -= 9;\n $p5 = $d5 * 2;\n if ($p5 >= 10)\n $p5 -= 9;\n $p6 = $d6 * 1;\n if ($p6 >= 10)\n $p6 -= 9;\n $p7 = $d7 * 2;\n if ($p7 >= 10)\n $p7 -= 9;\n $p8 = $d8 * 1;\n if ($p8 >= 10)\n $p8 -= 9;\n $p9 = $d9 * 2;\n if ($p9 >= 10)\n $p9 -= 9;\n $modulo = 10;\n }\n /* Solo para sociedades publicas (modulo 11) */\n /* Aqui el digito verficador esta en la posicion 9, en las otras 2 en la pos. 10 */\n else if ($d3 == 6) {\n $pub = 1;\n $p1 = $d1 * 3;\n $p2 = $d2 * 2;\n $p3 = $d3 * 7;\n $p4 = $d4 * 6;\n $p5 = $d5 * 5;\n $p6 = $d6 * 4;\n $p7 = $d7 * 3;\n $p8 = $d8 * 2;\n $p9 = 0;\n }\n /* Solo para entidades privadas (modulo 11) */ else if ($d3 == 9) {\n $pri = 1;\n $p1 = $d1 * 4;\n $p2 = $d2 * 3;\n $p3 = $d3 * 2;\n $p4 = $d4 * 7;\n $p5 = $d5 * 6;\n $p6 = $d6 * 5;\n $p7 = $d7 * 4;\n $p8 = $d8 * 3;\n $p9 = $d9 * 2;\n }\n $suma = $p1 + $p2 + $p3 + $p4 + $p5 + $p6 + $p7 + $p8 + $p9;\n $residuo = $suma % $modulo;\n /* Si residuo=0, dig.ver.=0, caso contrario 10 - residuo */\n $digitoVerificador = $residuo == 0 ? 0 : $modulo - $residuo;\n /* ahora comparamos el elemento de la posicion 10 con el dig. ver. */\n if ($pub == 1) {\n if ($digitoVerificador != $d9) {\n //echo\"El ruc de la empresa del sector p&uacute;blico es incorrecto.\";\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\n return 0;\n }\n /* El ruc de las empresas del sector publico terminan con 0001 */\n if (substr($numero, 9, 4) != '0001') {\n //echo \"El ruc de la empresa del sector p&uacute;blico debe terminar con 0001\";\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\n return 0;\n }\n } elseif ($pri == 1) {\n if ($digitoVerificador != $d10) {\n //echo\"El ruc de la empresa del sector privado es incorrecto.\";\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\n return 0;\n }\n if (substr($numero, 10, 3) != '001') {\n //echo\"El ruc de la empresa del sector privado debe terminar con 001\";\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\n return 0;\n }\n } elseif ($nat == 1) {\n if ($digitoVerificador != $d10) {\n //echo\"El n&uacute;mero de c&eacute;dula de la persona natural es incorrecto.\";\n $this->addError('cedula', 'Ingrese correctamente el Número de Cédula');\n return 0;\n }\n if (strlen($numero) > 10 && substr($numero, 10, 3) != '001') {\n //echo\"El ruc de la persona natural debe terminar con 001\";\n $this->addError('cedula', 'Ingresa correctamente el Número de Cédula');\n return 0;\n }\n }\n } else {\n $this->addError('cedula', 'El número ingresado no tiene 10 dígitos');\n return 0;\n }\n return 1;\n }", "public function setNro_doc_tutor($nro_doc_tutor)\r\n\t{\r\n\t\t$this->nro_doc_tutor = $nro_doc_tutor;\r\n\t}", "public function GuardeDocumentoContable($idComprobante){\n \n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1); \n $DatosGenerales=$this->DevuelveValores(\"documentos_contables_control\",\"ID\",$idComprobante);\n $Consulta=$this->ConsultarTabla(\"documentos_contables_items\", \"WHERE idDocumento=$idComprobante\");\n while($DatosComprobante=$this->FetchArray($Consulta)){\n $Fecha=$DatosComprobante[\"Fecha\"];\n \n $tab=\"librodiario\";\n $NumRegistros=28;\n $CuentaPUC=$DatosComprobante[\"CuentaPUC\"];\n $NombreCuenta=$DatosComprobante[\"NombreCuenta\"];\n $DatosCliente=$this->DevuelveValores(\"proveedores\", \"Num_Identificacion\", $DatosComprobante[\"Tercero\"]);\n if($DatosCliente[\"Num_Identificacion\"]==''){\n $DatosCliente=$this->DevuelveValores(\"clientes\", \"Num_Identificacion\", $DatosComprobante[\"Tercero\"]);\n \n }\n $DatosCentro=$this->DevuelveValores(\"centrocosto\", \"ID\", $DatosComprobante[\"CentroCostos\"]);\n \n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$Fecha;\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=$DatosComprobante[\"Nombre_Documento\"];\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$DatosComprobante[\"Numero_Documento\"];\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosCliente['Tipo_Documento'];\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$DatosCliente['Num_Identificacion'];\n $Columnas[5]=\"Tercero_DV\"; $Valores[5]=$DatosCliente['DV'];\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosCliente['Primer_Apellido'];\n $Columnas[7]=\"Tercero_Segundo_Apellido\"; $Valores[7]=$DatosCliente['Segundo_Apellido'];\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosCliente['Primer_Nombre'];\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosCliente['Otros_Nombres'];\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$DatosCliente['RazonSocial'];\n $Columnas[11]=\"Tercero_Direccion\"; $Valores[11]=$DatosCliente['Direccion'];\n $Columnas[12]=\"Tercero_Cod_Dpto\"; $Valores[12]=$DatosCliente['Cod_Dpto'];\n $Columnas[13]=\"Tercero_Cod_Mcipio\"; $Valores[13]=$DatosCliente['Cod_Mcipio'];\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosCliente['Pais_Domicilio'];\n\n $Columnas[15]=\"CuentaPUC\"; $Valores[15]=$CuentaPUC;\n $Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=$NombreCuenta;\n $Columnas[17]=\"Detalle\"; $Valores[17]=$DatosGenerales[\"Concepto\"];\n $Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$DatosComprobante[\"Debito\"];\n $Columnas[19]=\"Credito\"; $Valores[19]=$DatosComprobante[\"Credito\"];\n $Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Valores[18]-$Valores[19];\n $Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\n $Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\n $Columnas[23]=\"Concepto\"; $Valores[23]=$DatosComprobante[\"Concepto\"];\n $Columnas[24]=\"idCentroCosto\";\t\t$Valores[24]=$DatosComprobante[\"CentroCostos\"];\n $Columnas[25]=\"idEmpresa\"; $Valores[25]=$DatosCentro[\"EmpresaPro\"];\n $Columnas[26]=\"idSucursal\"; $Valores[26]=$DatosSucursal[\"ID\"];\n $Columnas[27]=\"Num_Documento_Externo\"; $Valores[27]=$DatosComprobante[\"NumDocSoporte\"];\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\n \n \n }\n $this->ActualizaRegistro(\"documentos_contables_control\", \"Estado\", \"Cerrado\", \"ID\", $idComprobante);\n }", "public function editar_ocompra($codigo, $tipo_oper = 'C')\n {\n $hoy = date('Y-m-d H:i:s');\n $cadena = strtotime($hoy).substr((string)microtime(), 1, 8);\n $tempSession = str_replace('.','',$cadena);\n $data['tempSession'] = $tempSession;\n if ($tipo_oper == 'C') {\n $data['tipo_docu'] = \"OC\";\n }else{\n $data['tipo_docu'] = \"OV\";\n }\n $data['codigo'] = $codigo;\n /* :::::::::::::::::::::::::::*/\n $data['compania'] = $this->somevar['compania'];\n $this->load->library('layout', 'layout');\n unset($_SESSION['serie']);\n $comp_confi = $this->companiaconfiguracion_model->obtener($this->somevar['compania']);\n $data_compania = $this->compania_model->obtener_compania($this->somevar['compania']);\n $my_empresa = $data_compania[0]->EMPRP_Codigo;\n\n $this->load->model('almacen/almacen_model');\n $this->load->model('maestros/formapago_model');\n $accion = \"\";\n $modo = \"modificar\";\n $data['modo'] = $modo;\n $datos_ocompra = $this->pedido_model->obtener_ocompra($codigo);\n $presupuesto = $datos_ocompra[0]->PRESUP_Codigo;\n $cotizacion = $datos_ocompra[0]->COTIP_Codigo;\n $pedido = $datos_ocompra[0]->PEDIP_Codigo;\n $numero = $datos_ocompra[0]->OCOMC_Numero;\n $codigo_usuario = $datos_ocompra[0]->OCOMC_CodigoUsuario;\n $serie = $datos_ocompra[0]->OCOMC_Serie;\n\n /**ponemos en en estado seleccionado presupuesto**/\n if($presupuesto!=null && trim($presupuesto)!=\"\" && $presupuesto!=0){\n $estadoSeleccion=1;\n $codigoPresupuesto=$presupuesto;\n /**1:sdeleccionado,0:deseleccionado**/\n $this->presupuesto_model->modificarTipoSeleccion($codigoPresupuesto,$estadoSeleccion);\n }\n /**fin de poner**/\n $data['ordencompra'] =$codigo;\n $tiempo_entrega = $datos_ocompra[0]->OCOMC_Entrega;\n $descuento100 = $datos_ocompra[0]->OCOMC_descuento100;\n $igv100 = $datos_ocompra[0]->OCOMC_igv100;\n $percepcion100 = $datos_ocompra[0]->OCOMC_percepcion100;\n $proveedor = $datos_ocompra[0]->PROVP_Codigo;\n $cliente = $datos_ocompra[0]->CLIP_Codigo;\n $centro_costo = $datos_ocompra[0]->CENCOSP_Codigo;\n $moneda = $datos_ocompra[0]->MONED_Codigo;\n $cboVendedor = $datos_ocompra[0]->OCOMC_MiPersonal;\n $contacto = $datos_ocompra[0]->OCOMC_Personal;\n $envio_direccion = $datos_ocompra[0]->OCOMC_EnvioDireccion;\n $fact_direccion = $datos_ocompra[0]->OCOMC_FactDireccion;\n $observacion = $datos_ocompra[0]->OCOMC_Observacion;\n $fecha = substr($datos_ocompra[0]->OCOMC_Fecha, 0, 10);\n $fechaentrega = substr($datos_ocompra[0]->OCOMC_FechaEntrega, 0, 10);\n $flagIngreso = $datos_ocompra[0]->OCOMC_FlagIngreso;\n $almacen = $datos_ocompra[0]->ALMAP_Codigo;\n $formapago = $datos_ocompra[0]->FORPAP_Codigo;\n $usuario = $datos_ocompra[0]->USUA_Codigo;\n $ctactesoles = $datos_ocompra[0]->OCOMC_CtaCteSoles;\n $ctactedolares = $datos_ocompra[0]->OCOMC_CtaCteDolares;\n $estado = $datos_ocompra[0]->OCOMC_FlagEstado;\n $evaluado = $datos_ocompra[0]->OCOMC_FlagAprobado;\n $tipoComprobante = $datos_ocompra[0]->CPC_TipoDocumento;\n\n $subtotal = $datos_ocompra[0]->OCOMC_subtotal;\n $descuentototal = $datos_ocompra[0]->OCOMC_descuento;\n $igvtotal = $datos_ocompra[0]->OCOMC_igv;\n $percepciontotal = $datos_ocompra[0]->OCOMC_percepcion;\n $total = $datos_ocompra[0]->OCOMC_total;\n $ordencompraventa = $datos_ocompra[0]->OCOMP_CodigoVenta;\n $data['ordencompraventa'] = $ordencompraventa; \n $data['ordencompraempresa'] = $datos_ocompra[0]->OCOMC_PersonaAutorizada;\n //$codigocliente = $datos_ocompra[0]->CLIP_Codigo;\n $codigoproyecto = $datos_ocompra[0]->PROYP_Codigo;\n \n $data['cboObra'] = $this->OPTION_generador($this->proyecto_model->listar_proyectos(), 'PROYP_Codigo', 'PROYC_Nombre', $codigoproyecto == 0 ? '3' : $codigoproyecto);\n $data[\"almacen\"] = $almacen;\n\n /*if($codigoproyecto != 0){\n $listaproyecto = $this->proyecto_model->seleccionar($codigoproyecto);\n $data['cboObra'] = form_dropdown(\"obra\",$listaproyecto,$codigoproyecto, \" class='comboGrande' id='obra' \");\n }else{\n $data['cboObra'] = form_dropdown(\"obra\", array('' => ':: Seleccione ::'), \"\", \" class='comboGrande' id='obra'\");\n }*/\n \n\n\n $tipo = '';\n $ruc_cliente = '';\n $nombre_cliente = '';\n $nombre_proveedor = '';\n $ruc_proveedor = '';\n $empresa = '';\n $numero_suger_oc = '';\n $serie_suger_oc = '';\n $persona = '';\n if ($cliente != '' && $cliente != '0') {\n $datos_cliente = $this->cliente_model->obtener($cliente);\n if ($datos_cliente) {\n $tipo = $datos_cliente->tipo;\n $nombre_cliente = $datos_cliente->nombre;\n $ruc_cliente = ($datos_cliente->ruc != '' && $datos_cliente->ruc != 0) ? $datos_cliente->ruc : $datos_cliente->dni;\n $empresa = $datos_cliente->empresa;\n $persona = $datos_cliente->persona;\n }\n } elseif ($proveedor != '' && $proveedor != '0') {\n $datos_proveedor = $this->proveedor_model->obtener($proveedor);\n if ($datos_proveedor) {\n $tipo = $datos_proveedor->tipo;\n $nombre_proveedor = $datos_proveedor->nombre;\n $ruc_proveedor = $datos_proveedor->ruc;\n $empresa = $datos_proveedor->empresa;\n $persona = $datos_proveedor->persona;\n }\n }\n\n $data['tipo_oper'] = $tipo_oper;\n //$data['cboPresupuesto'] = $this->OPTION_generador($this->presupuesto_model->listar_presupuestos_nocomprobante($tipo_oper, 'F'), 'PRESUP_Codigo', array('PRESUC_Numero', 'nombre'), $presupuesto, array('0', '::Seleccione::'), ' - ');\n //$data['cboCotizacion'] = form_dropdown(\"cotizacion\", $this->cotizacion_model->seleccionar(), $cotizacion, \" class='comboMedio' id='cotizacion' onchange='obtener_detalle_cotizacion();' onfocus='javascript:this.blur();return false;'\");\n $data['cboMoneda'] = $this->seleccionar_moneda($moneda);\n\n if ($cotizacion == 0) {\n $data['cboAlmacen'] = form_dropdown(\"almacen\", $this->almacen_model->seleccionar(), $almacen, \" class='comboMedio' id='almacen'\");\n $data['cboFormapago'] = form_dropdown(\"formapago\", $this->formapago_model->seleccionar(), $formapago, \" class='comboMedio' id='formapago'\");\n } else {\n $data['cboAlmacen'] = form_dropdown(\"almacen\", $this->almacen_model->seleccionar(), $almacen, \" class='comboMedio' id='almacen' onfocus='javascript:this.blur();return false;'\");\n $data['cboFormapago'] = form_dropdown(\"formapago\", $this->formapago_model->seleccionar(), $formapago, \" class='comboMedio' id='formapago' onfocus='javascript:this.blur();return false;'\");\n }\n\n $data['contacto'] = $contacto;\n $data['cboVendedor'] = $this->lib_props->listarVendedores($cboVendedor);\n \n $contactosEmpresa = $this->empresa_model->listar_contactosEmpresa($empresa);\n\n $data[\"cboContacto\"] = \"<option value=''>Seleccionar</option>\";\n foreach ($contactosEmpresa as $key => $value) {\n \n $selected = ($contacto == $value->ECONP_Contacto) ? 'SELECTED' : '';\n $data[\"cboContacto\"] .= \"<option value='\".$value->ECONP_Contacto.\"' $selected>\".$value->ECONC_Descripcion.\"</option>\";\n }\n\n $datos_usuario= $this->usuario_model->obtener($usuario);\n $numun =\"\";\n if(count($datos_usuario)>0){\n $numun = $datos_usuario->PERSC_Nombre . \" \" . $datos_usuario->PERSC_ApellidoPaterno;\n\n }\n $data['nombre_usuario'] =$numun;\n $data['numero'] = $numero;\n $data['codigo_usuario'] = $codigo_usuario;\n $data['serie'] = $serie;\n $data['igv'] = $igv100;\n $data['igv_db'] = 18;\n $data['descuento'] = $descuento100;\n $data['percepcion'] = $percepcion100;\n $data['cliente'] = $cliente;\n $data['ruc_cliente'] = $ruc_cliente;\n $data['nombre_cliente'] = $nombre_cliente;\n $data['proveedor'] = $proveedor;\n $data['ruc_proveedor'] = $ruc_proveedor;\n $data['serie_suger_oc'] = $serie_suger_oc;\n $data['numero_suger_oc'] = $numero_suger_oc;\n $data['nombre_proveedor'] = $nombre_proveedor;\n $data['pedido'] = $pedido;\n $data['cotizacion'] = $cotizacion;\n $data['contiene_igv'] = (($comp_confi[0]->COMPCONFIC_PrecioContieneIgv == '1') ? true : false);\n $oculto = form_hidden(array('accion' => $accion, 'codigo' => $codigo, 'empresa' => $empresa, 'persona' => $persona, 'modo' => $modo, 'base_url' => base_url(), 'tipo_oper' => $tipo_oper, 'contiene_igv' => ($data['contiene_igv'] == true ? '1' : '0')));\n $data['titulo'] = \"EDITAR ORDEN DE \" . ($tipo_oper == 'V' ? 'VENTA' : 'COMPRA');\n $data['formulario'] = \"frmOrdenCompra\";\n $data['oculto'] = $oculto;\n $data['url_action'] = base_url() . \"index.php/compras/pedido/modificar_ocompra\";\n $atributos = array('width' => 700, 'height' => 450, 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');\n $contenido = \"<img height='16' width='16' src='\" . base_url() . \"images/ver.png' title='Buscar' border='0'>\";\n $data['vercliente'] = anchor_popup('ventas/cliente/ventana_busqueda_cliente', $contenido, $atributos, 'linkVerCliente');\n $data['verproveedor'] = anchor_popup('compras/proveedor/ventana_busqueda_proveedor', $contenido, $atributos, 'linkVerProveedor');\n $data['verproducto'] = anchor_popup('almacen/producto/ventana_busqueda_producto', $contenido, $atributos, 'linkVerProducto');\n $data['hoy'] = mysql_to_human($fecha);\n $data['fechaentrega'] = ($fechaentrega != '' ? mysql_to_human($fechaentrega) : '');\n $data['preciototal'] = $subtotal;\n $data['descuentotal'] = $descuentototal;\n $data['igvtotal'] = $igvtotal;\n $data['percepciontotal'] = $percepciontotal;\n $data['importetotal'] = $total;\n $data['ctactesoles'] = $ctactesoles;\n $data['ctactedolares'] = $ctactedolares;\n $data['observacion'] = $observacion;\n $data['estado'] = $estado;\n $data['evaluado'] = $evaluado;\n $data['tipoComprobante'] = $tipoComprobante;\n $data['tiempo_entrega'] = $tiempo_entrega;\n $data['envio_direccion'] = $envio_direccion;\n $data['fact_direccion'] = $fact_direccion;\n\n $tdc = $datos_ocompra[0]->OCOMP_TDC;\n\n $data['tdcDolar'] = $moneda == 4 ? $datos_ocompra[0]->OCOMP_TDC_opcional : $tdc;\n $data['tdcEuro'] = $moneda == 4 ? $tdc : '';\n\n $data['terminado'] = $datos_ocompra[0]->OCOMC_FlagTerminado;\n $data['terminado_importacion'] = $datos_ocompra[0]->OCOMC_FlagTerminadoProceso;\n\n $detalle = $this->pedido_model->obtener_detalle_ocompra($codigo);\n\n $detalle_ocompra = array();\n if (count($detalle) > 0) {\n foreach ($detalle as $indice => $valor) {\n\n $detocompra = $valor->OCOMDEP_Codigo;\n $producto = $valor->PROD_Codigo;\n $cantidad = $valor->OCOMDEC_Cantidad;\n $pendiente = $valor->OCOMDEC_Pendiente;\n $unidad = $valor->UNDMED_Codigo;\n $pu = $valor->OCOMDEC_Pu;\n $subtotal = $valor->OCOMDEC_Subtotal;\n $igv = $valor->OCOMDEC_Igv;\n $total = $valor->OCOMDEC_Total;\n $pu_conigv = $valor->OCOMDEC_Pu_ConIgv;\n\n $descuento = $valor->OCOMDEC_Descuento;\n $descuento2 = $valor->OCOMDEC_Descuento2;\n $observ = $valor->OCOMDEC_Observacion;\n $datos_producto = $this->producto_model->obtener_producto($producto);\n $flagBS = $datos_producto[0]->PROD_FlagBienServicio;\n $datos_unidad = $this->unidadmedida_model->obtener($unidad);\n $GenInd = $valor->OCOMDEC_GenInd;\n $costo = $valor->OCOMDEC_Costo;\n $nombre_producto = ($valor->OCOMDEC_Descripcion != '' ? $valor->OCOMDEC_Descripcion : $datos_producto[0]->PROD_Nombre);\n $codigo_interno = $datos_producto[0]->PROD_CodigoUsuario;\n $nombre_unidad = is_array($datos_unidad) ? $datos_unidad[0]->UNDMED_Simbolo : '';\n\n $objeto = new stdClass();\n $objeto->OCOMDEP_Codigo = $detocompra;\n $objeto->flagBS = $flagBS;\n $objeto->PROD_Codigo = $producto;\n $objeto->PROD_CodigoUsuario = $codigo_interno;\n $objeto->UNDMED_Codigo = $unidad;\n $objeto->OCOMDEC_Cantidad = $cantidad;\n $objeto->OCOMDEC_Pendiente=$pendiente;\n $objeto->OCOMDEC_Igv = $igv;\n $objeto->OCOMDEC_Pu = $pu;\n $objeto->OCOMDEC_Total = $total;\n $objeto->OCOMDEC_Pu_ConIgv = $pu_conigv;\n $objeto->PROD_Nombre = $nombre_producto;\n $objeto->UNDMED_Simbolo = $nombre_unidad;\n $objeto->OCOMDEC_GenInd = $GenInd;\n $objeto->OCOMDEC_Costo = $costo;\n $objeto->OCOMDEC_Subtotal = $subtotal;\n $objeto->OCOMDEC_Descuento = $descuento;\n $objeto->OCOMDEC_Descuento2 = $descuento2;\n $objeto->OCOMDEC_Pendiente_pago = $valor->OCOMDEC_Pendiente_pago;\n\n $objeto->RazonSocial = '';\n\n $referencia_venta = $this->pedido_model->obtener_referencia_compra_by_id_detalle_venta($valor->OCOMP_Codigo_venta);\n\n if(isset($referencia_venta->PROVP_Codigo)) {\n\n }\n\n if(isset($referencia_venta->CLIP_Codigo)) {\n $cliente_datos = $this->cliente_model->obtener($referencia_venta->CLIP_Codigo);\n\n $objeto->RazonSocial = $cliente_datos->nombre;\n }\n\n $objeto->RazonSocial = (!isset($referencia_venta->PROVP_Codigo) && !isset($referencia_venta->CLIP_Codigo)) ? \"Almacen\" : $objeto->RazonSocial;\n $objeto->PROYP_Codigo = isset($referencia_venta->PROYP_Codigo) ? $referencia_venta->PROYP_Codigo : 0;\n $objeto->PROYC_Nombre = isset($referencia_venta->PROYC_Nombre) ? $referencia_venta->PROYC_Nombre : 0;\n\n $objeto->OCOMP_Codigo_venta = $valor->OCOMP_Codigo_venta;\n $objeto->OCOMP_Codigo = $valor->OCOMP_Codigo;\n \n $objeto->OCOMP_Codigo_referencia = isset($referencia_venta->OCOMP_Codigo) ? $referencia_venta->OCOMP_Codigo : 0;\n\n $objeto->OCOMDEC_Observacion = $observ;\n\n\n $detalle_ocompra[] = $objeto;\n }\n }\n $data['detalle_ocompra'] = $detalle_ocompra;\n $this->layout->view('compras/pedido_nueva', $data);\n }", "public function pdf_imprimir_comunicacion_interna_todo($cite_codificado){\r\n //Imprimimos arriba o abajo segun lo establecido\r\n $pdf = $this->generar_pdf_comunicacion_interna_todo($cite_codificado);\r\n return $pdf;\r\n }", "public function setNotaExamenC($cuadro, $nota)\n\t{\n\t\t$this->db->query('call agregar_nota_examen_c('.$cuadro.', '.$nota.');');\n\t}", "private function inizVarContratto(){\r\n $this->varWork=$this->post('data');\r\n $giorni=$this->post('giorni');\r\n $giorni[0]=0;\r\n $this->giorni=$giorni;\r\n $this->setTime();\r\n $this->setDate();\r\n $this->setIdPrenotazione();\r\n }", "function setContingencia($contingencia) {\r\n $this->contingencia = $contingencia;\r\n }", "function evt__cuadro__seleccion($datos)\n\t{\n //print_r($this->s__datos);exit();\n $d=array();\n $d['id_docente']=$datos['id_docente'];\n $valores=array();\n $valores['legajo']=$datos['nro_legaj'];\n $valores['apellido']=$datos['desc_appat'];\n $valores['nombre']=$datos['desc_nombr'];\n $valores['nro_cuil1']=$datos['nro_cuil3'];\n $valores['nro_cuil']=$datos['nro_cuil4'];\n $valores['nro_cuil2']=$datos['nro_cuil5'];\n $valores['fec_nacim']=$datos['nacim'];\n $valores['tipo_docum']=$datos['tipo_doc'];\n $valores['nro_docum']=$datos['nro_cuil4'];\n $valores['tipo_sexo']=$datos['sexo'];\n $valores['fec_ingreso']=$datos['fec_ingreso'];\n $valores['telefono']=$datos['telefono'];\n $valores['telefono_celular']=$datos['telefono_celular'];\n $valores['correo_institucional']=$datos['correo_electronico'];\n $this->dep('datos')->tabla('docente')->cargar($d);//carga el docente seleccionado\n $this->dep('datos')->tabla('docente')->set($valores);\n $this->dep('datos')->tabla('docente')->sincronizar();\n \n\t}", "public function setCodigo($codigo)\r\n {\r\n $this->codigo = $codigo;\r\n\r\n return $this;\r\n }", "public function setPsicofisico($psicofisico){\n $this->psicofisico = $psicofisico;\n }", "public function setContribuyenteIden($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_contribuyenteIden != $data) {\n $this->_logChange('contribuyenteIden');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_contribuyenteIden = $data;\n } else if (!is_null($data)) {\n $this->_contribuyenteIden = (string) $data;\n } else {\n $this->_contribuyenteIden = $data;\n }\n return $this;\n }", "public function setCodiceFiscale($codiceFiscale)\n {\n $this->codiceFiscale = $codiceFiscale;\r\n return $this;\n }", "function setFicheCom($fichecom){\n $this->fichecom = $fichecom;\n }", "function RubricaDoc() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n // Recupera os dados do lançamento\r\n $sql = new db_getSolicData; $RS1 = $sql->getInstanceOf($dbms,$w_chave,f($RS_Menu,'sigla'));\r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_sq_tipo_documento = $_REQUEST['w_sq_tipo_documento'];\r\n $w_numero = $_REQUEST['w_numero'];\r\n $w_data = $_REQUEST['w_data'];\r\n $w_serie = $_REQUEST['w_serie'];\r\n $w_valor = $_REQUEST['w_valor_doc'];\r\n $w_tipo = $_REQUEST['w_tipo'];\r\n $w_sq_rubrica_destino = $_REQUEST['w_sq_rubrica_destino'];\r\n } elseif ($O=='L') {\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,$w_chave,null,null,null,null,null,null,'DOCS');\r\n $RS = SortArray($RS,'data','asc');\r\n } elseif (strpos('AEV',$O)!==false) {\r\n // Recupera os dados do endereço informado\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,$w_chave,$w_chave_aux,null,null,null,null,null,null);\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n $w_sq_tipo_documento = f($RS,'sq_tipo_documento');\r\n $w_numero = f($RS,'numero');\r\n $w_data = FormataDataEdicao(f($RS,'data'));\r\n $w_serie = f($RS,'serie');\r\n $w_valor = formatNumber(f($RS,'valor'));\r\n }\r\n if ($w_sq_tipo_documento>'') {\r\n $sql = new db_getTipoDocumento; $RS2 = $sql->getInstanceOf($dbms,$w_sq_tipo_documento,$w_cliente,null,null);\r\n foreach ($RS2 as $row) {\r\n $w_tipo = f($row,'sigla');\r\n }\r\n } \r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n if (strpos('IAEGCP',$O)!==false) {\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataValor();\r\n FormataData();\r\n SaltaCampo();\r\n ShowHTML(' function valor(p_indice) {');\r\n ShowHTML(' if (document.Form[\"w_sq_projeto_rubrica[]\"][p_indice].checked) { ');\r\n if(f($RS1,'tipo_rubrica')==2) {\r\n ShowHTML(' document.Form[\"w_sq_rubrica_destino[]\"][p_indice].disabled=false; ');\r\n ShowHTML(' document.Form[\"w_valor[]\"][p_indice].disabled=false; ');\r\n ShowHTML(' document.Form[\"w_sq_rubrica_destino[]\"][p_indice].focus(); '); \r\n } else {\r\n ShowHTML(' document.Form[\"w_valor[]\"][p_indice].disabled=false; ');\r\n ShowHTML(' document.Form[\"w_valor[]\"][p_indice].focus(); '); \r\n }\r\n ShowHTML(' } else {');\r\n if(f($RS1,'tipo_rubrica')==1) {\r\n ShowHTML(' document.Form[\"w_sq_projeto_rubrica[]\"][p_indice].checked=true; ');\r\n ShowHTML(' document.Form[\"w_valor[]\"][p_indice].focus(); ');\r\n } else {\r\n if(f($RS1,'tipo_rubrica')==2) \r\n ShowHTML(' document.Form[\"w_sq_rubrica_destino[]\"][p_indice].disabled=true; ');\r\n ShowHTML(' document.Form[\"w_valor[]\"][p_indice].disabled=true; ');\r\n }\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' function MarcaTodos() {');\r\n ShowHTML(' if (document.Form[\"w_sq_projeto_rubrica[]\"].length!=undefined) ');\r\n ShowHTML(' for (i=0; i < document.Form[\"w_sq_projeto_rubrica[]\"].length; i++) {');\r\n ShowHTML(' document.Form[\"w_sq_projeto_rubrica[]\"][i].checked=true;');\r\n ShowHTML(' document.Form[\"w_valor[]\"][i].disabled=false;');\r\n ShowHTML(' } ');\r\n ShowHTML(' else document.Form[\"w_sq_projeto_rubrica[]\"].checked=true;');\r\n ShowHTML(' }');\r\n ShowHTML(' function DesmarcaTodos() {');\r\n ShowHTML(' if (document.Form[\"w_sq_projeto_rubrica[]\"].length!=undefined) ');\r\n ShowHTML(' for (i=0; i < document.Form[\"w_sq_projeto_rubrica[]\"].length; i++) {');\r\n ShowHTML(' document.Form[\"w_sq_projeto_rubrica[]\"][i].checked=false;');\r\n ShowHTML(' document.Form[\"w_valor[]\"][i].disabled=true;');\r\n ShowHTML(' } ');\r\n ShowHTML(' ');\r\n ShowHTML(' else document.Form[\"w_sq_projeto_rubrica[]\"].checked=false;');\r\n ShowHTML(' }'); \r\n ValidateOpen('Validacao');\r\n if (strpos('IA',$O)!==false) {\r\n Validate('w_sq_tipo_documento','Tipo do documento', '1', '1', '1', '18', '', '0123456789');\r\n Validate('w_numero','Número do documento', '1', '1', '1', '30', '1', '1');\r\n Validate('w_data','Data do documento', 'DATA', '1', '10', '10', '', '0123456789/');\r\n /*\r\n if (Nvl($w_tipo,'-')=='NF') {\r\n Validate('w_serie','Série do documento', '1', '1', 1, 10, '1', '1');\r\n } \r\n */\r\n Validate('w_valor_doc','Valor total do documento', 'VALOR', '1', 4, 18, '', '0123456789.,-');\r\n if(f($RS1,'tipo_rubrica')==1) {\r\n ShowHTML(' for (i=1; i < document.Form[\"w_sq_projeto_rubrica[]\"].length; i++) {');\r\n ShowHTML(' if(document.Form[\"w_sq_projeto_rubrica[]\"][i].checked==false) {');\r\n ShowHTML(' alert(\"Para movimentações do tipo dotação inicial, todas as rubricas devem ser marcas e os valores preenchidos!\");');\r\n ShowHTML(' return false;');\r\n ShowHTML(' } ');\r\n ShowHTML(' } ');\r\n } else {\r\n ShowHTML(' var i; ');\r\n ShowHTML(' var w_erro=true; ');\r\n ShowHTML(' if (theForm[\"w_sq_projeto_rubrica[]\"].length!=undefined) {');\r\n ShowHTML(' for (i=0; i < theForm[\"w_sq_projeto_rubrica[]\"].length; i++) {');\r\n ShowHTML(' if (theForm[\"w_sq_projeto_rubrica[]\"][i].checked) w_erro=false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' else {');\r\n ShowHTML(' if (theForm[\"w_sq_projeto_rubrica[]\"].checked) w_erro=false;');\r\n ShowHTML(' }');\r\n ShowHTML(' if (w_erro) {');\r\n ShowHTML(' alert(\"Você deve informar pelo menos uma rubrica!\"); ');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n if(f($RS1,'tipo_rubrica')==2) {\r\n ShowHTML(' for (i=1; i < theForm[\"w_sq_projeto_rubrica[]\"].length; i++) {');\r\n ShowHTML(' if((theForm[\"w_sq_projeto_rubrica[]\"][i].checked)&&(theForm[\"w_sq_rubrica_destino[]\"][i].selectedIndex==0)){');\r\n ShowHTML(' alert(\"Para todas as rubricas selecionadas você deve informar a rubrica de destino do valor!\"); ');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }'); \r\n }\r\n }\r\n ShowHTML(' for (i=1; i < theForm[\"w_sq_projeto_rubrica[]\"].length; i++) {');\r\n ShowHTML(' if((theForm[\"w_sq_projeto_rubrica[]\"][i].checked)&&(theForm[\"w_valor[]\"][i].value==\\'\\')){');\r\n ShowHTML(' alert(\"Para todas as rubricas selecionadas você deve informar o valor da mesma!\"); ');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }'); \r\n }\r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</head>');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } elseif ($O=='I') {\r\n BodyOpen('onLoad=\\'document.Form.w_sq_tipo_documento.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } \r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n ShowHTML('<tr><td colspan=3 bgcolor=\"#FAEBD7\"><table border=1 width=\"100%\"><tr><td>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr><td colspan=3><b>'.upper(f($RS1,'nome')).' '.f($RS1,'codigo_interno').' ('.$w_chave.')</b></td>');\r\n ShowHTML(' <tr><td colspan=\"3\">Finalidade: <b>'.CRLF2BR(f($RS1,'descricao')).'</b></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>Forma de pagamento:<br><b>'.f($RS1,'nm_forma_pagamento').' </b></td>');\r\n ShowHTML(' <td>Vencimento:<br><b>'.FormataDataEdicao(f($RS1,'vencimento')).' </b></td>');\r\n ShowHTML(' <td>Valor:<br><b>'.formatNumber(Nvl(f($RS1,'valor'),0)).' </b></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>Projeto:<br><b>'.f($RS1,'nm_projeto').' </b></td>');\r\n ShowHTML(' <td>Tipo de movimentação:<br><b>'.f($RS1,'nm_tipo_rubrica').' </b></td>');\r\n ShowHTML(' </TABLE>');\r\n ShowHTML('</TABLE>');\r\n ShowHTML(' <tr><td>&nbsp;');\r\n if ($O=='L') {\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td><font size=\"2\"><a accesskey=\"I\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_menu='.$w_menu.'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>I</u>ncluir</a>&nbsp;');\r\n ShowHTML(' <a accesskey=\"F\" class=\"ss\" href=\"javascript:window.close(); opener.location.reload(); opener.focus();\"><u>F</u>echar</a>&nbsp;');\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Tipo</td>');\r\n ShowHTML(' <td><b>Número</td>');\r\n ShowHTML(' <td><b>Emissão</td>');\r\n // ShowHTML(' <td><b>Série</td>');\r\n ShowHTML(' <td><b>Valor</td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS)==0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=7 align=\"center\"><font size=\"2\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $w_total=0;\r\n foreach($RS as $row) {\r\n $sql = new db_getLancamentoRubrica; $RS2 = $sql->getInstanceOf($dbms,null,f($row,'sq_lancamento_doc'),null,null); \r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td rowspan=\"2\">'.f($row,'nm_tipo_documento').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'numero').'</td>');\r\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'data')).'</td>');\r\n // ShowHTML(' <td align=\"center\">'.Nvl(f($row,'serie'),'---').'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td class=\"remover\" rowspan=\"2\" align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_chave_aux='.f($row,'sq_lancamento_doc').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.'GRAVA&R='.$w_pagina.$par.'&O=E&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_chave_aux='.f($row,'sq_lancamento_doc').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\" onClick=\"return confirm(\\'Confirma a exclusão do registro?\\');\">EX</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr width=\"100%\" bgcolor=\"'.$w_TrBgColor.'\" align=\"center\"><td colspan=4 align=\"center\">');\r\n ShowHTML(documentorubrica($RS2,f($RS1,'tipo_rubrica')));\r\n $w_total=$w_total+f($row,'valor');\r\n } \r\n }\r\n if ($w_total>0 && count($RS)>1) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"center\" colspan=3><b>Total</b></td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total).'</b>&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td colspan=\"2\">&nbsp;</td>');\r\n ShowHTML(' </tr>');\r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } elseif (!(strpos('IAEV',$O)===false)) {\r\n if (strpos('EV',$O)!==false) $w_Disabled=' DISABLED ';\r\n $sql = new db_getsolicRubrica; \r\n if((f($RS1,'tipo_rubrica')==1) || (f($RS1,'tipo_rubrica')==4)) $RS = $sql->getInstanceOf($dbms,f($RS1,'sq_solic_pai'),null,'S',null,null,'N',null,null,null);\r\n elseif(f($RS1,'tipo_rubrica')==2) $RS = $sql->getInstanceOf($dbms,f($RS1,'sq_solic_pai'),null,'S',null,null,null,null,null,null);\r\n elseif(f($RS1,'tipo_rubrica')==3) $RS = $sql->getInstanceOf($dbms,f($RS1,'sq_solic_pai'),null,'S',null,null,'S',null,null,null); \r\n else $RS = $sql->getInstanceOf($dbms,f($RS1,'sq_solic_pai'),null,'S',null,null,null,null,null,null);\r\n $RS = SortArray($RS,'ordena','asc');\r\n //Rotina de escolha e gravação das parcelas para o lançamento\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.$w_menu.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_aux\" value=\"'.$w_chave_aux.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_projeto_rubrica[]\" value=\"\">'); \r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_rubrica_destino[]\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor[]\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">'); \r\n ShowHTML(' <tr><td><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\r\n SelecaoTipoDocumento('<u>T</u>ipo:','T', 'Selecione o tipo de documento.', $w_sq_tipo_documento,$w_cliente,null,'w_sq_tipo_documento',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_numero\\'; document.Form.submit();\"');\r\n ShowHTML(' <td><b><u>N</u>úmero:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_numero\" class=\"sti\" SIZE=\"15\" MAXLENGTH=\"30\" VALUE=\"'.$w_numero.'\" title=\"Informe o número do documento.\"></td>');\r\n ShowHTML(' <td><b><u>D</u>ata:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_data\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_data.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Informe a data do documento.\"></td>');\r\n /*\r\n if (Nvl($w_tipo,'-')=='NF') {\r\n ShowHTML(' <td><b><u>S</u>érie:</b><br><input '.$w_Disabled.' accesskey=\"S\" type=\"text\" name=\"w_serie\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_serie.'\" title=\"Informado apenas se o documento for NOTA FISCAL. Informe a série ou, se não tiver, digite ÚNICA.\"></td>');\r\n } \r\n */\r\n ShowHTML(' <td><b><u>V</u>alor:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor_doc\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total do documento.\"></td>');\r\n ShowHTML(' <tr><td colspan=\"5\" valign=\"top\" align=\"center\">&nbsp;'); \r\n ShowHTML(' <tr><td colspan=\"5\" valign=\"top\" align=\"center\" bgcolor=\"#D0D0D0\" style=\"border: 2px solid rgb(0,0,0);\"><b>Rubricas</td>'); \r\n ShowHTML('<tr><td align=\"center\" colspan=5>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\" valign=\"top\">');\r\n if(f($RS1,'tipo_rubrica')==1) {\r\n ShowHTML(' <td NOWRAP>&nbsp;');\r\n } else { \r\n ShowHTML(' <td NOWRAP><font size=\"2\"><U ID=\"INICIO\" CLASS=\"hl\" onClick=\"javascript:MarcaTodos();\" TITLE=\"Marca todos os itens da relação\"><IMG SRC=\"images/NavButton/BookmarkAndPageActivecolor.gif\" BORDER=\"1\" width=\"15\" height=\"15\"></U>&nbsp;');\r\n ShowHTML(' <U CLASS=\"hl\" onClick=\"javascript:DesmarcaTodos();\" TITLE=\"Desmarca todos os itens da relação\"><IMG SRC=\"images/NavButton/BookmarkAndPageInactive.gif\" BORDER=\"1\" width=\"15\" height=\"15\"></U>'); \r\n }\r\n ShowHTML(' <td><b>Código</b></td>');\r\n ShowHTML(' <td><b>Nome</b></td>');\r\n ShowHTML(' <td><b>Classificação</b></td>');\r\n if(f($RS1,'tipo_rubrica')==2) ShowHTML(' <td><b>Destino</b></td>');\r\n ShowHTML(' <td><b>Valor</b></td>');\r\n ShowHTML(' </tr>');\r\n if (!count($RS)) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=5 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $w_cont=0;\r\n foreach($RS as $row) {\r\n $sql = new db_getLancamentoRubrica; $RS2 = $sql->getInstanceOf($dbms,null,$w_chave_aux,f($row,'sq_projeto_rubrica'),null);\r\n foreach($RS2 as $row2){$RS2=$row2;break;}\r\n $w_cont += 1;\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor; \r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"middle\" align=\"center\">');\r\n if((f($RS2,'sq_rubrica_origem')==f($row,'sq_projeto_rubrica')) || (f($RS1,'tipo_rubrica')==1)) {\r\n ShowHTML(' <td><input type=\"checkbox\" name=\"w_sq_projeto_rubrica[]\" value=\"'.f($row,'sq_projeto_rubrica').'\" onClick=\"valor('.$w_cont.');\" READONLY CHECKED>');\r\n } else {\r\n ShowHTML(' <td><input type=\"checkbox\" name=\"w_sq_projeto_rubrica[]\" value=\"'.f($row,'sq_projeto_rubrica').'\" onClick=\"valor('.$w_cont.');\">');\r\n }\r\n ShowHTML(' <td>'.f($row,'codigo').'</td>');\r\n ShowHTML(' <td align=\"left\">'.f($row,'nome').'</td>');\r\n ShowHTML(' <td align=\"left\">'.f($row,'nm_cc').'</td>');\r\n if((f($RS2,'sq_rubrica_origem')==f($row,'sq_projeto_rubrica')) || (f($RS1,'tipo_rubrica')==1)) {\r\n if(f($RS1,'tipo_rubrica')==2) SelecaoRubrica(null,null, 'Selecione a rubrica de destino.', f($RS2,'sq_rubrica_destino'),f($RS1,'sq_projeto'),f($row,'sq_projeto_rubrica'),'w_sq_rubrica_destino[]',null,null); \r\n ShowHTML(' <td><input type=\"text\" name=\"w_valor[]\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"18\" VALUE=\"'.formatNumber(Nvl(f($RS2,'valor'),0)).'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor.\"></td>');\r\n } else {\r\n $w_Disabled = 'disabled';\r\n if(f($RS1,'tipo_rubrica')==2) SelecaoRubrica(null,null, 'Selecione a rubrica de destino.', f($RS2,'sq_rubrica_destino'),f($RS1,'sq_projeto'),f($row,'sq_projeto_rubrica'),'w_sq_rubrica_destino[]',null,null); \r\n $w_Disabled = 'enabled'; \r\n ShowHTML(' <td><input type=\"text\" disabled name=\"w_valor[]\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"18\" VALUE=\"'.formatNumber(Nvl(f($RS2,'valor'),0)).'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor.\"></td>');\r\n }\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML('<tr><td align=\"center\" colspan=\"5\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&R='.$R.'&w_chave='.$w_chave.'&w_chave_aux='.$w_chave_aux.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&w_menu='.$w_menu.'&O=L').'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML('</FORM>');\r\n ShowHTML('</tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n}", "public function setCadEnderRua($iCodigoCadEnderRua) {\n\n $this->db85_cadenderrua = $iCodigoCadEnderRua;\n }", "function Documentos() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_sq_lancamento_doc = $_REQUEST['w_sq_lancamento_doc'];\r\n $w_incid_tributo = 'N';\r\n $w_incid_retencao = 'N';\r\n // Recupera os dados do lançamento\r\n $sql = new db_getSolicData; $RS1 = $sql->getInstanceOf($dbms,$w_chave,f($RS_Menu,'sigla'));\r\n // Estes dados são recuperados de RS1 (DB_GETSOLICDATA)\r\n $w_moeda = f($RS1,'sq_moeda');\r\n $w_nm_moeda = f($RS1,'nm_moeda');\r\n $w_dados_pai = explode('|@|',f($RS1,'dados_pai'));\r\n $w_sigla_pai = $w_dados_pai[5];\r\n $w_modulo_pai = $w_dados_pai[11];\r\n\r\n // Recupera os dados do documento vinculado ao lançamento\r\n $sql = new db_getLancamentoDoc; $RS_Doc = $sql->getInstanceOf($dbms,$w_chave,$w_sq_lancamento_doc,null,null,null,null,null,null);\r\n $w_doc_unico = false;\r\n if (count($RS_Doc)==1) {\r\n $RS_Doc = $RS_Doc[0];\r\n if ($O=='L') $O = 'A';\r\n $w_doc_unico = true; // Se tem apenas um documento, abre direto a tela de alteração.\r\n }\r\n \r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_sq_tipo_documento = $_REQUEST['w_sq_tipo_documento'];\r\n $w_numero = $_REQUEST['w_numero'];\r\n $w_data = $_REQUEST['w_data'];\r\n $w_serie = $_REQUEST['w_serie'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_patrimonio = $_REQUEST['w_patrimonio'];\r\n $w_tipo = $_REQUEST['w_tipo'];\r\n } elseif ($O=='L') {\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,$w_chave,null,null,null,null,null,null,'DOCS');\r\n $RS = SortArray($RS,'data','asc');\r\n } elseif (strpos('AEV',$O)!==false) {\r\n $w_sq_lancamento_doc = f($RS_Doc,'sq_lancamento_doc');\r\n $w_sq_tipo_documento = f($RS_Doc,'sq_tipo_documento');\r\n $w_numero = f($RS_Doc,'numero');\r\n $w_data = FormataDataEdicao(f($RS_Doc,'data'));\r\n $w_serie = f($RS_Doc,'serie');\r\n $w_valor = formatNumber(f($RS_Doc,'valor'));\r\n $w_patrimonio = f($RS_Doc,'patrimonio');\r\n $w_tributo = f($RS_Doc,'calcula_tributo');\r\n $w_retencao = f($RS_Doc,'calcula_retencao');\r\n } \r\n // Recupera a sigla do tipo do documento para tratar a Nota Fiscal e\r\n // verifica se o tipo de documento tem incidência de tributos e retenção.\r\n if ($w_sq_tipo_documento>'') {\r\n $sql = new db_getImpostoIncid; $RS2 = $sql->getInstanceOf($dbms,$w_cliente,$w_chave,$w_sq_tipo_documento,null,'INCIDENCIA');\r\n if (!count($RS2)) {\r\n $w_incid_tributo='N';\r\n $w_incid_retencao='N';\r\n } else {\r\n foreach ($RS2 as $row) {\r\n $w_incid_tributo = f($row,'calcula_tributo');\r\n $w_incid_retencao = f($row,'calcula_retencao');\r\n break;\r\n }\r\n } \r\n $sql = new db_getTipoDocumento; $RS2 = $sql->getInstanceOf($dbms,$w_sq_tipo_documento,$w_cliente,null,null);\r\n foreach ($RS2 as $row) {\r\n $w_tipo = f($row,'sigla');\r\n }\r\n } \r\n \r\n $sql = new db_getLancamentoValor; $RS_Valores = $sql->getInstanceOf($dbms,$w_cliente,$w_menu,$w_chave,$w_sq_lancamento_doc,null,'EDICAO');\r\n $RS_Valores = SortArray($RS_Valores,'tp_valor','desc','ordenacao','asc');\r\n $i=0;\r\n unset($w_valores);\r\n foreach ($RS_Valores as $row) {\r\n $i++;\r\n $w_valores[$i]['chave'] = f($row,'sq_valores');\r\n $w_valores[$i]['nome'] = f($row,'nome');\r\n $w_valores[$i]['tipo'] = f($row,'tp_valor');\r\n $w_valores[$i]['valor'] = formatNumber(nvl(f($row,'valor'),0));\r\n }\r\n\r\n Cabecalho();\r\n head();\r\n ShowHTML('<TITLE>'.$conSgSistema.' - Documentos</TITLE>');\r\n Estrutura_CSS($w_cliente);\r\n ScriptOpen('JavaScript');\r\n if (strpos('IAEGCP',$O)!==false) {\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataValor();\r\n ValidateOpen('Validacao');\r\n if (strpos('IA',$O)!==false) {\r\n Validate('w_sq_tipo_documento','Tipo do documento', '1', '1', '1', '18', '', '0123456789');\r\n Validate('w_numero','Número do documento', '1', '1', '1', '30', '1', '1');\r\n Validate('w_data','Data do documento', 'DATA', '1', '10', '10', '', '0123456789/');\r\n /*\r\n if (Nvl($w_tipo,'-')=='NF') {\r\n Validate('w_serie','Série do documento', '1', '1', 1, 10, '1', '1');\r\n } \r\n */\r\n Validate('w_moeda','Moeda', 'SELECT', '1', 1, 18, '', '0123456789');\r\n Validate('w_valor','Valor total do documento', 'VALOR', '1', 4, 18, '', '0123456789.,-');\r\n if (is_array($w_valores)) {\r\n ShowHTML(' for (ind=1; ind < theForm[\"w_valores[]\"].length; ind++) {');\r\n Validate('[\"w_valores[]\"][ind]','!','VALOR','1','4','18','','0123456789.,-');\r\n ShowHTML(' }');\r\n }\r\n }\r\n ShowHTML(' disAll();');\r\n ValidateClose();\r\n } \r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</head>');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } elseif ($O=='I') {\r\n BodyOpen('onLoad=\\'document.Form.w_sq_tipo_documento.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } \r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n ShowHTML('<tr><td colspan=3 bgcolor=\"#FAEBD7\"><table border=1 width=\"100%\"><tr><td>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr><td colspan=3><b>'.upper(f($RS1,'nome')).' '.f($RS1,'codigo_interno').' ('.$w_chave.')</b></td>');\r\n ShowHTML(' <tr><td colspan=\"3\">Finalidade: <b>'.CRLF2BR(f($RS1,'descricao')).'</b></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>Forma de pagamento:<br><b>'.f($RS1,'nm_forma_pagamento').' </b></td>');\r\n ShowHTML(' <td>Vencimento:<br><b>'.FormataDataEdicao(f($RS1,'vencimento')).' </b></td>');\r\n ShowHTML(' <td>Valor:<br><b>'.((nvl($w_moeda,'')=='') ? '' : f($RS1,'sb_moeda').' ').formatNumber(Nvl(f($RS1,'valor'),0)).' </b></td>');\r\n ShowHTML(' </TABLE>');\r\n ShowHTML('</TABLE>');\r\n ShowHTML(' <tr><td>&nbsp;');\r\n if ($O=='L') {\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td>');\r\n if (count($RS)==0 && strpos(f($RS_Menu,'sigla'),'VIA')===false) ShowHTML(' <a accesskey=\"I\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_menu='.$w_menu.'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>I</u>ncluir</a>&nbsp;'); \r\n if ($P2==1) {\r\n ShowHTML(' <a accesskey=\"F\" class=\"ss\" href=\"javascript:this.status.value;\" onClick=\"parent.$.fancybox.close();\"><u>F</u>echar</a>&nbsp;');\r\n } else {\r\n ShowHTML(' <a accesskey=\"F\" class=\"ss\" href=\"javascript:this.status.value;\" onClick=\"window.close(); opener.focus();\"><u>F</u>echar</a>&nbsp;');\r\n }\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Tipo</td>');\r\n ShowHTML(' <td><b>Número</td>');\r\n ShowHTML(' <td><b>Emissão</td>');\r\n ShowHTML(' <td><b>Valor</td>');\r\n ShowHTML(' <td><b>Dedução</td>');\r\n ShowHTML(' <td><b>Acréscimo</td>');\r\n ShowHTML(' <td><b>Total</td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS)==0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=8 align=\"center\"><font size=\"2\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $w_total=0;\r\n foreach($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td>'.f($row,'nm_tipo_documento').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'numero').'</td>');\r\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'data')).'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'deducao')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'acrescimo')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor')+f($row,'acrescimo')-f($row,'deducao')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td class=\"remover\" align=\"top\" nowrap>');\r\n if (strpos(f($RS_Menu,'sigla'),'VIA')===false) ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.f($row,'sq_lancamento_doc').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=DOCUMENTO\">AL</A>&nbsp');\r\n if (strpos(f($RS_Menu,'sigla'),'VIA')===false && $w_modulo_pai!=='CO') ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.'GRAVA&R='.$w_pagina.$par.'&O=E&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.f($row,'sq_lancamento_doc').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=DOCUMENTO\" onClick=\"return confirm(\\'Confirma a exclusão do registro?\\');\">EX</A>&nbsp');\r\n //if (f($row,'detalha_item')=='S' && $P2!=1) ShowHTML(' <A class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"window.open(\\''.montaURL_JS(null,$conRootSIW.$w_dir.$w_pagina.'ITENS&R='.$w_pagina.$par.'&O=&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.f($row,'sq_lancamento_doc').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'- Itens'.'&SG=ITEM').'\\',\\'Item\\',\\'toolbar=no,width=780,height=530,top=40,left=20,scrollbars=yes\\');\" title=\"Informa os itens do documento.\">Itens</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n $w_total=$w_total+f($row,'valor');\r\n } \r\n }\r\n if ($w_total>0 && count($RS)>1) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"center\" colspan=3><b>Total</b></td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total).'</b>&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td colspan=\"2\">&nbsp;</td>');\r\n ShowHTML(' </tr>');\r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } elseif (!(strpos('IAEV',$O)===false)) {\r\n if (strpos('EV',$O)!==false) $w_Disabled=' DISABLED ';\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,'DOCUMENTO',$w_pagina.$par,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.$w_menu.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_lancamento_doc\" value=\"'.$w_sq_lancamento_doc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=\"3\"><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\r\n SelecaoTipoDocumento('<u>T</u>ipo:','T', 'Selecione o tipo de documento.', $w_sq_tipo_documento,$w_cliente,null,'w_sq_tipo_documento',null,null);\r\n ShowHTML(' <td><b><u>N</u>úmero:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_numero\" class=\"sti\" SIZE=\"15\" MAXLENGTH=\"30\" VALUE=\"'.$w_numero.'\" title=\"Informe o número do documento.\"></td>');\r\n ShowHTML(' <td><b><u>D</u>ata:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_data\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_data.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Informe a data do documento.\">'.ExibeCalendario('Form','w_data').'</td>');\r\n /*\r\n if (Nvl($w_tipo,'-')=='NF') {\r\n ShowHTML(' <td><b><u>S</u>érie:</b><br><input '.$w_Disabled.' accesskey=\"S\" type=\"text\" name=\"w_serie\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_serie.'\" title=\"Informado apenas se o documento for NOTA FISCAL. Informe a série ou, se não tiver, digite ÚNICA.\"></td>');\r\n } \r\n */\r\n if (substr(f($RS1,'sigla'),3)=='CONT') {\r\n // Se pagamento de contrato, não pode alterar moeda do pagamento.\r\n ShowHTML(' <td><b>Moeda:<br>'.$w_nm_moeda.'</b></td>');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_moeda\" value=\"'.$w_moeda.'\">');\r\n } else {\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') selecaoMoeda('<u>M</u>oeda:','U','Selecione a moeda na relação.',$w_moeda,null,'w_moeda','ATIVO',null);\r\n }\r\n\r\n ShowHTML(' <td><b><u>V</u>alor:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total do documento.\"></td>');\r\n if (is_array($w_valores)){\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_valores[]\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valores[]\" value=\"\">');\r\n foreach($w_valores as $row) {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_valores[]\" value=\"'.f($row,'chave').'\">');\r\n ShowHTML(' <tr><td colspan=\"3\" align=\"right\"><b>'.f($row,'nome').':</b><td><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valores[]\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.f($row,'valor').'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\"></td>');\r\n }\r\n }\r\n //MontaRadioNS('<b>Patrimônio?</b>',$w_patrimonio,'w_patrimonio');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_patrimonio\" value=\"N\">');\r\n ShowHTML(' </table>');\r\n if ($w_incid_tributo=='N' && $w_incid_retencao=='N' && substr(f($RS_Menu,'sigla'),2,1)=='D') {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tributo\" value=\"'.$w_incid_tributo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_retencao\" value=\"'.$w_incid_retencao.'\">');\r\n } else {\r\n if ($w_incid_retencao=='S' || substr(f($RS_Menu,'sigla'),2,1)=='R') {\r\n ShowHTML(' <tr>');\r\n MontaRadioSN('<b>Haverá retenção de tributos para este documento?',Nvl($w_retencao,$w_incid_retencao),'w_retencao',null,null,null,3);\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_retencao\" value=\"'.$w_incid_retencao.'\">');\r\n } \r\n if ($w_incid_tributo=='S' || substr(f($RS_Menu,'sigla'),2,1)=='R') {\r\n ShowHTML(' <tr>');\r\n MontaRadioSN('<b>Haverá pagamento de tributos para este documento?',Nvl($w_tributo,$w_incid_tributo),'w_tributo',null,null,null,3);\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tributo\" value=\"N\">');\r\n } \r\n } \r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\"><hr>');\r\n if ($O=='E') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O=='I') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n } \r\n }\r\n if ($w_doc_unico) {\r\n // Se tem apenas um documento, permite fechar a janela\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"window.close(); opener.focus();\" name=\"Botao\" value=\"Fechar\">');\r\n } else {\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_menu='.$w_menu.'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&O=L').'\\';\" name=\"Botao\" value=\"Voltar\">');\r\n }\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML('</FORM>');\r\n if ($O!='I') {\r\n // Itens\r\n $sql = new db_getLancamentoItem; $RS = $sql->getInstanceOf($dbms,null,$w_sq_lancamento_doc,null,null,null);\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"'.$conTrAlternateBgColor.'\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=2 bgcolor=\"'.$conTrAlternateBgColor.'\" nowrap><b>Itens&nbsp;&nbsp;');\r\n ShowHTML(' '.((substr(f($RS_Menu,'sigla'),3)!='VIA') ? '[<a accesskey=\"I\" class=\"ss\" href=\"'.$w_dir.$w_pagina.'Itens&R='.$w_pagina.$par.'&O=I&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.$w_sq_lancamento_doc.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=ITEM\"><u>I</u>ncluir</a>]' : '' ).'</b>');\r\n ShowHTML(' '.((substr(f($RS_Menu,'sigla'),3)!='VIA') ? '[<a accesskey=\"T\" class=\"ss\" href=\"'.$w_dir.'importacao_itens.php?par=inicial&R='.$w_pagina.$par.'&O=I&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.$w_sq_lancamento_doc.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=IMPORTITEM\">Impor<u>t</u>ar</a>]' : '' ).'</b>');\r\n ShowHTML(' </td>');\r\n ShowHTML(' <td align=\"right\" bgcolor=\"'.$conTrAlternateBgColor.'\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"'.$conTrAlternateBgColor.'\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\"><table border=0 width=\"100%\">');\r\n // Recupera todos os registros para a listagem\r\n if (count($RS)>0) {\r\n $RS = SortArray($RS,'ordem','asc','sq_documento_item','asc');\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Ordem</td>');\r\n ShowHTML(' <td><b>Descrição</td>');\r\n if(nvl(f($RS1,'qtd_rubrica'),0)>0) ShowHTML(' <td><b>Rubrica</td>');\r\n ShowHTML(' <td><b>Qtd.</td>');\r\n if (strpos(f($RS_Menu,'sigla'),'VIA')!==false) {\r\n ShowHTML(' <td><b>Data cotação</td>');\r\n ShowHTML(' <td><b>Valor cotação</td>');\r\n }\r\n ShowHTML(' <td><b>$ Unitário</td>');\r\n ShowHTML(' <td><b>$ Total</td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS)==0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=7 align=\"center\"><font size=\"2\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $w_total=0;\r\n foreach($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"center\">'.f($row,'ordem').'</td>');\r\n ShowHTML(' <td align=\"left\">'.f($row,'descricao').'</td>');\r\n if(nvl(f($RS1,'qtd_rubrica'),0)>0) ShowHTML(' <td align=\"center\">'.f($row,'codigo_rubrica').'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'quantidade'),0).'</td>');\r\n if (strpos(f($RS_Menu,'sigla'),'VIA')!==false) {\r\n ShowHTML(' <td align=\"center\">'.formataDataEdicao(f($row,'data_cotacao')).'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor_cotacao'),4).'&nbsp;&nbsp;</td>');\r\n }\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor_unitario')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor_total')).'&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td class=\"remover\" align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.'Itens&R='.$w_pagina.$par.'&O=A&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.f($row,'sq_lancamento_doc').'&w_sq_documento_item='.f($row,'sq_documento_item').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=ITEM\">AL</A>&nbsp');\r\n if (strpos(f($RS_Menu,'sigla'),'VIA')===false) ShowHTML(' <A class=\"hl\" HREF=\"'.$w_dir.$w_pagina.'GRAVA&R='.$w_pagina.$par.'&O=E&w_menu='.$w_menu.'&w_chave='.$w_chave.'&w_sq_lancamento_doc='.f($row,'sq_lancamento_doc').'&w_sq_documento_item='.f($row,'sq_documento_item').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=ITEM\" onClick=\"return confirm(\\'Confirma a exclusão do registro?\\');\">EX</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n $w_total += f($row,'valor_total');\r\n } \r\n }\r\n if ($w_total>0 && count($RS)>1) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"right\" colspan=\"'.((strpos(f($RS_Menu,'sigla'),'VIA')===false) ? ((nvl(f($RS1,'qtd_rubrica'),0)>0) ? 5 : 4) : 6).'\"><b>Total</b></td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total).'</b>&nbsp;&nbsp;</td>');\r\n ShowHTML(' <td colspan=\"1\">&nbsp;</td>');\r\n ShowHTML(' </tr>');\r\n }\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n }\r\n ShowHTML(' </table>');\r\n \r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n}", "public function setCoPessoa($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->co_pessoa !== $v) {\n $this->co_pessoa = $v;\n $this->modifiedColumns[] = PessoaPeer::CO_PESSOA;\n }\n\n\n return $this;\n }", "public function update_personas_docs($id,$_comprobante,$_ine,$_lic_manejo,$_acta_nac,$_rfc,$_nss,$_curp,$_estudio,$_recomendacion,$_policia,$_fonacot,$_infonavit) {\n //echo 'id:'.$_p_id.' comprobante:'.$_comprobante.' ine:'.$_ine.' licencia:'.$_lic_manejo.' acta:'.$_acta_nac.' rfc:'.$_rfc.' nss:'.$_nss.' curp:'.$_curp.' estudio:'.$_estudio.' recomendacion:'.$_recomendacion.' policia:'.$_policia.' fonacot:'.$_fonacot.' infonavit:'.$_infonavit;\n $sqld=\"update doc_personas set doc_comprobante=$_comprobante,doc_ine=$_ine,doc_lic_manejo=$_lic_manejo,doc_acta_nac=$_acta_nac,doc_rfc=$_rfc,doc_nss=$_nss,doc_curp=$_curp,doc_estudio=$_estudio, doc_recomendacion=$_recomendacion,doc_policia=$_policia,doc_fonacot=$_fonacot,doc_infonavit=$_infonavit where persona_id=$id;\";\n $resultd= pg_query($this->conexion, $sqld) or die(\"Error updoc: \". pg_last_error());//update de documentos persona\n $this->update.='1'; \n }", "public function setCuloare($culoare)\n {\n $this->culoare = $culoare;\n }", "public function setPreco($preco) {\n $this->preco = $preco;\n }", "public function setDataCriado($data_criado)\n {\n $this->data_criado = $data_criado;\n\n return $this;\n }", "public function setCoeficienteEntornoPueblo($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_coeficienteEntornoPueblo != $data) {\n $this->_logChange('coeficienteEntornoPueblo');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_coeficienteEntornoPueblo = $data;\n } else if (!is_null($data)) {\n $this->_coeficienteEntornoPueblo = (string) $data;\n } else {\n $this->_coeficienteEntornoPueblo = $data;\n }\n return $this;\n }", "public function setNumeroCliente($numeroCliente)\r\n{\r\n$this->numeroCliente = $numeroCliente;\r\n\r\nreturn $this;\r\n}", "function getDocumento(){ return $this->documento; }" ]
[ "0.76423323", "0.7607078", "0.7487135", "0.71910924", "0.7022585", "0.69820625", "0.68600434", "0.66026473", "0.6388049", "0.6156373", "0.58268386", "0.5794305", "0.573147", "0.5719573", "0.5697118", "0.56849015", "0.5660533", "0.5641834", "0.5633044", "0.5632996", "0.55928344", "0.5559821", "0.5559273", "0.55462366", "0.55396926", "0.55241", "0.55096346", "0.54476035", "0.54273367", "0.5426846", "0.5397401", "0.5391281", "0.533572", "0.53333366", "0.5314268", "0.5278274", "0.5272921", "0.52387303", "0.5230031", "0.52144617", "0.52128744", "0.52122885", "0.52037346", "0.5190561", "0.51853704", "0.51761866", "0.5162077", "0.51552397", "0.5153446", "0.5152969", "0.5146233", "0.51342887", "0.5132105", "0.5124496", "0.5118098", "0.5114736", "0.51143306", "0.5105843", "0.510104", "0.5096495", "0.5096212", "0.5090859", "0.5086222", "0.5081029", "0.50678796", "0.5055065", "0.50539696", "0.5052933", "0.5050699", "0.5048578", "0.5046189", "0.50431454", "0.5038283", "0.50382215", "0.5033487", "0.5031703", "0.50273806", "0.50242805", "0.5023391", "0.50166947", "0.50147617", "0.5014472", "0.501118", "0.5006514", "0.5005259", "0.50039154", "0.50001836", "0.4998902", "0.4997912", "0.49929938", "0.49907348", "0.49873284", "0.4984238", "0.4983235", "0.4975199", "0.4975199", "0.49743566", "0.4969476", "0.49671504", "0.49618584" ]
0.78169596
0
Get the value of docenciaTecnicoSuperior
Получить значение docenciaTecnicoSuperior
public function getDocenciaTecnicoSuperior() { return $this->docenciaTecnicoSuperior; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function getDocente(){\n return $this->docente;\n }", "public function getDoc_entrega()\r\r\n {\r\r\n return $this->doc_entrega;\r\r\n }", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function getRutaDocumento(){\n return $this->rutaDocumento;\n }", "function getDocumento(){ return $this->documento; }", "public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior)\n\t{\n\t\t$this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior;\n\n\t\treturn $this;\n\t}", "public function getTipo_doc_tutor()\r\n\t{\r\n\t\treturn($this->tipo_doc_tutor);\r\n\t}", "public function getDIERECCION_TIENDA(){\n return $this->DIERECCION_TIENDA;\n }", "public function getDocumento()\n {\n return $this->documento;\n }", "public function getDocumento()\n {\n return $this->documento;\n }", "public function getNombreDocumento(){\n return $this->nombreDocumento;\n }", "public function getTipoDocumento()\n {\n return $this->tipoDocumento;\n }", "public function getDocumento()\r\n {\r\n return $this->Documento;\r\n }", "public function getObjetivo(){\n return $this->objetivo;\n }", "public function getObjetivo(){\n return $this->objetivo;\n }", "public function getDIRECCION_TIENDA(){\n return $this->DIRECCION_TIENDA;\n }", "public function getVotiTotaleCandidato()\n {\n return $this->voti_totale_candidato;\n }", "function DameIdProximoTecnica()\r\n {\r\n return $this->modeltecnica->buscaridproximo();\r\n\r\n }", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function getCodigoEstudiante(){\n\t\treturn $this->codigoEstudiante;\n\t}", "public function getNro_doc_tutor()\r\n\t{\r\n\t\treturn($this->nro_doc_tutor);\r\n\t}", "public function getObjetivo()\n {\n return $this->objetivo;\n }", "public function getTipo_documento()\r\n\t{\r\n\t\treturn($this->tipo_documento);\r\n\t}", "public function getTituloUbicacion(){return $this->vTituloUbicacion;}", "public function getNOMBRE_TIENDA(){\n return $this->NOMBRE_TIENDA;\n }", "public function getOedtcorepric()\n {\n return $this->oedtcorepric;\n }", "public function getValorMetaSecundaria( ){\n return $this->valorMetaSecundaria;\n }", "public function getVeiculo()\r\r\n {\r\r\n return $this->veiculo;\r\r\n }", "public function GetDataTer()\n {\n return $this->dataTermino;\n }", "public function getDOCUMENT_PRODUCT_TAX_COD()\n {\n return $this->DOCUMENT_PRODUCT_TAX_COD;\n }", "function getTipo () {\n \treturn $this -> inciTipo;\n }", "public function getAvanceSupervisorMetaSecundaria( ){\n if( !empty( $this->avanceSupervisorMetaSecundaria ) ){\n return $this->avanceSupervisorMetaSecundaria;\n }else{\n return 0;\n }\n }", "public function getVisuelObtenu()\n\t{\n\t\treturn $this->_visuel_obtenu;\n\t}", "function sgd_doc_secuencia2() {\n\n\tif ($this->sgd_doc_secuencia)\n\t\treturn $this->sgd_doc_secuencia;\n\telse\n\t\treturn (\"null\");\n\n}", "public function getIdTecnico()\n {\n return $this->idTecnico;\n }", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "public function getTbResenhaResenha(){\n\treturn $this->tbResenhaResenha;\n}", "public function getAuditifObtenu()\n\t{\n\t\treturn $this->_auditif_obtenu;\n\t}", "public function getFkTcernTipoVeiculoVinculo()\n {\n return $this->fkTcernTipoVeiculoVinculo;\n }", "public function getnombreTeatro()\n {\n return $this->nombreTeatro;\n }", "public function getTrabalhaPiscina()\n {\n return $this->trabalha_piscina;\n }", "public function getTiempo();", "public function getObjTeatro(){\n\n return $this->objTeatro;\n }", "public function getTbResenhaIdusuario(){\n\treturn $this->tbResenhaIdusuario;\n}", "public function getPaisDeOrigen(){\n return $this -> paisDeOrigen;\n }", "function get_Pertenecea(){\n return $this->pertenecea;\n }", "public function get_estatura(){\r return $this->estatura;\r }", "public function getPropriete()\n {\n return $this->propriete;\n }", "public function getReciente() {\n\t\treturn $this->reciente;\n\t}", "public function getFecha_acre_super(){\n return $this->fecha_acre_super;\n }", "public function getRangoQuiebre() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_quiebre');\n\n\t\t$query = $query->getArrayResult();\n\t\t\n\t\tif(isset($query[0])) $this->rangoquiebre = intval($query[0]['valor']);\n\t\telse $this->rangoquiebre = 0;\n\n\t\treturn $this->rangoquiebre;\n }", "public function getTratamiento()\n {\n return $this->tratamiento;\n }", "public function getTaxePro() {\n return $this->taxePro;\n }", "public function getFkBeneficioConcessaoValeTransporte()\n {\n return $this->fkBeneficioConcessaoValeTransporte;\n }", "protected function _getTitulo()\n {\n $c = new ServiciosController();\n $related=$c->getRelated($this->_properties['id']);\n if($related==null)\n return '';\n return $this->_properties['nombre'].' de '.$related->renta->nombre;\n }", "function getTexto() {\n return $this->texto;\n }", "public function getDiaTrabalho() {\n return $this->oDiaTrabalho;\n }", "public function getCadEnderRuaTipo() {\n\n return $this->db85_ruastipo;\n }", "public function getValorProvento()\n {\n return $this->valorProvento;\n }", "public function getAttivo() {\n return $this->attivo;\n }", "public function getFkTcepeFonteRecurso()\n {\n return $this->fkTcepeFonteRecurso;\n }", "public function getTrabajo(){\n return $this->nombreTrabajo;\n }", "public function getLicencia()\r\n\t\t{\r\n\t\t\treturn $this->_nro_licencia;\r\n\t\t}", "public function getIdDocumento(){\n return $this->idDocumento;\n }", "public function getOedtlistpric()\n {\n return $this->oedtlistpric;\n }", "public function getContratoEct()\n {\n return $this->contratoEct;\n }", "public function getComplEntregaSemDataTpPer()\n {\n return $this->compl_Entrega_semData_tpPer;\n }", "public function obtenerTiempoDeEspera() {\n return $this->tiempoDeEspera;\n }", "function getContingencia(){\r\n return $this->contingencia;\r\n }", "public function getSubUsuario()\n {\n return $this->subUsuario;\n }", "public function getPrazoEntrega() {\n return $this->prazoEntrega;\n }", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "function getFicheCom(){\n return $this->fichecom;\n }", "public function obtenerEvaluacionGeneralDelDocente($id_docente) {\n $horas_remplazo = $this->contarHorasRemplazo($id_docente);\n $horas_atraso = $this->contarHorasAtraso($id_docente);\n $horas_faltas = $this->contarHorasFaltas($id_docente);\n $horas_sah = $this->contarHorasSalidaAntesHora($id_docente);\n $horas_ict = $this->contarHorasInicioClasesTarde($id_docente);\n $promedio = ($horas_remplazo+$horas_atraso+$horas_faltas+$horas_sah+$horas_ict)/5;\n if($promedio == 0){\n return \"Excelente\";\n }else if($promedio == 1){\n return \"Muy Bien\";\n }else if($promedio>=2 && $promedio < 6){\n return \"Bien\";\n }else if($promedio>=6 && $promedio < 10){\n return \"Regular\";\n }else if($promedio >= 10){\n return \"Deficiente\";\n }\n }", "public function getContribucion_marginal_valor()\n {\n return $this->contribucion_marginal_valor;\n }", "function getCodice_prodotto() {\r\n return $this->codice_prodotto;\r\n }", "public function getEntrega()\r\r\n {\r\r\n return $this->entrega;\r\r\n }", "public function getSuco();", "public function getTitrePerduTrouve()\n {\n return $this->titrePerduTrouve;\n }", "public function getTbResenhaIdlivro(){\n\treturn $this->tbResenhaIdlivro;\n}", "public function getUltimo()\n {\n return $this->ultimo;\n }", "function sgd_doc_secuencia() {\n\tif ($this->sgd_doc_secuencia)\n\t\treturn $this->sgd_doc_secuencia;\n\telse\n\t\treturn (\"XXXXXXXXX\");\n}", "public function getTexto()\n {\n return $this->texto;\n }", "public function getTexto()\n {\n return $this->texto;\n }", "public function getTexto()\n {\n return $this->texto;\n }", "public function getTexto() {\n return $this->texto;\n }", "function getTipoRicevuta();", "public function getTiempo()\n {\n return $this->tiempo;\n }", "function DameIdProximoSbCate()\r\n {\r\n return $this->modelsubcate->buscaridproximo();\r\n\r\n }", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "public function getJaTrabalhaComPiscina()\n {\n return $this->ja_trabalha_com_piscina;\n }", "public function getValue()\n\t{\n\t\treturn $this->doc->getValue($this->getKey());\n\t}", "function get_radi_nume_salida(){\n\treturn $this->radi_nume_salida;\n}", "function get_radi_anex_salida(){\n\treturn $this->anex_salida;\n}", "public function getTiempotraslado()\n {\n return $this->tiempotraslado;\n }" ]
[ "0.79660505", "0.67628485", "0.6636483", "0.65748715", "0.6565824", "0.64856356", "0.64565", "0.6390121", "0.63317007", "0.6329752", "0.6270035", "0.6255078", "0.6217856", "0.6145309", "0.6145309", "0.61291766", "0.61058503", "0.6103006", "0.60103434", "0.60103434", "0.59840244", "0.5978266", "0.5965776", "0.5956849", "0.59492016", "0.5915136", "0.5914273", "0.59069175", "0.5891523", "0.5887219", "0.58668286", "0.58601797", "0.5859869", "0.5858549", "0.5854513", "0.5825451", "0.5815557", "0.57872295", "0.577737", "0.5775512", "0.5774656", "0.576424", "0.5757689", "0.57478166", "0.5742123", "0.5740485", "0.5738443", "0.57359934", "0.572445", "0.57090205", "0.5707306", "0.57066643", "0.56952053", "0.5693605", "0.56797945", "0.5678397", "0.5678265", "0.56714565", "0.5668901", "0.56555146", "0.56510943", "0.5649186", "0.5647665", "0.56392664", "0.56308883", "0.5626321", "0.5624513", "0.5610064", "0.56092286", "0.560682", "0.5606", "0.5604569", "0.5601944", "0.5599504", "0.55954206", "0.55929655", "0.5589515", "0.55891275", "0.5588878", "0.5588224", "0.5586689", "0.5583212", "0.558078", "0.5570697", "0.5562307", "0.55595404", "0.555852", "0.55513996", "0.55513996", "0.55513996", "0.5551293", "0.5549662", "0.55496335", "0.55491453", "0.5547436", "0.55437064", "0.5543002", "0.55411005", "0.5535284", "0.55329436" ]
0.84337074
0
Set the value of docenciaTecnicoSuperior
Задайте значение docenciaTecnicoSuperior
public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior) { $this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function setDocente($docente){\n $this->docente = $docente;\n }", "public function setDocenciaTecnicoSuperiorId($docenciaTecnicoSuperiorId)\n\t{\n\t\t$this->docenciaTecnicoSuperiorId = $docenciaTecnicoSuperiorId;\n\n\t\treturn $this;\n\t}", "public function setTipo_doc_tutor($tipo_doc_tutor)\r\n\t{\r\n\t\t$this->tipo_doc_tutor = $tipo_doc_tutor;\r\n\t}", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "function setEsOtrosEgresos(){\n\t\t//$xO->es_estadistico(\"0\");//Si es estadistico, operacion base estadisticos.- Obsoleto pero usado.\n\t\t//Agregar clase efectivo\n\t\t//Cambiar el recibo que afecta\n\t\t$this->getObj()->recibo_que_afecta(RECIBOS_TIPO_OEGRESOS);\n\t\t$this->getObj()->query()->update()->save($this->getObj()->idoperaciones_tipos()->v());\n\t\t$this->setCleanCache();\n\t}", "public function setObjetivo($objetivo){\n $this->objetivo = $objetivo;\n }", "public function setObjetivo($objetivo){\n $this->objetivo = $objetivo;\n }", "public function setTipo_documento($tipo_documento)\r\n\t{\r\n\t\t$this->tipo_documento = $tipo_documento;\r\n\t}", "public function setFecha_acre_super($fecha_acre_super){\n $this->fecha_acre_super = $fecha_acre_super;\n }", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "function setAuditoriaSupervisor_patentes($ptt){\n $this->ptt_rev_supervisor_fcv = $ptt;\n $this->supervisor_total_patentes = $ptt;\n $this->save();\n }", "public function setNro_doc_tutor($nro_doc_tutor)\r\n\t{\r\n\t\t$this->nro_doc_tutor = $nro_doc_tutor;\r\n\t}", "public function escolherSetorVida()\n {\n $profissional = $this->input->get(\"p\");\n\n if($profissional != 1)\n {\n redirect('jogo/consultaVirtual');\n }\n\n $dados = $this->getDadosTelaInicial();\n \n // carrega o template\n $this->template->view(\"automatico_escolher_setor_vida\", array(\n \"title\" => \"Auto Consulta\",\n \"verticalTabs\" => true,\n \"jogosConsultaVirtual\" => $dados['jogosConsultaVirtual'],\n \"jogosAutoConsulta\" => $dados['jogosAutoConsulta'],\n \"setoresVida\" => $dados['setoresVida'],\n \"profissional\" => $profissional,\n \"codUsuarioCombinacao\" => $dados['codUsuarioCombinacao'],\n \"menuLateral\" => false\n ));\n }", "public function setDIERECCION_TIENDA($dIERECCION_TIENDA){\n $this->DIERECCION_TIENDA = $dIERECCION_TIENDA;\n }", "public function setnombreTeatro($nombreTeatro)\n\t{\n\t\t$this->nombreTeatro = $nombreTeatro;\n\t}", "public function setDoc_entrega($doc_entrega)\r\r\n {\r\r\n $this->doc_entrega = $doc_entrega;\r\r\n\r\r\n return $this;\r\r\n }", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function testSetRaisonSocLieuTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setRaisonSocLieuTrav(\"raisonSocLieuTrav\");\n $this->assertEquals(\"raisonSocLieuTrav\", $obj->getRaisonSocLieuTrav());\n }", "public function testSetBureauDistributeurLieuTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setBureauDistributeurLieuTrav(\"bureauDistributeurLieuTrav\");\n $this->assertEquals(\"bureauDistributeurLieuTrav\", $obj->getBureauDistributeurLieuTrav());\n }", "public function setTipoLicencia($tipo)\r\n\t\t{\r\n\t\t\t$this->_tipoLicencia = $tipo;\r\n\t\t}", "public function testSetTaxeSalaire() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setTaxeSalaire(10.092018);\n $this->assertEquals(10.092018, $obj->getTaxeSalaire());\n }", "public function getTipo_doc_tutor()\r\n\t{\r\n\t\treturn($this->tipo_doc_tutor);\r\n\t}", "public function testSetParticipServPers() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setParticipServPers(10.092018);\n $this->assertEquals(10.092018, $obj->getParticipServPers());\n }", "abstract public function setValorTransacao($valor);", "public function testSetPpSoumisTaxe() {\n\n $obj = new Bulletins();\n\n $obj->setPpSoumisTaxe(10.092018);\n $this->assertEquals(10.092018, $obj->getPpSoumisTaxe());\n }", "public function setPrimario($dato){\n $this->{'_'.$this->_primario} = $dato;\n }", "public function setDIRECCION_TIENDA($dIRECCION_TIENDA){\n $this->DIRECCION_TIENDA = $dIRECCION_TIENDA;\n }", "public function testSetProfilDirTechnicien() {\n\n $obj = new Clients();\n\n $obj->setProfilDirTechnicien(true);\n $this->assertEquals(true, $obj->getProfilDirTechnicien());\n }", "public function set_tipo_documento(TipoDocumento $object)\n {\n $this->tipo_documento = $object;\n $this->tipo_documento_id = $object->id;\n }", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function testSetMontantSaisi() {\n\n $obj = new PointageReglementsTetes();\n\n $obj->setMontantSaisi(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantSaisi());\n }", "public function __set($atributo, $valor)\n {\n $this->atributo = $valor;\n }", "public function testSetSubrogationMontant() {\n\n $obj = new AttestationAt();\n\n $obj->setSubrogationMontant(10.092018);\n $this->assertEquals(10.092018, $obj->getSubrogationMontant());\n }", "function evt__cuadro__seleccion($datos)\n\t{\n //print_r($this->s__datos);exit();\n $d=array();\n $d['id_docente']=$datos['id_docente'];\n $valores=array();\n $valores['legajo']=$datos['nro_legaj'];\n $valores['apellido']=$datos['desc_appat'];\n $valores['nombre']=$datos['desc_nombr'];\n $valores['nro_cuil1']=$datos['nro_cuil3'];\n $valores['nro_cuil']=$datos['nro_cuil4'];\n $valores['nro_cuil2']=$datos['nro_cuil5'];\n $valores['fec_nacim']=$datos['nacim'];\n $valores['tipo_docum']=$datos['tipo_doc'];\n $valores['nro_docum']=$datos['nro_cuil4'];\n $valores['tipo_sexo']=$datos['sexo'];\n $valores['fec_ingreso']=$datos['fec_ingreso'];\n $valores['telefono']=$datos['telefono'];\n $valores['telefono_celular']=$datos['telefono_celular'];\n $valores['correo_institucional']=$datos['correo_electronico'];\n $this->dep('datos')->tabla('docente')->cargar($d);//carga el docente seleccionado\n $this->dep('datos')->tabla('docente')->set($valores);\n $this->dep('datos')->tabla('docente')->sincronizar();\n \n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function testSetPeriodeSubrDu() {\n\n // Set a Date/time mock.\n $periodeSubrDu = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationAt();\n\n $obj->setPeriodeSubrDu($periodeSubrDu);\n $this->assertSame($periodeSubrDu, $obj->getPeriodeSubrDu());\n }", "public function setValor($valor){\n $this->valor = $valor;\n }", "public function testSetTauxSupFormation() {\n\n $obj = new Etablissements();\n\n $obj->setTauxSupFormation(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxSupFormation());\n }", "public function testSetSubrogation() {\n\n $obj = new Etablissements();\n\n $obj->setSubrogation(true);\n $this->assertEquals(true, $obj->getSubrogation());\n }", "public function setUsuario($atributo, $contenido){\r\n $this-> $atributo = $contenido;\r\n }", "public function testSetTauxCotisOssEtOpe() {\n\n $obj = new Etablissements2();\n\n $obj->setTauxCotisOssEtOpe(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxCotisOssEtOpe());\n }", "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "function setTipo_teleco($stipo_teleco = '')\n {\n $this->stipo_teleco = $stipo_teleco;\n }", "public function setRutaDocumento($rutaDocumento){\n $this->rutaDocumento = $rutaDocumento;\n }", "function setTipo($stipo = '')\n {\n $this->stipo = $stipo;\n }", "public function setTermsOfUse($tou)\n {\n $this->_changed = true;\n $this->_terms = $tou;\n }", "function autoriser_document_supprimer_dist($faire, $type, $id, $qui, $opt){\n\tif (!intval($id)\n\t\tOR !$qui['id_auteur']\n\t\tOR !autoriser('ecrire','','',$qui))\n\t\treturn false;\n\n\t// ne pas considerer les document parent\n\t// (cas des vignettes ou autre document annexe rattache a un document)\n\tif (sql_countsel('spip_documents_liens', \"objet!='document' AND id_document=\".intval($id)))\n\t\treturn false;\n\n\t// si c'est une vignette, se ramener a l'autorisation de son parent\n\tif (sql_getfetsel('mode','spip_documents','id_document='.intval($id))=='vignette'){\n\t\t$id_document = sql_getfetsel('id_document','spip_documents','id_vignette='.intval($id));\n\t\treturn !$id_document OR autoriser('modifier','document',$id_document);\n\t}\n\t// si c'est un document annexe, se ramener a l'autorisation de son parent\n\tif ($id_document=sql_getfetsel('id_objet','spip_documents_liens',\"objet='document' AND id_document=\".intval($id))){\n\t\treturn autoriser('modifier','document',$id_document);\n\t}\n\n\treturn autoriser('modifier','document',$id,$qui,$opt);\n}", "public function testSetTauxTaxeApprenti() {\n\n $obj = new Etablissements();\n\n $obj->setTauxTaxeApprenti(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxTaxeApprenti());\n }", "public function testSetTraitementDadsu() {\n\n $obj = new OrgaGeneriques();\n\n $obj->setTraitementDadsu(true);\n $this->assertEquals(true, $obj->getTraitementDadsu());\n }", "private function setPrazoEntrega($prazoEntrega) {\n $this->prazoEntrega = (integer) $prazoEntrega;\n }", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function testSetSiretLieuTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setSiretLieuTrav(\"siretLieuTrav\");\n $this->assertEquals(\"siretLieuTrav\", $obj->getSiretLieuTrav());\n }", "public function setTipo($tipo){\n\t\t$this->tipo = $tipo;\n\t}", "public function setIdDocumento($idDocumento){\n $this->idDocumento = $idDocumento;\n }", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "function modificar($objeto){\n\n\t\t\t$objeto->modifica($objeto);\n\n\n\t}", "public function testSetSubPartiel() {\n\n $obj = new AttestationAt();\n\n $obj->setSubPartiel(true);\n $this->assertEquals(true, $obj->getSubPartiel());\n }", "function modificarDocConcepto(){\n\t\t$this->procedimiento='conta.ft_doc_concepto_ime';\n\t\t$this->transaccion='CONTA_DOCC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_doc_concepto','id_doc_concepto','int4');\n\t\t$this->setParametro('id_doc_compra_venta','id_doc_compra_venta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_orden_trabajo','id_orden_trabajo','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad_sol','numeric');\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('precio_total_final','precio_total_final','numeric');\n\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 testSetTxEscompteVente() {\n\n $obj = new Clients();\n\n $obj->setTxEscompteVente(10.092018);\n $this->assertEquals(10.092018, $obj->getTxEscompteVente());\n }", "function uploadCertification($doc){\n\t\t//category nya di set di term(certification) dan taxonomy(document_type)\n\t}", "public function setFabricante(Fabricante $fabricante){\n\t\t$this->fabricante = $fabricante;\n\t}", "public function setAtaquePiernaLoca($valor){\n $this->ataquePiernaLoca=$valor;\n }", "public function setSenha($valor){\n\t\t\t$this->senha = $valor;\n\t\t}", "public function testSetNumeroOrdre() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setNumeroOrdre(10);\n $this->assertEquals(10, $obj->getNumeroOrdre());\n }", "public function testSetPeriodeSubrAu() {\n\n // Set a Date/time mock.\n $periodeSubrAu = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationAt();\n\n $obj->setPeriodeSubrAu($periodeSubrAu);\n $this->assertSame($periodeSubrAu, $obj->getPeriodeSubrAu());\n }", "public function testSetTauxActionsociale() {\n\n $obj = new Etablissements();\n\n $obj->setTauxActionsociale(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxActionsociale());\n }", "public function testSetSoumisTaxe1() {\n\n $obj = new Clients();\n\n $obj->setSoumisTaxe1(true);\n $this->assertEquals(true, $obj->getSoumisTaxe1());\n }", "function set_tema($prop, $valor, $replace=TRUE){ //replace é para quando deseja substituir atquivo, ou nao.\n $CI =& get_instance();\n $CI->load->library('sistema');\n if ($replace):\n $CI->sistema->tema[$prop] = $valor;\n else:\n if(!isset($CI->sistema->tema[$prop])) $CI->sistema->tema[$prop] = '';\n $CI->sistema->tema[$prop] .= $valor; // .= se ñ estiver definida uma propriedade, cria uma vazia e agrega o valor\n // se tiver o valor, so acrescenta o valor q esta sendo mandado pela minha função\n endif;\n }", "public function setTelefono($p_telefono){\r\n\t$this->telefono=$p_telefono;\r\n}", "public function testSetSoumisTaxe2() {\n\n $obj = new Clients();\n\n $obj->setSoumisTaxe2(true);\n $this->assertEquals(true, $obj->getSoumisTaxe2());\n }", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "function setPagina($otra_pag){\r\n\t\t\t$this->pag = $otro_pag;\r\n\t\t}", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "function modificarOrdenTrabajo(){\n\t\t$this->procedimiento='gem.ft_orden_trabajo_ime';\n\t\t$this->transaccion='GEM_GEOOTT_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_orden_trabajo','id_orden_trabajo','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_plan_ini','fecha_plan_ini','date');\n\t\t$this->setParametro('fecha_eje_ini','fecha_eje_ini','date');\n\t\t$this->setParametro('tiempo_estimado','tiempo_estimado','numeric');\n\t\t$this->setParametro('num_oit','num_oit','varchar');\n\t\t$this->setParametro('nota_tecnico_equipo','nota_tecnico_equipo','varchar');\n\t\t$this->setParametro('observacion','observacion','varchar');\n\t\t$this->setParametro('acumulado','acumulado','numeric');\n\t\t$this->setParametro('codigo_oit','codigo_oit','varchar');\n\t\t$this->setParametro('id_funcionario_asig','id_funcionario_asig','int4');\n\t\t$this->setParametro('id_unidad_medida','id_unidad_medida','int4');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('id_funcionario_sol','id_funcionario_sol','int4');\n\t\t$this->setParametro('ubicacion_tecnica','ubicacion_tecnica','varchar');\n\t\t$this->setParametro('fecha_eje_fin','fecha_eje_fin','date');\n\t\t$this->setParametro('id_uni_cons_mant_predef','id_uni_cons_mant_predef','int4');\n\t\t$this->setParametro('id_tipo_mant','id_tipo_mant','int4');\n\t\t$this->setParametro('nota_tecnico_loc','nota_tecnico_loc','varchar');\n\t\t$this->setParametro('id_uni_cons','id_uni_cons','int4');\n\t\t$this->setParametro('cat_estado','cat_estado','varchar');\n\t\t$this->setParametro('cat_prior','cat_prior','varchar');\n\t\t$this->setParametro('cat_tipo','cat_tipo','varchar');\n\t\t$this->setParametro('id_localizacion','id_localizacion','int4');\n\t\t$this->setParametro('descripcion_lugar','descripcion_lugar','varchar');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('especialidades','especialidades','varchar');\n\t\t$this->setParametro('id_funcionario_aprob','id_funcionario_aprob','int4');\n\t\t$this->setParametro('id_funcionario_recib','id_funcionario_recib','int4');\n\t\t$this->setParametro('comentarios','comentarios','varchar');\n\t\t$this->setParametro('accidentes','accidentes','varchar');\n\t\t$this->setParametro('reclamos','reclamos','varchar');\n\t\t$this->setParametro('otros','otros','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setSaldo($valor) {\n\t\t$this->saldo = $valor;\n\t}", "public function setAtaqueMuleta($valor){\n $this->ataqueMuleta=$valor;\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "function setusuario($val)\n { $this->usuario=$val;}", "function set_idObjeto( $idObjeto ) {\n // sets the value of idObjeto\n $this->idObjeto = $idObjeto;\n }", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "public function testSetNumVoieLieuTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setNumVoieLieuTrav(\"numVoieLieuTrav\");\n $this->assertEquals(\"numVoieLieuTrav\", $obj->getNumVoieLieuTrav());\n }", "public function setNumero_doc($numero_doc)\r\n\t{\r\n\t\t$this->numero_doc = $numero_doc;\r\n\t}", "public function testSetCodeOfficielCommuneLieuTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setCodeOfficielCommuneLieuTrav(\"codeOfficielCommuneLieuTrav\");\n $this->assertEquals(\"codeOfficielCommuneLieuTrav\", $obj->getCodeOfficielCommuneLieuTrav());\n }", "public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;\n\t\t}", "public function set_registro($tdoc,$ndoc,$correo,$nombre,$apellido)\n\t{\n\n\t\t$this->tdocumento=$tdoc;\n\t\t$this->ndocumento=$ndoc;\n\t\t$this->correo=$correo;\n\t\t$this->nombre=$nombre;\n\t\t$this->apellido=$apellido;\n\n\n\t}", "public function setVTipo($vTipo)\n{\n$this->vTipo = $vTipo;\n\nreturn $this;\n}", "public function set_utilisateur($_utilisateur){\n\t\t\t$this->utilisateur = $_utilisateur;\n\t\t}", "public function setCompte($compte)\n {\n $this->compte = $compte;\n\n \n }", "private function inizVarContratto(){\r\n $this->varWork=$this->post('data');\r\n $giorni=$this->post('giorni');\r\n $giorni[0]=0;\r\n $this->giorni=$giorni;\r\n $this->setTime();\r\n $this->setDate();\r\n $this->setIdPrenotazione();\r\n }", "public function testSetControleur() {\n\n $obj = new Employes();\n\n $obj->setControleur(true);\n $this->assertEquals(true, $obj->getControleur());\n }", "public function setImgPerfil($valor){\n\t\t\t$this->imgPerfil = $valor;\n\t\t}", "public function testSetComplementLieuTrav() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setComplementLieuTrav(\"complementLieuTrav\");\n $this->assertEquals(\"complementLieuTrav\", $obj->getComplementLieuTrav());\n }", "public function setTipoUser($tipo) {\n $this->_tipo = $tipo;\n }", "public function setModificacao($valor) {\n\t\t$this->modificacao = $valor;\n\t}", "public function testSetParticipPatronAvtgeMnt1() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setParticipPatronAvtgeMnt1(10.092018);\n $this->assertEquals(10.092018, $obj->getParticipPatronAvtgeMnt1());\n }" ]
[ "0.7163129", "0.70580655", "0.6394334", "0.61933315", "0.5897315", "0.5851867", "0.5794801", "0.569034", "0.569034", "0.5622441", "0.55850047", "0.5481487", "0.54763526", "0.5435316", "0.54039365", "0.5402173", "0.54014266", "0.5391904", "0.5385581", "0.53241587", "0.53202474", "0.5268296", "0.52562505", "0.52500236", "0.52442646", "0.5242562", "0.52424747", "0.5211815", "0.5199717", "0.51962334", "0.5192197", "0.5189722", "0.51845473", "0.51841795", "0.5176416", "0.51751643", "0.5154931", "0.51420695", "0.514135", "0.51385564", "0.51369506", "0.5136239", "0.51360035", "0.5114448", "0.51092756", "0.5102866", "0.51025516", "0.51004726", "0.50999296", "0.50997037", "0.5092751", "0.50925153", "0.50900537", "0.5086652", "0.507989", "0.50775886", "0.5074538", "0.50713044", "0.5061583", "0.50592107", "0.50541234", "0.5051794", "0.5040759", "0.5035812", "0.50263304", "0.5024297", "0.50197303", "0.5011026", "0.5002654", "0.5000881", "0.4999011", "0.4997341", "0.4985949", "0.49843916", "0.49812067", "0.49733406", "0.49679515", "0.49678662", "0.49662924", "0.49631518", "0.49609292", "0.49609292", "0.4956066", "0.4955352", "0.49538505", "0.49499375", "0.4947122", "0.4947057", "0.4941718", "0.49405998", "0.49388042", "0.49380225", "0.49374935", "0.49270308", "0.49234965", "0.49101627", "0.49082989", "0.49066535", "0.49055067", "0.49053276" ]
0.72694695
0
Get the value of docenciatecnicosuperiorOculto
Получить значение docenciatecnicosuperiorOculto
public function getDocenciatecnicosuperiorOculto() { return $this->docenciatecnicosuperiorOculto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "public function getCouleur()\n\t{\n\t\treturn $this->couleur;\n\t}", "public function getRicerca() {\n if (isset($_REQUEST['ricerca'])) {\n return $_REQUEST['ricerca'];\n } else\n return 0;\n }", "public function getCuil() {\n return $this->cuilSolicitante;\n \n }", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getCouleur() {\n return $this->couleur;\n }", "public function getCouleur() {\r\n\t\treturn $this->couleur;\r\n\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function getParroquiaOculto()\n {\n return $this->parroquiaOculto;\n }", "public function getCircoscrizioni()\n {\n return $this->circoscrizioni;\n }", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCuie() {\n return $this->cuie;\n }", "public function getCreadopor()\n {\n return $this->creadopor;\n }", "public function consumoIdeale(){\n\n if(empty($this->ultimoConsumo)|| empty($this->annata)){\n die('non hai riempito tutti i campi necessari');\n }\n return $this->ultimoConsumo - $this->annata;\n }", "public function getsCourriel()\n {\n return $this->sCourriel;\n }", "public function getCircoId()\n {\n return $this->circo_id;\n }", "function DameIdProximoSbCate()\r\n {\r\n return $this->modelsubcate->buscaridproximo();\r\n\r\n }", "public function getOedtcorepric()\n {\n return $this->oedtcorepric;\n }", "public function getDataCriado()\n {\n return $this->data_criado;\n }", "public function getColectivo() {\n return $this->colectivo;\n }", "public function getCobrodomicilio(){\r\n\treturn $this->cobrodomicilio;\r\n}", "public function getCouId()\n {\n return $this->cou_id;\n }", "public function contractorLicence()\n {\n $doc = CompanyDoc::where('category_id', 7)->where('for_company_id', $this->id)->where('status', '1')->first();\n return ($doc && $doc->ref_no) ? $doc->ref_no : '';\n }", "public function getCuloare()\n {\n return $this->culoare;\n }", "function DameIdProximoCatOcup()\r\n {\r\n return $this->modelcatocup->buscaridproximo();\r\n\r\n }", "public function getUbicacionsucursal()\r\n {\r\n return $this->ubicacionsucursal;\r\n }", "public function getFinanciamientobecadocentesOculto()\n\t{\n\t\treturn $this->financiamientobecadocentesOculto;\n\t}", "public function getSuco();", "static public function ctrMostrarCorrelativoRecibo(){\n\n\t\t$respuesta = ModeloCentroCostos::mdlMostrarCorrelativoRecibo();\n\n\t\treturn $respuesta;\n\n }", "function get_radi_nume_salida(){\n\treturn $this->radi_nume_salida;\n}", "public function getCoxa()\n {\n return $this->coxa;\n }", "public function getColaborador()\n {\n return $this->colaborador;\n }", "public function getCoPessoa()\n {\n return $this->co_pessoa;\n }", "public function getContribucion_marginal_valor()\n {\n return $this->contribucion_marginal_valor;\n }", "public function getPreco()\n {\n return $this->preco;\n }", "public function getConocimientosCurriculumid()\n {\n return $this->conocimientos_curriculumId;\n }", "public function getCintura()\n {\n return $this->cintura;\n }", "function get_radi_anex_salida(){\n\treturn $this->anex_salida;\n}", "public function getCobranca()\n {\n return $this->cobranca;\n }", "public function getPsicofisico(){\n return $this->psicofisico;\n }", "public function getCriacao() {\n\t\treturn $this->criacao;\n\t}", "public function getColeccionPropio()\n\t{\n\t\treturn $this->coleccion_propio;\n\t}", "public function getIDCONSGINECO()\n {\n return $this->ID_CONSGINECO;\n }", "function DameIdProximoCatCvil()\r\n {\r\n return $this->modelcatcvil->buscaridproximo();\r\n\r\n }", "function DameIdProximoCargCivl()\r\n {\r\n return $this->modelcargocvil->buscaridproximo();\r\n\r\n }", "public function getApellido_benef_otro()\r\n\t{\r\n\t\treturn($this->apellido_benef_otro);\r\n\t}", "public function getCodiRecinte() {\n\t\treturn $this->codiRecinte;\n\t}", "public function getComunicazioneCodice()\n {\n return $this->comunicazione_codice;\n }", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public function getobservacionPrematricula(){\n\t\treturn $this->observacionPrematricula;\n\t}", "public function getDocente(){\n return $this->docente;\n }", "function get_sgd_pnufe_codi() {\n\treturn $this->sgd_pnufe_codi;\n}", "function getDocumento(){ return $this->documento; }", "public function getRuc()\n {\n return $this->ruc;\n }", "public function getCarrera( ){\n\t\treturn $this->carrera;\n\t}", "public function getColeccionOtro()\n\t{\n\t\treturn $this->coleccion_otro;\n\t}", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getPreco()\n {\n return $this->preco;\n }", "public function getPreco()\n {\n return $this->preco;\n }", "public function getPreco()\n {\n return $this->preco;\n }", "public function getComuna()\n {\n return $this->comuna;\n }", "public function getComision() {\n\t\treturn $this->comision;\n\t}", "public function getHistoricoCalculo() {\n return $this->iHistoricoCalculo;\n }", "public function getComent()\n\t{\n\t\treturn $this->coment;\n\t}", "public function getRangoPrecio() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_precio');\n\n\t\t$rangoprecio_q = $query->getArrayResult();\n\t\t\n\t\tif(isset($rangoprecio_q[0])) $this->rangoprecio = intval($rangoprecio_q[0]['valor']);\n\t\telse $this->rangoprecio = 0;\n\n\t\treturn $this->rangoprecio;\n }", "public function getOrcamentado(){\n\t\t\n\t\t$orcamentado = 0;\n\t\tforeach($this->rubricas as $rub){\n\t\t\t$orcamentado += $rub->getOrcamentado($this->cod_projeto);\n\t\t}\n\t\t\n\t\treturn $orcamentado;\n\t}", "public function getMenor_convive_con_adulto()\r\n\t{\r\n\t\treturn($this->menor_convive_con_adulto);\r\n\t}", "public function obtenerColectivo();", "public function getPreco() {\n return $this->preco;\n }", "public function getCarrera( ){\n\t\treturn $this->carrera;\n\t}", "public function getCarrera( ){\n\t\treturn $this->carrera;\n\t}", "public function getOcrResult()\n {\n return $this->getValue('ocrResult');\n }", "public function getConsommation()\n {\n return $this->consommation;\n }", "public function getCorreta()\n {\n return $this->correta;\n }", "function monta_corpo()\n {\n if (isset($this->array_total_participante))\n {\n foreach ($this->array_total_participante as $campo_participante => $dados_participante)\n {\n $val_grafico_participante = $dados_participante[5];\n $this->resumo_campos = $dados_participante;\n $this->monta_linha($dados_participante[5], 0, \"normal\", \"&participante=\" . urlencode($val_grafico_participante) . \"\");\n if (isset($this->array_total_pista[$campo_participante]))\n {\n foreach ($this->array_total_pista[$campo_participante] as $campo_pista => $dados_pista)\n {\n $val_grafico_pista = $dados_pista[5];\n $this->resumo_campos = $dados_pista;\n $this->monta_linha($dados_pista[5], 1, \"normal\", \"\");\n } // foreach pista\n } // isset pista\n } // foreach participante\n } // isset participante\n }", "public function getNro_doc_tutor()\r\n\t{\r\n\t\treturn($this->nro_doc_tutor);\r\n\t}", "public function getRangoQuiebre() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_quiebre');\n\n\t\t$query = $query->getArrayResult();\n\t\t\n\t\tif(isset($query[0])) $this->rangoquiebre = intval($query[0]['valor']);\n\t\telse $this->rangoquiebre = 0;\n\n\t\treturn $this->rangoquiebre;\n }", "public function consumo()\n {\n try {\n $ultima = $this->lecturas->last()->Contador1;//ultima lectura\n\n $suministro = $this->conexion->suministros->last()->ValorLeido;\n \n\n $consumo = $ultima-$suministro;\n\n if($consumo < 0)\n {\n $consumo = $consumo + pow(10,$this->Digitos);///correccion\n }\n\n return round($consumo,0, PHP_ROUND_HALF_DOWN);\n } catch (\\Throwable $th) {\n return '-';\n }\n\n }", "public function getCIF()\n\t{\n\t\tif(is_null($this->cif)) $this->cif = $this->getFOB() + $this->flete->getTotalDolaresDUA() + $this->getSeguro();\n\n\t\treturn $this->cif;\n\t}" ]
[ "0.7737143", "0.75608665", "0.7401242", "0.73436934", "0.6785097", "0.66439015", "0.63776046", "0.63598394", "0.6183907", "0.6171249", "0.6147413", "0.613967", "0.61217237", "0.608746", "0.60697865", "0.60697865", "0.60697865", "0.6060941", "0.603345", "0.6029385", "0.6016737", "0.60101396", "0.59181386", "0.5811767", "0.5811767", "0.5811767", "0.5811767", "0.5811767", "0.5811767", "0.5811767", "0.5811767", "0.5811767", "0.5798695", "0.5797906", "0.5786783", "0.57552683", "0.5745861", "0.57320815", "0.56881666", "0.5686235", "0.5676142", "0.565981", "0.5658117", "0.5651618", "0.5632597", "0.5624667", "0.56212115", "0.5601195", "0.5595222", "0.5580821", "0.5577385", "0.5567071", "0.55653954", "0.55558205", "0.5554072", "0.5535837", "0.55334604", "0.55327225", "0.55272585", "0.5524795", "0.5507844", "0.5497849", "0.54875", "0.5486423", "0.54853874", "0.5479061", "0.54770505", "0.54719675", "0.5467346", "0.54661334", "0.5450972", "0.5443892", "0.54350895", "0.5434847", "0.54256403", "0.5421578", "0.54178834", "0.5417013", "0.54120386", "0.54120386", "0.54120386", "0.53978884", "0.539245", "0.5384358", "0.53760606", "0.53758866", "0.53672874", "0.53668445", "0.53661287", "0.5365619", "0.5359288", "0.5359288", "0.5345382", "0.5339239", "0.5327996", "0.5325811", "0.53219104", "0.5310101", "0.5308602", "0.53080106" ]
0.8746775
0
Set the value of docenciatecnicosuperiorOculto
Установите значение docenciatecnicosuperiorOculto
public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto) { $this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function setCobrodomicilio($p_cobrodomicilio){\r\n\t$this->cobrodomicilio=$p_cobrodomicilio;\r\n}", "private function oculto($itc=0){\r\n \tif ($this->arr_campo[$itc][\"cad_tipo_campo\"] == \"oculto\"){\r\n $obj = new com_edit_oculto($this->str_nome,$this->str_entidade,$this->bol_campo_requerido);\r\n $obj->str_valor = $this->arr_campo[$itc][\"valor\"];\r\n \t\t\t$obj->criar();\r\n \t}\r\n }", "public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior)\n\t{\n\t\t$this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior;\n\n\t\treturn $this;\n\t}", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "public function setCoeficienteEntornoContribuyente($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_coeficienteEntornoContribuyente != $data) {\n $this->_logChange('coeficienteEntornoContribuyente');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_coeficienteEntornoContribuyente = $data;\n } else if (!is_null($data)) {\n $this->_coeficienteEntornoContribuyente = (string) $data;\n } else {\n $this->_coeficienteEntornoContribuyente = $data;\n }\n return $this;\n }", "public function setLlenadoObligatorio($data)\n {\n\n if ($this->_llenadoObligatorio != $data) {\n $this->_logChange('llenadoObligatorio');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_llenadoObligatorio = $data;\n } else if (!is_null($data)) {\n $this->_llenadoObligatorio = (int) $data;\n } else {\n $this->_llenadoObligatorio = $data;\n }\n return $this;\n }", "public function setColeccionPropio($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->coleccion_propio !== $v || $this->isNew()) {\n\t\t\t$this->coleccion_propio = $v;\n\t\t\t$this->modifiedColumns[] = AlpzaMiembroAnexoPeer::COLECCION_PROPIO;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setCuloare($culoare)\n {\n $this->culoare = $culoare;\n }", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "function setSumaDeRecibo($monto = 0){ \t$this->mSumaDeRecibo = $monto;\t}", "public function setCouleur($couleur){\n //couleur : var d'instancet et $couleur est l'attribut\n $this->couleur = $couleur;\n }", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "public function setCodigoCalle($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_codigoCalle != $data) {\n $this->_logChange('codigoCalle');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_codigoCalle = $data;\n } else if (!is_null($data)) {\n $this->_codigoCalle = (int) $data;\n } else {\n $this->_codigoCalle = $data;\n }\n return $this;\n }", "public function setCuil($cuil) {\n $this->cuilSolicitante = $cuil;\n return $this;\n }", "public function setParroquiaOculto($parroquiaOculto)\n {\n $this->parroquiaOculto = $parroquiaOculto;\n\n return $this;\n }", "function modificarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_documento_categoria_clasificacion','id_documento_categoria_clasificacion','int4');\n\t\t$this->setParametro('id_categoria','id_categoria','int4');\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('documento','documento','varchar');\n\t\t$this->setParametro('presentar_legal','presentar_legal','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setCuerpo($cuerpo)\n {\n $this->cuerpo = $cuerpo;\n\n return $this;\n }", "public function setCodiCasa($value)\r\n {\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_casa = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "function modificarCulto(){\n\t\t$this->procedimiento='ccb.f_culto_ime';\n\t\t$this->transaccion='CCB_CUL_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_culto','id_culto','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_casa_oracion','id_casa_oracion','int4');\n\t\t$this->setParametro('dia','dia','varchar');\n\t\t$this->setParametro('hora','hora','time');\n\t\t$this->setParametro('tipo_culto','tipo_culto','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setCouleur($couleur) {\n $this->couleur = $couleur;\n }", "function modificarDocConcepto(){\n\t\t$this->procedimiento='conta.ft_doc_concepto_ime';\n\t\t$this->transaccion='CONTA_DOCC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_doc_concepto','id_doc_concepto','int4');\n\t\t$this->setParametro('id_doc_compra_venta','id_doc_compra_venta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_orden_trabajo','id_orden_trabajo','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad_sol','numeric');\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('precio_total_final','precio_total_final','numeric');\n\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 getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function setCriterioRateioCusto($iCriterio) {\n $this->iCriterioRateio = $iCriterio;\n\n }", "public function setDocente($docente){\n $this->docente = $docente;\n }", "public function setCoeficienteEntornoPueblo($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n\n if ($this->_coeficienteEntornoPueblo != $data) {\n $this->_logChange('coeficienteEntornoPueblo');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_coeficienteEntornoPueblo = $data;\n } else if (!is_null($data)) {\n $this->_coeficienteEntornoPueblo = (string) $data;\n } else {\n $this->_coeficienteEntornoPueblo = $data;\n }\n return $this;\n }", "public function setCouleur($couleur) {\r\n\t\t$this->couleur = $couleur;\r\n\t}", "public function setCuie($cuie) {\n $this->cuie = $cuie;\n }", "function Coche(){\n\t\t\t$this->rueda = 4;\n\t\t\t$this->color = \"\";\n\t\t\t$this->motor = 1.8;\n\t\t}", "public function setCreadopor($creadopor)\n {\n $this->creadopor = $creadopor;\n\n return $this;\n }", "public function setCantidadCocina($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->cantidad_cocina !== $v) {\n $this->cantidad_cocina = $v;\n $this->modifiedColumns[] = RequerimientoPeer::CANTIDAD_COCINA;\n }\n\n\n return $this;\n }", "public function setCouleur($couleur)\n {\n $this->couleur = $couleur;\n }", "public function setDataCriado($data_criado)\n {\n $this->data_criado = $data_criado;\n\n return $this;\n }", "function monta_corpo()\n {\n if (isset($this->array_total_participante))\n {\n foreach ($this->array_total_participante as $campo_participante => $dados_participante)\n {\n $val_grafico_participante = $dados_participante[5];\n $this->resumo_campos = $dados_participante;\n $this->monta_linha($dados_participante[5], 0, \"normal\", \"&participante=\" . urlencode($val_grafico_participante) . \"\");\n if (isset($this->array_total_pista[$campo_participante]))\n {\n foreach ($this->array_total_pista[$campo_participante] as $campo_pista => $dados_pista)\n {\n $val_grafico_pista = $dados_pista[5];\n $this->resumo_campos = $dados_pista;\n $this->monta_linha($dados_pista[5], 1, \"normal\", \"\");\n } // foreach pista\n } // isset pista\n } // foreach participante\n } // isset participante\n }", "public function setCodeCollaborateur(?string $codeCollaborateur): ConfidentialiteZones {\n $this->codeCollaborateur = $codeCollaborateur;\n return $this;\n }", "public function setPreco($preco) {\n $this->preco = $preco;\n }", "public function coseno(){\n $this->pantalla = cos((float)$this->pantalla);\n //Devuelve el valor en radianes\n }", "function posicionamentoCabecalho( scpdf $oPdf, $oDadosRelatorio) {\n\n $oPdf->SetXY(127, 10);\n\n $oPdf->SetFont('arial', 'bi', 7);\n $oPdf->Cell(154, $oDadosRelatorio->iAltura, $oDadosRelatorio->sPeriodo, 1, 1, 'C', 1);\n\n $oPdf->SetXY(127, 14);\n}", "public function getFinanciamientobecadocentesOculto()\n\t{\n\t\treturn $this->financiamientobecadocentesOculto;\n\t}", "public function getParroquiaOculto()\n {\n return $this->parroquiaOculto;\n }", "public function setIncoterm(?string $incoterm): self\n {\n $this->initialized['incoterm'] = true;\n $this->incoterm = $incoterm;\n\n return $this;\n }", "public function setCedula($cedula)\n{\n$this->cedula = $cedula;\n\nreturn $this;\n}", "public function setCodiCont($value)\n {\n //validando de que el valor sea un id\n if ($this->validateId($value)) {\n //seteando valor a la variable codigo\n $this->codi_cont = $value;\n //retornar true\n return true;\n } else {\n //retornar respuesta falso\n return false;\n }\n }", "public function setCustoAttribute($value)\n {\n $this->attributes['custo'] = $this->verificaAtributo($value);\n }", "protected function setDocumentosCidadao($oLinha) {\n\n if ($oLinha->num_identidade_pessoa == '') {\n $oLinha->num_identidade_pessoa = '0';\n }\n if (trim($oLinha->num_cpf_pessoa) == '') {\n $oLinha->num_cpf_pessoa = '00000000000';\n }\n $this->oCidadao->setIdentidade($oLinha->num_identidade_pessoa);\n $this->oCidadao->setCpfCnpj($oLinha->num_cpf_pessoa);\n }", "public function setCodiRecinte($codiRecinte) {\n\t\t$this->codiRecinte=$codiRecinte;\n\t}", "public function setCouId($cou_id)\n {\n $this->cou_id = $cou_id;\n\n return $this;\n }", "public function setCotToOv($doc,$usuario){\n try {\n $st=\"\";\n $ws= new Metodos();\n $credito = $ws->setSalesOrderCreditLimit($doc,$usuario);\n if ($credito === \"\") {\n $result = $this->getCredito($doc);\n $bloqueo = $result[0]['BLOCKED'];\n if($bloqueo === '0') {\n $st = 'OK';\n } else if ($bloqueo == '1') {\n $st = 'FAIL_BLOCK';\n }\n }else {\n $st=\"bloqueado\";\n }\n $this->log->kardexLog(\"Limite de credito parametros: \".$doc.\"-\".$usuario.\" resultado: \". json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),$doc,json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),1,'Limite de credito');\n return array(\"res\"=>$st,\"msj\"=>$credito);\n } catch (Exception $e) {\n $this->log->kardexLog(\"Limite de credito parametros: \".$doc.\"-\".$usuario.\" resultado: \". json_encode(array(\"res\"=>'error',\"msj\"=>'Intente de nuevo si el problema persiste verifique con sistemas','exception'=>$e)),$doc,json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),1,'Limite de credito');\n return array(\"res\"=>'error',\"msj\"=>'Intente de nuevo si el problema persiste verifique con sistemas','exception'=>$e);\n }\n }", "public function ukloniOcenu(){\n // gledaj dal je ocenjivo do sad.\n // ukloni ocenu\n // prikaze opet to jelo\n //znaci pozove prikazi.\n }", "private function emitirCorpo($iNumeroVia) {\n\n $sVeiculo = \"{$this->oAutorizacao->getVeiculo()->getModelo()} / {$this->oAutorizacao->getVeiculo()->getPlaca()}\";\n $sDataInicial = $this->oAutorizacao->getDataInicial()->getDate(DBDate::DATA_PTBR);\n $sDataFinal = $this->oAutorizacao->getDataFinal()->getDate(DBDate::DATA_PTBR);\n $sMotorista = $this->oAutorizacao->getMotorista()->getCGMMotorista()->getNomeCompleto();\n $sInstituicao = $this->oInstituicao->getDescricao();\n $sDepartamento = $this->oDepartamento->getNomeDepartamento();\n $sObservacao = $this->oAutorizacao->getObservacao();\n\n $sMensagem = \"O chefe do departamento {$sDepartamento}, no uso de suas atribuições, AUTORIZA o \";\n $sMensagem .= \"motorista {$sMotorista} a transitar com a viatura de placa {$sVeiculo} no período de {$sDataInicial} a {$sDataFinal}, a serviço \";\n $sMensagem .= \"da instituição {$sInstituicao}.\";\n\n $this->oPdf->setFontSize(10);\n $this->oPdf->setBold(true);\n $this->MultiCell($this->iLargura, $this->iAltura, \"Autorização Nº. {$this->oAutorizacao->getCodigo()}\");\n $this->oPdf->setBold(false);\n $this->oPdf->setFontSize(8);\n\n $this->Ln($this->iAltura);\n $this->MultiCell($this->iLargura, $this->iAltura, $sMensagem);\n if (!empty($sObservacao)) {\n\n $this->Ln($this->iAltura);\n $this->MultiCell($this->iLargura, $this->iAltura, \"Observação: {$sObservacao}\");\n }\n\n $this->imprimirAssinaturas();\n $this->MultiCell($this->iLargura, $this->iAltura, \"{$iNumeroVia}ª via\", 'B', 'R');\n }", "function modificarCorreoOficina(){\n\t\t$this->procedimiento='rec.ft_correo_oficina_ime';\n\t\t$this->transaccion='REC_cof_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_correo_oficina','id_correo_oficina','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('id_oficina','id_oficina','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_funcionario','id_funcionario','varchar');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\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 setDocenciaTecnicoSuperiorId($docenciaTecnicoSuperiorId)\n\t{\n\t\t$this->docenciaTecnicoSuperiorId = $docenciaTecnicoSuperiorId;\n\n\t\treturn $this;\n\t}", "public function setCinturaAttribute($input)\n {\n if ($input != '') {\n $this->attributes['cintura'] = $input;\n } else {\n $this->attributes['cintura'] = null;\n }\n }", "public function setIsOcContinuation($isOcContinuation = null)\n {\n // validation for constraint: boolean\n if (!is_null($isOcContinuation) && !is_bool($isOcContinuation)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a bool, \"%s\" given', gettype($isOcContinuation)), __LINE__);\n }\n if (is_null($isOcContinuation) || (is_array($isOcContinuation) && empty($isOcContinuation))) {\n unset($this->IsOcContinuation);\n } else {\n $this->IsOcContinuation = $isOcContinuation;\n }\n return $this;\n }", "function CAlcance($id,$nombre,$fecha_registro,$responsable_contratante,$responsable_contratista,$responsable_interventoria,$reunion,$estado,$observaciones,$registro,$operador,$da){\r\n\t\t$this->id \t\t\t\t\t\t= $id;\r\n\t\t$this->nombre \t\t\t\t\t= $nombre;\r\n\t\t$this->fecha_registro \t\t\t= $fecha_registro;\r\n\t\t$this->responsable_contratante \t= $responsable_contratante;\r\n\t\t$this->responsable_contratista \t= $responsable_contratista;\r\n\t\t$this->responsable_interventoria= $responsable_interventoria;\r\n\t\t$this->reunion \t\t\t\t\t= $reunion;\r\n\t\t$this->estado \t\t\t\t\t= $estado;\r\n\t\t$this->observaciones \t\t\t= $observaciones;\r\n\t\t$this->registro\t\t\t\t\t= $registro;\r\n\t\t$this->operador \t\t\t\t= $operador; \r\n\t\t$this->da \t\t\t\t\t\t= $da;\r\n\t}", "public function setCr($value) {\n\t\t$this->setParam('cr', $value);\n\t}", "public function CControl($id, $obligaciones, $responsable, $verificacion, \r\n $numeroDocumentoContractual) {\r\n $this->id = $id;\r\n $this->obligaciones = $obligaciones;\r\n $this->responsable = $responsable;\r\n $this->verificacion = $verificacion;\r\n $this->numeroDocumentoContractual = $numeroDocumentoContractual;\r\n }", "function setOds($ods) {\r\n\t\t$this->correo = $ods;\r\n\t}", "function conf__cuadro(toba_ei_cuadro $cuadro) {\n $cuadro->desactivar_modo_clave_segura();//para que no muestre la posición de la fila en el cuadro al volver del popUp\n if (!is_null($this->s__where)) {\n $datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre($this->s__where);\n $cuadro->set_datos($datos);\n } else {\n //no se hace nada para que el cuadro que no tenga datos de entrada (no carga todos los datos al inicio)\n //para evitar cargar todos los alumnos al comienzo\n //$datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre();\n }\n \n }", "public function setCorreo($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->correo !== $v) {\n $this->correo = $v;\n $this->modifiedColumns[] = comlabPeer::CORREO;\n }\n\n\n return $this;\n }", "public function setCodeCollaborateur(?string $codeCollaborateur): ChantiersReclamations {\n $this->codeCollaborateur = $codeCollaborateur;\n return $this;\n }", "public function __construct()\n {\n $this->cor = \"preto\";\n }", "public function setCoPessoa($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->co_pessoa !== $v) {\n $this->co_pessoa = $v;\n $this->modifiedColumns[] = PessoaPeer::CO_PESSOA;\n }\n\n\n return $this;\n }", "public function carga_cliente_manual_controlador($codigo_cliente, $cedula, $nombre, $direccion, $telefono, $pais, $webpage, $cumple, $email, $vendedor, $precio){\r\n\r\n $tipo_documento = \"Cedula\";\r\n $numero_documento= $cedula;\r\n\t\t\t$cliente_tipo= \"Personal\";\r\n\t\t\t$metodo_pago=\"Efectivo\";\r\n\r\n\t\t\tif($tipo_documento == null || $tipo_documento == \"\"){\r\n\t\t\t\t$tipo_documento = \"Cedula\";\r\n\t\t\t}\r\n\r\n\t\t\tif($pais == null || $pais == \"\"){\r\n\t\t\t\t$pais = \"PANAMA\";\r\n\t\t\t}\r\n\r\n\t\t\t$precio_valor = \"2.50\";\r\n\t\t\tif($precio == \"1 Precio Platinum\"){\r\n\t\t\t\t$precio_valor = \"2.35\";\r\n\t\t\t}\r\n\t\t\telseif ($precio == \"2 Precio de Gold\"){\r\n\t\t\t\t$precio_valor = \"2.40\";\r\n\t\t\t}\r\n\t\t\t/*== Buscando el nombre del vendedor ==*/\r\n\t\t\tif(isset($vendedor) || $vendedor != \"\" || $vendedor != null){\r\n\t\t\t\t$check_usuario=mainModel::ejecutar_consulta_simple(\"SELECT ifnull(usuario_nombre, 'Sin vendedor') as usuario_nombre FROM usuario WHERE usuario_id=$vendedor\");\r\n\t\t\t\t$usuario=$check_usuario->fetch();\r\n\t\t\t\t$usuario_nombre = $usuario['usuario_nombre'];\r\n\r\n\t\t\t\t$check_usuario->closeCursor();\r\n\t\t\t\t$check_usuario=mainModel::desconectar($check_usuario);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$vendedor = \"\";\r\n\t\t\t\t$usuario_nombre = \"\";\r\n\t\t\t}\r\n \r\n /*== Preparando datos para enviarlos al modelo ==*/\r\n\t\t\t$datos_cliente_reg=[\r\n \t\"cliente_codigo\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Codigo\",\r\n\t\t\t\t\t\"campo_valor\"=>$codigo_cliente\r\n ],\r\n\t\t\t\t\"cliente_tipo_documento\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Tipo\",\r\n\t\t\t\t\t\"campo_valor\"=>$tipo_documento\r\n ],\r\n \"cliente_numero_documento\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Numero\",\r\n\t\t\t\t\t\"campo_valor\"=>$numero_documento\r\n ],\r\n \"cliente_nombre\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Nombre\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($nombre)\r\n ],\r\n \"cliente_estado\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Pais\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($pais)\r\n ],\r\n \"cliente_direccion\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Direccion\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($direccion)\r\n ],\r\n \"cliente_cordenada\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Coordenada\",\r\n\t\t\t\t\t\"campo_valor\"=>\"\"\r\n ],\r\n \"cliente_telefono\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Telefono\",\r\n\t\t\t\t\t\"campo_valor\"=>$telefono\r\n ],\r\n \"cliente_email\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Email\",\r\n\t\t\t\t\t\"campo_valor\"=>$email\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_tipo\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":TipoCliente\",\r\n\t\t\t\t\t\"campo_valor\"=>$cliente_tipo\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_sitioweb\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Webpage\",\r\n\t\t\t\t\t\"campo_valor\"=>$webpage\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_vendedor_id\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":VendedorId\",\r\n\t\t\t\t\t\"campo_valor\"=>$vendedor\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_vendedor_nombre\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":VendedorNombre\",\r\n\t\t\t\t\t\"campo_valor\"=>$usuario_nombre\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_metodo_pago\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":MetodoPago\",\r\n\t\t\t\t\t\"campo_valor\"=>$metodo_pago\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_precio\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Precio\",\r\n\t\t\t\t\t\"campo_valor\"=>$precio_valor\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_cumpleaños\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Cumpleano\",\r\n\t\t\t\t\t\"campo_valor\"=>$cumple\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_ruta\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Ruta\",\r\n\t\t\t\t\t\"campo_valor\"=>\"\"\r\n\t\t\t\t]\r\n ];\r\n\r\n $agregar_cliente=mainModel::guardar_datos(\"cliente\",$datos_cliente_reg);\r\n\t\t\tif($agregar_cliente->rowCount()==0){\r\n\t\t\t\t$alerta=[\r\n\t\t\t\t\t\"Alerta\"=>\"simple\",\r\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\r\n\t\t\t\t\t\"Texto\"=>\"No hemos podido registrar el cliente, por favor intente nuevamente \".$codigo_cliente,\r\n\t\t\t\t\t\"Datos\"=>\"tipo_documento: \".$tipo_documento.\" numero_documento: \".$numero_documento.\" nombre: \".$nombre.\" pais: \".$pais.\" direccion: \".$direccion.\" telefono: \".$telefono.\" email: \".$email.\" cliente_tipo\".$cliente_tipo.\" vendedor: \".$vendedor.\" usuario_nombre: \".$usuario_nombre.\" precio_valor: \".$precio_valor.\" cumple: \".$cumple,\r\n\t\t\t\t\t\"Tipo\"=>\"error\"\r\n\t\t\t\t];\r\n\t\t\t\techo json_encode($alerta);\r\n\t\t\t}\r\n\r\n\t\t\t$agregar_cliente->closeCursor();\r\n\t\t\t$agregar_cliente=mainModel::desconectar($agregar_cliente);\r\n }", "public function setIradokizunBerria($data)\n {\n\n if ($this->_iradokizunBerria != $data) {\n $this->_logChange('iradokizunBerria');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_iradokizunBerria = $data;\n\n } else if (!is_null($data)) {\n $this->_iradokizunBerria = (int) $data;\n\n } else {\n $this->_iradokizunBerria = $data;\n }\n return $this;\n }", "function uploadCertification($doc){\n\t\t//category nya di set di term(certification) dan taxonomy(document_type)\n\t}", "public function setPrecioCompraAttribute($input)\n {\n $this->attributes['precio_compra'] = $input ? $input : null;\n }", "function imprimirRusiaChina($idCert,$idPais,$tresIdiomas,$esConsumoAnimal,$esMuestra){\n\t//Traer los datos para completar el modelo \n\t$datos = certificadosRetornaDatosParaImprimir($idCert);\n\n\t//creamos codigo de barra\n\t$codeBar = \"../classes/barcode/SAN\".$_SESSION['id_usuario'].\"-\".$datos['NumCert'].\".gif\";\n\t$anio = $datos['AñoAutorizacion'];\n\t$idCode = zerofill($datos['NumCert'], 8);\n\t$code = \"SAN\".$anio.$idCode;\t//lo usa sample-gd\n\trequire(\"../classes/barcode/sample-gd.php\");\n\t$codeBar = str_replace('..','',$codeBar);\n\t\n\tif ($idPais == 130){\n\t\t//CHINA 130\n\t\t$nombreArchivo = \"CHINA\";\n\t\t$nombreCSS = \"chinese.css\";\n\t\t//sale $codigo = \"...\";\n\t\trequire(\"../archivosPDF/chinaPDF.php\");\n\t}else{\n\t\t//RUSIA 133\n\t\t$nombreArchivo = \"RUSIA\";\n\t\t$nombreCSS = \"cyrillic.css\";\n\t\t//sale $codigo = \"...\";\n\t\trequire(\"../archivosPDF/rusiaPDF.php\");\n\t}\t\n\t\n\tforeach($datos as $key => $value){\t\t\n\t\t$codigo = str_replace(utf8_encode(\"#\".$key.\"#\"), utf8_encode($value), $codigo);\n\t}\n\t\n\t//marca de agua\n\t$retCircuito = admNoHayCircuitoAbierto($idCert ,'CERTIFICADOS');\n\tif (($retCircuito == 0) || (($datos['NumCert'] == 0) || ($_SESSION['tipo_acceso'] == 2))){\n\t\t$_SESSION['marcaAgua'] = true;\n\t}else{\n\t\t$_SESSION['marcaAgua'] = false;\t\t\n\t}\n\t\n\tif ($datos['NumeroCertR'] != 0){\n\t\t//#NumeroCertR#\n\t\t$codigo = str_replace(\"#NumeroCertR#\", $datos['NumeroCertR'], $codigo);\n\t\t//#FechaCertificadoR#\n\t\t$codigo = str_replace(\"#FechaCertificadoR#\", $datos['FechaCertificadoR'], $codigo);\n\t}\t\n\t\n\t//Traer leyendas\n\t$leyendas = certificadosRetornaTraduccionesImpresion();\t\t\n\tforeach ($leyendas as $each){\n\t\tif (($datos['NumeroCertR'] == 0) && (stristr($each['Rotulo'], 'ANULA'))){\n\t\t\t$codigo = str_replace(utf8_encode(\"#\".$each['Rotulo'].\"#\"), \"\", $codigo);\t\t\t\t\n\t\t}else{\n\t\t\t$codigo = str_replace(utf8_encode(\"#\".$each['Rotulo'].\"#\"), utf8_encode($each['Traduccion']), $codigo);\t\t\t\t\n\t\t}\n\t}\t\n\t\n\t$codigoListo = cargarCodigoHTML($codigo,$nombreCSS);\n\texportarAPDFOficio($codigoListo, $nombreArchivo ,$codeBar, traerCuve($idCert,'CERTIFICADOS'));\n\texit();\n}", "public function setColeccionOtro($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->coleccion_otro !== $v) {\n\t\t\t$this->coleccion_otro = $v;\n\t\t\t$this->modifiedColumns[] = AlpzaMiembroAnexoPeer::COLECCION_OTRO;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setDateFinDoc(?DateTime $dateFinDoc): ChantiersReclamations {\n $this->dateFinDoc = $dateFinDoc;\n return $this;\n }", "private function setCodigoCidadao($iCodigoCidadao) {\n \n $this->iCodigoCidadao = $iCodigoCidadao;\n }", "public function setCnpj($Novo_Cnpj){\r\n\t\t\t\t$this->cnpj = $Novo_Cnpj;\r\n\t\t\t}", "function setDataDeConsumo($dataDeConsumo) {\n $this->dataDeConsumo = $dataDeConsumo;\n }", "public function _setDataCarrera($data_carrera)\n {\n $this->data_carrera = $data_carrera;\n }", "public function setIdColecao($idColecao) {\n $this->idColecao = $idColecao;\n }", "public function setCodiSalo($value)\r\n {\r\n //validando de que el valor sea un id\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_salo = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "public function setUbicacionsucursal($ubicacionsucursal)\r\n {\r\n $this->ubicacionsucursal = $ubicacionsucursal;\r\n\r\n return $this;\r\n }", "public function setInterdirePubliDocWeb(?bool $interdirePubliDocWeb): Collaborateurs {\n $this->interdirePubliDocWeb = $interdirePubliDocWeb;\n return $this;\n }", "public function setContribuyenteId($data)\n {\n\n if ($this->_contribuyenteId != $data) {\n $this->_logChange('contribuyenteId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_contribuyenteId = $data;\n } else if (!is_null($data)) {\n $this->_contribuyenteId = (int) $data;\n } else {\n $this->_contribuyenteId = $data;\n }\n return $this;\n }", "function setCentroCargoComissionado( $idCentro, $idCargoComissionado, $idProfessor ) {\r\n\t\t$conexao = Conexao::con();\r\n\r\n\t\t$sql[] = \"SELECT COUNT(*) AS count FROM centrocargocomissionado c\";\r\n\t\t$sql[] = \"WHERE id_cargocomissionado = {$idCargoComissionado}\";\r\n\t\t$sql[] = \"AND id_centro = {$idCentro}\";\r\n\t\t$query = mysqli_query( $conexao, join( ' ', $sql ) );\r\n\t\tunset( $sql );\r\n\r\n\t\t$count = mysqli_fetch_array( $query, MYSQL_ASSOC );\r\n\t\tif ( $count['count'] == 1 ) {\r\n\t\t\t$sql[] = \"UPDATE centrocargocomissionado\";\r\n\t\t\t$sql[] = \"SET id_professor = '{$idProfessor}'\";\r\n\t\t\t$sql[] = \"WHERE id_cargocomissionado = {$idCargoComissionado}\";\r\n\t\t\t$sql[] = \"AND id_centro = {$idCentro}\";\r\n\t\t\t$sql[] = \"LIMIT 1\";\r\n\t\t} else {\r\n\t\t\t$sql[] = \"INSERT INTO centrocargocomissionado\";\r\n\t\t\t$sql[] = \"(id_cargocomissionado, id_professor, id_centro)\";\r\n\t\t\t$sql[] = \"VALUES\";\r\n\t\t\t$sql[] = \"('{$idCargoComissionado}', '{$idProfessor}', '{$idCentro}')\";\r\n\t\t}\r\n\r\n\t\tif ( mysqli_query( $conexao, join( ' ', $sql ) ) ) {\r\n\t\t\t$return->result = 1;\r\n\t\t\t$return->msg = 'Atualizacao realizada com sucesso';\r\n\t\t} else {\r\n\t\t\t$return->result = 0;\r\n\t\t\t$return->msg = 'Erro ao realizar atualizacao';\r\n\t\t\t$return->error = mysqli_error( $conexao );\r\n\t\t}\r\n\t\treturn $return;\r\n\t}", "public function getCouId()\n {\n return $this->cou_id;\n }", "public function setCni($cni)\n {\n $this->cni = $cni;\n\n return $this;\n }", "public function setSocioId($value)\r\n\t{\r\n\t\t$this->Util()->ValidateInteger($value);\r\n\t\t$this->socioId = $value;\r\n\t}", "public function setCouleur($couleur)\n {\n $this->couleur = $couleur;\n\n return $this;\n }", "public function setCouleur($couleur)\n {\n $this->couleur = $couleur;\n\n return $this;\n }", "public function devolverUltimoColectivo();", "public function setIdContribuinte($iIdContribuinte) {\n $this->id_contribuinte = $iIdContribuinte;\n }", "public function sOrden(){\r\n\t\tparent::conectaBDMy();\t\r\n\t\t$this->idSolicitud_reembolso=\"\"; \r\n\t\t$this->tipoBeneficiario=\"\";\r\n\t\t$this->cedTitular=\"\";\r\n\t\t$this->idTitular=\"\";\r\n\t\t$this->idBeneficiario=\"\";\r\n\t\t$this->observacion=\"\";\r\n\t\t$this->diagnostico=\"\";\r\n\t\t$this->idDetalle_cobertura=\"\";\r\n\t\t$this->idCobertura=\"\";\r\n\t\t$this->idRecaudos=\"\";\r\n\t\t$this->idSolicitud_recaudos=\"\";\r\n\t\t$this->motivo=\"\";\t\r\n\t\t$this->monto=\"\";\t\r\n\t\t$this->montoDisponible=\"\";\t\r\n\t\t$this->idServicio=\"\";\r\n\t\t$this->codHoja=\"\";\r\n\t\t}", "public function __doExecute()\n {\n parent::__doExecute();\n\n// if($this->_object->i_IOID)\n// {\n// $this->_object->getFieldByCode('SoPhieu')->bReadOnly = true;\n// }\n }", "public function setPreco($preco)\n {\n $this->preco = $preco;\n\n return $this;\n }", "public function setDomicilio($p_domicilio){\r\n\t$this->domicilio=$p_domicilio;\r\n}", "public function __construct() {\n\n $this->cena = 0;\n\n }" ]
[ "0.7681365", "0.7256629", "0.71716726", "0.6897664", "0.66576385", "0.66411394", "0.6335637", "0.6326201", "0.5781382", "0.56918454", "0.54628897", "0.5208211", "0.51508087", "0.5117822", "0.5107852", "0.5107816", "0.5104319", "0.509899", "0.5091746", "0.5049238", "0.5046708", "0.49968582", "0.49762264", "0.4950941", "0.49426308", "0.4938475", "0.49358", "0.49302626", "0.49261752", "0.49236256", "0.49183348", "0.4912875", "0.48998502", "0.4891991", "0.48815683", "0.48799148", "0.48686433", "0.48651323", "0.4849289", "0.4842049", "0.4841036", "0.48246247", "0.48157373", "0.48074788", "0.47921625", "0.4789558", "0.47871858", "0.47868705", "0.4781626", "0.4781419", "0.4777315", "0.47718552", "0.4763158", "0.4756975", "0.47534952", "0.47525635", "0.4746951", "0.47348216", "0.4732222", "0.4729114", "0.47289824", "0.47119507", "0.47090167", "0.47000548", "0.46993595", "0.46943876", "0.4690416", "0.4677149", "0.46726888", "0.4665179", "0.46641082", "0.46577546", "0.46540523", "0.4650805", "0.46485114", "0.46447927", "0.4642414", "0.4638061", "0.46356863", "0.46331924", "0.462492", "0.4607634", "0.46004915", "0.4597152", "0.45952946", "0.45859218", "0.45857626", "0.45842132", "0.45802823", "0.4577301", "0.45734656", "0.45716247", "0.45716247", "0.45697325", "0.45669755", "0.4564878", "0.45641842", "0.45623025", "0.4561877", "0.45605928" ]
0.8097579
0
Get the value of docenciatecnicosuperiorAccion
Получить значение docenciatecnicosuperiorAccion
public function getDocenciatecnicosuperiorAccion() { return $this->docenciatecnicosuperiorAccion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function getAccion()\n\t{\treturn $this->accion;\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function getAccion() {\r\n return $this->pAccion;\r\n }", "protected function getAccion() {\n return $this->transformarCamelCase($this->parametros['accion']);\n }", "public function getNiveauAccreditation()\n {\n return $this->niveauAccreditation;\n }", "function getAccreditation() {\r\n\t\treturn $this->getData('accreditation');\r\n\t}", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getFinanciamientobecadocentesAccion()\n\t{\n\t\treturn $this->financiamientobecadocentesAccion;\n\t}", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "public function getAccionId()\n {\n return $this->accion_id;\n }", "public function getUbicacionsucursal()\r\n {\r\n return $this->ubicacionsucursal;\r\n }", "public function getCuil() {\n return $this->cuilSolicitante;\n \n }", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function getAccident()\n {\n return $this->accident;\n }", "public function getParroquiaAccion()\n {\n return $this->parroquiaAccion;\n }", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function getContribucion_marginal_valor()\n {\n return $this->contribucion_marginal_valor;\n }", "function DameIdProximoCatOcup()\r\n {\r\n return $this->modelcatocup->buscaridproximo();\r\n\r\n }", "protected function _getAutorisation() {\n $accesNum = 0;\n $autorisation = $this->Session->read('authentification.autorisation');\n if (!empty($autorisation)) {\n foreach ($autorisation as $valeur) {\n if ($valeur['id'] > $accesNum) {\n $accesNum = $valeur['id'];\n }\n }\n }\n return $accesNum;\n }", "public function getAcreditacionOtra()\n\t{\n\t\treturn $this->acreditacion_otra;\n\t}", "function DameIdProximoCatCvil()\r\n {\r\n return $this->modelcatcvil->buscaridproximo();\r\n\r\n }", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "public function getActa_consejo(){\n return $this->acta_consejo;\n }", "public function getRicerca() {\n if (isset($_REQUEST['ricerca'])) {\n return $_REQUEST['ricerca'];\n } else\n return 0;\n }", "public function getCodigoContrato() {\n\n $oDaoEmpenhoContrato = db_utils::getDao(\"empempenhocontrato\");\n $sSqlContrato = $oDaoEmpenhoContrato->sql_query_file(null,\n \"e100_acordo\",\n null,\n \"e100_numemp = {$this->getNumero()}\"\n );\n\n $rsContrato = $oDaoEmpenhoContrato->sql_record($sSqlContrato);\n if ($oDaoEmpenhoContrato->numrows > 0) {\n return db_utils::fieldsMemory($rsContrato, 0)->e100_acordo;\n }\n }", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "function DameIdProximoSbCate()\r\n {\r\n return $this->modelsubcate->buscaridproximo();\r\n\r\n }", "public function getNivel_academico(){\n return $this->nivel_academico;\n }", "public function getAnulacion() {\n\t\treturn $this->anulacion;\n\t}", "public function getCoxa()\n {\n return $this->coxa;\n }", "public function contractorLicence()\n {\n $doc = CompanyDoc::where('category_id', 7)->where('for_company_id', $this->id)->where('status', '1')->first();\n return ($doc && $doc->ref_no) ? $doc->ref_no : '';\n }", "public function getAccesoOperacion() {\n\t\treturn $this->strOperacion_Acceso;\n\t}", "public function getCuie() {\n return $this->cuie;\n }", "public function getCouleur()\n\t{\n\t\treturn $this->couleur;\n\t}", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getArticulacion_con_institucion()\n {\n return $this->articulacion_con_institucion;\n }", "public function getComunicazioneCodice()\n {\n return $this->comunicazione_codice;\n }", "public function getContratista()\n {\n return $this->contratista;\n }", "public function getCouleur() {\n return $this->couleur;\n }", "public function getOcupacion(){\n return $this->ocupacion;\n }", "public function curric_code() {\n global $DB;\n return $DB->get_field('enrol_ues_usermeta', 'value', array('userid'=>$this->userid, 'name'=>'user_major'));\n }", "public function getLicenciaConducir() {\n return $this->LicenciaConducir;\n }", "public function getId_Cancion()\n {\n return $this->id_cancion;\n }", "public function getIdConvenio()\n {\n return $this->idConvenio;\n }", "public function getSuco();", "function getContingencia(){\r\n return $this->contingencia;\r\n }", "public function getContratassurance()\n {\n return $this->contratassurance;\n }", "public function getFkImaCagedAutorizadoCei()\n {\n return $this->fkImaCagedAutorizadoCei;\n }", "public function getCouleur() {\r\n\t\treturn $this->couleur;\r\n\t}", "public function getAvanceResponsableMetaSecundaria( ){\n if( !empty( $this->avanceResponsableMetaSecundaria ) ){\n return $this->avanceResponsableMetaSecundaria;\n }else{\n return 0;\n } \n }", "public function getDocente(){\n return $this->docente;\n }", "public function getAutreContrat() {\n return $this->autreContrat;\n }", "public function getAccession() {\n return $this->accession;\n }", "public function getInfCTeNormInfDocInfNFeChave()\n {\n return $this->infCTeNorm_infDoc_infNFe_chave;\n }", "public function getCedula()\n{\nreturn $this->cedula;\n}", "public function getId_incidencia()\n {\n return $this->id_incidencia;\n }", "function ctlAcceuil()\n\t{\n\t\tafficherAccueil(); // appelle la fonction pour afficher l'acceuil de site\n\t}", "public function getCnsc(){\n return $this->cnsc;\n }", "public function getLicencia()\r\n\t\t{\r\n\t\t\treturn $this->_nro_licencia;\r\n\t\t}", "public function getCedula(){\n return $this->cedula;\n }", "function getAffichage ( ) {\r\n/*****************************************************************************/\r\n \r\n return $this->af ;\r\n\r\n}", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getFctDocumentsAutre() {\n return $this->fctDocumentsAutre;\n }", "public function getColeccionPropio()\n\t{\n\t\treturn $this->coleccion_propio;\n\t}", "public function getDOCUMENT_PRODUCT_COFINS_ALIQUOTA()\n {\n return $this->DOCUMENT_PRODUCT_COFINS_ALIQUOTA;\n }", "public function getOccupationalCategory();", "public function getCctbconfuseodue()\n {\n return $this->cctbconfuseodue;\n }", "public function hasAcc(){\n return $this->_has(15);\n }", "function count_accu()\n\t{\n\t\t$result = $this -> currdb -> sql_fetch_array($this -> currdb -> sql_query(\"SELECT `value` FROM `ac_config` WHERE `var_name` = 'counter_accu'\"));\n\t\treturn intval($result['value']);\n\t}", "public function getCuenta()\n {\n return $this->empresas->cuenta;\n }", "public function getCodigo(){\n\t\treturn $this->catcod;\n\t}", "public function getCouId()\n {\n return $this->cou_id;\n }", "public function getCantidadCocina()\n {\n return $this->cantidad_cocina;\n }", "public function getCONSULTA()\n {\n return $this->CONSULTA;\n }", "public function getCodigoCidadao() {\n \n return $this->iCodigoCidadao;\n }", "function modificarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_documento_categoria_clasificacion','id_documento_categoria_clasificacion','int4');\n\t\t$this->setParametro('id_categoria','id_categoria','int4');\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('documento','documento','varchar');\n\t\t$this->setParametro('presentar_legal','presentar_legal','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getClienteCiudadfiscal()\n {\n\n return $this->cliente_ciudadfiscal;\n }", "public function getColeccionOtro()\n\t{\n\t\treturn $this->coleccion_otro;\n\t}", "public function getUF() {\n return $this->oCensoUf;\n }", "public function getCobranca()\n {\n return $this->cobranca;\n }", "public function getContrasenia()\n {\n return $this->contrasenia;\n }", "public function getUsu_clave()\n {\n return $this->usu_clave;\n }", "function DameIdProximoCargCivl()\r\n {\r\n return $this->modelcargocvil->buscaridproximo();\r\n\r\n }", "public function getDataCriado()\n {\n return $this->data_criado;\n }" ]
[ "0.7562908", "0.7478036", "0.7314452", "0.71479493", "0.66410977", "0.66127384", "0.6564338", "0.6418767", "0.6242707", "0.6044208", "0.6025301", "0.59860605", "0.5969121", "0.59176356", "0.59154016", "0.58870095", "0.5825581", "0.581465", "0.58076584", "0.58013386", "0.57280594", "0.57224756", "0.5682946", "0.5678244", "0.5675226", "0.5622263", "0.5590218", "0.556472", "0.5552149", "0.55466115", "0.5538572", "0.5537897", "0.5529356", "0.5511403", "0.5498271", "0.54757404", "0.5470813", "0.5469765", "0.54693526", "0.5462431", "0.5460402", "0.5460402", "0.5460402", "0.54594666", "0.5451762", "0.54351276", "0.5433117", "0.5429558", "0.5420476", "0.5416248", "0.54003227", "0.53798866", "0.5369442", "0.5364222", "0.5360841", "0.5357584", "0.53477854", "0.5340775", "0.53402853", "0.53376406", "0.5328793", "0.53249305", "0.53247565", "0.5322125", "0.5316262", "0.5315168", "0.5306123", "0.53015494", "0.5301497", "0.5293615", "0.5293615", "0.5293615", "0.5293615", "0.5293615", "0.5293615", "0.5293615", "0.5293615", "0.5293615", "0.5290997", "0.5289956", "0.5289514", "0.5288667", "0.52824444", "0.52789533", "0.5277825", "0.5277544", "0.52642655", "0.5262732", "0.5262629", "0.52605176", "0.5257986", "0.5256186", "0.5252781", "0.52524215", "0.5248976", "0.52457225", "0.5243161", "0.5240587", "0.52321637", "0.522813" ]
0.8831688
0
Set the value of docenciatecnicosuperiorAccion
Задайте значение docenciatecnicosuperiorAccion
public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion) { $this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "function modificarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_documento_categoria_clasificacion','id_documento_categoria_clasificacion','int4');\n\t\t$this->setParametro('id_categoria','id_categoria','int4');\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('documento','documento','varchar');\n\t\t$this->setParametro('presentar_legal','presentar_legal','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "function ctlAcceuil()\n\t{\n\t\tafficherAccueil(); // appelle la fonction pour afficher l'acceuil de site\n\t}", "public function setAccion($pAccion) {\r\n $this->pAccion = $pAccion;\r\n return $this;\r\n }", "function uploadCertification($doc){\n\t\t//category nya di set di term(certification) dan taxonomy(document_type)\n\t}", "public function setAccion($parametro)\n\t{\t$this->accion\t= $parametro;\t}", "public function getFinanciamientobecadocentesAccion()\n\t{\n\t\treturn $this->financiamientobecadocentesAccion;\n\t}", "public function getAccion()\n\t{\treturn $this->accion;\t}", "public function setReu_comboAcc()\n {\n $this->oComboAcc = new AccompagnateurModele(array());\n $this->reu_comboAcc = $this->oComboAcc->getComboAcc();\n }", "function insertarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_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_categoria','id_categoria','int4');\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('documento','documento','varchar');\n\t\t$this->setParametro('presentar_legal','presentar_legal','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getAccion() {\r\n return $this->pAccion;\r\n }", "function modificarDocConcepto(){\n\t\t$this->procedimiento='conta.ft_doc_concepto_ime';\n\t\t$this->transaccion='CONTA_DOCC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_doc_concepto','id_doc_concepto','int4');\n\t\t$this->setParametro('id_doc_compra_venta','id_doc_compra_venta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_orden_trabajo','id_orden_trabajo','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad_sol','numeric');\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('precio_total_final','precio_total_final','numeric');\n\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}", "function calificarViabilidadUseradc($pro, $cri, $cal, $num, $obs, $tipo)\n {\n $response = \"\";\n // verifica que el criterios exista\n if ($this->verificarCriAdicionalUser($pro, $cri,$_COOKIE['user_code'])) {\n // actualizar la calificacion \n mysqli_query(\n $this->conexion,\n \"UPDATE `calificacion_adicional` SET `calificacion` = '$cal',`observacion` = '$obs', `fecha` = '\" . date('Y-m-d') . \"', `usuario` = '$_COOKIE[user_code]',n_pun=$num WHERE `id_criterio`=$cri and `id_propuesta`=$pro and usuario=$_COOKIE[user_code]\"\n );\n\n if (mysqli_affected_rows($this->conexion) > 0) {\n $response = \"Calificación guardada\";\n } else {\n $response = \"No se alteró de la calificación\";\n }\n } else {\n // guardar la calificacion \n mysqli_query(\n $this->conexion,\n \"INSERT INTO `calificacion_adicional` (`id_criterio`, `id_propuesta`, `calificacion`, `observacion`, `fecha`, `usuario`,n_pun) VALUES ('$cri', '$pro', '$cal','$obs','\" . date('Y-m-d') . \"','$_COOKIE[user_code]',$num)\"\n );\n\n if (mysqli_affected_rows($this->conexion) > 0) {\n $response = \"Calificación guardada\";\n } else {\n $response = \"No se guardo de la calificación\";\n }\n }\n\n echo $response;\n }", "public function testSetIndiceAff() {\n\n $obj = new ActionsCoManif();\n\n $obj->setIndiceAff(10);\n $this->assertEquals(10, $obj->getIndiceAff());\n }", "public function DistritoAccesoDatos() {\n //Se establece la coneccion a la base de datos\n parent::ConexionAccesoDatos();\n }", "function eliminarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_documento_categoria_clasificacion','id_documento_categoria_clasificacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function testSetAccident() {\n\n $obj = new AttestationAt();\n\n $obj->setAccident(true);\n $this->assertEquals(true, $obj->getAccident());\n }", "private function setCodigoCidadao($iCodigoCidadao) {\n \n $this->iCodigoCidadao = $iCodigoCidadao;\n }", "function dibujaCuadrosIguales($pdf,$objt,$cuadros,$estiloCell,$ancho=186){\n\t\t$objetos=array('pdf','objt');\n\t\tforeach($objetos as $objT){\n\t\t\t//\t\t\t$$objT->setY($this->limite);\n\t\t\t$$objT->SetFont('helvetica', $estiloCell[1], $estiloCell[0]);\n\t\t\t\n\t\t\t$tf=$estiloCell[0];\n\t\t\t$ef=$estiloCell[1];\n\t\t\t$h=$estiloCell[3];\n\t\t\t$borde=$estiloCell[4];\n\n\t\t\t$align=$estiloCell[6];\n\t\t\t$fill=$estiloCell[7];\n\t\t\t$str=$estiloCell[8];\n\t\t\t$calign=$estiloCell[9];\n\t\t\t$valign=$estiloCell[10];\n\t\t\t//$$objT->setFont($this->fuenteArreglo,$ef,$tf);\n\t\t\tforeach($cuadros as $cuadro){\n\t\t\t\t$cant=count($cuadro);\n\t\t\t\tif($estiloCell[2]!=0 && $estiloCell[2]<=186){\n\t\t\t\t\t$ancho=$estiloCell[2];\n\t\t\t\t}\n\n\t\t\t\t$w=$ancho/$cant;\n\t\t\t\tforeach($cuadro as $c){\n\t\t\t\t\t$$objT->Cell($w,$h,$c,$borde,0,$align,$fill,'',$str,false,$calign,$valign);\n\n\t\t\t\t}\n\t\t\t\tif($estiloCell[5]==1) $$objT->Ln();\n\t\t\t}\n\t\t}\n\t}", "public function getUbicacionsucursal()\r\n {\r\n return $this->ubicacionsucursal;\r\n }", "function itineraires_autoriser(){}", "public function accionMiCuenta(){\n $acceso = Sistema::app()->acceso();\n\n switch($_COOKIE[\"lang\"]){\n case(\"en\"): \n $palabras = [\"Your account\",\"Hello\",\"here you will find all the information about your profile\",\n \"My data\",\"Next trips\",\"Trips history\"];\n break;\n\n default: \n $palabras = [\"Tu cuenta\",\"Hola\",\"aquí encontraras toda la información sobre tu perfil\",\n \"Mis datos\",\"Próximos viajes\",\"Historial de viajes\"]; \n break;\n }\n\n //Si estas logueado accedes a tu cuenta, sino no tienes permiso\n if ($acceso->hayUsuario()){\n\n $var = $acceso->getNif();\n $var = Sistema::app()->BD()->crearConsulta(\"SELECT `nombre`, `apellidos` FROM perfiles WHERE `nif`='$var'\")->fila();\n $var = $var[\"nombre\"].\" \".$var[\"apellidos\"];\n\n $opciones = array(\n \"datos\"=> Sistema::app()->generaURL(array(\"logueo\",\"MisDatos\")),\n \"proximos\"=> Sistema::app()->generaURL(array(\"logueo\",\"Viajes\")).\"?op=1\",\n \"anteriores\" => Sistema::app()->generaURL(array(\"logueo\",\"Viajes\")).\"?op=2\"\n );\n\n $this->dibujaVista(\"cuenta\",array(\"nombre\"=>$var,\"op\"=>$opciones,\"palabras\"=>$palabras),$palabras[0]);\n }\n \n else\n Sistema::app()->irAPagina(array(\"logueo\",\"Formulario\"));\n }", "function imprimirRusiaChina($idCert,$idPais,$tresIdiomas,$esConsumoAnimal,$esMuestra){\n\t//Traer los datos para completar el modelo \n\t$datos = certificadosRetornaDatosParaImprimir($idCert);\n\n\t//creamos codigo de barra\n\t$codeBar = \"../classes/barcode/SAN\".$_SESSION['id_usuario'].\"-\".$datos['NumCert'].\".gif\";\n\t$anio = $datos['AñoAutorizacion'];\n\t$idCode = zerofill($datos['NumCert'], 8);\n\t$code = \"SAN\".$anio.$idCode;\t//lo usa sample-gd\n\trequire(\"../classes/barcode/sample-gd.php\");\n\t$codeBar = str_replace('..','',$codeBar);\n\t\n\tif ($idPais == 130){\n\t\t//CHINA 130\n\t\t$nombreArchivo = \"CHINA\";\n\t\t$nombreCSS = \"chinese.css\";\n\t\t//sale $codigo = \"...\";\n\t\trequire(\"../archivosPDF/chinaPDF.php\");\n\t}else{\n\t\t//RUSIA 133\n\t\t$nombreArchivo = \"RUSIA\";\n\t\t$nombreCSS = \"cyrillic.css\";\n\t\t//sale $codigo = \"...\";\n\t\trequire(\"../archivosPDF/rusiaPDF.php\");\n\t}\t\n\t\n\tforeach($datos as $key => $value){\t\t\n\t\t$codigo = str_replace(utf8_encode(\"#\".$key.\"#\"), utf8_encode($value), $codigo);\n\t}\n\t\n\t//marca de agua\n\t$retCircuito = admNoHayCircuitoAbierto($idCert ,'CERTIFICADOS');\n\tif (($retCircuito == 0) || (($datos['NumCert'] == 0) || ($_SESSION['tipo_acceso'] == 2))){\n\t\t$_SESSION['marcaAgua'] = true;\n\t}else{\n\t\t$_SESSION['marcaAgua'] = false;\t\t\n\t}\n\t\n\tif ($datos['NumeroCertR'] != 0){\n\t\t//#NumeroCertR#\n\t\t$codigo = str_replace(\"#NumeroCertR#\", $datos['NumeroCertR'], $codigo);\n\t\t//#FechaCertificadoR#\n\t\t$codigo = str_replace(\"#FechaCertificadoR#\", $datos['FechaCertificadoR'], $codigo);\n\t}\t\n\t\n\t//Traer leyendas\n\t$leyendas = certificadosRetornaTraduccionesImpresion();\t\t\n\tforeach ($leyendas as $each){\n\t\tif (($datos['NumeroCertR'] == 0) && (stristr($each['Rotulo'], 'ANULA'))){\n\t\t\t$codigo = str_replace(utf8_encode(\"#\".$each['Rotulo'].\"#\"), \"\", $codigo);\t\t\t\t\n\t\t}else{\n\t\t\t$codigo = str_replace(utf8_encode(\"#\".$each['Rotulo'].\"#\"), utf8_encode($each['Traduccion']), $codigo);\t\t\t\t\n\t\t}\n\t}\t\n\t\n\t$codigoListo = cargarCodigoHTML($codigo,$nombreCSS);\n\texportarAPDFOficio($codigoListo, $nombreArchivo ,$codeBar, traerCuve($idCert,'CERTIFICADOS'));\n\texit();\n}", "function setAvalDeCredito($clave_de_aval, $contar = \"\", $datos = false ){\n\t}", "function CategoriaDocumento($DB){\n\t\t// Conexion\n\t\t$this->Table($DB, 'categoria_documento');\n\t\t$this->AccionesGrid = array(ACC_BAJA,ACC_MODIFICACION,ACC_CONSULTA);\n\t}", "protected function setDocumentosCidadao($oLinha) {\n\n if ($oLinha->num_identidade_pessoa == '') {\n $oLinha->num_identidade_pessoa = '0';\n }\n if (trim($oLinha->num_cpf_pessoa) == '') {\n $oLinha->num_cpf_pessoa = '00000000000';\n }\n $this->oCidadao->setIdentidade($oLinha->num_identidade_pessoa);\n $this->oCidadao->setCpfCnpj($oLinha->num_cpf_pessoa);\n }", "public function getNiveauAccreditation()\n {\n return $this->niveauAccreditation;\n }", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function setcvaccess($accs) {\n\t\tif( !is_numeric( $accs ) || $accs < 0 || $accs > 255 ) $accs = 0;\n\t\t$result = $this->resdb->query(\"update cvs set cv_status = $accs where cv_ph_id = $this->uid\"); /* and chunk=0 */\n\t\tif( !$result ) throw new Exception(DEBUG?$this->resdb->error:'Can not set CV access level',__LINE__);\n\t\treturn $result;\n\t}", "public function setOcupacion($value){\n if($this->validateAlphabetic($value, 1, 100)){\n $this->ocupacion = $value;\n return true;\n }else{\n return false;\n }\n }", "function modificarClasificacion(){\n\t\t$this->procedimiento='af.ft_clasificacion_ime';\n\t\t$this->transaccion='AF_CLAS_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('sw_dep','sw_dep','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('correlativo_act','correlativo_act','int4');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_clasificacion_fk','id_clasificacion_fk','int4');\n\t\t$this->setParametro('nivel','nivel','int4');\n\t\t$this->setParametro('vida_util','vida_util','int4');\n\t\t$this->setParametro('ini_correlativo','ini_correlativo','int4');\n\t\t$this->setParametro('id_metodo_depreciacion','id_metodo_depreciacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function setDocente($docente){\n $this->docente = $docente;\n }", "public function getFkImaCagedAutorizadoCei()\n {\n return $this->fkImaCagedAutorizadoCei;\n }", "public function setCriterioRateioCusto($iCriterio) {\n $this->iCriterioRateio = $iCriterio;\n\n }", "public function accueil() {\n global $chemin, $lesVues;\n\n $m = new ModeleDonnees();\n\n $nbPages = $m->getNbPagesPub();\n\n $page = (isset($_GET['page'])) ? Validation::val_int($_GET['page'], $this->tableauErreur) : 1;\n $page = 0 ? 1 : $page; //si la page est à zéro, on la met à 1, sinon on la laisse\n\n if (!empty($this->tableauErreur)) {\n require($chemin . $lesVues['erreur']);\n }\n else {\n $tabPub = $m->getListesPubliques($page);\n require($chemin . $lesVues['accueil']);\n }\n }", "public function getAccionId()\n {\n return $this->accion_id;\n }", "private function setRightsMenu_in_personal_docs_countries() {\n try {\n $pdcountr_list_id = App\\Libraries\\DBHelper::getListByTable('in_personal_docs_countries')->id; \n }\n catch(\\Exception $e) {\n $obj_id = DB::table('dx_objects')->insertGetId(['db_name' => 'in_personal_docs_countries', 'title' => 'Employee countries documents' , 'is_history_logic' => 1]);\n\n $list_gen = new Structure\\StructMethod_register_generate();\n $list_gen->obj_id = $obj_id;\n $list_gen->register_title = \"Employee countries documents\";\n $list_gen->form_title = \"Country document\";\n $list_gen->doMethod();\n \n $pdcountr_list_id = App\\Libraries\\DBHelper::getListByTable('in_personal_docs_countries')->id;\n }\n \n // rights\n DB::table('dx_roles_lists')->where('list_id','=',$pdcountr_list_id)->delete(); \n DB::table('dx_roles_lists')->insert(['role_id' => 39, 'list_id' => $pdcountr_list_id, 'is_edit_rights' => 1, 'is_delete_rights' => 1, 'is_new_rights' => 1]); //HR\n DB::table('dx_roles_lists')->insert(['role_id' => 1, 'list_id' => $pdcountr_list_id, 'is_edit_rights' => 1, 'is_delete_rights' => 1, 'is_new_rights' => 1]); // Sys admins\n\n // menu\n DB::table('dx_menu')->where('list_id','=',$pdcountr_list_id)->delete(); \n DB::table('dx_menu')->insert(['parent_id' => 252, 'title'=>'Employee countries documents', 'list_id'=>$pdcountr_list_id, 'order_index' => (DB::table('dx_menu')->where('parent_id', '=', 252)->max('order_index')+10), 'group_id'=>1, 'position_id' => 1]);\n\n }", "public function reConfSubAcc(){\n\t\t\n\t\tglobal $db;\n\t\t\n\t\t# Get Current List\n\t\t$currList = $db->where('set_key=?',array('org_submission_account'))->getOne('organization_settings');\n\t\t$currAcs = $currList['set_val'];\n\t\t$currAcs = explode(',',$currAcs);\n\t\t\n\t\t# System Account\n\t\t$sysSubAcc = $db->where('systemAcc=1')->getOne('submission_accounts');\n\t\t\n\t\t# Update Org Submission Accounts\n\t\t$subAcs = $db->where('isActive=1')->get('submission_accounts');\n\t\t$acList = array();\n\t\tforeach($subAcs as $subAcss){\n\t\t\t$acList[] = $subAcss['ID'];\n\t\t}\n\t\t$db->where('set_key=?',array('org_submission_account'))->update('organization_settings',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'set_val'=>implode(',',$acList)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t# Check Deleted Accounts On Campaigns\n\t\t$replacer = array();\n\t\tforeach($currAcs as $k=>$v){\n\t\t\tif(!in_array($v,$acList)){\n\t\t\t\t$replacer[] = $v;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(count($replacer)>0){\n\t\t\tforeach($replacer as $k=>$v){\n\t\t\t\t$db->where('campaign_sender_account=?',array($v))->update('campaigns',array('campaign_sender_account'=>$sysSubAcc['ID']));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function conf__cuadro(toba_ei_cuadro $cuadro) {\n $cuadro->desactivar_modo_clave_segura();//para que no muestre la posición de la fila en el cuadro al volver del popUp\n if (!is_null($this->s__where)) {\n $datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre($this->s__where);\n $cuadro->set_datos($datos);\n } else {\n //no se hace nada para que el cuadro que no tenga datos de entrada (no carga todos los datos al inicio)\n //para evitar cargar todos los alumnos al comienzo\n //$datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre();\n }\n \n }", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "public function actionAddCurrentToDoc(){\n\t\tif( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session[\"userId\"]) )){\n\t\t\t$docs=PHDB::find(Document::COLLECTION, array(\n\t\t\t\t'$or'=>array(\n\t\t\t\t\tarray(\"contentKey\"=>\"banner\"),\n\t\t\t\t\tarray(\"contentKey\"=>\"profil\")\n\t\t\t\t\t)));\n\t\t\t$totalProfil=0;\n\t\t\t$totalBanner=0;\n\t\t\tforeach($docs as $key => $data){\n\t\t\t\tif(@$data[\"id\"] && $data[\"type\"]!=\"city\"){\n\t\t\t\t\t$element=Element::getElementSimpleById($data[\"id\"], $data[\"type\"],null,array(\"profilImageUrl\",\"profilBannerUrl\"));\n\t\t\t\t\t$docProfilUrl=Document::getDocumentFolderUrl($data).\"/\".$data[\"name\"];\n\t\t\t\t\tif(!empty($element[\"profilImageUrl\"]) && @$docProfilUrl && $docProfilUrl==$element[\"profilImageUrl\"]){\n\t\t\t\t\t\techo \"Profil:\".$key.\"<br>\";\n\t\t\t\t\t\tPHDB::update(Document::COLLECTION,array(\"_id\"=>new MongoId($key)),array('$set'=>array(\"current\"=>true)));\n\t\t\t\t\t\t$totalProfil++;\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($element[\"profilBannerUrl\"]) && @$docProfilUrl && $docProfilUrl==$element[\"profilBannerUrl\"]){\n\t\t\t\t\t\techo \"banner:\".$key.\"<br>\";\n\t\t\t\t\t\tPHDB::update(Document::COLLECTION,array(\"_id\"=>new MongoId($key)),array('$set'=>array(\"current\"=>true)));\n\t\t\t\t\t\t$totalBanner++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"Nombre de profil used actually by element:\".$totalProfil.\"<br>\";\n\t\t\techo \"Nombre de banner used actually by element:\".$totalBanner;\n\t\t}else\n\t\t\techo \"connectoi crétin\";\n\t}", "public function setUsuario($atributo, $contenido){\r\n $this-> $atributo = $contenido;\r\n }", "public function accorddocumentAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $document = new Application_Model_EuDocument();\n $documentM = new Application_Model_EuDocumentMapper();\n $documentM->find($id, $document);\n\t\t\n $appeloffres = new Application_Model_EuAppeloffres();\n $appeloffresM = new Application_Model_EuAppeloffresMapper();\n $appeloffresM->find($this->_request->getParam('num'), $appeloffres);\n\t\t\t\n $document->setAccord($this->_request->getParam('accord'));\n\t\tif($this->_request->getParam('accord') == 2){\n $document->setNum_appeloffres($appeloffres->num_appeloffres);\n\t\t}\n\t\t$documentM->update($document);\n\t\t\n\t\tif($this->_request->getParam('accord') == 0){\n $appeloffres->setSelection(0);\n\t\t$appeloffresM->update($appeloffres);\n\t\t}\n }\n\n\t\t$this->_redirect('/administration/listappeloffres');\n }", "public function seguimientoAccion()\r\n\t{\r\n\t\t/* ----------- VALIDA ACCESO USUARIO ----------- */\r\n\t\t$this->validateSession();\r\n\r\n\t\t/* ----------- ENVIO DE DATOS A LA VISTA ----------- */\r\n\t\tif ($this->validateDelete()==1) {\r\n\t\t\t$data['barra_superior']=TRUE;\r\n\t\t}else{\r\n\t\t\t$data['barra_superior']=FALSE;\t\r\n\t\t}\r\n\t\t$data['procesos']=$this->model->getProceso();\r\n\t\t//-----Valida que el usuario tenga privilegios----------------//\r\n\t\t//-----de administrador y su cargo sea director de calidad----//\r\n\t\t$data['option']=$this->validateDelete();\r\n\t\t//------------------------------------------------//\r\n\t\t$data['contenidoaccion']=$this->model->getContenidoAccion();\r\n\t\t$data['inf']=$this->model->getInformacionSeguimientoAccion();\r\n\t\t$data['norma']=$this->model->getNormas();\r\n\t\t$data['plan']=$this->model->getPlanAccion();\r\n\t\t$data['conclusion']=$this->model->getConclusionAccion();\r\n\t\t$data['mensaje']=$this->session->userdata('mensaje');\r\n\t\t$this->session->set_userdata('mensaje','');\r\n\t\t$data['folderD']=$this->folderD;\r\n\t\t$data['folderDO']=$this->folderDO;\r\n\t\t$data['title']='Seguimiento de las acciones';\r\n\t\t$data['content']='view_list_seguimientoAccion';\r\n\t\t$this->load->vars($data);\r\n\t\t$this->load->view('template');\r\n\t}", "function modificarCorreoOficina(){\n\t\t$this->procedimiento='rec.ft_correo_oficina_ime';\n\t\t$this->transaccion='REC_cof_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_correo_oficina','id_correo_oficina','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('id_oficina','id_oficina','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_funcionario','id_funcionario','varchar');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\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 testSetNumeroAffiliation() {\n\n $obj = new AttestationExtras();\n\n $obj->setNumeroAffiliation(\"numeroAffiliation\");\n $this->assertEquals(\"numeroAffiliation\", $obj->getNumeroAffiliation());\n }", "public function setParentescoUpdate($datos)\n {\n $this->fijarValores($datos);\n $val = $this->guardar();\n // Setear log de registro de acciones\n $user = $this->getSession('usuario');\n $this->segLogAccionesModel->cargaAcciones($this->tabla, $datos->id,'', json_encode($datos), $user->id, parent::LOG_MODI);\n return $val;\n }", "function admin_setAroAco(&$controller){\r\n\t\t\r\n\t\tif (!$controller->isAuthorized('Controllers/Admin/UserACL','update')){\r\n\t\t\treturn $controller->unAuth();\r\n\t\t}\r\n\t\t\t\r\n\t\t$rights = array('_create','_read','_update','_delete');\t\t\r\n\t\t\r\n \t\tif (!empty($controller->params['form']['acos']) && !empty($controller->params['form']['id'])){\r\n \t\t\t\r\n\t\t\t$this->decodeAcos($controller);\r\n\t\t\t$controller->loadModel('Aco');\r\n\t\t\t\r\n\t\t\tif (is_array($controller->params['form']['acos'])){\t\t\t\t\r\n\t\t\t\tforeach ($controller->params['form']['acos'] as $aco){\r\n\t\t \r\n\t\t\t\t\t$aco['aco_id'] = intval($aco['aco_id']);\r\n\t\t\t\t\t$aco['alias'] = trim($aco['alias']); // user alias .. not aco!\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($aco['aco_id']>0){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$acoData['path'] = $controller->Aco->getpath($aco['aco_id']);\r\n\t\t\t\t\t\t\t$acoData['path'] = Set::extract($acoData['path'],'{n}.Aco.alias');\r\n\t\t\t\t\t\t\tif (is_array($acoData['path'])){\r\n\t\t\t\t\t\t\t\t$acoData['path'] = join('/',$acoData['path']);\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!empty($acoData['path'])){\t\t\r\n\t\t\t\t\t\t//$controller->Acl->id = $acoData['Aco']['id'];\r\n\t\t\t\t\t\tif ($aco['allow']===true || $aco['allow']===1){ // as controller, action or object\r\n\t\t\t\t\t\t\t$controller->Acl->allow($aco['alias'], $acoData['path'], '*');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$controller->Acl->deny($aco['alias'], $acoData['path'], '*');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tforeach ($rights as $r){\r\n\t\t\t\t\t\t\tif (isset($aco[$r])){ \t\t\t\t\t\t\t\t\r\n\t \t\t\t\t\t\t\tif ($aco[$r]===true || $aco[$r]===1){\r\n\t \t\t\t\t\t\t\t\t$controller->Acl->allow($aco['alias'], $acoData['path'], r('_','',$r));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$controller->Acl->deny($aco['alias'], $acoData['path'], r('_','',$r));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "function CUtilizacion($id,$operador,$fecha,$condicion,$aprobado,$autorizacion,$comunicado,\r\n\t\t\t\t\t\t $comentarios,$dr){\r\n\t\t$this->id \t\t\t\t\t= $id;\r\n\t\t$this->operador \t\t\t= $operador;\r\n\t\t$this->fecha \t\t\t\t= $fecha;\r\n\t\t$this->condicion \t\t\t= $condicion;\r\n\t\t$this->aprobado \t\t\t= $aprobado;\r\n\t\t$this->autorizacion \t\t= $autorizacion;\r\n\t\t$this->comunicado \t\t\t= $comunicado;\r\n\t\t$this->comentarios \t\t\t= $comentarios;\r\n\t\t$this->dr \t\t\t\t\t= $dr;\r\n\t}", "function evt__cuadro__seleccion($datos)\n\t{\n //print_r($this->s__datos);exit();\n $d=array();\n $d['id_docente']=$datos['id_docente'];\n $valores=array();\n $valores['legajo']=$datos['nro_legaj'];\n $valores['apellido']=$datos['desc_appat'];\n $valores['nombre']=$datos['desc_nombr'];\n $valores['nro_cuil1']=$datos['nro_cuil3'];\n $valores['nro_cuil']=$datos['nro_cuil4'];\n $valores['nro_cuil2']=$datos['nro_cuil5'];\n $valores['fec_nacim']=$datos['nacim'];\n $valores['tipo_docum']=$datos['tipo_doc'];\n $valores['nro_docum']=$datos['nro_cuil4'];\n $valores['tipo_sexo']=$datos['sexo'];\n $valores['fec_ingreso']=$datos['fec_ingreso'];\n $valores['telefono']=$datos['telefono'];\n $valores['telefono_celular']=$datos['telefono_celular'];\n $valores['correo_institucional']=$datos['correo_electronico'];\n $this->dep('datos')->tabla('docente')->cargar($d);//carga el docente seleccionado\n $this->dep('datos')->tabla('docente')->set($valores);\n $this->dep('datos')->tabla('docente')->sincronizar();\n \n\t}", "public function setCobrodomicilio($p_cobrodomicilio){\r\n\t$this->cobrodomicilio=$p_cobrodomicilio;\r\n}", "public function setAccesDocsCab(?bool $accesDocsCab): Collaborateurs {\n $this->accesDocsCab = $accesDocsCab;\n return $this;\n }", "function listarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_sel';\n\t\t$this->transaccion='PM_DOCATCLA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_documento_categoria_clasificacion','int4');\n\t\t$this->captura('id_categoria','int4');\n\t\t$this->captura('nombre_categoria','varchar');\n\t\t$this->captura('id_clasificacion','int4');\n\t\t$this->captura('nombre_clasificacion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('documento','varchar');\n\t\t$this->captura('presentar_legal','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setNivel_academico($nivel_academico){\n $this->nivel_academico = $nivel_academico;\n }", "public function setCotToOv($doc,$usuario){\n try {\n $st=\"\";\n $ws= new Metodos();\n $credito = $ws->setSalesOrderCreditLimit($doc,$usuario);\n if ($credito === \"\") {\n $result = $this->getCredito($doc);\n $bloqueo = $result[0]['BLOCKED'];\n if($bloqueo === '0') {\n $st = 'OK';\n } else if ($bloqueo == '1') {\n $st = 'FAIL_BLOCK';\n }\n }else {\n $st=\"bloqueado\";\n }\n $this->log->kardexLog(\"Limite de credito parametros: \".$doc.\"-\".$usuario.\" resultado: \". json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),$doc,json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),1,'Limite de credito');\n return array(\"res\"=>$st,\"msj\"=>$credito);\n } catch (Exception $e) {\n $this->log->kardexLog(\"Limite de credito parametros: \".$doc.\"-\".$usuario.\" resultado: \". json_encode(array(\"res\"=>'error',\"msj\"=>'Intente de nuevo si el problema persiste verifique con sistemas','exception'=>$e)),$doc,json_encode(array(\"res\"=>$st,\"msj\"=>$credito)),1,'Limite de credito');\n return array(\"res\"=>'error',\"msj\"=>'Intente de nuevo si el problema persiste verifique con sistemas','exception'=>$e);\n }\n }", "function CAlcance($id,$nombre,$fecha_registro,$responsable_contratante,$responsable_contratista,$responsable_interventoria,$reunion,$estado,$observaciones,$registro,$operador,$da){\r\n\t\t$this->id \t\t\t\t\t\t= $id;\r\n\t\t$this->nombre \t\t\t\t\t= $nombre;\r\n\t\t$this->fecha_registro \t\t\t= $fecha_registro;\r\n\t\t$this->responsable_contratante \t= $responsable_contratante;\r\n\t\t$this->responsable_contratista \t= $responsable_contratista;\r\n\t\t$this->responsable_interventoria= $responsable_interventoria;\r\n\t\t$this->reunion \t\t\t\t\t= $reunion;\r\n\t\t$this->estado \t\t\t\t\t= $estado;\r\n\t\t$this->observaciones \t\t\t= $observaciones;\r\n\t\t$this->registro\t\t\t\t\t= $registro;\r\n\t\t$this->operador \t\t\t\t= $operador; \r\n\t\t$this->da \t\t\t\t\t\t= $da;\r\n\t}", "public function setCustomerCountry()\n\t {\n\t \tthrow new OutOfBoundsException(\"Country parameter is not availbale for Multibanco\");\n\t }", "function setSumaDeRecibo($monto = 0){ \t$this->mSumaDeRecibo = $monto;\t}", "public function setUbicacionsucursal($ubicacionsucursal)\r\n {\r\n $this->ubicacionsucursal = $ubicacionsucursal;\r\n\r\n return $this;\r\n }", "public function setAuthorized() {}", "public function setCodiCasa($value)\r\n {\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_casa = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "public function __construct() {\n\n $this->cena = 0;\n\n }", "function set($datos, $inicio = 0) {\r\n $this->idcasa = $datos[0 + $inicio];\r\n $this->localidad = $datos[1 + $inicio];\r\n $this->precio = $datos[2 + $inicio];\r\n $this->superficie = $datos[3 + $inicio];\r\n $this->habitaciones = $datos[4 + $inicio];\r\n }", "function Setceldas($cc)\n{\n \n $this->celdas=$cc;\n}", "public function setAutoIncAccID(){\r\n\t\t$clientAc = new Database();\r\n\t\t$clientAc->connect();\r\n\t\t$queryMax = \"SELECT MAX(clientaccountid)clientaccountid\r\n\t\t FROM `clientaccount`\";\r\n\r\n\t\t$clientAc->query($queryMax);\r\n\t\t$clientAc->close();\r\n\t\t$newAccNum=$clientAc->queryFirstResult[clientaccountid];\r\n\t\t$this->autoIncAccID = $newAccNum+1;\r\n\t}", "public function editInfSeguimientoAccion()\r\n\t{\r\n\t\tif($this->validateDelete()!=1){\r\n\t\t\tredirect('calidad');\r\n\t\t}\r\n\r\n\t\t$codigo=$this->input->post('codigoAccion');\r\n\t\t$idProceso=$this->input->post('idProceso');\r\n\t\t$version=$this->input->post('version');\r\n\t\t$fechaV=$this->input->post('fechaV');\r\n\t\tif(isset($codigo) && isset($idProceso) && isset($version) && isset($fechaV)){\r\n\t\t\t$data=array('codigo'=>$codigo,'codigoProceso'=>$idProceso,'version'=>$version,'fechaVigencia'=>$fechaV);\r\n\t\t\tif($this->model->editInfSeguimientoAccion($data)){\r\n\t\t\t\t$this->session->set_userdata('mensaje','Información editada con éxito ');\r\n\t\t\t}else{\r\n\t\t\t\t$this->session->set_userdata('mensaje','No se pudo editar la información');\r\n\t\t\t}\r\n\t\t}\r\n\t\tredirect('calidad/seguimientoAccion');\r\n\t}", "public function getFkContabilidadePlanoAnaliticaCreditoAcrescimos()\n {\n return $this->fkContabilidadePlanoAnaliticaCreditoAcrescimos;\n }", "function setAccessControl( $section, $value=null ) {\n\t\t$this->_acoSection = $section;\n\t\t$this->_acoSectionValue = $value;\n\t}", "function setAccessControl( $section, $value=null ) {\n\t\t$this->_acoSection = $section;\n\t\t$this->_acoSectionValue = $value;\n\t}", "function seances_autoriser(){}", "public function GuardeDocumentoContable($idComprobante){\n \n $DatosSucursal= $this->DevuelveValores(\"empresa_pro_sucursales\", \"Actual\", 1); \n $DatosGenerales=$this->DevuelveValores(\"documentos_contables_control\",\"ID\",$idComprobante);\n $Consulta=$this->ConsultarTabla(\"documentos_contables_items\", \"WHERE idDocumento=$idComprobante\");\n while($DatosComprobante=$this->FetchArray($Consulta)){\n $Fecha=$DatosComprobante[\"Fecha\"];\n \n $tab=\"librodiario\";\n $NumRegistros=28;\n $CuentaPUC=$DatosComprobante[\"CuentaPUC\"];\n $NombreCuenta=$DatosComprobante[\"NombreCuenta\"];\n $DatosCliente=$this->DevuelveValores(\"proveedores\", \"Num_Identificacion\", $DatosComprobante[\"Tercero\"]);\n if($DatosCliente[\"Num_Identificacion\"]==''){\n $DatosCliente=$this->DevuelveValores(\"clientes\", \"Num_Identificacion\", $DatosComprobante[\"Tercero\"]);\n \n }\n $DatosCentro=$this->DevuelveValores(\"centrocosto\", \"ID\", $DatosComprobante[\"CentroCostos\"]);\n \n $Columnas[0]=\"Fecha\";\t\t\t$Valores[0]=$Fecha;\n $Columnas[1]=\"Tipo_Documento_Intero\";\t$Valores[1]=$DatosComprobante[\"Nombre_Documento\"];\n $Columnas[2]=\"Num_Documento_Interno\";\t$Valores[2]=$DatosComprobante[\"Numero_Documento\"];\n $Columnas[3]=\"Tercero_Tipo_Documento\";\t$Valores[3]=$DatosCliente['Tipo_Documento'];\n $Columnas[4]=\"Tercero_Identificacion\";\t$Valores[4]=$DatosCliente['Num_Identificacion'];\n $Columnas[5]=\"Tercero_DV\"; $Valores[5]=$DatosCliente['DV'];\n $Columnas[6]=\"Tercero_Primer_Apellido\";\t$Valores[6]=$DatosCliente['Primer_Apellido'];\n $Columnas[7]=\"Tercero_Segundo_Apellido\"; $Valores[7]=$DatosCliente['Segundo_Apellido'];\n $Columnas[8]=\"Tercero_Primer_Nombre\";\t$Valores[8]=$DatosCliente['Primer_Nombre'];\n $Columnas[9]=\"Tercero_Otros_Nombres\";\t$Valores[9]=$DatosCliente['Otros_Nombres'];\n $Columnas[10]=\"Tercero_Razon_Social\";\t$Valores[10]=$DatosCliente['RazonSocial'];\n $Columnas[11]=\"Tercero_Direccion\"; $Valores[11]=$DatosCliente['Direccion'];\n $Columnas[12]=\"Tercero_Cod_Dpto\"; $Valores[12]=$DatosCliente['Cod_Dpto'];\n $Columnas[13]=\"Tercero_Cod_Mcipio\"; $Valores[13]=$DatosCliente['Cod_Mcipio'];\n $Columnas[14]=\"Tercero_Pais_Domicilio\"; $Valores[14]=$DatosCliente['Pais_Domicilio'];\n\n $Columnas[15]=\"CuentaPUC\"; $Valores[15]=$CuentaPUC;\n $Columnas[16]=\"NombreCuenta\";\t\t$Valores[16]=$NombreCuenta;\n $Columnas[17]=\"Detalle\"; $Valores[17]=$DatosGenerales[\"Concepto\"];\n $Columnas[18]=\"Debito\";\t\t\t$Valores[18]=$DatosComprobante[\"Debito\"];\n $Columnas[19]=\"Credito\"; $Valores[19]=$DatosComprobante[\"Credito\"];\n $Columnas[20]=\"Neto\";\t\t\t$Valores[20]=$Valores[18]-$Valores[19];\n $Columnas[21]=\"Mayor\";\t\t\t$Valores[21]=\"NO\";\n $Columnas[22]=\"Esp\";\t\t\t$Valores[22]=\"NO\";\n $Columnas[23]=\"Concepto\"; $Valores[23]=$DatosComprobante[\"Concepto\"];\n $Columnas[24]=\"idCentroCosto\";\t\t$Valores[24]=$DatosComprobante[\"CentroCostos\"];\n $Columnas[25]=\"idEmpresa\"; $Valores[25]=$DatosCentro[\"EmpresaPro\"];\n $Columnas[26]=\"idSucursal\"; $Valores[26]=$DatosSucursal[\"ID\"];\n $Columnas[27]=\"Num_Documento_Externo\"; $Valores[27]=$DatosComprobante[\"NumDocSoporte\"];\n $this->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\n \n \n }\n $this->ActualizaRegistro(\"documentos_contables_control\", \"Estado\", \"Cerrado\", \"ID\", $idComprobante);\n }", "function agregarpagocxc($idcxc,$fechapago,$pago,$idformapago,$referencia,$idcuenta,$observaciones,$conexion){\n $sqlcl = \"\n insert into admin_cxcpagos\n (idcxc, fechapago, pago, idformapago, referencia,idcuenta, observaciones)\n values\n (\".$idcxc.\",'\".$fechapago.\"',\".$pago.\",\".$idformapago.\",'\".$referencia.\"',\".$idcuenta.\",'\".$observaciones.\"')\n \";\n //echo $sqlcl.\"<br>\"; \n $conexion->consultar($sqlcl);\n \n //Actaliza el Titulo relacionado\n $sqlcl=\" update admin_cxc set saldoactual=(saldoinicial-(SELECT sum(pago) pagos FROM admin_cxcpagos a \n where a.idcxc=\".$idcxc.\")),abonos=(SELECT sum(pago) pagos \n FROM admin_cxcpagos a where a.idcxc=\".$idcxc.\") where idcxc=\".$idcxc;\n //echo $sqlcl.\"<br>\"; \n $conexion->consultar($sqlcl);\n \n \n \n }", "public function setParentescoCreate($datos)\n {\n $this->fijarValores($datos);\n $this->guardar();\n $val = $this->lastId();\n\n // Registra log de auditoria de registro de acciones\n $user = $this->getSession('usuario');\n $this->segLogAccionesModel->cargaAcciones($this->tabla, $val,serialize($datos),'', $user->id, parent::LOG_ALTA);\n return $val;\n }", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "function setContingencia($contingencia) {\r\n $this->contingencia = $contingencia;\r\n }", "function Aminoacidos(){\n\t\t$this->criaAminoacido();\n\t}", "function autoriser_associerdocuments($faire, $type, $id, $qui, $opt){\n\t// cas particulier (hack nouvel objet)\n\tif ((intval($id)<0 AND $id==-$qui['id_auteur']) OR !_request('exec')){\n\t\treturn true;\n\t}\n\treturn autoriser('modifier',$type,$id,$qui,$opt);\n}", "public function setNiveauAccreditation(int $niveauAccreditation)\n {\n $this->niveauAccreditation = $niveauAccreditation;\n\n return $this;\n }", "public function modificar_sucursal()\n\t{\n\t\t$query = \"UPDATE sucursales SET \n\n\t\t \n\t\t sucursal='$this->nombre', \n\t\t direccion='$this->direccion', \n\t\t tel='$this->tel', \n\t\t email='$this->email', \n\t\t tipo='$this->tipo', \n\t\t notas_print='$this->notas_print', \n\t\t \n\t\t estatus='$this->estatus'\n\t\t \t\n\t\tWHERE idsucursales = '$this->idsucursales'\";\n\n\t\t$this->db->consulta($query);\n\t}", "protected function setAuthorizations()\n { \n\n $this->authorizations = [\n [\n 'name' => 'AMMINISTRATORE_CWH',\n 'type' => Permission::TYPE_ROLE,\n 'description' => 'Ruolo per amministrare CWH',\n 'ruleName' => null,\n ],\n [\n 'name' => \\lispa\\amos\\cwh\\widgets\\icons\\WidgetIconCwhAuthAssignment::className(),\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Permesso per visualizzare icona WidgetIconCwhAuthAssignment',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => \\lispa\\amos\\cwh\\widgets\\icons\\WidgetIconCwhConfig::className(),\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Permesso per visualizzare icona WidgetIconCwhConfig',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => \\lispa\\amos\\cwh\\widgets\\icons\\WidgetIconCwhNodi::className(),\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Permesso per visualizzare icona WidgetIconCwhNodi',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => \\lispa\\amos\\cwh\\widgets\\icons\\WidgetIconCwhRegolePubblicazione::className(),\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Permesso per visualizzare icona WidgetIconCwhRegolePubblicazione',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWH_PERMISSION_CREATE_lispa\\amos\\discussioni\\models\\DiscussioniTopic',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Creare lispa\\\\amos\\\\discussioni\\\\models\\\\DiscussioniTopic',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWH_PERMISSION_VALIDATE_lispa\\amos\\discussioni\\models\\DiscussioniTopic',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Validare lispa\\\\amos\\\\discussioni\\\\models\\\\DiscussioniTopic',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWH_PERMISSION_CREATE_lispa\\amos\\news\\models\\News',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Creare lispa\\\\amos\\\\news\\\\models\\\\News',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWH_PERMISSION_VALIDATE_lispa\\amos\\news\\models\\News',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => 'Validare lispa\\\\amos\\\\news\\\\models\\\\News',\n 'ruleName' => null,\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n\n [\n 'name' => 'CWHAUTHASSIGNMENT_CREATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHAUTHASSIGNMENT_UPDATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHAUTHASSIGNMENT_READ',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHAUTHASSIGNMENT_DELETE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n\n [\n 'name' => 'CWHCONFIG_CREATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHCONFIG_UPDATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHCONFIG_READ',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHCONFIG_DELETE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n\n [\n 'name' => 'CWHNODI_CREATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHNODI_UPDATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHNODI_READ',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHNODI_DELETE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n\n [\n 'name' => 'CWHREGOLEPUBBLICAZIONE_CREATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHREGOLEPUBBLICAZIONE_UPDATE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHREGOLEPUBBLICAZIONE_READ',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n [\n 'name' => 'CWHREGOLEPUBBLICAZIONE_DELETE',\n 'type' => Permission::TYPE_PERMISSION,\n 'description' => '',\n 'ruleName' => null, // This is a string\n 'parent' => ['AMMINISTRATORE_CWH']\n ],\n\n ];\n\n }", "private function agregar_capacidad (){\r\n $id_sede=toba::memoria()->get_dato_instancia(0);\r\n \r\n //$aulas_con_capacidad=$this->dep('datos')->tabla('aula')->get_aulas_mas_capacidad($id_sede);\r\n $sql=\"SELECT id_aula, capacidad\r\n FROM aula\r\n WHERE id_sede=$id_sede\";\r\n $aulas_con_capacidad=toba::db('gestion_aulas')->consultar($sql);\r\n \r\n $longitud=count($this->s__horarios_disponibles);\r\n \r\n foreach ($aulas_con_capacidad as $clave=>$valor){\r\n for($i=0;$i<$longitud;$i++){\r\n $elto=$this->s__horarios_disponibles[$i];\r\n if($valor['id_aula'] == $elto['id_aula']){\r\n $this->s__horarios_disponibles[$i]['capacidad']=$valor['capacidad'];\r\n } \r\n }\r\n }\r\n \r\n toba::memoria()->limpiar_datos_instancia();\r\n }", "private function setCae($caeData, $idPresupuesto){\n\t\t\t$updateAfip = [\n\t\t\t\t'cbte_desde' => $this->afipConfig->cbte_desde + 1,\n\t\t\t\t'cbte_hasta' => $this->afipConfig->cbte_hasta + 1,\n\t\t\t];\n\t\t\t$this->afip_model->update($updateAfip, $this->afipConfig->id_afip);\n\n\t\t\t$updatePresupuesto = [\n\t\t\t\t'facturado' => 1,\n\t\t\t];\n\t\t\t$this->presupuestos_model->update($updatePresupuesto, $idPresupuesto);\n\n\t\t\t$insertFactura = [\n\t\t\t\t'id_presupuesto' => $idPresupuesto,\n\t\t\t\t'pto_vta' => $this->factData['PtoVta'],\n\t\t\t\t'cbte_tipo' => $this->factData['CbteTipo'],\n\t\t\t\t'concepto' => $this->factData['Concepto'],\n\t\t\t\t'doc_tipo' => $this->factData['DocTipo'],\n\t\t\t\t'doc_nro' => $this->factData['DocNro'],\n\t\t\t\t'cbte_desde' => $this->factData['CbteDesde'],\n\t\t\t\t'cbte_hasta' => $this->factData['CbteHasta'],\n\t\t\t\t'cbte_fch' => $this->factData['CbteFch'],\n\t\t\t\t'imp_total' => $this->factData['ImpTotal'],\n\t\t\t\t'imp_neto' => $this->factData['ImpNeto'],\n\t\t\t\t'imp_iva' => $this->factData['ImpIVA'],\n\t\t\t\t'imp_tot_conc' => $this->factData['ImpTotConc'],\n\t\t\t\t'imp_op_ex' => $this->factData['ImpOpEx'],\n\t\t\t\t'imp_trib' => $this->factData['ImpTrib'],\n\t\t\t\t'mon_id' => $this->factData['MonId'],\n\t\t\t\t'mon_cotiz' => $this->factData['MonCotiz'],\n\t\t\t\t'iva_id' => 5,\n\t\t\t\t'resultado' => 'A',\n\t\t\t\t'emision_tipo' => 'CAE',\n\t\t\t\t'fecha_proceso'=> intval(date('YmdHis')),\n\t\t\t\t'cae' => $caeData[\"CAE\"],\n\t\t\t\t'fecha_vencimiento' => $caeData[\"CAEFchVto\"],\n\t\t\t];\n\n\t\t\t$this->facturas_model->insert($insertFactura);\n\t\t}", "function modificarCuenta(){\n\t\t$this->procedimiento='conta.f_cuenta_ime';\n\t\t$this->transaccion='CONTA_CTA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta','id_cuenta','int4');\n\t\t$this->setParametro('id_cuenta_padre','id_cuenta_padre','varchar');\n\t\t$this->setParametro('nro_cuenta','nro_cuenta','varchar');\n\t\t$this->setParametro('nombre_cuenta','nombre_cuenta','varchar');\n\t\t$this->setParametro('desc_cuenta','desc_cuenta','varchar');\n\t\t$this->setParametro('sw_auxiliar','sw_auxiliar','varchar');\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','varchar');\n\t\t$this->setParametro('tipo_cuenta_pat','tipo_cuenta_pat','varchar');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('sw_transaccional','sw_transaccional','varchar');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t$this->setParametro('eeff','eeff','varchar');\n\t\t$this->setParametro('valor_incremento','valor_incremento','varchar');\n\t\t$this->setParametro('sw_control_efectivo','sw_control_efectivo','varchar');\n\t\t$this->setParametro('id_config_subtipo_cuenta','id_config_subtipo_cuenta','int4');\n\t\t$this->setParametro('tipo_act','tipo_act','varchar');\n\t\t\n\t\t\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}", "function calificarViabilidadUser($pro, $cri, $cal, $num, $obs, $tipo)\n {\n\n $response = \"\";\n // verificar si el criterio esta evaluado \n if ($this->verificarViabilidadUser($pro, $cri, $tipo, $_COOKIE['user_code'])) {\n if ($this->verificarCriViabilidadUser($pro, $cri,$_COOKIE['user_code'])) {\n // actualizar la calificacion\n mysqli_query(\n $this->conexion,\n \"UPDATE `calificacion_viabilidad` SET `calificacion` = '$cal',`observacion` = '$obs', `fecha` = '\" . date('Y-m-d') . \"', `usuario` = '$_COOKIE[user_code]',n_pun=$num WHERE `id_criterio`=$cri and `id_propuesta`=$pro and usuario=$_COOKIE[user_code]\"\n );\n\n if (mysqli_affected_rows($this->conexion) > 0) {\n $response = \"Calificación guardada\";\n } else {\n $response = \"No se alteró de la calificación\";\n }\n } else {\n // guardar la calificacion\n mysqli_query(\n $this->conexion,\n \"INSERT INTO `calificacion_viabilidad` (`id_criterio`, `id_propuesta`, `calificacion`, `observacion`, `fecha`, `usuario`,n_pun) VALUES ('$cri', '$pro', '$cal','$obs','\" . date('Y-m-d') . \"','$_COOKIE[user_code]',$num)\"\n );\n\n if (mysqli_affected_rows($this->conexion) > 0) {\n $response = \"Calificación guardada\";\n } else {\n $response = \"No se guardo de la calificación\";\n }\n }\n } else {\n $response = \"No esta asignado al criterio\";\n }\n\n echo $response;\n }", "public function setIdContribuinte($iIdContribuinte) {\n $this->id_contribuinte = $iIdContribuinte;\n }", "public function setCategoria()\n {\n if ($this->peso < 52.2) {\n # code...\n $this->categoria = \"Inválida\";\n\n } elseif ($this->peso <= 70.3) {\n # code...\n $this->categoria = \"Leve\";\n\n } elseif ($this->peso <= 83.9) {\n # code...\n $this->categoria = \"Médio\";\n\n } elseif ($this->peso <= 120.2) {\n # code...\n $this->categoria = \"Pesado\";\n\n } else {\n # code...\n $this->categoria = \"Inválida\";\n }\n }", "public function __set($_cle, $_val){\n if (array_key_exists($_cle, $this->valeurs)) { // La propriete demandee est bien une cle du tableau des valeurs\n return $this->valeurs[$_cle] = $_val;\n } elseif (array_key_exists($_cle, static::$relations_elem)) {\n return static::$relations_elem[$_cle] = $_val;\n }\n throw new \\Exception(\"Attribut '$_cle' inconnu dans '\" . get_class($this) . \"'\");\n }", "function __construct () {\n ADoc::__construct();\n\n \n \n $this->attr[\"us_menuresetlogfails\"]=new MenuAttribute(\"us_menuresetlogfails\", \"128\",\"Réinitialiser échecs de connexion\",10,\"%S%app=FDL&action=FDL_METHOD&method=resetLoginFailure&id=%I%\",\"W\",\"::menuResetLoginFailure()\",\"ltarget=_self|submenu=Compte\",\"IUSER\"); \n \n $this->attr[\"us_activateaccount\"]=new MenuAttribute(\"us_activateaccount\", \"128\",\"Activer le compte\",20,\"%S%app=FDL&action=FDL_METHOD&method=activateAccount&id=%I%\",\"W\",\"::menuActivateAccount()\",\"ltarget=_self|submenu=Compte\",\"IUSER\"); \n \n $this->attr[\"us_desactivateaccount\"]=new MenuAttribute(\"us_desactivateaccount\", \"128\",\"Désactiver le compte\",30,\"%S%app=FDL&action=FDL_METHOD&method=deactivateAccount&id=%I%\",\"W\",\"::menuDeactivateAccount()\",\"ltarget=_self|submenu=Compte\",\"IUSER\"); \n \n $this->attr[\"us_inituser\"]=new MenuAttribute(\"us_inituser\", \"128\",\"Actualiser les utilisateurs\",40,\"%S%&app=FUSERS&action=FUSERS_IUSER\",\"W\",\"::canExecute(FUSERS,FUSERS_IUSER)\",\"global=yes|onlyglobal=yes|lconfirm=yes\",\"IUSER\"); \n \n \n $this->attr[\"us_fr_privacy\"]=new FieldSetAttribute(\"us_fr_privacy\", \"128\",\"confidentialité\",\"H\",\"N\",\"frame\",$this->attr[\"FIELD_HIDDENS\"],\"\",\"IUSER\");\n \n $this->attr[\"us_fr_default\"]=new FieldSetAttribute(\"us_fr_default\", \"128\",\"Paramètre\",\"W\",\"Q\",\"frame\",$this->attr[\"FIELD_HIDDENS\"],\"\",\"IUSER\");\n \n $this->attr[\"us_tab_system\"]=new FieldSetAttribute(\"us_tab_system\", \"128\",\"Système\",\"W\",\"N\",\"tab\",$this->attr[\"FIELD_HIDDENS\"],\"\",\"IUSER\");\n \n $this->attr[\"us_fr_intranet\"]=new FieldSetAttribute(\"us_fr_intranet\", \"128\",\"Identification intranet\",\"R\",\"N\",\"frame\",$this->attr[\"us_tab_system\"],\"\",\"IUSER\");\n \n $this->attr[\"us_fr_substitute\"]=new FieldSetAttribute(\"us_fr_substitute\", \"128\",\"Suppléants\",\"R\",\"N\",\"frame\",$this->attr[\"us_tab_system\"],\"\",\"IUSER\");\n \n $this->attr[\"us_fr_userchange\"]=new FieldSetAttribute(\"us_fr_userchange\", \"128\",\"Mot de passe\",\"W\",\"N\",\"frame\",$this->attr[\"us_tab_system\"],\"\",\"IUSER\");\n \n $this->attr[\"us_fr_security\"]=new FieldSetAttribute(\"us_fr_security\", \"128\",\"Sécurité\",\"R\",\"N\",\"frame\",$this->attr[\"us_tab_system\"],\"\",\"IUSER\");\n \n $this->attr[\"us_fr_ident\"]=new FieldSetAttribute(\"us_fr_ident\", \"128\",\"État civil\",\"W\",\"N\",\"frame\",$this->attr[\"FIELD_HIDDENS\"],\"\",\"IUSER\");\n \n \n $this->attr[\"us_defaultgroup\"]=new NormalAttribute(\"us_defaultgroup\", \"128\",\"Groupe par défaut\",\"account\",\"\",false,20,\"\",\n \"W\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_default\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"match=group\\\"):us_defaultgroup,CT\",\"\",\"\",\"Q\",\"\",\"match=group\",\"IUSER\");\n\n \n $this->attr[\"us_lname\"]=new NormalAttribute(\"us_lname\", \"128\",\"nom\",\"text\",\"\",false,30,\"\",\n \"W\",true,true,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_ident\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_fname\"]=new NormalAttribute(\"us_fname\", \"128\",\"prénom\",\"text\",\"\",false,35,\"\",\n \"W\",true,true,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_ident\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_mail\"]=new NormalAttribute(\"us_mail\", \"128\",\"mail\",\"text\",\"\",false,40,\"mailto:%US_MAIL%\",\n \"R\",false,false,true,\n\t\t\t\t\t\t$this->attr[\"us_fr_ident\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_extmail\"]=new NormalAttribute(\"us_extmail\", \"128\",\"mail principal\",\"text\",\"\",false,45,\"\",\n \"O\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_ident\"],\"\",\"\",\"\",\"::parseMail(US_EXTMAIL)\",\"N\",\"\",\"esize=30\",\"IUSER\");\n\n \n $this->attr[\"us_meid\"]=new NormalAttribute(\"us_meid\", \"128\",\"utilisateur id\",\"account\",\"\",false,100020,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"\\\"):us_meid,CT\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_login\"]=new NormalAttribute(\"us_login\", \"128\",\"login\",\"text\",\"\",false,100030,\"\",\n \"R\",true,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"::ConstraintLogin(US_LOGIN)\",\"N\",\"\",\"elabel=saisissez '-' pour indiquer qu'il n'y a pas de login|esize=20\",\"IUSER\");\n\n \n $this->attr[\"us_whatid\"]=new NormalAttribute(\"us_whatid\", \"128\",\"identifiant\",\"text\",\"\",false,100040,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"esize=4\",\"IUSER\");\n\n \n $this->attr[\"us_t_roles\"]=new NormalAttribute(\"us_t_roles\", \"128\",\"Rôles\",\"array\",\"\",false,100050,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"showempty=Aucun rôle\",\"IUSER\");\n\n \n $this->attr[\"us_roles\"]=new NormalAttribute(\"us_roles\", \"128\",\"Rôle\",\"account\",\"\",true,100060,\"\",\n \"W\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_t_roles\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"creation={autoclose:\\\\\\\"yes\\\\\\\"}|match=role\\\"):us_roles,CT\",\"\",\"\",\"N\",\"\",\"creation={autoclose:\\\"yes\\\"}|match=role\",\"IUSER\");\n\n \n $this->attr[\"us_rolesorigin\"]=new NormalAttribute(\"us_rolesorigin\", \"128\",\"Origine\",\"enum\",\"\",true,100070,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_t_roles\"],\"\",\"internal|Affectation directe,group|Obtenu par\",\"\",\"\",\"N\",\"\",\"eformat=bool|system=yes|bmenu=no\",\"IUSER\");\n\n \n $this->attr[\"us_rolegorigin\"]=new NormalAttribute(\"us_rolegorigin\", \"128\",\"Groupe\",\"account\",\"\",true,100080,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_t_roles\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"multiple=yes|match=group\\\"):us_rolegorigin,CT\",\"\",\"\",\"N\",\"\",\"multiple=yes|match=group\",\"IUSER\");\n\n \n $this->attr[\"us_groups\"]=new NormalAttribute(\"us_groups\", \"128\",\"groupes d'appartenance\",\"array\",\"\",false,100090,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"showempty=Aucun groupe\",\"IUSER\");\n\n \n $this->attr[\"us_group\"]=new NormalAttribute(\"us_group\", \"128\",\"Groupe (titre)\",\"text\",\"\",true,100111,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_groups\"],\"\",\"::getLastTitle(us_idgroup,' )\",\"\",\"\",\"A\",\"\",\"autotitle=yes|relativeOrder=us_idgroup\",\"IUSER\");\n\n \n $this->attr[\"us_idgroup\"]=new NormalAttribute(\"us_idgroup\", \"128\",\"Groupe\",\"account\",\"\",true,100110,\"\",\n \"W\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_groups\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"isuser=yes|doctitle=us_group|match=group\\\"):us_idgroup,CT\",\"\",\"\",\"N\",\"\",\"isuser=yes|doctitle=us_group|match=group\",\"IUSER\");\n\n \n $this->attr[\"us_expires\"]=new NormalAttribute(\"us_expires\", \"128\",\"date d'expiration epoch\",\"int\",\"\",false,100120,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"::isInteger(us_expires)\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_daydelay\"]=new NormalAttribute(\"us_daydelay\", \"128\",\"délai d'expiration en jours\",\"int\",\"\",false,100130,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"::isInteger(us_daydelay)\",\"N\",\"\",\"elabel=mettre -1 pour annuler l'expiration|esize=3\",\"IUSER\");\n\n \n $this->attr[\"us_expiresd\"]=new NormalAttribute(\"us_expiresd\", \"128\",\"date d'expiration\",\"date\",\"\",false,100140,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"::ConstraintExpires(US_EXPIRESD,US_EXPIREST,US_DAYDELAY)\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_expirest\"]=new NormalAttribute(\"us_expirest\", \"128\",\"heure d'expiration\",\"time\",\"\",false,100150,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_passdelay\"]=new NormalAttribute(\"us_passdelay\", \"128\",\"délai d'expiration epoch\",\"int\",\"\",false,100160,\"\",\n \"H\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"::isInteger(us_passdelay)\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_ldapdn\"]=new NormalAttribute(\"us_ldapdn\", \"128\",\"login LDAP\",\"text\",\"\",false,100170,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_intranet\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_substitute\"]=new NormalAttribute(\"us_substitute\", \"128\",\"Suppléant\",\"account\",\"\",false,100190,\"\",\n \"W\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_substitute\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"\\\"):us_substitute,CT\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_incumbents\"]=new NormalAttribute(\"us_incumbents\", \"128\",\"Titulaires\",\"account\",\"\",true,100200,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_substitute\"],\"fdl.php\",\"fdlGetAccounts(CT,15,\\\"multiple=yes\\\"):us_incumbents,CT\",\"\",\"\",\"N\",\"\",\"multiple=yes\",\"IUSER\");\n\n \n $this->attr[\"us_passwd1\"]=new NormalAttribute(\"us_passwd1\", \"128\",\"nouveau mot de passe\",\"password\",\"\",false,100220,\"\",\n \"O\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_userchange\"],\"\",\"\",\"\",\"::testForcePassword(US_PASSWD1)\",\"N\",\"\",\"esize=10\",\"IUSER\");\n\n \n $this->attr[\"us_passwd2\"]=new NormalAttribute(\"us_passwd2\", \"128\",\"confirmation mot de passe\",\"password\",\"\",false,100230,\"\",\n \"O\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_userchange\"],\"\",\"\",\"\",\"::ConstraintPassword(US_PASSWD1,US_PASSWD2,US_LOGIN)\",\"N\",\"\",\"esize=10\",\"IUSER\");\n\n \n $this->attr[\"us_status\"]=new NormalAttribute(\"us_status\", \"128\",\"état du compte\",\"enum\",\"\",false,100305,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_security\"],\"\",\"A|activé,D|désactivé\",\"\",\"\",\"N\",\"\",\"system=yes\",\"IUSER\");\n\n \n $this->attr[\"us_loginfailure\"]=new NormalAttribute(\"us_loginfailure\", \"128\",\"échecs de connexion\",\"int\",\"\",false,100310,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_security\"],\"\",\"\",\"\",\"::isInteger(us_loginfailure)\",\"N\",\"\",\"\",\"IUSER\");\n\n \n $this->attr[\"us_accexpiredate\"]=new NormalAttribute(\"us_accexpiredate\", \"128\",\"Date d'expiration du compte\",\"date\",\"\",false,100320,\"\",\n \"R\",false,false,false,\n\t\t\t\t\t\t$this->attr[\"us_fr_security\"],\"\",\"\",\"\",\"\",\"N\",\"\",\"\",\"IUSER\");\n\n \n\t\t\n\t $this->absoluteOrders=[\"us_fr_privacy\"=>10,\"us_menuresetlogfails\"=>20,\"us_fr_default\"=>30,\"us_defaultgroup\"=>40,\"us_activateaccount\"=>50,\"us_fr_ident\"=>60,\"us_lname\"=>70,\"us_fname\"=>80,\"us_mail\"=>90,\"us_extmail\"=>100,\"us_desactivateaccount\"=>110,\"us_inituser\"=>120,\"us_tab_system\"=>130,\"us_fr_intranet\"=>140,\"us_meid\"=>150,\"us_login\"=>160,\"us_whatid\"=>170,\"us_t_roles\"=>180,\"us_roles\"=>190,\"us_rolesorigin\"=>200,\"us_rolegorigin\"=>210,\"us_groups\"=>220,\"us_idgroup\"=>230,\"us_group\"=>240,\"us_expires\"=>250,\"us_daydelay\"=>260,\"us_expiresd\"=>270,\"us_expirest\"=>280,\"us_passdelay\"=>290,\"us_ldapdn\"=>300,\"us_fr_substitute\"=>310,\"us_substitute\"=>320,\"us_incumbents\"=>330,\"us_fr_userchange\"=>340,\"us_passwd1\"=>350,\"us_passwd2\"=>360,\"us_fr_security\"=>370,\"us_status\"=>380,\"us_loginfailure\"=>390,\"us_accexpiredate\"=>400];\n $this->fromids[128]=128;\n $this->fromname='IUSER';\n\n $this->fields[\"us_lname\"]=\"us_lname\";\n $this->fields[\"us_fname\"]=\"us_fname\";\n $this->fields[\"us_mail\"]=\"us_mail\";\n $this->fields[\"us_extmail\"]=\"us_extmail\";\n $this->fields[\"us_meid\"]=\"us_meid\";\n $this->fields[\"us_login\"]=\"us_login\";\n $this->fields[\"us_whatid\"]=\"us_whatid\";\n $this->fields[\"us_roles\"]=\"us_roles\";\n $this->fields[\"us_rolesorigin\"]=\"us_rolesorigin\";\n $this->fields[\"us_rolegorigin\"]=\"us_rolegorigin\";\n $this->fields[\"us_group\"]=\"us_group\";\n $this->fields[\"us_idgroup\"]=\"us_idgroup\";\n $this->fields[\"us_expires\"]=\"us_expires\";\n $this->fields[\"us_daydelay\"]=\"us_daydelay\";\n $this->fields[\"us_expiresd\"]=\"us_expiresd\";\n $this->fields[\"us_expirest\"]=\"us_expirest\";\n $this->fields[\"us_passdelay\"]=\"us_passdelay\";\n $this->fields[\"us_ldapdn\"]=\"us_ldapdn\";\n $this->fields[\"us_substitute\"]=\"us_substitute\";\n $this->fields[\"us_incumbents\"]=\"us_incumbents\";\n $this->fields[\"us_passwd1\"]=\"us_passwd1\";\n $this->fields[\"us_passwd2\"]=\"us_passwd2\";\n $this->fields[\"us_status\"]=\"us_status\";\n $this->fields[\"us_loginfailure\"]=\"us_loginfailure\";\n $this->fields[\"us_accexpiredate\"]=\"us_accexpiredate\";\n }", "static function changeCGUinter() {\n\t\t\n\t\t$case_cgu = rcube_utils::get_input_value('chk_cgu', RCUBE_INPUT_POST);\n\n\t\tif ( !empty($case_cgu)) {\t\t\t\n\t\t\t$user_infos = melanie2::get_user_infos(rcmail::get_instance()->get_user_name());\n\t\t\t$user_dn = $user_infos['dn'];\n\t\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\t\n\t\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\t\n\t\t\t$base = 'dc=equipement,dc=gouv,dc=fr';\n\t\t\t$filter = 'uid=' . rcmail::get_instance()->get_user_name();\n\t\t\t\n\t\t\t$ldap_res = Ldap::GetInstance(Config::$MASTER_LDAP)->search($base, $filter, array('info'));\n\t\t\t\n\t\t\t$_ldapEntree = Ldap::GetInstance(Config::$AUTH_LDAP)->get_entries($ldap_res);\n\t\t\t\n\t\t\tif ((strpos($user_dn, 'ou=departements,ou=organisation,dc=equipement,dc=gouv,dc=fr') !== false)\n\t\t\t || (strpos($user_dn, 'ou=DDEA,ou=melanie,ou=organisation,dc=equipement,dc=gouv,dc=fr') !== false)) {\n\t\t\t\t$info['mineqAccesInternet'] = 'DDI-INTERNET-STANDARD';\n\t\t\t} else {\n\t\t\t\t$info['mineqAccesInternet'] = 'ACCESINTERNET';\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_ldapEntree[0]['info'][0])) {\n\t\t\t\tforeach($_ldapEntree[0]['info'] as $i => $val) {\n\t\t\t\n\t\t\t\t\tif (stripos($_ldapEntree[0]['info'][$i], 'AccesInternet.Profil') !== false) {\n\t\t\t\t\t\t$prof = explode(':',$_ldapEntree[0]['info'][$i]);\n\t\t\t\t\t\t$info['mineqAccesInternet'] = trim($prof['1']);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif (stripos($_ldapEntree[0]['info'][$i], 'AccesInternet.AcceptationCGUts') !== false) {\n\t\t\t\t\t\tunset($_ldapEntree[0]['info'][$i]);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\n\t\t\t\tforeach($_ldapEntree[0]['info'] as $i => $val) {\n\t\t\t\t\t$info['info'][$i] = trim($_ldapEntree[0]['info'][$i]);\n\t\t\t\t\t$info['info'] = array_values($info['info']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$info['info'][] = 'AccesInternet.AcceptationCGUts: ' . gmstrftime('%Y%m%d%H%M%S', time()) . 'Z';\n\t\t\t$mes = rcmail::get_instance()->gettext('inter_CGU_validee', 'melanie2_moncompte');\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$mes = rcmail::get_instance()->gettext('inter_CGU_unvalidee', 'melanie2_moncompte');\n\t\t}\n\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message($mes, 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message($mes, 'error');\n\t\t}\n\t}", "public function ActualizaDatosAcceso($nombre,$indicador,$perfil=false,$cuenta){\n\t\t\n\t\t$parametros= array($nombre,$indicador,$cuenta);\n\t\t$valor=\"\";\n\t\t\n\t\tif($perfil){\n\t\t\t$valor= ', \"Perfil\"=%?';\n\t\t\t$parametros= array($nombre,$indicador,$perfil,$cuenta);\n\t\t}\n\t\t\n\t\t$sql='\n\t\t\tUPDATE \"'.$this->vEsquema.'\".\"TR001_Cuenta_Acceso\" \n\t\t\tSET \"Nombre\"=%?,\"Indicador_PDVSA\"=%? '.$valor.' \n\t\t\tWHERE \"id_Cuenta_Acceso\"=%?\n\t\t';\n\t\t\n\t\treturn $this->vConexion->ExecuteQuery($sql, $parametros);\n\t}" ]
[ "0.7741958", "0.6434762", "0.64057165", "0.6392408", "0.6177989", "0.6123427", "0.6106398", "0.60793465", "0.5691952", "0.5661072", "0.56559575", "0.5565367", "0.54919606", "0.5457916", "0.5272307", "0.5268193", "0.51792914", "0.51641864", "0.50588375", "0.49943402", "0.49775058", "0.4974885", "0.4969862", "0.49456313", "0.49434647", "0.49434555", "0.4891946", "0.4878123", "0.48653147", "0.4853976", "0.48454213", "0.4825373", "0.48148444", "0.48079774", "0.48069698", "0.48057464", "0.4795515", "0.47855908", "0.47661892", "0.47646317", "0.47614923", "0.47581252", "0.47559193", "0.47469527", "0.47455654", "0.4744305", "0.47437143", "0.4730861", "0.47283444", "0.47273088", "0.47256237", "0.4724108", "0.47170004", "0.47157225", "0.47132808", "0.4709192", "0.47083604", "0.47066036", "0.47065407", "0.47014385", "0.46999198", "0.46975568", "0.4695543", "0.46849447", "0.4684294", "0.46791124", "0.46785957", "0.46579534", "0.46469748", "0.46426642", "0.46378317", "0.46333337", "0.46323857", "0.46296546", "0.46285403", "0.46255666", "0.46143383", "0.46136189", "0.46136189", "0.4613169", "0.46130314", "0.46097177", "0.46077353", "0.4597069", "0.45962963", "0.45921516", "0.4591372", "0.4589494", "0.4585106", "0.45818576", "0.45730913", "0.45722523", "0.45698562", "0.45685637", "0.45673296", "0.45633164", "0.45611247", "0.45567542", "0.45527437", "0.45507553" ]
0.7864108
0
Get the value of docenciatecnicosuperiorfecha
Получить значение docenciatecnicosuperiorfecha
public function getDocenciatecnicosuperiorfecha() { return $this->docenciatecnicosuperiorfecha; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDoc_entrega()\r\r\n {\r\r\n return $this->doc_entrega;\r\r\n }", "public function getFecha_acre_super(){\n return $this->fecha_acre_super;\n }", "public function getFinanciamientobecadocentesfecha()\n\t{\n\t\treturn $this->financiamientobecadocentesfecha;\n\t}", "public function getDocente(){\n return $this->docente;\n }", "function get_fechaIngreso( ) {\n // returns the value of fechaIngreso\n return $this->fechaIngreso;\n }", "public function getFechaCompraPoducto(){\n return $this->fechaCompraPoducto;\n }", "function getDocumento(){ return $this->documento; }", "public function getRutaDocumento(){\n return $this->rutaDocumento;\n }", "function validarfechaperiodos(){\n\t\t$sql = $this->query(\"SELECT fechainicio FROM nomi_configuracion\");\n\t\t$fecha = $sql->fetch_object();\n\t\treturn $fecha->fechainicio;\n\n\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function getFechaCobro() {\n\t\treturn $this->fechaCobro;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function getFecha_curso(){\n return $this->fecha_curso;\n }", "public function getCalificacion()\r\n {\r\n return $this->calificacion;\r\n }", "public function getAuto_fecha_compra()\n {\n return $this->auto_fecha_compra;\n }", "public function getFechaInicioMetaSecundaria( ){\n return $this->fechaInicioMetaSecundaria;\n }", "function getFecha(){ return $this->fecha; }", "public function get_Fecha_Pago(){\n\t\treturn $this->fecha_pago;\n\t}", "public function getParroquiafecha()\n {\n return $this->parroquiafecha;\n }", "public function FechaAno(){ \r\n\r\n\t\t$fecha_hoy = date('Y');\t\t\r\n\t\treturn $fecha_hoy; \r\n\t}", "public function getOedtcancdate()\n {\n return $this->oedtcancdate;\n }", "public function getDate_crea()\n {\n return $this->date_crea;\n }", "function obtenerGestionByFecha(){\n $this->procedimiento='param.f_gestion_ime';\n $this->transaccion='PM_GETGES_ELI';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('fecha','fecha','date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function getDataCriacao() {\n return $this->dtCriacao;\n }", "public function getNombreDocumento(){\n return $this->nombreDocumento;\n }", "public function obtenerFechaCreacion(){\n $dated = strtotime($this->creado);\n return date(config('region.formato_fecha'),$dated);\n }", "public function getDocumento()\r\n {\r\n return $this->Documento;\r\n }", "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "public function getFecha(){\n return $this->fecha;\n }", "public function getFecha(){\n return $this->fecha;\n }", "public function getDate_naissance_utilisateur()\n {\n return $this->date_naissance_utilisateur;\n }", "public function getDocumento()\n {\n return $this->documento;\n }", "public function getDocumento()\n {\n return $this->documento;\n }", "function obtenerNumeroActualSecuencia($procesoNumeracionFechado,$dependencia){\n\t$numeroActual=0;\n\t$nombreSecuencia=$prefijo.$procesoNumeracionFechado.$dependencia;\n\t$q=\"select max(sgd_doc_secuencia) as SEC from anexos where anex_depe_creador=$dependencia and sgd_pnufe_codi = $procesoNumeracionFechado \";\n\t$rs = $this->cursor->query($q);\n\t$retorno=\"\";\n\n\tif \t(!$rs->EOF) \t\t{\n \t\t$numeroActual=$rs->fields['SEC'];\n\t\tif ($numeroActual>0){\n\t\t\t$q=\"select SGD_FECH_DOC from anexos where anex_depe_creador=$dependencia and sgd_pnufe_codi = $procesoNumeracionFechado and sgd_doc_secuencia = $numeroActual\";\n\t\t\t$rs=$this->cursor->query($q);\n\t\t\t$rs->MoveNext();\n\t\t\t$fechaNumero=$rs->fields[\"SGD_FECH_DOC\"];\n\t\t\t$retorno=\"$numeroActual de $fechaNumero\";\n\t\t}else{\n\t\t\t$retorno=\"Aun no generada\";\n\t\t}\n\t}\n\telse {\n\t\t$retorno=\"Aun no generada\";\n\t}\n\nreturn ($retorno);\n\n}", "public function getEntre_calle_1()\r\n\t{\r\n\t\treturn($this->entre_calle_1);\r\n\t}", "public function getFechaRegistro()\n {\n return $this->fecha_registro;\n }", "public function getFinanciamientobecadocentescodigo()\n\t{\n\t\treturn $this->financiamientobecadocentescodigo;\n\t}", "public function getFecha_inscripcion()\r\n\t{\r\n\t\treturn($this->fecha_inscripcion);\r\n\t}", "function get_fecha_ctr_correlativas($parametros)\n\t{\n\t\t$sql = \"SELECT fecha\n\t\t\t\t\tFROM ufce_fechas_ctr_correlat\n\t\t\t\t\tWHERE \tanio_academico = {$parametros['anio_academico']}\n\t\t\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \";\n\t\t\n\t\treturn kernel::db()->consultar_fila($sql, db::FETCH_ASSOC);\n\t}", "public function getEdificio()\n\t{\n\t\treturn $this->edificio;\n\t}", "public function getFctDocumentsAutre() {\n return $this->fctDocumentsAutre;\n }", "public function getFecha_examen_psicofisico(){\n return $this->fecha_examen_psicofisico;\n }", "public function getDataCriado()\n {\n return $this->data_criado;\n }", "function listarDocCompraCajero()\n {\n $this->objParam->defecto('ordenacion', 'id_doc_compra_venta');\n\n $this->objParam->defecto('dir_ordenacion', 'asc');\n\n if ($this->objParam->getParametro('id_periodo') != '') {\n $this->objParam->addFiltro(\"dcv.id_periodo = \" . $this->objParam->getParametro('id_periodo'));\n }\n\n if ($this->objParam->getParametro('id_int_comprobante') != '') {\n $this->objParam->addFiltro(\"dcv.id_int_comprobante = \" . $this->objParam->getParametro('id_int_comprobante'));\n }\n\n if ($this->objParam->getParametro('tipo') != '') {\n $this->objParam->addFiltro(\"dcv.tipo = ''\" . $this->objParam->getParametro('tipo') . \"''\");\n }\n\n if ($this->objParam->getParametro('sin_cbte') == 'si') {\n $this->objParam->addFiltro(\"dcv.id_int_comprobante is NULL\");\n }\n\n if ($this->objParam->getParametro('fecha_cbte') != '') {\n $this->objParam->addFiltro(\"dcv.fecha <= ''\" . $this->objParam->getParametro('fecha_cbte') . \"''::date\");\n }\n\n /* if ($this->objParam->getParametro('filtro_usuario') == 'si') {\n $this->objParam->addFiltro(\"dcv.id_usuario_reg = \" . $_SESSION[\"ss_id_usuario\"]);\n }*/\n\n if ($this->objParam->getParametro('id_depto') != '') {\n if ($this->objParam->getParametro('id_depto') != 0)\n $this->objParam->addFiltro(\"dcv.id_depto_conta = \" . $this->objParam->getParametro('id_depto'));\n }\n\n //(may) para tipo Facturas por Comisiones\n // var_dump('llegam', $this->objParam->getParametro('nombreVista'));exit;\n /* if ($this->objParam->getParametro('id_plantilla') == '') {\n var_dump('llegam');\n $this->objParam->addFiltro(\"dcv.id_plantilla = 63\");\n }else{\n var_dump('llegam222');\n }*/\n //var_dump('llegam222', $_SESSION[\"ss_id_usuario\"]);\n if ($this->objParam->getParametro('nombreVista') == 'DocCompraCajero'){\n if ($this->objParam->getParametro('id_depto') != 0)\n $this->objParam->addFiltro(\"dcv.id_depto_conta = \" . $this->objParam->getParametro('id_depto'));\n\n }\n\n\n if ($this->objParam->getParametro('id_agrupador') != '') {\n $this->objParam->addFiltro(\"dcv.id_doc_compra_venta not in (select ad.id_doc_compra_venta from conta.tagrupador_doc ad where ad.id_agrupador = \" . $this->objParam->getParametro('id_agrupador') . \") \");\n }\n\n if ($this->objParam->getParametro('tipoReporte') == 'excel_grid' || $this->objParam->getParametro('tipoReporte') == 'pdf_grid') {\n $this->objReporte = new Reporte($this->objParam, $this);\n $this->res = $this->objReporte->generarReporteListado('MODDocCompraVenta', 'listarDocCompraCajero');\n } else {\n $this->objFunc = $this->create('MODDocCompraVenta');\n $this->res = $this->objFunc->listarDocCompraCajero($this->objParam);\n }\n\n $temp = Array();\n $temp['importe_ice'] = $this->res->extraData['total_importe_ice'];\n $temp['importe_excento'] = $this->res->extraData['total_importe_excento'];\n $temp['importe_it'] = $this->res->extraData['total_importe_it'];\n $temp['importe_iva'] = $this->res->extraData['total_importe_iva'];\n $temp['importe_descuento'] = $this->res->extraData['total_importe_descuento'];\n $temp['importe_doc'] = $this->res->extraData['total_importe_doc'];\n $temp['importe_retgar'] = $this->res->extraData['total_importe_retgar'];\n $temp['importe_anticipo'] = $this->res->extraData['total_importe_anticipo'];\n $temp['importe_pendiente'] = $this->res->extraData['tota_importe_pendiente'];\n $temp['importe_neto'] = $this->res->extraData['total_importe_neto'];\n $temp['importe_descuento_ley'] = $this->res->extraData['total_importe_descuento_ley'];\n $temp['importe_pago_liquido'] = $this->res->extraData['total_importe_pago_liquido'];\n $temp['importe_aux_neto'] = $this->res->extraData['total_importe_aux_neto'];\n\n $temp['tipo_reg'] = 'summary';\n $temp['id_doc_compra_venta'] = 0;\n\n\n $this->res->total++;\n\n $this->res->addLastRecDatos($temp);\n\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function getTbResenhaDt(){\n\treturn $this->tbResenhaDt;\n}", "public function getlineadeDocumentoC() {\n $ar = array();\n $value = new \\Area4\\ContableBundle\\Entity\\lineadeDocumento();\n foreach ($this->lineadeDocumento as $value) {\n if ($value->getCantidad() > 0) {\n $ar[] = $value;\n }\n }\n return $ar;\n }", "function addFechaInicial(){\n\t\t$xDate\t\t\t= new cHDate(0, false, TIPO_FECHA_OPERATIVA);\n\t\t$this->mJsVars\t.= \"var fechaInicial\t= $('#idfecha-0').val();\\r\\n\";\n\t\t\n\t\t$this->mURL\t\t.= \" + \\\"&on=\\\" + fechaInicial \";\n\t\t$this->mURL\t\t.= \" + \\\"&fechainicial=\\\" + fechaInicial \";\n\t\t$this->mURL\t\t.= \" + \\\"&fechaMX=\\\" + fechaInicial \";\n\t\t\n\t\treturn $xDate->get(\"TR.Fecha_Inicial\");\n\t}", "public function getDataInicio() {\n return $this->oDtInicio;\n }", "public function getDataInicio() {\n return $this->oDtInicio;\n }", "public function getFechaRetiro()\n {\n $conversiones = $this->getDI()->getConversiones();\n \tif(!($this->fechaRetiro) || $this->fechaRetiro == \"0000-00-00\"){\n return FALSE;\n } else {\n return $conversiones->fecha(2, $this->fechaRetiro);\n }\n }", "public function getNacimiento()\r\n{\r\nreturn $this->nacimiento;\r\n}", "public function getFecha()\n {\n return $v_fecha;\n }", "function getFechaTomaInventario(){\n return $this->fecha_toma;\n }", "function fechaPHP()\n {\n $cad=$this->par_fecha;\n return($cad);\n }", "function get_secuenciaDocto($dependencia) {\n\t\n\t$q=\"select * from anexos where ANEX_CODIGO='\".$this->sgd_doc_padre\n .\"' AND ANEX_RADI_NUME=\".$this->anex_radi_nume;\n\t$rs=$this->cursor->query($q);\n\n\tif \t(!$rs->EOF)\n \t\t$this->sgd_doc_secuencia=$rs->fields['SGD_DOC_SECUENCIA'];\n\n\tif ($this->sgd_doc_secuencia)\n\t\treturn ($this->sgd_doc_secuencia);\n\telse\n\t\t{\n\t\t // EL DOCUMENTO PADRE NO TIENE LA SECUENCIA\n\t\t//OBTIENE EL NOMBRE DE LA SECUENCIA\n\n\t\t$sql=\"select SGD_SENUF_SEC as SEC from SGD_SENUF_SECNUMFE where SGD_PNUFE_CODI=\".$this->sgd_pnufe_codi\n\t\t. \" and DEPE_CODI= \".$dependencia;\n\t\t$rs2=$this->cursor->query($sql);\n\n\t\tif \t($rs2&&!$rs2->EOF)\n\t\t\t$nombreSecuencia=$this->sgd_doc_secuencia=$rs2->fields[\"SEC\"];\n\t\t\t$this->sgd_doc_secuencia=$this->cursor->nextId($nombreSecuencia);\n\n\t\t\tif (!$this->sgd_doc_secuencia)\n\t\t\t\t$this->sgd_doc_secuencia=0;\n\t\t}\n\n\n\n\treturn ($this->sgd_doc_secuencia);\n\t}", "function getFechaVisitaPoi() {\n return $this->fechaVisitaPoi;\n }", "public function getFecha_aceptacion(){\n return $this->fecha_aceptacion;\n }", "public function getFecha_pago()\n {\n return $this->fecha_pago;\n }", "public function getDocDate()\n {\n return isset($this->docDate) ? $this->docDate : null;\n }", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public function getDocumento(){\r\n //Asigno los apps a una variable que estará esperando la vista\r\n\r\n $retArray = [\r\n 1 => new Documento(\"ISO20000 Documento para el personal\", null, 'Documento de ISO20000 para todo el personal de la empresa', null, null)\r\n ];\r\n\r\n return $retArray;\r\n }", "public function getDatefrais()\n {\n return $this->datefrais;\n }", "public function getFecha_carga()\r\n\t{\r\n\t\treturn($this->fecha_carga);\r\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function getDateOuvert()\n {\n return $this->dateOuvert;\n }", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "private function getDatosDocente()\n\t{\t\t\n\t\tif($this->identity())\n\t\t{\t\t\n\t\t return $dataDocente = $this->usuarioTable->obtenerUsuario($this->identity()['codUsuario']);\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function getNro_doc_madre()\r\n\t{\r\n\t\treturn($this->nro_doc_madre);\r\n\t}", "public function getFechaPrematricula(){\n\t\treturn $this->fechaPrematricula;\n\t}", "public function getobservacionPrematricula(){\n\t\treturn $this->observacionPrematricula;\n\t}", "public function getFecha(){\n return $this->fecha;\n }", "public function getDatePerduTrouve()\n {\n return $this->datePerduTrouve;\n }", "function getHijosFromValorFechaOV($idsec,$controladosAnteriores,$idov){\n\n\t\tglobal $visit;\n\n\t\t$dictFilasSectionData = $visit->options->sectionData;\n\n\t\t$obj= new ClsNumericData();\n\n\t\t$idsAnteriores=\"\";\n\n\t\tif ($controladosAnteriores!=\"\"){\n\n\t\t\t//var_dump($controladosAnteriores);\n\n\t\t\twhile (list ($clave, $temp) = each ($controladosAnteriores)) {\n\n\t\t\t\t/*if ($temp[0]!=null && $temp[1]!=null ){\n\n\t\t\t\t\t$idSeccion=$temp[0];\n\n\t\t\t\t\t$valorSeccion=$temp[1];*/\n\n\t\t\t\tif ($temp!=null && $clave!=null){ \n\n\t\t\t\t\t$idSeccion = $clave;\n\n\t\t\t\t\t$valorSeccion =$temp;\n\n\t\t\t\t\t//$seccion=$this->getSectionDataId($idSeccion);\n\n\t\t\t\t\t$seccion=$dictFilasSectionData[$idSeccion];\n\n\t\t\t\t\tif ($seccion->tipo_valores==\"C\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from controlled_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"N\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from numeric_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"T\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from text_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"F\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from date_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} \n\n\t\t\t\t\t///echo $sqlData.\"NNNNNNNNNNNN\";\n\n\t\t\t\t\tif ($idsAnteriores!=\"\") $sqlData.= \" AND idov in (\".$idsAnteriores.\") \";\n\n\t\t\t\t\t$temps = $this->conn->GetAll($sqlData);\n\n\t\t\t\t\t$idsAnterioresCopia=\"\";\n\n\t\t\t\t\twhile (list ($clave, $tempC) = each ($temps)) {\n\n\t\t\t\t\t\t$recurso= $this->getResourcesId($tempC[\"idrecurso\"]);\n\n\t\t\t\t\t\tif ($recurso->visible==\"S\") {\n\n\t\t\t\t\t\t$idsAnterioresCopia.= $tempC[\"idov\"].\",\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($idsAnterioresCopia!=\"\") {\n\n\t\t\t\t\t$idsAnteriores = substr( $idsAnterioresCopia, 0, strlen($idsAnterioresCopia)-2);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\t\t\t\n\n\t\t$where =\" idseccion = \".$idsec ;\n\n\t\tif ($idsAnteriores!=\"\") $where.= \" AND idov in (\".$idsAnteriores.\") \";\n\n\t\telse $where .= \" AND idov = \".$idov ;\n\n\t\t$strWhere =\" WHERE \". $where;\n\n\t\t\t\t//EVITAR VALORES A NULL\n\n\t\t$strWhere = $strWhere. \" AND value IS NOT NULL \";\n\n\t\t$sql =\"SELECT value, count(*) as cuenta, MIN(idov) as idov FROM \". $obj->getNombreTabla() . $strWhere.\" group by value order by value \" ;\n\n\t\t$this->visit->debuger->out(\"getHijosFromValorFecha: \". $obj->getNombreTabla() .\"-: $sql\");\n\n\t\t$collection = $this->execSQL( $sql, $obj );\n\n\t\treturn $collection;\n\n\t}", "function getHijosFromFecha($idsec,$controladosAnteriores){\n\n\t\tglobal $visit;\n\n\t\t$dictFilasSectionData = $visit->options->sectionData;\n\n\t\t$obj= new ClsDateData();\n\n\t\t$idsAnteriores=\"\";\n\n\t\tif ($controladosAnteriores!=\"\"){\n\n\t\t\t//var_dump($controladosAnteriores);\n\n\t\t\twhile (list ($clave, $temp) = each ($controladosAnteriores)) {\n\n\t\t\t\t\t/*if ($temp[0]!=null && $temp[1]!=null ){\n\n\t\t\t\t\t$idSeccion=$temp[0];\n\n\t\t\t\t\t$valorSeccion=$temp[1];*/\n\n\t\t\t\tif ($temp!=null && $clave!=null){ \n\n\t\t\t\t\t$idSeccion = $clave;\n\n\t\t\t\t\t$valorSeccion =$temp;\n\n\t\t\t\t\t//$seccion=$this->getSectionDataId($idSeccion);\n\n\t\t\t\t\t$seccion=$dictFilasSectionData[$idSeccion];\n\n\t\t\t\t\tif ($seccion->tipo_valores==\"C\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from controlled_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' \" ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"N\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from numeric_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' \" ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"T\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from text_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' \" ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"F\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from date_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' \" ;\n\n\t\t\t\t\t//} else if ($seccion->tipo_valores==\"T\") {\n\n\t\t\t\t\t//\t$sqlData= \"select * from date_data where idseccion=\".$temp[0].\" and value='\".$temp[1].\"' \" ;\n\n\t\t\t\t\t} \n\n\t\t\t\t\t//echo $sqlData.\"***************\";\n\n\t\t\t\t\tif ($idsAnteriores!=\"\") $sqlData.= \" AND idov in (\".$idsAnteriores.\") \";\n\n\t\t\t\t\t$temps = $this->conn->GetAll($sqlData);\n\n\t\t\t\t\t$idsAnterioresCopia=\"\";\n\n\t\t\t\t\tif(!is_array($temps)){\n\n\t\t\t\t\t\t$temps = array();\n\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (list ($clave, $tempC) = each ($temps)) {\n\n\t\t\t\t\t\t$idsAnterioresCopia.= $tempC[\"idov\"].\",\";\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($idsAnterioresCopia!=\"\") {\n\n\t\t\t\t\t$idsAnteriores = substr( $idsAnterioresCopia, 0, strlen($idsAnterioresCopia)-1);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\t\t\t\n\n\t\t$where =\" idseccion = \".$idsec ;\n\n\t\tif ($idsAnteriores!=\"\"){\n\n\t\t\t$where.= \" AND idov in (\".$idsAnteriores.\") \";\n\n\t\t\t//\n\n\t\t}\n\n\t\t//SI NO HAY USUARIO REGISTRADO NO MOSTRAR LOS VISIBLES\n\n\t\t//Control de usuarios\n\n\t\tif($visit->util->esUserRegistrado()){\t\t\t\n\n\t\t\t$strWhere =\" WHERE \". $where;\n\n\t\t\t$admin = $visit->options->usuario->rol==\"B\";\n\n\t\t\t$superadmin = $visit->options->usuario->rol==\"A\";\n\n\t\t\tif (!$superadmin){\n\n\t\t\t\t$strWhere = \" INNER JOIN virtual_object\". $strWhere. \" AND virtual_object.isprivate = 'N' AND \".$obj->getNombreTabla().\".idov=virtual_object.id \";\n\n\t\t\t}\n\n\t\t\t//EVITAR VALORES A NULL\n\n\t\t\t$strWhere = $strWhere. \" AND \".$obj->getNombreTabla().\".value IS NOT NULL \";\n\n\t\t\t$sql =\"SELECT distinct value, count(*) as cuenta, MIN(idov) as idov FROM \". $obj->getNombreTabla(). $strWhere.\" group by value order by value \" ;\n\n\t\t} else{\n\n\t\t\t$strWhere =\" ON \". $where;\n\n\t\t\t$strWhere = $strWhere. \" AND virtual_object.ispublic = 'S' \";\n\n\t\t\t//EVITAR VALORES A NULL\n\n\t\t\t$strWhere = $strWhere. \" AND \".$obj->getNombreTabla().\".value IS NOT NULL \";\n\n\t\t\t$sql =\"SELECT distinct value, count(*) as cuenta, MIN(idov) as idov FROM \". $obj->getNombreTabla().\" INNER JOIN virtual_object \" . $strWhere.\" AND \".$obj->getNombreTabla().\".idov=virtual_object.id group by value order by value \" ;\t\n\n\t\t}\n\n\t\t$this->visit->debuger->out(\"getHijosFromFecha: \". $obj->getNombreTabla() .\"-: $sql\");\n\n\t\t$collection = $this->execSQL( $sql, $obj );\n\n\t\treturn $collection;\n\n\t\t}", "public function getFechaInicioDirectivo( ){\n\t\treturn $this->fechaInicioDirectivo;\n\t}", "public function getClienteCiudadfiscal()\n {\n\n return $this->cliente_ciudadfiscal;\n }", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "function getContingencia(){\r\n return $this->contingencia;\r\n }", "public function getFinanciamientobecadocentesuser()\n\t{\n\t\treturn $this->financiamientobecadocentesuser;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function getIdDocumento(){\n return $this->idDocumento;\n }", "public function orden_cen_documento($referencia_id){\n $orden = CMPOrden::where('COD_ORDEN','=',$referencia_id)->first();\n\n return $orden;\n \n }", "public function getFechaCarga() {\n return $this->fechaCarga;\n }", "public function getFecha() \n {\n return $this->_fecha;\n }", "private function get_ejercicio($fecha)\n {\n $ejercicio = $this->ejercicio->get_by_fecha($fecha);\n if ($ejercicio) {\n $regiva0 = new regularizacion_iva();\n if ($regiva0->get_fecha_inside($fecha)) {\n $this->new_error_msg('No se puede usar la fecha ' . $_POST['fecha'] . ' porque ya hay'\n . ' una regularización de ' . FS_IVA . ' para ese periodo.');\n $ejercicio = false;\n }\n } else {\n $this->new_error_msg('Ejercicio no encontrado.');\n }\n\n return $ejercicio;\n }", "public function getFechaInicioCampeonato()\n {\n return $this->fechaInicioCampeonato;\n }", "function cFechaMy ($fecha) {\n \t\t$f = explode(\"/\",$fecha);\n \t\treturn $f[2].\"-\".$f[1].\"-\".$f[0];\n\t}", "function cFechaMy ($fecha) {\n \t\t$f = explode(\"/\",$fecha);\n \t\treturn $f[2].\"-\".$f[1].\"-\".$f[0];\n\t}", "public function getPrecalificacion()\n {\n return $this->precalificacion;\n }", "public function getFechaVencimientoDirectivo( ){\n\t\treturn $this->fechaVencimientoDirectivo;\n\t}", "public function getRangoQuiebre() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_quiebre');\n\n\t\t$query = $query->getArrayResult();\n\t\t\n\t\tif(isset($query[0])) $this->rangoquiebre = intval($query[0]['valor']);\n\t\telse $this->rangoquiebre = 0;\n\n\t\treturn $this->rangoquiebre;\n }", "public function getFechaInicio()\r\n {\r\n return $this->fechaInicio;\r\n }", "public function getAsistenciaestudiantesfecha()\n\t{\n\t\treturn $this->asistenciaestudiantesfecha;\n\t}", "public function getDateFinContrat() {\n return $this->dateFinContrat;\n }", "public function getDatePublication()\n {\n return $this->datepublication;\n }" ]
[ "0.6913614", "0.6742745", "0.6591978", "0.6556826", "0.6500509", "0.6444201", "0.64052045", "0.6381659", "0.63372743", "0.6256808", "0.61954945", "0.6174018", "0.61542803", "0.6146081", "0.6142345", "0.61012393", "0.6075728", "0.6061941", "0.6045042", "0.60335124", "0.6023287", "0.60171056", "0.60022885", "0.5951841", "0.59245473", "0.59201103", "0.59143335", "0.5907416", "0.58993685", "0.5883506", "0.5881001", "0.58689564", "0.58491015", "0.583886", "0.583886", "0.5837894", "0.58235204", "0.58235204", "0.5813794", "0.58120286", "0.58011425", "0.5799878", "0.5797171", "0.5771607", "0.5769862", "0.57697535", "0.5769669", "0.57564104", "0.57533526", "0.57512116", "0.5747682", "0.5746796", "0.57456136", "0.57456136", "0.5741948", "0.5738761", "0.57368505", "0.5731175", "0.5727453", "0.5723324", "0.572303", "0.5722542", "0.5719786", "0.57197076", "0.57179505", "0.57152665", "0.5704533", "0.5703845", "0.5697171", "0.568888", "0.56882864", "0.5687834", "0.56862026", "0.5684742", "0.56831825", "0.56752825", "0.56696725", "0.5669645", "0.56596273", "0.56502795", "0.5637664", "0.5631403", "0.5620549", "0.5613361", "0.5612284", "0.56072336", "0.5588501", "0.55834466", "0.55746126", "0.5568108", "0.5562473", "0.5559442", "0.5559442", "0.55578387", "0.5555543", "0.55552554", "0.5551079", "0.55496967", "0.5547877", "0.55477226" ]
0.8519631
0
Set the value of docenciatecnicosuperiorfecha
Задайте значение docenciatecnicosuperiorfecha
public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha) { $this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function setFecha($n)\n {\n this->$v_fecha=$n;\n \n }", "function set_fechaIngreso( $fechaIngreso ) {\n // sets the value of fechaIngreso\n $this->fechaIngreso = $fechaIngreso;\n }", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function setFecha($fecha){\n $this->fecha = $fecha;\n }", "public function setFecha($fecha){\n $this->fecha = $fecha;\n }", "public function setFecha($value){\n $this->fecha = $value;\n return true;\n \n }", "public function setFecha($fecha) \n {\n $this->_fecha = $fecha;\n }", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setFecha($value){\n $this->fecha = $value;\n return true;\n}", "public function setFecha($fecha){\n\t\t$this->fecha = $fecha;\n\t}", "public function setFechaInicioAttribute($valor){\n $this->attributes['fecha_inicio'] = strlen($valor)? Carbon::createFromFormat('d/m/Y', $valor) : null;\n }", "public function set_Fecha($fecha){\n\t\t//FB::info(timestamp2date($fecha));\n\n\t\tif(is_numeric($fecha)){\n\t\t\t$query = \"UPDATE visitas_de_seguimiento SET fecha='$fecha' WHERE id='$this->id' \";\n\t\t\tif(!mysql_query($query))\n\t\t\tthrow new Exception(\"Error al actualizar la fecha en la BBDD.\");\n\t\t\t$this->fecha = $fecha;\n\n\t\t}else\n\t\tthrow new Exception(\"Debe introducir una fecha v&aacute;lida.\");\n\t}", "public function setFechalecturaAttribute($valor){\n $this->attributes['fechalectura'] = strlen($valor)? Carbon::createFromFormat('d/m/Y', $valor) : null;\n }", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "function set_fecha_ctr_correlativas($parametros)\n\t{\n\t\tif ($parametros['fecha_ctr_correlat'] != \"''\" ) \n\t\t{\n\t\t\t$fecha = $this->get_fecha_ctr_correlativas($parametros);\n\t\t\t$nueva_fecha = self::strToMDY($parametros['fecha_ctr_correlat']);\n\t\t\tif (isset($fecha['FECHA'])) {\n\t\t\t\t$sql = \"UPDATE ufce_fechas_ctr_correlat\n\t\t\t\t\t\t\tSET fecha = $nueva_fecha\n\t\t\t\t\t\tWHERE anio_academico = {$parametros['anio_academico']}\n\t\t\t\t\t\tAND periodo_lectivo = {$parametros['periodo']} \"; \n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"INSERT INTO ufce_fechas_ctr_correlat (anio_academico, periodo_lectivo, fecha)\n\t\t\t\t\t\t\tVALUES ({$parametros['anio_academico']}, {$parametros['periodo']}, $nueva_fecha) \"; \n\t\t\t}\n\t\t\tkernel::db()->ejecutar($sql);\n\t\t}\n\t}", "public function setFecha_acre_super($fecha_acre_super){\n $this->fecha_acre_super = $fecha_acre_super;\n }", "public function setFechaPublicacionAttribute($value)\r\n {\r\n if(!empty($value))\r\n {\r\n $this->attributes['fecha_publicacion'] = date_format(date_create(substr($value, 3, 2) . '/' . substr($value, 0, 2) . '/' . substr($value, 6, 4)), 'Y-m-d');\r\n }\r\n }", "public function setFechaCaducidadAttribute($value)\n {\n $this->attributes['FechaCaducidad'] = (new Carbon($value))->format('d-m-Y');\n }", "public function setFecha_curso($fecha_curso){\n $this->fecha_curso = $fecha_curso;\n }", "public function setDocente($docente){\n $this->docente = $docente;\n }", "public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior)\n\t{\n\t\t$this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior;\n\n\t\treturn $this;\n\t}", "public function setFecha($fecha)\n {\n $this->fecha = $fecha;\n }", "public function getFecha_acre_super(){\n return $this->fecha_acre_super;\n }", "public function getFinanciamientobecadocentesfecha()\n\t{\n\t\treturn $this->financiamientobecadocentesfecha;\n\t}", "public function puestaCero (){\n $this->setSegundo(0);\n $this->setMinuto(0);\n $this->setHora(0);\n }", "public function setTglPresensiAttribute($date)\n {\n $this->attributes['tgl_presensi'] = Carbon::createFromFormat('d F Y', $date);\n }", "function setFechaVisitaPoi($fechaVisitaPoi) {\n $this->fechaVisitaPoi = $fechaVisitaPoi;\n }", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "public function set_Fecha_Facturacion($fecha_facturacion){\n\t\tif(is_numeric($fecha_facturacion)){\n\t\t\t$query = \"UPDATE facturas SET fecha_facturacion='\".trim($fecha_facturacion).\"' WHERE id='$this->id' \";\n\t\t\tif(!mysql_query($query))\n\t\t\tthrow new Exception(\"Error al actualizar la fecha de facturacion en la BBDD.\");\n\t\t\t$this->fecha_facturacion = trim($fecha_facturacion);\n\n\t\t}else\n\t\tthrow new Exception(\"Debe introducir una fecha v&aacute;lida.\");\n\t}", "function evt__cuadro__seleccion($datos)\n\t{\n //print_r($this->s__datos);exit();\n $d=array();\n $d['id_docente']=$datos['id_docente'];\n $valores=array();\n $valores['legajo']=$datos['nro_legaj'];\n $valores['apellido']=$datos['desc_appat'];\n $valores['nombre']=$datos['desc_nombr'];\n $valores['nro_cuil1']=$datos['nro_cuil3'];\n $valores['nro_cuil']=$datos['nro_cuil4'];\n $valores['nro_cuil2']=$datos['nro_cuil5'];\n $valores['fec_nacim']=$datos['nacim'];\n $valores['tipo_docum']=$datos['tipo_doc'];\n $valores['nro_docum']=$datos['nro_cuil4'];\n $valores['tipo_sexo']=$datos['sexo'];\n $valores['fec_ingreso']=$datos['fec_ingreso'];\n $valores['telefono']=$datos['telefono'];\n $valores['telefono_celular']=$datos['telefono_celular'];\n $valores['correo_institucional']=$datos['correo_electronico'];\n $this->dep('datos')->tabla('docente')->cargar($d);//carga el docente seleccionado\n $this->dep('datos')->tabla('docente')->set($valores);\n $this->dep('datos')->tabla('docente')->sincronizar();\n \n\t}", "public function setDtInicioOfertaCadastro($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_inicio_oferta_cadastro !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_inicio_oferta_cadastro !== null && $tmpDt = new DateTime($this->dt_inicio_oferta_cadastro)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_inicio_oferta_cadastro = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_INICIO_OFERTA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setData($date){\n $this->inizio=$date;}", "public function setDateFinDoc(?DateTime $dateFinDoc): ChantiersReclamations {\n $this->dateFinDoc = $dateFinDoc;\n return $this;\n }", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "function setDateFin($datefin){\n $this->datefin = $datefin;\n }", "function filecabinet_action_document_set_docdate($folder, $docdate) {\n $document->docdate = $docdate;\n $document->rules_update = TRUE;\n return array('folder' => $folder);\n}", "function modificarDosificacion(){\n\t\t$this->procedimiento='fac.ft_dosificacion_ime';\n\t\t$this->transaccion='FAC_DOSI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_dosificacion','id_dosificacion','int4');\n\t\t$this->setParametro('id_sucursal','id_sucursal','int4');\n\t\t$this->setParametro('id_activida_economica','id_activida_economica','int4');\n\t\t$this->setParametro('notificado','notificado','varchar');\n\t\t$this->setParametro('llave','llave','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t$this->setParametro('tipo_autoimpresor','tipo_autoimpresor','varchar');\n\t\t$this->setParametro('nroaut','nroaut','varchar');\n\t\t$this->setParametro('final','final','varchar');\n\t\t$this->setParametro('estacion','estacion','varchar');\n\t\t$this->setParametro('inicial','inicial','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('glosa_consumidor','glosa_consumidor','varchar');\n\t\t$this->setParametro('glosa_impuestos','glosa_impuestos','varchar');\n\t\t$this->setParametro('fecha_dosificacion','fecha_dosificacion','date');\n\t\t$this->setParametro('id_lugar_pais','id_lugar_pais','int4');\n\t\t$this->setParametro('autoimpresor','autoimpresor','varchar');\n\t\t$this->setParametro('nombre_sisfac','nombre_sisfac','varchar');\n\t\t$this->setParametro('fecha_inicio_emi','fecha_inicio_emi','date');\n\t\t$this->setParametro('nro_siguiente','nro_siguiente','varchar');\n\t\t$this->setParametro('nro_resolucion','nro_resolucion','varchar');\n\t\t$this->setParametro('glosa_empresa','glosa_empresa','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setDateDebutDoc(?DateTime $dateDebutDoc): ChantiersReclamations {\n $this->dateDebutDoc = $dateDebutDoc;\n return $this;\n }", "public function setClienteFecharegistro($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->cliente_fecharegistro !== null || $dt !== null) {\n $currentDateAsString = ($this->cliente_fecharegistro !== null && $tmpDt = new DateTime($this->cliente_fecharegistro)) ? $tmpDt->format('Y-m-d') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->cliente_fecharegistro = $newDateAsString;\n $this->modifiedColumns[] = ClientePeer::CLIENTE_FECHAREGISTRO;\n }\n } // if either are not null\n\n\n return $this;\n }", "public function setFechaInicioCampeonato($fecha)\n {\n $this->fechaInicioCampeonato = $fecha;\n }", "function addFechaInicial(){\n\t\t$xDate\t\t\t= new cHDate(0, false, TIPO_FECHA_OPERATIVA);\n\t\t$this->mJsVars\t.= \"var fechaInicial\t= $('#idfecha-0').val();\\r\\n\";\n\t\t\n\t\t$this->mURL\t\t.= \" + \\\"&on=\\\" + fechaInicial \";\n\t\t$this->mURL\t\t.= \" + \\\"&fechainicial=\\\" + fechaInicial \";\n\t\t$this->mURL\t\t.= \" + \\\"&fechaMX=\\\" + fechaInicial \";\n\t\t\n\t\treturn $xDate->get(\"TR.Fecha_Inicial\");\n\t}", "public function setFechaRegistro($fecha_registro)\n {\n $this->fecha_registro = $fecha_registro;\n\n return $this;\n }", "public function setFechaanio( $fechaanio ) {\n\t$this->fechaanio = $fechaanio;\n }", "public function carga_cliente_manual_controlador($codigo_cliente, $cedula, $nombre, $direccion, $telefono, $pais, $webpage, $cumple, $email, $vendedor, $precio){\r\n\r\n $tipo_documento = \"Cedula\";\r\n $numero_documento= $cedula;\r\n\t\t\t$cliente_tipo= \"Personal\";\r\n\t\t\t$metodo_pago=\"Efectivo\";\r\n\r\n\t\t\tif($tipo_documento == null || $tipo_documento == \"\"){\r\n\t\t\t\t$tipo_documento = \"Cedula\";\r\n\t\t\t}\r\n\r\n\t\t\tif($pais == null || $pais == \"\"){\r\n\t\t\t\t$pais = \"PANAMA\";\r\n\t\t\t}\r\n\r\n\t\t\t$precio_valor = \"2.50\";\r\n\t\t\tif($precio == \"1 Precio Platinum\"){\r\n\t\t\t\t$precio_valor = \"2.35\";\r\n\t\t\t}\r\n\t\t\telseif ($precio == \"2 Precio de Gold\"){\r\n\t\t\t\t$precio_valor = \"2.40\";\r\n\t\t\t}\r\n\t\t\t/*== Buscando el nombre del vendedor ==*/\r\n\t\t\tif(isset($vendedor) || $vendedor != \"\" || $vendedor != null){\r\n\t\t\t\t$check_usuario=mainModel::ejecutar_consulta_simple(\"SELECT ifnull(usuario_nombre, 'Sin vendedor') as usuario_nombre FROM usuario WHERE usuario_id=$vendedor\");\r\n\t\t\t\t$usuario=$check_usuario->fetch();\r\n\t\t\t\t$usuario_nombre = $usuario['usuario_nombre'];\r\n\r\n\t\t\t\t$check_usuario->closeCursor();\r\n\t\t\t\t$check_usuario=mainModel::desconectar($check_usuario);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$vendedor = \"\";\r\n\t\t\t\t$usuario_nombre = \"\";\r\n\t\t\t}\r\n \r\n /*== Preparando datos para enviarlos al modelo ==*/\r\n\t\t\t$datos_cliente_reg=[\r\n \t\"cliente_codigo\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Codigo\",\r\n\t\t\t\t\t\"campo_valor\"=>$codigo_cliente\r\n ],\r\n\t\t\t\t\"cliente_tipo_documento\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Tipo\",\r\n\t\t\t\t\t\"campo_valor\"=>$tipo_documento\r\n ],\r\n \"cliente_numero_documento\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Numero\",\r\n\t\t\t\t\t\"campo_valor\"=>$numero_documento\r\n ],\r\n \"cliente_nombre\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Nombre\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($nombre)\r\n ],\r\n \"cliente_estado\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Pais\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($pais)\r\n ],\r\n \"cliente_direccion\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Direccion\",\r\n\t\t\t\t\t\"campo_valor\"=>utf8_decode($direccion)\r\n ],\r\n \"cliente_cordenada\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Coordenada\",\r\n\t\t\t\t\t\"campo_valor\"=>\"\"\r\n ],\r\n \"cliente_telefono\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Telefono\",\r\n\t\t\t\t\t\"campo_valor\"=>$telefono\r\n ],\r\n \"cliente_email\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Email\",\r\n\t\t\t\t\t\"campo_valor\"=>$email\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_tipo\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":TipoCliente\",\r\n\t\t\t\t\t\"campo_valor\"=>$cliente_tipo\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_sitioweb\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Webpage\",\r\n\t\t\t\t\t\"campo_valor\"=>$webpage\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_vendedor_id\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":VendedorId\",\r\n\t\t\t\t\t\"campo_valor\"=>$vendedor\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_vendedor_nombre\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":VendedorNombre\",\r\n\t\t\t\t\t\"campo_valor\"=>$usuario_nombre\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_metodo_pago\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":MetodoPago\",\r\n\t\t\t\t\t\"campo_valor\"=>$metodo_pago\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_precio\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Precio\",\r\n\t\t\t\t\t\"campo_valor\"=>$precio_valor\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_cumpleaños\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Cumpleano\",\r\n\t\t\t\t\t\"campo_valor\"=>$cumple\r\n\t\t\t\t],\r\n\t\t\t\t\"cliente_ruta\"=>[\r\n\t\t\t\t\t\"campo_marcador\"=>\":Ruta\",\r\n\t\t\t\t\t\"campo_valor\"=>\"\"\r\n\t\t\t\t]\r\n ];\r\n\r\n $agregar_cliente=mainModel::guardar_datos(\"cliente\",$datos_cliente_reg);\r\n\t\t\tif($agregar_cliente->rowCount()==0){\r\n\t\t\t\t$alerta=[\r\n\t\t\t\t\t\"Alerta\"=>\"simple\",\r\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\r\n\t\t\t\t\t\"Texto\"=>\"No hemos podido registrar el cliente, por favor intente nuevamente \".$codigo_cliente,\r\n\t\t\t\t\t\"Datos\"=>\"tipo_documento: \".$tipo_documento.\" numero_documento: \".$numero_documento.\" nombre: \".$nombre.\" pais: \".$pais.\" direccion: \".$direccion.\" telefono: \".$telefono.\" email: \".$email.\" cliente_tipo\".$cliente_tipo.\" vendedor: \".$vendedor.\" usuario_nombre: \".$usuario_nombre.\" precio_valor: \".$precio_valor.\" cumple: \".$cumple,\r\n\t\t\t\t\t\"Tipo\"=>\"error\"\r\n\t\t\t\t];\r\n\t\t\t\techo json_encode($alerta);\r\n\t\t\t}\r\n\r\n\t\t\t$agregar_cliente->closeCursor();\r\n\t\t\t$agregar_cliente=mainModel::desconectar($agregar_cliente);\r\n }", "function modificarDocConcepto(){\n\t\t$this->procedimiento='conta.ft_doc_concepto_ime';\n\t\t$this->transaccion='CONTA_DOCC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_doc_concepto','id_doc_concepto','int4');\n\t\t$this->setParametro('id_doc_compra_venta','id_doc_compra_venta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_orden_trabajo','id_orden_trabajo','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad_sol','numeric');\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('precio_total_final','precio_total_final','numeric');\n\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 setDatefrais($datefrais)\n {\n $this->datefrais = $datefrais;\n\n \n }", "public function setFechaInicio( $fechaInicio ){\n\t\t$this->fechaInicio = $fechaInicio;\n\t}", "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "static function descuento_gobierno(){\n //Aplicamos el descuento en funcion de la fecha\n if( date(\"m-d-y\")>\"01-01-17\" ){\n self::$ayuda = 4500;\n }\n }", "function set_date($user, $date)\n {\n if ($user->rights->banque->cheque)\n {\n $sql = \"UPDATE \".MAIN_DB_PREFIX.\"bordereau_cheque\";\n $sql.= \" SET date_bordereau = \".($date ? $this->db->idate($date) : 'null');\n $sql.= \" WHERE rowid = \".$this->id;\n\n dol_syslog(get_class($this).\"::set_date\", LOG_DEBUG);\n $resql=$this->db->query($sql);\n if ($resql)\n {\n $this->date_bordereau = $date;\n return 1;\n }\n else\n {\n $this->error=$this->db->error();\n return -1;\n }\n }\n else\n {\n return -2;\n }\n }", "public function setDoc_entrega($doc_entrega)\r\r\n {\r\r\n $this->doc_entrega = $doc_entrega;\r\r\n\r\r\n return $this;\r\r\n }", "public function setDate($date);", "public function setDate($date);", "public function setDate($date);", "public function setFecha_inscripcion($fecha_inscripcion)\r\n\t{\r\n\t\t$this->fecha_inscripcion = $fecha_inscripcion;\r\n\t}", "public function setFechaRegistro($fechaRegistro)\n {\n $this->fechaRegistro = $fechaRegistro;\n }", "public function __construct($fecha)\n {\n $this->_fecha = $fecha;\n }", "public function setDtInicioOferta($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_inicio_oferta !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_inicio_oferta !== null && $tmpDt = new DateTime($this->dt_inicio_oferta)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_inicio_oferta = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_INICIO_OFERTA;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setDataInicio($oDtInicio) {\n $this->oDtInicio = $oDtInicio;\n }", "public function setEdificio($edificio)\n\t{\n\t\t$this->edificio = $edificio;\n\t}", "function set_date($user, $date)\n {\n if ($user->rights->repair->creer)\n {\n $sql = \"UPDATE \".MAIN_DB_PREFIX.\"repair\";\n $sql.= \" SET date_repair = \".($date ? $this->db->idate($date) : 'null');\n $sql.= \" WHERE rowid = \".$this->id.\" AND fk_statut = 0\";\n\n dol_syslog(\"Repair::set_date sql=$sql\",LOG_DEBUG);\n $resql=$this->db->query($sql);\n if ($resql)\n {\n $this->date = $date;\n return 1;\n }\n else\n {\n $this->error=$this->db->error();\n dol_syslog(\"Repair::set_date \".$this->error,LOG_ERR);\n return -1;\n }\n }\n else\n {\n return -2;\n }\n }", "public function setDtFimOfertaCadastro($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_fim_oferta_cadastro !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_fim_oferta_cadastro !== null && $tmpDt = new DateTime($this->dt_fim_oferta_cadastro)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_fim_oferta_cadastro = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_FIM_OFERTA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setFechaCobro($fechaCobro) {\n\t\t$this->fechaCobro = $fechaCobro;\n\n\t\treturn $this;\n\t}", "function getFecha(){ return $this->fecha; }", "function set($datos, $inicio = 0) {\r\n $this->id = $datos[0 + $inicio];\r\n $this->fecha = $datos[1 + $inicio];\r\n $this->hora = $datos[2 + $inicio];\r\n $this->pago = $datos[3 + $inicio];\r\n $this->nombreUsuario = $datos[4 + $inicio];\r\n $this->dirUsuario = $datos[5 + $inicio];\r\n $this->precioTotal= $datos[6 + $inicio];\r\n }", "public function setdate($date) { $this->date = $date; }", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "function SetDatos($idUSuarioInput, $horarioInput, $fechaInput, $usuariosTotalInput, $idEspecialidadInput){\n $this->idUsuarioCronograma = $idUSuarioInput;\n $this->horarioCronograma = $horarioInput;\n $this->fechaCronograma = $fechaInput;\n $this->usuariosTotalCronograma = $usuariosTotalInput;\n $this->idEspecialidadCronograma = $idEspecialidadInput;\n }", "public function setFecha_carga($fecha_carga)\r\n\t{\r\n\t\t$this->fecha_carga = $fecha_carga;\r\n\t}", "public function setDtInicioCadastro($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->dt_inicio_cadastro !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->dt_inicio_cadastro !== null && $tmpDt = new DateTime($this->dt_inicio_cadastro)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->dt_inicio_cadastro = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = TbperiodoPeer::DT_INICIO_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setDatePub($datePub)\n{\n$this->datePub = $datePub;\n\nreturn $this;\n}", "function modificarDocumentoCategoriaClasificacion(){\n\t\t$this->procedimiento='prov.ft_documento_categoria_clasificacion_ime';\n\t\t$this->transaccion='PM_DOCATCLA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_documento_categoria_clasificacion','id_documento_categoria_clasificacion','int4');\n\t\t$this->setParametro('id_categoria','id_categoria','int4');\n\t\t$this->setParametro('id_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('documento','documento','varchar');\n\t\t$this->setParametro('presentar_legal','presentar_legal','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function setEsOtrosEgresos(){\n\t\t//$xO->es_estadistico(\"0\");//Si es estadistico, operacion base estadisticos.- Obsoleto pero usado.\n\t\t//Agregar clase efectivo\n\t\t//Cambiar el recibo que afecta\n\t\t$this->getObj()->recibo_que_afecta(RECIBOS_TIPO_OEGRESOS);\n\t\t$this->getObj()->query()->update()->save($this->getObj()->idoperaciones_tipos()->v());\n\t\t$this->setCleanCache();\n\t}", "function __construct($nacionalidad,$cedula,$nombres,$apellidos,$sexo,$telefono='000000',$correo='No',$estatus_docente,$fecha_ini_d,$fecha_fin_d='Laborando',$estatus_tutor,$estatus,$fecha_ini,$fecha_fin='Laborando') //Constructor de la clase hija.\r\n {\r\n //Constructor de la lase padre.\r\n parent::__construct($nacionalidad,$cedula,$nombres,$apellidos,$sexo,$telefono,$correo);\r\n\r\n //Asigno valores a los elementos del constructor\r\n $this->estatus_docente= $estatus_docente;\r\n $this->fecha_ini_d= $fecha_ini_d;\r\n $this->fecha_fin_d= $fecha_fin_d;\r\n\r\n $this->estatus_tutor= $estatus_tutor; //me indica que lo que porfin\r\n\r\n $this->estatus= $estatus;\r\n $this->fecha_ini= $fecha_ini;\r\n $this->fecha_fin= $fecha_fin;\r\n }", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "function modificarCajero(){\n\t\t$this->procedimiento='tes.ft_cajero_ime';\n\t\t$this->transaccion='TES_CAJERO_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cajero','id_cajero','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t$this->setParametro('fecha_inicio','fecha_inicio','date');\n\t\t$this->setParametro('fecha_fin','fecha_fin','date');\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 setDateDebutEnchere($dateDebutEnchere )\n {\n if($dateDebutEnchere === null){\n $this->dateDebutEnchere = $this->dateCreation;\n }\n else{\n $this->dateDebutEnchere = $dateDebutEnchere;\n } \n return $this;\n }", "function cobrar(){\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"UPDATE Factura SET Pagada='\".$this->pagada.\"',Fecha_Cobro='\".$this->fecha.\"' WHERE Id_Factura='\".$this->idFactura.\"';\";\n\t\t$this->mysqli->query($sql);\n\t\tif($this->pagada == 'Efectivo'){\n\t\t\t$sql = \"INSERT INTO Caja (Fecha,Tipo,Importe,Comentario) VALUES ('\".$this->fecha.\"','Ingreso','\".$this->total.\"','Factura cobrada con fecha \".$this->fecha.\"');\";\n\t\t\t$this->mysqli->query($sql);\n\t\t}\n\t\t\n\t}", "function setSaldosDiarios($fecha = false){\n\t\treturn \"\";\n\t}", "public function setDataInicio(DBDate $dDataInicio) {\n\n $this->oDtInicio = $dDataInicio;\n }", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "function listarDocCompraCajero()\n {\n $this->objParam->defecto('ordenacion', 'id_doc_compra_venta');\n\n $this->objParam->defecto('dir_ordenacion', 'asc');\n\n if ($this->objParam->getParametro('id_periodo') != '') {\n $this->objParam->addFiltro(\"dcv.id_periodo = \" . $this->objParam->getParametro('id_periodo'));\n }\n\n if ($this->objParam->getParametro('id_int_comprobante') != '') {\n $this->objParam->addFiltro(\"dcv.id_int_comprobante = \" . $this->objParam->getParametro('id_int_comprobante'));\n }\n\n if ($this->objParam->getParametro('tipo') != '') {\n $this->objParam->addFiltro(\"dcv.tipo = ''\" . $this->objParam->getParametro('tipo') . \"''\");\n }\n\n if ($this->objParam->getParametro('sin_cbte') == 'si') {\n $this->objParam->addFiltro(\"dcv.id_int_comprobante is NULL\");\n }\n\n if ($this->objParam->getParametro('fecha_cbte') != '') {\n $this->objParam->addFiltro(\"dcv.fecha <= ''\" . $this->objParam->getParametro('fecha_cbte') . \"''::date\");\n }\n\n /* if ($this->objParam->getParametro('filtro_usuario') == 'si') {\n $this->objParam->addFiltro(\"dcv.id_usuario_reg = \" . $_SESSION[\"ss_id_usuario\"]);\n }*/\n\n if ($this->objParam->getParametro('id_depto') != '') {\n if ($this->objParam->getParametro('id_depto') != 0)\n $this->objParam->addFiltro(\"dcv.id_depto_conta = \" . $this->objParam->getParametro('id_depto'));\n }\n\n //(may) para tipo Facturas por Comisiones\n // var_dump('llegam', $this->objParam->getParametro('nombreVista'));exit;\n /* if ($this->objParam->getParametro('id_plantilla') == '') {\n var_dump('llegam');\n $this->objParam->addFiltro(\"dcv.id_plantilla = 63\");\n }else{\n var_dump('llegam222');\n }*/\n //var_dump('llegam222', $_SESSION[\"ss_id_usuario\"]);\n if ($this->objParam->getParametro('nombreVista') == 'DocCompraCajero'){\n if ($this->objParam->getParametro('id_depto') != 0)\n $this->objParam->addFiltro(\"dcv.id_depto_conta = \" . $this->objParam->getParametro('id_depto'));\n\n }\n\n\n if ($this->objParam->getParametro('id_agrupador') != '') {\n $this->objParam->addFiltro(\"dcv.id_doc_compra_venta not in (select ad.id_doc_compra_venta from conta.tagrupador_doc ad where ad.id_agrupador = \" . $this->objParam->getParametro('id_agrupador') . \") \");\n }\n\n if ($this->objParam->getParametro('tipoReporte') == 'excel_grid' || $this->objParam->getParametro('tipoReporte') == 'pdf_grid') {\n $this->objReporte = new Reporte($this->objParam, $this);\n $this->res = $this->objReporte->generarReporteListado('MODDocCompraVenta', 'listarDocCompraCajero');\n } else {\n $this->objFunc = $this->create('MODDocCompraVenta');\n $this->res = $this->objFunc->listarDocCompraCajero($this->objParam);\n }\n\n $temp = Array();\n $temp['importe_ice'] = $this->res->extraData['total_importe_ice'];\n $temp['importe_excento'] = $this->res->extraData['total_importe_excento'];\n $temp['importe_it'] = $this->res->extraData['total_importe_it'];\n $temp['importe_iva'] = $this->res->extraData['total_importe_iva'];\n $temp['importe_descuento'] = $this->res->extraData['total_importe_descuento'];\n $temp['importe_doc'] = $this->res->extraData['total_importe_doc'];\n $temp['importe_retgar'] = $this->res->extraData['total_importe_retgar'];\n $temp['importe_anticipo'] = $this->res->extraData['total_importe_anticipo'];\n $temp['importe_pendiente'] = $this->res->extraData['tota_importe_pendiente'];\n $temp['importe_neto'] = $this->res->extraData['total_importe_neto'];\n $temp['importe_descuento_ley'] = $this->res->extraData['total_importe_descuento_ley'];\n $temp['importe_pago_liquido'] = $this->res->extraData['total_importe_pago_liquido'];\n $temp['importe_aux_neto'] = $this->res->extraData['total_importe_aux_neto'];\n\n $temp['tipo_reg'] = 'summary';\n $temp['id_doc_compra_venta'] = 0;\n\n\n $this->res->total++;\n\n $this->res->addLastRecDatos($temp);\n\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "function set_Datos($pcDireccion,$pdFecha,$pcIp,$pcOperacion,$pcMotivo,$pcCampo,$pcTabla,$pcValorAnterior,$pcValorNuevo,$pcUsuario,$pcServicio)\n\t\t{\n\t\t\t$this->lcDireccion=$pcDireccion;\n\t\t\t$this->ldFecha=$pdFecha;\n\t\t\t$this->lcIp=$pcIp;\n\t\t\t$this->lcOperacion=$pcOperacion;\n\t\t\t$this->lcCampo=$pcCampo;\n\t\t\t$this->lcTabla=$pcTabla;\n\t\t\t$this->lcMotivo=$pcMotivo;\n\t\t\t$this->lcValorAnterior=$pcValorAnterior;\n\t\t\t$this->lcValorNuevo=$pcValorNuevo;\n\t\t\t$this->lcUsuario=$pcUsuario;\n\t\t\t$this->lcServicio=$pcServicio;\n\t\t}", "public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;\n\t\t}", "private function ingresarVentasFecha($fecha){\r\n\t\t\r\n\t\t$this->ingresarVentaMercanciaUsuario(800,10000,$fecha,array(500,501,502,503));\r\n\t\t$this->ingresarVentaMercanciaUsuario(801,10001,$fecha,array(500,503));\r\n\t\t$this->ingresarVentaMercanciaUsuario(802,10002,$fecha,array(501,503));\r\n\t\t$this->ingresarVentaMercanciaUsuario(803,10003,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(804,10004,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(805,10005,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(806,10006,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(807,10007,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(808,10008,$fecha,array(502));\r\n\t\t$this->ingresarVentaMercanciaUsuario(809,10009,$fecha,array(501));\r\n\t\t$this->ingresarVentaMercanciaUsuario(810,10010,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(811,10011,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(812,10012,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(813,10013,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(814,10014,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(815,10015,$fecha,array(502));\r\n\t\t$this->ingresarVentaMercanciaUsuario(816,10016,$fecha,array(500,501,504));\r\n\t\t$this->ingresarVentaMercanciaUsuario(817,10017,$fecha,array(500,500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(818,10018,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(819,10019,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(820,10020,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(821,10021,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(822,10022,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(823,10023,$fecha,array(501));\r\n\t\t$this->ingresarVentaMercanciaUsuario(824,10024,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(825,10025,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(826,10026,$fecha,array(501));\r\n\t\t$this->ingresarVentaMercanciaUsuario(827,10027,$fecha,array(501));\r\n\t\t$this->ingresarVentaMercanciaUsuario(828,10028,$fecha,array(501));\r\n\t\t$this->ingresarVentaMercanciaUsuario(829,10029,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(830,10030,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(831,10031,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(832,10032,$fecha,array(500));\r\n\t\t$this->ingresarVentaMercanciaUsuario(833,10033,$fecha,array(500));\r\n\r\n\t}", "public function getFechaCompraPoducto(){\n return $this->fechaCompraPoducto;\n }", "public function ActualizarFecha() {\n Yii::app()->db->createCommand()->update('CONFIGURACION', array(\n 'FECHA_ACTUALIZACION' =>date('Y-m-d H:i:s'),\n ), 'CONFIGURACION_ID=:id', array(':id' => '1'));\n }", "public function ControlarPagoDeFactura()\n\t{\n\t\t// marca como pagada\n\t\t\n\t\t$f\t=\t$this->GetFacturaCompra();\n\t\t// una factura de compra puede pagarse como anticipos de ordenes de compra\n\t\t// o con pagos parciales\n\t\tif(!$f->IsPendienteDePago())\n\t\t{\n\t\t\t$f->PendienteDePago = 'NO';\n\t\t\t$f->save();\n\t\t}\n\t}", "function posicionamentoCabecalho( scpdf $oPdf, $oDadosRelatorio) {\n\n $oPdf->SetXY(127, 10);\n\n $oPdf->SetFont('arial', 'bi', 7);\n $oPdf->Cell(154, $oDadosRelatorio->iAltura, $oDadosRelatorio->sPeriodo, 1, 1, 'C', 1);\n\n $oPdf->SetXY(127, 14);\n}", "public function getFechaInicioMetaSecundaria( ){\n return $this->fechaInicioMetaSecundaria;\n }", "function setSumaDeRecibo($monto = 0){ \t$this->mSumaDeRecibo = $monto;\t}", "public function setInvoiceDateAttribute($value)\n\t{\n\t\tif(gettype($value) == 'string') {\n\t\t\t$this->attributes['invoice_date'] = Carbon::createFromFormat('d-m-Y', $value);\n \t\t}\n\t}", "public function getAuto_fecha_compra()\n {\n return $this->auto_fecha_compra;\n }", "public function setIdDocumento($idDocumento){\n $this->idDocumento = $idDocumento;\n }", "public function getFechaCobro() {\n\t\treturn $this->fechaCobro;\n\t}", "function evt__formulario__alta($datos) {\n if($this->nombre_tabla=='mocovi_credito'){\n if($datos['credito']>0){\n $destino='';\n if($datos['id_tipo_credito']==2){//permuta\n //recibe\n $datos2['id_periodo']=$datos['id_periodo'];\n $datos2['id_unidad']=$datos['id_unidad_recibe'];\n $datos2['id_escalafon']=$datos['id_escalafon'];\n $datos2['id_tipo_credito']=$datos['id_tipo_credito'];\n $datos2['id_programa']=$datos['id_programa_recibe'];\n $datos2['descripcion']=$datos['descripcion'];\n $datos2['credito']=$datos['credito'];\n $this->dep('datos')->tabla($this->nombre_tabla)->set($datos2);\n $this->dep('datos')->sincronizar();\n \n //adjunto\n if(isset($datos['documento'])) {\n $res1=$this->dep('datos')->tabla($this->nombre_tabla)->get();\n $nombre=strval($res1['id_credito']).\".pdf\";\n $destino_ca=toba::proyecto()->get_path().\"/www/creditos_dependencia/\".$nombre;\n $destino=str_replace(\"presupuesto\", \"designa\", $destino_ca);\n //if(copy($datos['documento']['tmp_name'], $destino)){\n if(move_uploaded_file($datos['documento']['tmp_name'], $destino)){//mueve un archivo a una nueva direccion, retorna true cuando lo hace y falso en caso de que no\n $this->dep('datos')->tabla($this->nombre_tabla)->setear_archivo($res1['id_credito'],$nombre);\n }//moverá el archivo y no lo copiará, lo que significa que funcionará solo una vez.\n }\n $this->resetear();\n \n // da credito\n $datos3['id_periodo']=$datos['id_periodo'];\n $datos3['id_unidad']=$datos['id_unidad'];\n $datos3['id_escalafon']=$datos['id_escalafon'];\n $datos3['id_tipo_credito']=$datos['id_tipo_credito'];\n $datos3['id_programa']=$datos['id_programa'];\n $datos3['descripcion']=$datos['descripcion'];\n $datos3['credito']=$datos['credito']*(-1);\n $this->dep('datos')->tabla($this->nombre_tabla)->set($datos3);\n $this->dep('datos')->sincronizar();\n if(file_exists($destino)){\n $res2=$this->dep('datos')->tabla($this->nombre_tabla)->get();\n $this->dep('datos')->tabla($this->nombre_tabla)->setear_archivo($res2['id_credito'],$nombre);\n }\n \n $this->resetear();\n \n }else{//inicial\n \n $this->dep('datos')->tabla($this->nombre_tabla)->set($datos);\n $this->dep('datos')->sincronizar();\n if(isset($datos['documento'])) {\n $res=$this->dep('datos')->tabla($this->nombre_tabla)->get();\n $nombre=strval($res['id_credito']).\".pdf\";\n $destino_ca=toba::proyecto()->get_path().\"/www/creditos_dependencia/\".$nombre;\n $destino=str_replace(\"presupuesto\", \"designa\", $destino_ca);\n if(move_uploaded_file($datos['documento']['tmp_name'], $destino)){\n $this->dep('datos')->tabla($this->nombre_tabla)->setear_archivo($res['id_credito'],$nombre);\n }\n }\n $this->resetear();\n } \n \n \n \n }else{\n toba::notificacion()->agregar('El monto no puede ser negativo', 'info');\n }\n \n }else{\n $this->dep('datos')->tabla($this->nombre_tabla)->set($datos);\n $this->dep('datos')->sincronizar();\n $this->resetear();\n }\n /*$this->dep('datos')->tabla($this->nombre_tabla)->set($datos);\n $this->dep('datos')->sincronizar();\n $this->resetear();*/\n }", "function itineraires_autoriser(){}", "function CuerpoFicha($datos) \n\t{\n\t\t// Documento\n\t\t$this->pdf = new PDF_App();\n\t\t$this->pdf->SetMostrarLogo(false);\n\t\t$this->pdf->SetTopMargin(5);\n\t\t$this->pdf->AddPage();\n\t\t\n\t\t$this->pdf->SetTextColor(0,0,0);\n\t\t$this->pdf->SetDrawColor(0,0,0);\n\t\t$this->pdf->SetFillColor(140,140,140);\t\t\n\t\t// Primer Título\n\t\t$this->pdf->SetFont('Arial','BU',13);\n\t\t$this->pdf->MultiCell(190,5,\"CONTRATO DE ARRENDAMIENTO DE FINCAS URBANAS\",0,'C',0);\n\t\t$this->pdf->Ln(5);\t\t\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->Cell(190,7,\"En Cádiz a \".$datos['dia_fecha'].\" de \".$datos['mes_fecha'].\" de \".$datos['anio_fecha'].\".\",0,1);\n\t\t$this->pdf->Ln(5);\n\t\t// Vivienda\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"IDENTIFICACIÓN DE LA FINCA OBJETO DEL CONTRATO.\",0,'C',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Vía pública: \".$datos['direccion_vivienda'].\".\",0,'J',0);\n\t\t$this->pdf->Ln(5);\t\n\t\t$this->pdf->MultiCell(195,4,\"Localidad: \".$datos['poblacion_vivienda'].\" Provincia: \".$datos['provincia_vivienda'].\".\",0,'J',0);\t\t\n\t\t$this->pdf->Ln(5);\t\n\t\t// Segundo Título\n\t\t$this->pdf->SetFont('Arial','BU',13);\n\t\t$this->pdf->MultiCell(190,5,\"REUNIDOS\",0,'C',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"De una parte como ARRENDADOR:\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"D. \".$datos['nombre_completo'].\", mayor de edad, con D.N.I. nº \".$datos['nif'].\" , estado civil \".$datos['estado_civil'].\", con domicilio en \".$datos['domicilio'].\", \".$datos['poblacion'].\".\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"Y de otra parte, como ARRENDATARIO:\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"D. \".$datos['nombre_completo_comprador'].\", mayor de edad, con D.N.I. nº \".$datos['nif_comprador'].\", estado civil \".$datos['estado_civil_comprador'].\", con domicilio en \".$datos['domicilio_comprador'].\", \".$datos['poblacion_comprador'].\".\",0,'J',0);\n\t\t$this->pdf->Ln(5);\t\t\n\t\t$this->pdf->MultiCell(195,4,\"Ambas partes reconocen su mutua capacidad legal para obligarse en derecho en virtud del presente contrato que se regirá por las siguientes:\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','BU',13);\n\t\t$this->pdf->MultiCell(190,5,\"ESTIPULACIONES\",0,'C',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"1.- OBJETO DEL CONTRATO.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Es objeto de este contrato, el arrendamiento de la vivienda que se identifica así:\",0,'L',0);\n\t\t$this->pdf->Ln(5);\t\n\t\t$this->pdf->MultiCell(195,4,\"Vía pública: \".$datos['direccion_vivienda'],0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"2.- CAUSA Y NATURALEZA DEL CONTRATO.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Se hace constar por el arrendatario que carece de una vivienda para cubrir tal necesidad primordial. Por ello, es su intención fijar su domicilio habitual en la vivienda objeto de este contrato.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\t\n\t\t$this->pdf->MultiCell(195,4,\"Por lo expuesto sobre la naturaleza del contrato, al ser de vivienda será la prevista en el Titulo II de la vigente Ley de Arrendamientos Urbanos, que establece las normas que rigen el contrato de arrendamiento de vivienda.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"3.- DURACIÓN DEL CONTRATO.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Las partes contratantes, conforme a lo dispuesto en el art.9 del Real Decreto Ley 29/1994 de 24 de Noviembre, pactan libremente que este contrato tendrá una duración de un año, por lo que comenzará el \".$datos['dia_fecha_inicio_contrato'].\" del mes de \".$datos['mes_fecha_inicio_contrato'].\" y finalizando el \".$datos['dia_fecha_fin_contrato'].\" del mes de \".$datos['mes_fecha_fin_contrato'].\" del año \".$datos['anio_fecha_fin_contrato'].\". De todas formas, ambas partes conocen la obligación por parte del arrendador de prorrogar su vigencia hasta un mínimo de cinco años desde esta fecha.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"4.- PRECIO DEL ARRENDAMIENTO.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Se estipula la cantidad total de este contrato de \".$datos['cuota_total_texto'].\" (\".$datos['cuota_total'].\",-€), pagaderas por meses anticipados, a razón de \".$datos['cuota_mensual_texto'].\" (\".$datos['cuota_mensual'].\",-€) cada uno, comunidad incluida, abonándose dentro de los primeros siete días de cada mes.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"El pago del precio del arrendamiento se realizará de la siguiente forma: Mediante transferencia bancaria en el nº de c/c de la parte arrendadora: \".$datos['ncc'],0,'J',0);\n\t\t$this->pdf->Ln(5);\t\t\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"5.- ACTUALIZACIÓN DE LA RENTA.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"De acuerdo con el artículo 18 de la vigente L.A.U., las partes convienen y aceptan que la renta pactada sea actualizada, disminuyéndose o incrementándose, en la misma proporción que el Indice General de Precios al Consumo (Conjunto Nacional). De esta forma, cada año de vigencia de este contrato, se revisará la renta por el citado I.P.C.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"La actualización se practicará aplicando a la renta exigible la variación porcentual correspondiente a los doce meses inmediatamente anteriores a la fecha de cada actualización, tomando como base al índice correspondiente al mes de \".$datos['mes_actualizacion_renta'].\".\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"A los efectos de notificación y constancia del arrendador, en el recibo anterior al que proceda la revisión de renta o bien por carta, a elección de este, comunicará el porcentaje y cuantía del aumento, haciendo referencia al último Boletín Oficial del Instituto Nacional de Estadística en que se haya publicado, en el día de la fecha en que procediera el aumento, o con certificado de este Organismo, debiendo el arrendatario darse por notificado en un duplicado del recibo de la renta, que será firmado a tal fin.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\t\t\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"6.- USO DE LA VIVIENDA ARRENDADA.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"La vivienda objeto de este contrato la destinará el arrendatario a su residencia habitual y permanente, entendiéndose por esta la que constituye su domicilio, sin que pueda darle un uso distinto al expresado, o que la habite más de una familia, dando a sus dependencias el destino normal para el que fueron arrendadas, y quedándole expresamente prohibido ejercer en dicha vivienda cualquier actividad de comercio, industria o profesión colegiada, a excepción de mediar autorización expresa y escrita del arrendador, debiendo hacerse constar en este contrato a los efectos precedentes.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"7.- USOS DE BUENA VECINDAD Y DE POLICIA URBANA.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Queda obligado el arrendatario a observar los usos de buena vecindad y de policía urbana, debiendo abstenerse de causar molestias a los vecinos, así como poner en funcionamiento los aparatos productores de música o ruido, en horas que alteren el descanso de la vecindad.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"El arrendatario queda igualmente obligado a respetar las normas establecidas por la comunidad de propietarios del edificio en sus estatutos o en reglamentos del régimen interior, así como, en su llevar a cabo la labor de mantenimiento de las zonas comunes de la casa.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"8.- PROHIBICIONES.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"El arrendatario no podrá realizar en la vivienda obras que modifiquen su configuración o que puedan debilitar su seguridad, o afecten a elementos comunes.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"La vivienda no podrá ser cedida o subarrendada sin el consentimiento escrito y expreso del arrendador.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"9.- CONSERVACIÓN DE LA VIVIENDA.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"El arrendador queda obligado a mantener la vivienda y sus instalaciones o servicios en estado de habitabilidad, para servir al uso convenido, por lo que tales gastos serán de su exclusiva cuenta.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"Las reparaciones que sean necesarias por el uso ordinario y que tengan la consideración de “pequeñas reparaciones”, serán de la exclusiva cuenta del arrendatario.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"Las pequeñas reparaciones serán de cuenta de los propietarios el primer año de la vigencia de este contrato, el resto de la vigencia será por cuenta del arrendatario.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,'Igualmente las reparaciones que sean consecuencia de un daño doloso o de mal uso de la casa arrendada, serán de la exclusiva cuenta del arrendatario. En todo caso transcurridos cinco años de vigencia del contrato, la conservación serán de cuenta del arrendatario. ',0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,'El arrendatario se obliga a permitir la entrada a los trabajadores cuando deban realizar obras de conservación en la vivienda. ',0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,'El arrendatario deberá comunicar al arrendador, por el medio más rápido, la necesidad de obras de conservación, y permitirá el acceso de este a la vivienda, o de las personas que designe. Las obras solamente podrán realizarse por el arrendatario, en los casos de urgencia y para evitar daños mayores o perjuicios a terceros, pero siempre dando inmediata cuenta al arrendador. ',0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"10.- SERVICIOS Y SUMINISTROS.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"A los efectos prevenidos en el artículo 20.2 de la Ley de Arrendamientos Urbanos el arrendatario se obliga al abono de los gastos de suministros, excepto comunidad.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\t\t\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"11.- FIANZA.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"En virtud de lo dispuesto en el artículo 36.1 y Disposición Adicional Tercera de la vigente L.A.U, el arrendatario hace entrega, en este acto, de una mensualidad de renta, para cumplir con la preceptiva fianza.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->MultiCell(195,4,\"La cantidad de una mensualidad \".$datos['cuota_mensual_texto'].\" (\".$datos['cuota_mensual'].\",-€), será depositada en el organismo encargado de la tramitación de “Papel de Fianzas”, en virtud de las disposiciones legales vigentes en esta Comunidad Autónoma.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\t\t\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"12.- LEGISLACIÓN APLICABLE.\",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"En todo lo no previsto en este contrato, será de aplicación cuanto sobre el arrendamiento de inmuebles destinados a viviendas, se establece en la Ley de Arrendamientos Urbanos de 24 de Noviembre de 1.994 y en su defecto en el Código Civil.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont('Arial','B',13);\n\t\t$this->pdf->MultiCell(190,5,\"13.- JURISDICCIÓN. \",0,'L',0);\n\t\t$this->pdf->Ln(5);\n\t\t$this->pdf->SetFont(\"arial\", \"\", 8);\n\t\t$this->pdf->MultiCell(195,4,\"Para todas las cuestiones que puedan suscitarse en relación a este contrato, las partes con renuncia expresa al fuero que pudiera corresponderles, se someten única y exclusivamente a los Juzgados y Tribunales de la ciudad de Cádiz.\",0,'J',0);\n\t\t$this->pdf->Ln(5);\n\t\t// Firmas\n\t\t$this->pdf->Cell(70,4,\"EL ARRENDATARIO\",0,0);\n\t\t$this->pdf->Cell(70,4,\"EL ARRENDADOR\",0,1);\n\t\t$this->pdf->Ln(25);\n\t\t$this->pdf->Cell(70,4,\"Fdo. D. ___________________,\",0,0);\n\t\t$this->pdf->Cell(70,4,\"Fdo. D. ___________________,\",0,0);\n\t}" ]
[ "0.7610573", "0.65105325", "0.6371779", "0.6366613", "0.6299142", "0.6299142", "0.626528", "0.62557006", "0.6230568", "0.62291753", "0.6204742", "0.617649", "0.611721", "0.60733527", "0.6047168", "0.60248935", "0.60099703", "0.5978425", "0.5948567", "0.5940033", "0.59189504", "0.5911323", "0.58985", "0.58507246", "0.58497036", "0.5797448", "0.5739408", "0.5733847", "0.5691728", "0.569062", "0.56776506", "0.5671601", "0.56691253", "0.5666785", "0.56487876", "0.5642407", "0.5633079", "0.56324375", "0.5630727", "0.56204385", "0.56201154", "0.56123924", "0.55672836", "0.55630344", "0.55503416", "0.5546378", "0.5546308", "0.553515", "0.5523996", "0.551688", "0.55144966", "0.55131453", "0.5502414", "0.5502414", "0.5502414", "0.5496968", "0.5493909", "0.5491323", "0.5484272", "0.5481886", "0.5479624", "0.5462748", "0.54621214", "0.5458523", "0.5439299", "0.54311234", "0.54264283", "0.541512", "0.5414322", "0.5412575", "0.54096985", "0.5400181", "0.5396076", "0.53933233", "0.539297", "0.53798735", "0.5377665", "0.5373509", "0.53689337", "0.53653026", "0.536504", "0.5365001", "0.5349513", "0.5345848", "0.5344424", "0.53425556", "0.53324115", "0.53315663", "0.5326174", "0.53231895", "0.5321607", "0.5321576", "0.5317196", "0.5307063", "0.5298509", "0.52982205", "0.52920866", "0.5286121", "0.5283313", "0.52769655" ]
0.77383554
0
Get the value of docenciatecnicosuperioruser
Получить значение docenciatecnicosuperioruser
public function getDocenciatecnicosuperioruser() { return $this->docenciatecnicosuperioruser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser)\n\t{\n\t\t$this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function getSexe_utilisateur()\n {\n return $this->sexe_utilisateur;\n }", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "public function getUserCompany(){\r\n $this->initDb();\r\n $un = \"\";\r\n $ui = $this->getUserId();\r\n if($ui != \"\"){\r\n $un = getValue(\"SELECT user_company FROM tbl_users WHERE user_id = \" . $ui);\r\n }\r\n return $un;\r\n }", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "public function curric_code() {\n global $DB;\n return $DB->get_field('enrol_ues_usermeta', 'value', array('userid'=>$this->userid, 'name'=>'user_major'));\n }", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "public function getSubUsuario()\n {\n return $this->subUsuario;\n }", "public function getCouId()\n {\n return $this->cou_id;\n }", "public function getUserValue();", "function getDocumentoProveedor(){ return $this->documento_proveedor; }", "public function getFinanciamientobecadocentesuser()\n\t{\n\t\treturn $this->financiamientobecadocentesuser;\n\t}", "public function userAffiliation() {\n\t\t\t$affiliation = null;\n\t\t\tforeach($this->userGroups as $group){\n\t\t\t\tif($group['type'] === 'fc:org') {\n\t\t\t\t\tif(!empty($group['membership']['primaryAffiliation'])){\n\t\t\t\t\t\treturn trim(strtolower($group['membership']['primaryAffiliation']));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//\n\t\t\tResponse::error(401, \"Tjenesten fikk ikke tilgang til din tilhørighet fra Feide ('primaryAffiliation').\");\n\t\t}", "function getCodUsuario() {\r\n return $this->codUsuario;\r\n }", "public function getUserId()\n {\n return parent::getValue('user_id');\n }", "public function getClase_documento_benef()\r\n\t{\r\n\t\treturn($this->clase_documento_benef);\r\n\t}", "public function getUserId() {\n $possibilities = array('cpr', 'userId', 'barcode', 'cardno', 'customId',);\n foreach ($possibilities as $pos) {\n if (isset($this->userData[$pos])) {\n return $this->userData[$pos];\n }\n }\n return FALSE;\n }", "public function getIdUsuarioCadastrante () {\n\t\treturn $this->ug_usu_resp_cad_id;\n\t}", "public function getCuil() {\n return $this->cuilSolicitante;\n \n }", "public function getUsuario_carga()\r\n\t{\r\n\t\treturn($this->usuario_carga);\r\n\t}", "public function getCodigoUsuario()\n {\n return $this->codigoUsuario;\n }", "function getIdUsuario () { \n \treturn $this -> usrId; \n }", "public function getCargoUsuario()\r\n\t{\r\n\t\t/* ----------- VALIDA ACCESO USUARIO ----------- */\r\n\t\t$this->validateSession();\r\n\r\n\t\t$data=false;\r\n\t\t$id=$this->input->post('id_usuario');\r\n\t\tif(isset($id)){\r\n\t\t\t$data=($this->model->getIdCargo($id));\r\n\t\t\tif($data!=false)\r\n\t\t\t\techo $data->codigoCargo;\r\n\t\t}\r\n\t}", "public function getDocente(){\n return $this->docente;\n }", "public function getCandidatiprincipali()\n {\n return $this->candidatiprincipali;\n }", "public static function __user($document){\n return User::where('document_number',$document)->first();\n }", "public function getUsuario($atributo){\r\n return $this-> $atributo;\r\n }", "public function getCuerpo()\n {\n return $this->cuerpo;\n }", "public function getUtilisateur()\r\n {\r\n return $this->utilisateur;\r\n }", "public function getPrenom_utilisateur()\n {\n return $this->prenom_utilisateur;\n }", "public function getPro_perso_user()\n {\n return $this->pro_perso_user;\n }", "public function getId(){\n\t\treturn $this->perfileswebuser->getId_user();\n\t}", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getCodPersonaUsuario()\n {\n return $this->codPersonaUsuario;\n }", "public function getNro_doc_tutor()\r\n\t{\r\n\t\treturn($this->nro_doc_tutor);\r\n\t}", "public function getType_utilisateur()\n {\n return $this->type_utilisateur;\n }", "public function getUsuarioCreacion( ){\n return $this->usuarioCreacion;\n }", "public function get_Usuario(){\n\t\treturn $this->id_usuario;\n\t}", "public function getCod_usuario()\n {\n return $this->cod_usuario;\n }", "public function getCod_usuario()\n {\n return $this->cod_usuario;\n }", "public function getCedula()\n{\nreturn $this->cedula;\n}", "private function getCpt(){\n $entityManager = $this->getDoctrine()->getManager();\n $user = $entityManager->getRepository(User::class)->findOneBy(['email' => $this->username]);\n if($user){\n // get user preferences.\n $preferences = $entityManager->getRepository(UserPreferences::class)->findOneBy( ['user_id' => $user]);\n return $preferences->getMaxDisplay();\n }\n return 10;\n }", "public function getidUtilisateur()\n {\n return $this->idUtilisateur;\n }", "public function _getCliente(){\r\n\r\n\t\t\tif($this->Auth->user()['role'] == 'cliente'){\r\n\t\t\t\t# Recuperame Todos los datos del usuario actual\r\n\t\t\t\tApp::import('Model', 'User');\r\n \t\t \t$objUser = new User();\r\n \t\t\t$usuario = $objUser->findById($this->Auth->user()['id']);\r\n \t\t\treturn $usuario['Cliente'][0]['id'];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t}", "public function getCodPersonaUsuario() {\n return $this->codPersonaUsuario;\n }", "function getNombreDeUsuario(){\n\t\treturn $this->nombreDeUsuario;\n\t}", "public function getTbResenhaIdusuario(){\n\treturn $this->tbResenhaIdusuario;\n}", "public function getNombreUsuario(){\n return $this->nombreUsuario;\n }", "public function getUserId(){\r\n $this->initDb();\r\n $ui = 0;\r\n if($this->id != \"\"){\r\n $ui = getValue(\"SELECT user_id FROM tbl_requested_subjects WHERE subject_id = \" . $this->id);\r\n }\r\n return $ui;\r\n }", "abstract protected function getUserId() ;", "public function getIdUser(){\n return $this->idUser;\n }", "function getusuario()\n { return $this->usuario;}", "public function getRangoQuiebre() {\n\t\t$em = $this->em;\n\t\tif($this->user == null) $user = $this->security->getToken()->getUser();\n\t\telse $user = $this->user;\n\t\t$id_user = $user->getId();\n\t\t$id_cliente = $user->getClienteID();\n\t\t\t\t\n\t\t//CLIENTE\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT p.valor FROM CademReporteBundle:parametro p\t\t\t\n\t\t\tWHERE p.clienteid = :idcliente and p.nombre = :nombre ')\n\t\t\t->setParameter('idcliente', $id_cliente)\n\t\t\t->setParameter('nombre', 'rango_quiebre');\n\n\t\t$query = $query->getArrayResult();\n\t\t\n\t\tif(isset($query[0])) $this->rangoquiebre = intval($query[0]['valor']);\n\t\telse $this->rangoquiebre = 0;\n\n\t\treturn $this->rangoquiebre;\n }", "public function getUsu_clave()\n {\n return $this->usu_clave;\n }", "public function getRespostaUsuario()\n {\n return $this->respostaUsuario;\n }", "function getPermissionEmp(){\n\t\tif (Yii::$app->getUserOpt->profile_user()){\n\t\t\treturn Yii::$app->getUserOpt->profile_user()->emp;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getUtilisateur()\n {\n return $this->utilisateur;\n }", "public function getUtilisateur()\n {\n return $this->utilisateur;\n }", "public function getUtilisateur()\n {\n return $this->utilisateur;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCobrodomicilio(){\r\n\treturn $this->cobrodomicilio;\r\n}", "public function getUF() {\n return $this->oCensoUf;\n }", "function DameIdProximoCatOcup()\r\n {\r\n return $this->modelcatocup->buscaridproximo();\r\n\r\n }", "public function getCodeUser() {\n return $this->codeUser;\n }", "function getUserId() {\n return $this->getFieldValue('user_id');\n }", "public function getseniat_users_nombre()\n\t{\n\t\treturn $this->seniat_users_nombre;\n\t}", "public function getIduser()\n {\n return $this->iduser;\n }", "function wpcf_usermeta_get_user( $method = '' ){\n if ( empty( $method ) ) {\n $current_user = wp_get_current_user();\n $user_id = $current_user->ID;\n }\n\n return $user_id;\n}", "public function getUserField()\n {\n return $this->getDataItem('USER_FIELD');\n }", "public function getId_Usuario(){\r\n\t\treturn $this->nid_usuario;\r\n\t}", "public function getNom(){\n\t\treturn $_SESSION[self::getIdSecure()][\"user\"][self::$_inom];\n\t}", "function getUserFullName($user, $adminData=null){\n\n if(!isset($user)) return \"\";\n\n if($user->getRuolo() == RuoloUtente::AMMINISTRATORE && $adminData){\n return \"Crowdmine\";\n }\n return $user->getNome() . \" \" . $user->getCognome();\n}", "public function getTipoUser() {\n return $this->_tipo;\n }", "protected function getUserId() {}", "protected function getUserId() {}", "public function getCodUsuario()\n {\n return $this->codUsuario;\n }", "public function getCodUsuario()\n {\n return $this->codUsuario;\n }", "public function getUsuario_verificado()\r\n\t{\r\n\t\treturn($this->usuario_verificado);\r\n\t}", "public function getUsername(): string\n {\n return (string) $this->document;\n }", "public function getUserId() {\n\n\t}", "public function getCuenta()\n {\n return $this->empresas->cuenta;\n }", "function get_clinic_info($user_id,$field = \"clinic_id\" ){\n if( is_numeric($user_id) && $user_id >0 ){\n $sql = \"select clinic_id from clinic_user where user_id = '{$user_id}'\";\n $result = @mysql_query($sql);\n while( $row = @mysql_fetch_array($result) ){\n $clinic_id = $row[\"clinic_id\"];\n if(is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_id\" ) {\n return $row[$field];\n }\n if( is_numeric($clinic_id) && $clinic_id > 0 && $field == \"clinic_name\" ){\n $clinic_name = $this->get_field($clinic_id,\"clinic\",$field); \n return html_entity_decode($clinic_name);\n }\n }\n }\n return \"\";\n }" ]
[ "0.75135756", "0.7430221", "0.71762055", "0.682253", "0.660004", "0.6512649", "0.6318544", "0.6097247", "0.6071828", "0.6053352", "0.6025008", "0.5960315", "0.5929004", "0.5869627", "0.5833031", "0.5818664", "0.580293", "0.5802742", "0.5787103", "0.5781825", "0.57517886", "0.5742682", "0.57352906", "0.5730043", "0.57246065", "0.5707654", "0.5673223", "0.5663086", "0.56626", "0.56558496", "0.5651374", "0.5651146", "0.56293404", "0.5623043", "0.56159157", "0.5614651", "0.5610805", "0.5610657", "0.5610071", "0.56075794", "0.56073135", "0.56073135", "0.56073135", "0.5605517", "0.56032777", "0.5600323", "0.5585277", "0.55767256", "0.55674833", "0.55674833", "0.55671525", "0.5560194", "0.5554269", "0.55472964", "0.5541629", "0.5531281", "0.5531167", "0.552322", "0.55186903", "0.5518673", "0.55076545", "0.5506967", "0.5504953", "0.54993004", "0.5494947", "0.5493663", "0.54926705", "0.54926705", "0.54926705", "0.5486421", "0.5486421", "0.5486421", "0.5486421", "0.5486421", "0.5486421", "0.5486421", "0.5486421", "0.5486421", "0.5483481", "0.54822004", "0.54713374", "0.54695994", "0.5468463", "0.5465102", "0.5463219", "0.5457249", "0.54540014", "0.5452004", "0.5444678", "0.54443395", "0.544223", "0.54386204", "0.54385304", "0.5438423", "0.5438423", "0.5437771", "0.5437757", "0.5424188", "0.54229337", "0.54214096" ]
0.87381166
0
Set the value of docenciatecnicosuperioruser
Установите значение docenciatecnicosuperioruser
public function setDocenciatecnicosuperioruser($docenciatecnicosuperioruser) { $this->docenciatecnicosuperioruser = $docenciatecnicosuperioruser; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocenciatecnicosuperioruser()\n\t{\n\t\treturn $this->docenciatecnicosuperioruser;\n\t}", "public function setDocenciatecnicosuperiorAccion($docenciatecnicosuperiorAccion)\n\t{\n\t\t$this->docenciatecnicosuperiorAccion = $docenciatecnicosuperiorAccion;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorcodigo($docenciatecnicosuperiorcodigo)\n\t{\n\t\t$this->docenciatecnicosuperiorcodigo = $docenciatecnicosuperiorcodigo;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorfecha($docenciatecnicosuperiorfecha)\n\t{\n\t\t$this->docenciatecnicosuperiorfecha = $docenciatecnicosuperiorfecha;\n\n\t\treturn $this;\n\t}", "public function setDocenciatecnicosuperiorOculto($docenciatecnicosuperiorOculto)\n\t{\n\t\t$this->docenciatecnicosuperiorOculto = $docenciatecnicosuperiorOculto;\n\n\t\treturn $this;\n\t}", "public function getDocenciatecnicosuperiorAccion()\n\t{\n\t\treturn $this->docenciatecnicosuperiorAccion;\n\t}", "public function getDocenciatecnicosuperiorcodigo()\n\t{\n\t\treturn $this->docenciatecnicosuperiorcodigo;\n\t}", "public function getDocenciatecnicosuperiorOculto()\n\t{\n\t\treturn $this->docenciatecnicosuperiorOculto;\n\t}", "public function set_utilisateur($_utilisateur){\n\t\t\t$this->utilisateur = $_utilisateur;\n\t\t}", "function setusuario($val)\n { $this->usuario=$val;}", "public function getDocenciatecnicosuperiorfecha()\n\t{\n\t\treturn $this->docenciatecnicosuperiorfecha;\n\t}", "private function editUser ( ) {\r\n\r\n if ( filter_has_var ( INPUT_POST, 'idModificar' ) ) { /** si s'ha sel·leccionat usuari */\r\n \r\n /** crida a la preparació la vista de la fitxa del usuari */\r\n $this->viewUser ( );\r\n \r\n /** crida al mètode que recupera l'usuari indicat */\r\n $this->usuari = $this->model->getUsuariById ( filter_input ( INPUT_POST, 'idModificar' ) );\r\n \r\n /** crea un nou objecte politica */\r\n $politica = new politica ( );\r\n\r\n /** crida al mètode que recupera la política indicada */\r\n $this->politica = $politica->getPoliticaById ( $this->usuari['idPolitica'] );\r\n \r\n }\r\n \r\n }", "public function setusuario($user){\n\t\t$this->user = $user;\t\t\t\t\n }", "public function setUsuario($atributo, $contenido){\r\n $this-> $atributo = $contenido;\r\n }", "public function setUser($user_data=array()){\n\t\t\tif(array_key_exists('nif', $user_data)) {\n\t\t\t\tif(!$this->getUserByNif($user_data['nif'])){\n\t\t\t\t\tforeach ($user_data as $propiedad=>$valor) {\n\t\t\t\t\t\t$$propiedad = $valor;\n\t\t\t\t\t}\n\t\t\t\t\t@$password = md5($password);\n\t\t\t\t\t$this->query = \"\n\t\t\t\t\tINSERT INTO clientes\n\t\t\t\t\t(nif, nombre, password, telefono, direccion, localidad, provincia, pais, codigopostal, email)\n\t\t\t\t\tVALUES\n\t\t\t\t\t('$nif', '$nombre','$password','$telefono','$direccion','$localidad','$provincia','$pais','$codigopostal','$email')\n\t\t\t\t\t\";\n\t\t\t\t\t$this->ejecutarConsulta();\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function setCobrodomicilio($p_cobrodomicilio){\r\n\t$this->cobrodomicilio=$p_cobrodomicilio;\r\n}", "public function SetUserData() {\n\t\tglobal $usuarios_nivel_int;\n\t\t$this->ParseRecord();\n\t\t$this->nombre_apellido = @$this->nombre.\" \".@$this->apellido;\n\t\t$this->NomApe = @$this->nombre.\" \".@$this->apellido;\n\t\t$this->nivel_int = @$usuarios_nivel_int[$this->nivel];\n\t}", "function setUsuario_id($usuario_id) \r\n { \r\n $this->usuario_id=$usuario_id; \r\n \r\n }", "function set_user($user)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER, $user);\r\n }", "public function setCodiTipoUsua($value)\r\n {\r\n //validando de que el valor sea un id\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_tipo_usua = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "public function set_id_user($arg)\n {\n $this->_id_user = (int)$arg;\n }", "public function editar_user() {\n\t\t$usuario = $this -> ssouva -> login();\n\t\t$datos[\"usuario\"] = $usuario;\n\n\t\t// Cosas de sesiones y si es admin o no\n\t\tif ($this -> admin_model -> es_admin($usuario)>0) {\n\t\t\t$idu = $this -> input -> get(\"id\");\n\t\t\t$datos[\"datos_usuarios\"] = $this -> usuarios_model -> devuelve_datos_usuario_id($idu);\n\t\t\t$this -> load -> view(\"doc/datos_usuario\", $datos);\n\t\t}\n\t}", "public function setUtilisateur($utilisateur)\n {\n $this->utilisateur = $utilisateur;\n }", "public function setPerfil($user_Id){\r\n\t\t$query = 'SELECT * FROM usuarios u, perfiles p WHERE u.user_Id = p.user_Id AND u.user_Id='.$user_Id; \r\n\t\t$perfil = grafidelDB::getFromDB($query);\r\n\t\t/* USUARIO */\r\n\t\t$this->user_Id = $perfil['user_Id'];\r\n\t\t$this->user = $perfil['user'];\r\n\t\t$this->nombre = $perfil['nombre'];\r\n\t\t$this->apellidos = $perfil['apellidos'];\r\n\t\t$this->pass = $perfil['pass'];\r\n\t\t$this->usertype = $perfil['usertype'];\r\n\t\t$this->fecha = $perfil['fecha'];\r\n\t\t/* PERFIL */\r\n\t\t$this->email = $perfil['email'];\r\n\t\t$this->direccion = $perfil['direccion'];\r\n\t\t$this->cp = $perfil['cp'];\r\n\t\t$this->localidad = $perfil['localidad'];\r\n\t\t$this->provincia = $perfil['provincia'];\r\n\t\t$this->pais = $perfil['pais'];\r\n\t\t$this->telefono = $perfil['telefono'];\r\n\t\t$this->web = $perfil['web'];\r\n\t\t}", "public function setEditUser($data){\n\t\t\t//var_dump($data);exit();\n\t\t\tif(!empty($data['id_usuario'])){\n\t\t\t\t$query =\"UPDATE usuarios SET nombre='\".$data['name'].\"',clave='\".$data['nuevopass'].\"' WHERE idusuario=\".$data['id_usuario'];\n\t\t\t\t//echo $query;exit();\n\t\t\t\t$result =mysqli_query($this->link,$query);\n\t\t\t\tif($result){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function __construct() {\n parent::__construct();\n $this->setRuolo(User::Operatore);\n }", "public function setGrabar($codigo , $descripcion, $user) {\n $fecha= date(\"Y-m-d H:i:s\");\n $sql=\"call sp_createStatusMember('$codigo','$descripcion', '$user','$fecha')\";\n return parent::setSqlSp($sql); \n }", "public function setUserIdAttribute($value)\n {\n $this->attributes['user_id'] = auth()->user()->is_admin ? $value : null;\n }", "private function setupCurrentUser()\n {\n if (BunqContext::getUserContext()->isOnlyUserCompanySet()) {\n $this->user = BunqContext::getUserContext()->getUserCompany();\n } elseif (BunqContext::getUserContext()->isOnlyUserPersonSet()) {\n $this->user = BunqContext::getUserContext()->getUserPerson();\n } else {\n throw new BunqException(vsprintf(self::ERROR_USER_TYPE_UNEXPECTED, [get_class($this->user)]));\n }\n }", "private function setupCurrentUser()\n {\n if (BunqContext::getUserContext()->isOnlyUserCompanySet()) {\n $this->user = BunqContext::getUserContext()->getUserCompany();\n } elseif (BunqContext::getUserContext()->isOnlyUserPersonSet()) {\n $this->user = BunqContext::getUserContext()->getUserPerson();\n } else {\n throw new BunqException(vsprintf(self::ERROR_USER_TYPE_UNEXPECTED, [get_class($this->user)]));\n }\n }", "public function setCkanUser(CkanUserInterface $ckanUser = NULL);", "private function set_user_id(){\n\t\t// print_r($this->user_password_);\n\t\ttry {\n\t\t\t$bdh = parent::connection_bdd();\n\t\t\t$statement = $bdh->prepare(\"SELECT * FROM `\".$this->name_table_user_.\"` WHERE token = :token\");\n\n\t\t\t$statement->bindParam(':token', $this->token_);\n\n\t\t\t$statement->execute();\n\t\t\t$res = $statement->fetch();\n\n\t\t\tparent::close_connection_bdd($bdh);\n\t\t\t\n\t\t\t$val= $res['NoUtilisateur'];\n\t\t\t$this->user_id_ = $val;\n\t\t\t// print_r(\" res\".$val.\"____\");\n\t\t\t\n\n\t\t} catch( PDOExecption $e){\n\t\t\texit('<b>Catched exception( cf. class User) at line '. $e->getLine() .' :</b> '. $e->getMessage());\n\t\t}\n\n\t\t\n\t\t// $this->user_id_ = $res;\n\t\t// return $res;\n\t}", "function set(Cuadro $cuadro) {\r\n $parametrosSet = array();\r\n $parametrosSet['ruta'] = $cuadro->getRuta();\r\n $parametrosSet['nombreCuadro'] = $cuadro->getNombreCuadro();\r\n $parametrosSet['autor'] = $cuadro->getAutor();\r\n $parametrosSet['descripcion'] = $cuadro->getDescripcion();\r\n $parametrosWhere = array();\r\n $parametrosWhere['ruta'] = $cuadro->getRuta();\r\n return $this->bd->update($this->tabla, $parametrosSet, $parametrosWhere);\r\n }", "function set_user_id($user_id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER_ID, $user_id);\r\n }", "public function setDocenciaTecnicoSuperior($docenciaTecnicoSuperior)\n\t{\n\t\t$this->docenciaTecnicoSuperior = $docenciaTecnicoSuperior;\n\n\t\treturn $this;\n\t}", "public function __construct() {\n // richiamiamo il costruttore della superclasse\n parent::__construct();\n $this->setRuolo(User::Utilizzatore);\n \n }", "function setResearcher($research, $UID){\r\n\t\t$query=(\"UPDATE `tbl_user_rights` SET `researcher` = '1' WHERE `research_id`='$research' AND `UID` ='$UID' LIMIT 1 ;\");\t\t\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data');\r\n\t\tif(MDB2::isError($result)){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\t\r\n\t\t}\r\n\t}", "public function edit($user_data=array()) {\n\t\t\tforeach ($user_data as $propiedad=>$valor) {\n\t\t\t\t$$propiedad = $valor;\n\t\t\t}\n\t\t\t$this->query = \"\n\t\t\tUPDATE clientes\n\t\t\tSET nombre='$nombre',\n\t\t\ttelefono='$telefono',\n\t\t\tdireccion='$direccion'\n\t\t\tlocalidad='$localidad',\n\t\t\tprovincia='$provincia',\n\t\t\tpais='$pais',\n\t\t\tcodigopostal='$codigopostal',\n\t\t\temail='$email',\n\t\t\tpassword='$password'\n\t\t\tWHERE nif = '$nif'\n\t\t\t\";\n\t\t\t$this->ejecutarConsulta();\n\t\t}", "public function getDocenciaTecnicoSuperiorId()\n\t{\n\t\treturn $this->docenciaTecnicoSuperiorId;\n\t}", "function set_documentAuthor(?int $value ) : bool\n\t{\n\t\treturn( $this->setValue( \"documentAuthor\", $value ));\n\t}", "public function setUser($objUser) {\n $this->objUser = $objUser;\n }", "public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}", "public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}", "function setUserId($value) {\n return $this->setFieldValue('user_id', $value);\n }", "function conf__cuadro(toba_ei_cuadro $cuadro) {\n $cuadro->desactivar_modo_clave_segura();//para que no muestre la posición de la fila en el cuadro al volver del popUp\n if (!is_null($this->s__where)) {\n $datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre($this->s__where);\n $cuadro->set_datos($datos);\n } else {\n //no se hace nada para que el cuadro que no tenga datos de entrada (no carga todos los datos al inicio)\n //para evitar cargar todos los alumnos al comienzo\n //$datos = $this->dep('datos')->tabla($this->nombre_tabla)->get_listado_apellido_nombre();\n }\n \n }", "public function setTipoUser($tipo) {\n $this->_tipo = $tipo;\n }", "public function setCriacao($valor) {\n\t\t$this->criacao = $valor;\n\t}", "function acfPreencheCampoAvalidador($field) {\n if (is_admin()) {\n return $field;\n }\n \n $field['value'] = get_current_user_id();\n \n return $field;\n }", "function setReadPermission( $value )\r\n {\r\n switch ( $value )\r\n {\r\n case \"User\":\r\n {\r\n $value = 1;\r\n }\r\n break;\r\n\r\n case \"Group\":\r\n {\r\n $value = 2;\r\n }\r\n break;\r\n\r\n case \"All\":\r\n {\r\n $value = 3;\r\n }\r\n break;\r\n\r\n default:\r\n $value = 1;\r\n }\r\n\r\n $this->ReadPermission = $value;\r\n }", "public function setTelefono($p_telefono){\r\n\t$this->telefono=$p_telefono;\r\n}", "public function getFinanciamientobecadocentesuser()\n\t{\n\t\treturn $this->financiamientobecadocentesuser;\n\t}", "public function setWithUserinfo($yes_or_no)\n\t{\n\t\t$this->with_userinfo = (int)((bool)$yes_or_no);\n\t}", "private function editUserProfile ( ) {\r\n\r\n if ( filter_has_var ( INPUT_POST, 'idModificar' ) ) { /** si s'ha sel·leccionat usuari */\r\n \r\n /** crida al mètode que recupera l'usuari indicat */\r\n $this->usuari = $this->model->getUsuariById ( filter_input ( INPUT_POST, 'idModificar' ) );\r\n \r\n /** estableix la vista que s'ha de mostrar */\r\n $this->view = $_SESSION[\"viewPath\"] . 'userprofileview.php'; \r\n \r\n }\r\n \r\n }", "final function setUser_id($value) {\n\t\treturn $this->setUserId($value);\n\t}", "final function setUser_id($value) {\n\t\treturn $this->setUserId($value);\n\t}", "function setAdmin( $user )\r\n {\r\n if ( is_a( $user, \"eZUser\" ) )\r\n {\r\n $this->AdminID = $user->id();\r\n }\r\n }", "public function setIdUsuario($n)\n {\n this->$v_id_usuario = $n;\n \n }", "static function changeCGUinter() {\n\t\t\n\t\t$case_cgu = rcube_utils::get_input_value('chk_cgu', RCUBE_INPUT_POST);\n\n\t\tif ( !empty($case_cgu)) {\t\t\t\n\t\t\t$user_infos = melanie2::get_user_infos(rcmail::get_instance()->get_user_name());\n\t\t\t$user_dn = $user_infos['dn'];\n\t\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\t\n\t\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\t\n\t\t\t$base = 'dc=equipement,dc=gouv,dc=fr';\n\t\t\t$filter = 'uid=' . rcmail::get_instance()->get_user_name();\n\t\t\t\n\t\t\t$ldap_res = Ldap::GetInstance(Config::$MASTER_LDAP)->search($base, $filter, array('info'));\n\t\t\t\n\t\t\t$_ldapEntree = Ldap::GetInstance(Config::$AUTH_LDAP)->get_entries($ldap_res);\n\t\t\t\n\t\t\tif ((strpos($user_dn, 'ou=departements,ou=organisation,dc=equipement,dc=gouv,dc=fr') !== false)\n\t\t\t || (strpos($user_dn, 'ou=DDEA,ou=melanie,ou=organisation,dc=equipement,dc=gouv,dc=fr') !== false)) {\n\t\t\t\t$info['mineqAccesInternet'] = 'DDI-INTERNET-STANDARD';\n\t\t\t} else {\n\t\t\t\t$info['mineqAccesInternet'] = 'ACCESINTERNET';\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($_ldapEntree[0]['info'][0])) {\n\t\t\t\tforeach($_ldapEntree[0]['info'] as $i => $val) {\n\t\t\t\n\t\t\t\t\tif (stripos($_ldapEntree[0]['info'][$i], 'AccesInternet.Profil') !== false) {\n\t\t\t\t\t\t$prof = explode(':',$_ldapEntree[0]['info'][$i]);\n\t\t\t\t\t\t$info['mineqAccesInternet'] = trim($prof['1']);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif (stripos($_ldapEntree[0]['info'][$i], 'AccesInternet.AcceptationCGUts') !== false) {\n\t\t\t\t\t\tunset($_ldapEntree[0]['info'][$i]);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\n\t\t\t\tforeach($_ldapEntree[0]['info'] as $i => $val) {\n\t\t\t\t\t$info['info'][$i] = trim($_ldapEntree[0]['info'][$i]);\n\t\t\t\t\t$info['info'] = array_values($info['info']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$info['info'][] = 'AccesInternet.AcceptationCGUts: ' . gmstrftime('%Y%m%d%H%M%S', time()) . 'Z';\n\t\t\t$mes = rcmail::get_instance()->gettext('inter_CGU_validee', 'melanie2_moncompte');\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$mes = rcmail::get_instance()->gettext('inter_CGU_unvalidee', 'melanie2_moncompte');\n\t\t}\n\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message($mes, 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message($mes, 'error');\n\t\t}\n\t}", "function setOwner($user_id) {\n $this->owner_id = $user_id;\n // save database\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instances` set `owner_id`=? where `instance_id`=?\";\n $this->mDb->query($query,array($owner_id,(int)$this->instance_id)); \n }", "public function update(User $user, DocumentoCabecera $documentoCabecera)\n {\n //\n if($user->isAdmin())\n return true;\n }", "public function setEditCliente($data){\n\t\t\t$queryUsu = \"UPDATE usuarios SET email='\".$data['email'].\"',clave='\".$data['clave'].\"' WHERE id=\".$data['id'];\n\t\t\t$resultUsu =mysqli_query($this->link,$queryUsu);\n\t\t\tif(!empty($data['documentoCli'])){\n\t\t\t\t$query =\"UPDATE cliente SET tipoDocumentoCli='\".$data['tipoDocumentoCli'].\"',nombreCli='\".$data['nombreCli'].\"',apellidoCli='\".$data['apellidoCli'].\"',telefonoCli='\".$data['telefonoCli'].\"',direccionCli='\".$data['direccionCli'].\"',fechaInscripcionCli='\".$data['fechaInscripcionCli'].\"',id='\".$data['id'].\"' WHERE documentoEmp=\".$data['documentoEmp'];\n\t\t\t\t$result =mysqli_query($this->link,$query);\n\t\t\t\tif($result){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function usrSetData($data);", "function setCodUsuario($codUsuario) {\r\n $this->codUsuario = $codUsuario;\r\n }", "function atualiza_Usuario_clave_olvidada($u_usuario, $u_clave, $ip_cedula, $ip_codigo)\t\t\n\t\t{\n\t\t\t//Encriptamos la clave\n\t\t\t$u_clave = md5($u_clave);\n\n\t\t\t$this->sql=\"update usuario set u_clave='$u_clave' \";\n\t\t\t$this->sql.=\"where u_usuario='$u_usuario' and ip_id in (select ip_id from inf_personal where ip_cedula='$ip_cedula' and ip_codigo='$ip_codigo')\";\n\t\t\techo $this->sql;\n\t\t\tif(parent::ejecutaQUERY())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "protected function setCompanyProfile()\r\n {\r\n }", "abstract public function SetUserPropertyFull(string $title,string $data,int $uid) : bool;", "public function setUsuario(\\Administrativo\\Usuario $usuario) {\n $this->usuario = $usuario;\n }", "public function setCuloare($culoare)\n {\n $this->culoare = $culoare;\n }", "public function __construct() {\n parent::__construct();\n $this->setRuolo(User::Utente);\n }", "public function setseniat_users_nombre( $seniat_users_nombre)\n\t{\n\t\t$this->seniat_users_nombre= $seniat_users_nombre;\n\t}", "function set_value_users($field, $value){\n\t\t\n\t\t$user_info = get_userdata( $field['idwhere'] );\n\n\t\t$GLOBALS['fields_info'][$field['name_field']]['value'] = $user_info;\n\n\t\treturn $user_info->$field['campo'];\n\t}", "public function setDocente($docente){\n $this->docente = $docente;\n }", "function filecabinet_action_drawer_set_ouid_form($settings, &$form) {\n $param = 'ouid';\n $name = t('Drawer owner');\n $desc = t('Select new owner');\n $opts = array();\n $sql = \"SELECT uid, name FROM {users} WHERE uid > \" . O_MAX_PROTECTED_USER;\n $result = db_query($sql);\n while ($obj = db_fetch_object($result)) {\n $opts[$obj->uid] = $obj->name;\n }\n filecabinet_action_set_parameter_form($settings, $form, $param, $name, $desc, $opts);\n}", "function personalsetting(){\n\t\t//print_r($this->Session->read('User.username'));\n\t\t$username = $this->Session->read('User.username');\n\t\t$email = $this->Users->query(\"SELECT email\n\t\t\t\t FROM cp_users\n\t\t\t\t WHERE (username = 'bigpopa')\n\t\t\t\t \");\n\t\t$data = array('username' => $username, 'email' => $email);\n\t\t$this->set('data',$data);\n\t}", "public function setIdUsuarioCadastrante ($ug_usu_resp_cad_id) {\n\t\t$this->ug_usu_resp_cad_id = $ug_usu_resp_cad_id;\n\t}", "public function save_user_cpf()\n\t{\n\t\t$cpf = WC_EBANX_Request::read('ebanx_billing_brazil_document', '');\n\t\tif (empty($cpf)) {\n\t\t\twc_add_notice('<strong>CPF não informado</strong>. Por favor, informe um CPF válido.', 'error');\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$this->isValidCpf($cpf)) {\n\t\t\twc_add_notice('<strong>CPF inválido</strong>. Por favor, verifique o CPF informado.', 'error');\n\n\t\t\treturn;\n\t\t}\n\n\t\t$usuario = wp_get_current_user();\n\t\tupdate_user_meta($usuario->ID, 'cpf', sanitize_text_field($cpf));\n\t}", "public function definirUsuario($usuario)\n {\n $this->usuario = (int)$usuario;\n }", "public function __construct() {\r\n parent::__construct();\r\n $this->setRuolo(User::Admin);\r\n }", "public function setTypeUser($typeUser){\n \t$this->typeUser = $typeUser;\n }", "public function set_system_users_crud($system_users_crud) {\n\t\t$this->_system_users_crud = system_users_crud;\n\t}", "function edit_user_data() {\n\t\t//\n\t}", "function addSpecialUserObject()\n\t{\n\t\t// #7927: special users are deprecated\n\t\texit();\n\t\t\n\t\t/*\n\t\tif ((array_key_exists(\"user_id\", $_POST)) && (count($_POST[\"user_id\"])))\n\t\t{\n\t\t\t$this->object->addSpecialUsers($_POST[\"user_id\"]);\n\t\t\tunset($_SESSION[\"survey_adm_found_users\"]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendInfo($this->lng->txt(\"adm_search_select_user\"), TRUE);\n\t\t}\n\t\t$this->ctrl->redirect($this, \"specialusers\");\t\t \n\t\t*/\n\t}", "function setUserId($value) {\n\t\treturn $this->setColumnValue('user_id', $value, BaseModel::COLUMN_TYPE_INTEGER);\n\t}", "public function modificar_sucursal()\n\t{\n\t\t$query = \"UPDATE sucursales SET \n\n\t\t \n\t\t sucursal='$this->nombre', \n\t\t direccion='$this->direccion', \n\t\t tel='$this->tel', \n\t\t email='$this->email', \n\t\t tipo='$this->tipo', \n\t\t notas_print='$this->notas_print', \n\t\t \n\t\t estatus='$this->estatus'\n\t\t \t\n\t\tWHERE idsucursales = '$this->idsucursales'\";\n\n\t\t$this->db->consulta($query);\n\t}", "function setAdmin($research, $UID){\r\n\t\t$query=(\"UPDATE `tbl_user_rights` SET `admin` = '1' WHERE `research_id`='$research' AND `UID` ='$UID' LIMIT 1 ;\");\r\n\t\t\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data');\r\n\t\tif(MDB2::isError($result)){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\t\t\r\n\t\t}\r\n\t}", "private function __setuser($requser) \n{ \n\tunset($this->dbuser);\n\t$this->dbuser = $requser; \n}", "public function initUser( &$user, $autocreate = false ) {\n\t\t# Override this to do something.\n\t}", "function setUserID($iNewValue) {\n $this->iUserID = $iNewValue;\n }", "function setUserID($iNewValue) {\n $this->iUserID = $iNewValue;\n }", "public function cambia_datos_usuario() {\n\t\t$usuario = $this -> ssouva -> login();\n\t\t$datos[\"usuario\"] = $usuario;\n\n\t\t// Cosas de sesiones y si es admin o no\n\t\tif ($this -> admin_model -> es_admin($usuario)>0) {\n\t\t\t$idu = $this -> input -> post(\"idu\");\n\t\t\t$nombre = $this -> input -> post(\"nombre\");\n\t\t\t$apellidos = $this -> input -> post(\"apellidos\");\n\t\t\t$login = $this -> input -> post(\"login\");\n\t\t\t$password = $this -> input -> post(\"password\");\n\t\t\t$direccion = $this -> input -> post(\"direccion\");\n\t\t\t$tlf = $this -> input -> post(\"tlf\");\n\t\t\t$email = $this -> input -> post(\"email\");\n\t\t\t$verificado = $this -> input -> post(\"verificado\");\n\n\t\t\t$this -> usuarios_model -> updatea_user($idu, $nombre, $apellidos, $login, $password, $direccion, $tlf, $email, $verificado);\n\t\t\t// Y recargamos los datos\n\t\t\t$datos[\"denuncias\"] = $this -> comentarios_model -> hay_denuncias();\n\t\t\t$datos[\"usuarios_no\"] = $this -> usuarios_model -> usuarios_no_activados();\n\t\t\t$datos[\"pisos_no\"] = $this -> pisos_model -> mostar_pisos_no_validados();\n\t\t\t$this -> load -> view(\"doc/index\", $datos);\n\t\t}\n\t}", "public function setCuil($cuil) {\n $this->cuilSolicitante = $cuil;\n return $this;\n }", "public function set_user($user)\n\t{\n\t\t$this->user = $user;\n\t}", "function setId_usuario($id_usuario) {\n $this->id_usuario = $id_usuario;\n }", "private function senha($itc=0){\r\n \tif ($this->arr_campo[$itc][\"cad_tipo_campo\"] == \"senha\"){\r\n $obj = new com_edit($this->str_nome,$this->str_entidade,$this->bol_campo_requerido);\r\n //$obj->str_valor = $this->arr_campo[$itc][\"valor\"];\r\n $obj->bol_proteger = true;\r\n $obj->int_size = $this->arr_campo[$itc][\"cad_tamanho\"];\r\n \t\t\t$obj->criar(true);\r\n \t}\r\n\t}", "public function getDocenciaTecnicoSuperior()\n\t{\n\t\treturn $this->docenciaTecnicoSuperior;\n\t}", "function set_user($u_user = '', $u_password = '', $u_key = '', $u_email = '')\n\t{\n\t\t$this->user['u_user'] = $u_user;\n\t\t$this->user['u_password'] = $u_password;\n\t\t$this->user['u_key'] = $u_key;\n\t\t$this->user['u_email'] = $u_email;\n\t\t$this->user['u_userid'] = !empty($_SESSION['ilancedata']['user']['userid']) ? intval($_SESSION['ilancedata']['user']['userid']) : 0;\n\t}", "public function setCreatedByUserId(?string $value): void {\n $this->getBackingStore()->set('createdByUserId', $value);\n }", "public function setCreatedByUserId(?string $value): void {\n $this->getBackingStore()->set('createdByUserId', $value);\n }", "public function setCreatedByUserId(?string $value): void {\n $this->getBackingStore()->set('createdByUserId', $value);\n }", "function updateUserData($licServData, $userId){\n\n $user = new CUser;\n $arFields = Array(\n \"NAME\" => html_entity_decode($licServData[\"contactPerson\"]),\n \"EMAIL\" => html_entity_decode($licServData[\"e_mail\"]),\n \"LOGIN\" => html_entity_decode($licServData[\"e_mail\"]),\n \"PERSONAL_PHONE\" => html_entity_decode($licServData[\"phone\"]),\n \"UF_COMPANY_NAME\" => html_entity_decode($licServData[\"name\"]),\n \"UF_TAX_ID\" => html_entity_decode($licServData[\"taxId\"]), \n \"UF_LEGAL_ADDRESS\" => html_entity_decode($licServData[\"legal_address\"]),\n \"UF_USER_TYPE\" => getUserTypeByLegalForm($licServData[\"legalForm\"]), \n \"ACTIVE\" => \"Y\",\n\n );\n\n $user->Update($userId, $arFields);\n}" ]
[ "0.7831225", "0.71516573", "0.6856415", "0.66940844", "0.6541031", "0.6529658", "0.65052706", "0.5984992", "0.58550185", "0.5839715", "0.5795965", "0.5760395", "0.5717772", "0.5693049", "0.5592019", "0.5582209", "0.55253357", "0.5503266", "0.5386917", "0.53843236", "0.53769624", "0.5341509", "0.53032106", "0.5277748", "0.52733946", "0.5269526", "0.52691627", "0.52628195", "0.52436686", "0.52436686", "0.5220982", "0.52111995", "0.52043015", "0.51988363", "0.5177901", "0.5175615", "0.5174977", "0.5172928", "0.5163382", "0.516333", "0.51564145", "0.5152951", "0.5152951", "0.5144617", "0.51367855", "0.51167154", "0.51101243", "0.51095104", "0.51080537", "0.50941235", "0.50916404", "0.5084085", "0.5083277", "0.5081066", "0.5081066", "0.50755274", "0.50724334", "0.50702274", "0.5068282", "0.50667334", "0.50575364", "0.5052387", "0.50505733", "0.50472975", "0.5044909", "0.5042604", "0.50421953", "0.5039606", "0.5034449", "0.5030849", "0.5028681", "0.50244224", "0.50130534", "0.5006007", "0.5004967", "0.4992914", "0.49900675", "0.4989193", "0.49873295", "0.49846584", "0.49821365", "0.49817875", "0.49814674", "0.49746454", "0.49719682", "0.49706656", "0.49677345", "0.49635053", "0.49635053", "0.49606726", "0.4956811", "0.49545032", "0.49539784", "0.4953887", "0.4949691", "0.49451494", "0.49425942", "0.49425942", "0.49425942", "0.49397463" ]
0.8015556
0
Get Collection of Criteria
Получить коллекцию критериев
public function getCriteria();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCriteria() : Collection\n {\n return $this->criteria;\n }", "public function getCriteria()\n {\n return $this->get(self::CRITERIA);\n }", "public function findByCriteria(array $criteria = []): Collection;", "function getCriteria() { return $this->criteria; }", "public function getCriteria() {\n return $this->criteria;\n }", "public function getCriteria()\n {\n return $this->criteria;\n }", "public function getCriteria()\n {\n return $this->_criteria;\n }", "public function getCriteria()\n {\n if (is_null($this->criteria)) {\n $this->setCriteria();\n }\n\n return $this->criteria;\n }", "public function getCriteria()\n {\n if ($this->_criteria) {\n return $this->_criteria;\n }\n return $this->_criteria = new Criteria($this);\n }", "public function getConditions(): Collection\n {\n return collect($this->conditions);\n }", "public function getApplicableCriteria();", "function getAllFiltered(){ \n $criteria = $this->getCriteria();\n return $criteria->find();\n }", "public function getQueryCriteria(): array\n {\n return [\n 'created_after' => new DateValidator,\n 'created_before' => new DateValidator,\n 'id_greater_than' => new PositiveIntValidator,\n 'id_less_than' => new PositiveIntValidator,\n 'tag_id' => new PositiveIntValidator,\n 'object_id' => new PositiveIntValidator,\n 'type' => new FixedValuesValidator(\n 'Automation', 'Block', 'Campaign', 'Competitor', \n 'Prospect Custom Field', 'Custom URL', 'Drip Program', \n 'Email', 'Email Draft', 'Email Template', 'Email Template Draft', \n 'File', 'Form', 'Form Field', 'Form Handler', 'Group', 'Keyword', \n 'Landing Page', 'Layout Template', 'List', 'Opportunity', \n 'Paid Search Campaign', 'Personalization', 'Profile', 'Prospect', \n 'Prospect Default Field', 'Segmentation Rule', 'Site', \n 'Site Search', 'Social Message', 'User', 'Dynamic Content'\n )\n ];\n }", "public function getMatchingCriterias() {\n $aMatchingCriterias = [];\n\n # Init Criterias Table\n if(!array_key_exists('book-request-criteria',CoreController::$aCoreTables)) {\n CoreController::$aCoreTables['book-request-criteria'] = new TableGateway('bookrequest_criteria',CoreController::$oDbAdapter);\n }\n\n $oCriteriasFromDB = CoreController::$aCoreTables['book-request-criteria']->select();\n foreach($oCriteriasFromDB as $oCrit) {\n $aMatchingCriterias[$oCrit->criteria_entity_key] = (array)$oCrit;\n }\n\n return $aMatchingCriterias;\n }", "public function getCriteria(){\n\t\tif($voName = $this->getVoName()){\n\t\t\treturn \\Smally\\Application::getInstance()->getFactory()->getCriteria($voName);\n\t\t}\n\t\treturn new \\Smally\\Criteria();\n\t}", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getCriteria()\n {\n $mockValidator1 = $this->getMock('stubValidator');\n $mockValidator1->expects($this->once())->method('getCriteria')->will($this->returnValue(array('foo' => 'bar')));\n $this->andValidator->addValidator($mockValidator1);\n $mockValidator2 = $this->getMock('stubValidator');\n $mockValidator2->expects($this->once())->method('getCriteria')->will($this->returnValue(array('bar' => 'baz')));\n $this->andValidator->addValidator($mockValidator2);\n $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz'), $this->andValidator->getCriteria());\n }", "protected function getStaticDatabaseCriteria() {\r\n if(!isset(self::$_databaseCriteria)) {return array();}\r\n return self::$_databaseCriteria;\r\n }", "public function searchCriteriaProvider(): array\n {\n return [\n [\n ['field' => 'id', 'conditionType' => 'eq', 'value' => 2020],\n ],\n [\n ['field' => 'title', 'conditionType' => 'fulltext', 'value' => 'Img'],\n ],\n [\n ['field' => 'content_type', 'conditionType' => 'eq', 'value' => 'image']\n ],\n [\n ['field' => 'description', 'conditionType' => 'fulltext', 'value' => 'description']\n ]\n ];\n }", "protected function fetchRecords(Criteria $criteria): Collection\n\t{\n\t\t$doctrine = $this->getDoctrine();\n\t\t$records = $doctrine->getRepository($this::ENTITY)->matching($criteria);\n\t\t$champRepo = $doctrine->getRepository(Champions::class);\n\n\t\tforeach ($records as &$record) {\n\t\t\t$record->setBans($champRepo->findBy(['championId' => $record->getBans()]));\n\t\t}\n\n\t\treturn $records;\n\t}", "static function addMoreCriteria($criterion = '') {\n return array();\n }", "public function matching(Criteria $criteria)\n {\n // $persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);\n\n // return new LazyCriteriaCollection($persister, $criteria);\n }", "public function findAll(array $criteria);", "protected static function allBy($cond = \"\") {\n $records = new \\Collection();\n // Execution de la requete avec le parametre et lecture du resultat\n foreach (QueryManager::get()->select(static::table())->where($cond)->order(static::$order)->execute() as $record) {\n if (!is_null($record)) {\n $records->push(new static($record));\n }\n }\n return $records;\n }", "public function getListCriteria(): array {\n return [\n 'q' => new FullTextSearchCriteria($this->request->get('q')),\n 'orderByColumn' => new SortByStrategyCriteria(\n $this->request->get('orderByColumn', 'created_at'),\n $this->request->get('orderByMethod', 'desc')\n ),\n ];\n }", "protected function criteria() {\n\t\t$where = array();\n\t\tforeach ($this->getIdentity() as $col => $val) {\n\t\t\tif (isset($val)) {\n\t\t\t\t$where[\"$col=\"] = $val;\n\t\t\t} else {\n\t\t\t\t$where[\"$col IS\"] = new QueryExpr(\"NULL\");\n\t\t\t}\n\t\t}\n\t\treturn $where;\n\t}", "public function getSearchCriteria();", "public abstract function getCriteriaWhere($criteria);", "public function withCriteria(...$criteria);", "public function withCriteria(...$criteria);", "public function buildCriteria()\n {\n $criteria = new Criteria(PessoaPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(PessoaPeer::CO_PESSOA)) $criteria->add(PessoaPeer::CO_PESSOA, $this->co_pessoa);\n if ($this->isColumnModified(PessoaPeer::NO_PESSOA)) $criteria->add(PessoaPeer::NO_PESSOA, $this->no_pessoa);\n if ($this->isColumnModified(PessoaPeer::NU_CPF)) $criteria->add(PessoaPeer::NU_CPF, $this->nu_cpf);\n if ($this->isColumnModified(PessoaPeer::NU_CNPJ)) $criteria->add(PessoaPeer::NU_CNPJ, $this->nu_cnpj);\n if ($this->isColumnModified(PessoaPeer::CO_EMPRESA)) $criteria->add(PessoaPeer::CO_EMPRESA, $this->co_empresa);\n\n return $criteria;\n }", "abstract function fetchCriteria();", "public function findSetBy(array $criteria);", "public function findSetsBy(array $criteria);", "public function find(array $criteria): array;", "public function matching(Criteria $criteria)\n {\n $persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);\n\n return new LazyCriteriaCollection($persister, $criteria);\n }", "private function getCriteria(){\n $criteria = CategoryQuery::create()->orderByScope()\n ->orderByBranch()\n ->filterByActive(1)\n ->filterByScope(array('min' => 0));\n $criteria->setIgnoreCase(true);\n \n if ($this->searchString)\n $criteria->add(CategoryPeer::NAME,\"%\".$this->searchString.\"%\",Criteria::LIKE);\n \n if ($this->searchModule != 'all')\n $criteria->filterByModule($this->searchModule);\n\n return $criteria;\n }", "public function findBy(array $criteria = []);", "public abstract function applyCriteria();", "protected function getCriteriaDao() {\n return new Tracker_Report_Criteria_List_ValueDao();\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(ClientePeer::DATABASE_NAME);\n\n if ($this->isColumnModified(ClientePeer::IDCLIENTE)) $criteria->add(ClientePeer::IDCLIENTE, $this->idcliente);\n if ($this->isColumnModified(ClientePeer::CLIENTE_NOMBRE)) $criteria->add(ClientePeer::CLIENTE_NOMBRE, $this->cliente_nombre);\n if ($this->isColumnModified(ClientePeer::CLIENTE_APATERNO)) $criteria->add(ClientePeer::CLIENTE_APATERNO, $this->cliente_apaterno);\n if ($this->isColumnModified(ClientePeer::CLIENTE_AMATERNO)) $criteria->add(ClientePeer::CLIENTE_AMATERNO, $this->cliente_amaterno);\n if ($this->isColumnModified(ClientePeer::CLIENTE_RFC)) $criteria->add(ClientePeer::CLIENTE_RFC, $this->cliente_rfc);\n if ($this->isColumnModified(ClientePeer::CLIENTE_RAZONSOCIAL)) $criteria->add(ClientePeer::CLIENTE_RAZONSOCIAL, $this->cliente_razonsocial);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CALLEFISCAL)) $criteria->add(ClientePeer::CLIENTE_CALLEFISCAL, $this->cliente_callefiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_NUMEROFISCAL)) $criteria->add(ClientePeer::CLIENTE_NUMEROFISCAL, $this->cliente_numerofiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_INTERIORFISCAL)) $criteria->add(ClientePeer::CLIENTE_INTERIORFISCAL, $this->cliente_interiorfiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_COLONIAFISCAL)) $criteria->add(ClientePeer::CLIENTE_COLONIAFISCAL, $this->cliente_coloniafiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CIUDADFISCAL)) $criteria->add(ClientePeer::CLIENTE_CIUDADFISCAL, $this->cliente_ciudadfiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CPFISCAL)) $criteria->add(ClientePeer::CLIENTE_CPFISCAL, $this->cliente_cpfiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_ESTADOFISCAL)) $criteria->add(ClientePeer::CLIENTE_ESTADOFISCAL, $this->cliente_estadofiscal);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CALLE)) $criteria->add(ClientePeer::CLIENTE_CALLE, $this->cliente_calle);\n if ($this->isColumnModified(ClientePeer::CLIENTE_NUMERO)) $criteria->add(ClientePeer::CLIENTE_NUMERO, $this->cliente_numero);\n if ($this->isColumnModified(ClientePeer::CLIENTE_INTERIOR)) $criteria->add(ClientePeer::CLIENTE_INTERIOR, $this->cliente_interior);\n if ($this->isColumnModified(ClientePeer::CLIENTE_COLONIA)) $criteria->add(ClientePeer::CLIENTE_COLONIA, $this->cliente_colonia);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CP)) $criteria->add(ClientePeer::CLIENTE_CP, $this->cliente_cp);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CIUDAD)) $criteria->add(ClientePeer::CLIENTE_CIUDAD, $this->cliente_ciudad);\n if ($this->isColumnModified(ClientePeer::CLIENTE_ESTADO)) $criteria->add(ClientePeer::CLIENTE_ESTADO, $this->cliente_estado);\n if ($this->isColumnModified(ClientePeer::CLIENTE_TIPO)) $criteria->add(ClientePeer::CLIENTE_TIPO, $this->cliente_tipo);\n if ($this->isColumnModified(ClientePeer::CLIENTE_FECHAREGISTRO)) $criteria->add(ClientePeer::CLIENTE_FECHAREGISTRO, $this->cliente_fecharegistro);\n if ($this->isColumnModified(ClientePeer::CLIENTE_ESTATUS)) $criteria->add(ClientePeer::CLIENTE_ESTATUS, $this->cliente_estatus);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CREDITO)) $criteria->add(ClientePeer::CLIENTE_CREDITO, $this->cliente_credito);\n if ($this->isColumnModified(ClientePeer::CLIENTE_LIMITECREDITO)) $criteria->add(ClientePeer::CLIENTE_LIMITECREDITO, $this->cliente_limitecredito);\n if ($this->isColumnModified(ClientePeer::CLIENTE_CREDITORESTANTE)) $criteria->add(ClientePeer::CLIENTE_CREDITORESTANTE, $this->cliente_creditorestante);\n\n return $criteria;\n }", "public function subset(ICriteria $criteria) : IObjectSet;", "public function getByCriteria(array $criteria, $options=[]): Collection\n {\n $columns = $options['columns'] ?? ['*'];\n $relations = $options['columns'] ?? [];\n $orderBy = $options['orderBy'] ?? 'id desc';\n $orders = explode(' ', $orderBy);\n $orderColumn = $orders[0]??'id';\n $order = $orders[1]??'asc';\n return $this->newQuery()->select($columns)->with($relations)->where($criteria)->orderBy($orderColumn, $order)->get();\n }", "public function findBy(array $criteria);", "public function findBy(array $criteria);", "function getFilterCriteria()\n \t{\n \treturn $this->filter_criteria;\n \t}", "public function getByCriteria(Criteria $criteria = null);", "public function getCriteriaStack()\n {\n if (is_null($this->criteriaStack)) {\n $this->criteriaStack = new Collection();\n }\n\n return $this->criteriaStack;\n }", "public function criterions()\n {\n $main = $this->criteria();\n $eye = $this->eyes;\n $hair = $this->hairs;\n $ethnicity = $this->ethnicities;\n return compact('main', 'eye', 'hair', 'ethnicity');\n }", "public function search(array $criteria): \\Illuminate\\Support\\Collection\n {\n $queryBuilder = $this->getSearchAwareQueryBuilder($criteria); // This method must be defined in the child class\n\n return collect($queryBuilder->getQuery()->getResult());\n }", "public function getConditions()\n\t{\n\t\t$conditions = clone $this->conditions;\n\t\tforeach ($this->fields as $field) {\n\t\t\t$conditions->merge($field->getConditions());\n\t\t}\n\t\t\n\t\treturn $conditions;\n\t}", "public function getCriteria(){\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('TOO_ID',$this->TOO_ID);\n\t\t$criteria->compare('TOO_DESC_DE_CH',$this->TOO_DESC_DE_CH,true);\n\t\t$criteria->compare('TOO_DESC_EN_GB',$this->TOO_DESC_EN_GB,true);\n\t\t//Add with conditions for relations\n\t\t//$criteria->with = array('???relationName???' => array());\n\t}", "public function buildCriteria()\n {\n $criteria = new Criteria(comlabPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(comlabPeer::ID)) $criteria->add(comlabPeer::ID, $this->id);\n if ($this->isColumnModified(comlabPeer::IDUSUARIO)) $criteria->add(comlabPeer::IDUSUARIO, $this->idusuario);\n if ($this->isColumnModified(comlabPeer::CONFLICTOS)) $criteria->add(comlabPeer::CONFLICTOS, $this->conflictos);\n if ($this->isColumnModified(comlabPeer::ORTOGRAFIA)) $criteria->add(comlabPeer::ORTOGRAFIA, $this->ortografia);\n if ($this->isColumnModified(comlabPeer::PROCESOS)) $criteria->add(comlabPeer::PROCESOS, $this->procesos);\n if ($this->isColumnModified(comlabPeer::EQUIPO)) $criteria->add(comlabPeer::EQUIPO, $this->equipo);\n if ($this->isColumnModified(comlabPeer::ADMINTIEMPO)) $criteria->add(comlabPeer::ADMINTIEMPO, $this->admintiempo);\n if ($this->isColumnModified(comlabPeer::SEGURIDADPERSONAL)) $criteria->add(comlabPeer::SEGURIDADPERSONAL, $this->seguridadpersonal);\n if ($this->isColumnModified(comlabPeer::FACILIDADPALABRA)) $criteria->add(comlabPeer::FACILIDADPALABRA, $this->facilidadpalabra);\n if ($this->isColumnModified(comlabPeer::GESTIONPROYECTOS)) $criteria->add(comlabPeer::GESTIONPROYECTOS, $this->gestionproyectos);\n if ($this->isColumnModified(comlabPeer::PUNTUALIDAD)) $criteria->add(comlabPeer::PUNTUALIDAD, $this->puntualidad);\n if ($this->isColumnModified(comlabPeer::NORMAS)) $criteria->add(comlabPeer::NORMAS, $this->normas);\n if ($this->isColumnModified(comlabPeer::INTEGRACION)) $criteria->add(comlabPeer::INTEGRACION, $this->integracion);\n if ($this->isColumnModified(comlabPeer::INNOVACION)) $criteria->add(comlabPeer::INNOVACION, $this->innovacion);\n if ($this->isColumnModified(comlabPeer::NEGOCIACION)) $criteria->add(comlabPeer::NEGOCIACION, $this->negociacion);\n if ($this->isColumnModified(comlabPeer::ABSTRACCION)) $criteria->add(comlabPeer::ABSTRACCION, $this->abstraccion);\n if ($this->isColumnModified(comlabPeer::DECISIONES)) $criteria->add(comlabPeer::DECISIONES, $this->decisiones);\n if ($this->isColumnModified(comlabPeer::ADAPTACION)) $criteria->add(comlabPeer::ADAPTACION, $this->adaptacion);\n if ($this->isColumnModified(comlabPeer::OTRAS)) $criteria->add(comlabPeer::OTRAS, $this->otras);\n if ($this->isColumnModified(comlabPeer::DESEMPENIOLABORAL)) $criteria->add(comlabPeer::DESEMPENIOLABORAL, $this->desempeniolaboral);\n if ($this->isColumnModified(comlabPeer::MEJORAS)) $criteria->add(comlabPeer::MEJORAS, $this->mejoras);\n if ($this->isColumnModified(comlabPeer::SUGERENCIAS)) $criteria->add(comlabPeer::SUGERENCIAS, $this->sugerencias);\n if ($this->isColumnModified(comlabPeer::NOMBRES)) $criteria->add(comlabPeer::NOMBRES, $this->nombres);\n if ($this->isColumnModified(comlabPeer::PUESTO)) $criteria->add(comlabPeer::PUESTO, $this->puesto);\n if ($this->isColumnModified(comlabPeer::CORREO)) $criteria->add(comlabPeer::CORREO, $this->correo);\n\n return $criteria;\n }", "protected function buildCriteria($criteria)\n {\n return $this->getCriteriumService()->buildSetQuery($this->getDatabaseType(), $criteria);\n }", "public function getList(SearchCriteriaInterface $searchCriteria, array $localeScopes): Collection;", "public function criteria()\n {\n return Criteria::where('seeker_id', $this->id)->first();\n }", "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(CiudadPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(CiudadPeer::IDCIUDAD)) $criteria->add(CiudadPeer::IDCIUDAD, $this->idciudad);\n\t\tif ($this->isColumnModified(CiudadPeer::ID_PROVINCIA)) $criteria->add(CiudadPeer::ID_PROVINCIA, $this->id_provincia);\n\t\tif ($this->isColumnModified(CiudadPeer::NOMCIUDAD)) $criteria->add(CiudadPeer::NOMCIUDAD, $this->nomciudad);\n\t\tif ($this->isColumnModified(CiudadPeer::CP)) $criteria->add(CiudadPeer::CP, $this->cp);\n\n\t\treturn $criteria;\n\t}", "public function getFilters(): Collection;", "private function queryFilterByAllCriteria($criteria)\n {\n $queryBuilder = $this->createQueryBuilder('p');\n\n $queryBuilder->where('p.isEnabled = 1');\n\n if (!empty($criteria[Criteria::SEARCH])) {\n $queryBuilder->andWhere(\n $queryBuilder->expr()->orX(\n $queryBuilder->expr()->like('p.name', $queryBuilder->expr()->literal('%' . $criteria[Criteria::SEARCH] . '%')),\n $queryBuilder->expr()->like('p.description', $queryBuilder->expr()->literal('%' . $criteria[Criteria::SEARCH] . '%')),\n $queryBuilder->expr()->like('p.reference', $queryBuilder->expr()->literal('%' . $criteria[Criteria::SEARCH] . '%'))\n ));\n }\n\n if (!empty($criteria[Criteria::PRICE_MIN])) {\n $queryBuilder\n ->andWhere('p.price >= :priceMin')\n ->setParameter('priceMin', $criteria[Criteria::PRICE_MIN]);\n }\n\n if (!empty($criteria[Criteria::PRICE_MAX])) {\n $queryBuilder\n ->andWhere('p.price <= :priceMax')\n ->setParameter('priceMax', $criteria[Criteria::PRICE_MAX]);\n }\n\n if (!empty($criteria[Criteria::NOTE])) {\n $queryBuilder\n ->andWhere('p.note >= :note')\n ->setParameter('note', $criteria[Criteria::NOTE]);\n }\n\n if (!empty($criteria[Criteria::PREMIUM])) {\n $queryBuilder->andWhere('p.isPremium = :isPremium')\n ->setParameter('isPremium', $criteria[Criteria::PREMIUM]);\n }\n\n if (!empty($criteria[Criteria::TYPE])) {\n $queryBuilder\n ->leftJoin('p.type', 't')\n ->andWhere('t.id = :typeId')\n ->setParameter('typeId', $criteria[Criteria::TYPE]);\n }\n\n if (!empty($criteria[Criteria::BRAND])) {\n $queryBuilder\n ->leftJoin('p.brand', 'b')\n ->andWhere('b.id = :brandId')\n ->setParameter('brandId', $criteria[Criteria::BRAND]);\n }\n\n return $queryBuilder;\n }", "function getTestCriteria() {\n $contentthroughput = new queryManager;\n $content = $contentthroughput->getCriteria();\n\n return $content;\n }", "public function readAll($criteria = []);", "public function findBy(array $criteria)\n {\n }", "public function getCriteria()\n {\n $this->assertEquals(array('allowedValues' => array(Binford::POWER, 'Binford', 'Binford ' . Binford::POWER)), $this->binford->getCriteria());\n }", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(CourierPeer::DATABASE_NAME);\n\n\t\t$criteria->add(CourierPeer::ID, $this->id);\n\n\t\treturn $criteria;\n\t}", "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(CourierPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(CourierPeer::ID)) $criteria->add(CourierPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(CourierPeer::NAME)) $criteria->add(CourierPeer::NAME, $this->name);\n\t\tif ($this->isColumnModified(CourierPeer::AVAILABLE)) $criteria->add(CourierPeer::AVAILABLE, $this->available);\n\t\tif ($this->isColumnModified(CourierPeer::CLIENT_NR)) $criteria->add(CourierPeer::CLIENT_NR, $this->client_nr);\n\t\tif ($this->isColumnModified(CourierPeer::API_KEY)) $criteria->add(CourierPeer::API_KEY, $this->api_key);\n\t\tif ($this->isColumnModified(CourierPeer::LOGIN)) $criteria->add(CourierPeer::LOGIN, $this->login);\n\t\tif ($this->isColumnModified(CourierPeer::PASS)) $criteria->add(CourierPeer::PASS, $this->pass);\n\t\tif ($this->isColumnModified(CourierPeer::PETROL_CHARGE)) $criteria->add(CourierPeer::PETROL_CHARGE, $this->petrol_charge);\n\t\tif ($this->isColumnModified(CourierPeer::START_WORK_TIME)) $criteria->add(CourierPeer::START_WORK_TIME, $this->start_work_time);\n\t\tif ($this->isColumnModified(CourierPeer::END_WORK_TIME)) $criteria->add(CourierPeer::END_WORK_TIME, $this->end_work_time);\n\t\tif ($this->isColumnModified(CourierPeer::DESC)) $criteria->add(CourierPeer::DESC, $this->desc);\n\n\t\treturn $criteria;\n\t}", "function getRuleListCriteria($options = []) {\n\n $p['active'] = true;\n $p['start'] = 0;\n $p['limit'] = 0;\n $p['inherited'] = 1;\n $p['childrens'] = 0;\n $p['condition'] = 0;\n\n foreach ($options as $key => $value) {\n $p[$key] = $value;\n }\n\n $criteria = [\n 'SELECT' => Rule::getTable() . '.*',\n 'FROM' => Rule::getTable(),\n 'ORDER' => [\n $this->orderby . ' ASC'\n ]\n ];\n\n $where = [];\n if ($p['active']) {\n $where['is_active'] = 1;\n }\n\n if ($p['condition'] > 0) {\n $where['condition'] = ['&', (int)$p['condition']];\n }\n\n //Select all the rules of a different type\n $where['sub_type'] = $this->getRuleClassName();\n if ($this->isRuleRecursive()) {\n $criteria['LEFT JOIN'] = [\n Entity::getTable() => [\n 'ON' => [\n Entity::getTable() => 'id',\n Rule::getTable() => 'entities_id'\n ]\n ]\n ];\n\n if (!$p['childrens']) {\n $where += getEntitiesRestrictCriteria(\n Rule::getTable(),\n 'entities_id',\n $this->entity,\n $p['inherited']\n );\n } else {\n $sons = getSonsOf('glpi_entities', $this->entity);\n $where[Rule::getTable() . '.entities_id'] = $sons;\n }\n\n $criteria['ORDER'] = [\n Entity::getTable() . '.level ASC',\n $this->orderby . ' ASC'\n ];\n }\n\n if ($p['limit']) {\n $criteria['LIMIT'] = (int)$p['limit'];\n $criteria['START'] = (int)$p['start'];\n }\n $criteria['WHERE'] = $where;\n\n return $criteria;\n }", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(ClientePeer::DATABASE_NAME);\n $criteria->add(ClientePeer::IDCLIENTE, $this->idcliente);\n\n return $criteria;\n }", "public function getCriteria()\n\t{\n\t\t$orCriteria = new CDbCriteria;\n\t\t\n\t\tforeach ($this->filters as $andFilters)\n\t\t{\n\t\t\t$andCriteria = new CDbCriteria;\n\t\t\t\n\t\t\tforeach ($andFilters as $andFilter)\n\t\t\t\t$andCriteria->mergeWith($andFilter->getCriteria(), 'AND');\n\t\t\t\n\t\t\t$orCriteria->mergeWith($andCriteria, 'OR');\n\t\t}\n\t\t\n\t\treturn $orCriteria;\n\t}", "public function getRulesCollection()\n {\n $websiteId = $this->_helperData->getWebsiteId();\n $customerGroupId = $this->_helperData->getCustomerGroupId();\n\n return $this->_collectionFactory->create()\n ->addWebsiteGroupDateFilter($websiteId, $customerGroupId)\n ->addAllowedSalesRulesFilter()\n ->addFieldToFilter('coupon_type', ['neq' => '1'])\n ->addFieldToFilter('is_visible_in_list', ['eq' => '1']);\n }", "private function getSearchCriteria() {\n\t\t\n\t\t//TODO: agregar esto\n\t\treturn new Criteria();\n\t\t$criteria = new BulletinQuery();\n\t\t$criteria->setLimit($this->limit);\n\t\t$criteria->addAscendingOrderByColumn(BulletinPeer::ID);\n\n\t\tif ($this->searchString){\n\t\t\t$criteria->setIgnoreCase(true);\n\t\t\t$criteria->add(BulletinPeer::NAME,\"%\" . $this->searchString . \"%\",Criteria::LIKE);\n\t\t\t$criterionDescription = $criteria->getNewCriterion(BulletinPeer::DESCRIPTION,\"%\" . $this->searchString . \"%\",Criteria::LIKE);\n\t\t\t$criteria->addOr($criterionDescription);\n\t\t}\n\n\t\treturn $criteria;\n\n\t}", "public function getFilterCriteria(ClassMetadata $metaData){\n $criteria = array();\n foreach ($this->enabledFilters as $filter) {\n $criteria = array_merge($criteria, $filter->addFilterCriteria($metaData));\n }\n return $criteria;\n }", "public function getDefaultCriteria(){\n\t\treturn new \\Smally\\Criteria();\n\t}", "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(SubjectPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(SubjectPeer::ID)) $criteria->add(SubjectPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(SubjectPeer::SUBJECT_TYPE_CODE)) $criteria->add(SubjectPeer::SUBJECT_TYPE_CODE, $this->subject_type_code);\n\t\tif ($this->isColumnModified(SubjectPeer::IDENTIFICATION_NUMBER)) $criteria->add(SubjectPeer::IDENTIFICATION_NUMBER, $this->identification_number);\n\t\tif ($this->isColumnModified(SubjectPeer::FIRSTNAME)) $criteria->add(SubjectPeer::FIRSTNAME, $this->firstname);\n\t\tif ($this->isColumnModified(SubjectPeer::LASTNAME)) $criteria->add(SubjectPeer::LASTNAME, $this->lastname);\n\t\tif ($this->isColumnModified(SubjectPeer::EMAIL)) $criteria->add(SubjectPeer::EMAIL, $this->email);\n\t\tif ($this->isColumnModified(SubjectPeer::PHONE)) $criteria->add(SubjectPeer::PHONE, $this->phone);\n\t\tif ($this->isColumnModified(SubjectPeer::BANK_ACCOUNT)) $criteria->add(SubjectPeer::BANK_ACCOUNT, $this->bank_account);\n\t\tif ($this->isColumnModified(SubjectPeer::CITY)) $criteria->add(SubjectPeer::CITY, $this->city);\n\t\tif ($this->isColumnModified(SubjectPeer::STREET)) $criteria->add(SubjectPeer::STREET, $this->street);\n\t\tif ($this->isColumnModified(SubjectPeer::ZIP)) $criteria->add(SubjectPeer::ZIP, $this->zip);\n\t\tif ($this->isColumnModified(SubjectPeer::NOTE)) $criteria->add(SubjectPeer::NOTE, $this->note);\n\t\tif ($this->isColumnModified(SubjectPeer::BIRTH_DATE)) $criteria->add(SubjectPeer::BIRTH_DATE, $this->birth_date);\n\n\t\treturn $criteria;\n\t}", "public function getAll(): CollectionInterface\n {\n return $this->search(new SearchCriteria());\n }", "public function getConditions(): array {\n return $this->conditions;\n }", "public function criteria()\n {\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('indexing_id',$this->indexing_id);\n\t\t$criteria->compare('kelrem_id',$this->kelrem_id);\n\t\t$criteria->compare('indexing_urutan',$this->indexing_urutan);\n\t\t$criteria->compare('LOWER(indexing_nama)',strtolower($this->indexing_nama),true);\n\t\t$criteria->compare('LOWER(indexing_singk)',strtolower($this->indexing_singk),true);\n\t\t$criteria->compare('indexing_nilai',$this->indexing_nilai);\n\t\t$criteria->compare('indexing_aktif',isset($this->indexing_aktif)?$this->indexing_aktif:true);\n //$criteria->addCondition('indexing_aktif is true');\n $criteria->limit = 10;\n return $criteria;\n }", "public function matching( Criteria $criteria ) {\n\t\tif ( $this->isHydrated ) {\n\t\t\t$this->collection = new ArrayCollection(\n\t\t\t\t$this->collection->matching( $criteria )->toArray()\n\t\t\t);\n\t\t\t$this->criteria = $criteria;\n\t\t\t$this->isHydrated = true;\n\t\t}\n\n\t\t$collection = clone $this;\n\n\t\t$collection->criteria = $collection->criteria->merge( $criteria );\n\n\t\treturn $collection;\n\t}", "function findItemsBy(array $criteria);", "public function getFileCriteria()\n {\n return $this->criteria;\n }", "public function findAll(ASolrCriteria $criteria = null);", "public function buildCriteria()\n {\n $criteria = new Criteria(RequerimientoPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(RequerimientoPeer::ID)) $criteria->add(RequerimientoPeer::ID, $this->id);\n if ($this->isColumnModified(RequerimientoPeer::TIPO_OPERACION)) $criteria->add(RequerimientoPeer::TIPO_OPERACION, $this->tipo_operacion);\n if ($this->isColumnModified(RequerimientoPeer::TIPO_INMUEBLE)) $criteria->add(RequerimientoPeer::TIPO_INMUEBLE, $this->tipo_inmueble);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_HABITACION)) $criteria->add(RequerimientoPeer::CANTIDAD_HABITACION, $this->cantidad_habitacion);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_BANIO)) $criteria->add(RequerimientoPeer::CANTIDAD_BANIO, $this->cantidad_banio);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_PARQUEO)) $criteria->add(RequerimientoPeer::CANTIDAD_PARQUEO, $this->cantidad_parqueo);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_COMEDOR)) $criteria->add(RequerimientoPeer::CANTIDAD_COMEDOR, $this->cantidad_comedor);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_SALA)) $criteria->add(RequerimientoPeer::CANTIDAD_SALA, $this->cantidad_sala);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_COCINA)) $criteria->add(RequerimientoPeer::CANTIDAD_COCINA, $this->cantidad_cocina);\n if ($this->isColumnModified(RequerimientoPeer::DORMITORIO_SERVICIO)) $criteria->add(RequerimientoPeer::DORMITORIO_SERVICIO, $this->dormitorio_servicio);\n if ($this->isColumnModified(RequerimientoPeer::ESTUDIO)) $criteria->add(RequerimientoPeer::ESTUDIO, $this->estudio);\n if ($this->isColumnModified(RequerimientoPeer::CISTERNA)) $criteria->add(RequerimientoPeer::CISTERNA, $this->cisterna);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_JARDIN)) $criteria->add(RequerimientoPeer::CANTIDAD_JARDIN, $this->cantidad_jardin);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_PATIO)) $criteria->add(RequerimientoPeer::CANTIDAD_PATIO, $this->cantidad_patio);\n if ($this->isColumnModified(RequerimientoPeer::LAVANDERIA)) $criteria->add(RequerimientoPeer::LAVANDERIA, $this->lavanderia);\n if ($this->isColumnModified(RequerimientoPeer::TIENE_LUZ)) $criteria->add(RequerimientoPeer::TIENE_LUZ, $this->tiene_luz);\n if ($this->isColumnModified(RequerimientoPeer::TIENE_AGUA)) $criteria->add(RequerimientoPeer::TIENE_AGUA, $this->tiene_agua);\n if ($this->isColumnModified(RequerimientoPeer::NIVELES)) $criteria->add(RequerimientoPeer::NIVELES, $this->niveles);\n if ($this->isColumnModified(RequerimientoPeer::AREA)) $criteria->add(RequerimientoPeer::AREA, $this->area);\n if ($this->isColumnModified(RequerimientoPeer::AREA_X)) $criteria->add(RequerimientoPeer::AREA_X, $this->area_x);\n if ($this->isColumnModified(RequerimientoPeer::AREA_Y)) $criteria->add(RequerimientoPeer::AREA_Y, $this->area_y);\n if ($this->isColumnModified(RequerimientoPeer::ESTADO)) $criteria->add(RequerimientoPeer::ESTADO, $this->estado);\n if ($this->isColumnModified(RequerimientoPeer::AMENIDADES)) $criteria->add(RequerimientoPeer::AMENIDADES, $this->amenidades);\n if ($this->isColumnModified(RequerimientoPeer::MONEDA_ID)) $criteria->add(RequerimientoPeer::MONEDA_ID, $this->moneda_id);\n if ($this->isColumnModified(RequerimientoPeer::FORMA_PAGO)) $criteria->add(RequerimientoPeer::FORMA_PAGO, $this->forma_pago);\n if ($this->isColumnModified(RequerimientoPeer::PRESUPUESTO_MIN)) $criteria->add(RequerimientoPeer::PRESUPUESTO_MIN, $this->presupuesto_min);\n if ($this->isColumnModified(RequerimientoPeer::PRESUPUESTO_MAX)) $criteria->add(RequerimientoPeer::PRESUPUESTO_MAX, $this->presupuesto_max);\n if ($this->isColumnModified(RequerimientoPeer::NOMBRE_CLIENTE)) $criteria->add(RequerimientoPeer::NOMBRE_CLIENTE, $this->nombre_cliente);\n if ($this->isColumnModified(RequerimientoPeer::CORREO_CLIENTE)) $criteria->add(RequerimientoPeer::CORREO_CLIENTE, $this->correo_cliente);\n if ($this->isColumnModified(RequerimientoPeer::TELEFONO_CLIENTE)) $criteria->add(RequerimientoPeer::TELEFONO_CLIENTE, $this->telefono_cliente);\n if ($this->isColumnModified(RequerimientoPeer::ESTATUS)) $criteria->add(RequerimientoPeer::ESTATUS, $this->estatus);\n if ($this->isColumnModified(RequerimientoPeer::PRECALIFICACION)) $criteria->add(RequerimientoPeer::PRECALIFICACION, $this->precalificacion);\n if ($this->isColumnModified(RequerimientoPeer::NUCLEO_FAMILIAR)) $criteria->add(RequerimientoPeer::NUCLEO_FAMILIAR, $this->nucleo_familiar);\n if ($this->isColumnModified(RequerimientoPeer::INGRESOS)) $criteria->add(RequerimientoPeer::INGRESOS, $this->ingresos);\n if ($this->isColumnModified(RequerimientoPeer::EGRESOS)) $criteria->add(RequerimientoPeer::EGRESOS, $this->egresos);\n if ($this->isColumnModified(RequerimientoPeer::ENGANCHE)) $criteria->add(RequerimientoPeer::ENGANCHE, $this->enganche);\n if ($this->isColumnModified(RequerimientoPeer::TASA_INTERES_ANUAL)) $criteria->add(RequerimientoPeer::TASA_INTERES_ANUAL, $this->tasa_interes_anual);\n if ($this->isColumnModified(RequerimientoPeer::PLAZO_EN_ANIOS)) $criteria->add(RequerimientoPeer::PLAZO_EN_ANIOS, $this->plazo_en_anios);\n if ($this->isColumnModified(RequerimientoPeer::PLAZO_EN_MESES)) $criteria->add(RequerimientoPeer::PLAZO_EN_MESES, $this->plazo_en_meses);\n if ($this->isColumnModified(RequerimientoPeer::MONTO_FINANCIAR_MAXIMO)) $criteria->add(RequerimientoPeer::MONTO_FINANCIAR_MAXIMO, $this->monto_financiar_maximo);\n if ($this->isColumnModified(RequerimientoPeer::CUOTA_TOTAL_MENSUAL_MAXIMA)) $criteria->add(RequerimientoPeer::CUOTA_TOTAL_MENSUAL_MAXIMA, $this->cuota_total_mensual_maxima);\n if ($this->isColumnModified(RequerimientoPeer::CREATED_AT)) $criteria->add(RequerimientoPeer::CREATED_AT, $this->created_at);\n if ($this->isColumnModified(RequerimientoPeer::UPDATED_AT)) $criteria->add(RequerimientoPeer::UPDATED_AT, $this->updated_at);\n if ($this->isColumnModified(RequerimientoPeer::CREATED_BY)) $criteria->add(RequerimientoPeer::CREATED_BY, $this->created_by);\n if ($this->isColumnModified(RequerimientoPeer::UPDATED_BY)) $criteria->add(RequerimientoPeer::UPDATED_BY, $this->updated_by);\n if ($this->isColumnModified(RequerimientoPeer::USUARIO_ID)) $criteria->add(RequerimientoPeer::USUARIO_ID, $this->usuario_id);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_OFICINA)) $criteria->add(RequerimientoPeer::CANTIDAD_OFICINA, $this->cantidad_oficina);\n if ($this->isColumnModified(RequerimientoPeer::CANTIDAD_CUBICULO)) $criteria->add(RequerimientoPeer::CANTIDAD_CUBICULO, $this->cantidad_cubiculo);\n\n return $criteria;\n }", "public function findCategoriesBy(array $criteria);", "public function pushCriteria($criteria);", "function getCriteria($ID) {\n\n $criterias = $this->getCriterias();\n if (isset($criterias[$ID])) {\n return $criterias[$ID];\n }\n return array();\n }", "public function getResults(): Collection\n {\n // TODO: Cache the result\n return $this->query->get();\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(ProposicaoTableMap::DATABASE_NAME);\n\n if ($this->isColumnModified(ProposicaoTableMap::COL_ID)) {\n $criteria->add(ProposicaoTableMap::COL_ID, $this->id);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_ID_USUARIO)) {\n $criteria->add(ProposicaoTableMap::COL_ID_USUARIO, $this->id_usuario);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_NOME)) {\n $criteria->add(ProposicaoTableMap::COL_NOME, $this->nome);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_OBJETIVO)) {\n $criteria->add(ProposicaoTableMap::COL_OBJETIVO, $this->objetivo);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_START)) {\n $criteria->add(ProposicaoTableMap::COL_START, $this->start);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_IMAGEM)) {\n $criteria->add(ProposicaoTableMap::COL_IMAGEM, $this->imagem);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_TEMPO_TOTAL)) {\n $criteria->add(ProposicaoTableMap::COL_TEMPO_TOTAL, $this->tempo_total);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_DATA_CADASTRO)) {\n $criteria->add(ProposicaoTableMap::COL_DATA_CADASTRO, $this->data_cadastro);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_IS_RASCUNHO)) {\n $criteria->add(ProposicaoTableMap::COL_IS_RASCUNHO, $this->is_rascunho);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_CATEGORIA)) {\n $criteria->add(ProposicaoTableMap::COL_CATEGORIA, $this->categoria);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_QTE_COMENTARIOS)) {\n $criteria->add(ProposicaoTableMap::COL_QTE_COMENTARIOS, $this->qte_comentarios);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_QTE_CURTIDAS)) {\n $criteria->add(ProposicaoTableMap::COL_QTE_CURTIDAS, $this->qte_curtidas);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_QTE_SEGUIDORES)) {\n $criteria->add(ProposicaoTableMap::COL_QTE_SEGUIDORES, $this->qte_seguidores);\n }\n if ($this->isColumnModified(ProposicaoTableMap::COL_QTE_CONCLUIDOS)) {\n $criteria->add(ProposicaoTableMap::COL_QTE_CONCLUIDOS, $this->qte_concluidos);\n }\n\n return $criteria;\n }", "abstract protected function getConditionCriteria($params);", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(UtilisateurPeer::DATABASE_NAME);\n $criteria->add(UtilisateurPeer::ID, $this->id);\n\n return $criteria;\n }", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(RequerimientoPeer::DATABASE_NAME);\n $criteria->add(RequerimientoPeer::ID, $this->id);\n\n return $criteria;\n }", "public function defineCriteriaAttributes()\n\t{\n\t\treturn array();\n\t}", "public function getConditions()\n {\n return $this->_conditions;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(UtilisateurPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(UtilisateurPeer::ID)) $criteria->add(UtilisateurPeer::ID, $this->id);\n if ($this->isColumnModified(UtilisateurPeer::NOM)) $criteria->add(UtilisateurPeer::NOM, $this->nom);\n if ($this->isColumnModified(UtilisateurPeer::PRENOM)) $criteria->add(UtilisateurPeer::PRENOM, $this->prenom);\n if ($this->isColumnModified(UtilisateurPeer::MAIL)) $criteria->add(UtilisateurPeer::MAIL, $this->mail);\n if ($this->isColumnModified(UtilisateurPeer::AGE)) $criteria->add(UtilisateurPeer::AGE, $this->age);\n if ($this->isColumnModified(UtilisateurPeer::VILLE)) $criteria->add(UtilisateurPeer::VILLE, $this->ville);\n if ($this->isColumnModified(UtilisateurPeer::DESCRIPTION)) $criteria->add(UtilisateurPeer::DESCRIPTION, $this->description);\n if ($this->isColumnModified(UtilisateurPeer::IP_UTILISATEUR)) $criteria->add(UtilisateurPeer::IP_UTILISATEUR, $this->ip_utilisateur);\n if ($this->isColumnModified(UtilisateurPeer::IP_ID)) $criteria->add(UtilisateurPeer::IP_ID, $this->ip_id);\n\n return $criteria;\n }", "public function getCriteria()\n {\n $this->assertEquals(array('minLength' => 5), $this->minLengthValidator->getCriteria());\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(CompanyTableMap::DATABASE_NAME);\n\n if ($this->isColumnModified(CompanyTableMap::COL_COMPANYID)) {\n $criteria->add(CompanyTableMap::COL_COMPANYID, $this->companyid);\n }\n if ($this->isColumnModified(CompanyTableMap::COL_APIKEY)) {\n $criteria->add(CompanyTableMap::COL_APIKEY, $this->apikey);\n }\n if ($this->isColumnModified(CompanyTableMap::COL_LOCATIONID)) {\n $criteria->add(CompanyTableMap::COL_LOCATIONID, $this->locationid);\n }\n if ($this->isColumnModified(CompanyTableMap::COL_NAME)) {\n $criteria->add(CompanyTableMap::COL_NAME, $this->name);\n }\n if ($this->isColumnModified(CompanyTableMap::COL_TELEPHONE)) {\n $criteria->add(CompanyTableMap::COL_TELEPHONE, $this->telephone);\n }\n if ($this->isColumnModified(CompanyTableMap::COL_DELTED)) {\n $criteria->add(CompanyTableMap::COL_DELTED, $this->delted);\n }\n\n return $criteria;\n }", "public function getCamps($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(AirportPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collCamps === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collCamps = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(CampPeer::AIRPORT_ID, $this->id);\n\n\t\t\t\tCampPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collCamps = CampPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(CampPeer::AIRPORT_ID, $this->id);\n\n\t\t\t\tCampPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastCampCriteria) || !$this->lastCampCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collCamps = CampPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastCampCriteria = $criteria;\n\t\treturn $this->collCamps;\n\t}", "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(ItineraryPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(ItineraryPeer::ID)) $criteria->add(ItineraryPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(ItineraryPeer::DATE_REQUESTED)) $criteria->add(ItineraryPeer::DATE_REQUESTED, $this->date_requested);\n\t\tif ($this->isColumnModified(ItineraryPeer::MISSION_REQUEST_ID)) $criteria->add(ItineraryPeer::MISSION_REQUEST_ID, $this->mission_request_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::MISSION_TYPE_ID)) $criteria->add(ItineraryPeer::MISSION_TYPE_ID, $this->mission_type_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::APOINT_TIME)) $criteria->add(ItineraryPeer::APOINT_TIME, $this->apoint_time);\n\t\tif ($this->isColumnModified(ItineraryPeer::PASSENGER_ID)) $criteria->add(ItineraryPeer::PASSENGER_ID, $this->passenger_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::REQUESTER_ID)) $criteria->add(ItineraryPeer::REQUESTER_ID, $this->requester_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::FACILITY)) $criteria->add(ItineraryPeer::FACILITY, $this->facility);\n\t\tif ($this->isColumnModified(ItineraryPeer::LODGING)) $criteria->add(ItineraryPeer::LODGING, $this->lodging);\n\t\tif ($this->isColumnModified(ItineraryPeer::ORGIN_CITY)) $criteria->add(ItineraryPeer::ORGIN_CITY, $this->orgin_city);\n\t\tif ($this->isColumnModified(ItineraryPeer::ORGIN_STATE)) $criteria->add(ItineraryPeer::ORGIN_STATE, $this->orgin_state);\n\t\tif ($this->isColumnModified(ItineraryPeer::DEST_CITY)) $criteria->add(ItineraryPeer::DEST_CITY, $this->dest_city);\n\t\tif ($this->isColumnModified(ItineraryPeer::DEST_STATE)) $criteria->add(ItineraryPeer::DEST_STATE, $this->dest_state);\n\t\tif ($this->isColumnModified(ItineraryPeer::WAIVER_NEED)) $criteria->add(ItineraryPeer::WAIVER_NEED, $this->waiver_need);\n\t\tif ($this->isColumnModified(ItineraryPeer::NEED_MEDICAL_RELEASE)) $criteria->add(ItineraryPeer::NEED_MEDICAL_RELEASE, $this->need_medical_release);\n\t\tif ($this->isColumnModified(ItineraryPeer::COMMENT)) $criteria->add(ItineraryPeer::COMMENT, $this->comment);\n\t\tif ($this->isColumnModified(ItineraryPeer::AGENCY_ID)) $criteria->add(ItineraryPeer::AGENCY_ID, $this->agency_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::CAMP_ID)) $criteria->add(ItineraryPeer::CAMP_ID, $this->camp_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::LEG_ID)) $criteria->add(ItineraryPeer::LEG_ID, $this->leg_id);\n\t\tif ($this->isColumnModified(ItineraryPeer::POINT_TIME)) $criteria->add(ItineraryPeer::POINT_TIME, $this->point_time);\n\t\tif ($this->isColumnModified(ItineraryPeer::TIMETYPE)) $criteria->add(ItineraryPeer::TIMETYPE, $this->timetype);\n\t\tif ($this->isColumnModified(ItineraryPeer::CANCEL_ITINERARY)) $criteria->add(ItineraryPeer::CANCEL_ITINERARY, $this->cancel_itinerary);\n\t\tif ($this->isColumnModified(ItineraryPeer::COPIED_ITINERARY)) $criteria->add(ItineraryPeer::COPIED_ITINERARY, $this->copied_itinerary);\n\n\t\treturn $criteria;\n\t}", "function findAll() {\r\n\t\t\treturn $this->createCollection( $this->queryToArray($this->selectAllQuery()));\r\n\t\t}", "public function getSolrCriteria() {\r\n\t\tif ($this->_solrCriteria === null) {\r\n\t\t\t$this->_solrCriteria = new ASolrCriteria();\r\n\t\t}\r\n\t\treturn $this->_solrCriteria;\r\n\t}", "public function getConditions()\n {\n $inputs = $this->inputs();\n\n if (empty($inputs)) {\n return [];\n }\n\n if ($this->conditions !== null) {\n return $this->conditions;\n }\n\n $params = [];\n\n foreach ($inputs as $key => $value) {\n Arr::set($params, $key, $value);\n }\n\n $conditions = [];\n\n foreach ($this->filters() as $filter) {\n $conditions[] = $filter->condition($params);\n }\n\n return tap(array_filter($conditions), function ($conditions) {\n if (! empty($conditions)) {\n if ($this->expand === null || $this->mode !== static::MODE_RIGHT_SIDE) {\n $this->expand();\n }\n\n $this->grid()->fireOnce(new ApplyFilter([$conditions]));\n\n $this->grid()->model()->disableBindTreeQuery();\n }\n\n $this->conditions = $conditions;\n });\n }" ]
[ "0.83410877", "0.74191", "0.74055", "0.7361331", "0.7310955", "0.72863144", "0.72719765", "0.7051612", "0.69718474", "0.68758726", "0.6813313", "0.6798747", "0.6793565", "0.6782673", "0.6676319", "0.6636873", "0.6636873", "0.6579025", "0.65608746", "0.65498614", "0.651376", "0.64618725", "0.6423339", "0.64227605", "0.64204335", "0.64126754", "0.6395593", "0.6394932", "0.6385617", "0.6385339", "0.6385339", "0.63777995", "0.6355301", "0.63493586", "0.6347752", "0.6336847", "0.6324814", "0.63214767", "0.63146484", "0.6271946", "0.6235742", "0.62335515", "0.622806", "0.6219962", "0.62100387", "0.62100387", "0.6209387", "0.6205527", "0.6203863", "0.61985904", "0.6196995", "0.6186525", "0.61864436", "0.6172249", "0.61632603", "0.6155423", "0.6146026", "0.61355865", "0.6134102", "0.61157364", "0.611553", "0.6108055", "0.6096641", "0.60679054", "0.60630554", "0.6062849", "0.604131", "0.60349023", "0.6031678", "0.602343", "0.6018679", "0.60167915", "0.60094976", "0.5996732", "0.59886366", "0.5979812", "0.59742826", "0.59739584", "0.5958077", "0.59579563", "0.59565836", "0.59537166", "0.59456503", "0.59399253", "0.5933908", "0.59290665", "0.5920019", "0.5918548", "0.59177107", "0.59072286", "0.59065706", "0.59060335", "0.59040827", "0.58999157", "0.5898618", "0.5896469", "0.5894205", "0.5890604", "0.588484", "0.58818924" ]
0.81661814
1
Retrieve a plan with $id.
Получить план с $id.
public function retrieve($id) { try { Stripe::setApiKey($this->secretKey); $plan = Plan::retrieve($id); return $plan; } catch (\Exception $e) { return (object) ['isError' => 'true', 'message' => $e->getMessage()]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOnePlan($id) {\n\n $response = $this->flutterwave->request->request(\"get\", \"payment-plans/$id\", $this->flutterwave->token);\n\n return $response->responseBody;\n\n }", "public function retrivePlan($plan_id = null, $opts = null)\n {\n if (!empty($plan_id)) {\n return Plan::retrieve($plan_id, $opts);\n }\n return false;\n }", "public static function LoadOne($id_plan) {\n try {\n global $connexion;\n\n // on récupere l'objet\n $req = $connexion->prepare('SELECT * FROM plan WHERE idPLAN = :id');\n $req->execute(array('id' => $id_plan));\n\n // pour chaque résultat :\n while($ligne = $req->fetchObject()) {\n //On construit l'objet avec les résultats de la requete\n $objPlan = new plan($ligne->idPlan, $ligne->name, $ligne->duration, $ligne->storageSpace, $ligne->bandwidth, $ligne->dailyTransferQuota);\n }\n\n // on ferme le jeu d'essai\n $req->closeCursor();\n\n return $objPlan;\n }\n catch(Exception $e)\n {\n die('Erreur : '.$e->getMessage());\n }\n }", "public function getPlan($plan_id = '') {\n\t\ttry {\n\t\t\treturn \\Stripe\\Plan::retrieve($plan_id);\n\t\t} catch (Exception $ex) {\n\t\t\t$this->log($ex);\n\n\t\t\treturn false;\n\t\t}\n\t}", "public function show($id)\n\t{\n\t\t$plan = \\App\\Models\\Plan::find($id);\n\n\t\tif(empty($plan))\n\t\t{\n\t\t\tFlash::error('Plan not found');\n\n\t\t\treturn redirect('plans');\n\t\t}\n\n\t\treturn view('plans.show')->with('plan', $plan);\n\t}", "protected static function retrieveOrCreatePlan($id = null)\n {\n if (is_null($id))\n $id = 'gold-'.self::generateRandomString(20);\n\n try {\n return Plan::retrieve($id);\n }\n catch (InvalidRequestException $exception) {\n return Plan::create([\n 'id' => $id,\n 'amount' => 100,\n 'currency' => 'usd',\n 'interval' => 'month',\n 'name' => 'Gold Test Plan',\n ]);\n }\n }", "public function show($id)\n {\n $plano = Plano::findOrFail($id);\n return $plano;\n }", "function plan_get_plan( $id = 0 ) {\r\n global $wpdb;\r\n\r\n return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'bcie_app_procurementplan WHERE id = %d', $id ) );\r\n}", "public function getPlanByPlanId($planId)\n {\n/*\nselect * from assessment.plans\nwhere id = 1175\n;\n*/\n $sql = new Sql($this->adapter);\n $select = $sql->select()\n ->from('plans')\n\t\t ->where(array('id' => $planId))\n\t\t ;\n\n $statement = $sql->prepareStatementForSqlObject($select);\n $result = $statement->execute();\n\t\n\t// create and return a single row\n\t$row = $result->current(); \n return $row;\n }", "public function get_plan( $plan_id ) {\r\n\t\t// Get Stripe plan.\r\n\t\t$plan = $this->api->get_plan( $plan_id );\r\n\t\tif ( is_wp_error( $plan ) ) {\r\n\t\t\t$plan = $this->authorization_error( $plan->get_error_message() );\r\n\t\t}\r\n\r\n\t\treturn $plan;\r\n\t}", "public function show($id)\n\t{\n\t\treturn $this->plano->findOrFail($id);\n\t}", "public function show($id)\n {\n $plans = Plan::find($id);\n\n return response()->json([\n 'ok'=>true,\n 'data'=>$plans\n ]);\n }", "public function show($id)\n {\n //\n $plan = DeliveryPlan::with('requests.medical_unit','requests.pivot.delivery.medical_unit','offers', 'main_sponsor', 'delivery_sponsor')->find($id);\n return new DeliveryPlanResource($plan);\n\n }", "public function show($id)\n {\n $user = Auth::user();\n $plan = $this->planRepository->find($id);\n\n if (empty($plan)) {\n Flash::error('Plano não encontrado');\n\n return redirect(route('admin.plans.index'));\n }\n\n return view('plans.show', compact('plan','user'));\n }", "public function getPlanById($plan_id){\r\n\t\t$this -> db -> select('*');\r\n $this -> db -> from('tbl_plan_table');\r\n $this -> db -> where('plan_active','1');\r\n $this -> db -> where('plan_id',$plan_id);\r\n $query = $this -> db -> get();\r\n\t if($query -> num_rows() != 0)\r\n {\r\n\t\t\t//\t$this->db->last_query();exit;\r\n\t\t\treturn $query->result();\r\n }\r\n else\r\n {\r\n\t\t\treturn false;\r\n }\r\n\t}", "public function show($id)\n {\n //\n $plan = Plan::findOrFail($id);\n return view('admin.plans.show')\n ->with([\n 'plan' => $plan,\n 'section' => $this->section,\n ]);\n }", "public function find($id)\n {\n if (!is_array($id)) {\n return $this->subscriptionPlan->where('id', $id)->first();\n }\n \n return $this->subscriptionPlan->whereIn('id', $id)->get();\n }", "public function showPlanDetails(string $plan_id)\n {\n $this->apiEndPoint = \"v1/billing/plans/{$plan_id}\";\n\n $this->verb = 'get';\n\n return $this->doPayPalRequest();\n }", "function getPlanningById($id){\n \n $bdh = getDatabaseConnection(); \n \n $results = $bdh -> query(\"SELECT * FROM planning WHERE date='.$id.'\");\n \n return $results;\n }", "public function show($id) {\n $paymentplan = PaymentPlan::find($id);\n if (empty($paymentplan)) {\n Session::flash('error_msg', 'PaymentPlan not found.');\n return redirect('/admin/paymentplan');\n }\n return view('admin/PaymentPlan/show', ['title_for_layout' => 'PaymentPlan', 'paymentplan' => $paymentplan]);\n }", "function get($id) {\n $this->db->where('id', $id);\n $query = $this->db->get('planningRij');\n return $query->row();\n }", "public function edit($id)\n {\n // \n $plan = Plan::find($id);\n \n return response()->json($plan);\n }", "public function show($id)\n {\n $plan = Plan::with('feedbacks')->whereId($id)->first();\n\n if(isset($plan))\n return response()->json(['message' => 'Here is your choosen plan', 'body' => $plan], 200);\n\n return response()->json(['message' => 'Plan not fount!', 'body' => [] ], 400);\n }", "public function load($id){\r\n\t\t$sql = 'SELECT * FROM tbl_planilla WHERE id_planilla = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id);\r\n\t\treturn $this->getRow($sqlQuery);\r\n\t}", "public function getPlan($planId)\n {\n $query = 'SELECT *' .\n ' FROM #__jms_plans' .\n ' WHERE id = ' . (int) $planId\n ;\n $this->_db->setQuery($query);\n\n return $this->_db->loadObject();\n }", "public function show($id)\n {\n \n $title = 'Manage Plan';\n $plan_id = $id;\n $todos = Todo::where('plan_id',$id)->get()->toArray();\n $plan = Plan::findOrFail($id);\n \n return view('todo.manage', compact('plan_id','title','todos','plan'));\n //\n }", "public function showPlans($id){\n $planes=$this->model->getPlans($id);\n if(!empty($planes)){\n $this->view->showPlans($planes);\n }\n else{\n $this->pageNotFound();\n }\n }", "public function show($id)\n {\n $tasks = Task::all();\n $specificTasks = $tasks->where('action_plan', $id);\n $tasks = $tasks->sortByDesc('name');\n return TaskResource::collection($specificTasks);\n }", "public function hp_plan_name($id) //retriving plan name passing hp_id as encoded value\n {\n \t$db = Zend_Db_Table::getDefaultAdapter();\n \t$select = $db->select()\n \t->from(array('h' => 'hosted_plans'),array('h.hp_name'))\n \t->where('h.hp_id='.$id);\n \t$row = $db->fetchOne($select);\n \t\n \tif (!$row)\n \t{\n \t\tthrow new Exception(\"Could not find row\");\n \t}\n \treturn $row;\n }", "public function listarVersionPlan($id){\n $version= $this->db->select('*')->from('plans')\n ->join('versions','plans.PLAN_PK = versions.VRSN_FK_plans');\n return $version->get();\n }", "function GetPlanDetails($client_id, $plan_id)\n\t{\n\t\t$this->db->where('client_id', $client_id);\n\t\t$this->db->where('plan_id', $plan_id);\n\t\t$this->db->where('deleted', 0);\n\t\t$query = $this->db->get('plans');\n\t\tif($query->num_rows() > 0) {\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t\tdie($this->response->Error(7001));\n\t\t}\n\t}", "public function show($id)\n {\n $plan = Plan::find($id);\n $tiempo = $this->tiempo;\n\n return view('plan.show', compact('plan', 'tiempo'));\n }", "public function getPlan()\n {\n $res = Utils\\CloudClient::getClient()->get($this->url . \"/plan\")->body;\n return Plan::arrayFromJSON([], $res)[0];\n }", "public function getPlan($planId) {\n\n $requestPayload = array(\n 'authorization' => $this->apiSetting->getSecretKey(),\n 'mode' => $this->apiSetting->getMode(),\n\n );\n $getPlanUri = $this->apiUrl->getRecurringpaymentsApiUri() . '/' . $planId;\n $processCharge = \\com\\checkout\\Helpers\\Apihttpclient::getRequest(\n $getPlanUri,\n $this->apiSetting->getSecretKey(), $requestPayload\n );\n\n $responseModel = new \\com\\checkout\\Apiservices\\Recurringpayments\\Responsemodels\\Paymentplan($processCharge);\n\n return $responseModel;\n }", "public function fetchPaymentPlan($id = '', $q = '')\n {\n $url = $this->baseUrl . '/v2/gpx/paymentplans/query?seckey=' . $this->secretKey . '&q=' . $q . '&id=' . $id;\n $headers = array('Content-Type' => 'application/json');\n\n // Make `GET` request and handle response with unirest\n $response = $this->unirestRequest->get($url, $headers);\n\n //check the status is success\n if ($response->body) {\n return $response->body;\n }\n\n return $response;\n }", "public function show($id)\n {\n $gameplan = Gameplan::find($id);\n if (!$gameplan) {\n abort(404);\n }\n $data = [\n 'gameplan' => $gameplan\n ];\n return view('gameplans.show', $data);\n }", "public function edit($id)\n\t{\n\t\t$plan = \\App\\Models\\Plan::find($id);\n\n\t\tif(empty($plan))\n\t\t{\n\t\t\tFlash::error('Plan not found');\n\n\t\t\treturn redirect(route('plans.index'));\n\t\t}\n\n\t\treturn view('plans.edit')->with('plan', $plan);\n\t}", "function GetPlan($client_id, $plan_id)\n\t{\n\t\t$params = array('plan_id' => $plan_id);\n\n\t\t$data = $this->GetPlans($client_id, $params);\n\n\t\tif (!empty($data)) {\n\t\t\treturn $data[0];\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function get_by_id($id, $opt=null)\r\n {\r\n $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;\r\n\r\n $my = array();\r\n $my['opt'] = array('output' => 'full','active' => null, 'testPlanFields' => '');\r\n $my['opt'] = array_merge($my['opt'],(array)$opt);\r\n\r\n $safe_id = intval($id);\r\n switch($my['opt']['output'])\r\n {\r\n case 'testPlanFields':\r\n $sql = \"/* $debugMsg */ \" .\r\n// \" SELECT {$my['opt']['testPlanFields']} FROM {$this->tables['testplans']} \" .\r\n \" SELECT {$my['opt']['testPlanFields']} FROM \".$this->db->get_table('testplans').\" \" .\r\n \" WHERE id = \" . $safe_id;\r\n break;\r\n\r\n case 'minimun':\r\n $sql = \"/* $debugMsg */ \" .\r\n \" SELECT NH_TPLAN.name,\" .\r\n \" NH_TPROJ.id AS tproject_id, NH_TPROJ.name AS tproject_name,TPROJ.prefix\" .\r\n// \" FROM {$this->tables['nodes_hierarchy']} NH_TPLAN \" .\r\n// \" JOIN {$this->tables['nodes_hierarchy']} NH_TPROJ ON NH_TPROJ.id = NH_TPLAN.parent_id \" .\r\n// \" JOIN {$this->tables['testprojects']} TPROJ ON TPROJ.ID = NH_TPROJ.id \" .\r\n \" FROM \".$this->db->get_table('nodes_hierarchy').\" NH_TPLAN \" .\r\n \" JOIN \".$this->db->get_table('nodes_hierarchy').\" NH_TPROJ ON NH_TPROJ.id = NH_TPLAN.parent_id \" .\r\n \" JOIN \".$this->db->get_table('testprojects').\" TPROJ ON TPROJ.ID = NH_TPROJ.id \" .\r\n \" WHERE NH_TPLAN.id = \" . $safe_id;\r\n break;\r\n \r\n case 'full':\r\n default:\r\n $sql = \"/* $debugMsg */ \" .\r\n \" SELECT TPLAN.*,NH_TPLAN.name,NH_TPLAN.parent_id \" .\r\n// \" FROM {$this->tables['testplans']} TPLAN, \" .\r\n// \" {$this->tables['nodes_hierarchy']} NH_TPLAN \" .\r\n \" FROM \".$this->db->get_table('testplans').\" TPLAN, \" .\r\n \" \".$this->db->get_table('nodes_hierarchy').\" NH_TPLAN \" .\r\n \" WHERE TPLAN.id = NH_TPLAN.id AND TPLAN.id = \" . $safe_id;\r\n break; \r\n \r\n }\r\n\r\n if(!is_null($my['opt']['active']))\r\n {\r\n $sql .= \" AND active=\" . (intval($my['opt']['active']) > 0 ? 1 : 0) . \" \";\r\n }\r\n\r\n $rs = $this->db->get_recordset($sql);\r\n return ($rs ? $rs[0] : null);\r\n }", "public function show(Plan $plan)\n {\n //\n }", "public function show(Plan $plan)\n {\n //\n }", "public function delete($id)\n {\n try {\n Stripe::setApiKey($this->secretKey);\n $plan = Plan::retrieve($id);\n $product = $plan->product;\n $plan->delete();\n\n $getProduct = Product::retrieve($product);\n $getProduct->delete();\n\n return $plan;\n } catch (\\Exception $e) {\n return (object) ['isError' => 'true', 'message' => $e->getMessage()];\n }\n }", "function get_plan_id(){\n \n return $this->plan->planid;\n\n }", "public function editPaymentPlan($id)\n {\n\n $data = array(\n 'name' => $this->request->name,\n 'status' => $this->request->status,\n 'seckey' => $this->secretKey\n );\n\n // make request to endpoint using unirest.\n $headers = array('Content-Type' => 'application/json');\n $body = $this->body->json($data);\n $url = $this->baseUrl . '/v2/gpx/paymentplans/' . $id . '/edit';\n\n // Make `POST` request and handle response with unirest\n $response = $this->unirestRequest->post($url, $headers, $body);\n\n //check the status is success\n if ($response->body && $response->body->status === \"success\") {\n return $response->body;\n }\n\n return $response->body;\n }", "function getProductPlanByID($ID) {\n if(trim($ID) == \"\") {\n throw new Exception(\"ID has to be a non empty string.\");\n } else {\n return $this->request('GET', 'https://api.upodi.io/v2/productplans');\n }\n }", "public function show(Request $request, $id)\n {\n $plan = $this->service->findByUuid($id);\n\n if (empty($plan)) {\n abort(404);\n }\n\n return view('escritor::plans.show')->with('plan', $plan);\n }", "public function show($id)\n {\n\t\t$research_plans = ResearchPlan::find($id);\n $departments = Department::all();\n\n\t\treturn view('research_plans.show', compact('research_plans','departments'));\n }", "public function getPlanId() {\n return $this->planId;\n }", "public function edit($id)\n {\n $plan = Plan::findOrFail($id);\n return view('admin.users_plan.edit', compact('plan'));\n }", "public function getPlan()\n {\n return $this->hasOne(Plan::className(), ['id' => 'plan_id']);\n }", "public function getPlan()\n {\n return $this->hasOne(Plan::className(), ['id' => 'plan_id']);\n }", "public function getPlan()\n {\n return $this->hasOne(Plan::className(), ['id' => 'plan_id']);\n }", "public function findByID($id)\n {\n return response()->json(Planeta::find($id), 200);\n }", "public function edit($id)\n {\n $user = Auth::user();\n $months = $this->months;\n $plan = $this->planRepository->find($id);\n\n if (empty($plan)) {\n Flash::error('Plano não encontrado');\n\n return redirect(route('admin.plans.index'));\n }\n\n return view('plans.edit', compact('months','plan','user'));\n }", "public function showAction($id) {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entity = $em->getRepository('GestionEmploisBundle:PlanEtude')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find PlanEtude entity.');\r\n }\r\n\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('GestionEmploisBundle:PlanEtude:show.html.twig', array(\r\n 'entity' => $entity,\r\n 'delete_form' => $deleteForm->createView(),));\r\n }", "public abstract function getPlanId();", "public function get( $id );", "public function show($id)\n {\n $PlanEstudio = PlanEstudio::\n with(['dominios' => function ($query) {\n $query\n ->with('tipo_dominio')\n ->with(['competencias' => function ($query) {\n $query\n ->with(['nivel_competencias' => function ($query) {\n $query\n ->with('logro_aprendizajes')\n ->with(['nivel_competencia_asignaturas' => function ($query) {\n $query\n ->with('asignatura')\n ->with('competencia_evaluaciones');\n }]);\n }]);\n }]);\n }])\n ->with('carrera')\n ->with('tipo_plan')\n ->with('tipo_ingreso')\n ->with(['plan_estudio_usuarios' => function ($query) {\n $query\n ->with('usuario');\n }])\n ->with('niveles')\n ->findOrFail($id);\n return $PlanEstudio->toJson();\n }", "public function show($id)\n {\n //no need for the app according to the plan\n }", "public function retrieve($id);", "public function retrieve($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function show($id)\n\t{\n\t\t//\n\t\t$payment = Payment::find(1);\n\t}", "public function getRecord( $id ){}", "public function get($id){}", "public function edit($id) {\n $paymentplan = PaymentPlan::find($id);\n if (empty($paymentplan)) {\n Session::flash('error_msg', 'PaymentPlan not found.');\n return redirect('/admin/paymentplan');\n }\n return view('admin/PaymentPlan/edit', ['title_for_layout' => 'Edit PaymentPlan', 'paymentplan' => $paymentplan]);\n }", "public function edit($id)\n {\n try {\n $plan = EducationalPlan::findOrFail($id);\n } catch (\\Exception $e) {\n return FileAdminDataController::reportError('/admin/plan',$e);\n }\n return view('admin.EducationalPlan.edit.editEducationalPlan', compact('plan'));\n }", "public function edit($id_plan)\n\t{\n\t\t//\n\t\treturn view('admin.planes.createUpdate')->with('planes', \\App\\Planes::find($id_plan));\n\t}", "public function show($project, $id)\n {\n //\n }", "public function getPlanId() {\n return $this->planId;\n }", "function fetch_plan_name($id){\n \n $this->db-> select('name');\n $this -> db -> from('ss_plans');\n $this -> db -> where('id', $id);\n $this -> db -> where('status_id', 1);\n $this -> db -> limit(1);\n $plan_query = $this->db->get();\n if($plan_query->num_rows() == 1)\n {\n $plan_obj = $plan_query->result();\n return $plan_obj[0]->name;\n } \n else\n {\n return 0;\n } \n\n }", "public function show($id)\n {\n return $this->crud->find($id);\n }", "public static function getById($id);", "public static function getById($id);", "public function show($id)\n {\n //\n return Project::find($id);\n }", "public function show($id)\n {\n //\n return Project::find($id);\n }", "public function getPlanId()\n {\n return $this->getParameter('planId');\n }", "public function stripePlanes($id = null) {\r\n\t\tif($this->Session->read('Auth.User.role')!='1') {\r\n\t \treturn $this->redirect(array('action'=>'login'));\r\n\t }\r\n\t if ($this->request->is(array('post', 'put'))) {\r\n\t\t\t$this->Plan->create();\r\n\t\t\tif ($this->Plan->save($this->request->data)) {\r\n\t\t\t\t$this->Session->setFlash(('The plan was saved'));\r\n\t\t\t\treturn $this->redirect(array('action' => 'plans', $id));\r\n\t\t\t} else {\r\n\t\t\t\t$this->Session->setFlash(('The plan was not saved.'));\r\n\t\t\t\treturn $this->redirect(array('action' => 'plans', $id));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t $title_for_layout = \"DECIDERE | ADMIN - DATASET PROVIDER PLANS\";\r\n\r\n\t if($id != null) {\r\n\t \t$plans = $this->Plan->find('all', array('conditions' => array('Plan.provider_id' => $id ), 'recursive'=>1 ) );\r\n\t \t$provider = $this->Provider->find('first', array('conditions'=>array('Provider.id'=>$id)));\r\n\t } else {\r\n\t \treturn $this->redirect(array('action'=>'datasets'));\r\n\t }\r\n\r\n\t\t$this->set(compact('title_for_layout', 'plans', 'provider'));\r\n\t\t$this->set('_serialize', array('title_for_layout', 'plans', 'provider'));\r\n\t}", "public function get($id) ;", "public function ajax_getPlanById($ID_PLAN){\n\t\techo json_encode($this->Plan_model->getPlanById($ID_PLAN, $this->session->ID_BOX));\n\t}" ]
[ "0.7961439", "0.7588121", "0.7578665", "0.75133276", "0.7433144", "0.7420968", "0.7408363", "0.73769844", "0.7362013", "0.73578787", "0.7347736", "0.7295046", "0.72919786", "0.72725046", "0.7252492", "0.72296333", "0.7177066", "0.7172078", "0.7041199", "0.69755197", "0.6974826", "0.695495", "0.69507986", "0.6948966", "0.6929595", "0.69112366", "0.68828785", "0.68666935", "0.6864817", "0.68486476", "0.6838424", "0.6812473", "0.68003595", "0.6795227", "0.6779448", "0.67607933", "0.67243326", "0.66910183", "0.66764313", "0.6670042", "0.6670042", "0.6666263", "0.66519314", "0.66439813", "0.6636708", "0.66358006", "0.65928066", "0.6581887", "0.6532247", "0.65221334", "0.65221334", "0.65221334", "0.65011185", "0.64974856", "0.6487562", "0.64713675", "0.6454262", "0.64396185", "0.6437564", "0.64302266", "0.64302266", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.64301145", "0.6427174", "0.6398681", "0.63700736", "0.6367643", "0.63661325", "0.6360322", "0.6357303", "0.6340225", "0.6322017", "0.6321871", "0.63056684", "0.63056684", "0.6304997", "0.6304997", "0.6294294", "0.6290135", "0.6287094", "0.6283032" ]
0.79229075
1
/ donas tago laux vorto_id (la malo de troviVortonId) EN : vortoid EL : tago, monato, jaro
/ донас таго лаух ворто_ид (ла мало дэ трофиВортоId) EN : вортоид EL : таго, монато, яро
function troviTagLauxVortonId($vorto_id) { $query = "select tago,monato,jaro from sam_vortoj where id=".$vorto_id; mysql_select_db("sam"); $result = mysql_query($query) or die ("SELECT : Invalid query :".$query); $row = mysql_fetch_array($result); $tago['tago'] = $row['tago']; $tago['monato'] = $row['monato']; $tago['jaro'] = $row['jaro']; return $tago; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DetalleOrdenVentaxIdOrdenVenta() {\n $idOrdenVenta = $_REQUEST['id'];\n }", "public function getVinculaciones_idVeterinaria(){\n return $this->Vinculaciones_idVeterinaria;\n }", "function troviVortonId($tago, $monato, $jaro) {\r\n\t$query = \"select id from sam_vortoj where tago='\".$tago.\"' and monato='\".$monato.\"' and jaro='\".$jaro.\"'\";\r\n\tmysql_select_db(\"sam\");\r\n\t$result = mysql_query($query) or die (\"SELECT : Invalid query :\".$query);\r\n\t$row = mysql_fetch_array($result);\r\n\t//$vorto = $row['id']; // inutile si on renvoit le row id\r\n\treturn $row['id'];\r\n}", "public function VentasPorId()\n\t{\n\tself::SetNames();\n\t$sql = \"SELECT \n\t\tventas.idventa, \n\t\tventas.codpedido,\n\t\tventas.codmesa,\n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado,\n\t\tventas.montopropina, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa,\n\t ventas.observaciones, \n\t salas.nomsala,\n\t mesas.nommesa,\n\t\tclientes.codcliente,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tclientes.limitecredito,\n\t\tdocumentos.documento,\n\t cajas.nrocaja,\n\t cajas.nomcaja,\n\t mediospagos.mediopago,\n\t usuarios.dni, \n\t usuarios.nombres,\n\t provincias.provincia,\n\t departamentos.departamento,\n\t\tROUND(SUM(if(pag.montocredito!='0',pag.montocredito,'0.00')), 2) montoactual,\n\t ROUND(SUM(if(pag.montocredito!='0',clientes.limitecredito-pag.montocredito,clientes.limitecredito)), 2) creditodisponible,\n\t pag2.abonototal\n FROM (ventas LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa)\n LEFT JOIN salas ON mesas.codsala = salas.codsala\n LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento \n\tLEFT JOIN cajas ON ventas.codcaja = cajas.codcaja\n\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\tLEFT JOIN usuarios ON ventas.codigo = usuarios.codigo\n \n LEFT JOIN\n (SELECT\n codcliente, montocredito \n FROM creditosxclientes) pag ON pag.codcliente = clientes.codcliente\n \n LEFT JOIN\n (SELECT\n codventa, codcliente, SUM(if(montoabono!='0',montoabono,'0.00')) AS abonototal\n FROM abonoscreditos \n WHERE codventa = '\".limpiar(decrypt($_GET[\"codventa\"])).\"') pag2 ON pag2.codcliente = clientes.codcliente\n WHERE ventas.codventa = ? AND ventas.statuspago = '0'\";\n $stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codventa\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "public function getIdVenta()\n {\n return $this->idVenta;\n }", "public function vivienda($id) {\n return Medidor::find($id)->vivienda;\n }", "public function VendaPagamento() {\n $id = $this -> uri -> segment(3, 0);\n //verifica se o id existe\n $row = $this -> Fluxo_model -> get_fluxoa_berto($id);\n //se existir o id\n if ($row) {\n //consulta se a venda tem itens\n $row -> itens = $this -> Vendas_itens_model -> get_fluxo_vendas($id);\n //se tiver itens\n if ($row->itens) {\n //consulta Aluno\n $row -> Aluno = $this -> Alunos_model -> get_by_id($row -> lk_id_aluno);\n print_r($row);\n $this -> load -> view('fluxovenda/VENDA_pagamento', $row);\n } else {\n $this -> session -> set_flashdata('erro', 'Venda está sem itens');\n redirect('fluxoVenda');\n }\n } else {\n echo 'id venda não existe';\n }\n }", "public function getId_venda()\n {\n return $this->id_venda;\n }", "function listar_tag_interaccion_cantidad($limit, $fecha_del, $fecha_al, $idestadistico_complejo_tag) {\n //print_r($idestadistico_complejo_tag);\n //no solo nivel 0, depende si viene de la pantalla de inicio \n\n //en las pruebas que se realizo no mostro como resultado a los hijos\n /*$tags = count($idestadistico_complejo_tag);\n if ($tags > 0) {\n\n $ctag = \" SELECT tag1.tag FROM tag tag1 WHERE CONCAT(`tag1`.`idtag`,'---', `tag1`.`idmodulo_tag`) IN ( \";\n\n foreach ($idestadistico_complejo_tag as $valor) {\n if (strpos($valor, \"###\")) {\n $tags--;\n } else {\n $ctag.= \"'\" . $valor . \"',\";\n }\n }\n\n $ctag = substr($ctag, 0, -1) . \") \";\n\n $ctag = \"SELECT\n CONCAT(tag.idtag,'---',tag.`idmodulo_tag`)\n FROM\n tag,\n ($ctag) AS tag1\n WHERE\n tag.ruta LIKE concat('%/',`tag1`.tag,'%/') OR tag.tag = tag1.tag\n AND `tag`.`activo`=1\";\n\n if ($tags == 0) {\n $ctag = \"\";\n }\n\n $condicion = \" AND CONCAT(tag.idtag,'---',tag.`idmodulo_tag`) IN ($ctag) \";\n } else {\n $ctag = \"\";\n }\n //echo \"Limit \".$limit;\n if ($limit > 0) {\n $climit = \" LIMIT 0,$limit\";\n }\n */\n $condicion = \"\";\n $tags = count($idestadistico_complejo_tag);\n //echo $tags;\n if(!is_array($idestadistico_complejo_tag)){\n $aux_convert=$idestadistico_complejo_tag;\n $idestadistico_complejo_tag=null;\n $idestadistico_complejo_tag=array($aux_convert);\n } \n if ($tags > 0) {\n //$ctag = \" SELECT tag1.tag FROM tag tag1 WHERE CONCAT(`tag1`.`idtag`,'---', `tag1`.`idmodulo_tag`) IN ( \";\n $ctag = \"SELECT IF(replace(SUBSTRING_INDEX(tag1.ruta, '/', -2),'/','')<>'',replace(SUBSTRING_INDEX(tag1.ruta, '/', -2),'/',''),tag1.tag )as tag FROM tag tag1 \n WHERE CONCAT(`tag1`.`idtag`,'---', `tag1`.`idmodulo_tag`) IN ( \";\n foreach ($idestadistico_complejo_tag as $valor) {\n if (strpos($valor, \"###\")) {\n $tags--;\n } else {\n $ctag.= \"'\" . $valor . \"',\";\n }\n }\n\n $ctag = substr($ctag, 0, -1) . \") \";\n\n $ctag = \"SELECT\n CONCAT(tag.idtag,'---',tag.`idmodulo_tag`)\n FROM\n tag,\n ($ctag) AS tag1\n WHERE\n tag.ruta LIKE concat('%/',`tag1`.tag,'%/') OR tag.tag = tag1.tag\n AND `tag`.`activo`=1\";\n\n $ctag = \" AND CONCAT(tag.idtag,'---',tag.idmodulo_tag) IN ($ctag)\";\n\n if ($tags == 0) {\n $ctag = \" AND tag.nivel = 0 \";\n\n $ctag = \"\";\n }\n } else {\n $condicion = \" AND tag.nivel = 0 \";\n\n $condicion= \"\";\n }\n //no viene con tag y viene de pantalla principal\n if ($limit > 0 && $tags==0) {\n $condicion = \" AND nivel=0\";\n //$climit = \" LIMIT 0,$limit\";\n }\n $consulta = \"SELECT\n `idtag`,\n `idmodulo_tag`,\n tag,\n nivel,\n cantidad_hijos,\n idtag_padre,\n idmodulo_tag_padre,\n IF( cantidad_hijos > 0 OR nivel < 1,CONCAT(ruta,tag,'/'),ruta) AS campo ,\n (SELECT \n COUNT(distinct interaccion.idinteraccion,interaccion.idmodulo_interaccion)\n FROM\n `interaccion_tag`\n LEFT JOIN interaccion\n ON interaccion.idinteraccion=interaccion_tag.idinteraccion\n AND interaccion.idmodulo_interaccion=interaccion_tag.idmodulo_interaccion\n WHERE \n (interaccion_tag.idtag=tag.idtag AND interaccion_tag.idinteraccion \n NOT IN ( \n SELECT tabla1.idinteraccion \n FROM interaccion_tag as tabla1 \n LEFT JOIN tag tabla2 ON tabla1.idtag=tabla2.idtag \n WHERE \n tabla2.ruta like concat('%/',tag.tag,'/%') ) ) \n AND `interaccion_tag`.`activo`=1\n AND `interaccion`.`activo`=1\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al'\n ) AS cantidad1,\n (SELECT \n COUNT(distinct interaccion.idinteraccion,interaccion.idmodulo_interaccion)\n FROM\n `interaccion_tag` \n LEFT JOIN interaccion ON interaccion_tag.idinteraccion=interaccion.idinteraccion\n AND interaccion_tag.idmodulo_interaccion = interaccion.idmodulo_interaccion\n LEFT JOIN tag AS tag2\n ON interaccion_tag.idtag=tag2.idtag\n WHERE \n tag2.ruta like concat('%/',tag.tag,'/%') \n AND `interaccion`.`activo`=1\n AND `interaccion_tag`.`activo`=1\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al'\n ) AS cantidad2\n FROM \n tag\n WHERE \n tag.activo=1 $ctag $condicion \";\n\n $consulta.= \" \n ORDER BY\n campo,nivel,(cantidad1+cantidad2) DESC\n $climit\";\n\n\n //echo $consulta;\n //HAVING cantidad1+cantidad2>0, lo he quitado pues puede ayudar a ver tag que no se utilizan\n $result = $this->sql->consultar($consulta, \"sgrc\");\n\n return $result;\n }", "function getLoteIdGenerado($data){\n\n\t\t$prov_id = $data['prov_id'];\n\t\t$arti_id = $data['arti_id'];\n\t\t$depo_id = $data['depo_id'];\n\t\t$cod_lote = $data['cod_lote'];\n\t\t$lote_id = $this->Movimdeporecepcion->getLoteIdGenerado($prov_id, $arti_id, $depo_id, $cod_lote);\n\t\tif ($lote_id == null) {\n\t\t\t\tlog_message('ERROR','#TRAZA|TRAZ-COMP-ALMACEN|MOVIMIENTODEPORECEP|getLoteIdGenerado($data) >> ERROR NO DEVOLVIO $lote_id desde servicio');\n\t\t}\n\t\treturn $lote_id;\n\t}", "public static function montarSelectOrgaoTpProcessoCidadePetNovo($id)\n {\n\n\n $objMdPetTipoProcessoDTO = new MdPetTipoProcessoDTO();\n $objMdPetTipoProcessoDTO->retTodos();\n if (array_key_exists(\"idTpProc\", $id)) {\n $objMdPetTipoProcessoDTO->setNumIdTipoProcessoPeticionamento($id['idTpProc']);\n }\n $objMdPetTipoProcessoRN = new MdPetTipoProcessoRN();\n $arrObjMdPetTipoProcessoRN = $objMdPetTipoProcessoRN->listar($objMdPetTipoProcessoDTO);\n $arrTipoPet = InfraArray::converterArrInfraDTO($arrObjMdPetTipoProcessoRN, 'IdTipoProcessoPeticionamento');\n\n $objMdPetRelTpProcessoUnidRN = new MdPetRelTpProcessoUnidRN();\n $objMdPetRelTpProcessoUnidDTO = new MdPetRelTpProcessoUnidDTO();\n $objMdPetRelTpProcessoUnidDTO->retTodos();\n $objMdPetRelTpProcessoUnidDTO->retNumIdUnidade();\n $objMdPetRelTpProcessoUnidDTO->retStrStaTipoUnidade();\n $objMdPetRelTpProcessoUnidDTO->setNumIdTipoProcessoPeticionamento($arrTipoPet, InfraDTO::$OPER_IN);\n $arrobjMdPetRelTpProcessoUnidDTO = $objMdPetRelTpProcessoUnidRN->listar($objMdPetRelTpProcessoUnidDTO);\n $arrIdsUnidade = InfraArray::converterArrInfraDTO($arrobjMdPetRelTpProcessoUnidDTO, 'IdUnidade');\n\n $objUnidadeDTO = new UnidadeDTO();\n $objUnidadeDTO->retNumIdContato();\n if ($id['idOrgao'] != \"\") {\n $objUnidadeDTO->setNumIdOrgao($id['idOrgao']);\n }\n $objUnidadeDTO->setNumIdUnidade($arrIdsUnidade, InfraDTO::$OPER_IN);\n $objUnidadeRN = new UnidadeRN();\n $arrIdsContato = $objUnidadeRN->listarRN0127($objUnidadeDTO);\n $arrIdsContato = InfraArray::converterArrInfraDTO($arrIdsContato, 'IdContato');\n\n\n $objContatoDTO = new ContatoDTO();\n $objContatoDTO->setNumIdContato($arrIdsContato, InfraDTO::$OPER_IN);\n $objContatoDTO->setNumIdUf($id['idUf']);\n $objContatoDTO->retStrNomeCidade();\n $objContatoDTO->retNumIdCidade();\n $objContatoDTO->retNumIdContato();\n $objContatoRN = new ContatoRN();\n $arrIdsContato = $objContatoRN->listarRN0325($objContatoDTO);\n $arrIdContato = InfraArray::converterArrInfraDTO($arrIdsContato, 'IdContato');\n\n $objUnidadeDTO = new UnidadeDTO();\n $objUnidadeDTO->setNumIdContato($arrIdContato, InfraDTO::$OPER_IN);\n if ($id['idOrgao'] != \"\") {\n $objUnidadeDTO->setNumIdOrgao($id['idOrgao']);\n }\n $objUnidadeDTO->retNumIdUnidade();\n $objUnidadeRN = new UnidadeRN();\n $arrIdsContato = $objUnidadeRN->listarRN0127($objUnidadeDTO);\n $arrIdUnidade = InfraArray::converterArrInfraDTO($arrIdsContato, 'IdUnidade');\n\n\n $arrUni = array();\n $arrCid = array();\n $arrUnidadePrincipal = array();\n //PEticionamento processo novo\n //Recuperando Unidade\n foreach ($arrIdUnidade as $idUnidade) {\n\n $objUnidadeDTO = new UnidadeDTO();\n $objUnidadeDTO->setNumIdUnidade($idUnidade);\n $objUnidadeDTO->retNumIdContato();\n $objUnidadeRN = new UnidadeRN();\n $arrIdUnidade = $objUnidadeRN->consultarRN0125($objUnidadeDTO);\n $arrUnidadePrincipal[] = $arrIdUnidade->getNumIdContato();\n }\n\n $objContatoDTO = new ContatoDTO();\n $objContatoDTO->setNumIdContato($arrUnidadePrincipal, infraDTO::$OPER_IN);\n $objContatoDTO->retStrNomeCidade();\n $objContatoDTO->retNumIdContato();\n $objContatoDTO->setOrdStrNomeCidade(InfraDTO::$TIPO_ORDENACAO_ASC);\n $objContatoRN = new ContatoRN();\n $arrIdsContato = $objContatoRN->listarRN0325($objContatoDTO);\n\n foreach ($arrIdsContato as $value) {\n\n $objUnidadeDTO = new UnidadeDTO();\n $objUnidadeDTO->setNumIdContato($value->getNumIdContato());\n $objUnidadeDTO->retNumIdUnidade();\n $objUnidadeRN = new UnidadeRN();\n $arrIdUnidade = $objUnidadeRN->consultarRN0125($objUnidadeDTO);\n\n $arrUni[] = $arrIdUnidade->getNumIdUnidade();\n $arrCid[] = $value->getStrNomeCidade();\n }\n\n\n $xml = '';\n $xml .= '<itens>';\n if (count($arrCid) > 0 && count($arrUni) > 0) {\n for ($i = 0; $i < count($arrUni); $i++) {\n $xml .= '<item id=\"' . $arrUni[$i] . '\"';\n $xml .= ' descricao=\"' . $arrCid[$i] . '\"';\n $xml .= '></item>';\n }\n }\n $xml .= '</itens>';\n\n return $xml;\n\n }", "function vaqueras($status,$id){\n\n\t\t$dbid=$this->db->escape($id);\n\t\t$cana=$this->datasis->dameval(\"SELECT COUNT(*) AS cana FROM itlrece WHERE id_lrece=$dbid\");\n\n\t\tif(empty($cana)){\n\t\t\t$mSQL=\"SELECT b.codigo, b.nombre, b.id, a.animal FROM lrece AS a JOIN lvaca AS b ON a.ruta=b.ruta WHERE a.id=$dbid\";\n\t\t\t$query = $this->db->query($mSQL);\n\n\t\t\tif ($query->num_rows() > 0){\n\t\t\t\tforeach ($query->result() as $row){\n\t\t\t\t\t$data=array();\n\t\t\t\t\t$data['vaquera'] = $row->codigo;\n\t\t\t\t\t$data['nombre'] = $row->nombre;\n\t\t\t\t\t$data['densidad'] = 1.0164;\n\t\t\t\t\t$data['lista'] = 0;\n\t\t\t\t\t$data['animal'] = 'V';\n\t\t\t\t\t$data['crios'] = 0;\n\t\t\t\t\t$data['h2o'] = 0;\n\t\t\t\t\t$data['temp'] = 10;\n\t\t\t\t\t$data['brix'] = 0;\n\t\t\t\t\t$data['grasa'] = 0;\n\t\t\t\t\t$data['acidez'] = 0;\n\t\t\t\t\t$data['cloruros'] = 0;\n\t\t\t\t\t$data['alcohol'] = 0;\n\t\t\t\t\t$data['dtoagua'] = 0;\n\t\t\t\t\t$data['ph'] = 0;\n\t\t\t\t\t$data['id_lvaca'] = $row->id;\n\t\t\t\t\t$data['id_lrece'] = $id;\n\n\t\t\t\t\t$sql = $this->db->insert_string('itlrece', $data);\n\t\t\t\t\t$this->db->query($sql);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo 'Ruta no tiene vaqueras';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t$this->rapyd->load('dataobject','datadetails');\n\n\t\t$script= '\n\t\t$(document).ready(function() {\n\t\t\t$(\".inputnum\").numeric(\".\");\n\t\t});';\n\n\t\t$do = new DataObject('lrece');\n\t\t$do->rel_one_to_many('itlrece', 'itlrece', array('id'=>'id_lrece'));\n\n\t\t$do->pointer('sprv' ,'sprv.proveed=lrece.flete','sprv.nombre AS sprvnombre','left');\n\t\t$do->rel_pointer('itlrece','lvaca','lvaca.id=itlrece.id_lvaca','lvaca.nombre AS lvacadescrip,lvaca.codigo AS lvacacodigo','left');\n\t\t$do->order_rel_one_to_many('itlrece','id');\n\n\t\t$edit = new DataDetails('Recepci&oacute;n de leche',$do);\n\t\t$edit->on_save_redirect=false;\n\t\t$edit->script($script,'modify');\n\t\t$edit->script($script,'create');\n\n\t\t$edit->back_url = site_url($this->url.'filteredgrid');\n\n\t\t$edit->post_process('update','_post_vaqueras_update');\n\n\t\t$edit->pre_process( 'insert', '_pre_vaqueras_insert');\n\t\t$edit->pre_process( 'update', '_pre_vaqueras_update');\n\t\t$edit->pre_process( 'delete', '_pre_vaqueras_delete');\n\n\t\t$edit->id = new inputField('N&uacute;mero','id');\n\t\t$edit->id->rule='max_length[8]';\n\t\t$edit->id->mode = 'autohide';\n\t\t$edit->id->size =9;\n\t\t$edit->id->maxlength =8;\n\n\t\t$edit->fecha = new dateField('Fecha','fecha');\n\t\t$edit->fecha->rule='chfecha';\n\t\t$edit->fecha->size =10;\n\t\t$edit->fecha->mode = 'autohide';\n\t\t$edit->fecha->maxlength =8;\n\n\t\t$edit->ruta = new inputField('Ruta','ruta');\n\t\t$edit->ruta->rule='max_length[4]';\n\t\t$edit->ruta->mode = 'autohide';\n\t\t$edit->ruta->size =6;\n\t\t$edit->ruta->maxlength =4;\n\n\t\t$edit->flete = new inputField('Flete','flete');\n\t\t$edit->flete->rule='max_length[5]';\n\t\t//$edit->chofer->mode = 'autohide';\n\t\t$edit->flete->size =6;\n\t\t$edit->flete->maxlength =5;\n\n\t\t$edit->nombre = new inputField('Nombre','nombre');\n\t\t$edit->nombre->rule='max_length[45]';\n\t\t$edit->nombre->mode = 'autohide';\n\t\t$edit->nombre->size =40;\n\t\t$edit->nombre->maxlength =45;\n\n\t\t$edit->lleno = new inputField('Lleno','lleno');\n\t\t$edit->lleno->rule='max_length[16]|numeric';\n\t\t$edit->lleno->mode = 'autohide';\n\t\t$edit->lleno->css_class='inputnum';\n\t\t$edit->lleno->size =12;\n\t\t$edit->lleno->maxlength =16;\n\n\t\t$edit->vacio = new inputField('Vacio','vacio');\n\t\t$edit->vacio->rule='max_length[16]|numeric';\n\t\t$edit->vacio->mode = 'autohide';\n\t\t$edit->vacio->css_class='inputnum';\n\t\t$edit->vacio->size =12;\n\t\t$edit->vacio->maxlength =16;\n\n\t\t$edit->neto = new inputField('Neto','neto');\n\t\t$edit->neto->rule='max_length[16]|numeric';\n\t\t$edit->neto->mode = 'autohide';\n\t\t$edit->neto->css_class='inputnum';\n\t\t$edit->neto->size =12;\n\t\t$edit->neto->maxlength =16;\n\n\t\t$edit->densidad = new inputField('Densidad','densidad');\n\t\t$edit->densidad->rule='max_length[10]|numeric';\n\t\t$edit->densidad->mode = 'autohide';\n\t\t$edit->densidad->css_class='inputnum';\n\t\t$edit->densidad->size =12;\n\t\t$edit->densidad->maxlength =10;\n\n\t\t$edit->lista = new inputField('Lista','lista');\n\t\t$edit->lista->rule='max_length[16]|numeric';\n\t\t$edit->lista->mode = 'autohide';\n\t\t$edit->lista->css_class='inputnum';\n\t\t$edit->lista->size =12;\n\t\t$edit->lista->maxlength =16;\n\n\t\t//Diferencia neto-lista\n\t\t$edit->diferen = new inputField('Diferencia','diferen');\n\t\t$edit->diferen->rule='max_length[16]|numeric';\n\t\t$edit->diferen->css_class='inputnum';\n\t\t$edit->diferen->size =12;\n\t\t$edit->diferen->mode = 'autohide';\n\t\t$edit->diferen->maxlength =16;\n\n\t\t$edit->animal = new dropdownField ('Animal', 'animal');\n\t\t$edit->animal->option('V' ,'Vaca');\n\t\t$edit->animal->option('B' ,'Bufala');\n\t\t$edit->animal->rule = 'required';\n\t\t$edit->animal->mode = 'autohide';\n\t\t$edit->animal->style= 'width:145px;';\n\n\t\t$edit->crios = new inputField('D. Criosc&oacute;pico','crios');\n\t\t$edit->crios->rule='max_length[10]|numeric';\n\t\t$edit->crios->css_class='inputnum';\n\t\t$edit->crios->mode = 'autohide';\n\t\t$edit->crios->size =12;\n\t\t$edit->crios->maxlength =10;\n\n\t\t$edit->h2o = new inputField('Agua %','h2o');\n\t\t$edit->h2o->rule='max_length[10]|numeric';\n\t\t$edit->h2o->mode = 'autohide';\n\t\t$edit->h2o->css_class='inputnum';\n\t\t$edit->h2o->size =12;\n\t\t$edit->h2o->maxlength =10;\n\t\t$edit->h2o->insertValue=\"0\";\n\n\t\t$edit->temp = new inputField('Temperatura','temp');\n\t\t$edit->temp->rule='max_length[10]|numeric';\n\t\t$edit->temp->mode = 'autohide';\n\t\t$edit->temp->css_class='inputnum';\n\t\t$edit->temp->size =12;\n\t\t$edit->temp->maxlength =10;\n\n\t\t$edit->brix = new inputField('Grados Brix','brix');\n\t\t$edit->brix->rule='max_length[10]|numeric';\n\t\t$edit->brix->mode = 'autohide';\n\t\t$edit->brix->css_class='inputnum';\n\t\t$edit->brix->size =12;\n\t\t$edit->brix->maxlength =10;\n\n\t\t$edit->grasa = new inputField('Grasa %','grasa');\n\t\t$edit->grasa->rule='max_length[10]|numeric';\n\t\t$edit->grasa->mode = 'autohide';\n\t\t$edit->grasa->css_class='inputnum';\n\t\t$edit->grasa->size =12;\n\t\t$edit->grasa->maxlength =10;\n\n\t\t$edit->acidez = new inputField('Acidez','acidez');\n\t\t$edit->acidez->rule='max_length[10]|numeric';\n\t\t$edit->acidez->mode = 'autohide';\n\t\t$edit->acidez->css_class='inputnum';\n\t\t$edit->acidez->size =12;\n\t\t$edit->acidez->maxlength =10;\n\n\t\t$edit->cloruros = new inputField('Cloruros','cloruros');\n\t\t$edit->cloruros->rule='max_length[10]|numeric';\n\t\t$edit->cloruros->mode = 'autohide';\n\t\t$edit->cloruros->css_class='inputnum';\n\t\t$edit->cloruros->size =12;\n\t\t$edit->cloruros->maxlength =10;\n\n\t\t$edit->alcohol = new inputField('Alcohol','alcohol');\n\t\t$edit->alcohol->rule='numeric|required';\n\t\t$edit->alcohol->mode = 'autohide';\n\t\t$edit->alcohol->css_class='inputnum';\n\t\t$edit->alcohol->size =7;\n\t\t$edit->alcohol->maxlength =10;\n\n\t\t$edit->dtoagua = new inputField('Dto. Agua','dtoagua');\n\t\t$edit->dtoagua->rule='max_length[10]|numeric';\n\t\t$edit->dtoagua->mode = 'autohide';\n\t\t$edit->dtoagua->css_class='inputnum';\n\t\t$edit->dtoagua->size =12;\n\t\t$edit->dtoagua->maxlength =10;\n\t\t$edit->dtoagua->mode = 'autohide';\n\n\t\t//Inicio del detalle\n\t\t$edit->itid = new hiddenField('','id_<#i#>');\n\t\t$edit->itid->rel_id = 'itlrece';\n\t\t$edit->itid->db_name = 'id';\n\n\t\t$edit->itid_lvaca = new hiddenField('','id_lvaca_<#i#>');\n\t\t$edit->itid_lvaca->rel_id = 'itlrece';\n\t\t$edit->itid_lvaca->db_name = 'id_lvaca';\n\n\t\t$edit->itvaquera = new hiddenField('','vaquera_<#i#>');\n\t\t$edit->itvaquera->rel_id = 'itlrece';\n\t\t$edit->itvaquera->db_name = 'vaquera';\n\n\t\t$edit->itnombre = new hiddenField('','nombre_<#i#>');\n\t\t$edit->itnombre->rel_id = 'itlrece';\n\t\t$edit->itnombre->db_name = 'nombre';\n\n\t\t$edit->itlvacadescrip = new inputField('','lvacadescrip_<#i#>');\n\t\t$edit->itlvacadescrip->db_name = 'lvacadescrip';\n\t\t$edit->itlvacadescrip->pointer = true;\n\t\t$edit->itlvacadescrip->type='inputhidden';\n\t\t$edit->itlvacadescrip->rel_id = 'itlrece';\n\n\t\t$edit->itlvacacodigo = new inputField('','lvacacodigo_<#i#>');\n\t\t$edit->itlvacacodigo->db_name = 'lvacacodigo';\n\t\t$edit->itlvacacodigo->type='inputhidden';\n\t\t$edit->itlvacacodigo->pointer = true;\n\t\t$edit->itlvacacodigo->rel_id = 'itlrece';\n\n\t\t$edit->itanimal = new dropdownField ('Animal', 'animal_<#i#>');\n\t\t$edit->itanimal->db_name = 'animal';\n\t\t$edit->itanimal->rel_id = 'itlrece';\n\t\t$edit->itanimal->option('' ,'Seleccionar');\n\t\t$edit->itanimal->option('M' ,'Mezcla');\n\t\t$edit->itanimal->option('V' ,'Vaca');\n\t\t$edit->itanimal->option('B' ,'Bufala');\n\t\t$edit->itanimal->rule = 'required';\n\t\t$edit->itanimal->style='width:70px;';\n\n\t\t$edit->itdensidad = new inputField('Densidad','densidad_<#i#>');\n\t\t$edit->itdensidad->db_name = 'densidad';\n\t\t$edit->itdensidad->rel_id = 'itlrece';\n\t\t$edit->itdensidad->rule='max_length[10]|numeric|required';\n\t\t$edit->itdensidad->css_class='inputnum';\n\t\t$edit->itdensidad->size =6;\n\t\t$edit->itdensidad->maxlength =10;\n\n\t\t$edit->itlista = new hiddenField('Litros lista','lista_<#i#>');\n\t\t$edit->itlista->db_name = 'lista';\n\t\t$edit->itlista->rel_id = 'itlrece';\n\t\t//$edit->itlista->rule='max_length[16]|numeric|required';\n\t\t//$edit->itlista->css_class='inputnum';\n\t\t//$edit->itlista->size =6;\n\t\t//$edit->itlista->maxlength =16;\n\n\t\t$edit->itcrios = new inputField('Criosc&oacute;pica','crios_<#i#>');\n\t\t$edit->itcrios->db_name = 'crios';\n\t\t$edit->itcrios->rel_id = 'itlrece';\n\t\t$edit->itcrios->rule='max_length[10]|numeric|required';\n\t\t$edit->itcrios->css_class='inputnum';\n\t\t$edit->itcrios->size =6;\n\t\t//$edit->itcrios->insertValue='536';\n\t\t$edit->itcrios->maxlength =10;\n\n\t\t$edit->ith2o = new inputField('Agua %','h2o_<#i#>');\n\t\t$edit->ith2o->db_name = 'h2o';\n\t\t$edit->ith2o->rel_id = 'itlrece';\n\t\t$edit->ith2o->rule='max_length[10]|numeric|porcent|required';\n\t\t$edit->ith2o->css_class='inputnum';\n\t\t$edit->ith2o->insertValue='0';\n\t\t$edit->ith2o->size =6;\n\t\t$edit->ith2o->maxlength =10;\n\n\t\t$edit->ittemp = new inputField('Temperatura','temp_<#i#>');\n\t\t$edit->ittemp->db_name = 'temp';\n\t\t$edit->ittemp->rel_id = 'itlrece';\n\t\t$edit->ittemp->rule='max_length[10]|numeric|required';\n\t\t$edit->ittemp->css_class='inputnum';\n\t\t$edit->ittemp->size =6;\n\t\t$edit->ittemp->maxlength =10;\n\n\t\t$edit->itbrix = new inputField('Grados Brix','brix_<#i#>');\n\t\t$edit->itbrix->db_name = 'brix';\n\t\t$edit->itbrix->rel_id = 'itlrece';\n\t\t$edit->itbrix->rule='max_length[10]|numeric|required';\n\t\t$edit->itbrix->css_class='inputnum';\n\t\t$edit->itbrix->size =6;\n\t\t$edit->itbrix->maxlength =10;\n\n\t\t$edit->itgrasa = new inputField('Grasa %','grasa_<#i#>');\n\t\t$edit->itgrasa->db_name = 'grasa';\n\t\t$edit->itgrasa->rel_id = 'itlrece';\n\t\t$edit->itgrasa->rule='max_length[10]|numeric|porcent|required';\n\t\t$edit->itgrasa->css_class='inputnum';\n\t\t//$edit->itgrasa->insertValue='4.2';\n\t\t$edit->itgrasa->size =6;\n\t\t$edit->itgrasa->maxlength =10;\n\n\t\t$edit->itacidez = new inputField('Acidez','acidez_<#i#>');\n\t\t$edit->itacidez->db_name = 'acidez';\n\t\t//$edit->itacidez->insertValue='16';\n\t\t$edit->itacidez->rel_id = 'itlrece';\n\t\t$edit->itacidez->rule='numeric|required';\n\t\t$edit->itacidez->css_class='inputnum';\n\t\t$edit->itacidez->size =6;\n\t\t$edit->itacidez->maxlength =10;\n\n\t\t$edit->itcloruros = new inputField('Cloros','cloruros_<#i#>');\n\t\t$edit->itcloruros->db_name = 'cloruros';\n\t\t$edit->itcloruros->rel_id = 'itlrece';\n\t\t$edit->itcloruros->rule='numeric|required';\n\t\t$edit->itcloruros->css_class='inputnum';\n\t\t//$edit->itcloruros->insertValue='200';\n\t\t$edit->itcloruros->size =6;\n\t\t$edit->itcloruros->maxlength =10;\n\n\t\t$edit->italcohol = new inputField('Alcohol','alcohol_<#i#>');\n\t\t$edit->italcohol->db_name = 'alcohol';\n\t\t$edit->italcohol->rule='numeric|required';\n\t\t$edit->italcohol->css_class='inputnum';\n\t\t$edit->italcohol->size =4;\n\t\t//$edit->italcohol->insertValue='-1';\n\t\t$edit->italcohol->rel_id = 'itlrece';\n\t\t$edit->italcohol->maxlength =10;\n\n\t\t$edit->itph = new inputField('pH','ph_<#i#>');\n\t\t$edit->itph->db_name = 'ph';\n\t\t$edit->itph->rel_id = 'itlrece';\n\t\t$edit->itph->rule='numeric|required';\n\t\t$edit->itph->css_class='inputnum';\n\t\t$edit->itph->size =6;\n\t\t$edit->itph->maxlength =10;\n\n/*\n\t\t$edit->itdtoagua = new inputField('Dto. Agua','dtoagua_<#i#>');\n\t\t$edit->itdtoagua->db_name = 'dtoagua';\n\t\t$edit->itdtoagua->rel_id = 'itlrece';\n\t\t$edit->itdtoagua->rule='numeric|required';\n\t\t$edit->itdtoagua->css_class='inputnum';\n\t\t$edit->itdtoagua->size =6;\n\t\t$edit->itdtoagua->maxlength =10;\n*/\n\t\t//Fin del detalle\n\n\t\t$edit->build();\n\n\t\tif($edit->on_success()){\n\t\t\t$rt=array(\n\t\t\t\t'status' =>'A',\n\t\t\t\t'mensaje'=>'Registro guardado',\n\t\t\t\t'pk' =>$edit->_dataobject->pk\n\t\t\t);\n\t\t\techo json_encode($rt);\n\t\t}else{\n\t\t\t$conten['form'] =& $edit;\n\t\t\t$this->load->view('view_lrece', $conten);\n\t\t}\n\t}", "public function puxaGestorEvidencia(){\n\n $projeto = get_field( 'projeto');\n\n //pegando os gestores do projeto\n $gestores = processa_papeis::pegaPapeisProjeto($projeto);\n\n while ( $gestores->have_posts() ) : $gestores->the_post(); \n $fields = get_fields();\n //Checando se o nome do campo \"feedback_guardiao_x\" contem o papel do gestor \"guardiao_x\"\n if(strpos($field['_name'], $fields['papel'])){\n //Se quiser filtar por data é o $fields['data_de_inicio'] e $fields['data_de_terminio']\n $id_gestor = $fields['oni']['ID'];\n\n }\n \n endwhile;\n\n return $id_gestor;\n }", "public function getTipo_vinculacion_id(){\n return $this->tipo_vinculacion_id;\n }", "function nombreIva($idIva){\n if($idIva == NULL || $idIva == \"0\" || $idIva == \"\" || $idIva == \" \"){\n $idIva = 1;\n } \n $query = \"SELECT observacion FROM pg_iva WHERE idIva = \".$idIva.\"\";\n $rs = mysql_query($query);\n if(!$rs){ return (\"Error cargarDcto \\n\".mysql_error().$query.\"\\n Linea: \".__LINE__); }\n\n $row = mysql_fetch_assoc($rs);\n\n return $row['observacion'];\n }", "public function MostrarVentas($idPedido) {\n $usuario = $this->pedido->UsuarioDePedido($idPedido); //COGE LA ID DEL USUARIO DE ESE PEDIDO\n if (@$usuario[0]['Usuario_idUsu'] != $this->session->userdata('user')) { //SI LA ID NO COINCIDE CON LA DE LA SESIÓN\n //CARGA VISTA DE ERROR 404\n $cuerpo['d1'] = $this->load->view('404', '', true);\n $this->load->view('plantilla', array('cuerpo' => $cuerpo));\n } else {//SI COINCIDEN LAS ID MUESTRA LA VENTA\n $venta = $this->pedido->ventas($idPedido);\n $ventas = [];\n foreach ($venta as $ven) {\n $detalles = $this->productos->DetallesDe($ven['Producto_idPro']);\n array_push($ventas, array('img' => $detalles[0]['imagen'], 'nombre' => $detalles[0]['nombrePro'],\n 'unidades' => $ven['unidades'], 'precio' => $ven['precio']));\n }\n $cuerpo['d1'] = $this->load->view('ventas', array('ventas' => $ventas), true);\n $this->load->view('plantilla', array('cuerpo' => $cuerpo));\n }\n }", "public function Ver_ArticulosP($idPedido){\n\t\t$this->load->model(\"M_Tienda\",\"tienda\");\n\t\t$articulos=$this->tienda->Ver_Articulos($idPedido);\n\n\t\t$contenido=$this->load->view('V_Articulos',Array('Articulos'=>$articulos) ,true);\n\t\t$this->cargaVista(Array('contenido'=>$contenido));\n\n\t}", "public function obtenerIDs(){\n $this->Consulta(\"*\", \"vehiculos\", \"\");\n if($this->numFilas != 0){\n while($r = mysql_fetch_array($this->Resultado)){\n echo \"(\". $r[0] .\") \";\n echo $r[1] .\" :: \";\n echo $r[2] .\" :: >\";\n echo $r[2] .\"<hr>\";\n }\n }\n }", "public function selectVeicoliVendita() {\n $query = 'SELECT IdAuto, Marca, Modello, KM, Cilindrata, PrezzoVendita, Immagine, DescrImmagine FROM AutoVendita GROUP BY Modello ORDER BY Marca ASC';\n $queryResult = $this->connessioneAmministratore->esegui($query);\n $_POST = array();\n if($queryResult == false) {\n return [];\n } else {\n $result = array();\n while($row=mysqli_fetch_assoc($queryResult)) {\n $veicoloV = (Object) [\n \"IdAuto\"=>$row['IdAuto'],\n \"Marca\"=>$row['Marca'],\n \"Modello\"=>$row['Modello'],\n \"KM\"=>$row['KM'],\n \"Cilindrata\"=>$row['Cilindrata'],\n \"PrezzoVendita\"=>$row['PrezzoVendita'],\n \"Immagine\"=>$row['Immagine'],\n \"DescrImmagine\"=>$row['DescrImmagine']\n ];\n array_push($result,$veicoloV);\n }\n return $result;\n }\n }", "function mostrar_pedido2($id){\n\t\t\t$sql=\"SELECT *, id_ped AS detalles FROM pedidos, registro WHERE cliente_ped=id_reg AND id_ped='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->codigo=$resultado['codigo_ped'];\n\t\t\t$this->cliente=$resultado['nombre_reg'].\" \".$resultado['apellido_reg'];\n\t\t\t$this->fecha=$this->convertir_fecha($resultado['fecha_ped']);\n\t\t\t$this->hora=$resultado['hora_ped'];\n\t\t\t$this->estado=$resultado['estado_ped'];\n\t\t\t$this->monto=$resultado['monto_ped'];\n\t\t\t$this->cantidad=$resultado['cantidad_ped'];\n\t\t\t$this->comentario=$resultado['comentario_ped'];\n\t\t\t$this->moneda=$resultado['moneda_ped'];\n\t\t\t$this->tarjeta=$resultado['tarjeta_ped'];\n\t\t\t$this->direccion=$resultado['direccion_ped'];\n\t\t\t$this->telefono=$resultado['telefono_reg'].\" / \".$resultado['celular_reg'];\n\t\t\t$this->correo=$resultado['correo_reg'];\n\t\t\t$this->operador=$this->mostrar_operador($resultado['operador_ped']);\n\t\t\t$this->correo_operador=$this->mostrar_correo_operador($resultado['operador_ped']);\n\t\t\t\n\t\t\t$sql2=\"SELECT *, id_det AS planes, id_det AS nombre_pro, id_det AS nombre_image, id_det AS directorio_image FROM detalle_pedido WHERE pedido_det='$this->id' ORDER BY id_det\";\n\t\t\t$consulta2=mysql_query($sql2) or die(mysql_error());\n\t\t\t$temp2=\"\";\n\t\t\twhile($resultado2 = mysql_fetch_array($consulta2)){\n\t\t\t\t$producto=$resultado2['producto_det'];\n\t\t\t\t//Buscamos datos de producto\n\t\t\t\tif($resultado2['cambio_det']==\"hotel\")\n\t\t\t\t\t$sql_pro=\"SELECT nombre_hot, nombre_image, directorio_image FROM hotel, imagen WHERE id_hot='$producto' AND galeria_image='$producto' AND tabla_image='hotel' AND nombre_image!='mapa' GROUP BY id_hot\";\n\t\t\t\telse if($resultado2['cambio_det']==\"producto\")\n\t\t\t\t\t$sql_pro=\"SELECT nombre_pro, nombre_image, directorio_image FROM producto, imagen WHERE id_pro='$producto' AND galeria_image='$producto' AND tabla_image='producto' AND nombre_image!='mapa' GROUP BY id_pro\";\n\t\t\t\t\t\n\t\t\t\t$consulta_pro=mysql_query($sql_pro) or die(mysql_error());\n\t\t\t\t$resultado_pro = mysql_fetch_array($consulta_pro);\n\t\t\t\tif($resultado2['cambio_det']==\"hotel\")\n\t\t\t\t\t$resultado2['nombre_pro']=$resultado_pro['nombre_hot'];\n\t\t\t\telse if($resultado2['cambio_det']==\"producto\")\n\t\t\t\t\t$resultado2['nombre_pro']=$resultado_pro['nombre_pro'];\n\t\t\t\t\t\n\t\t\t\t$resultado2['nombre_image']=$resultado_pro['nombre_image'];\n\t\t\t\t$resultado2['directorio_image']=$resultado_pro['directorio_image'];\n\t\t\t\t\n\t\t\t\t$resultado2['llegada_det']=$this->convertir_fecha($resultado2['llegada_det']);\n\t\t\t\t$resultado2['salida_det']=$this->convertir_fecha($resultado2['salida_det']);\n\t\t\t\t$buscar=$resultado2['id_det'];\n\t\t\t\t$sql3=\"SELECT * FROM detalle_producto WHERE detalle_dpro='$buscar' ORDER BY id_dpro\";\n\t\t\t\t$consulta3=mysql_query($sql3) or die(mysql_error());\n\t\t\t\t$temp=\"\";\n\t\t\t\twhile($resultado3 = mysql_fetch_array($consulta3)){\n\t\t\t\t\t$temp[]=$resultado3;\n\t\t\t\t}\n\t\t\t\t$resultado2['planes']=$temp;\n\t\t\t\t$temp2[]=$resultado2;\n\t\t\t}\n\t\t\t//$resultado['detalles']=$temp2;\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado = $temp2;\t\n\t\t\n\t}", "function getVendedor($idAviso)\r\n {\r\n return $this->getAdapter()->fetchAll('EXEC KO_SP_AVISO_VENDEDOR_QRY ?', array($idAviso));\r\n }", "public function SelectVentas($id_usuario,$tipo,$id)\r\n\t{\r\n\t\t$this->db = $this->getDI()->get('db');\r\n\r\n\t\t$phql=\"SELECT *FROM venta WHERE id_cliente = :id_cliente AND Tipo = :Tipo AND id_producto = :id_producto \";\r\n\r\n\r\n\t\t$verificando= $this->db->query($phql,[\r\n\t\t\t\t\t\t\t\t\t\t'id_cliente'=> $id_usuario,\r\n\t\t\t\t\t\t\t\t\t\t'Tipo' => $tipo,\r\n\t\t\t\t\t\t\t\t\t\t'id_producto' => $id\r\n\t\t\t\t\t\t\t\t\t]\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\treturn $verificando->fetchAll();\r\n\r\n\t}", "function escuelasVinculadasPadre($idPadre){\n $hijos = hijosDePadre($idPadre);\n $cadena = \"\";\n $arrayEscuelas = array();\n foreach($hijos as $h){\n if(!in_array($h->id_escuela, $arrayEscuelas) && $h->id_escuela.\"\" != \"\"){\n $cadena .= $h->nombre_escuela. \", \";\n array_push($arrayEscuelas, $h->id_escuela);\n }\n }\n if($cadena != \"\"){\n $cadena = substr($cadena, 0, strlen($cadena)-2);\n }\n return $cadena;\n}", "function ventasPorAgente($id)\n {\n $consulta = \"SELECT a.nombre as nombre, count(a.id) as ventas, sum(tv.importe_venta) as total, c.nom_ciudad as sede \n FROM agentes_ventas av INNER JOIN tipo_venta tv on av.id_venta = tv.id_venta \n INNER JOIN agentes a on av.id_agente = a.id \n INNER JOIN ciudad c ON a.id_ciudad = c.id_ciudad WHERE a.id =:id\";\n\n $result = $this->GetInstance()->prepare($consulta);\n $result->bindParam(':id', $id);\n $result->execute();\n return $result->fetch();\n }", "public function tagsByIdProducto( $idProducto )\n\t{\n\t\treturn $this->createQuery('pt')\n\t\t ->select('pt.*, t.*')\n\t\t ->innerJoin('pt.tag t')\n \t\t\t ->addWhere('pt.id_producto= ?', array( $idProducto ) )\n\t\t\t\t ->execute();\n\t}", "function voir_un_id(){\n \n\t\t// query to read single record\n\t\t$query = \"SELECT `idutilisateur`, `pseudo`, `mdp`, `type_u`,nom_type, `num_loca`,rue,cpostal,ville \n\t\tFROM `utilisateur` user, typeutilisateur t_user, localisation loca WHERE user.type_u = t_user.idtypeutilisateur \n\t\tAND user.num_loca = loca.idlocalisation AND user.idutilisateur = ?\";\n \n\t\t// prepare query statement\n\t\t$stmt = $this->conn->prepare( $query );\n \n\t\t// bind id of product to be updated\n\t\t//$stmt->bindParam(1, $this->id_prod);\n\t\t$stmt->bindParam(1, $this->idutilisateur);\n\n\t\t//$stmt->bindParam(2, $this->num_article);\n \n\t\t// execute query\n\t\t$stmt->execute();\n\t\t\n\t\t// get retrieved row\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t// set values to object properties\n\t\t$this->idutilisateur = $row['idutilisateur'];\n\t\t$this->pseudo = $row['pseudo'];\n\t\t$this->mdp = $row['mdp'];\n\t\t$this->type_u = $row['type_u'];\n\t\t$this->nom_type = $row['nom_type'];\n\t\t$this->num_loca = $row['num_loca'];\n\t\t$this->rue = $row['rue'];\n\t\t$this->cpostal = $row['cpostal'];\n\t\t$this->ville = $row['ville'];\n \n\t}", "function contar_interacciones($fecha_del, $fecha_al, $idestadistico_complejo_tag) {\n \n $tags = count($idestadistico_complejo_tag);\n \n if(!is_array($idestadistico_complejo_tag)){\n $aux_convert=$idestadistico_complejo_tag;\n $idestadistico_complejo_tag=null;\n $idestadistico_complejo_tag=array($aux_convert);\n }\n if ($tags > 0) {\n $ctag = \" SELECT tag1.tag FROM tag tag1 WHERE CONCAT(`tag1`.`idtag`,'---', `tag1`.`idmodulo_tag`) IN ( \";\n\n foreach ($idestadistico_complejo_tag as $valor) {\n \n if (strpos($valor, \"###\")) {\n $tags--;\n } else {\n $ctag.= \"'\" . $valor . \"',\";\n }\n }\n\n $ctag = substr($ctag, 0, -1) . \") \";\n\n $ctag = \"SELECT \n CONCAT(tag.idtag,'---',tag.`idmodulo_tag`)\n FROM \n tag, \n ($ctag) AS tag1\n WHERE\n tag.ruta LIKE concat('%/',`tag1`.tag,'%/') OR tag.tag = tag1.tag AND\n `tag`.`activo`=1\";\n\n if ($tags == 0) {\n $ctag = \"\";\n }\n } else {\n $ctag = \"\";\n }\n \"\";\n\n\n if ($ctag == \"\") {\n //primer: interacciones a la fecha, sh en interacciones, interacciones totales\n $consulta = \"\n (SELECT count(*) AS cantidad\n FROM `interaccion`\n WHERE \n `interaccion`.`activo`=1 \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del' \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al')\n UNION ALL\n (\n SELECT \n COUNT(DISTINCT(concat(`interaccion_sh`.`idsh`,'---',`interaccion_sh`.`idmodulo`))) AS cantidad\n FROM\n `interaccion`\n INNER JOIN `interaccion_sh` ON (`interaccion`.`idinteraccion` = `interaccion_sh`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_sh`.`idmodulo_interaccion`)\n WHERE\n `interaccion`.`activo` = 1 \n AND `interaccion_sh`.`activo`=1 \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del' \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al'\n )\n UNION ALL\n (\n SELECT count(*) AS cantidad\n FROM `interaccion`\n WHERE \n `interaccion`.`activo`=1 \n )\";\n } else {\n\n $consulta = \"(SELECT \n COUNT(DISTINCT(CONCAT(interaccion.idinteraccion,'---',interaccion.idmodulo_interaccion))) AS `cantidad`\n FROM\n `interaccion`\n LEFT OUTER JOIN `interaccion_tag` ON (`interaccion`.`idinteraccion` = `interaccion_tag`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_tag`.`idmodulo_interaccion`)\n WHERE\n `interaccion`.`activo` = 1 \n AND CONCAT(interaccion_tag.idtag,'---',interaccion_tag.idmodulo_tag) IN ($ctag)\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del' \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al')\n UNION ALL\n ( \n SELECT \n COUNT(DISTINCT(concat(`interaccion_sh`.`idsh`,'---',`interaccion_sh`.`idmodulo`))) AS cantidad\n FROM\n `interaccion`\n LEFT OUTER JOIN `interaccion_tag` ON (`interaccion`.`idinteraccion` = `interaccion_tag`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_tag`.`idmodulo_interaccion`)\n INNER JOIN `interaccion_sh` ON (`interaccion`.`idinteraccion` = `interaccion_sh`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_sh`.`idmodulo_interaccion`)\n WHERE\n `interaccion`.`activo` = 1 \n AND CONCAT(interaccion_tag.idtag,'---',interaccion_tag.idmodulo_tag) IN ($ctag)\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del' \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al'\n )\n UNION ALL\n (\n SELECT count(*) AS cantidad\n FROM `interaccion`\n WHERE \n `interaccion`.`activo`=1 \n )\";\n }\n //echo $consulta;\n\n $result = $this->sql->consultar($consulta, \"sgrc\");\n\n return $result;\n }", "function indymedia_ajout_valeurs_mots($valeurs, $id_article)\n{\n\tinclude_spip('inc/config');\n\t// les mots-cles\n\t$row = sql_select(\n\t\tarray('MOTS.id_mot'),\n\t\tarray('MOTS' => 'spip_mots','LIEN'=>'spip_mots_liens'),\n\t\tarray('MOTS.id_mot = LIEN.id_mot','LIEN.id_objet='.$id_article, \"LIEN.objet = 'article'\")\n\t);\n\twhile($r = sql_fetch($row))\n\t{\n\t\t// mot cle edito ? complet ? focus ?\n\t\tif ($r['id_mot']==lire_config('indymedia_accueil/mot_edito'))\n\t\t\t$valeurs['mise_en_edito'] = 'mise_en_edito';\n\t\telse if ($r['id_mot']==lire_config('indymedia_accueil/mot_edito_complet'))\n\t\t\t$valeurs['edito_complet'] = 'edito_complet';\n\t\telse if ($r['id_mot']==lire_config('indymedia_accueil/mot_focus'))\n\t\t\t$valeurs['mot_focus'] = 'mot_focus';\n\t\telse \n\t\t// ajout comme un tag normal\n\t\t$valeurs['mots'][] = $r['id_mot'];\n\t\t\n\t}\n\treturn $valeurs;\n}", "public function GetId_vehiculo()\n\t{\n\t\treturn $this->Id_vehiculo;\n\t}", "function vu_editer_contenu_objet($flux){\n\t// Concernant le formulaire CVT 'editer_groupe_mot', on veut faire apparaitre les nouveaux objets\n\tif ($flux['args']['type']=='groupe_mot') {\n\t\t// Si le formulaire concerne les groupes de mots-cles, alors recupere le resultat\n\t\t// de la compilation du squelette 'inc-groupe-mot-vu.html' qui contient les lignes\n\t\t// a ajouter au formulaire CVT,\n\t\t$vu_gp_objets = recuperer_fond('formulaires/inc-groupe-mot-vu', $flux['args']['contexte']);\n\t\t// que l'on insere ensuite a l'endroit approprie, a savoir avant le texte <!--choix_tables--> du formulaire\n\t\t$flux['data'] = preg_replace('%(<!--choix_tables-->)%is', $vu_gp_objets.\"\\n\".'$1', $flux['data']);\n\t}\n\treturn $flux;\n}", "public function Obtener($id){\n\t\ttry {\n\t\t\t$stm = $this->conexion\n\t\t\t ->prepare(\"SELECT \n\t\t\t\t\t\t\t\t ventas.vendedor,\n\t\t\t\t\t\t\t\t ventas.cliente AS cliente_id,\n\t\t\t\t\t\t\t\t concat(persona.nombres, ' ', persona.apellidos) AS cliente_nombres,\n\t\t\t\t\t\t\t\t persona.direccion AS cliente_direccion,\n\t\t\t\t\t\t\t\t persona.barrio AS cliente_barrio,\n\t\t\t\t\t\t\t\t ciudad.det AS cliente_ciudad,\n\t\t\t\t\t\t\t\t departamento.det AS cliente_departamento,\n\t\t\t\t\t\t\t\t pais.det AS cliente_pais,\n\t\t\t\t\t\t\t\t ventas.fecha,\n\t\t\t\t\t\t\t\t ventas.total,\n\t\t\t\t\t\t\t\t ventas.carros_id,\n\t\t\t\t\t\t\t\t carros.propietario AS ant_prop_id,\n\t\t\t\t\t\t\t\t concat(persona1.nombres, ' ', persona1.apellidos) AS ant_prop_nombres,\n\t\t\t\t\t\t\t\t ciudad1.det AS ant_prop_ciudad,\n\t\t\t\t\t\t\t\t departamento1.det AS ant_prop_departamento,\n\t\t\t\t\t\t\t\t pais1.det AS ant_prop_pais,\n\t\t\t\t\t\t\t\t carros.anio,\n\t\t\t\t\t\t\t\t ciudad2.det AS carro_ciudad,\n\t\t\t\t\t\t\t\t departamento2.det AS carro_departamento,\n\t\t\t\t\t\t\t\t pais2.det AS carro_pais,\n\t\t\t\t\t\t\t\t carros.km,\n\t\t\t\t\t\t\t\t tipo_carro.det AS carro_tipo,\n\t\t\t\t\t\t\t\t carros.motor,\n\t\t\t\t\t\t\t\t carros.combustible,\n\t\t\t\t\t\t\t\t carros.color,\n\t\t\t\t\t\t\t\t carros.transmision,\n\t\t\t\t\t\t\t\t carros.direccion,\n\t\t\t\t\t\t\t\t carros.cilindraje,\n\t\t\t\t\t\t\t\t modelo.det AS carro_modelo,\n\t\t\t\t\t\t\t\t marca.det AS carro_marca,\n\t\t\t\t\t\t\t\t carros.pcompra,\n\t\t\t\t\t\t\t\t carros.pventa\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t ventas\n\t\t\t\t\t\t\t\t INNER JOIN persona ON (ventas.cliente = persona.id)\n\t\t\t\t\t\t\t\t INNER JOIN carros ON (ventas.carros_id = carros.id)\n\t\t\t\t\t\t\t\t INNER JOIN tipo_carro ON (carros.tipo = tipo_carro.id)\n\t\t\t\t\t\t\t\t INNER JOIN ciudad ON (persona.ciudad = ciudad.id)\n\t\t\t\t\t\t\t\t INNER JOIN departamento ON (ciudad.depto = departamento.id)\n\t\t\t\t\t\t\t\t INNER JOIN pais ON (departamento.pais = pais.id)\n\t\t\t\t\t\t\t\t INNER JOIN persona persona1 ON (carros.propietario = persona1.id)\n\t\t\t\t\t\t\t\t INNER JOIN ciudad ciudad1 ON (persona1.ciudad = ciudad1.id)\n\t\t\t\t\t\t\t\t INNER JOIN departamento departamento1 ON (ciudad1.depto = departamento1.id)\n\t\t\t\t\t\t\t\t INNER JOIN pais pais1 ON (departamento1.pais = pais1.id)\n\t\t\t\t\t\t\t\t INNER JOIN ciudad ciudad2 ON (carros.ciudad = ciudad2.id)\n\t\t\t\t\t\t\t\t INNER JOIN departamento departamento2 ON (ciudad2.depto = departamento2.id)\n\t\t\t\t\t\t\t\t INNER JOIN pais pais2 ON (departamento2.pais = pais2.id)\n\t\t\t\t\t\t\t\t INNER JOIN modelo ON (carros.modelo_id = modelo.id)\n\t\t\t\t\t\t\t\t INNER JOIN marca ON (modelo.marca = marca.id)\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t ventas.id = ? AND \n\t\t\t\t\t\t\t\t ventas.estado = 1\");\t\t\t\n\t\t\t$stm->execute(array($id));\n\t\t\t$r = $stm->fetch(PDO::FETCH_OBJ);\n\n\t\t\t$almVentas = new Ventas();\n\n\t\t\t$almVentas->__SET('vendedor', $r->vendedor);\n\t\t\t$almVentas->__SET('cliente_id', $r->cliente_id);\n\t\t\t$almVentas->__SET('cliente_nombres', $r->cliente_nombres);\n\t\t\t$almVentas->__SET('cliente_direccion', $r->cliente_direccion);\n\t\t\t$almVentas->__SET('cliente_barrio', $r->cliente_barrio);\n\t\t\t$almVentas->__SET('cliente_ciudad', $r->cliente_ciudad);\n\t\t\t$almVentas->__SET('cliente_departamento', $r->cliente_departamento);\n\t\t\t$almVentas->__SET('cliente_pais', $r->cliente_pais);\n\t\t\t$almVentas->__SET('fecha', $r->fecha);\n\t\t\t$almVentas->__SET('total', $r->total);\n\t\t\t$almVentas->__SET('carros_id', $r->carros_id);\n\t\t\t$almVentas->__SET('ant_prop_id', $r->ant_prop_id);\n\t\t\t$almVentas->__SET('ant_prop_nombres', $r->ant_prop_nombres);\n\t\t\t$almVentas->__SET('ant_prop_ciudad', $r->ant_prop_ciudad);\n\t\t\t$almVentas->__SET('ant_prop_departamento', $r->ant_prop_departamento);\n\t\t\t$almVentas->__SET('ant_prop_pais', $r->ant_prop_pais);\n\t\t\t$almVentas->__SET('anio', $r->anio);\n\t\t\t$almVentas->__SET('carro_ciudad', $r->carro_ciudad);\n\t\t\t$almVentas->__SET('carro_departamento', $r->carro_departamento);\n\t\t\t$almVentas->__SET('carro_pais', $r->carro_pais);\n\t\t\t$almVentas->__SET('km', $r->km);\n\t\t\t$almVentas->__SET('carro_tipo', $r->carro_tipo);\n\t\t\t$almVentas->__SET('motor', $r->motor);\n\t\t\t$almVentas->__SET('combustible', $r->combustible);\n\t\t\t$almVentas->__SET('color', $r->color);\n\t\t\t$almVentas->__SET('transmision', $r->transmision);\n\t\t\t$almVentas->__SET('direccion', $r->direccion);\n\t\t\t$almVentas->__SET('cilindraje', $r->cilindraje);\n\t\t\t$almVentas->__SET('carro_modelo', $r->carro_modelo);\n\t\t\t$almVentas->__SET('carro_marca', $r->carro_marca);\n\t\t\t$almVentas->__SET('pcompra', $r->pcompra);\n\t\t\t$almVentas->__SET('pventa', $r->pventa);\n\n\t\t\treturn $almVentas;\n\t\t} catch (Exception $e) {\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "public function traerProvinciasSelect(){\n //con la primera parte de la consulta genero un campo por defecto\n\t\t$sql = \"SELECT '0' as id, '' as text UNION SELECT pr.codigoProvincia as id, pr.provincia as text FROM provinciasCat pr order by id;\";\n\t\t$datos = $this->gestorBD->hacerConsulta($sql);\n\t\treturn $datos;\n }", "function nombreIva($idIva){\n if($idIva == NULL || $idIva == \"0\" || $idIva == \"\" || $idIva == \" \"){\n $idIva = 1;\n } \n $query = \"SELECT observacion FROM pg_iva WHERE idIva = \".$idIva.\"\";\n $rs = mysql_query($query);\n if(!$rs){ die (\"Error cargarDcto \\n\".mysql_error().$query.\"\\n Linea: \".__LINE__); }\n \n $row = mysql_fetch_assoc($rs);\n \n return $row['observacion'];\n \n}", "public function verProductosId($id){\n $sql = \"SELECT P.ID_prod , P.nom_prod , P.val_prod , P.stok_prod , P.estado_prod , \n C.nom_categoria, T_M.nom_medida, \n P.CF_categoria, P.CF_tipo_medida, \n FK_rut\n FROM producto P \n LEFT JOIN categoria C ON P.CF_categoria = C.ID_categoria \n LEFT JOIN tipo_medida T_M ON P.CF_tipo_medida = T_M.ID_medida \n LEFT JOIN det_producto DP ON P.ID_prod = DP.FK_prod\n WHERE ID_prod = :ID_prod \";\n $stm = $this->db->prepare($sql);\n $stm->bindValue(\":ID_prod\", $id, PDO::PARAM_STR );;\n $stm->execute();\n $result = $stm->fetchAll();\n return $result;\n }", "function listar_sh_interaccion($limit, $fecha_del, $fecha_al, $idestadistico_complejo_tag) {\n\n $tags = count($idestadistico_complejo_tag);\n if(!is_array($idestadistico_complejo_tag)){\n $aux_convert=$idestadistico_complejo_tag;\n $idestadistico_complejo_tag=null;\n $idestadistico_complejo_tag=array($aux_convert);\n } \n if ($tags > 0) {\n $ctag = \" SELECT tag1.tag FROM tag tag1 WHERE CONCAT(`tag1`.`idtag`,'---', `tag1`.`idmodulo_tag`) IN ( \";\n\n foreach ($idestadistico_complejo_tag as $valor) {\n if (strpos($valor, \"###\")) {\n $tags--;\n } else {\n $ctag.= \"'\" . $valor . \"',\";\n }\n }\n\n $ctag = substr($ctag, 0, -1) . \") \";\n\n $ctag = \"SELECT \n CONCAT(tag.idtag,'---',tag.`idmodulo_tag`)\n FROM \n tag, \n ($ctag) AS tag1\n WHERE\n tag.ruta LIKE concat('%/',`tag1`.tag,'%/') OR tag.tag = tag1.tag AND\n `tag`.`activo`=1\";\n\n if ($tags == 0) {\n $ctag = \"\";\n }\n } else {\n $ctag = \"\";\n }\n\n if ($ctag == \"\") {\n $consulta = \"SELECT count(*) AS total\n FROM \n `interaccion`\n WHERE\n `interaccion`.`activo`=1\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al' \";\n //echo $consulta;\n $result = $this->sql->consultar($consulta, \"sgrc\");\n\n $fila = mysql_fetch_array($result);\n\n $total = $fila[total];\n\n $consulta = \"select $total as total, `sh`.`idsh`, `sh`.`idmodulo` , `persona`.`apellido_m`,\n `persona`.`apellido_p`, `persona`.`nombre`, `persona`.`idpersona_tipo`,\n (\n\n SELECT \n count(distinct `interaccion`.idinteraccion, `interaccion`.idmodulo_interaccion)\n FROM\n `interaccion`\n INNER JOIN `interaccion_sh` ON (`interaccion`.`idinteraccion` = `interaccion_sh`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_sh`.`idmodulo_interaccion`)\n where (`interaccion_sh`.`idsh` = `sh`.`idsh`)\n AND (`interaccion_sh`.`idmodulo` = `sh`.`idmodulo`)\n \n AND `interaccion`.`activo`=1\n AND `interaccion_sh`.`activo`=1\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al'\n ) as 'cantidad' from `sh`\n INNER JOIN `persona` ON (`sh`.`idsh` = `persona`.`idpersona`)\n AND (`sh`.`idmodulo` = `persona`.`idmodulo`)\n WHERE `sh`.`activo`=1\n order by cantidad desc\";\n\n //echo $consulta;\n\n if ($limit > 0) {\n $consulta.=\" limit $limit\";\n }\n } else {\n $consulta = \"SELECT \n COUNT(DISTINCT(CONCAT(interaccion.idinteraccion,'---',interaccion.idmodulo_interaccion))) AS `total`\n FROM\n `interaccion`\n LEFT OUTER JOIN `interaccion_tag` ON (`interaccion`.`idinteraccion` = `interaccion_tag`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_tag`.`idmodulo_interaccion`)\n WHERE\n `interaccion`.`activo` = 1 \n AND CONCAT(interaccion_tag.idtag,'---',interaccion_tag.idmodulo_tag) IN ($ctag)\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del' \n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al' \";\n\n $result = $this->sql->consultar($consulta, \"sgrc\");\n\n $fila = mysql_fetch_array($result);\n\n $total = $fila[total];\n if ($total == '') {\n $total = '0';\n }\n $consulta = \"SELECT $total as total, `sh`.`idsh`, `sh`.`idmodulo` , `persona`.`apellido_m`,\n `persona`.`apellido_p`, `persona`.`nombre`, `persona`.`idpersona_tipo`,\n (\n\n SELECT \n count(distinct `interaccion`.idinteraccion, `interaccion`.idmodulo_interaccion)\n FROM\n `interaccion`\n INNER JOIN `interaccion_sh` ON (`interaccion`.`idinteraccion` = `interaccion_sh`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_sh`.`idmodulo_interaccion`)\n \t\t INNER JOIN `interaccion_tag` ON (`interaccion`.`idinteraccion` = `interaccion_tag`.`idinteraccion`)\n AND (`interaccion`.`idmodulo_interaccion` = `interaccion_tag`.`idmodulo_interaccion`) \n WHERE \n (`interaccion_sh`.`idsh` = `sh`.`idsh`)\n AND (`interaccion_sh`.`idmodulo` = `sh`.`idmodulo`)\n AND CONCAT(interaccion_tag.idtag,'---',interaccion_tag.idmodulo_tag) IN ($ctag)\n AND `interaccion`.`activo`=1\n AND `interaccion_sh`.`activo`=1\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`interaccion`.`fecha`,'%Y-%m-%d') <= '$fecha_al'\n ) AS 'cantidad' \n FROM `sh`\n INNER JOIN `persona` ON (`sh`.`idsh` = `persona`.`idpersona`)\n AND (`sh`.`idmodulo` = `persona`.`idmodulo`)\n WHERE \n `sh`.`activo`=1 \n order by cantidad desc\";\n\n // echo $consulta;\n\n if ($limit > 0) {\n $consulta.=\" limit $limit\";\n }\n }\n $result = $this->sql->consultar($consulta, \"sgrc\");\n\n return $result;\n }", "public function dohvatiTVreme($id){\n $rezultat = $this->ModelTermin->dohvatiTVreme($id);\n echo $rezultat;\n }", "function getTodosNumFromIdOV($id){\n\n\t\tglobal $visit;\n\n\t\t$obj= new ClsNumericData();\n\n\t\t$where =\" idov = '\".$id.\"'\";\n\n\t\t$strWhere =\" WHERE \". $where;\n\n\t\t$sql =\"SELECT \".$obj->getCampos().\" FROM \". $obj->getNombreTabla() . $strWhere ;\n\n\t\t$this->visit->debuger->out(\"getTodosNumFromIdOV: \". $obj->getNombreTabla() .\"-: $sql\");\n\n\t\t$collection = $this->execSQL( $sql, $obj );\n\n\t\treturn $collection;\n\n\t}", "function find_by_vij_id($VIJ_ID)\n {\n $conexion = new Conexion();\n $conn = $conexion->conectar();\n //a continuacion viene la consulta en este caso si recibe parametros\n $stmt = $conn->prepare(\"SELECT BOL_ID, BOL_NUMERO, BOL_FECHA, BOL_TIPO, PER_ID, VIJ_ID FROM boleto WHERE VIJ_ID <=\" . $VIJ_ID);\n //aqui van los parametros de la consulta, que es lo que reemplaza los simbolos de interrogacion en ese orden\n $stmt->execute(array($VIJ_ID));\n //aqui se obtiene una instancia de un array con objetos de la clase boleto\n $resultado = $stmt->fetchAll(PDO::FETCH_CLASS, \"boleto\");\n return $resultado;\n }", "public function getIdVacuna()\n {\n return $this->idVacuna;\n }", "function formulaires_trouver_objet_verifier($objet, $source, $id_source, $identifiant,$paramselecteur='',$retour='',$ancre=''){\n\t// on fait comment alors ??\n\t$id_koi =\"id_\".$objet;\n\n\tif (!_request('pid_objet')) {\n\t\treturn array(\n\t\t'message_erreur' => _T('trouvobjet:pas_de_identifiant'),\n\t\t\t);\n\t}\n}", "function mostrar_productoventa_aux($producto_id)\r\n {\r\n $sql = \"SELECT\r\n dv.venta_id, dv.`detalleven_cantidad`,\r\n dv.`producto_nombre`, u.usuario_nombre\r\n FROM\r\n detalle_venta_aux dv\r\n left join usuario u on dv.usuario_id = u.usuario_id\r\n WHERE dv.producto_id = $producto_id\";\r\n\r\n $producto = $this->db->query($sql)->result_array();\r\n return $producto;\r\n }", "public function ver($id) \n {\n $qry_usu = $this->M_incluye->obtener_extra($id);\n if($qry_usu->num_rows() > 0)\n {\n $extra = $qry_usu->row();\n $viajes = $this->M_viaje->listar_viaje()->result();\n $this->data['viajes'] = $viajes; \n \n $this->data['acc'] = CONSULTAR;\n $this->data['extra'] = $extra;\n $this->data['tipos_extras'] = $this->M_tipoextra->obtener_lista_tipoextra()->result(); \n $this->_vista('comun');\n }\n else\n {\n show_404();\n }\n }", "function vedi($id) {\n if (null == $id || !is_numeric($id)) {\n $this->set_view('errore');\n $this->view->set_message('id non valido');\n $this->view->render();\n die();\n }\n $this->set_view('commenti', 'vedi');\n $this->view->set_message($id);\n $this->view->set_db($this->db);\n $this->view->render();\n die();\n }", "function listarOtEquipo2($idot) {\n $query = $this->db->query(\" select * from vOtEquipoCliente where id_ot=$idot\");\n return $query->result();\n \n }", "function getIdMessaggioDiRiferimento();", "public function getMotivo_id()\n {\n return $this->motivo_id;\n }", "function camObtenerRadarID($id) {\n\treturn camConsultarDB(\"SELECT r.idRadares, r.Sigla, r.Nombre, r.Modelo, r.Fuente, p.Sigla as SiglaProvincia, pa.Pais, \" .\n\t\"r.Latitud, r.Longitud, p.nprov as Provincia \" .\n\t\"FROM radsat.radares r LEFT OUTER JOIN provincias p ON (r.idProvincias = p.OGR_FID) \" .\n\t\"INNER JOIN paises pa ON (r.idPaises = pa.idPaises) WHERE r.Activo = 1 AND \" . \n\t\"r.idRadares = \" . $id);\n}", "function mostrarVenta(){\n $id = $this->obtieneId_UltimaVentaGuardada();\n $this->getDatosVenta($id);\n }", "public function exibeItensVendidos($id)\n {\n $sql = \"SELECT i.*,p.descr FROM itensVendidos as i LEFT JOIN produtos as p ON i.idProduto = p.id WHERE i.idVenda = $id\";\n $BFetch=$this->conectaDB()->prepare($sql);\n $BFetch->execute();\n\n $j=[];\n $i=0;\n \n while($Fetch=$BFetch->fetch(PDO::FETCH_ASSOC)){\n $j[$i]=[\n \"id\"=>$Fetch['id'],\n \"produto\"=>$Fetch['descr'],\n \"quant\"=>$Fetch['quant'],\n \"unit\"=>$Fetch['unit'],\n \"subTotal\"=>$Fetch['subTotal']\n ];\n $i++;\n }\n\n header(\"Access-Control-Allow-Origin:*\");\n header(\"Content-type: application/json\");\n\n echo json_encode($j);\n //echo $sql;\n }", "public function getPetugasId(){\n \t\t$id = $_POST['id'];\n \t\techo json_encode($this->M_master->getPetugasId($id));\n \t}", "public function buscarVentaID($id)\n {\n error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));\n session_start();\n\n $bd = ControladorBD::getControlador();\n $bd->abrirBD();\n\n $consulta = \"select * from ventas where idVenta = :idVenta\"; //Solo EL ID\n $parametros = array(':idVenta' => $id);\n\n $res = $bd->consultarBD($consulta, $parametros);\n $filas = $res->fetchAll(PDO::FETCH_OBJ);\n\n //Recogemos el id solamente y se pone 0 porque lo unico que queremos recoger es el ID\n if (count($filas) > 0) {\n $venta = new Venta(\n $filas[0]->idVenta, \n $filas[0]->fecha, \n $filas[0]->total,\n $filas[0]->subtotal, \n $filas[0]->iva, \n $filas[0]->nombre, \n $filas[0]->email, \n $filas[0]->telefono, \n $filas[0]->direccion,\n $filas[0]->titular, \n $filas[0]->tarjeta);\n\n $bd->cerrarBD();\n return $venta;\n } else {\n return null;\n }\n\n }", "function traerLotes($arti_id, $depo_id){\n\t\tlog_message('DEBUG','#TRAZA | TRAZ-COMP-ALMACEN | Movimdeposalida | traerLotes');\n\t\t$url = REST_ALM.'/deposito/'.$depo_id.'/articulo/'.$arti_id.'/lote/list';\n\t\t$aux = $this->rest->callAPI(\"GET\",$url);\n\t\t$aux = json_decode($aux['data']);\n\t\treturn $aux->lotes->lote;\n\t}", "public function addVeiculoId()\n {\n $element = $this->getHiddenElement('veiculo_id');\n $this->addElement($element);\n }", "public function Ver_Agotados($id_taquilla){\r\n\t\t$sql = \"SELECT ver_numeros_agotados FROM impresora_taquillas WHERE id_taquilla = \".$id_taquilla.\"\";\r\n\t\t$result= $this->vConexion->ExecuteQuery($sql);\t\t\r\n\t\t$roww= $this->vConexion->GetArrayInfo($result);\r\n\t\treturn $roww[\"ver_numeros_agotados\"];\r\n\t\t\r\n\t}", "function sommaire_intertitre_ancre($titre, $h, $ancres_vues = array()) {\tif ($id = extraire_attribut($h[1], 'id')) {\n\t\treturn $id;\n\t}\n\n\t// generer une ancre a partir du titre\n\t$ancre = trim(textebrut($titre));\n\t$ancre = translitteration($ancre);\n\t$ancre = couper($ancre, 80);\n\t$ancre = preg_replace(',\\W+,', '-', $ancre);\n\t$ancre = trim($ancre, '-');\n\tif (!preg_match(',^[a-z],i', $ancre)) {\n\t\t$ancre = \"t$ancre\";\n\t}\n\n\tif (!in_array($ancre, $ancres_vues)) {\n\t\treturn $ancre;\n\t}\n\n\t$md5 = substr(md5($titre), 0, 4);\n\tif (!in_array(\"$ancre-$md5\", $ancres_vues)) {\n\t\treturn \"$ancre-$md5\";\n\t}\n\n\t$i = 2;\n\twhile (in_array(\"$ancre-$i\", $ancres_vues)) {\n\t\t$i++;\n\t}\n\treturn \"$ancre-$i\";\n}", "public function verVivienda($id)\n {\n return \"... en contruccion\";\n }", "public function visualizaSocitacaoVereadores(int $id)\n {\n $dataDia = date(\"Y-m-d\");\n\n $data = $this->db->select('*')\n ->from('tbl_solicita_participacao')\n ->join('tbl_usuarios', 'tbl_usuarios.us_id = tbl_solicita_participacao.sv_fk_vereador ')\n ->where('sv_fk_camera', $id)\n ->where('sv_data_solicita >=', $dataDia)\n ->order_by('sv_id', 'DESC')\n ->group_by(\"sv_fk_vereador\")\n ->get()->result();\n\n echo json_encode($data);\n }", "public function IngredientesPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \"SELECT\n\t\tingredientes.idingrediente,\n\t\tingredientes.codingrediente,\n\t\tingredientes.nomingrediente,\n\t\tingredientes.codmedida,\n\t\tingredientes.preciocompra,\n\t\tingredientes.precioventa,\n\t\tingredientes.cantingrediente,\n\t\tingredientes.stockminimo,\n\t\tingredientes.stockmaximo,\n\t\tingredientes.ivaingrediente,\n\t\tingredientes.descingrediente,\n\t\tingredientes.lote,\n\t\tingredientes.fechaexpiracion,\n\t\tingredientes.codproveedor,\n\t\tmedidas.nommedida,\n\t\tproveedores.cuitproveedor,\n\t\tproveedores.nomproveedor\n\tFROM (ingredientes INNER JOIN medidas ON ingredientes.codmedida=medidas.codmedida)\n\tLEFT JOIN proveedores ON ingredientes.codproveedor=proveedores.codproveedor WHERE ingredientes.codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(decrypt($_GET[\"codingrediente\"])));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function generer_entete()\r\n\t{\r\n\t\t//==================================================================\r\n\t\t// Count Tags\r\n\t\t//==================================================================\r\n\t\t$sql = 'SELECT COUNT(1) as total\r\n\t\t\t\t\tFROM `'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_tags']['name'].'` \r\n\t\t\t\t\tWHERE ID = '.$this->c_id_temp.' \r\n\t\t\t\t\tAND Version = '.$this->c_version.' \r\n\t\t\t\t\tAND (objet = \"ifiche\" OR (id_src IS NOT NULL))';\r\n\t\t\t\r\n\t\t$requete = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\t\t$nbr_tag = mysql_result($requete,0,0);\r\n\t\t\t\r\n\t\t$tag = 'Tag (<span id=\"nbr_tag\">'.$nbr_tag.'</span>)';\r\n\t\t//==================================================================\r\n\r\n\t\t//==================================================================\r\n\t\t// Count Varin\r\n\t\t//==================================================================\r\n\t\t$sql = 'SELECT COUNT(IDP)\r\n\t\t\t\t\tFROM '.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].' \r\n\t\t\t\t\tWHERE id_fiche = '.$this->c_id_temp.' \r\n\t\t\t\t\tAND num_version = '.$this->c_version.' \r\n\t\t\t\t\tAND TYPE=\"IN\"';\r\n\r\n\t\t$requete = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\t\t$nbr_in = mysql_result($requete,0,0);\r\n\r\n\t\t$nbr_varin = $_SESSION[$this->c_ssid]['message'][59].' (<span id=\"onglet_nbr_varin\">'.$nbr_in.'</span>)';\r\n\t\t//==================================================================\r\n\t\t\r\n\t\t//==================================================================\r\n\t\t// Count Varout + VarinExt\r\n\t\t//==================================================================\r\n\t\t$sql = 'SELECT COUNT(IDP)\r\n\t\t\t\t\tFROM '.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].' \r\n\t\t\t\t\tWHERE id_fiche = '.$this->c_id_temp.' \r\n\t\t\t\t\tAND num_version = '.$this->c_version.' \r\n\t\t\t\t\tAND TYPE IN (\"OUT\",\"EXTERNE\")';\r\n\t\t$requete = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\t\t$nbr_out = mysql_result($requete,0);\r\n\r\n\t\t$nbr_varout = $_SESSION[$this->c_ssid]['message'][45].' (<span id=\"onglet_nbr_varout\">'.$nbr_out.'</span>)';\r\n\t\t//==================================================================\r\n\r\n\t\t//==================================================================\r\n\t\t// Generate header tab\r\n\t\t//==================================================================\r\n\t\tif($this->c_type == __FICHE_VISU__)\r\n\t\t{\r\n\t\t\t// Display mode\r\n\t\t\t$entete = 'a_tabbar.addTab(\"tab-level1\",\"<div class=\\\"onglet_icn_header\\\">'.$_SESSION[$this->c_ssid]['message'][41].'</div>\",\"'.rawurlencode($this->generer_onglet_entete()).'\",\"event_click_onglet(\\'tab-level1\\');\");';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Update mode\r\n\t\t\t$entete = 'a_tabbar.addTab(\"tab-level1\",\"<div class=\\\"onglet_icn_header\\\">'.$_SESSION[$this->c_ssid]['message'][41].'</div>\",\"'.rawurlencode($this->generer_onglet_entete()).'\",\"event_click_onglet(\\'tab-level1\\');maj_nbr_param(\\'vimofy_liste_param\\');maj_nbr_param(\\'vimofy_lst_tag_objassoc\\');maj_nbr_param(\\'vimofy_infos_recuperees\\');document.getElementById(\\'modifie_par\\').focus();\");';\r\n\t\t}\r\n\t\t//==================================================================\r\n\t\t\r\n\t\t//==================================================================\r\n\t\t// Generate header child tab\r\n\t\t//==================================================================\r\n\t\t$entete .= 'var head_tabbar = new iknow_tab(\\'head_tabbar\\');';\r\n\t\tif($this->c_type == __FICHE_VISU__)\r\n\t\t{\r\n\t\t\t// Display mode\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_1\",\"<div class=\\\"onglet_icn_general\\\"></div>'.rawurlencode($_SESSION[$this->c_ssid]['message'][42]).'\",\"'.rawurlencode($this->generate_tab_general()).'\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_1\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());charger_var_dans_url();\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_2\",\"<div class=\\\"onglet_icn_required\\\">'.rawurlencode($_SESSION[$this->c_ssid]['message'][43]).'\",\"'.rawurlencode($this->generer_onglet_prerequis()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_2\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());charger_var_dans_url();\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_3\",\"<div class=\\\"onglet_icn_varin\\\">'.rawurlencode($nbr_varin).'\",\"'.rawurlencode($this->generate_tab_varin()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_3\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());charger_var_dans_url();\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_4\",\"<div class=\\\"onglet_icn_varout\\\">'.rawurlencode($nbr_varout).'\",\"'.rawurlencode($this->generate_tab_varout()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_4\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());charger_var_dans_url();\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_5\",\"<div class=\\\"onglet_icn_tag\\\">'.rawurlencode($tag).'\",\"'.rawurlencode($this->generer_onglet_tag()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_5\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());charger_var_dans_url();\");';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Update mode\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_1\",\"<div class=\\\"onglet_icn_general\\\"></div>'.rawurlencode($_SESSION[$this->c_ssid]['message'][42]).'\",\"'.rawurlencode($this->generate_tab_general()).'\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_1\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_2\",\"<div class=\\\"onglet_icn_required\\\">'.rawurlencode($_SESSION[$this->c_ssid]['message'][43]).'</div>\",\"'.rawurlencode($this->generer_onglet_prerequis()).'\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_2\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_3\",\"<div class=\\\"onglet_icn_varin\\\">'.rawurlencode($nbr_varin).'\",\"'.rawurlencode($this->generate_tab_varin()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_3\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_4\",\"<div class=\\\"onglet_icn_varout\\\">'.rawurlencode($nbr_varout).'\",\"'.rawurlencode($this->generate_tab_varout()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_4\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());\");';\r\n\t\t\t$entete .= 'head_tabbar.addTab(\"tab-level1_5\",\"<div class=\\\"onglet_icn_tag\\\">'.rawurlencode($tag).'\",\"'.rawurlencode($this->generer_onglet_tag()).'</div>\",\"set_tabbar_actif(a_tabbar.getActiveTab(),\\'tab-level1_5\\',retourne_tab_etape_actif(),retourne_tab_etape_ligne_actif());\");';\r\n\t\t}\r\n\t\t//==================================================================\r\n\t\t\r\n\t\treturn $entete;\r\n\t}", "public function cambiarOrdenDeVenta()\n\t{\n\t\t$rid = (int) $_POST['remate_id']; //debe ser el id del remate\n\t\t$lugar_inicial = (int) $_POST['origen'];\n\t\t$lugar_actual = (int) $_POST['destino'];\n\t\t$cardinalidad = (int) $_POST['cardinal_re'];\n\t\tif($lugar_actual <= $cardinalidad && $lugar_actual > 0)\n\t\t{\n\t\t\tif($lugar_actual < $lugar_inicial)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * La consulta modifica todas las posiciones de los lotes\n\t\t\t\t * entre la posicion original y la que fue movido.\n\t\t\t\t */\n\t\t\t\t$sql = \"UPDATE lotes SET orden_lo=(CASE WHEN orden_lo+1>$lugar_inicial THEN $lugar_actual ELSE orden_lo+1 END) WHERE remate_id=$rid AND orden_lo BETWEEN $lugar_actual AND $lugar_inicial\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Se decrementa la posicion del lote\n\t\t\t\t$sql = \"UPDATE lotes SET orden_lo=(CASE WHEN orden_lo-1<$lugar_inicial THEN $lugar_actual ELSE orden_lo-1 END) WHERE remate_id=$rid AND orden_lo BETWEEN $lugar_inicial AND $lugar_actual\";\n\t\t\t}\n\t\t$rows = $this->_db->exec($sql);\n\t\techo \"Consulta realizada con exito. \", \"Filas afectadas: $rows\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ri = $rid;\n\t\t\t$ch = \"nuevo\";\n\t\t\theader(\"Location: ../nuevo-lote.php?subasta=$ri&lote=$ch\");\n\t\t\texit;\n\t\t}\n\t}", "public function setVida($nuevo){\n $this->vida=$nuevo;\n }", "function getHijosFromValorControladoOV($idsec,$controladosAnteriores,$idov){\n\n\t\tglobal $visit;\n\n\t\t$dictFilasSectionData = $visit->options->sectionData;\n\n\t\t$obj= new ClsControlledData();\n\n\t\t$idsAnteriores=\"\";\n\n\t\tif ($controladosAnteriores!=\"\"){\n\n\t\t\twhile (list ($clave, $temp) = each ($controladosAnteriores)) {\n\n\t\t\t\t\t/*if ($temp[0]!=null && $temp[1]!=null ){\n\n\t\t\t\t\t$idSeccion=$temp[0];\n\n\t\t\t\t\t$valorSeccion=$temp[1];*/\n\n\t\t\t\tif ($temp!=null && $clave!=null){ \n\n\t\t\t\t\t$idSeccion = $clave;\n\n\t\t\t\t\t$valorSeccion =$temp;\n\n\t\t\t\t\t//$seccion=$this->getSectionDataId($idSeccion);\n\n\t\t\t\t\t$seccion=$dictFilasSectionData[$idSeccion];\n\n\t\t\t\t\tif ($seccion->tipo_valores==\"C\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from controlled_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"N\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from numeric_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"T\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from text_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} else if ($seccion->tipo_valores==\"F\") {\n\n\t\t\t\t\t\t$sqlData= \"select * from date_data where idseccion=\".$idSeccion.\" and value='\".$valorSeccion.\"' and idov=\".$idov ;\n\n\t\t\t\t\t} \n\n\t\t\t\t\t///echo $sqlData.\"CCCCCCCCCCCCCCCCcc\";\n\n\t\t\t\t\tif ($idsAnteriores!=\"\") $sqlData.= \" AND idov in (\".$idsAnteriores.\") \";\n\n\t\t\t\t\t$temps = $this->conn->GetAll($sqlData);\n\n\t\t\t\t\t$idsAnterioresCopia=\"\";\n\n\t\t\t\t\t//var_dump($temps);\n\n\t\t\t\t\twhile (list ($clave, $tempC) = each ($temps)) {\n\n\t\t\t\t\t\t$recurso= $this->getResourcesId($tempC[\"idrecurso\"]);\n\n\t\t\t\t\t\tif ($recurso->visible==\"S\") {\n\n\t\t\t\t\t\t$idsAnterioresCopia.= $tempC[\"idov\"].\",\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($idsAnterioresCopia!=\"\") {\n\n\t\t\t\t\t$idsAnteriores = substr( $idsAnterioresCopia, 0, strlen($idsAnterioresCopia)-2);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$recursosPublicos = $this->getRecursosVisiblesFromOV($idov);\n\n\t\t$idsRecursosPublicosCopia = \"\";\n\n\t\twhile (list ($clave, $rp) = each ($recursosPublicos)) {\n\n\t\t\n\n\t\t$idsRecursosPublicosCopia .= $rp->id.\",\";\n\n\t\t}\n\n\t\tif ($idsRecursosPublicosCopia!=\"\") {\n\n\t\t\t\t$idsRecursosPublicos = substr( $idsRecursosPublicosCopia, 0, strlen($idsRecursosPublicosCopia)-1);\n\n\t\t}\n\n\t\t//var_dump($recursosPublicos);\n\n\t\t$where =\" idseccion = \".$idsec ;\n\n\t\tif ($idsRecursosPublicos!=\"\") $where.= \" AND idrecurso in (\".$idsRecursosPublicos.\") \";\n\n\t\tif ($idsAnteriores!=\"\") $where.= \" AND idov in (\".$idsAnteriores.\") \";\n\n\t\telse $where .= \" AND idov = \".$idov ;\n\n\t\t$strWhere =\" WHERE \". $where;\n\n\t\t\t\t//EVITAR VALORES A NULL\n\n\t\t$strWhere = $strWhere. \" AND value IS NOT NULL \";\n\n\t\t$sql =\"SELECT value, count(*) as cuenta, MIN(idov) as idov FROM \". $obj->getNombreTabla() . $strWhere.\" group by value order by value \" ;\n\n\t\t$this->visit->debuger->out(\"getHijosFromValorControlado: \". $obj->getNombreTabla() .\"-: $sql\");\n\n\t\t$collection = $this->execSQL( $sql, $obj );\n\n\t\t//var_dump($collection);\n\n\t\treturn $collection;\n\n\t}", "function buscarItensVenda($cod)\n {\n $venda = new Vendas();\n $result = $venda->buscaItensVenda($cod);\n return $result;\n }", "function getTodosTextFromIdOV($id){\n\n\t\tglobal $visit;\n\n\t\t$obj= new ClsTextData();\n\n\t\t$where =\" idov = '\".$id.\"'\";\n\n\t\t$strWhere =\" WHERE \". $where;\n\n\t\t$sql =\"SELECT \".$obj->getCampos().\" FROM \". $obj->getNombreTabla() . $strWhere ;\n\n\t\t$this->visit->debuger->out(\"getTodosTextFromIdOV: \". $obj->getNombreTabla() .\"-: $sql\");\n\n\t\t$collection = $this->execSQL( $sql, $obj );\n\n\t\treturn $collection;\n\n\t}", "function getIdasociada() { return $this->idasociada;\n }", "function getDatosVistaRapida() {\n\t\t\n\t\t$arr_orden = array();\n\t\t\n\t\t/* LISTA DE OBJETIVOS */\n\t\t$i = count($this->__objetivos);\n\t\t$j = 0;\n\t\tforeach (Utiles::getElementsByArrayTagName($this->dom, array(\"detalles\", \"detalle\")) as $detalle_obj) {\n\t\t\t$objetivo = & $this->__objetivos[$detalle_obj->getAttribute('objetivo_id')];\n\t\t\t\n\t\t\t$arr_orden[$objetivo->objetivo_id] = $i;\n\t\t\t\n\t\t\t/* LISTA DE MONITORES DEL OBJETIVO */\n\t\t\tforeach (Utiles::getElementsByArrayTagName($detalle_obj, array(\"detalles\", \"detalle\")) as $detalle_mon) {\n\t\t\t\t\n\t\t\t\t/* LISTA DE PASOS DEL OBJETIVO POR MONITOR */\n\t\t\t\tforeach (Utiles::getElementsByArrayTagName($detalle_mon, array(\"detalles\", \"detalle\")) as $detalle_pas) {\n\t\t\t\t\tif (isset($objetivo->__pasos[$detalle_pas->getAttribute('paso_orden')]) and isset($this->__monitores[$detalle_mon->getAttribute(\"nodo_id\")])) {\n\t\t\t\t\t\t$paso = & $objetivo->__pasos[$detalle_pas->getAttribute('paso_orden')];\n\t\t\t\t\t\t$monitor = clone $this->__monitores[$detalle_mon->getAttribute(\"nodo_id\")];\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* ULTIMO EVENTO DEL PASO */\n\t\t\t\t\t\tforeach (Utiles::getElementsByArrayTagName($detalle_pas, array(\"datos\", \"dato\")) as $dato_pas) {\n\t\t\t\t\t\t\t$this->tiene_datos = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$codigo = clone $this->__codigos[$dato_pas->getAttribute('codigo_id')];\n\t\t\t\t\t\t\t$codigo->duracion = $dato_pas->getAttribute('duracion');\n\t\t\t\t\t\t\t$codigo->respuesta = $dato_pas->getAttribute('respuesta');\n\t\t\t\t\t\t\t$codigo->fecha = $dato_pas->getAttribute('fecha');\n\t\t\t\t\t\t\t$monitor->__eventos[] = $codigo;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($codigo->color == \"d3222a\") {\n\t\t\t\t\t\t\t\t$arr_orden[$objetivo->objetivo_id] = $j;\n\t\t\t\t\t\t\t\t$objetivo->estado = 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$paso->__monitores[$monitor->monitor_id] = $monitor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t\t$j++;\n\t\t}\n\t\tarray_multisort($arr_orden, $this->__objetivos);\n\t}", "function constroi_vaga($r_vag_codigo, $r_vag_usu_codigo, $r_vag_cid_codigo, $r_vag_cat_codigo, $r_vag_nome, $r_vag_email, $r_vag_descricao, $r_vag_salario, $r_vag_dt_inicio, $r_vag_dt_termino, $r_vag_ativo, $r_vag_empresa, $r_vag_qtd, $r_vag_destaque, $r_vag_exclusivo, $r_vag_link, $r_vag_telefone, $r_vag_tipo, $r_vag_cidade_nome, $r_vag_estado_nome) {//essa função é responsável por construir a estrutura em html da vaga\n if ($r_vag_ativo) {//só mostra vaga se setiver ativa\n $local_logomarca = \"http://www.empregue-me.com/upload/gfx/vagas/vag_\" . $r_vag_codigo . \".jpeg\";\n\n $logo_path = \"../upload/gfx/vagas/vag_\" . $r_vag_codigo . \".jpeg\";\n\n\n if (!url_exists($local_logomarca)) {\n $logo_path = \"gfx/empregueme.jpeg\";\n }\n\n //se nao tiver nome da empresa, coloque como nome do empregue-me\n if ($r_vag_empresa == \"\") {\n $r_vag_empresa = \"empregue-me\";\n }\n\n //sql com quantidade de cadidatos por vagas\n $mysqli = mysqli_full_connection();\n $qry = \"SELECT count(*) as cont FROM vagas vag,curriculos_vagas currVag \n WHERE currVag.vag_codigo = vag.vag_codigo\n AND vag.vag_codigo = ?\";\n $stmt = $mysqli->prepare($qry);\n $stmt->bind_param('i', $r_vag_codigo);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($r_vag_candidatos);\n while ($stmt->fetch()) {\n //pluraliza ou nao a palavra candidatos\n if ($r_vag_estado_nome != \"SP\") {\n if ($r_vag_candidatos == 1) {\n $palavra_cand = $r_vag_candidatos . \" candidato\";\n } else {\n $palavra_cand = $r_vag_candidatos . \" candidatos\";\n }\n } else {\n $palavra_cand = \"\";\n }\n }\n $stmt->close();\n\n\n /* //verifica regime de contratação\n switch ($r_vag_tipo) {\n case 'tem':\n $r_vag_tipo = \"Temporário\";\n break;\n\n case 'clt':\n $r_vag_tipo = \"CLT\";\n break;\n\n case 'fre':\n $r_vag_tipo = \"Freelancer\";\n break;\n }\n */\n\n //verifica se o usuário é membro VIP para mostrar email\n $mostra_email = '';\n\n if (isset($_SESSION['membro_vip_ativo'])) {\n if ($_SESSION['membro_vip_ativo'] == 1) {\n $mostra_email = '<strong>E-mail:</strong> ' . $r_vag_email . '<br />';\n } else {\n $mostra_email = '<strong>E-mail:</strong><a href=\"membro_vip.php\"> <span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n } else {\n $mostra_email = '<strong>E-mail:</strong><a href=\"membro_vip.php\"> <span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n\n //verifica se precisa mostrar telefone\n if ($r_vag_telefone == \"\") {\n $mostra_telefone = \"\";\n } else {\n if (isset($_SESSION['membro_vip_ativo'])) {\n //verifica se o usuário é membro VIP\n if ($_SESSION['membro_vip_ativo'] == 1) {\n $mostra_telefone = '<strong>Telefone:</strong> ' . $r_vag_telefone . '<br />';\n } else {\n $mostra_telefone = '<strong>Telefone:</strong> \n\t\t\t\t<a href=\"membro_vip.php\"><span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n } else {\n $mostra_telefone = '<strong>Telefone:</strong> \n\t\t\t\t<a href=\"membro_vip.php\"><span class=\"vermelho_destaque\">Conteúdo exclusivo para VIPs - Clique Aqui e Crie Sua Conta</span></a><br />';\n }\n }\n\n\n\n //ajusta data\n $data = explode('-', $r_vag_dt_inicio);\n $data_ajustada = $data[2] . \"/\" . $data[1] . \"/\" . $data[0];\n\n\n //ajusta salário\n if ($r_vag_salario == \"0.00\") {\n $r_vag_salario = \"À combinar\";\n } else {\n $r_vag_salario = \"R$ \" . $r_vag_salario; //ajusta com simbolo de R$\t\n }\n if (empty($_SESSION['login']) || !isset($_SESSION['login'])) {\n if (isset($_SESSION['adwords'])) {\n $r_curriculo = '<a class=\"candidatar\" href=\"main.php?freetrial=true\">Candidatar</a>';\n } else {\n $r_curriculo = '<a class=\"candidatar\" href=\"index.php?aviso=1\">Candidatar</a>';\n }\n } else {\n //vamos verificar se é vaga VIP\n //verifica curriculo e mostra se ele é habilitado ou não para enviar para vaga\n if ($_SESSION['curriculo'] == 0) { // curriculo = 0 o candidato nao criou o curriculo\n if ($_SESSION['tipo_conta'] == 0) {\n $r_curriculo = '<a class=\"candidatar\" href=\"main.php?mostra_alerta=semcv\">Candidatar</a>';\n } else {\n $r_curriculo = \"\";\n }\n } else {\n //verifica se o candidato ja enviou currículo\n $qry = \"SELECT count(*) as qtd FROM curriculos_vagas where curr_codigo = ? and vag_codigo = ?\";\n $stmt = $mysqli->prepare($qry);\n $curriculo = $_SESSION['curriculo'];\n $stmt->bind_param('ii', $curriculo, $r_vag_codigo);\n $stmt->execute();\n $stmt->bind_result($r_qtd);\n while ($stmt->fetch()) {\n \n }\n if ($r_qtd == 1) { //se o resultado for 1 o candidato nao pode se candidatar, caso contrario ele está apto.\n $r_curriculo = '<h4 style=\"color:#6ac824;\">Voce já se candidatou a essa vaga</h4>';\n } else {\n if ($r_vag_exclusivo == 1 && $_SESSION['membro_vip_ativo'] != 1) {//Se a vaga é exclusiva e o cara não é VIP\n $r_curriculo = '<a class=\"candidatar\" href=\"membro_vip.php\" target=\"_blank\">Seja VIP</a>'; //mostra pra ser VIP\n } else {// se não for exclusiva, pode candidatar\n //$link = \"http://localhost/empre941/novo/curriculo/envio/envia_curriculo/\" . $_SESSION['userid'] . \"/\" . $r_vag_codigo; //offline\n // $link = \"http://www.empregue-me.com/novo/curriculo/envio/envia_curriculo/\" . $_SESSION['userid'] . \"/\" . $r_vag_codigo; //online\n //ajusta uma ID junto com o link só para identificar qual mensagem pós envio deveremos mostrar ao usuário\n // $r_curriculo = '<a class=\"candidatar\" href=\"' . $link . '\">Candidatar</a>';\n //candidatar via ajax\n $r_curriculo = '\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"userid\" value=\"' . $_SESSION['userid'] . '\"/>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"vaga_codigo\" value=\"' . $r_vag_codigo . '\"/>\n\t\t\t\t\t\t\t<a class=\"candidatar\" href=\"javascript:void(0)\" >Candidatar</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t';\n }\n }\n }\n }\n\n//Verifica se é vaga exclusiva... se for, vamos mudar o layout\n if ($r_vag_exclusivo == 1) {//VAGA EXCLUSIVA\n $layout_vaga = '<div class=\"vaga_exclusiva\">';\n $vaga_logo = 'vaga_logo_exclusiva';\n $vaga_detalhe = 'vaga_detalhe_exclusiva';\n $vaga_settings = 'coroa.png';\n }\n if ($r_vag_exclusivo == 0) {//VAGA COMUM\n $layout_vaga = '<div class=\"vaga\">'; //se nao for, mostra layout padrão\n $vaga_logo = 'vaga_logo';\n $vaga_detalhe = 'vaga_detalhe';\n $vaga_settings = 'settings2.png';\n }\n\n\n if ($r_vag_destaque == 1) {//VAGA DESTAQUE\n $layout_vaga = '<div class=\"vaga_destaque\">';\n $vaga_logo = 'vaga_logo_destaque';\n $vaga_detalhe = 'vaga_detalhe_destaque';\n $vaga_settings = 'vaga_destaque.png';\n }\n\n $envia_mensagem = ''; //nao pode mostrar para quem n esta logado\t\n if (isset($_SESSION['login'])) {\n $envia_mensagem = '<a href=\"envia_mensagem_empresa.php?id=' . $r_vag_codigo . '\" class=\"btm_enviar_msg\">Enviar Mensagem</a>';\n }\n\n\n //--->> constroi vaga\n echo '<!--inicia VAGA-->\n\t' . $layout_vaga . '<a name=\"vaga' . $r_vag_codigo . '\"></a>\n\n<a href=\"vaga.php?id=' . $r_vag_codigo . '\" target=\"new\">\n\n\t\t\t\t<strong>Empresa: </strong> ' . $r_vag_empresa . '<br />\n\t\t\t\t<strong>Local: </strong> ' . $r_vag_cidade_nome . ', ' . $r_vag_estado_nome . '<br />\n\t\t\t\t<strong>Salário: </strong>' . $r_vag_salario . '<br />\t\t\n\t\t\t\t<strong>Regime de contratação: </strong> ' . $r_vag_tipo . '<br />\n\t\t\t\t' . $mostra_telefone . '\n\t\t\t\t' . $mostra_email . '\n\t\t\t\t<strong>Descrição: </strong> ' . $r_vag_descricao . '<br />\n\t\t</a>\n\n\t\t<div class=\"vaga_data\">Data: ' . $data_ajustada . '</div>\n\n\t\t\n\t\t<div class=\"' . $vaga_logo . '\">\n \t<img src=\"' . $logo_path . '\" class=\"vaga_logo_img\" width=\"38\" height=\"38\"/>\n </div>\n \t<div class=\"' . $vaga_detalhe . '\"></div>\n \t<div class=\"vaga_titulo\"><strong><span class=\"vermelho_destaque\">' . $r_vag_nome . '</span></strong></div>\n \n \n <div class=\"vaga_candidatos\"><span class=\"vermelho_destaque\"><strong>' . $palavra_cand . '</strong></span></div>\n \n <div class=\"vaga_settings\"><img src=\"gfx/ui/' . $vaga_settings . '\" /></div>\n \n\t\n\t\t\n\t\t<!----\n\t\t<div class=\"fb_pos\">\n\t\t<div class=\"fb-like\" data-href=\"https://www.empreguemeagora.com.br/vaga.php?id=' . $r_vag_codigo . '\" data-layout=\"button\" data-action=\"like\" data-show-faces=\"true\" data-share=\"true\"></div>\n\t\t</div>\n\t\t-->\n\t\t\n ' . $r_curriculo . '\n\t\t\n' . $envia_mensagem . '\n \n \n \n \t\n <!--máximo de 620 characteres aqui na descrição-->\n \n \n \n </div>\n\n<!--termina VAGA-->';\n // <div class=\"vaga_conteudo\">\t\n }\n}", "function troviNovajnVortojn($id) {\r\n\t$query = \"select id,tago,monato,jaro,vorto,dosiero from sam_vortoj where id>=\".$id;\r\n\tmysql_select_db(\"sam\");\r\n\t$result = mysql_query($query) or die (\"SELECT : Invalid query :\".$query);\r\n\treturn $result;\r\n}", "public function verificaVinculos($id){\n\t\treturn \"0\";\n\t}", "function contar_interacciones_sh($fecha_del, $fecha_al, $idestadistico_complejo_tag) {\n //echo $consulta;\n $tags = count($idestadistico_complejo_tag);\n if(!is_array($idestadistico_complejo_tag)){\n $aux_convert=$idestadistico_complejo_tag;\n $idestadistico_complejo_tag=null;\n $idestadistico_complejo_tag=array($aux_convert);\n }\n if ($tags > 0) {\n $ctag = \" SELECT tag1.tag FROM tag tag1 WHERE CONCAT(`tag1`.`idtag`,'---', `tag1`.`idmodulo_tag`) IN ( \";\n\n foreach ($idestadistico_complejo_tag as $valor) {\n if (strpos($valor, \"###\")) {\n $tags--;\n } else {\n $ctag.= \"'\" . $valor . \"',\";\n }\n }\n\n $ctag = substr($ctag, 0, -1) . \") \";\n\n $ctag = \"SELECT \n CONCAT(tag.idtag,'---',tag.`idmodulo_tag`)\n FROM \n tag, \n ($ctag) AS tag1\n WHERE\n tag.ruta LIKE concat('%/',`tag1`.tag,'%/') OR tag.tag = tag1.tag AND\n `tag`.`activo`=1\";\n\n if ($tags == 0) {\n $ctag = \"\";\n }\n } else {\n $ctag = \"\";\n }\n if ($ctag == \"\") {\n $consulta = \"SELECT \n count(*) AS cantidad\n FROM `sh`\n LEFT JOIN persona\n ON persona.idpersona=sh.idsh and persona.idmodulo=sh.idmodulo\n WHERE \n `sh`.`activo`=1\n AND DATE_FORMAT(`persona`.`fecha_a`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`persona`.`fecha_a`,'%Y-%m-%d') <= '$fecha_al'\";\n } else {\n $consulta = \"SELECT \n count(DISTINCT(CONCAT(sh.idsh,'---',sh.idmodulo))) AS cantidad\n FROM\n `sh`\n LEFT OUTER JOIN `persona` ON (`persona`.`idpersona` = `sh`.`idsh`)\n AND (`persona`.`idmodulo` = `sh`.`idmodulo`)\n LEFT OUTER JOIN `persona_tag` ON (`persona`.`idpersona` = `persona_tag`.`idpersona`)\n AND (`persona`.`idmodulo` = `persona_tag`.`idmodulo`)\n WHERE \n `sh`.`activo`=1\n AND CONCAT(persona_tag.idtag,'---',persona_tag.idmodulo_tag) IN ($ctag)\n AND DATE_FORMAT(`persona`.`fecha_a`,'%Y-%m-%d') >= '$fecha_del'\n AND DATE_FORMAT(`persona`.`fecha_a`,'%Y-%m-%d') <= '$fecha_al'\";\n }\n\n echo $consulta;\n $result = $this->sql->consultar($consulta, \"sgrc\");\n\n return $result;\n }", "function remito_vista($id, $id_cliente = NULL) {\n\t\t$db['remitos']\t\t\t= $this->remitos_model->getRemito($id);\n\t\t$db['remitos_detalle']\t= $this->remitos_detalle_model->getRemitos($id);\n\t\t$db['remitos_dev']\t\t= $this->remitos_detalle_model->getRemitos($id, 'dev');\n\t\t$db['impresiones']\t\t= $this->config_impresion_model->select(TIPOS_COMPROBANTES::PRESUPUESTO);\n\t\t\n\t\tif($id_cliente === NULL) {\n\t\t\t$remitos = $db['remitos'];\n\t\t\t\n\t\t\tforeach ($remitos as $row) {\n\t\t\t\t$id_cliente = $row->id_cliente;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$datos = array(\n\t\t\t'id_cliente'=> $id_cliente,\n\t\t\t'tipo'\t\t=> FORMAS_PAGOS::EFECTIVO,\n\t\t\t'estado'\t=> ESTADOS::ALTA\n\t\t);\n\t\t\t\n\t\t$db['presupuestos']\t\t= $this->presupuestos_model->select($datos);\n\n\t\t$this->view($db, $this->path.'/remito_vista.php');\n\t}", "public function viewpedido($id){\n $this->viewpedido = true;\n $this->pedido = Pedido::find($id);\n $this->lineaspedidos = $this->pedido->lineaspedido;\n\n // Obtenemos la info de cada producto del pedido\n // foreach($this->lineaspedidos as $lineaspedido){\n // $this->listaproductos = Producto::find($lineaspedido);\n // }\n\n }", "public function CreditosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT \n\t\tventas.idventa, \n\t\tventas.tipodocumento, \n\t\tventas.codventa, \n\t\tventas.codserie, \n\t\tventas.codautorizacion, \n\t\tventas.codcaja, \n\t\tventas.codcliente, \n\t\tventas.subtotalivasi, \n\t\tventas.subtotalivano, \n\t\tventas.iva, \n\t\tventas.totaliva, \n\t\tventas.descuento, \n\t\tventas.totaldescuento, \n\t\tventas.totalpago, \n\t\tventas.totalpago2, \n\t\tventas.tipopago, \n\t\tventas.formapago, \n\t\tventas.montopagado, \n\t\tventas.montodevuelto, \n\t\tventas.fechavencecredito, \n\t ventas.fechapagado,\n\t\tventas.statusventa, \n\t\tventas.fechaventa,\n\t ventas.observaciones,\n\t\tcajas.nrocaja,\n\t\tcajas.nomcaja,\n\t\tclientes.documcliente,\n\t\tclientes.dnicliente, \n\t\tclientes.nomcliente, \n\t\tclientes.tlfcliente, \n\t\tclientes.id_provincia, \n\t\tclientes.id_departamento, \n\t\tclientes.direccliente, \n\t\tclientes.emailcliente,\n\t\tdocumentos.documento,\n\t\tmediospagos.mediopago,\n\t\tusuarios.dni, \n\t\tusuarios.nombres,\n\t\tprovincias.provincia,\n\t\tdepartamentos.departamento,\n\t\tSUM(montoabono) AS abonototal\n\t\tFROM (ventas LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa)\n\t\tLEFT JOIN clientes ON ventas.codcliente = clientes.codcliente\n\t\tLEFT JOIN documentos ON clientes.documcliente = documentos.coddocumento\n\t\tLEFT JOIN provincias ON clientes.id_provincia = provincias.id_provincia \n\t\tLEFT JOIN departamentos ON clientes.id_departamento = departamentos.id_departamento \n\t\tLEFT JOIN cajas ON abonoscreditos.codcaja = cajas.codcaja\n\t\tLEFT JOIN mediospagos ON ventas.formapago = mediospagos.codmediopago \n\t\tLEFT JOIN usuarios ON cajas.codigo = usuarios.codigo\n\t\tWHERE ventas.codventa = ? GROUP BY abonoscreditos.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(decrypt($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function SelTiempoVerde($tiempo){\n $tiempo_verde = new TiempoVerde();\n\n $res= $tiempo_verde->SelectData($tiempo);\n if($res->rowCount()){\n $row = $res->fetch();\n $id = (int)$row['id'];\n\n return $id;\n }else{\n $item = array('tiempo_verde' => $tiempo);\n $tiempo_verde->Insert($item);\n $res= $tiempo_verde->SelectData($tiempo);\n $row = $res->fetch();\n $id = (int)$row['id'];\n\n return $id;\n }\n }", "public function votar($id)\n\t{\n\n\t\tif ( Auditoriavoto::voto() ) {\n\n\t\t\t$respuesta = Respuesta::find($id);\n\n\t\t\t$auditoriavoto = new Auditoriavoto;\n\n\t\t\t$ip = Auditoriavoto::get_client_ip();\n\t\t\t$os = Auditoriavoto::get_client_os();\n\t\t\t$browser = Auditoriavoto::get_client_browser();\n\n\t\t\t$sess = Session::getId();\n\n\t\t\t$auditoriavoto->ip = $ip;\n\t\t\t$auditoriavoto->encuestas_id = $respuesta->encuestas_id;\n\t\t\t$auditoriavoto->respuestas_id = $id;\n\t\t\t$auditoriavoto->os = $os;\n\t\t\t$auditoriavoto->browser = $browser;\n\t\t\t$auditoriavoto->session = $sess;\n\t\t\t$auditoriavoto->cookie = str_random(12);\n\n\t\t\t$auditoriavoto->save();\n\n\t\t\tsetcookie(\"cookie_vv\", $auditoriavoto->cookie, 2147483647);\n\t\t\tsetcookie(\"cookie_id\", $auditoriavoto->id, 2147483647);\n\n\n\n\t\t}\n\n\n\t\treturn Redirect::to('/');\n\t}", "function get_vaga($id)\n {\n return $this->db->get_where('vagas',array('id'=>$id))->row_array();\n }", "function association_trouver_iextras($ObjetEtendu, $id=0) {\r\n\t$champsExtrasVoulus = array();\r\n/*\r\n\tif (test_plugin_actif('IEXTRAS')) { // le plugin \"Interfaces pour ChampsExtras2\" est installe et active : on peut donc utiliser les methodes/fonctions natives...\r\n\t\tinclude_spip('inc/iextras'); // charger les fonctions de l'interface/gestionnaire (ce fichier charge les methode du core/API)\r\n\t\tinclude_spip('inc/cextras_gerer'); // semble necessaire aussi\r\n\t\tif ($id)\r\n\t\t\tinclude_spip('cextras_pipelines'); // pour eviter le \"Fatal error : Call to undefined function cextras_enum()\" en recuperant un fond utilisant les enum...\r\n\t\t$ChampsExtrasGeres = iextras_get_extras_par_table(); // C'est un tableau des differents \"objets etendus\" (i.e. tables principaux SPIP sans prefixe et au singulier -- par exemple la table 'spip_asso_membres' correspond a l'objet 'asso_membre') comme cle.\r\n\t\tforeach ($ChampsExtrasGeres[$ObjetEtendu] as $ChampExtraRang => $ChampExtraInfos ) { // Pour chaque objet, le tableau a une entree texte de cle \"id_objet\" et autant d'entrees tableau de cles numerotees automatiquement (a partir de 0) qu'il y a de champs extras definis.\r\n\t\t\tif ( is_array($ChampExtraInfos) ) { // Chaque champ extra defini est un tableau avec les cle=>type suivants : \"table\"=>string, \"champ\"=>string, \"label\"=>string, \"precisions\"=>string, \"obligatoire\"=>string, \"verifier\"=>bool, \"verifier_options\"=>array, \"rechercher\"=>string, \"enum\"=>string, \"type\"=>string, \"sql\"=>string, \"traitements\"=>string, \"saisie_externe\"=>bool, \"saisie_parametres\"]=>array(\"explication\"=>string, \"attention\"=>string, \"class\"=> string, \"li_class\"]=>string,)\r\n\t\t\t\t$label = _TT($ChampExtraInfos['label']); // _TT est defini dans cextras_balises.php\r\n\t\t\t\tif ( $id ) {\r\n\t\t\t\t\t$desc_table = charger_fonction('trouver_table', 'base');\r\n\t\t\t\t\t$champs = $desc_table(\"spip_$ChampExtraInfos[table]s\");\r\n\t\t\t\t\t$datum_raw = sql_getfetsel($ChampExtraInfos['champ'], table_objet_sql($ChampExtraInfos['table']), $champs['key']['PRIMARY KEY'].'='.sql_quote($id) ); // on recupere les donnees...\r\n\t\t\t\t\t$datum_parsed = recuperer_fond('extra-vues/'.$ChampExtraInfos['type'], array (\r\n\t\t\t\t\t\t'champ_extra' => $ChampExtraInfos['champ'],\r\n\t\t\t\t\t\t'label_extra' => '', // normalement : _TT($ChampExtraInfos['label']), avec la chaine vide on aura juste \"<strong></strong> \" a virer...\r\n\t\t\t\t\t\t'valeur_extra' => $ChampExtraInfos['traitement']?$ChampExtraInfos['traitement']($datum_raw):$datum_raw,\r\n\t\t\t\t\t\t'enum_extra' => $ChampExtraInfos['enum'], // parametre indispensable pour les champs de type \"option\"/\"radio\"/\"case\" http://forum.spip.net/fr_245942.html#forum245980\r\n\t\t\t\t\t)); // resultat du pipeline \"affiche_contenu_objet\" altere (prive du libelle du champ qui est envoye separement)\r\n\t\t\t\t\t$champsExtrasVoulus[$ChampExtraInfos['champ']] = array( $label, str_ireplace('<strong></strong>', '', $datum_parsed), $datum_raw );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$champsExtrasVoulus[$ChampExtraInfos['champ']] = $label;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t} else */ { // le plugin \"Interfaces pour ChampsExtras2\" n'est pas actif :-S Mais peut-etre a-t-il ete installe ?\r\n\r\n\t\t$ChampsExtrasGeres = @unserialize(str_replace('O:10:\"ChampExtra\"', 'a', $GLOBALS['meta']['iextras'])); // \"iextras (interface)\" stocke la liste des champs geres dans un meta. Ce meta est un tableau d'objets \"ChampExtra\" (un par champ extra) manipules par \"cextras (core)\". On converti chaque objet en tableau\r\n\t\tif ( !is_array($ChampsExtrasGeres) )\r\n\t\t\treturn array(); // fin : ChampsExtras2 non installe ou pas d'objet etendu.\r\n\t\t$TT = function_exists('_T_ou_typo') ? '_T_ou_typo' : '_T' ; // Noter que les <multi>...</multi> et <:xx:> sont aussi traites par propre() et typo() : https://contrib.spip.net/PointsEntreeIncTexte\r\n\t\tforeach ($ChampsExtrasGeres as $ChampExtra) { // Chaque champ extra defini est un tableau avec les cle=>type suivants (les cles commencant par \"_\" initialisent des methodes de meme nom sans le prefixe) : \"table\"=>string, \"champ\"=>string, \"label\"=>string, \"precisions\"=>string, \"obligatoire\"=>string, \"verifier\"=>bool, \"verifier_options\"=>array, \"rechercher\"=>string, \"enum\"=>string, \"type\"=>string, \"sql\"=>string, \"traitements\"=>string, \"_id\"=>string, \"_type\"=>string, \"_objet\"=>string, \"_table_sql\"=>string, \"saisie_externe\"=>bool, \"saisie_parametres\"]=>array(\"explication\"=>string, \"attention\"=>string, \"class\"=> string, \"li_class\"]=>string,)\r\n\t\t\tif ($ChampExtra['table']==$ObjetEtendu) {// c'est un champ extra de la 'table' ou du '_type' d'objet qui nous interesse\r\n\t\t\t\t$label = $TT($ChampExtra['label']);\r\n\t\t\t\tif ( $id ) {\r\n\t\t\t\t\t$datum_raw = sql_getfetsel($ChampExtra['champ'], $ChampExtra['_table_sql'], id_table_objet($ChampExtra['_type']).'='.intval($id) ); // on recupere les donnees...\r\n\t\t\t\t\tswitch ( $ChampExtra['type'] ) { // Comme on n'est pas certain de pouvoir trouver \"inc/iextra.php\" et \"inc/cextra.php\" on a des chance que foire par moment. On va donc gerer les cas courants manuellement.\r\n\t\t\t\t\t\tcase 'case' : // \"<select type='checkbox' .../>...\"\r\n\t\t\t\t\t\tcase 'option' : // \"<select ...>...</select>\"\r\n\t\t\t\t\t\tcase 'radio' : // \"<select type='radio' .../>...\"\r\n\t\t\t\t\t\t\t$valeurs = array();\r\n\t\t\t\t\t\t\t$enum = explode(\"\\r\\n\", $ChampExtra['enum']);\r\n\t\t\t\t\t\t\tforeach ($enum as $pair) {\r\n\t\t\t\t\t\t\t\tlist($key, $value) = explode(',', $pair, 1);\r\n\t\t\t\t\t\t\t\t$valeurs[$key] = $value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$datum_parsed = $ChampExtra['traitement']?$ChampExtra['traitement']($valeurs[$datum_raw]):$valeurs[$datum_raw];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'oui_non' :\r\n\t\t\t\t\t\t\t$datum_parsed = _T(\"item:$datum_raw\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'asso_categorie' :\r\n\t\t\t\t\t\tcase 'asso_compte' :\r\n\t\t\t\t\t\tcase 'asso_exercice' :\r\n\t\t\t\t\t\tcase 'asso_membre' :\r\n\t\t\t\t\t\tcase 'asso_ressource' :\r\n\t\t\t\t\t\t\t$raccourci = substr($ChampExtra['type'], 4); // on vire le prefixe \"asso_\"\r\n\t\t\t\t\t\t\tif ( $ChampExtra['traitement'] )\r\n\t\t\t\t\t\t\t\t$datum_parsed = $ChampExtra['traitement']('[->'.$raccourci.$datum_raw.']');\r\n\t\t\t\t\t\t\telse { // il faut une requete de plus\r\n\t\t\t\t\t\t\t\tswitch ($raccourci) { // $valeur prend ici le champ SQL contenant la valeur desiree.\r\n\t\t\t\t\t\t\t\t\tcase 'categorie' :\r\n\t\t\t\t\t\t\t\t\t\t$valeur = 'libelle';\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase 'compte' :\r\n\t\t\t\t\t\t\t\t\t\t$valeur = 'justification';\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase 'exercice' :\r\n\t\t\t\t\t\t\t\t\t\t$valeur = 'intitule';\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase 'membre' :\r\n\t\t\t\t\t\t\t\t\t\t$valeur = 'nom_famille'; // il faudrait \"concatener\" : nom_famille, prenom, sexe ; le tout en fonction des metas... mais http://sql.1keydata.com/fr/sql-concatener.php\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase 'ressource' :\r\n\t\t\t\t\t\t\t\t\t\t$valeur = 'intitule';\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t\t\t\t$valeur = 'titre'; // sauf coincidence heurese, on devrait avoir une erreur...\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$datum_parsed = association_formater_idnom($datum_raw, array(table_objet_sql($ChampExtra[type]), $valeur, 'id_'.$raccourci) , ''); // on recupere la donnee grace a la cle etrangere... (il faut que la table soit suffixee de \"s\" et que l'identifiant soit l'objet prefixe de \"id_\" :-S)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'asso_activite' :\r\n\t\t\t\t\t\tcase 'asso_don' :\r\n\t\t\t\t\t\tcase 'asso_vente' :\r\n\t\t\t\t\t\t\t$raccourci = substr($ChampExtra['type'], 4); // on vire le prefixe \"asso_\"\r\n\t\t\t\t\t\t\tif ( $ChampExtra['traitement'] )\r\n\t\t\t\t\t\t\t\t$datum_parsed = $ChampExtra['traitement']('[->'.$raccourci.$datum_raw.']');\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$datum_parsed = _T('asso:objet_num', array('objet'=>$raccourci, 'num'=>$datum_raw) );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'article' :\r\n\t\t\t\t\t\tcase 'auteur' :\r\n\t\t\t\t\t\tcase 'breve' :\r\n\t\t\t\t\t\tcase 'document' :\r\n\t\t\t\t\t\tcase 'evenement' :\r\n\t\t\t\t\t\tcase 'rubrique' :\r\n\t\t\t\t\t\tcase 'site' :\r\n\t\t\t\t\t\t\tif ( $ChampExtra['traitement'] )\r\n\t\t\t\t\t\t\t\t$datum_parsed = $ChampExtra['traitement']('[->'.$ChampExtra['type'].$datum_raw.']');\r\n\t\t\t\t\t\t\telse { // il faut une requete de plus\r\n\t\t\t\t\t\t\t\t$datum_parsed = sql_getfetsel($ChampExtra['type']=='auteur'?'nom':'titre', \"spip_$ChampExtra[type]s\", \"id_$ChampExtra[type]=\".intval($datum_raw) );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'auteurs' :\r\n\t\t\t\t\t\t\tif ( $ChampExtra['traitement'] ) {\r\n\t\t\t\t\t\t\t\t$valeurs = explode($datum_raw, ',');\r\n\t\t\t\t\t\t\t\tforeach ($valeurs as $rang=>$valeur)\r\n\t\t\t\t\t\t\t\t\t$valeurs[$rang] = '[->auteur'.$valeurs[$rang].']';\r\n\t\t\t\t\t\t\t\t$datum_parsed = implode(';', $valeurs);\r\n\t\t\t\t\t\t\t} else { // il faut une requete de plus\r\n\t\t\t\t\t\t\t\t$valeurs = sql_fetchall('nom', \"spip_auteurs\", \"id_auteur IN (\".sql_quote($datum_raw).')' );\r\n\t\t\t\t\t\t\t\t$datum_parsed = implode(';', $valeurs);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'bloc' : // \"<textarea...>...</textarea>\"\r\n\t\t\t\t\t\tcase 'ligne' : // \"<input type='text' .../>\"\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t$ChampExtra['traitement']?$ChampExtra['traitement']($datum_raw):$datum_raw;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$champsExtrasVoulus[$ChampExtra['champ']] = array( $label, $print, $datum );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$champsExtrasVoulus[$ChampExtra['champ']] = $label;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $champsExtrasVoulus;\r\n}", "public function findVcliente(){\r\n $query = \"SELECT \r\n p.nombres,\r\n p.apellidopaterno as apellidoPaterno,\r\n p.apellidomaterno as apellidoMaterno,\r\n p.numerodocumento,\r\n p.nombrecompleto,\r\n p.id_ubigeo,\r\n p.direccion,\r\n p.email,\r\n p.sexo,\r\n p.telefono,\r\n p.tipo_persona,\r\n p.tipodocumento \r\n FROM mae_persona p \r\n WHERE p.id_persona = :idPersona;\";\r\n\r\n $parms = array(\r\n ':idPersona'=>$this->_idVcliente\r\n );\r\n\r\n $data = $this->queryOne($query,$parms);\r\n return $data;\r\n }", "function getTonoProducto($_id_producto){\n $query = 'SELECT * FROM tipo_producto WHERE id_producto = '.$_id_producto.';';\n return $query;\n }", "function TraerVenta($link, $idventa){\n\t$idventa = $link->real_escape_string($idventa);\n\t$sql = \"SELECT v.* FROM ventas v WHERE v.id_venta = $idventa\";\n\t$rs = $link->query($sql) or die(\"Error en la consulta..\" . mysqli_error($link));\n\tif ($row = mysqli_fetch_array($rs)) {\n\t\treturn $row;\n\t}\n\treturn null;\n}", "public function get_valor($id);", "public function getIdProducto(){\n return $this->idProducto;\n }", "public function pegaEntidadePar($obrid, $funid)\n {\n global $db;\n\n require_once APPRAIZ . \"includes/classes/entidades.class.inc\";\n\n $entidade = new Entidades();\n\n /*if ($funid == 1 || $funid == 2) {\n $funid1 = 2;\n $funid2 = 1;\n } elseif ($funid == 7) {\n $funid1 = 15;\n $funid2 = 7;\n } elseif ($funid == 6 || $funid == 25) {\n $funid1 = 25;\n $funid2 = 6;\n }*/\n\n if ($funid == 1) {\n $dutid = 6;\n $texto1 = \"PREFEITURA\";\n } elseif ($funid == 2) {\n $dutid = 7;\n $texto2 = \"PREFEITO(A)\";\n } elseif ($funid == 7) {\n $dutid = 8;\n $texto1 = \"SECRETARIA MUNICIPAL DE EDUCAÇÃO\";\n } elseif ($funid == 15) {\n $dutid = 2;\n $texto2 = \"DIRIGENTE MUNICIPAL DE EDUCAÇÃO\";\n } elseif ($funid == 6) {\n $dutid = 9;\n $texto1 = \"SECRETARIA ESTADUAL DE EDUCAÇÃO\";\n } elseif ($funid == 25) {\n $dutid = 10;\n $texto2 = \"SECRETÁRIO(A)\";\n }\n\n $sql = \"SELECT \t\tm.muncod, m.mundescricao, m.estuf, iu.inuid \n \tFROM \t\tobras2.obras o\n INNER JOIN \tentidade.endereco e on e.endid = o.endid\n INNER JOIN \tterritorios.municipio m on m.muncod = e.muncod\n INNER JOIN \tpar.instrumentounidade iu on iu.muncod = m.muncod\n \tWHERE \t\to.obrid = {$obrid}\";\n\n $dadosObras = $db->pegaLinha($sql);\n\n $entidadePar = $dadosObras['muncod'];\n $estuf = $dadosObras['estuf'];\n $inuid = $dadosObras['inuid'];\n $stWhere .= $entidadePar ? \"AND eed2.muncod = '{$entidadePar}'\" : \"\";\n $stWhere .= $estuf ? \"AND eed2.estuf = '{$estuf}'\" : \"\";\n\n $sql = \"SELECT entid FROM par.entidade WHERE entstatus = 'A' AND inuid = {$inuid} AND dutid = $dutid\";\n $entid = $db->pegaUm($sql);\n if ($entid) {\n $entidade->carregarPorEntidPAR($entid);\n }\n\n /*if ($funid == 1 || $funid == 6 || $funid == 7) {\n $sql = \"SELECT\n max(ent.entid) as entid1\n FROM entidade.entidade ent\n INNER JOIN entidade.endereco eed2 ON eed2.entid = ent.entid\n INNER JOIN entidade.funcaoentidade fue ON fue.entid = ent.entid AND fue.funid = {$funid2} AND fue.fuestatus = 'A'\n INNER JOIN entidade.funcao fun ON fun.funid = fue.funid\n WHERE (ent.entstatus = 'A' OR ent.entstatus IS NULL)\n {$stWhere}\";\n\n $entid = $db->pegaUm($sql);\n } else {\n $sql = \"SELECT\n --max(ent.entid) as entid1\n max(fue.fuedata) as data,\n ent.entid as entid1\n FROM entidade.entidade ent\n INNER JOIN entidade.funcaoentidade fue ON fue.entid = ent.entid AND fue.funid = {$funid1} AND fue.fuestatus = 'A'\n INNER JOIN entidade.funcao fun ON fun.funid = fue.funid\n INNER JOIN seguranca.usuario usu ON usu.usucpf = ent.entnumcpfcnpj\n LEFT JOIN par.historicodadospar hdp on hdp.usucpf = usu.usucpf\n LEFT JOIN entidade.funentassoc fea ON fea.fueid = fue.fueid\n LEFT JOIN entidade.entidade ent2 ON ent2.entid = fea.entid\n LEFT JOIN entidade.endereco eed2 ON eed2.entid = ent2.entid\n LEFT JOIN entidade.funcaoentidade fue2 ON fue2.entid = ent2.entid AND fue2.funid = {$funid2} AND fue2.fuestatus = 'A'\n LEFT JOIN entidade.funcao fun2 ON fun2.funid = fue2.funid\n WHERE (ent.entstatus = 'A' OR ent.entstatus IS NULL)\n AND fun2.funstatus IS NOT NULL\n {$stWhere}\n\n group by ent.entid, hdp.hpddatainsercao\n order by hdp.hpddatainsercao desc\n limit 1\";\n $rsEntid = $db->pegaLinha($sql);\n $entid = $rsEntid['entid1'];\n }\n\n if ($entid) {\n $entidade->carregarPorEntid($entid);\n }*/\n\n return $entidade;\n }", "function proyecto__asociar_evento_vinculo()\n\t\t{\n\t\t\t$sql = \"SELECT *\n\t\t\t\t\t\t FROM apex_objeto_ei_cuadro_columna col\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\tcol.usar_vinculo = 1 AND\n\t\t\t\t\t\tcol.objeto_cuadro_proyecto = '{$this->elemento->get_id()}';\";\n\t\t\t$datos = $this->elemento->get_db()->consultar($sql);\n\n\t\t\tif (! empty($datos)) {\n\t\t\t\tforeach($datos as $col) {\n\t\t\t\t\t$cuadro_id = $col['objeto_cuadro'];\n\t\t\t\t\t$columna = $col['objeto_cuadro_col'];\n\t\t\t\t\t$nombre_evento = 'evt_'. $col['clave'];\n\t\t\t\t\t\n\t\t\t\t\t$sql_ins = \"INSERT INTO apex_objeto_eventos\n\t\t\t\t\t(proyecto, objeto, identificador, maneja_datos, accion,en_botonera, \n\t\t\t\t\taccion_vinculo_carpeta, accion_vinculo_item, es_autovinculo, accion_vinculo_popup,\n\t\t\t\t\taccion_vinculo_popup_param, accion_vinculo_target, accion_vinculo_celda, accion_vinculo_servicio)\n\t\t\t\t\tVALUES ('{$col['objeto_cuadro_proyecto']}', '{$col['objeto_cuadro']}', '$nombre_evento', 0, 'V', 0,\";\n\n\t\t\t\t\t$sql_ins .= (isset($col['vinculo_carpeta'])) ? \"'{$col['vinculo_carpeta']}',\" : 'NULL,';\n\t\t\t\t\tif (isset($col['vinculo_item'])) { //Seteo item y autovinculo en false\n\t\t\t\t\t\t$sql_ins .= \"'{$col['vinculo_item']}', 0,\" ;\n\t\t\t\t\t} else { //Si no hay item es autovinculo\n\t\t\t\t\t\t$sql_ins .= 'NULL, 1,';\n\t\t\t\t\t}\n\t\t\t\t\t$sql_ins .= (isset($col['vinculo_popup'])) ? \"'{$col['vinculo_popup']}',\" : 'NULL,';\n\t\t\t\t\t$sql_ins .= (isset($col['vinculo_popup_param'])) ? \"'{$col['vinculo_popup_param']}',\" : 'NULL,';\n\t\t\t\t\t$sql_ins .= (isset($col['vinculo_target'])) ? \"'{$col['vinculo_target']}',\" : 'NULL,';\n\t\t\t\t\t$sql_ins .= (isset($col['vinculo_celda'])) ? \"'{$col['vinculo_celda']}',\" : 'NULL,';\n\t\t\t\t\t$sql_ins .= (isset($col['vinculo_servicio'])) ? \"'{$col['vinculo_servicio']}'\" : 'NULL';\n\t\t\t\t\t$sql_ins .= \");\";\n\t\t\t\t\t$this->elemento->get_db()->ejecutar($sql_ins);\n\n\n\t\t\t\t\t//Recupero la secuencia del evento\n\t\t\t\t\t$evt = $this->elemento->get_db()->recuperar_secuencia(\"apex_objeto_eventos_seq\");\n\t\t\t\t\t\n\t\t\t\t\t$sql_up = \"UPDATE apex_objeto_eventos a\n\t\t\t\t\t\t\t\t\t\tSET orden = (SELECT COALESCE(MAX(b.orden) + 1, 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM\tapex_objeto_eventos b\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE b.proyecto = a.proyecto AND b.objeto = a.objeto)\n\t\t\t\t\tWHERE\ta.proyecto = '{$this->elemento->get_id()}' AND a.objeto = '{$col['objeto_cuadro']}'\n\t\t\t\t\tAND a.evento_id = '$evt';\";\n\t\t\t\t\t$this->elemento->get_db()->ejecutar($sql_up);\n\n\t\t\t\t\t//Asocio el nuevo evento al cuadro y blanqueo las columnas en el mismo paso.\n\t\t\t\t\t$sql_up = \"UPDATE apex_objeto_ei_cuadro_columna SET evento_asociado = '$evt'\n\t\t\t\t\t\n\t\t\t\t\tWHERE\tobjeto_cuadro_proyecto = '{$this->elemento->get_id()}' AND\n\t\t\t\t\tobjeto_cuadro = '$cuadro_id' AND objeto_cuadro_col = '$columna'; \";\n\t\t\t\t\t$this->elemento->get_db()->ejecutar($sql_up);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function carregaValors($id,$llibre,$idautor){\t\n\t\t\t\t$this->set_llib_idllibre($id);\n\t\t\t\t$this->set_llib_llibre($llibre);\n $this->set_llib_idautor($idautor);\n \n\t\t}", "private function ima_li_pobjednik(){\n\t\t\t$this->uRetku();\n\t\t\t$this->uStupcu();\n\t\t\t$this->naDijagonali();\n\t\t}", "public static function TraerUnaVenta($id)\n {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n $consulta =$objetoAccesoDato->RetornarConsulta(\"select id, idMedia, nombreCliente, fecha, importe from ventaMedia where id=:id\");\n $consulta->bindvalue(':id',$id ,PDO::PARAM_INT);\n $consulta->execute();\n $ventaBuscada = $consulta->fetchObject('ventaMedia');\n return $ventaBuscada;\n\n }", "public function getVelocidad()\n {\n return $this->velocidad;\n }", "function mostrar_pedido(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT *, id_ped AS detalles FROM pedidos, registro WHERE cliente_ped=id_reg AND id_ped='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->codigo=$resultado['codigo_ped'];\n\t\t\t$this->cliente=$resultado['nombre_reg'].\" \".$resultado['apellido_reg'];\n\t\t\t$this->fecha=$this->convertir_fecha($resultado['fecha_ped']);\n\t\t\t$this->hora=$resultado['hora_ped'];\n\t\t\t$this->estado=$resultado['estado_ped'];\n\t\t\t$this->monto=$resultado['monto_ped'];\n\t\t\t$this->cantidad=$resultado['cantidad_ped'];\n\t\t\t$this->comentario=$resultado['comentario_ped'];\n\t\t\t$this->moneda=$resultado['moneda_ped'];\n\t\t\t$this->tarjeta=$resultado['tarjeta_ped'];\n\t\t\t$this->direccion=$resultado['direccion_ped'];\n\t\t\t$this->telefono=$resultado['telefono_reg'].\" / \".$resultado['celular_reg'];\n\t\t\t$this->correo=$resultado['correo_reg'];\n\t\t\t$this->operador=$this->mostrar_operador($resultado['operador_ped']);\n\t\t\t$this->correo_operador=$this->mostrar_correo_operador($resultado['operador_ped']);\n\t\t\t\n\t\t\t$sql2=\"SELECT *, id_det AS planes, id_det AS nombre_pro, id_det AS nombre_image, id_det AS directorio_image FROM detalle_pedido WHERE pedido_det='$this->id' ORDER BY id_det\";\n\t\t\t$consulta2=mysql_query($sql2) or die(mysql_error());\n\t\t\t$temp2=\"\";\n\t\t\twhile($resultado2 = mysql_fetch_array($consulta2)){\n\t\t\t\t$producto=$resultado2['producto_det'];\n\t\t\t\t//Buscamos datos de producto\n\t\t\t\tif($resultado2['cambio_det']==\"hotel\")\n\t\t\t\t\t$sql_pro=\"SELECT nombre_hot, nombre_image, directorio_image FROM hotel, imagen WHERE id_hot='$producto' AND galeria_image='$producto' AND tabla_image='hotel' AND nombre_image!='mapa' GROUP BY id_hot\";\n\t\t\t\telse if($resultado2['cambio_det']==\"producto\")\n\t\t\t\t\t$sql_pro=\"SELECT nombre_pro, nombre_image, directorio_image FROM producto, imagen WHERE id_pro='$producto' AND galeria_image='$producto' AND tabla_image='producto' AND nombre_image!='mapa' GROUP BY id_pro\";\n\t\t\t\t\t\n\t\t\t\t$consulta_pro=mysql_query($sql_pro) or die(mysql_error());\n\t\t\t\t$resultado_pro = mysql_fetch_array($consulta_pro);\n\t\t\t\tif($resultado2['cambio_det']==\"hotel\")\n\t\t\t\t\t$resultado2['nombre_pro']=$resultado_pro['nombre_hot'];\n\t\t\t\telse if($resultado2['cambio_det']==\"producto\")\n\t\t\t\t\t$resultado2['nombre_pro']=$resultado_pro['nombre_pro'];\n\t\t\t\t\t\n\t\t\t\t$resultado2['nombre_image']=$resultado_pro['nombre_image'];\n\t\t\t\t$resultado2['directorio_image']=$resultado_pro['directorio_image'];\n\t\t\t\t\n\t\t\t\t$resultado2['llegada_det']=$this->convertir_fecha($resultado2['llegada_det']);\n\t\t\t\t$resultado2['salida_det']=$this->convertir_fecha($resultado2['salida_det']);\n\t\t\t\t$buscar=$resultado2['id_det'];\n\t\t\t\t$sql3=\"SELECT * FROM detalle_producto WHERE detalle_dpro='$buscar' ORDER BY id_dpro\";\n\t\t\t\t$consulta3=mysql_query($sql3) or die(mysql_error());\n\t\t\t\t$temp=\"\";\n\t\t\t\twhile($resultado3 = mysql_fetch_array($consulta3)){\n\t\t\t\t\t$temp[]=$resultado3;\n\t\t\t\t}\n\t\t\t\t$resultado2['planes']=$temp;\n\t\t\t\t$temp2[]=$resultado2;\n\t\t\t}\n\t\t\t//$resultado['detalles']=$temp2;\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado = $temp2;\t\n\t\t} \n\t}", "public function TelaAlterarLivro($id)\n {\n $loader = new \\Twig\\Loader\\FilesystemLoader('view');\n //Carrego as configurações nele\n $twig = new \\Twig\\Environment($loader);\n //Chamo a tela que quero\n $Template = $twig->load('Alterar.html');\n try {\n $livro = new Livros();\n $livro = $livro->LivroPorId($id);\n } catch (\\Throwable $th) {\n echo \"erro\";\n exit;\n } \n //Paramêtro livroParametro\n $livroParametro['id'] = $livro->id_livro ;\n $livroParametro['Nome'] = $livro->NomeLivro ;\n $livroParametro['Autor'] = $livro->Autor ;\n $livroParametro['Genero'] = $livro->Genero ;\n $livroParametro['Ano'] = $livro->Ano ;\n $livroParametro['Valor'] = $livro->Valor ;\n $livroParametro['Nota'] = $livro->Nota ;\n $livroParametro['imagemLivro'] = $livro->imagemLivro ;\n \n $tela = $Template->render($livroParametro);\n echo $tela;\n }", "public function TipoCambioPorId()\n{\n\tself::SetNames();\n\t$sql = \"SELECT * FROM tiposcambio INNER JOIN tiposmoneda ON tiposcambio.codmoneda = tiposmoneda.codmoneda WHERE tiposcambio.codcambio = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute(array(decrypt($_GET[\"codcambio\"])));\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "function aggiungi_id($sconti)\n {\n\t $url = file_get_contents('http://localhost/json/libricateg.json');\n\t $libricateg = json_decode($url, true);\n\t $indice = 0;\n\t $libri = array();\n\t foreach ($libricateg as $k=>$v)\n\t {\n\t\tforeach($v as $key=>$value)\n\t\t{\n\t\t\t foreach ($sconti as $sconto)\n\t\t\t {\n\t\t\t\tif($value[\"categoria\"] == $sconto[\"tipo\"])\n\t\t\t\t{\n\t\t\t\t\t$libri[$indice][\"id\"] = $value[\"libro\"];\n\t\t\t\t\t$libri[$indice][\"sconto\"] = $sconto[\"sconto\"];\n\t\t\t\t\t$indice++;\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t }\n\t \n\t return $libri;\n }", "public function TipoMonedaPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \"SELECT * FROM tiposmoneda WHERE codmoneda = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array(decrypt($_GET[\"codmoneda\"])));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function ukloniOcenu(){\n // gledaj dal je ocenjivo do sad.\n // ukloni ocenu\n // prikaze opet to jelo\n //znaci pozove prikazi.\n }", "public function getIntegrarNomina($id)\n {\n $result=$this->adapter->query(\"insert into n_nomina_e_d_integrar (idNom, idInom ,idCon, nomCon, codCon, valor, idPref, pref, codCta, gas, natCta, ter, nitTer, nitFon, idFonS, nitFonS, idFonP, nitFonP, error )\nselect a.idNom, b.id as idInom, d.id, d.nombre as nomCon , d.codigo , \ncase when b.devengado > 0 then b.devengado else b.deducido end as valor, \nh.id as idPref, h.nombre as pref , \ncase when e.gast=0 then # Si no es gasto lleva la cuenta completa\n d.codCta else # Si es une el prefijo a la cuenta de gasto\n concat( h.nombre, substr(d.codCta,3,100) ) \nend as codCta, \ncase when e.gast=0 then 'N' else 'S' end as gast,\ncase when d.natCta=0 then 'Debito' else 'Credito' end as natCta , \ncase when e.ter=0 then 'N' else 'S' end as ter , \ncase when e.ter = 0 then ' ' else # No maneja tercero\n case when ( e.ter = 1 and d.nitFon = 0 and d.idTer > 0 ) then # Maneja el tercero preasignado\n i.codigo else \n case when ( e.ter = 1 and d.nitFon = 1 and d.fondo = 1 ) then # Maneja el tercero del fondo de salud\n f.nit else \n case when ( e.ter = 1 and d.nitFon = 1 and d.fondo = 2 ) then # Maneja el tercero del fondo de pension\n g.nit else \n case when ( e.ter = 1 and d.nitFon = 0 and d.idTer = 0 ) then # Maneja el nit del empleado\n c.CedEmp end \n end \n end\n end \n end as nitTer ,\ncase when d.nitFon=0 then 'N' else 'S' end as nitfon, f.id, f.nit as nitSal , g.id, g.nit as nitPen,\ncase when e.id is null then 'Sin definir' else '' end cuentaE \nfrom n_nomina_e a \ninner join n_nomina_e_d b on b.idInom = a.id\ninner join a_empleados c on c.id = a.idEmp \ninner join n_conceptos d on d.id = b.idConc \nleft join n_plan_cuentas e on e.codigo = d.codCta\ninner join t_fondos f on f.id = c.idFsal\ninner join t_fondos g on g.id = c.idFpen\ninner join n_pref_con h on h.id = c.idPref \nleft join n_terceros i on i.id = d.idTer \nwhere not exists (SELECT null from n_nomina_e_d_integrar where idInom = b.id )\" ,Adapter::QUERY_MODE_EXECUTE);\n\n }", "public function posiblesBDU($id_nom_orbix)\n {\n $oPersonaDl = new PersonaDl($id_nom_orbix);\n $oPersonaDl = new PersonaDl($id_nom_orbix);\n $oPersonaDl->DBCarregar();\n\n $apellido1 = $oPersonaDl->getApellido1();\n\n $Query = \"SELECT * FROM dbo.q_dl_Estudios_b\n WHERE Identif LIKE '$this->id_tipo%' AND ApeNom LIKE '%\" . $apellido1 . \"%'\n AND (pertenece_r='$this->region' OR compartida_con_r='$this->region') \";\n // todos los de listas\n $oGesListas = new GestorPersonaListas();\n $cPersonasListas = $oGesListas->getPersonaListasQuery($Query);\n $i = 0;\n $a_lista_bdu = [];\n foreach ($cPersonasListas as $oPersonaListas) {\n $id_nom_listas = $oPersonaListas->getIdentif();\n $oGesMatch = new GestorIdMatchPersona();\n $cIdMatch = $oGesMatch->getIdMatchPersonas(array('id_listas' => $id_nom_listas));\n if (!empty($cIdMatch[0]) and count($cIdMatch) > 0) {\n continue;\n }\n $id_nom_listas = $oPersonaListas->getIdentif();\n $ape_nom = $oPersonaListas->getApeNom();\n $nombre = $oPersonaListas->getNombre();\n $apellido1 = $oPersonaListas->getApellido1();\n $nx1 = $oPersonaListas->getNx1();\n $apellido1_sinprep = $oPersonaListas->getApellido1_sinprep();\n $nx2 = $oPersonaListas->getNx2();\n $apellido2 = $oPersonaListas->getApellido2();\n $apellido2_sinprep = $oPersonaListas->getApellido2_sinprep();\n $f_nacimiento = $oPersonaListas->getFecha_Naci();\n $dl_persona = $oPersonaListas->getDl();\n $lugar_nacimiento = $oPersonaListas->getLugar_Naci();\n $f_nacimiento = empty($f_nacimiento) ? '??' : $f_nacimiento;\n $pertenece_r = $oPersonaListas->getPertenece_r();\n $compartida_con_r = $oPersonaListas->getCompartida_con_r();\n $a_lista_bdu[$i] = [\n 'id_nom' => $id_nom_listas,\n 'ape_nom' => $ape_nom,\n 'nombre' => $nombre,\n 'dl_persona' => $dl_persona,\n 'apellido1' => $apellido1,\n 'apellido2' => $apellido2,\n 'f_nacimiento' => $f_nacimiento,\n 'pertenece_r' => $pertenece_r,\n 'compartida_con_r' => $compartida_con_r,\n ];\n $i++;\n }\n return $a_lista_bdu;\n }", "function processarDados(array $vetor){\n\n}", "public function getId_producto(){\n\t\treturn $this->id_producto;\n\t}", "public function get_vagas(){\n\t\t\t$vagas = array();\n\t\t\t$criteria=new Criteria;\n\t\t\t$criteria->add(new Filter('id_empresa','=',$this->id));\n\t\t\t$repo= new Repository('Vaga');\n\t\t\t$vinculos = $repo->load($criteria);\n\t\t\tif ($vinculos){\n\t\t\t\tforeach ($vinculos as $vinculo){\n\t\t\t\t\t$vagas[] = new Vaga($vinculo->id);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $vagas;\n\t\t}", "public function vratiProizvod($id){\n $proizvod = $this->where('id_proizvod', $id)->first();\n return $proizvod;\n }" ]
[ "0.6611174", "0.6428615", "0.6413764", "0.631226", "0.61347693", "0.60198396", "0.6019558", "0.6015457", "0.60096604", "0.5984948", "0.597833", "0.59354526", "0.59293383", "0.5905861", "0.5899985", "0.5872902", "0.5871128", "0.586719", "0.5846188", "0.58453894", "0.58367604", "0.58289033", "0.5826356", "0.5818058", "0.5812152", "0.5803256", "0.57980394", "0.5795297", "0.57910615", "0.57905984", "0.57898796", "0.578841", "0.5766079", "0.57598764", "0.57427454", "0.5740015", "0.5737915", "0.57235396", "0.57215005", "0.57160336", "0.5709385", "0.56992865", "0.569575", "0.56860405", "0.56798524", "0.5675874", "0.5673269", "0.5666414", "0.5649577", "0.5648666", "0.56473356", "0.564709", "0.56435287", "0.56428003", "0.56424826", "0.5630532", "0.5630519", "0.56269914", "0.5621288", "0.56156886", "0.5613229", "0.5611446", "0.5605426", "0.56026703", "0.5595883", "0.55936337", "0.5590013", "0.55877465", "0.5587626", "0.5584465", "0.558429", "0.55805445", "0.5578199", "0.55748796", "0.5565016", "0.55646324", "0.55622387", "0.55551046", "0.5552675", "0.55525017", "0.5551235", "0.55508846", "0.5548348", "0.55456114", "0.5539467", "0.55321807", "0.552587", "0.5523293", "0.5521759", "0.55213135", "0.5516689", "0.5511905", "0.5510687", "0.5500507", "0.5493335", "0.54923636", "0.5490884", "0.54867375", "0.54856116", "0.54853606" ]
0.70337623
0
Converts a time in any format to an RSS time
Конвертирует время в любом формате в формат RSS
function time($time) { return $this->Time->toRSS($time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertTimeRSS($ugly){\n\t$date = new DateTime($ugly);\n\treturn $date->format('r');\n}", "function convert_time($time){\n\t$timestamp = strtotime($time);\n\treturn $timestamp;\n}", "function acf_convert_time_to_php($time = '') {}", "static function my_strtotime($time) {\n // Incoming format: 2012-09-22 12:00 PM ET\n $pieces = explode(' ', $time);\n $count = count($pieces);\n if (strpos($pieces[1], 'TBA') !== FALSE) {\n // Sometimes, $time looks like `2011-09-24 TBA`\n $pieces[1] = '12:00PM';\n }\n if ($count == 4) {\n $pieces[1] = $pieces[1] . $pieces[2];\n }\n $str = $pieces[0] .' '. $pieces[1];\n return strtotime($str);\n }", "public static function toTime($time) {\n\t\tif (strlen($time) == 4)\n\t\t\treturn substr($time, 0, 2).':'.substr($time,2,4);\n\t\tif (strlen($time) == 6)\n\t\t\treturn substr($time, 0, 2).':'.substr($time,2,4).':'.substr($time,4,6);\n\t\treturn $time;\n\t}", "function smart_time($the_time)\n {\n return (new \\Date($the_time))->format('g:i a');\n }", "function convert24Hrs($time) {\n // $time = str_replace(':AM', ' AM', $time);\n //$time = str_replace(':PM', ' PM', $time);\n\n return date(\"H:i:s\", strtotime($time));\n}", "function convertTime($time) {\n\t$hour = substr($time,0,2);\n\t$minute = substr($time,3,2);\n\t$meridian = substr($time,6,2);\n\n\t$meridian == 'PM' ? $hour = $hour + 12 : $hour ;\n\n\tif ($hour == 24)\n\t\t$hour = '00';\n\t\n\treturn $hour.\":\".$minute;\n}", "function timeConversion($s) {\n // Write your code here\n return date('H:i:s',strtotime($s));\n}", "private function correct_time_string()\n\t\t{\n\t\t\t$m_message_time = $this->c_arr_download_message_data['message-time'];\n\t\t\t$m_message_time = str_replace('am', '', $m_message_time);\n\t\t\t$m_message_time = str_replace('pm', '', $m_message_time);\n\t\t\t$this->c_arr_download_message_data['message-time'] = $m_message_time;\n\t\t}", "function convertTime($time) {\r\n\t$hours = intval($time[0] . $time[1]);\r\n\t$minutes = $time[3] . $time[4];\r\n\t\r\n\t// 12:00 PM\r\n\tif ($hours == 12) {\r\n\t\t$period = \"PM\";\r\n\t}\r\n\t// 12:00 AM\r\n\telse if ($hours == 24) {\r\n\t\t$hours = $hours - 12;\r\n\t\t$period = \"AM\";\r\n\t}\r\n\t// PM\r\n\telse if ($hours > 12) {\r\n\t\t$hours = $hours - 12;\r\n\t\t$period = \"PM\";\r\n\t}\r\n\t// AM\r\n\telse {\r\n\t\t$period = \"AM\";\r\n\t}\r\n\t\r\n\treturn($hours . \":\" . $minutes . \" \" . $period);\r\n}", "static function fromTimeFormat( $time ){\n\t\t$date = new DateTime();\n\t\t$time = explode(':', $time);\n\t\t$date->setTime($time[0], $time[1]);\n\t\treturn $date;\n\t}", "public static function fromTimeString($time)\n {\n return static::fromTimestamp(strtotime($time));\n }", "function convertTime($str) \n {\n $date = date('g:i A', strtotime($str)); \n return $date; \n }", "function convertTime($time)\r\n{\r\n\treturn substr($time,0,2).\".\".substr($time,2,2);\r\n}", "function convertTime($time) {\n $hours = intval($time[0] . $time[1]);\n $minutes = $time[3] . $time[4];\n \n // 12:00 PM\n if ($hours == 12) {\n $period = \"PM\";\n }\n // 12:00 AM\n else if ($hours == 24) {\n $hours = $hours - 12;\n $period = \"AM\";\n }\n // PM\n else if ($hours > 12) {\n $hours = $hours - 12;\n $period = \"PM\";\n }\n // AM\n else {\n $period = \"AM\";\n }\n \n return($hours . \":\" . $minutes . \" \" . $period);\n }", "function timeConversion($s)\n{\n\n $timetype = substr($s, -2);\n $time = substr($s, 0, -2);\n $sep = explode(\":\", $time);\n \n if($sep[0] == '12'){\n if($timetype == 'PM'){\n $sep[0] = 12;\n }else if($timetype == 'AM'){\n $sep[0] = 0;\n }\n }\n else if($timetype == 'PM'){\n $sep[0] += 12;\n if($sep[0] == 24) $sep[0] = 0;\n }\n \n $sep[0] = str_pad($sep[0], 2, '0', STR_PAD_LEFT);\n \n return implode(\":\", $sep);\n}", "public function timeFormat($time) {\n return date('Y-m-d H:i:s', $time);\n }", "public function string_to_time() {\n\n\t\t$time_string = $this->EE->TMPL->fetch_param('string');\n\t\t$format = $this->EE->TMPL->fetch_param('format');\n\t\t$relative_date = $this->EE->TMPL->fetch_param('relative_date');\n\n\t\tif (!$relative_date) {\n\t\t\t$relative_date = time();\n\t\t} else {\n\t\t\t$relative_date = strtotime($relative_date);\n\t\t}\n\n\t\t$new_date = strtotime($time_string, $relative_date);\n\n\t\treturn $this->EE->localize->decode_date($format, $new_date);\n\n\t}", "public function convertTime($time, $format = null)\n {\n if (empty ($format)) {\n if ($time >= 3600) {\n $format = 'H:i:s';\n } elseif ($time >= 60) {\n $format = 'i:s';\n } else {\n $format = 's';\n }\n }\n\n return gmdate($format, $time);\n }", "function wf_time($time, $options = array())\n{\n $options = array_merge(array(\n 'format' => 'g:i a'\n ), $options);\n return date($options['format'], strtotime($time));\n}", "function convert2gmt($time)\n{\n\t$time\t\t= explode(\" \", $time);\n\t$time[1]\t= explode(\":\", $time[1]);\n\t$time[1][0] -= 2;\n\tif($time[1][0] < 0)\n\t{\n\t\t$time[1][0] = 24 + $time[1][0];\n\t}\n\tif($time[1][0] > 0 && $time[1][0] < 10)\n\t{\n\t\t$time[1][0] = 0 . $time[1][0];\n\t}\n\t\n\t$time_gmt\t\t\t\t= $time[0].\" \".$time[1][0].\":\".$time[1][1].\":\".$time[1][2];\n\n\treturn $time_gmt;\n}", "function time_to_string($value){ return Dataface_converters_date::time_to_string($value); }", "private function convertTime($time)\n {\n $string = '';\n\n if ($time > 3600)\n {\n $h = (int) abs($time / 3600);\n $time -= ($h * 3600);\n $string .= $h. ' h ';\n }\n\n if ($time > 60)\n {\n $m = (int) abs($time / 60);\n $time -= ($m * 60);\n $string .= $m. ' min ';\n }\n\n $string .= (int) $time.' sec';\n\n return $string;\n }", "public static function fancyTime($time)\r\n\t{\r\n\t\tif (!self::isValidTimeStamp($time))\r\n\t\t{\r\n\t\t\t$time = strtotime($time);\r\n\t\t}\r\n\t\treturn date('G:i',$time);\r\n\t}", "function _fix_time($time){\n\t\treturn strftime('%H:%M', strtotime($time));\n\t}", "public function convertTime($time)\n {\n if (($time->format(\"i\")) !== 0) {\n $minutesFloat = ($time->format(\"i\")) / 0.6;\n }else {\n $minutesFloat = 0;\n }\n if ($minutesFloat >= 88) {\n $formatedTime = ($time->format(\"G\")) + 1;\n }else{\n $formatedTime = ($time->format(\"G\")) + $this->round($minutesFloat);\n }\n\n return ($formatedTime);\n }", "function parse_time($time) {\n $hr = substr($time, 11, 2);\n $mn = substr($time, 14, 2);\n return \"$hr:$mn\";\n}", "public static function formatTimestamp( $time, $format = 'l', $timeoffset = null )\r\n\t{\r\n\t\tglobal $xoopsConfig, $xoopsUser;\r\n\r\n\t\t$format_copy = $format;\r\n\t\t$format = strtolower( $format );\r\n\r\n\t\tif ( $format == 'rss' || $format == 'r' ) {\r\n\t\t\t$TIME_ZONE = '';\r\n\t\t\tif ( isset( $GLOBALS['xoopsConfig']['server_TZ'] ) ) {\r\n\t\t\t\t$server_TZ = abs( intval( $GLOBALS['xoopsConfig']['server_TZ'] * 3600.0 ) );\r\n\t\t\t\t$prefix = ( $GLOBALS['xoopsConfig']['server_TZ'] < 0 ) ? ' -' : ' +';\r\n\t\t\t\t$TIME_ZONE = $prefix . date( 'Hi', $server_TZ );\r\n\t\t\t}\r\n\t\t\t$date = gmdate( 'D, d M Y H:i:s', intval( $time ) ) . $TIME_ZONE;\r\n\t\t\treturn $date;\r\n\t\t}\r\n\r\n\t\tif ( ( $format == 'elapse' || $format == 'e' ) && $time < time() ) {\r\n\t\t\t$elapse = time() - $time;\r\n\t\t\tif ( $days = floor( $elapse / ( 24 * 3600 ) ) ) {\r\n\t\t\t\t$num = $days > 1 ? sprintf( _DAYS, $days ) : _DAY;\r\n\t\t\t} elseif ( $hours = floor( ( $elapse % ( 24 * 3600 ) ) / 3600 ) ) {\r\n\t\t\t\t$num = $hours > 1 ? sprintf( _HOURS, $hours ) : _HOUR;\r\n\t\t\t} elseif ( $minutes = floor( ( $elapse % 3600 ) / 60 ) ) {\r\n\t\t\t\t$num = $minutes > 1 ? sprintf( _MINUTES, $minutes ) : _MINUTE;\r\n\t\t\t} else {\r\n\t\t\t\t$seconds = $elapse % 60;\r\n\t\t\t\t$num = $seconds > 1 ? sprintf( _SECONDS, $seconds ) : _SECOND;\r\n\t\t\t}\r\n\t\t\t$ret = sprintf( _ELAPSE, $num );\r\n\t\t\treturn $ret;\r\n\t\t}\r\n\t\t// disable user timezone calculation and use default timezone,\r\n\t\t// for cache consideration\r\n\t\tif ( $timeoffset === null ) {\r\n\t\t\t$timeoffset = ( $xoopsConfig['default_TZ'] == '' ) ? '0.0' : $xoopsConfig['default_TZ'];\r\n\t\t}\r\n\t\t$usertimestamp = xoops_getUserTimestamp( $time, $timeoffset );\r\n\t\tswitch ( $format ) {\r\n\t\t\tcase 's':\r\n\t\t\t\t$datestring = _SHORTDATESTRING;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'm':\r\n\t\t\t\t$datestring = _MEDIUMDATESTRING;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'mysql':\r\n\t\t\t\t$datestring = 'Y-m-d H:i:s';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'l':\r\n\t\t\t\t$datestring = _DATESTRING;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'c':\r\n\t\t\tcase 'custom':\r\n\t\t\t\tstatic $current_timestamp, $today_timestamp, $monthy_timestamp;\r\n\t\t\t\tif ( !isset( $current_timestamp ) ) {\r\n\t\t\t\t\t$current_timestamp = xoops_getUserTimestamp( time(), $timeoffset );\r\n\t\t\t\t}\r\n\t\t\t\tif ( !isset( $today_timestamp ) ) {\r\n\t\t\t\t\t$today_timestamp = mktime( 0, 0, 0, date( 'm', $current_timestamp ), date( 'd', $current_timestamp ), date( 'Y', $current_timestamp ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( abs( $elapse_today = $usertimestamp - $today_timestamp ) < 24 * 60 * 60 ) {\r\n\t\t\t\t\t$datestring = ( $elapse_today > 0 ) ? _TODAY : _YESTERDAY;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ( !isset( $monthy_timestamp ) ) {\r\n\t\t\t\t\t\t$monthy_timestamp[0] = mktime( 0, 0, 0, 0, 0, date( 'Y', $current_timestamp ) );\r\n\t\t\t\t\t\t$monthy_timestamp[1] = mktime( 0, 0, 0, 0, 0, date( 'Y', $current_timestamp ) + 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $usertimestamp >= $monthy_timestamp[0] && $usertimestamp < $monthy_timestamp[1] ) {\r\n\t\t\t\t\t\t$datestring = _MONTHDAY;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$datestring = _YEARMONTHDAY;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif ( $format != '' ) {\r\n\t\t\t\t\t$datestring = $format_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$datestring = _DATESTRING;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn ucfirst( date( $datestring, $usertimestamp ) );\r\n\t}", "function formatTimestamp($time, $format = \"l\", $timeoffset = null)\r\n {\r\n global $xoopsConfig, $xoopsUser;\r\n \r\n $format_copy = $format;\r\n $format = strtolower($format);\r\n \r\n if ($format == \"rss\" || $format == \"r\") {\r\n $TIME_ZONE = \"\";\r\n if (!empty($GLOBALS['xoopsConfig']['server_TZ'])) {\r\n $server_TZ = abs( intval( $GLOBALS['xoopsConfig']['server_TZ'] * 3600.0 ) );\r\n $prefix = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? \" -\" : \" +\";\r\n $TIME_ZONE = $prefix . date(\"Hi\", $server_TZ);\r\n }\r\n $date = gmdate(\"D, d M Y H:i:s\", intval($time)) . $TIME_ZONE;\r\n return $date;\r\n }\r\n \r\n if ( ($format == \"elapse\" || $format == \"e\") && $time < time() ) {\r\n $elapse = time() - $time;\r\n if ( $days = floor( $elapse / (24 * 3600) ) ) {\r\n $num = $days > 1 ? sprintf(_DAYS, $days) : _DAY;\r\n } elseif ( $hours = floor( ( $elapse % (24 * 3600) ) / 3600 ) ) {\r\n $num = $hours > 1 ? sprintf(_HOURS, $hours) : _HOUR;\r\n } elseif ( $minutes = floor( ( $elapse % 3600 ) / 60 ) ) {\r\n $num = $minutes > 1 ? sprintf(_MINUTES, $minutes) : _MINUTE;\r\n } else {\r\n $seconds = $elapse % 60;\r\n $num = $seconds > 1 ? sprintf(_SECONDS, $seconds) : _SECOND;\r\n }\r\n $ret = sprintf(_ELAPSE, $num);\r\n return $ret;\r\n }\r\n \r\n // disable user timezone calculation and use default timezone,\r\n // for cache consideration\r\n if ($timeoffset === null) {\r\n $timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' : $xoopsConfig['default_TZ'];\r\n }\r\n \r\n $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\r\n \r\n switch ($format) {\r\n case 's':\r\n $datestring = _SHORTDATESTRING;\r\n break;\r\n \r\n case 'm':\r\n $datestring = _MEDIUMDATESTRING;\r\n break;\r\n \r\n case 'mysql':\r\n $datestring = \"Y-m-d H:i:s\";\r\n break;\r\n \r\n case 'l':\r\n $datestring = _DATESTRING;\r\n break;\r\n \r\n case 'c':\r\n case 'custom':\r\n static $current_timestamp, $today_timestamp, $monthy_timestamp;\r\n if (!isset($current_timestamp)) {\r\n $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);\r\n }\r\n if (!isset($today_timestamp)) {\r\n $today_timestamp = mktime(0, 0, 0, date(\"m\", $current_timestamp), date(\"d\", $current_timestamp), date(\"Y\", $current_timestamp));\r\n }\r\n \r\n if ( abs($elapse_today = $usertimestamp - $today_timestamp) < 24*60*60 ) {\r\n $datestring = ($elapse_today > 0) ? _TODAY : _YESTERDAY;\r\n } else {\r\n if (!isset($monthy_timestamp)) {\r\n $monthy_timestamp[0] = mktime(0, 0, 0, 0, 0, date(\"Y\", $current_timestamp));\r\n $monthy_timestamp[1] = mktime(0, 0, 0, 0, 0, date(\"Y\", $current_timestamp) + 1);\r\n }\r\n if ($usertimestamp >= $monthy_timestamp[0] && $usertimestamp < $monthy_timestamp[1]) {\r\n $datestring = _MONTHDAY;\r\n } else {\r\n $datestring = _YEARMONTHDAY;\r\n }\r\n }\r\n break;\r\n \r\n default:\r\n if ($format != '') {\r\n $datestring = $format_copy;\r\n } else {\r\n $datestring = _DATESTRING;\r\n }\r\n break;\r\n }\r\n\t// Start hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org\r\n\tif (_JDF_USE_HEGIRADATE && $format != 'mysql' ){\r\n\t return ucfirst(jdate($datestring,$usertimestamp));\r\n\t } else {\r\n return ucfirst(date($datestring,$usertimestamp));\r\n }\r\n\t// End hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org\r\n\t}", "private function formatTimeShort($time){\n\t\t$timestamp = strtotime($time) - 5*3600;\n\t\t//return date(\"l, F jS @ g:i:sa\",$timestamp);\n\t\treturn date(\"M j @ g:i:sa\",$timestamp);\n\t}", "function fixupTime ($intime) {\r\n global $Status,$timeOnlyFormat;\r\n $tfixed = preg_replace('/^(\\S+)\\s+(\\S+)$/is',\"$2\",$intime);\r\n $t = explode(':',$tfixed);\r\n if (preg_match('/p/i',$tfixed)) { $t[0] = $t[0] + 12; }\r\n if ($t[0] > 23) {$t[0] = 12; }\r\n if (preg_match('/^12.*a/i',$tfixed)) { $t[0] = 0; }\r\n if ($t[0] < '10') {$t[0] = sprintf(\"%02d\",$t[0]); } // leading zero on hour.\r\n $t2 = join(':',$t); // put time back to gether;\r\n $t2 = preg_replace('/[^\\d\\:]/is','',$t2); // strip out the am/pm if any\r\n $tout = date($timeOnlyFormat,strtotime(\"today $t2\"));\r\n $Status .= \"// fixupTime in='$intime' tfixed='$tfixed' t2='$t2' tout='$tout'\\n\";\r\n return($tout);\r\n\r\n}", "public static function timestring($time=null)\n{\nif ($time=='unlimited') return $time;\nif (is_null($time)) $time=time();\nreturn @strftime('%d-%b-%Y %H:%M %z',$time);\n}", "public function fromUnixTime($time)\n {\n if ($this->timeFormat == static::FORMAT_TIMESTAMP) {\n return $time;\n }\n \n return date('Y-m-d H:i:s', $time);\n }", "public static function convertToDisplayPublishTime($time)\n\t {\n\t \t$publish_time = strtotime($time);\n\t \t$now = time();\n\t \t$lapse = $now - $publish_time;\n\n\t \t$MINUTE = 60;\n\t \t$HOUR = 60 * 60;\n\t \t$DAY = 24 * 60 * 60;\n\t \t$WEEK = $DAY * 7;\n\t \t$MONTH = $WEEK * 30;\n\t \t$YEAR = $MONTH * 12;\n\n\t \t$publish_case = 0;\n\n\t \t// $time24 = substr($time, 11, 5);\n \t\t// $time24e = explode(':', $time24);\n \t\t// $hour = $time24e[0];\n \t\t// $minute = $time24e[]\n \t\t// if($hour == 12 && )\n \t\t// $publish_case = 1;\n\n\t \tif ($lapse < $MINUTE)\n\t \t{\n\t \t\t$publish_case = 0;\n\t \t}\n\t \telseif ($lapse < $HOUR)\n\t \t{\n\t \t\t$magnitude = intval($lapse / $MINUTE);\n\t \t\tif($magnitude == 1) $publish_case = 1;\n\t \t\telse $publish_case = 2;\n\t \t}\n\t \telseif ($lapse < $DAY) \n\t \t{\n\t \t\t$magnitude = intval($lapse / $HOUR);\n\t \t\tif($magnitude == 1) $publish_case = 3;\n\t \t\telse $publish_case = 4;\n\t \t}\n\t \telseif ($lapse < $WEEK)\n\t \t{\n\t \t\t$magnitude = intval($lapse / $DAY);\n\t \t\tif($magnitude == 1) $publish_case = 5;\n\t \t\telse $publish_case = 6;\n\t \t}\n\t \telseif ($lapse < $MONTH)\n\t \t{\n\t \t\t$magnitude = intval($lapse / $WEEK);\n\t \t\tif($magnitude == 1) $publish_case = 7;\n\t \t\telse $publish_case = 8;\n\t \t}\n\t \telseif ($lapse < $YEAR)\n\t \t{\n\t \t\t$magnitude = intval($lapse / $MONTH);\n\t \t\tif($magnitude == 1) $publish_case = 9;\n\t \t\telse $publish_case = 10;\n\t \t}\n\t \telse\n\t \t{\n\t \t\t$magnitude = intval($lapse / $YEAR);\n\t \t\tif($magnitude == 1) $publish_case = 11;\n\t \t\telse $publish_case = 12;\n\t \t}\n\n\t \tswitch ($publish_case) {\n\t \t\tcase 0:\n\t\t $published_on = \"a few seconds ago\";\n\t\t break;\n\t\t case 1:\n\t\t $published_on = \"a minute ago\";\n\t\t break;\n\t\t case 2:\n\t\t $published_on = $magnitude.\" minutes ago\";\n\t\t break;\n\t\t case 3:\n\t\t $published_on = \"an hour ago\";\n\t\t break;\n\t\t case 4:\n\t\t $published_on = $magnitude.\" hours ago\";\n\t\t break;\n\t\t case 5:\n\t\t $published_on = \"1 day ago\";\n\t\t break;\n\t\t case 6:\n\t\t $published_on = $magnitude.\" days ago\";\n\t\t break;\n\t\t case 7:\n\t\t $published_on = \"1 week ago\";\n\t\t break;\n\t\t case 8:\n\t\t $published_on = $magnitude.\" weeks ago\";\n\t\t break;\n\t\t case 9:\n\t\t $published_on = \"1 month ago\";\n\t\t break;\n\t\t case 10:\n\t\t $published_on = $magnitude.\" months ago\";\n\t\t break;\n\t\t case 11:\n\t\t $published_on = \"1 year ago\";\n\t\t break;\n\t\t case 12:\n\t\t $published_on = $magnitude.\" years ago\";\n\t\t break;\n\t\t}\n\n\t\treturn $published_on;\n\t }", "function threedFriendlyTime($time)\n{\n\t//$m = ($time[0] >= 12) ? 'pm' : 'am';\n\t//if ($time[0] == 0)\n\t//\t$time[0] = 12;\n\t//else if ($time[0] > 12)\n\t//\t$time[0] = $time[0] - 12;\n\n\t//return $time[0] . ':' . $time[1] . $m;\n\t$val = strftime('%k:%M', $time);\n\n\tif (empty($val)) {\n\t\t$val = strftime('%I:%M%p', $time);\n\t}\n\n\t//return $time;\n\treturn $val;\n}", "function apachedate_to_timestamp($time)\n{\n list($d, $M, $y, $h, $m, $s, $z) = sscanf($time, \"[%2d/%3s/%4d:%2d:%2d:%2d %5s]\");\n return strtotime(\"$d $M $y $h:$m:$s $z\");\n}", "function toRSS() {\n return $this->format(DATE_RSS);\n }", "function wc_string_to_datetime($time_string)\n {\n }", "function timeConversion($s)\n{\n\n $isPM = strpos(strtolower($s), \"pm\");\n $hours = \"\";\n $s = substr($s, 0, -2);\n\n if ($isPM === false) {\n $hours = substr($s, 0, 2);\n if ($hours == \"12\") {\n $hours = \"00\";\n }\n } else {\n $hours = (string)(intval($s[0] . $s[1]) + 12);\n if ($hours == \"24\") {\n $hours = \"12\";\n }\n }\n\n\n $s[0] = $hours[0];\n $s[1] = $hours[1];\n\n return $s;\n}", "function convert24hours($time){\n \t$retval = $time;\n \tif(is_array($retval)){\n \t\treturn $retval;\n \t}\n \t//Only proceed if we have a time stamp, sometimes it's text\n \tif(strpos($time, \":\")){\n\t\t\tif(strpos($time, \"PM\") || strpos($time, \"pm\")){\n\t\t\t\t$retval = str_replace(array(\"PM\",'pm'), \"\", $time);\n\t\t\t\t$retval = trim($retval);\n\t\t\t\tlist($hours, $minutes) = explode(\":\", $retval);\n\t\t\t\t$retval = $hours + 12 . \":\" . $minutes;\n\t\t\t}\n\t\t\telseif(strpos($time, \"AM\") || strpos($time, \"am\")) {\n\t\t\t\t$retval = str_replace(array(\"AM\",'am'), \"\", $time);\n\t\t\t}\n \t}\n \treturn trim($retval);\n }", "function acf_convert_time_to_js($time = '') {}", "public static function prettifyTime($time)\n {\n return date('g:ia', strtotime($time));\n }", "public static function convertToDate($time)\n\t{\n\t\treturn substr(date('c', $time), 0, 19);\n\t}", "public static function fancyDateTime($time)\r\n\t{\r\n\t\tif (!self::isValidTimeStamp($time))\r\n\t\t{\r\n\t\t\t$time = strtotime($time);\r\n\t\t}\r\n\t\treturn date('(G:i) jS \\o\\f F Y',$time);\r\n\t}", "function format_time ($time) {\n\tif (!is_numeric($time)) {\n\t\treturn $time;\n\t}\n\t$L = Language::instance();\n\t$res = [];\n\tif ($time >= 31536000) {\n\t\t$time_x = round($time / 31536000);\n\t\t$time -= $time_x * 31536000;\n\t\t$res[] = $L->time($time_x, 'y');\n\t}\n\tif ($time >= 2592000) {\n\t\t$time_x = round($time / 2592000);\n\t\t$time -= $time_x * 2592000;\n\t\t$res[] = $L->time($time_x, 'M');\n\t}\n\tif ($time >= 86400) {\n\t\t$time_x = round($time / 86400);\n\t\t$time -= $time_x * 86400;\n\t\t$res[] = $L->time($time_x, 'd');\n\t}\n\tif ($time >= 3600) {\n\t\t$time_x = round($time / 3600);\n\t\t$time -= $time_x * 3600;\n\t\t$res[] = $L->time($time_x, 'h');\n\t}\n\tif ($time >= 60) {\n\t\t$time_x = round($time / 60);\n\t\t$time -= $time_x * 60;\n\t\t$res[] = $L->time($time_x, 'm');\n\t}\n\tif ($time > 0 || empty($res)) {\n\t\t$res[] = $L->time($time, 's');\n\t}\n\treturn implode(' ', $res);\n}", "public static function formatTimestamp($time, $format = 'l', $timeoffset = null)\n {\n global $xoopsConfig, $xoopsUser;\n\n $format_copy = $format;\n $format = strtolower($format);\n\n if ($format === 'rss' || $format === 'r') {\n $TIME_ZONE = '';\n if (isset($GLOBALS['xoopsConfig']['server_TZ'])) {\n $server_TZ = abs((int)($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0));\n $prefix = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? ' -' : ' +';\n $TIME_ZONE = $prefix . date('Hi', $server_TZ);\n }\n $date = gmdate('D, d M Y H:i:s', (int)$time) . $TIME_ZONE;\n\n return $date;\n }\n\n if (($format === 'elapse' || $format === 'e') && $time < time()) {\n $elapse = time() - $time;\n if ($days = floor($elapse / (24 * 3600))) {\n $num = $days > 1 ? sprintf(_DAYS, $days) : _DAY;\n } elseif ($hours = floor(($elapse % (24 * 3600)) / 3600)) {\n $num = $hours > 1 ? sprintf(_HOURS, $hours) : _HOUR;\n } elseif ($minutes = floor(($elapse % 3600) / 60)) {\n $num = $minutes > 1 ? sprintf(_MINUTES, $minutes) : _MINUTE;\n } else {\n $seconds = $elapse % 60;\n $num = $seconds > 1 ? sprintf(_SECONDS, $seconds) : _SECOND;\n }\n $ret = sprintf(_ELAPSE, $num);\n\n return $ret;\n }\n // disable user timezone calculation and use default timezone,\n // for cache consideration\n if ($timeoffset === null) {\n $timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' : $xoopsConfig['default_TZ'];\n }\n $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\n switch ($format) {\n case 's':\n $datestring = _SHORTDATESTRING;\n break;\n\n case 'm':\n $datestring = _MEDIUMDATESTRING;\n break;\n\n case 'mysql':\n $datestring = 'Y-m-d H:i:s';\n break;\n\n case 'l':\n $datestring = _DATESTRING;\n break;\n\n case 'c':\n case 'custom':\n static $current_timestamp, $today_timestamp, $monthy_timestamp;\n if (!isset($current_timestamp)) {\n $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);\n }\n if (!isset($today_timestamp)) {\n $today_timestamp = mktime(0, 0, 0, date('m', $current_timestamp), date('d', $current_timestamp), date('Y', $current_timestamp));\n }\n\n if (abs($elapse_today = $usertimestamp - $today_timestamp) < 24 * 60 * 60) {\n $datestring = ($elapse_today > 0) ? _TODAY : _YESTERDAY;\n } else {\n if (!isset($monthy_timestamp)) {\n $monthy_timestamp[0] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp));\n $monthy_timestamp[1] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp) + 1);\n }\n $datestring = _YEARMONTHDAY;\n if ($usertimestamp >= $monthy_timestamp[0] && $usertimestamp < $monthy_timestamp[1]) {\n $datestring = _MONTHDAY;\n }\n }\n break;\n\n default:\n $datestring = _DATESTRING;\n if ($format != '') {\n $datestring = $format_copy;\n }\n break;\n }\n\n return ucfirst(date($datestring, $usertimestamp));\n }", "function format_time ( $time ) {\n if ( strlen($time) < 4 ) {\n $time = '0' . $time;\n }\n\n // The first two characters are the hour, the last two are the minute. Separate by a colon.\n $formattedTime = substr($time, 0, 2) . \":\" . substr($time, 2, 2);\n return $formattedTime;\n}", "public static function formatTimestamp($time) {\n return gmdate('Y-m-d\\TG:i:s\\Z', $time);\n }", "function convertTime($time, $fromTz = 'GMT', $toTz = 'PST')\n {\n $date = new DateTime($time, new DateTimeZone($fromTz));\n $date->setTimezone(new DateTimeZone($toTz));\n $time = $date->format('Y-m-d H:i:s');\n return $time;\n }", "function dateTimeToUS($data){\r\n\t\t$dt = $data;\r\n\t\t$data1 = DateTime::createFromFormat(\"d/m/Y H:i:s\", $dt);\r\n\t\treturn $data1->format(\"Y-m-d H:i:s\");\r\n}", "function feed_format_date($time)\n{\n\tstatic $zone_offset;\n\tstatic $offset_string;\n\n\tif (empty($offset_string))\n\t{\n\t\tglobal $user;\n\n\t\t$zone_offset = (int) $user->timezone + (int) $user->dst;\n\n\t\t$sign = ($zone_offset < 0) ? '-' : '+';\n\t\t$time_offset = abs($zone_offset);\n\n\t\t$offset_seconds\t= $time_offset % 3600;\n\t\t$offset_minutes\t= $offset_seconds / 60;\n\t\t$offset_hours\t= ($time_offset - $offset_seconds) / 3600;\n\n\t\t$offset_string\t= sprintf(\"%s%02d:%02d\", $sign, $offset_hours, $offset_minutes);\n\t}\n\n\treturn gmdate(\"Y-m-d\\TH:i:s\", $time + $zone_offset) . $offset_string;\n}", "private function convertTime($youtubeTime): string\n {\n $di = new DateInterval($youtubeTime);\n $output = '';\n\n if ($di->h > 0) {\n $hours = ($di->h < 10 ) ? '0' . $di->h : $di->h;\n\n $output .= $hours . ':';\n }\n\n $mins = ($di->i < 10 ) ? '0' . $di->i : $di->i;\n $secs = ($di->s < 10 ) ? '0' . $di->s : $di->s;\n\n return $output . $mins . ':' . $secs;\n }", "function osf_convert_time($string)\n {\n $strarray = explode(':', $string);\n if(count($strarray) == 3)\n {\n return (($strarray[0]*3600)+($strarray[1]*60)+$strarray[2]);\n }\n elseif(count($strarray) == 2)\n {\n return (($strarray[1]*60)+$strarray[2]);\n }\n }", "protected function _strptime($time, $format)\n {\n $data = self::$data_init;\n if(empty(self::$strptime_short_mon)) {\n self::$strptime_short_mon = array_flip($this->_getStrings('dom_cal_month'));\n unset(self::$strptime_short_mon[\"\"]);\n }\n if(empty(self::$strptime_long_mon)) {\n self::$strptime_long_mon = array_flip($this->_getStrings('dom_cal_month_long'));\n unset(self::$strptime_long_mon[\"\"]);\n }\n\n $regexp = TimeDate::get_regular_expression($format);\n if(!preg_match('@'.$regexp['format'].'@', $time, $dateparts)) {\n return false;\n }\n\n foreach(self::$parts_match as $part => $datapart) {\n if (isset($regexp['positions'][$part]) && isset($dateparts[$regexp['positions'][$part]])) {\n $data[$datapart] = (int)$dateparts[$regexp['positions'][$part]];\n }\n }\n // now process non-numeric ones\n if ( isset($regexp['positions']['F']) && !empty($dateparts[$regexp['positions']['F']])) {\n // FIXME: locale?\n $mon = $dateparts[$regexp['positions']['F']];\n if(isset(self::$sugar_strptime_long_mon[$mon])) {\n $data[\"tm_mon\"] = self::$sugar_strptime_long_mon[$mon];\n } else {\n return false;\n }\n }\n if ( isset($regexp['positions']['M']) && !empty($dateparts[$regexp['positions']['M']])) {\n // FIXME: locale?\n $mon = $dateparts[$regexp['positions']['M']];\n if(isset(self::$sugar_strptime_short_mon[$mon])) {\n $data[\"tm_mon\"] = self::$sugar_strptime_short_mon[$mon];\n } else {\n return false;\n }\n }\n if ( isset($regexp['positions']['a']) && !empty($dateparts[$regexp['positions']['a']])) {\n $ampm = trim($dateparts[$regexp['positions']['a']]);\n if($ampm == 'pm') {\n if($data[\"tm_hour\"] != 12) $data[\"tm_hour\"] += 12;\n } else if($ampm == 'am') {\n if($data[\"tm_hour\"] == 12) {\n // 12:00am is 00:00\n $data[\"tm_hour\"] = 0;\n }\n } else {\n return false;\n }\n }\n\n if ( isset($regexp['positions']['A']) && !empty($dateparts[$regexp['positions']['A']])) {\n $ampm = trim($dateparts[$regexp['positions']['A']]);\n if($ampm == 'PM') {\n if($data[\"tm_hour\"] != 12) $data[\"tm_hour\"] += 12;\n } else if($ampm == 'AM') {\n if($data[\"tm_hour\"] == 12) {\n // 12:00am is 00:00\n $data[\"tm_hour\"] = 0;\n }\n } else {\n return false;\n }\n }\n\n return $data;\n }", "public static function dateTimeFormat($time): string {\n $time = self::timeCheck($time);\n if ($time <= 0) {\n return \"\";\n }\n return date(\"d.m.Y H:i\", $time);\n }", "function parse_itemtime($what) {\n $itemtime = getdate($this->variables['timestamp']);\n echo $itemtime[$what];\n }", "public static function sanitize_time( $time ) {\n\n\t\t// Store a reference to what is passed in to pass to filter\n\t\t$_time = $time;\n\n\t\t$time = preg_replace( '[^ampAMP:0-9\\s]', '', $time );\n\n\t\t/**\n\t\t * Filters a sanitized time\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param (string) $time - The sanitized time\n\t\t * @param (string) $_time - The time that was passed in to the method\n\t\t */\n\n\t\treturn apply_filters( 'ubc_press_sanitized_time', $time, $_time );\n\n\t}", "function dbt2c($time) {\n $format = Settings::get('time_format');\n\n if (!empty($format)) {\n if ($format == \"custom\") {\n $format = Settings::get('time_format_custom');\n }\n } else {\n $format = \"H:i:s\";\n }\n\n if(!is_int($time))\n $time = strtotime($time);\n\n return date($format, $time);\n\n}", "public static function formatTime($time, $format = DATE_ATOM)\n {\n if(empty($time)) {\n return false;\n }\n\n $a = str_split($time);\n\n array_splice($a, 4, 0, '-');\n array_splice($a, 7, 0, '-');\n array_splice($a, 13, 0, ':');\n array_splice($a, 16, 0, ':');\n\n return date($format, strtotime(implode(\"\", $a)));\n }", "function t2db($time){\n if(!is_int($time))\n $time = strtotime($time);\n\n return date(\"H:i:s\", $time);\n}", "private static function unformatTime(&$time) {\n\t\tif(preg_match('%(\\d+)/(\\d+)/(\\d+) (\\d+)[:.](\\d+)[:.](\\d+)%', $time, $m)) {\n\t\t\t$defaultTimeZone = date_default_timezone_get();\n\t\t\tdate_default_timezone_set('Europe/Rome');\n\t\t\t$time = mktime($m[4], $m[5], $m[6], $m[2], $m[1], $m[3]);\n\t\t\tdate_default_timezone_set($defaultTimeZone);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function getFormattedTime($time){\r\n\treturn substr($time, 0, -4);\r\n\t//$rest = substr($time, 0, -3); //yyymmddThhmm\r\n //return insertSymbol(insertSymbol(insertSymbol($rest,4,\"-\"), 7, \"-\"), 13, \":\");\r\n}", "private function parseTime($time)\n {\n $timezone = $this->config->get('app.timezone', 'UTC');\n\n /** @var Carbon $now */\n $now = Carbon::now($timezone);\n\n if (is_object($time)) {\n $deliveryTime = Carbon::instance($time);\n } else {\n if (is_array($time)) {\n reset($time);\n $type = key($time);\n $amount = $time[$type];\n } else {\n $type = 'seconds';\n $amount = $time;\n }\n\n /** @var Carbon $deliveryTime */\n $deliveryTime = Carbon::now($timezone);\n\n switch ($type) {\n case 'seconds':\n $deliveryTime->addSeconds($amount);\n break;\n case 'minutes':\n $deliveryTime->addMinutes($amount);\n break;\n case 'hours':\n $deliveryTime->addHours($amount);\n break;\n case 'days':\n $deliveryTime->addHours($amount * 24);\n break;\n default:\n $deliveryTime->addSeconds($amount);\n break;\n }\n }\n\n //Calculate boundaries\n $max = Carbon::now()->addHours(3 * 24);\n if ($deliveryTime->gt($max)) {\n $deliveryTime = $max;\n } elseif ($deliveryTime->lt($now)) {\n $deliveryTime = $now;\n }\n\n return $deliveryTime->format(\\DateTime::RFC2822);\n }", "public function convertTime($input,$outputFormat){\n\t\tif ((strlen($input) === 16 && is_numeric($input)) || strlen($input) === 10 && is_numeric($input)) { // converting 16 digit times to 10 digit standard UNIX epoch time\n\t\t\t$input = substr($input, 0,10);\n\n\t\t\tswitch ($outputFormat) { // strtotime doesn't support UNIX timestamps that's why code is mostly copied from below\n\t\t\t\tcase 'TIME': // outputs unix epoch with padded zeros until the 16th digit to satisfy database requirement\n\t\t\t\t\treturn (string)$input.\"000000\";\n\t\t\t\tcase 'UNIXTS': // outputs regular unix epoch 10 digit\n\t\t\t\t\treturn (string)$input;\n\t\t\t\tdefault: // run regular converter\n\t\t\t\t\treturn(string)(date($outputFormat,$input));\n\t\t\t}\n\n\t\t}else{\n\t\t\tswitch ($outputFormat) {\n\t\t\t\tcase 'TIME': // outputs unix epoch with padded zeros until the 16th digit to satisfy database requirement\n\t\t\t\t\treturn (string)strtotime($input).\"000000\";\n\t\t\t\tcase 'UNIXTS': // outputs regular unix epoch 10 digit\n\t\t\t\t\treturn (string)strtotime($input);\n\t\t\t\tdefault: // run regular converter\n\t\t\t\t\treturn(string)(date($outputFormat,strtotime($input)));\n\t\t\t}\n\t\t}\n\t}", "function UMW_timeToStrYMD( $time ){\n\t\n\treturn date(\"Ymd\", $time);\n}", "static function toTimeFormat( $date ){ \n\t\treturn $date->format('H:i');\n\t}", "private function format_time( $default, &$time ) {\n\t\tif ( strlen( $time ) === 4 && substr( $time, 1, 1 ) === ':' ) {\n\t\t\t$time = '0' . $time;\n\t\t} elseif ( strlen( $time ) !== 5 || $time === '' ) {\n\t\t\t$time = $default;\n\t\t}\n\t}", "function converttime_planner_mantis($time)\n\n\t{\n\n\n\n\t\t$year=substr($time,0,4);\n\n\t\t$month=substr($time,4,2);\n\n\t\t$day=substr($time,6,2);\n\n\t\t$time = mktime(0, 0, 0, $month, $day, $year);\n\n\t\treturn $time;\n\n\t\t\n\n\t}", "function rss_date( $datetime ){\n\t$date = new DateTime( $datetime );\n\treturn $date->format( 'r' );\n}", "protected function prepareTime($time) {\n return $time;\n }", "private function maybe_format_time( &$time ) {\n\t\tif ( ! is_array( $time ) && ! strpos( $time, ' ' ) ) {\n\t\t\t$time = $this->get_display_value(\n\t\t\t\t$time,\n\t\t\t\tarray(\n\t\t\t\t\t'format' => $this->get_time_format_for_field(),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function FormatDatetime($time,$format = \"d.m.Y H:i:s\"){\n\n\tglobal $datetime;\n\n\tif ($time == 0){\n\t\treturn(_NONEDIT);\n\t} else {\n\t\tpreg_match (\"/([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/\", $time, $datetime);\n\t\t$datetime = date($format, mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));\n\t\treturn($datetime);\n\t}\n}", "public function testStrToTimeFormat() {\n $this->assertEquals(515995200, $this->plugin->tamper('1986-05-09 04:00:00 GMT'));\n $this->assertEquals(515995200, $this->plugin->tamper('May 9, 1986 04:00:00 GMT'));\n $this->assertEquals(515995200, $this->plugin->tamper('Fri, 09 May 1986 04:00:00 GMT'));\n }", "public static function convertToTime($time)\n\t{\n\t\treturn (60*$time)*60;\n\t}", "function convert_timerss( $ugly ){\n $date = new DateTime( $ugly );\n echo $date->format('r');\n}", "function convert_24_hour_12_hour($time_inputted_24_hour_format){\n $time_in_12_hour_format = DATE(\"g:i a\", STRTOTIME($time_inputted_24_hour_format));\n return $time_in_12_hour_format;\n}", "function get_time_12($date_with_time)\r\n{ \r\n $phpdate = strtotime( $date_with_time );\r\n return date('h:i a', $phpdate );\r\n}", "function formatTime($timeString) \n{\n\t$timeDelimiter = \"[.:]\";\n\t$ampmDelimiter = \" \";\n \t$hour = null;\n \t$minute = null;\n \t$second = null;\n \t$ampm = null;\n\n\t$timeArray = split($timeDelimiter, $timeString);\n\t\n\tif (count($timeArray) == 3) \n\t{\n\t\tlist($hour, $minute, $second) = $timeArray;\n\t\t$ampmArray = split($ampmDelimiter, $second);\n\t\tif (count($ampmArray) == 2) { list ($second, $ampm) = $ampmArray; }\n\t}\t\t\n\telse \n\t{\n\t\tlist($hour, $minute) = $timeArray;\n\t\t$ampmArray = split($ampmDelimiter, $minute);\n\t\tif (count($ampmArray) == 2) { list ($minute, $ampm) = $ampmArray; }\n\t}\n\tif (is_null($ampm) === false && strtolower($ampm) == \"pm\" && $hour != 12) { $hour += 12; }\n\t\n\t$d = new Date();\n\t$d->setHour($hour);\t\n\t$d->setMinute($minute);\n\t$d->setSecond($second);\n\n \treturn $d;\n }", "protected function addFormattedTime(&$wrapper, $name, $time) {\n\t\t$element = new XMLElement($name, DateTimeObj::get('Y-m-d', $time), array(\n\t\t\t\t\t\t\t'iso' => DateTimeObj::get('c', $time),\n\t\t\t\t\t\t\t'time' => DateTimeObj::get('H:i', $time),\n\t\t\t\t\t\t\t'weekday' => DateTimeObj::get('w', $time),\n\t\t\t\t\t\t\t'offset' => DateTimeObj::get('O', $time)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t$wrapper->appendChild($element);\n\t\treturn $element;\n\t}", "function wc_string_to_timestamp($time_string, $from_timestamp = \\null)\n {\n }", "function _RFC822DateFormat($timestamp='')\r\n {\r\n \t// format the date\r\n \tif(!empty($timestamp))\r\n \t{\r\n \t\t$time = date( 'r', $timestamp);\r\n \t} else {\r\n \t\t$time = date( 'r' );\r\n \t}\r\n \t// return the time\r\n \treturn $time;\r\n }", "function wc_time_format()\n {\n }", "protected function frontendToInternal($time)\n {\n if (!$time) {\n return null;\n }\n $fromFormatter = $this->getFrontendFormatter();\n $toFormatter = $this->getInternalFormatter();\n $timestamp = $fromFormatter->parse($time);\n\n // Try to parse time without seconds, since that's a valid HTML5 submission format\n // See https://html.spec.whatwg.org/multipage/infrastructure.html#times\n if ($timestamp === false && $this->getHTML5()) {\n $fromFormatter->setPattern(str_replace(':ss', '', DBTime::ISO_TIME ?? ''));\n $timestamp = $fromFormatter->parse($time);\n }\n\n // If timestamp still can't be detected, we've got an invalid time\n if ($timestamp === false) {\n return null;\n }\n\n return $toFormatter->format($timestamp);\n }", "function formatTimeMessage( $time, &$message ) {\n\t\tif ( $time['hours'] ) {\n\t\t\t$message .= $time['hours'] . 'h ';\n\t\t}\n\t\tif ( $time['minutes'] ) {\n\t\t\t$message .= $time['minutes'] . 'm ';\n\t\t}\n\t\t$message .= $time['seconds'] . 's';\n\t\treturn true;\n\t}", "public function timestamp($time) {\n\t\tif(is_string($time)) $time = strtotime($time);\n\t\treturn date(\"Y-m-d H:i:s\", $time);\n\t}", "function from_twitterdate($date) {\r\n list($D, $d, $M, $y, $h, $m, $s, $z) = sscanf($date, \"%3s, %2d %3s %4d %2d:%2d:%2d %5s\");\r\n return strtotime(\"$d $M $y $h:$m:$s $z\");\r\n}", "public static function format_time($time, $f=\"\") {\r\n\t\tif (strpos($time,\":\")) {\r\n\t\t\tlist($hh,$mm) = explode(\":\",$time);\r\n\t\t\tif($f == \"\") {\r\n\t\t\t\t$hh += 0;\r\n\t\t\t\tif ($hh > 12) {\r\n\t\t\t\t\t$hh -= 12;\r\n\t\t\t\t\t$ampm = \"pm\";\r\n\t\t\t\t} elseif ($hh == 12) {\r\n\t\t\t\t\t$ampm = \"pm\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ampm = \"am\";\r\n\t\t\t\t}\r\n\t\t\t\treturn (($hh == \"0\") ? \"12\" : $hh) . \":\" . $mm . $ampm;\r\n\t\t\t}else {\r\n\t\t\t\treturn date($f, mktime($hh,$mm));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public static function formatTimeStamp($time) {\n\t\tif (preg_match(\"/^(\\d*?)-(\\d*?)-(\\d*?) (\\d*?):(\\d*?):/\", $time, $matches)) //postgres default\n\t\t\treturn $matches;\n\t\telse if (preg_match(\"/^(....)(..)(..)(..)(..)/\", $time, $matches)) //mysql default\n\t\t\treturn $matches;\n\t}", "function FormatTime($time, $format = \"YmdHis\"){\n\n\tglobal $datetime;\n\n\tif ($time == 0){\n\t\treturn(_NONEDIT);\n\t} else {\n\t\t$datetime = date($format, $time);\n\t\treturn($datetime);\n\t}\n}", "private function parseTime($str){\n\t preg_match(\"/([0-2][0-9]):([0-5][0-9])( (\\d\\d)-(\\d\\d)-(\\d\\d))?/\",$str,$match);\n\t $h = $match[1];\n\t $i = $match[2];\n\t \n\t $d = date(\"d\");\n\t $m = date(\"m\");\n\t $y = date(\"y\");\n\t if(isset($match[3])){\n\t $d = $match[4];\n\t $m = $match[5];\n\t $y = $match[6];\n\t }\n\t $y = \"20\".$y;\n\t return mktime($h,$i,0,$m,$d,$y);\n }", "function convert_timestamp( $ugly ){\n $date = new DateTime( $ugly );\n echo $date->format('l, jS, F, o');\n}", "function convert_timestamp( $ugly ){\n $date = new DateTime( $ugly );\n echo $date->format('l, jS, F, o');\n}", "function df_convert_epoch_time_to_iso8601($time_inputted){\n $time_in_iso8601_format = date(\"D, j M o G:i:s +0000\", $time_inputted); \n return $time_in_iso8601_format;\n}", "function date_h($time)\n{\n$date_format = \"l, F d, Y h:i:s A T\";\n$time = intval($time);\nif (!$time)\nreturn \"\";\nreturn date($date_format, $time);\n}", "public static function formatTime($time, $format = 'h:i A')\n\t{\n\t\treturn date($format, strtotime($time));\n\t}", "protected function getFormattedTime(string $time = ''): string\n {\n if (empty($time)) {\n $time = '000000';\n } else {\n $time = str_replace(':', '', $time) . '00';\n }\n\n return $time;\n }", "static function format_datetime($time)\n {\n return strftime($GLOBALS['prefs']->getValue('date_format'), $time)\n . ' '\n . (date($GLOBALS['prefs']->getValue('twentyFour') ? 'G:i' : 'g:ia', $time));\n }", "function timeStampConvert($tstamp,$toformat){\r\n\t\r\n\t\tif($tstamp == \"\" || $toformat == \"\") return \"\";\r\n\t\r\n\t\t\t\r\n\t\tif(is_numeric($tstamp)){\r\n\t\t\r\n\t\t\r\n\t\t\t$year = substr($tstamp,0,4);\r\n\t\t\t$month = substr($tstamp,4,2);\r\n\t\t\t$day = substr($tstamp,6,2);\r\n\t\t\t$hour = substr($tstamp,8,2);\r\n\t\t\t$minute = substr($tstamp,10,2);\r\n\t\t\t$second = substr($tstamp,12,2);\r\n\t\t\t\r\n\t\t\tif($year == \"\") return \"\";\r\n\t\t\tif($month == \"\") $day = 1;\r\n\t\t\tif($day == \"\") $day = 1;\r\n\t\t\tif($hour == \"\") $hour = 0;\t\t\t\r\n\t\t\tif($minute == \"\") $minute = 0;\t\t\r\n\t\t\tif($second == \"\") $second = 0;\r\n\t\t\t\r\n\t\t\treturn date($toformat, mktime($hour, $minute, $second , $month, $day, $year));\r\n\t\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\r\n\t\t\treturn date($toformat, strtotime($tstamp));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t}", "public static function convert_to_ampm($time)\n {\n return date(\"g:i a\", strtotime($time));\n }" ]
[ "0.72878826", "0.6350171", "0.616021", "0.61572295", "0.6071855", "0.6055282", "0.60375965", "0.59952515", "0.5978951", "0.5965665", "0.5955919", "0.5899351", "0.5896571", "0.5885395", "0.5883937", "0.58767843", "0.58736736", "0.58674234", "0.5865733", "0.5803355", "0.580291", "0.5792566", "0.5788872", "0.5774416", "0.57679915", "0.57425845", "0.57397205", "0.57307816", "0.5706409", "0.5697542", "0.56724334", "0.56622934", "0.5630984", "0.5603543", "0.5603105", "0.56019336", "0.5594674", "0.55940014", "0.5584129", "0.556548", "0.55597675", "0.55515015", "0.55267155", "0.55104405", "0.55001026", "0.5498794", "0.547889", "0.54607", "0.5438409", "0.543617", "0.54360896", "0.5432802", "0.5420918", "0.54180527", "0.5416882", "0.5387172", "0.53852314", "0.5383686", "0.5378367", "0.53746027", "0.5369159", "0.5365872", "0.53639466", "0.53531635", "0.5341659", "0.5327664", "0.53262657", "0.5325746", "0.5322652", "0.53182304", "0.5295146", "0.52796984", "0.5277451", "0.526789", "0.52611524", "0.525824", "0.52572703", "0.52554595", "0.5254911", "0.5245229", "0.5237581", "0.5236089", "0.52352965", "0.5226464", "0.5222672", "0.5216595", "0.52146614", "0.51954126", "0.5190149", "0.5186804", "0.5185307", "0.5185259", "0.5185259", "0.5185065", "0.5175476", "0.51752645", "0.5169392", "0.51660895", "0.51624215", "0.5153911" ]
0.7797548
0
If GooglePay order payment success
Если оплата заказа GooglePay успешна
public function googlePayTransactionSuccess() { // успешный платеж $response = ["action" => "SALE", 'result' => 'SUCCESS']; $order = $this->getCookieOrder(); $order_id = $order['data']['order_id']; $this->updatePaymentOrder($order_id, self::GOOGLE_PAY, $response); $this->telegramMessage($response, $order_id, 'PLATON GOOGLE PAY SALE SUCCESS'); return $this->moveToSuccessCheckoutPage($order_id, self::GOOGLE_PAY, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processPayment(){\n var_dump('pay with paypal');\n }", "public function process_pre_order_release_payment( $order ) {\r\n\r\n writeLog( get_class($this). '->' .__FUNCTION__. ' -> order id ->'.$order->id );\r\n\r\n $Paycertify_Process = new Paycertify_API( $order, $this->settings );\r\n $Ret = $Paycertify_Process->do_transaction();\r\n\r\n writeLog( get_class($this). '->' .__FUNCTION__. ' -> response ->'.print_r($Ret,true) );\r\n\r\n // PNRef number\r\n $PNRef = $Ret['data']['PNRef'] ? $Ret['data']['PNRef'] : '';\r\n update_post_meta( $order_id, 'PNRef', $PNRef );\r\n\r\n\r\n if( isset( $Ret['success'] ) && $Ret['success'] == 1 ) {\r\n $order->payment_complete();\r\n\r\n $order->add_order_note( __('PNRef:'.$Ret['data']['PNRef'].' payment completed', 'paycertify') );\r\n // Remove cart\r\n $woocommerce->cart->empty_cart();\r\n\r\n // Return thankyou redirect\r\n return array(\r\n 'result' => 'success',\r\n 'redirect' => $this->get_return_url( $order )\r\n );\r\n }\r\n else {\r\n $error = '';\r\n $i = 1;\r\n foreach($Ret['error'] as $k=>$v) {\r\n if(count($Ret['error']) == $i )\r\n $join = \"\";\r\n else\r\n $join = \", <br>\";\r\n\r\n $error.= $v.$join;\r\n $i++;\r\n }\r\n // Mark as on-hold (we're awaiting the payment)\r\n $order->update_status( 'on-hold', __( 'Awaiting offline payment', 'paycertify' ) );\r\n $order->add_order_note( __('Payment Error : ', 'paycertify') . $error );\r\n\r\n return new WP_Error( __('Paycertify Payment Error : ', 'paycertify') . $error );\r\n\r\n }\r\n }", "public function doPayment(){\n\t\treturn true;\n\t}", "public function responseAction() {\n $status = $this->responseCheck();\n $request = $this->getRequest()->getPost();\n\n $MerchantOrderNo = $request['MerchantOrderNo'];\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($MerchantOrderNo);\n\n if ($status == 'success') {\n $order->setState('Complete', 'Complete', 'PChomePayPayment success!')->save();\n } else {\n $order->setState('Pending', 'Pending', 'PChomePayPayment failure!')->save();\n }\n }", "public function needs_payment()\n {\n }", "public function needs_payment()\n {\n }", "function oms_payment($order = false){\n\t\treturn true;\n\n\t}", "public function successAction()\n {\n $result = $this->_getPaymentResult();\n\n if($result['TrxnStatus'] == 'True' || $result['TrxnStatus'] == 'true') {\n \t $session = $this->getCheckout();\n\t $session->unsEwayUkRealOrderId();\n\t $session->setQuoteId($session->getEwayUkQuoteId(true));\n\t $session->getQuote()->setIsActive(false)->save();\n\n\t $order = Mage::getModel('sales/order');\n\t $order->load($this->getCheckout()->getLastOrderId());\n\t if($order->getId()) {\n\t $order->sendNewOrderEmail();\n\t }\n\n\t $this->_redirect('checkout/onepage/success');\n\n } else {\n\n\t $this->_redirect('checkout/onepage/failure');\n }\n }", "function _saveTransaction($data, $error='')\n\t\t{\n\t\t\t$errors = array();\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\n\t\t\t$orderpayment = JTable::getInstance('OrderPayments', 'TiendaTable');\n\t\t\t$oredrPaymentId=$data['shopping-cart']['merchant-private-data']['orderPaymentId']['VALUE'];\n\t\t\n\t\t\t$orderpayment->load($oredrPaymentId);\n\t\t\tif (empty($orderpayment->orderpayment_id))\n\t\t\t{\n\t\t\t\t$errors[] = JText::_('COM_TIENDA_GOOGLECHECKOUT_CHECKOUT_INVALID_ORDERPAYMENTID');\n\t\t\t\treturn count($errors) ? implode(\"\\n\", $errors) : '';\n\t\t\t}\n\t\t\n\t\t\t$orderpayment->transaction_id = $data['google-order-number']['VALUE'];\n\t\t\n\t\t\t// update the orderpayment\n\t\t\tif (!$orderpayment->save())\n\t\t\t{\n\t\t\t\t$errors[] = $orderpayment->getError();\n\t\t\t}\n\t\t\t// set the order's new status and update quantities if necessary\n\t\t\tTienda::load( 'TiendaHelperOrder', 'helpers.order' );\n\t\t\tTienda::load( 'TiendaHelperCarts', 'helpers.carts' );\n\t\t\t$order = JTable::getInstance('Orders', 'TiendaTable');\n\t\t\n\t\t\t$order->load( $orderpayment->order_id );\n\t\t\t// if the transaction has the \"pending\" status,\n\t\t\t$order->order_state_id = Tienda::getInstance('pending_order_state', '1'); // PENDING\n\t\t\n\t\t\t// Update quantities for echeck payments\n\t\t\tTiendaHelperOrder::updateProductQuantities( $orderpayment->order_id, '-' );\n\t\t\n\t\t\t// remove items from cart\n\t\t\tTiendaHelperCarts::removeOrderItems( $orderpayment->order_id );\n\t\t\n\t\t\t// send email\n\t\t\t$send_email = true;\n\t\t\n\t\t\tif ($send_email)\n\t\t\t{\n\t\t\t\t// send notice of new order\n\t\t\t\tTienda::load( \"TiendaHelperBase\", 'helpers._base' );\n\t\t\t\t$helper = TiendaHelperBase::getInstance('Email');\n\t\t\t\t$model = Tienda::getClass(\"TiendaModelOrders\", \"models.orders\");\n\t\t\t\t$model->setId( $orderpayment->order_id );\n\t\t\t\t$order = $model->getItem();\n\t\t\t\t$helper->sendEmailNotices($order, 'new_order');\n\t\t\t}\n\t\t\n\t\t\treturn count($errors) ? implode(\"\\n\", $errors) : '';\n\t\t}", "function testDoPaymentSuccess() {\n\t\t$init = $this->getDonorTestData();\n\t\t$init['payment_method'] = 'cc';\n\t\t$init['payment_submethod'] = 'visa';\n\t\t$init['email'] = 'innocent@clean.com';\n\t\t$init['ffname'] = 'cc-vmad';\n\t\tunset( $init['order_id'] );\n\n\t\t$gateway = $this->getFreshGatewayObject( $init );\n\t\t$result = $gateway->doPayment();\n\t\t$this->assertEmpty( $result->isFailed(), 'PaymentResult should not be failed' );\n\t\t$this->assertEmpty( $result->getErrors(), 'PaymentResult should have no errors' );\n\t\t$this->assertEquals( 'url_placeholder', $result->getIframe(), 'PaymentResult should have iframe set' );\n\t}", "public function check_payment_status() {\n\t\t\t// get post data\n\t\t\t$body = file_get_contents('php://input');\n\t\t\tif ( $body ) {\n\t\t\t\t$response\t= json_decode( $body ); \n\t\t\t\t$order_id \t= $response->order_id;\n\t\t\t\t$order \t\t= wc_get_order( $order_id );\n\n\t\t\t\t// success\n\t\t\t\tif ( $response->status_code == '200' ) {\n\t\t\t\t\t// note\n\t\t\t\t\t$order->add_order_note( \n\t\t\t\t\t\tsprintf( '%s: %s [%s]. %s', \n\t\t\t\t\t\t\t__( 'Midtrans HTTP notifications received', 'ms-midtrans-core' ),\n\t\t\t\t\t\t\t$response->transaction_status,\n\t\t\t\t\t\t\t$response->status_code,\n\t\t\t\t\t\t\t$this->method_title\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// processing with note\n\t\t\t\t\twc_reduce_stock_levels( $order_id );\n\n\t\t\t\t\t// $order->payment_complete(); with note\n\t\t\t\t\t$order->update_status( 'processing' );\n\n\t\t\t\t\t// completed with note\n\t\t\t\t\t$order->update_status( 'completed' );\n\t\t\t\t} \n\n\t\t\t\t// pending payent\n\t\t\t\telse if ( $response->status_code == '201' ) {\n\t\t\t\t\t// note\n\t\t\t\t\t$order->add_order_note( \n\t\t\t\t\t\tsprintf( '%s: %s [%s]. %s', \n\t\t\t\t\t\t\t__( 'Midtrans HTTP notifications received', 'ms-midtrans-core' ),\n\t\t\t\t\t\t\t$response->transaction_status,\n\t\t\t\t\t\t\t$response->status_code,\n\t\t\t\t\t\t\t$this->method_title\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} \n\n\t\t\t\t// failed or denied payment\n\t\t\t\telse {\n\t\t\t\t\t// note\n\t\t\t\t\t$order->add_order_note( \n\t\t\t\t\t\tsprintf( '%s: %s [%s]. %s', \n\t\t\t\t\t\t\t__( 'Midtrans HTTP notifications received', 'ms-midtrans-core' ),\n\t\t\t\t\t\t\t$response->transaction_status,\n\t\t\t\t\t\t\t$response->status_code,\n\t\t\t\t\t\t\t$this->method_title\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// cancelled\n\t\t\t\t\t$order->update_status( 'cancelled', __( 'The order was cancelled due to no payment from customer.', 'ms-midtrans-core') );\n\t\t\t\t\t\n\t\t\t\t\t// note\n\t\t\t\t\t$order->add_order_note( __( 'Order status changed from Pending payment to Cancelled.', 'ms-midtrans-core' ) );\n\t\t\t\t}\n\n\t\t\t\t// save payment status notifications\n\t\t\t\tupdate_post_meta( $order_id, '_ms_midtrans_payment_status', maybe_serialize( json_decode( $body, true ) ) );\n\n\t\t\t\t/**\n\t\t\t\t * $this->write_log( 'Ping from midtrans' );\n\t\t\t\t * $this->write_log( $response );\n\t\t\t\t */\n\t\t\t}\n\t\t\texit;\n\t\t}", "function process_payment() {}", "public function successAction()\n {\n $k = Mage::helper('billmatebankpay')->getBillmate(true, false);\n $session = Mage::getSingleton('checkout/session');\n $orderIncrementId = $session->getBillmateStandardQuoteId();\n $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());\n\n $status = Mage::getStoreConfig('payment/billmatebankpay/order_status');\n \n\t\t$session->setLastSuccessQuoteId($session->getBillmateQuoteId());\n $session->setLastQuoteId($session->getBillmateQuoteId());\n $session->setLastOrderId($session->getLastOrderId());\n\n\t\tif(empty($_POST)) $_POST = $_GET;\n //$_POST['data'] = json_decode(stripslashes($_POST['data']),true);\n $data = $k->verify_hash($_POST);\n\n if( $order->getState() == $status ){\n $session->setOrderId($data['orderid']);\n $session->setQuoteId($session->getBillmateQuoteId(true));\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n $order->sendNewOrderEmail();\n $session->unsRebuildCart();\n\n $this->_redirect('checkout/onepage/success', array('_secure'=>true));\n return;\n }\n\t\t\n if( isset($data['code']) || isset($data['error'])){\n \n $status = 'pending_payment';\n $comment = $this->__('Unable to complete order, Reason : ').$data['message'] ;\n $isCustomerNotified = true;\n $order->setState('new', $status, $comment, $isCustomerNotified);\n $order->save();\n $order->sendOrderUpdateEmail(true, $comment);\n \n Mage::getSingleton('core/session')->addError($this->__('Unable to process with payment gateway :').$data['message']);\n if(isset($data['error'])){\n Mage::log('hash:'.$data['hash'].' recieved'.$data['hash_recieved']);\n }\n $checkouturl = $session->getBillmateCheckOutUrl();\n $checkouturl = empty($checkouturl)?Mage::helper('checkout/url')->getCheckoutUrl():$checkouturl;\n $this->_redirect($checkouturl);\n }else{\n\n \n\t\t\t$status = Mage::getStoreConfig('payment/billmatebankpay/order_status');\n if($data['status'] == 'Pending')\n $status = 'pending_payment';\n\t\t\t$isCustomerNotified = true;\n\t\t\t$order->setState('new', $status, '', $isCustomerNotified);\n $payment = $order->getPayment();\n $info = $payment->getMethodInstance()->getInfoInstance();\n $info->setAdditionalInformation('invoiceid',$data['number']);\n\n $values['PaymentData'] = array(\n 'number' => $data['number'],\n 'orderid' => $order->getIncrementId()\n );\n $data1 = $k->updatePayment($values);\n $order->addStatusHistoryComment(Mage::helper('payment')->__('Order processing completed'.'<br/>Billmate status: '.$data1['status'].'<br/>'.'Transaction ID: '.$data1['number']));\n\t $payment->setTransactionId($data['number']);\n\t $payment->setIsTransactionClosed(0);\n\t $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,null,false, false);\n\t $transaction->setOrderId($order->getId())->setIsClosed(0)->setTxnId($data['number'])->setPaymentId($payment->getId())\n\t ->save();\n\t $payment->save();\n\t\t\t$order->save();\n\n $session->setQuoteId($session->getBillmateStandardQuoteId(true));\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\t\t\t$order->sendNewOrderEmail(); \n $this->_redirect('checkout/onepage/success', array('_secure'=>true));\n }\n }", "public function submitPayment()\n\t{\n\t\t$result=$this->SetExpressCheckout();\n\n\t\tif(!$this->isCallSucceeded($result))\n\t\t{\n\t\t\t$this->errorCode=self::ERROR_SET_EXPRESS_CHECKOUT;\n\t\t\tif($this->apiLive===true)\n\t\t\t\t$this->errorMessage=Yii::t('XExpressPaypal.paypal', 'We were unable to access PayPal. Please try again later.');\n\t\t\telse\n\t\t\t\t$this->errorMessage=$result['L_LONGMESSAGE0'];\n\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$token=urldecode($result[\"TOKEN\"]);\n\t\t\tyii::app()->controller->redirect($this->paypalUrl.$token);\n\t\t}\n\t}", "protected function paymentSuccess($event){\n /* @var $order Orders */\n\n $order = $event->sender->params['order'];\n if($order->payment_status != OrderPaymentStatus::PAID){\n $order->payment_status = OrderPaymentStatus::PAID;\n $order->status = OrderStatus::SHIPMENT;\n $order->update_payment_status = new CDbExpression('NOW()');\n $order->save();\n\n Yii::app()->sms->send($order->customer->phone, 'Заказ No.'.$order->id.' успешно оплачен и передан на сборку.', 'MuWu.ru');\n\n switch($order->shipping_id) {\n case Shipping::MSC_STORE_SHIPPING:\n case Shipping::CDEK_STORE_SHIPPING:\n case Shipping::CDEK_SPB:\n $order->cdekRegister();\n break;\n }\n unset(Yii::app()->session['order_id']);\n }\n }", "function plgVmOnPaymentResponseReceived(&$html) {\n\n $session = JFactory::getSession();\n $dataTransbankOnepay = $session->get('dataTransbankOnepay');\n $virtuemart_order_id = $dataTransbankOnepay['virtuemart_order_id'];\n $action = vRequest::getCmd('action');\n\n $modelOrder = $this->getModelOrder();\n $order = $modelOrder->getOrder($virtuemart_order_id);\n\n if ($action == 'create') {\n\n $channel = vRequest::getCmd('channel');\n $items = $session->get('items');\n\n $callbackUrl = JURI::root() . self::BASE_URL_ACTIONS . '&action=commit&cid=' . $dataTransbankOnepay['virtuemart_paymentmethod_id'];\n\n $response = $this->transbankSdkOnepay->createTransaction($channel, TransbankSdkOnepay::PLUGIN_CODE, $items, $callbackUrl);\n\n $dataTransbankOnepay['payment_order_total'] = $response['amount'];\n $session->set('dataTransbankOnepay', $dataTransbankOnepay);\n\n header('Content-Type: application/json');\n echo(json_encode($response));\n die;\n\n } else if ($action == 'commit') {\n\n $status = vRequest::getCmd('status');\n $occ = vRequest::getCmd('occ');\n $externalUniqueNumber = vRequest::getCmd('externalUniqueNumber');\n\n $response = $this->transbankSdkOnepay->commitTransaction($status, $occ, $externalUniqueNumber);\n\n $message = $response['message'];\n $detail = $response['detail'];\n $metadata = json_encode($response['metadata']);\n $orderStatusId = $response['orderStatusId'];\n $orderComment = $message . '<hr>' . $detail;\n $orderNotifyToUser = true;\n\n $order['order_status'] = $orderStatusId;\n $order['customer_notified'] = $orderNotifyToUser;\n $order['comments'] = $orderComment;\n\n $modelOrder->updateStatusForOneOrder($virtuemart_order_id, $order, true);\n\n $app = JFactory::getApplication();\n\n $dataTransbankOnepay['order_status'] = $orderStatusId;\n $dataTransbankOnepay['transbank_onepay_metadata'] = $metadata;\n\n if (isset($response['error'])) {\n $app->enqueueMessage($message, 'error');\n $app->redirect('index.php?option=com_virtuemart&view=cart');\n die;\n } else {\n $session->set('detail', $detail);\n $this->storePSPluginInternalData($dataTransbankOnepay);\n $app->redirect(self::BASE_URL_ACTIONS . '&action=result&tid=' . microtime());\n die;\n }\n\n } else if ($action == 'result') {\n VmConfig::loadJLang('com_virtuemart');\n $order_number = $dataTransbankOnepay['order_number'];\n $order_pass = $dataTransbankOnepay['order_pass'];\n $link = JRoute::_('index.php?option=com_virtuemart&view=orders&layout=details&order_number=' . $order_number . '&order_pass=' . $order_pass, false) ;\n $detail = $session->get('detail');\n //COM_VIRTUEMART_ORDER_VIEW_ORDER\n $html = $detail . '<br/><br/><a class=\"vm-button-correct\" href=\"'.$link.'\">'.vmText::_('View your order').'</a>';\n $this->getCurrentCart()->emptyCart();\n }\n }", "public function plgVmOnPaymentResponseReceived(&$html)\n {\n $tokenWs = $_POST['token_ws'] ?? $_GET['token_ws'] ?? null;\n $tbkToken = $_POST['TBK_TOKEN'] ?? $_GET['TBK_TOKEN'] ?? null;\n $buyOrder = $_POST['TBK_ORDEN_COMPRA'] ?? $_GET['TBK_ORDEN_COMPRA'] ?? null;\n if (!$tokenWs && !$tbkToken) {\n return null;\n }\n\n if (!($method = $this->getMethodPayment())) {\n return null;\n }\n\n if (!$this->selectedThisElement($method->payment_element)) {\n return false;\n }\n\n $config = $this->getAllConfig();\n\n $session = JFactory::getSession();\n $paymentOk = $session->get('webpay_payment_ok');\n $orderId = $session->get('webpay_order_id');\n $tokenWs = $session->get('webpay_token_ws');\n\n if ($this->orderWasCancelledByUser($tbkToken, $buyOrder) || $this->AnErrorOcurredOnPaymentForm(\n $tokenWs,\n $tbkToken,\n $buyOrder\n )) {\n $modelOrder = VmModel::getModel('orders');\n\n $orderId = $modelOrder->getOrderIdByOrderNumber($buyOrder);\n $order = $modelOrder->getOrder($orderId);\n\n $order['order_status'] = $this->getConfig('status_cancelled');\n $order['comments'] = 'Pago fallido: Compra anulada por el usuario';\n $modelOrder->updateStatusForOneOrder($orderId, $order, true);\n\n $app = JFactory::getApplication();\n $app->enqueueMessage('Pago anulado por el usuario', 'error');\n $this->redirectToCart();\n\n return;\n }\n if ($paymentOk == 'WAITING') {\n $transbankSdkWebpay = new TransbankSdkWebpay($config);\n $result = $transbankSdkWebpay->commitTransaction($tokenWs);\n\n $session->set('result', json_encode($result));\n\n $order = [];\n $order['virtuemart_order_id'] = $orderId;\n $order['customer_notified'] = 1;\n $order['transbank_webpay_metadata'] = json_encode($result);\n\n if ($this->isAuthorized($result)) {\n $session->set('webpay_payment_ok', 'SUCCESS');\n\n $comment = [\n 'vci' => $result->getVci(),\n 'buyOrder' => $result->getBuyOrder(),\n 'sessionId' => $result->getSessionId(),\n 'responseCode' => $result->getResponseCode(),\n 'authorizationCode' => $result->getAuthorizationCode(),\n 'paymentTypeCode' => $result->getPaymentTypeCode(),\n ];\n\n $order['order_status'] = $this->getConfig('status_success');\n $order['comments'] = 'Pago exitoso: '.json_encode($comment);\n\n $modelOrder = VmModel::getModel('orders');\n $modelOrder->updateStatusForOneOrder($orderId, $order, true);\n\n $html = $this->getSuccessMessage($result);\n $this->emptyCart(null);\n } else {\n $session->set('webpay_payment_ok', 'FAIL');\n\n $comment = $result;\n\n //check if was return from webpay, then use only subset data\n if (isset($result->buyOrder)) {\n $comment = [\n 'buyOrder' => $result->buyOrder,\n 'sessionId' => $result->sessionId,\n 'responseCode' => $result->detailOutput->responseCode,\n 'responseDescription' => $result->detailOutput->responseDescription,\n ];\n }\n\n $order['order_status'] = $this->getConfig('status_canceled');\n $order['comments'] = 'Pago fallido: '.json_encode($comment);\n\n $modelOrder = VmModel::getModel('orders');\n $modelOrder->updateStatusForOneOrder($orderId, $order, true);\n $html = $this->getRejectMessage($result);\n }\n } else {\n $result = $session->get('result');\n\n if ($paymentOk == 'SUCCESS') {\n $html = $this->getSuccessMessage($result);\n $this->emptyCart(null);\n } elseif ($paymentOk == 'FAIL') {\n $order = [];\n $order['order_status'] = $this->getConfig('status_canceled');\n $order['virtuemart_order_id'] = $orderId;\n $order['customer_notified'] = 1;\n $order['comments'] = $result->error.', '.$result->detail;\n\n $modelOrder = VmModel::getModel('orders');\n $modelOrder->updateStatusForOneOrder($orderId, $order, true);\n $html = $this->getRejectMessage($result);\n }\n }\n\n return null;\n }", "function process_payment( $order_id ) {\n\t\t\n\t\t$order = &new jigoshop_order( $order_id );\n\t\t$order->update_status('on-hold', __('Awaiting Bank Transfer', 'jigoshop'));\n\t\tjigoshop_cart::empty_cart();\n\t\t$checkout_redirect = apply_filters( 'jigoshop_get_checkout_redirect_page_id', get_option( 'jigoshop_thanks_page_id' ) );\n\t\treturn array(\n\t\t\t'result' \t=> 'success',\n\t\t\t'redirect'\t=> add_query_arg( 'key', $order->order_key, add_query_arg( 'order', $order_id, get_permalink( $checkout_redirect ) ) )\n\t\t);\n\t\t\n\t}", "function processPayment() {\n\t\tself::setState(GopayHelper::PAID);\n\t\t\n\t}", "function paymentSuccess()\n\t{\n\t\treturn ($this->success ? YES : NO);\n\t}", "public function payerAuthComplete()\n {\n $this->load->language('extension/payment/mpgs_hosted_checkout');\n $this->load->model('extension/payment/mpgs_hosted_checkout');\n\n $txnId = $this->request->post['transaction_id'];\n $orderId = $this->request->post['order_id'];\n $gatewayRecommendation = $this->request->post['response_gatewayRecommendation'];\n $sessionId = $this->request->request['session_id'];\n\n try {\n if ($gatewayRecommendation !== 'PROCEED') {\n throw new Exception($this->language->get('error_payment_declined_3ds'));\n }\n\n $operation = 'AUTHORIZE';\n if ($this->model_extension_payment_mpgs_hosted_checkout->getPaymentAction() === 'PURCHASE') {\n $operation = 'PAY';\n }\n\n $uri = $this->model_extension_payment_mpgs_hosted_checkout->getApiUri() . '/order/' . $orderId . '/transaction/1';\n $operationData = [\n 'apiOperation' => $operation,\n 'session' => [\n 'id' => $sessionId\n ],\n 'authentication' => [\n 'transactionId' => $txnId\n ],\n 'transaction' => [\n 'reference' => $orderId\n ],\n 'sourceOfFunds' => [\n 'type' => 'CARD'\n ],\n 'partnerSolutionId' => $this->model_extension_payment_mpgs_hosted_checkout->buildPartnerSolutionId(),\n 'order' => array_merge([\n 'reference' => $orderId,\n 'currency' => $this->session->data['currency'],\n 'notificationUrl' => $this->url->link('extension/payment/mpgs_hosted_checkout/callback', '', true),\n ], $this->getOrderItemsTaxAndTotals()),\n 'billing' => $this->getBillingAddress(),\n 'customer' => $this->getCustomer(),\n ];\n\n if (!empty($this->getShippingAddress())) {\n $operationData = array_merge($operationData, ['shipping' => $this->getShippingAddress()]);\n }\n\n $response = $this->model_extension_payment_mpgs_hosted_checkout->apiRequest('PUT', $uri, $operationData);\n\n if (isset($response['result']) && ($response['result'] == 'ERROR' || $response['result'] == 'FAILURE')) {\n $error = $this->language->get('error_transaction_unsuccessful');\n if (isset($response['error']['explanation'])) {\n $error = sprintf('%s: %s', $response['error']['cause'], $response['error']['explanation']);\n }\n throw new Exception($error);\n }\n\n $this->processOrder($response['order'], $response);\n\n $enabled = $this->model_extension_payment_mpgs_hosted_checkout->isSavedCardsEnabled();\n $payingWithToken = isset($this->session->data['token_id']) ? (bool)$this->session->data['token_id'] : false;\n if ($enabled && !$payingWithToken && isset($this->session->data['save_card']) && $this->session->data['save_card'] === '1') {\n $this->saveCards([\n 'id' => $sessionId\n ]);\n }\n\n $this->clearTokenSaveCardSessionData();\n\n $this->model_extension_payment_mpgs_hosted_checkout->clearCheckoutSession();\n $this->response->redirect($this->url->link('checkout/success', '', true));\n\n } catch (Exception $e) {\n $this->clearTokenSaveCardSessionData();\n $this->session->data['error'] = $e->getMessage();\n $this->addOrderHistory($orderId, self::ORDER_FAILED, $e->getMessage());\n $this->response->redirect($this->url->link('checkout/checkout', '', true));\n }\n }", "public function success(){\n\n if(isset($this->ipn[\"payment_status\"]) && strtolower($this->ipn[\"payment_status\"]) == 'completed' ){\n\n return true;\n\n } else if($this->is_live == 0 && isset($this->ipn[\"payment_status\"]) && strtolower($this->ipn[\"payment_status\"]) == 'pending' ){\n\n\n return true;\n\n }\n\n return false;\n }", "function order_send() {\n\n\t\t$check_query = xtc_db_query(\"SELECT afterbuy_success FROM \".TABLE_ORDERS.\" WHERE orders_id='\".(int)$this->order_id.\"'\");\n\t\t$data = xtc_db_fetch_array($check_query);\n\n\t\tif ($data['afterbuy_success'] == 1)\n\t\t\treturn false;\n\t\treturn true;\n\n\t}", "public function executePayment()\n {\n return;\n }", "function check_spg_response()\n {\n global $woocommerce;\n\n $msg['class'] = 'error';\n $msg['message'] = \"Thank you for shopping with us. However, the transaction has been declined.\";\n $myaccounturl = get_permalink(woocommerce_get_page_id('myaccount'));\n\n if (isset($_POST['OrderID'])) {\n require_once('Notify.php');\n $notify = new Raiffeisen\\Notify($myaccounturl, $myaccounturl, $_POST);\n\n if ($notify->isValid('1.1.1.1')) {\n if (1) {\n try {\n $order = new WC_Order($_POST['OrderID']);\n $msg['message'] = \"Thank you for shopping with us. Your account has been charged and your transaction is successful. We will be shipping your order to you soon.\";\n $msg['class'] = 'success';\n\n if ($order->status != 'processing') {\n $order->payment_complete();\n $order->add_order_note('Raiffeisen payment successful<br/>');\n $woocommerce->cart->empty_cart();\n }\n echo $notify->success();\n } catch (Exception $e) {\n $msg['class'] = 'error';\n $msg['message'] = \"Thank you for shopping with us. However, the transaction has been declined.\";\n echo $notify->error();\n }\n\n echo $notify->error();\n } else {\n $msg['class'] = 'error';\n $msg['message'] = \"Thank you for shopping with us. However, the transaction has been declined.\";\n echo $notify->error();\n }\n }\n\n if (function_exists('wc_add_notice')) {\n wc_add_notice($msg['message'], $msg['class']);\n\n } else {\n if ($msg['class'] == 'success') {\n $woocommerce->add_message($msg['message']);\n } else {\n $woocommerce->add_error($msg['message']);\n\n }\n $woocommerce->set_messages();\n }\n }\n }", "public function VerifyOrderPayment()\n\t\t{\n\t\t\t// WorldPay fetches the contents of this page and displays it to the customer\n\t\t\t// so we need to restart the session with the customers session ID\n\t\t\t// so we can do the rest of the magic later such as resetting the customers\n\t\t\t// cart contents.\n\t\t\tsession_write_close();\n\t\t\t$session = new ISC_SESSION($_REQUEST['M_customerToken']);\n\n\t\t\tif(isset($_POST['amount']) && isset($_POST['transStatus']) && isset($_POST['callbackPW'])) {\n\t\t\t\t$password = $_POST['callbackPW'];\n\t\t\t\t$amount = $_POST['amount'];\n\t\t\t\t$status = $_POST['transStatus'];\n\t\t\t\t$expectedPassword = $this->GetValue('callbackpw');\n\n\t\t\t\t// Check that the order totals match, the callback password matches and the transaction was successful\n\t\t\t\tif($this->GetGatewayAmount() == $amount && $status == \"Y\" && $password == $expectedPassword) {\n\t\t\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogSystemSuccess(array('payment', $this->GetName()), GetLang('WorldPaySuccess'));\n\t\t\t\t\t$this->SetPaymentStatus(PAYMENT_STATUS_PAID);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$errorMsg = isc_html_escape(sprintf(GetLang('WorldPayErrorMismatchMsg'), $password, $expectedPassword, $amount, $this->GetGatewayAmount(), $status));\n\t\t\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogSystemError(array('payment', $this->GetName()), GetLang('WorldPayErrorMismatch'), isc_html_escape($errorMsg));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogSystemError(array('payment', $this->GetName()), GetLang('WorldPayErrorInvalid'), GetLang('WorldPayErrorInvalidMsg'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private function paymentSuccess(): void\n {\n // Clear our session\n $session = Model::get('session');\n $session->remove('checkout_type');\n $session->remove('guest_address');\n $session->remove('guest_shipment_address');\n $session->remove('payment_method');\n $session->remove('shipment_method');\n\n $deleteCart = new DeleteCart($this->cart);\n $this->get('command_bus')->handle($deleteCart);\n\n $this->loadTemplate('Catalog/Layout/Templates/PaymentSuccess.html.twig');\n\n $this->header->setPageTitle(ucfirst(Language::lbl('ThankYouForYourOrder')));\n\n $this->breadcrumb->addElement(\n ucfirst(Language::lbl('Checkout')),\n Navigation::getUrlForBlock('Catalog', 'Cart') .'/'. Language::lbl('Checkout')\n );\n }", "public function paymentAction()\n {\n try {\n\t\t /* $this->getResponse()->setHeader(\"Content-Type\", \"text/html; charset=ISO-8859-1\",true); */\n $session = $this->_getCheckout();\n\t\t\t\n \t\t$order = Mage::getModel('sales/order');\n\t\t\t$order->loadByIncrementId($session->getLastRealOrderId());\n\t\t\tif (!$order->getId()) {\n\t\t\t\tMage::throwException('No order for processing found');\n\t\t\t}\n\t\t\t\n\t\t\t$billing = $order ->getBillingAddress();\n\t\t\t$vatid = $billing->getVatId();\n\t\t\t\n\t\t\tif($this -> _validaCPF($vatid) || $this -> _validaCNPJ($vatid))\n\t\t\t{\n\t\t\t\t// $session->addError(Mage::helper('pagbrasil')->__('The CPF OR CNPJ is valid!'));\n\t\t\t\t// Mage::throwException(Mage::helper('pagbrasil')->__('The CPF OR CNPJ is valid!'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save(); \n\t\t\t $session->addError(Mage::helper('pagbrasil')->__('The CPF or CNPJ is not valid!'));\n\t\t\t\t//parent::_redirect('checkout/cart');\n\t\t\t\tparent::_redirect('customer/address/');\n\t\t\t\t// exit();\n\t\t\t\tMage::throwException(Mage::helper('pagbrasil')->__('The CPF or CNPJ is not valid!'));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($order->getState() != \"pending_payment\")\n\t\t\t{\n\t\t\t\tparent::_redirect('checkout/cart');\n\t\t\t\t//die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,\n\t\t\t\t\tMage::helper('pagbrasil')->__('The customer was redirected to PagBrasil.')\n\t\t\t\t);\n\t\t\t\t$order->save();\n\n\t\t\t\t$session->setPagbrasilQuoteId($session->getQuoteId());\n\t\t\t\t$session->setPagbrasilRealOrderId($session->getLastRealOrderId());\n\t\t\t\t$session->getQuote()->setIsActive(true)->save();\n\t\t\t\t//$session->getQuote()->setIsActive(false)->save();\n\t\t\t\t//$session->clear();\n\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$this->renderLayout();\n\t\t\t}\n } catch (Exception $e){\n Mage::logException($e);\n parent::_redirect('checkout/cart');\n }\n }", "function charge(&$order){\r\n\t\tglobal $pmpro_currency;\r\n\t\t\r\n\t\t$nvpStr = '&TOKEN='.$_POST['orderID'];\r\n\r\n\t\t$response = self::PPHttpPost('GetExpressCheckoutDetails', $nvpStr);\r\n\t\tif(isset( $response['ACK'] ) && in_array( $response['ACK'], array( 'Success', 'SuccessWithWarning' ) )) {\r\n\t\t\t\r\n\t\t\t//create a code for the order\r\n\t\t\tif(empty($order->code)){\r\n\t\t\t\t$order->code = $order->getRandomCode();\r\n\t\t\t}\r\n\t\r\n\t\t\t$amount = $order->InitialPayment;\r\n\t\t\t\r\n\t\t\tif($amount == $response['AMT'] && strtolower($pmpro_currency) == strtolower($response['CURRENCYCODE'])){\r\n\t\t\t\t\t$order->payment_transaction_id = $_POST['orderID'];\r\n\t\t\t\t\t$order->payment_type = \"PayPal Smart Button\";\r\n\t\t\t\t\t$order->updateStatus(\"success\");\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "function pgResponse(){\n\n\t\t$paytmChecksum = \"\";\n\t\t$paramList = array();\n\t\t$isValidChecksum = \"FALSE\";\n\n\t\t$paramList = $_POST;\n\t\t$paytmChecksum = isset($_POST[\"CHECKSUMHASH\"]) ? $_POST[\"CHECKSUMHASH\"] : \"\"; //Sent by Paytm pg\n\n\t\t//Verify all parameters received from Paytm pg to your application. Like MID received from paytm pg is same as your application’s MID, TXN_AMOUNT and ORDER_ID are same as what was sent by you to Paytm PG for initiating transaction etc.\n\t\t$isValidChecksum = verifychecksum_e($paramList, PAYTM_MERCHANT_KEY, $paytmChecksum); //will return TRUE or FALSE string.echo \n\t\t\n\t\tif($isValidChecksum == \"TRUE\") {\n\t//\tprint_r($_POST);\n\t\t\tif ($_POST[\"STATUS\"] == \"TXN_SUCCESS\") {\n\t\t\t $update['txn_id'] =$_POST[\"TXNID\"];\n\t\t\t $update['txn_amount']=$_POST[\"TXNAMOUNT\"];\n\t\t\t $update['status']=$_POST[\"STATUS\"];\n\t\t\t $update['txn_date_time']=date(\"Y-m-d H:i:s\");\n\t\t\t $this->db->where(\"order_id\",$_POST[\"ORDERID\"]);\n\t\t\t $getorderdetails = $this->db->get(\"paytm_txn\")->row();\n\t\t\t \n\t\t\t $this->db->where(\"order_id\",$_POST[\"ORDERID\"]);\n\t\t\t if($this->db->update(\"paytm_txn\",$update)){\n \t$upstatusd['status']=1;\n \t$upstatusd['invoice_no']=$_POST[\"ORDERID\"];\n \t$this->db->where(\"status\",0);\n \t$this->db->where(\"cid\",$getorderdetails->cid);\n \t$this->db->update(\"like_product\",$upstatusd);\n \t$this->db->where(\"id\",$getorderdetails->cid);\n $custDetails=\t$this->db->get(\"costumer\")->row();\n \t$daybook['paid_to']=\"the Life Style\";\n \t$daybook['paid_by']=$getorderdetails->cid;\n \t$daybook['dabit_cradit']=1;\n \t$daybook['amount']=$_POST[\"TXNAMOUNT\"];\n \t$daybook['pay_date']=date(\"Y-m-d H:i:s\");\n \t$daybook['status']=1;\n \t$daybook['pay_mode']=\"Online\";\n \t$daybook['invoice_no']=$_POST[\"ORDERID\"];\n \t$this->db->insert(\"day_book\",$daybook);\n \t$orderid = $_POST[\"ORDERID\"];\n \t$tranamount = $_POST[\"TXNAMOUNT\"];\n \t $sms = \"Dear Customer Your order \".$orderid.\" of the amount of \".$tranamount.\" is successfully placed and we will try to deliver soon . Thanks The Life Styles\";\n\t\t $this->load->helper('sms_helper');\n\t \tmysms($sms,$custDetails->mobile); \n redirect(base_url().\"welcome/orderStatus/\".$orderid); \n \t\n\t\t\t }\n\t\t\t\n\t\t\t\t//Process your transaction here as success transaction.\n\t\t\t\t//Verify amount & order id received from Payment gateway with your application's order id and amount.\n\t\t\t}\n\t\t\telse {\n\t\t\t $update['txn_id'] =$_POST[\"TXNID\"];\n\t\t\t $update['txn_amount']=$_POST[\"TXN_AMOUNT\"];\n\t\t\t $update['status']=$_POST[\"STATUS\"];\n\t\t\t $update['txn_date_time']=date(\"Y-m-d H:i:s\");\n\t\t\t $update['order_id']=$_POST[\"ORDERID\"];\n\t\t\t$this->load->view('payStatus',$update);\n\t\t\t}\n\n\t\t\n\t\t}\n\t\telse {\n\t\t\techo \"<b>Checksum mismatched.</b>\";\n\t\t\t//Process transaction as suspicious.\n\t\t}\n\n\t \n\t}", "public function successAction()\r\n {\r\n $orderId = $this->getRequest()->getParam('orderId');\r\n $order = Mage::getModel('sales/order');\r\n $order->loadByIncrementId($orderId);\r\n $order->setState(Mage_Sales_Model_Order::STATE_NEW, self::STATUS_PENDING_CUSTOMER, 'Gateway has authorized the payment.');\r\n $order->sendNewOrderEmail();\r\n $order->setEmailSent(true);\r\n $order->save();\r\n Mage::getSingleton('checkout/session')->unsQuoteId();\r\n Mage_Core_Controller_Varien_Action::_redirect('onestepcheckout/index/success', array('_secure' => true));\r\n\r\n }", "public function successAction() {\n\t\t\n\t\t//echo \"in b2b\";die;\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName, true);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t$privateId = $session->getPrivateId();\n\t\t\n\t\t\n\t\t\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\n\t\t\tif ($orderDetails['purchase'][\"paymentName\"] == \"DirectInvoice\"){\n\t\t\t\t$session->setData('use_fee', 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$session->setData('use_fee', 5);\n\t\t\t}\n\t\t\n\t\t\n\t\tif($orderDetails){\n\t\t\t$email = $orderDetails['customer']['email'];\n\t\t\t$mobile = $orderDetails['customer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['customer']['deliveryAddress']['firstName'];\n\t\t\t$lastName = $orderDetails['customer']['deliveryAddress']['lastName'];\n\t\t\t\n\t\t\t\n\t\t\tif($orderDetails['customer']['deliveryAddress']['country'] == 'Sverige'){\t\n\t\t\t\t$scountry_id = \"SE\";\n\t\t\t}\n\t\t\telse if ($orderDetails['customer']['deliveryAddress']['country'] == 'Norge'){\n\t\t\t\t$scountry_id = \"NO\";\n\t\t\t}\n\t\t\telse if ($orderDetails['customer']['deliveryAddress']['country'] == 'Suomi'){\n\t\t\t\t$scountry_id = \"FI\";\n\t\t\t}\n\t\t\telse if ($orderDetails['customer']['deliveryAddress']['country'] == 'Deutschland'){\n\t\t\t\t$scountry_id = \"DE\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$scountry_id = $orderDetails['customer']['countryCode'];\n\t\t\t}\n\t\t\tif($orderDetails['customer']['billingAddress']['country'] == 'Sverige'){ \n\t\t\t\t$bcountry_id = \"SE\";\n\t\t\t}\n\t\t\telse if ($orderDetails['customer']['billingAddress']['country'] == 'Norge'){\n\t\t\t\t$bcountry_id = \"NO\";\n\t\t\t}\n\t\t\telse if ($orderDetails['customer']['billingAddress']['country'] == 'Suomi'){\n\t\t\t\t$bcountry_id = \"FI\";\n\t\t\t}\n\t\t\telse if ($orderDetails['customer']['billingAddress']['country'] == 'Deutschland'){\n\t\t\t\t$bcountry_id = \"DE\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$bcountry_id = $orderDetails['customer']['countryCode'];\n\t\t\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['billingAddress']['coAddress'], \n\t\t\t\t'street' => $orderDetails['customer']['billingAddress']['address'],\n\t\t\t\t'city' => $orderDetails['customer']['billingAddress']['city'],\n\t\t\t\t'country_id' => $bcountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['billingAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['deliveryAddress']['coAddress'], \n\t\t\t\t'street' => $orderDetails['customer']['deliveryAddress']['address'],\n\t\t\t\t'city' => $orderDetails['customer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName, true);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName, true);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName, true);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\t\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods($quote);\n\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$shippingMethod = \"freeshipping_freeshipping\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t\n\t\t\t$shippingPrice = 0;\n\t\t\t$shippingTax = 0;\n\t\t\tforeach($orderItems as $oitem){\n\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t$shippingPrice = $oitem['unitPrice'];\n\t\t\t\t\t$shippingTax = $oitem['vat'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$shippingAddressData->setShippingAmount($shippingPrice);\n\t\t\t$shippingAddressData->setBaseShippingAmount($shippingPrice);\n\t\t\t\n\t\t\t\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\n\n\t\t\tif ($shippingTax != 0){\n\t\t\t\t$shippingAddressData->setShippingAmount($shippingPrice/($shippingTax/100+1));\n\t\t\t\t$shippingAddressData->setBaseShippingAmount($shippingPrice/($shippingTax/100+1));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$shippingAddressData->setShippingAmount($shippingPrice);\n\t\t\t\t$shippingAddressData->setBaseShippingAmount($shippingPrice);\n\t\t\t}\n\t\t\t$shippingAddressData->setShippingInclTax($shippingPrice);\n\t\t\t$shippingAddressData->save();\n\n\n\n\t\t\t//$paymentMethod = 'collectorpay';\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\n\t\t\t$colpayment_method = \"\"; \n\t\t\tif (array_key_exists('paymentMethod', $orderDetails['purchase'])){\n\t\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t}\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\n\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->getShippingAddress()->save();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t$session->unsPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName, true);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$oldShippingAmount = $order->getShippingAmount();\n\t\t\t\t$oldShippingTaxAmount = $order->getShippingTaxAmount();\n\t\t\t\tif ($shippingTax != 0){\n\t\t\t\t\t$order->setShippingAmount($shippingPrice/($shippingTax/100+1));\n\t $order->setBaseShippingAmount($shippingPrice/($shippingTax/100+1));\n\t\t\t\t\t$order->setShippingTaxAmount($shippingPrice-($shippingPrice/($shippingTax/100+1)));\n $order->setBaseShippingTaxAmount($shippingPrice-($shippingPrice/($shippingTax/100+1)));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$order->setShippingAmount($shippingPrice);\n\t $order->setBaseShippingAmount($shippingPrice);\n\t\t\t\t\t$order->setShippingTaxAmount(0);\n\t\t\t\t\t$order->setBaseShippingTaxAmount(0);\n\t\t\t\t}\n\t\t\t\t$order->setShippingInclTax($shippingPrice);\n\t\t\t\t$order->setBaseShippingInclTax($shippingPrice);\n\t\t\t\t$orderGrandTotalAdjustment = $order->getShippingAmount() + $order->getShippingTaxAmount() - $oldShippingAmount - $oldShippingTaxAmount;\n\t\t\t\t$order->setGrandTotal($order->getGrandTotal()+$orderGrandTotalAdjustment);\n\t\t\t\t$order->setBaseGrandTotal($order->getBaseGrandTotal()+$orderGrandTotalAdjustment);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$order->queueNewOrderEmail(true);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ($orderDetails[\"purchase\"][\"result\"] == \"OnHold\"){\n\t\t\t\t\t$pending = Mage::getStoreConfig('ecomatic_collectorbank/general/pending_order_status');\n\t\t\t\t\t$order->setState($pending, true);\n\t\t\t\t\t$order->save();\n\t\t\t\t}\n\t\t\t\telse if ($orderDetails[\"purchase\"][\"result\"] == \"Preliminary\"){\n\t\t\t\t\t$auth = Mage::getStoreConfig('ecomatic_collectorbank/general/authorized_order_status');\n\t\t\t\t\t$order->setState($auth, true);\n\t\t\t\t\t$order->save();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$denied = Mage::getStoreConfig('ecomatic_collectorbank/general/denied_order_status');\n\t\t\t\t\t$order->setState($denied, true);\n\t\t\t\t\t$order->save();\n\t\t\t\t}\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tMage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($order->getId())));\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\" Error is --> \". Mage::helper('core')->jsonEncode($result) . \"\\n\" . $e->getTraceAsString(), null, $logFileName, true);\t\t\n\t\t\t\t\t//Mage::app()->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName, true);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName, true);\t\t\n\t}", "function successful_request( $veritrans_notification ) {\n\n global $woocommerce;\n\n $order = new WC_Order( $veritrans_notification->order_id );\n // error_log(var_dump($order));\n if ($veritrans_notification->transaction_status == 'capture') {\n if ($veritrans_notification->fraud_status == 'accept') {\n $order->payment_complete();\n }\n else if ($veritrans_notification->fraud_status == 'challenge') {\n $order->update_status('on-hold');\n }\n }\n else if ($veritrans_notification->transaction_status == 'cancel') {\n $order->update_status('cancelled');\n }\n else if ($veritrans_notification->transaction_status == 'deny') {\n $order->update_status('failed');\n }\n else if ($veritrans_notification->transaction_status == 'settlement') {\n if($veritrans_notification->payment_type != 'credit_card'){\n $order->payment_complete();\n }\n }\n else if ($veritrans_notification->transaction_status == 'pending') {\n $order->update_status('on-hold');\n }\n\n exit;\n }", "function doPayment() {\n\t\tif ($this->_debug) trigger_error(\"Reports -> \" . get_class($this). \" ! doPayment()\" , E_USER_NOTICE);\n\t\tif ($this->_mode == PAYMENT_ENGINE_SEND) {\n\t\t\tif ($this->_verifyData()) {\n\t\t\t\t$this->formMessage();\n\t\t\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\t\t\texit();\n\t\t\t} else {\n\t\t\t\tif ($this->_debug) trigger_error(\"- The parameters are assigned incorrectly.\", E_USER_WARNING);\n\t\t\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\ttrigger_error(\"- In the regime PAYMENT_ENGINE_RECEIVE the method doPayment() it is not accessible.\", E_USER_ERROR);\n\t\t}\n\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\treturn false;\n\t}", "public function successAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getPaypalStandardQuoteId(true));\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n header(\"Location: {$this->gemgentoUrl()}checkout/thank_you\");\n exit;\n }", "function process_payment($order_id)\n {\n\t\t\t\n global $woocommerce;\n $order = new WC_Order($order_id);\n $result = $this->genPayURL($order);\n if($result === false){\n return array(\n 'result' => 'failure',\n 'redirect' => $woocommerce->cart->get_checkout_url()\n );\n\n }else{\n //empty cart\n $woocommerce->cart->empty_cart();\n return array(\n 'result' => 'success',\n 'redirect' => $result\n ); \n }\n\t\t\t\n\n }", "function _prePayment( $data )\n\t{\n\n\t\t/*\n\t\t * get all necessary data and prepare vars for assigning to the template\n\t\t */\n\t\t$vars = new JObject();\n\t\t$order = JTable::getInstance('Orders', 'TiendaTable');\n\t\t$order->load( $data['order_id'] );\n\n\t\t$items = $order->getItems();\n\t\t$vars->orderpayment_id = $data['orderpayment_id'];\n\t\t$vars->orderpayment_amount = $data['orderpayment_amount'];\n\t\t$vars->orderpayment_type = $this->_element;\n\n\t\t$vars->merchant_id = $this->_getParam('merchant_id');\n\t\t$vars->type_id = JRequest::getInt('id');\n\t\t//$vars->post_url = JRoute::_(\"index.php?option=com_tienda&controller=payment&task=process&ptype={$this->_element}&paction=proceed&tmpl=component\");\n\t\t$vars->button_url = $this->_getPostUrl(false);\n\t\t$vars->note = JText::_('COM_TIENDA_GOOGLECHECKOUT_NOTE_DEFAULT');\n\t\t$uri = JFactory::getURI();\n\t\t$url = $uri->toString(array('path', 'query', 'fragment'));\n\t\t$vars->r = base64_encode($url);\n\t\t// Include all the required files\n\t\trequire_once dirname(__FILE__) . \"/{$this->_element}/library/googlecart.php\";\n\t\trequire_once dirname(__FILE__) . \"/{$this->_element}/library/googleitem.php\";\n\t\trequire_once dirname(__FILE__) . \"/{$this->_element}/library/googleshipping.php\";\n\t\trequire_once dirname(__FILE__) . \"/{$this->_element}/library/googletax.php\";\n\t\n\t\t$cart = new GoogleCart($this->_getParam('merchant_id'), $this->_getParam('merchant_key'), $this->_getServerType(), $this->params->get('currency', 'USD'));\n\t\t$totalTax=0;\n\t\t$totalPrice = 0;\n\t\tforeach($items as $itemObject)\n\t\t{\t\t\t\n\t\t\t//\n\t\t\t$item_temp = new GoogleItem($itemObject->orderitem_name,\n\t\t\t$itemObject->orderitem_name,$itemObject->orderitem_quantity,$itemObject->orderitem_price + $itemObject->orderitem_attributes_price);\n\t\t\t// in argument of GoogleItem first itemname , itemDescription,quantity, unti price\n\t\t\t$cart->AddItem($item_temp);\n\t\t\t$totalPrice = $totalPrice + $itemObject->orderitem_final_price;\n\t\t\t$totalTax=$totalTax+$itemObject->orderitem_tax;\n\t\t}\n\n\t\t//check if coupons is not empty\t\t\n\t\tif(!empty($data['coupons']))\n\t\t{\t\n\t\t\t$couponIds = array();\n\t\t\t$couponIds = $data['coupons'];\n\t\t\n\t\t\t//NOTE: checking the coupon if its valid for the user is already done in the controller\n \t\tJModel::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/models' );\n \t\t$model = JModel::getInstance( 'Coupons', 'TiendaModel' );\n\t\t\t$model->setState( 'filter_ids', $couponIds );\t\t\t\t\t\n \t$coupons = $model->getList(); \t\n\t\t\tif(!empty($coupons))\n\t\t\t{\t\t\t\n\t\t\t\t$totalDiscount = 0;\t\n\t\t\t\tforeach($coupons as $coupon)\n\t\t\t\t{\t\t\n\t\t\t\t\t$orderitem_name = $coupon->coupon_code.\" \".JText::_('COM_TIENDA_DISCOUNT');\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \tif (empty($coupon->coupon_type))\n\t\t {\t\t \t\n\t\t // get the value\n\t\t switch ($coupon->coupon_value_type):\t\t \n\t\t case \"1\": // percentage\n\t\t $amount = ($coupon->coupon_value/100) * ($totalPrice + $totalTax);\t \n\t\t break;\n\t\t case \"0\": // flat-rate\n\t\t $amount = $coupon->coupon_value;\n\t\t break;\n\t\t endswitch;\n\t\t }\t \n\t\t $item_temp = new GoogleItem($orderitem_name,$orderitem_name,1,\"-\".$amount);\n\t\t\t\t\t// in argument of GoogleItem first itemname , itemDescription,quantity, unti price\n\t\t\t\t\t$cart->AddItem($item_temp);\t\n\t\t\t\t\t$totalDiscount = $totalDiscount + $amount;\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\tif ( !empty($data['shipping_plugin'] ) && ( $order->order_shipping > 0 ) )\n\t\t{\t\t\t\n\t\t\t//check if usps plugin\t\t\t\n\t\t\tif($data['shipping_plugin'] == 'shipping_usps')\n\t\t\t{\n\t\t\t\t$data['shipping_name'] = str_replace(\"®\", \"\", $data['shipping_name']);\n\t\t\t\t//convert entity character to hexadecimal character \n\t\t\t\t//$data['shipping_name'] = str_replace(\"®\", \"&#x3C;sup&#x3E;&#x26;reg;&#x3C;/sup&#x3E;\", $data['shipping_name']);\t\t\t\t\n\t\t\t}\t\t\t\t\t\n\t\t\t// Add shipping\n\t\t\t$shipTemp = new GooglePickup($data['shipping_name'], $order->order_shipping + $order->order_shipping_tax); // shipping name and Price as an argument\n\t\t\t$cart->AddShipping($shipTemp);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t//adjust the tax rate if discount is available\n\t\tif($order->order_discount > 0 )\n\t\t{\n\t\t\t$taxRate = $this->taxRateAdjustment( $order->order_subtotal, $order->order_discount, $order->order_tax);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//compute the tax rate for default tax\n\t\t\t$totalOrder = $order->order_total - ($order->order_shipping + $order->order_shipping_tax);\n\t\t\t$taxRate = $this->calcDefaultTaxRate($totalOrder, $order->order_subtotal);\n\t\t}\n\t\t\t\t\t \n\t // Set default tax options\n\t $tax_rule = new GoogleDefaultTaxRule($taxRate);\n\t $tax_rule->SetWorldArea(true);\n\t $cart->AddDefaultTaxRules($tax_rule);\n\t\t\n\t\t//$reponseURL = JURI::root() .\"plugins/tienda/{$this->_element}/library/responsehandler.php\";\t\t\n\t\t\n\t\t// Add merchant calculations options\n \t//$cart->SetMerchantCalculations(\n\t\t//\"{$reponseURL}\", // merchant-calculations-url\n // \"true\", // merchant-calculated tax\n // \"false\", // accept-merchant-coupons\n // \"false\"); // accept-merchant-gift-certificates\n\n\t\t$checkout_return_url = JURI::root() .\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element.\"&paction=display_message\";\n\t\t$cart->SetContinueShoppingUrl($checkout_return_url);\n\n\t\t// set oredr id and the Data\n\t\t$mcprivatedata= new MerchantPrivateData();\n\t\t$mcprivatedata->data= array(\"orderPaymentId\"=>$data['orderpayment_id']);\n\t\t$cart->SetMerchantPrivateData($mcprivatedata);\n\t\t$vars->cart=$cart;\n\n\t\t$html = $this->_getLayout('prepayment', $vars);\n\t\treturn $html;\n\t}", "function startOrderPayment() ;", "abstract public function processPayment();", "function update(&$order){\r\n\t\t//code to update billing info on a recurring subscription at the gateway and test results would go here\r\n\r\n\t\t//simulate a successful billing update\r\n\t\treturn true;\r\n\t}", "public function successAction()\n {\n\t\t\n if (!$this->getRequest()->isPost()) {\n $this->cancelAction();\n\t\t\treturn false;\n }\n\n $status = true;\n\n\t\t$response = $this->getRequest()->getPost();\t\t \t\t\n\t\tif (empty($response)) {\n $status = false;\n }\n\t\t\n\t\t$encResponse = '';\n\t\t \n\t\t$ccavenuepay = Mage::getModel('ccavenuepay/method_ccavenuepay');\n\t\t\n\t\t \n\t\t$encryptionkey \t= Mage::getStoreConfig('payment/ccavenuepay/encryptionkey');\n\t\tif(isset($response[\"encResp\"])){ $encResponse \t= $response[\"encResp\"]; }\n\t\t\n\t\t$rcvdString\t\t= $ccavenuepay->decrypt($encResponse,$encryptionkey);\t\n\t\t$decryptValues\t= explode('&', $rcvdString);\n\t\t$dataSize\t\t= sizeof($decryptValues);\n\t\t\n\t\t \n\t\t\n\t\t$Order_Id\t\t= '';\n\t\t$tracking_id\t= '';\n\t\t$order_status\t= '';\n\t\t$response_array\t= array();\n\t\t \n\t\tfor($i = 0; $i < count($decryptValues); $i++) \n\t\t{\n\t \t\t$information\t= explode('=',$decryptValues[$i]);\n\t\t\tif(count($information)==2)\n\t\t\t{\n\t\t\t\t$response_array[$information[0]] = $information[1];\n\t\t\t}\n\t\t\t \n\t\t}\n\t\t \n\t\t \n\t\tif(isset($response_array['order_id']))\t\t$Order_Id\t\t= $response_array['order_id'];\n\t\tif(isset($response_array['tracking_id']))\t$tracking_id\t= $response_array['tracking_id'];\n\t\tif(isset($response_array['order_status']))\t$order_status\t= $response_array['order_status'];\n\t\tif(isset($response_array['currency']))\t$currency = $response_array['currency'];\n\t\tif(isset($response_array['Amount']))\t$payment_mode = $response_array['Amount'];\n\t\t\n\t\t$order_history_comments ='';\n\t\t$order_history_keys =array('tracking_id','failure_message','payment_mode','card_name','status_code','status_message','bank_ref_no');\n\t\tforeach($order_history_keys as $order_history_key)\n\t\t{\n\t\t \n\t\t\tif((isset($response_array[$order_history_key])) && trim($response_array[$order_history_key])!='')\n\t\t\t{\n\t\t\t\tif(trim($response_array[$order_history_key]) == 'null' ) continue;\n\t\t\t\t$order_history_comments .= $order_history_key.\" : \".$response_array[$order_history_key];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$order_history_comments_array= array(); \n\t\t$order_history_comments_array[] = $order_history_comments;\n\t\t \n\t\t\n\t \n\t\tif($order_status == \"Success\")\n\t\t{\n\t\t\t \n\t\t\t$order = Mage::getModel('sales/order');\n\t\t\t$order->loadByIncrementId($Order_Id); \n\t\t\t \n\t\t\t$f_passed_status = Mage::getStoreConfig('payment/ccavenuepay/payment_success_status');\n\t\t\t$message = Mage::helper('Ccavenuepay')->__('Your payment is authorized.');\n\t\t\t$order->setState($f_passed_status, true, $message);\n\t\t\t \n\t\t\t\n\t\t\tif($order_history_comments !='') $order->addStatusHistoryComment($order_history_comments,true);\n\t\t\t///////////////////////////////////\n\t\t\t$payment_confirmation_mail = Mage::getStoreConfig('payment/ccavenuepay/payment_confirmation_mail');\n\t\t\tif($payment_confirmation_mail==\"1\")\n\t\t\t{\t\n\t\t\t\t$order->sendOrderUpdateEmail(true,'Your payment is authorized.');\n\t\t\t}\n\t\t\t////////////////////////////\n\t\t\t$order->save();\n\t\t\t\n\t\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\t$session->setQuoteId($session->getCcavenuepayStandardQuoteId(true));\n\t\t\t/**\n\t\t\t * set the quote as inactive after back from Ccavenuepay\n\t\t\t */\n\t\t\tMage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n\t\t\t$this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$error_message = \" Order Cancel due to order status \".$order_status;\n\t\t\t$order_history_comments_array[] = \t$error_message; \t\t\t\n\t\t\t$this->getCheckout()->setCcavenuepayErrorMessage($order_history_comments_array ); \t\t\t\n\t\t\t$this->cancelAction();\n\t\t\treturn false;\n\t\t}\n }", "public function bsuccessAction() {\n\t\t\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName, true);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t\n\t\t\n\t\t$typeData = $session->getTypeData();\n\t\t\n\t\t$privateId = $session->getBusinessPrivateId();\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t//echo \"<pre>business \";print_r($orderData);die;\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\n\t\t\tif ($orderDetails['purchase'][\"paymentName\"] == \"DirectInvoice\"){\n\t\t\t\t$session->setData('use_fee', 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$session->setData('use_fee', 5);\n\t\t\t}\n\t\t\n\t\tif($orderDetails){\n\t\t\t$email = $orderDetails['businessCustomer']['email'];\n\t\t\t$mobile = $orderDetails['businessCustomer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['businessCustomer']['deliveryAddress']['companyName'];\n\t\t\t$lastName = $orderDetails['businessCustomer']['deliveryAddress']['companyName'];\n\t\t\t$street = $orderDetails['businessCustomer']['invoiceAddress']['address'];\n\t\t\tif ($orderDetails['businessCustomer']['invoiceAddress']['address'] == ''){\n\t\t\t\t$street = $orderDetails['businessCustomer']['invoiceAddress']['city'];\n\t\t\t}\n\t\t\tif($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Sverige'){\t\n\t\t\t\t$scountry_id = \"SE\";\n\t\t\t}\n\t\t\telse if ($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Norge'){\n\t\t\t\t$scountry_id = \"NO\";\n\t\t\t}\n\t\t\telse if ($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Suomi'){\n\t\t\t\t$scountry_id = \"FI\";\n\t\t\t}\n\t\t\telse if ($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Deutschland'){\n\t\t\t\t$scountry_id = \"DE\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$scountry_id = $orderDetails['businessCustomer']['countryCode'];\n\t\t\t}\n\t\t\tif($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Sverige'){ \n\t\t\t\t$bcountry_id = \"SE\";\n\t\t\t}\n\t\t\telse if ($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Norge'){\n\t\t\t\t$bcountry_id = \"NO\";\n\t\t\t}\n\t\t\telse if ($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Suomi'){\n\t\t\t\t$bcountry_id = \"FI\";\n\t\t\t}\n\t\t\telse if ($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Deutschland'){\n\t\t\t\t$bcountry_id = \"DE\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$bcountry_id = $orderDetails['businessCustomer']['countryCode'];\n\t\t\t}\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['invoiceAddress']['companyName'], \n\t\t\t\t'street' => $street,\n\t\t\t\t'city' => $orderDetails['businessCustomer']['invoiceAddress']['city'],\n\t\t\t\t'country_id' => $bcountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['invoiceAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['deliveryAddress']['companyName'], \n\t\t\t\t'street' => $street,\n\t\t\t\t'city' => $orderDetails['businessCustomer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName, true);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName, true);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName,true);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods($quote);\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$shippingMethod = \"freeshipping_freeshipping\";\n\t\t\t}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\t\t\t//die;\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->unsBusinessPrivateId();\n\t\t\t\t\n\t\t\t\t$session->setData('business_private_id', null);\n\t\t\t\t$session->setData('business_public_token', null);\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName, true);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tMage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($order->getId())));\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName, true);\t\t\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName, true);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName, true);\t\t\n\t}", "function doPayment() {\n\t\tif ($this->_debug) trigger_error(\"Reports -> \" . get_class($this). \" ! doPayment()\" , E_USER_NOTICE);\n\t\tif ($this->_mode == PAYMENT_ENGINE_SEND) {\n\n\t\t\tif ($this->_verifyData()) {\n\t\t\t\t$this->formMessage();\n\t\t\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\t\t\texit();\n\t\t\t} else {\n\t\t\t\tif ($this->_debug) trigger_error(\"- Parameters set incorrectly.\", E_USER_WARNING);\n\t\t\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\ttrigger_error(\"- In mode PAYMENT_ENGINE_RECEIVE method doPayment() is not available.\", E_USER_ERROR);\n\t\t}\n\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\treturn false;\n\t}", "public function requestGooglePay()\n {\n $paymentToken = request()->get('paymentToken');\n\n if(empty($paymentToken)) return redirect()->route('site.cart');\n\n $paymentToken = base64_decode($paymentToken);\n\n $order = $this->getCookieOrder();\n\n $order_id = $order['data']['order_id'];\n\n $this->telegramMessage($paymentToken, $order_id, 'GOOGLE PAY TOKEN');\n\n $amount = number_format($order['data']['price_sum'], 2, '.', '');\n\n $key = config('app.PLATON_GOOGLE_AND_APPLE_PAYMENT_KEY');\n $pass = config('app.PLATON_GOOGLE_AND_APPLE_PAYMENT_PASSWORD');\n\n if($this->mode === 'TEST') $data_order_id = 'TEST GooglePay-' . $order_id ;\n else $data_order_id = 'ORDER_ID #' . $order_id;\n\n $CLIENT_PASS = $pass;\n $data['action'] = 'GOOGLEPAY';\n $data['CLIENT_KEY'] = $key;\n $data['order_id'] = $data_order_id;\n $data['order_amount'] = $amount;\n $data['order_currency'] = 'UAH';\n $data['order_description'] = \"Google Pay order payment. Order ID: $order_id\";\n $data['payment_token'] = $paymentToken;\n $data['payer_email'] = '';\n $data['term_url_3ds'] = route('site.google-pay-success');\n $hash = md5(\n strtoupper(\n strrev(\n $data['payer_email']\n ).\n ($CLIENT_PASS).\n strrev(\n $data['payment_token']\n )\n )\n );\n // info($data);\n $data['client_key'] = $data['CLIENT_KEY'];\n $data['hash'] = $hash;\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, \"https://secure.platononline.com/post/\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Access-Control-Allow-Origin: *'));\n\n if(!($response = curl_exec($ch)))\n {\n $this->telegramMessage(curl_error($ch), $order_id, 'PLATON GOOGLE PAY CURL REQUEST ERROR');\n $this->telegramMessage($ch, $order_id);\n\n $this->updatePaymentOrder($order_id, self::GOOGLE_PAY, curl_error($ch), 0);\n\n return Redirect::route('site.order-checkout')->withErrors([\n 'error'=>'Во время инициализации платежа произошла ошибка! Выберите другой способ оплаты или свяжитесь с поддержкой сайта для завершения оформления заказа!']);\n }\n\n curl_close($ch);\n\n $responseArr = json_decode($response, true);\n\n if(isset($responseArr[\"result\"]) && $responseArr[\"result\"] === \"REDIRECT\" && $responseArr[\"status\"] === \"3DS\" && $responseArr[\"hash\"] === $hash) {\n\n $this->telegramMessage($response, $order_id, 'PLATON GET 3DS REDIRECT');\n\n return view('site.orders.googlePay3DSredirect', [\n 'data' => [\n 'PaReq' => $responseArr['redirect_params']['PaReq'],\n 'TermUrl' => $responseArr['redirect_params']['TermUrl'],\n ],\n 'redirect_url' => $responseArr['redirect_url']\n ]);\n }\n else {\n\n $this->telegramMessage($response, $order_id, 'PLATON CURL GOOGLE PAY REQUEST DECLINED');\n // неудачный платеж\n $this->updatePaymentOrder($order_id, self::GOOGLE_PAY, $response, 0);\n\n return Redirect::route('site.order-checkout')->withErrors([\n 'error'=>'Не удалось выполнить транзакцию платежа. Выберите другой способ оплаты или свяжитесь с поддержкой сайта для завершения оформления заказа!']);\n }\n }", "function process_payment($order_id)\n {\n global $woocommerce;\n $order = new WC_Order($order_id);\n // Return thankyou redirect\n return array(\n 'result' => 'success',\n 'redirect' => $this->get_return_url($order),\n );\n }", "function plgVmOnPaymentResponseReceived(&$html) {\r\n\t\t$virtuemart_paymentmethod_id = vRequest::getInt('pm', 0);\r\n\t\t$order_R_number = vRequest::getVar('on', 0);\r\n\t\t$vendorId = 0;\r\n\t\tif (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {\r\n\t\t\treturn null; // Another method was selected, do nothing\r\n\t\t}\r\n\t\tif (!$this->selectedThisElement($method->payment_element)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!class_exists('VirtueMartCart'))\r\n\t\trequire(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');\r\n\t\tif (!class_exists('shopFunctionsF'))\r\n\t\trequire(JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php');\r\n\t\tif (!class_exists('VirtueMartModelOrders'))\r\n\t\trequire( JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php' );\r\n\r\n\t\t$nochex_data = vRequest::get('post');\r\n\t\t$payment_name = $this->renderPluginName($method);\r\n\r\n\t\tif (!empty($nochex_data)) {\r\n\t\t\tvmdebug('plgVmOnPaymentResponseReceived', $nochex_data);\r\n\t\t\t$order_number = $nochex_data['order_id'];\r\n\t\t\t$return_context = $nochex_data['custom'];\r\n\t\t\tif (!class_exists('VirtueMartModelOrders'))\r\n\t\t\trequire( JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php' );\r\n\t\t\t$virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number);\r\n\t\t\t$payment_name = $this->renderPluginName($method);\r\n\t\t\tif ($virtuemart_order_id) {\r\n\t\t\t\t$order['customer_notified']=0;\r\n\t\t\t\t$order['order_status'] = $this->_getPaymentStatus($method, \"\");\r\n\t\t\t\t$order['comments'] = JText::sprintf('VMPAYMENT_NOCHEX_PAYMENT_STATUS_CONFIRMED', $order_number);\r\n\t\t\t\t// send the email ONLY if payment has been accepted\r\n\t\t\t\t$modelOrder = VmModel::getModel('orders');\r\n\t\t\t\t$orderitems = $modelOrder->getOrder($virtuemart_order_id);\r\n\t\t\t\t$nb_history = count($orderitems['history']);\r\n\t\t\t\tif ($orderitems['history'][$nb_history - 1]->order_status_code != $order['order_status']) {\r\n\t\t\t\t\t//$this->_storeNochexInternalData($method, $nochex_data, $virtuemart_order_id);\r\n\t\t\t\t\t$this->debugLog('plgVmOnPaymentResponseReceived, sentOrderConfirmedEmail ' . $order_number, 'message', 'debug');\r\n\t\t\t\t\t$order['virtuemart_order_id'] = $virtuemart_order_id;\r\n\t\t\t\t\t$order['comments'] = JText::sprintf('VMPAYMENT_NOCHEX_EMAIL_SENT');\r\n\t\t\t\t\t$modelOrder->updateStatusForOneOrder($virtuemart_order_id, $order, true);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tvmError('Nochex data received, but no order number');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number);\r\n\t\t}\r\n\t\t/*if (!($paymentTable = $this->_getNochexInternalData($virtuemart_order_id, $order_number) )) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t$html = $this->_getPaymentResponseHtml($paymentTable, $payment_name);*/\r\n\t\t\r\n\t\t$html = '<table>' . \"\\n\";\r\n\t\t$html .= '<tr><td>Order updated for '.$order_R_number.' </td></tr>';\r\n\t\t$html .= '</table>' . \"\\n\";\r\n\t\t\r\n\t\t//We delete the old stuff\r\n\t\t// get the correct cart / session\r\n\t\t$cart = VirtueMartCart::getCart();\r\n\t\t$cart->emptyCart();\r\n\t\treturn true;\r\n\t}", "function startPayment() ;", "function check_response(){\n\t \tglobal $woocommerce;\n\n\t\t\tif( isset($_POST['order_id']) ){\n\n\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t$this->log->add( 'visanet', 'Procesando la vuelta de VisaNet orden: ' . $_POST['order_id'] );\n\t\t\t\t}\n\n\t\t\t\t$order_id = $_POST['order_id'];\n\n\t\t\t\t$order = new WC_Order( $order_id );\n\n\t\t\t\t$arrayIn = array(\n\t\t\t\t\t'IDCOMMERCE' => $_POST['IDCOMMERCE'],\n\t\t\t\t\t'IDACQUIRER' => $_POST['IDACQUIRER'],\n\t\t\t\t\t'XMLRES'\t => $_POST['XMLRES'],\n\t\t\t\t\t'DIGITALSIGN'=> $_POST['DIGITALSIGN'],\n\t\t\t\t\t'SESSIONKEY' => $_POST['SESSIONKEY']\n\t\t\t\t\t);\n\n\t\t\t\t$arrayOut = array();\n\n\t\t\t\tif( $this->VPOSResponse( $arrayIn, $arrayOut, $this->llaveVPOSFirmaPublica, $this->llaveComercioCryptoPrivada, $this->vector) ){\n\t\t\t\t\t//La salida esta en $arrayOut con todos los parametros decifrados devueltos por el VPOS \n\t\t\t\t\tif(isset($arrayOut['authorizationResult'])){\n\t\t\t\t\t\t$resultadoAutorizacion = $arrayOut['authorizationResult'];\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($arrayOut['authorizationCode'])){\n\t\t\t\t\t\t$codigoAutorizacion = $arrayOut['authorizationCode'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'visanet', 'Transaccion : ' . wc_clean( $arrayOut['purchaseOperationNumber'] ) . ' | Resultado de la transaccion: ' . $resultadoAutorizacion . ' | DATA : ' . json_encode($arrayOut));\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $resultadoAutorizacion != '00' && $resultadoAutorizacion != '11') {\n\n\t\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t\t$this->log->add( 'visanet', 'Transaccion : ' . wc_clean( $arrayOut['purchaseOperationNumber'] ) . ' | Error: ' . $resultadoAutorizacion . ' | ' . $arrayOut['errorCode'] . ' - ' . $arrayOut['errorMessage'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$order->update_status( 'failed', __( 'Transaccion : ' . wc_clean( $arrayOut['purchaseOperationNumber'] ) . ' | Error: ' . $resultadoAutorizacion . ' | ' . $arrayOut['errorCode'] . ' - ' . $arrayOut['errorMessage'], 'woocommerce' ) );\n\n\t\t\t\t\t\t$result = 'failed';\n\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_purchase_operation_number', wc_clean( $arrayOut['purchaseOperationNumber'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_purchase_amount', wc_clean( $arrayOut['purchaseAmount'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_purchase_currency_code', wc_clean( $arrayOut['purchaseCurrencyCode'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_authorizarion_result', wc_clean( $arrayOut['authorizationResult'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_error_code', wc_clean( $arrayOut['errorCode'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_error_message', wc_clean( $arrayOut['errorMessage'] ) );\n\n\t\t\t\t\t\t$this->web_redirect($order->get_checkout_order_received_url());\n\t\t\t\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t\t$this->log->add( 'visanet', 'Pago Completado: ' . $resultadoAutorizacion );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Reduce stock levels\n\t\t\t\t\t\t$order->reduce_order_stock();\n\n\t\t\t\t\t\t// Remove cart\n\t\t\t\t\t\t$woocommerce->cart->empty_cart();\n\n\t\t\t\t\t\t$order->update_status( 'completed', __( 'Transaccion : ' . wc_clean( $arrayOut['purchaseOperationNumber'] ) . 'Completa : ' . $resultadoAutorizacion . ' | ' . $arrayOut['errorCode'] . ' - ' . $arrayOut['errorMessage'], 'woocommerce' ) );\n\n\t\t\t\t\t\t// Store PP Details\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_purchase_operation_number', wc_clean( $arrayOut['purchaseOperationNumber'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_purchase_amount', wc_clean( $arrayOut['purchaseAmount'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_purchase_currency_code', wc_clean( $arrayOut['purchaseCurrencyCode'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_authorizarion_result', wc_clean( $arrayOut['authorizationResult'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_authorizarion_code', wc_clean( $arrayOut['authorizationCode'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_error_code', wc_clean( $arrayOut['errorCode'] ) );\n\t\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_error_message', wc_clean( $arrayOut['errorMessage'] ) );\n\n\t\t\t\t\t\t$order->payment_complete();\n\t\t\t\t\t\t$result = 'success';\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}else{\n\t\t\t\t\t//Puede haber un problema de mala configuración de las llaves, vector de\n\t\t\t\t\t//inicializacion o el VPOS no ha enviado valores correctos \n\t\t\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t\t\t$this->log->add( 'visanet', 'Ha ocurrido un error, tal vez las llaves o vector esten mal configurados.' );\n\t\t\t\t\t}\n\t\t\t\t\t$result = 'failed';\n\t\t\t\t\t\n\t\t\t\t\t$order->update_status( 'failed', __( 'Error! Hubo algun problema en la comunicación con VisaNet. Verifique que la configuración esta correcta.', 'woocommerce' ) );\n\n\t\t\t\t\tupdate_post_meta( $order_id, '_visanet_error_message', 'Error! Hubo algun problema en la comunicación con VisaNet. Verifique que la configuración esta correcta.' );\n\n\t\t\t\t\t$this->web_redirect($order->get_checkout_order_received_url());\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t }", "public function responseAction()\r\n {\r\n Mage::log(\"en response action\");\r\n\r\n\r\n if ($this->getRequest()->isPost()) {\r\n\r\n Mage::log(\"en response action post\");\r\n $PFHelper = new PagoFacilHelper();\r\n $token_service = Mage::getStoreConfig('payment/externalpayment/servicetoken');\r\n $token_secret = Mage::getStoreConfig('payment/externalpayment/secrettoken');\r\n\r\n $POSTsignaturePayload = json_decode(file_get_contents('php://input'), true);\r\n\r\n\r\n $POSTsignature = $POSTsignaturePayload['pf_signature'];\r\n unset($POSTsignaturePayload['pf_signature']);\r\n\r\n\r\n $generatedSignature = $PFHelper->generateSignature($POSTsignaturePayload, $token_secret);\r\n\r\n //check signature\r\n\r\n if ($generatedSignature !== $POSTsignature) {\r\n print_r(\"NOT THE SAME SIGNATURE!!\");\r\n $PFHelper->httpResponseCode(400);\r\n }\r\n\r\n //get the order\r\n $order = Mage::getModel('sales/order');\r\n $order->loadByIncrementId($POSTsignaturePayload['pf_order_id']);\r\n\r\n\r\n //get customer data\r\n $customerData = Mage::getModel('customer/customer')->load($order->getCustomerId());\r\n\r\n Mage::log(\"viene el if\");\r\n\r\n Mage::log($customerData->customer_email);//not working\r\n\r\n\r\n Mage::log(\"dentro del if\");\r\n $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'Gateway has authorized the payment.');\r\n\r\n $order->sendNewOrderEmail();\r\n $order->setEmailSent(true);\r\n\r\n $order->save();\r\n\r\n /*\r\n /* Your gateway's code to make sure the reponse you\r\n /* just got is from the gatway and not from some weirdo.\r\n /* This generally has some checksum or other checks,\r\n /* and is provided by the gateway.\r\n /* For now, we assume that the gateway's response is valid\r\n */\r\n\r\n /*\r\n $validated = true;\r\n $orderId = '123'; // Generally sent by gateway\r\n\r\n if ($validated) {\r\n // Payment was successful, so update the order's state, send order email and move to the success page\r\n $order = Mage::getModel('sales/order');\r\n $order->loadByIncrementId($orderId);\r\n $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'Gateway has authorized the payment.');\r\n\r\n $order->sendNewOrderEmail();\r\n $order->setEmailSent(true);\r\n\r\n $order->save();\r\n\r\n Mage::getSingleton('checkout/session')->unsQuoteId();\r\n\r\n Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure' => true));\r\n } else {\r\n // There is a problem in the response we got\r\n $this->cancelAction();\r\n Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => true));\r\n }\r\n */\r\n\r\n } else\r\n Mage_Core_Controller_Varien_Action::_redirect('');\r\n }", "function dms_custom_payment_complete($order_id) {\n\n\t}", "public function submitPayment()\n {\n return array('error'=>0, 'transactionReference'=>'');\n }", "public function successful_request($posted)\n {\n $orderId = $posted['ordernumber'];\n\n $order = wc_get_order($orderId);\n\n // Check order not already completed\n if ($order->get_status() === 'completed') {\n exit;\n }\n\n // Payment completed\n $order->add_order_note(__('Платеж успешно завершен.', 'woocommerce'));\n $order->payment_complete($posted['billnumber']);\n exit;\n }", "function plgVmOnPaymentResponseReceived(&$html) {\n\t\t$virtuemart_paymentmethod_id = JRequest::getInt('pm', 0);\n\t\t$order_number = JRequest::getVar('on', 0);\n\t\t\n\t\t$vendorId = 0;\n\t\tif (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {\n\t\t\treturn null; // Another method was selected, do nothing\n\t\t}\n\t\tif (!$this->selectedThisElement($method->payment_element)) {\n\t\t\treturn false;\n\t\t}\n\tif (!class_exists('VirtueMartCart'))\n\t require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');\n\tif (!class_exists('shopFunctionsF'))\n\t require(JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php');\n\tif (!class_exists('VirtueMartModelOrders'))\n\t require( JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php' );\n\t\t$Vmzarinpalzg_data = JRequest::getVar('on');\n\t\t$payment_name = $this->renderPluginName($method);\n$virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number);\n\t\t if ($virtuemart_order_id) {\n\t\t\tif (!class_exists('VirtueMartCart'))\n\t\t\t \n\t\t\t$cart = VirtueMartCart::getCart();\t\t\t\n$ons = $_GET['on'];\n $authority = $_REQUEST['Authority'];\n $status = $_REQUEST['Status'];\n\n if ($authority) {\n\n }\n\n if ($status== \"OK\") {\n\tinclude_once('nusoap.php');\n\t$au = $_GET['Authority'];\n\t$soapclient = new nusoap_client('https://de.zarinpal.com/pg/services/WebGate/wsdl', 'wsdl');\n\t$res = $soapclient->call(\"PaymentVerification\", array(\n\tarray(\n\t\t\t\t\t'MerchantID'\t => $merchantID ,\n\t\t\t\t\t'Authority' \t => $au ,\n\t\t\t\t\t'Amount'\t \t=> $amount\n\t\t\t\t)\n\t\n\t));\n\t//if ( (!$soapclient) OR ($err = $soapclient->getError()) ) {\n\t // this is unsucccessfull connection\n // echo $err . \"<br />\" ;\n\n } else {\n\t // $status = 0 ; // default status\n \n \n\t $status = $res->Status;\n\n\t if ($status == 100) {\n\t $dbcoupon = JFactory::getDBO(); \n \n $inscoupon = new stdClass(); \n \n $inscoupon->order_status = \"C\"; \n $inscoupon->order_number = \"$ons\"; \n \n if($dbcoupon->updateObject(\"#__virtuemart_orders\", $inscoupon, 'order_number')){ \n \n unset($dbcoupon); \n \n }else{ \n \n echo $dbcoupon->stderr(); \n } \t\n\t\t\t\t\t\t\t\t$dbcccwpp =& JFactory::getDBO();\n\t\t\t\t\t\t\t\t$dbcccowpp = \"select * from `#__virtuemart_orders` where `order_number` = '$ons' AND `order_status` ='C'\";\n\t\t\t\t\t\t\t\t$dbcccwpp->setQuery($dbcccowpp);\n\t\t\t\t\t\t\t\t$dbcccwpp->query();\n\t\t\t\t\t\t\t\t$dbcccowpp = $dbcccwpp->loadobject();\t\n\t\t\t$opass=\t$dbcccowpp->order_pass;\t\n$vmid=\t$dbcccowpp->virtuemart_user_id;\t\t\t\n\t\t\t\t\t\t\t\t$dbcccw =& JFactory::getDBO();\n\t\t\t\t\t\t\t\t$dbcccow = \"select * from `#__users` where `id` = '$vmid'\";\n\t\t\t\t\t\t\t\t$dbcccw->setQuery($dbcccow);\n\t\t\t\t\t\t\t\t$dbcccw->query();\n\t\t\t\t\t\t\t\t$dbcccow = $dbcccw->loadobject();\n$mm=$dbcccow->email;\t\t\t\t\t\t\t\n\t\t\t$app =& JFactory::getApplication();\t\t\t\n\t\t\t $sitename = $app->getCfg('sitename');\n\t\t\t\t$subject =\"\".$sitename.\" - فاکتور خرید\";\n\t\t\t $add = JURI::base().\"index.php?option=com_virtuemart&view=orders&layout=details&order_number=\" . $ons . \"&order_pass=\" . $opass ;\n\t\t\t\t$body = \"از خرید شما ممنونیم\". '<br />' . '<b>شناسه خرید شما'. ':</b>' . ' ' . $SaleReferenceId . '<br />' . '<b>شماره فاکتور'. ':</b>' . ' ' . $ons.'<br/>'. '<a href=\"'. $add.'\">نمایش فاکتور</a>';\n\t\t\t\t$to = array( $mm , $mmm ); \n\t\t\t\t$config =& JFactory::getConfig();\n\t\t\t\t$from = array( \n\t\t\t\t$config->getValue( 'config.mailfrom' ),\n\t\t\t\t$config->getValue( 'config.fromname' ) );\n\t\t\t\t# Invoke JMail Class\n\t\t\t\t$mailer = JFactory::getMailer();\n\t\t\t\t \n\t\t\t\t# Set sender array so that my name will show up neatly in your inbox\n\t\t\t\t$mailer->setSender($from);\n\t\t\t\t \n\t\t\t\t# Add a recipient -- this can be a single address (string) or an array of addresses\n\t\t\t\t$mailer->addRecipient($to);\n\t\t\t\t \n\t\t\t\t$mailer->setSubject($subject);\n\t\t\t\t$mailer->setBody($body);\n\t\t\t\t$mailer->isHTML();\n\t\t\t\t$mailer->send();\n\t\t\t\t\n\t$payment_name = $this->renderPluginName($method);\n\n\t//We delete the old stuff\n\t// get the correct cart / session\n\t$cart = VirtueMartCart::getCart();\n\t$cart->emptyCart();\n\n\t } else {\n\n\t // this is a UNsucccessfull payment\n\t // we update our DataBase\n\n\t echo \"Couldn't Validate Payment with Vmzarinpal \".$status ;\n\n\t }\n\n\t}\n\n\n } else {\n\t // this is a UNsucccessfull payment\n\n }\n\n\t\t}", "function gw_do_normal_payment_check( $balance_to_pay=0, $total_package_cost=0, $upgrade=0 )\n\t{\n\t\t$this->gateway->error = \"\";\n\t\t\n\t\t//--------------------------------------\n\t\t// INIT\n\t\t//--------------------------------------\n\t\t\n\t\t$return = array();\n\t\t\n\t\t//--------------------------------------\n\t\t// Completed\n\t\t//--------------------------------------\n\t\n\t\tif ( $_POST['payment_status'] == 'Completed' )\n\t\t{\n\t\t\t//--------------------------------------\n\t\t\t// Check amount..\n\t\t\t//--------------------------------------\n\t\t\t\n\t\t\tif ( $_POST['mc_gross'] == $total_package_cost )\n\t\t\t{\n\t\t\t\t//--------------------------------------\n\t\t\t\t// Paid correct amount\n\t\t\t\t//--------------------------------------\n\t\t\t\t\n\t\t\t\t$return['amount_paid'] = $_POST['mc_gross'];\n\t\t\t\t$return['state'] = 'PAID';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $upgrade )\n\t\t\t\t{\t\n\t\t\t\t\t//--------------------------------------\n\t\t\t\t\t// Upgrading....\n\t\t\t\t\t//--------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $_POST['mc_gross'] == $balance_to_pay )\n\t\t\t\t\t{\n\t\t\t\t\t\t$return['amount_paid'] = $_POST['mc_gross'];\n\t\t\t\t\t\t$return['state'] = 'PAID';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//--------------------------------------\n\t\t\t\t\t// Incorrect amount\n\t\t\t\t\t//--------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->error = \"Wrong payment amount. Looking for {$total_package_cost}, got {$_POST['mc_gross']}\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if ( $_POST['payment_status'] == 'Pending' )\n\t\t{\n\t\t\t//-----------------------\n\t\t\t// Failed...\n\t\t\t//-----------------------\n\t\t\t\n\t\t\t$return['state'] = 'PENDING';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------\n\t\t\t// End of subscription\n\t\t\t//-----------------------\n\t\t\t\n\t\t\t$return['state'] = 'FAILED';\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "public function finishOrder_post(){\n $token = $this->input->post('token');\n $user_data = $this->verificationToken($token);\n if($user_data['result'] == true){\n $client_id = $user_data['user_data']->id;\n $service_id = $this->post('service_id');\n $order_id = $this->post('order_id');\n $rate_score = $this->post('rate_score');\n $feedback_content = $this->post('feedback');\n $this->order_model->updateAssignedJob($order_id, 6);\n $this->feedback_model->insertNewRecord($order_id, $client_id, $service_id, $rate_score, $feedback_content);\n $data['result'] = 'true';\n $this->response($data);\n }\n else{\n $data['result'] = 'false';\n $this->response($data);\n }\n }", "public function validatePayment()\n {\n }", "public function validatePayment()\n {\n }", "function payment()\n\t{\n\t\t$this->setTransactionDataWords();\n\t\t$this->error = new error('Payment class');\n\t}", "function confirm_payment() {\n\n require_once 'payson/lib/paysonapi.php';\n\n $data = file_get_contents('php://input');\n $credentials = new PaysonCredentials(PAYSON_AGENT_ID, PAYSON_API_KEY);\n $api = new PaysonApi($credentials, IS_TEST);\n $response = $api->validate($data);\n\n if (!$response->isVerified()) {\n return false;\n }\n\n return payment_details_to_structure($response->getPaymentDetails());\n}", "function _processSale( $data, $error='' , $payment_details)\n\t\t{\n\t\t\t/*\n\t\t\t * validate the payment data\n\t\t\t */\n\t\t\t$errors = array();\n\t\t\n\t\t\tif (!empty($error))\n\t\t\t{\n\t\t\t\t$errors[] = $error;\n\t\t\t}\n\t\t\t// load the orderpayment record and set some values\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\n\t\t\t$orderpayment = JTable::getInstance('OrderPayments', 'TiendaTable');\n\t\t\t\t\n\t\t\t$googleOrderNumber=$data['google-order-number']['VALUE'];\n\t\t\t\t\n\t\t\t// Loading the order payment on ht basis of the google-order-number\n\t\t\t\t\n\t\t\t$orderpayment->load(array ('transaction_id'=> $googleOrderNumber) );\n\t\t\n\t\t\tif (empty($orderpayment->orderpayment_id))\n\t\t\t{\n\t\t\t\t$errors[] = JText::_('COM_TIENDA_GOOGLECHECKOUT_INVALID_GOOGLE_CHECKOUT_ORDER_ID');\n\t\t\t\treturn count($errors) ? implode(\"\\n\", $errors) : '';\n\t\t\t}\n\t\t\t\t\n\t\t\t//\tSvaing Financial order state\n\t\t\t$orderpayment->transaction_details = $payment_details;\n\t\t\n\t\t\t// Svaing payment status Completed\n\t\t\t$orderpayment->transaction_status = \"Completed\";\n\t\t\n\t\t\t// set the order's new status and update quantities if necessary\n\t\t\tTienda::load( 'TiendaHelperOrder', 'helpers.order' );\n\t\t\tTienda::load( 'TiendaHelperCarts', 'helpers.carts' );\n\t\t\t$order = JTable::getInstance('Orders', 'TiendaTable');\n\t\t\t$order->load( $orderpayment->order_id );\n\t\t\tif (count($errors))\n\t\t\t{\n\t\t\t\t// if an error occurred\n\t\t\t\t$order->order_state_id = $this->params->get('failed_order_state', '10'); // FAILED\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$order->order_state_id = $this->params->get('payment_received_order_state', '17');; // PAYMENT RECEIVED\n\n // do post payment actions\n $setOrderPaymentReceived = true;\n\t\t\n\t\t\t\t// send email\n\t\t\t\t$send_email = true;\n\t\t\t}\n\t\t\n\t\t\t// update the order\n\t\t\tif (!$order->save())\n\t\t\t{\n\t\t\t\t$errors[] = $order->getError();\n\t\t\t}\n\t\t\n\t\t\t// update the orderpayment\n\t\t\tif (!$orderpayment->save())\n\t\t\t{\n\t\t\t\t$errors[] = $orderpayment->getError();\n\t\t\t}\n\t\t\t\n\t\t if (!empty($setOrderPaymentReceived))\n {\n $this->setOrderPaymentReceived( $orderpayment->order_id );\n }\n\t\t\n\t\t if ($send_email)\n {\n // send notice of new order\n Tienda::load( \"TiendaHelperBase\", 'helpers._base' );\n $helper = TiendaHelperBase::getInstance('Email');\n $model = Tienda::getClass(\"TiendaModelOrders\", \"models.orders\");\n $model->setId( $orderpayment->order_id );\n $order = $model->getItem();\n $helper->sendEmailNotices($order, 'new_order');\n }\n\t\t\n\t\t\treturn count($errors) ? implode(\"\\n\", $errors) : '';\n\t\t}", "public function successPayement(Request $request) {\n\n\n\n\n $payment_id = Session::get('paypal_payment_id');\n\n Session::forget('paypal_payment_id');\n\n if (empty($_GET['PayerID']) || empty($_GET['token'])) {\n \\Session::put('error', 'Payment failed');\n return Redirect::route('/');\n }\n\n \n $execution = new PaymentExecution();\n $execution->setPayerId($_GET['PayerID']);\n $payment = Payment::get($payment_id, $this->_api_context);\n $result = $payment->execute($execution, $this->_api_context);\n\n\n if ($result->getState() == 'approved') {\n\n $order_id = OrdersHelper::save();\n \n $data = [\n 'order_id' => $order_id ,\n 'method' => 'paypal',\n ];\n \n $payement_id = Payement::create($data);\n\n $order = Orders::find($order_id);\n $order->payement_id = $payement_id;\n $order->statue = 'success';\n $order->shipping_id = $shippingid ?? NULL;\n $order->serial = Session::get('order_serial');\n\n\n $geo = geoip(\\Request::ip());\n\n $order->device = Browser::browserFamily();\n $order->ip = $geo['ip'];\n $order->country = $geo['country'];\n $order->platform = Browser::platformName();\n\n\n $order->save();\n\n\n define('API_ACCESS_KEY','AAAAOjRPgWU:APA91bE1YoEMWzykvvsECM1Wv1iwhvk_KOcw5Bi1h_GJDDo3qlV7izJ54qwcmL31xFjqFR0SHRJTgi50Cjpxs4gLOwK-C06Zu2nm6eUacnMkPtnthdxw8-6hJ6iFHXaBytR-vyJpYoF-');\n $fcmUrl = 'https://fcm.googleapis.com/fcm/send';\n\n $notification = [\n 'title' =>'O-BAZAAR ORDER',\n 'body' => 'SALAM MOHAMED ALKHATEEB',\n 'sound' => 1,\n \"sound\" => \"default\",\n \"click_action\"=> \"Open_URI\"\n ];\n \n\n $extraNotificationData = [\"message\" => $notification];\n\n $fcmNotification = [\n 'to' => 'dxLWDVEVmYI:APA91bFTWne2Fjuii6kkYKNCZSM5uBRO2QQPPMWrDbJuQcJucMEYLLfmoSnhf_tORX0P--YBOoWg5rULzVjKfYlR7y7oWmxRwko9X3N0v2SLDgfjK7Q8uwQvNaLSrrMxGMBq9sdjpQ5J',\n 'notification' => $notification,\n 'data' => [\n \"uri\"=> \"https://o-bazaar.com/merchant/orders/edit/\".$order->id,\n \"msg_type\" =>\"Hello \",\n \"request_id\" =>7,\n \"image_url\" => 'https://www.gstatic.com/mobilesdk/160503_mobilesdk/logo/2x/firebase_28dp.png',\n \"user_name\"=>\"abdulwahab\",\n \"msg\"=>\"msg\"\n ]\n ];\n\n $headers = [\n 'Authorization: key=' . API_ACCESS_KEY,\n 'Content-Type: application/json'\n ];\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$fcmUrl);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fcmNotification));\n $result = curl_exec($ch);\n curl_close($ch);\n\n return redirect()->route('thank-you',['store'=> $request->store ])->with('message',trans('order.created'));\n \n \n }else {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::route('/');\n }\n\n\n\n\n dd('حصل خطأ ما ، المرجو المحاولة من جديد');\n\n\n\n }", "public function capture_payment( Group_Buying_Payment $payment ) {\t\tif ( $payment->get_payment_method() == $this->get_payment_method() && $payment->get_status() != Group_Buying_Payment::STATUS_COMPLETE ) {\n\t\t\t$data = $payment->get_data();\n\t\t\t//wp_delete_post( $payment->get_id(), TRUE);\n\t\t\t// Do we have a transaction ID to use for the capture?\n\t\t\tif ( isset( $data['profile_id'] ) && isset( $data['payment_profile_id'] ) ) {\n\t\t\t\t$total = 0;\n\t\t\t\t$items_to_capture = $this->items_to_capture( $payment );\n\n\t\t\t\tif ( $items_to_capture ) {\n\t\t\t\t\t$status = ( count( $items_to_capture ) < count( $data['uncaptured_deals'] ) )?'NotComplete':'Complete';\n\n\t\t\t\t\t// Total to capture\n\t\t\t\t\tforeach ( $items_to_capture as $price ) {\n\t\t\t\t\t\t$total += $price;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create Auth & Capture Transaction\n\t\t\t\t\t$transaction = new AuthorizeNetTransaction;\n\t\t\t\t\t$transaction->amount = (int)gb_get_number_format( $total );\n\t\t\t\t\t$transaction->customerProfileId = $data['profile_id'];\n\t\t\t\t\t$transaction->customerPaymentProfileId = $data['payment_profile_id'];\n\t\t\t\t\t$transaction->customerShippingAddressId = $data['customer_address_id'];\n\t\t\t\t\t$transaction->order->invoiceNumber = $payment->get_purchase();\n\t\t\t\t\t$transaction_response = self::$cim_request->createCustomerProfileTransaction( 'AuthCapture', $transaction );\n\n\t\t\t\t\t// Auth.net will not allow for multiple captures on a single auth\n\t\t\t\t\t// $transaction->transId = $data['transaction_id'];\n\t\t\t\t\t// $transaction_response = self::$cim_request->createCustomerProfileTransaction( 'PriorAuthCapture', $transaction );\n\t\t\t\t\t\n\t\t\t\t\terror_log( \"capture trans raw response: \" . print_r( $transaction_response, true ) );\n\t\t\t\t\t$response = $transaction_response->getTransactionResponse();\n\t\t\t\t\terror_log( \"capture trans response: \" . print_r( $response, true ) );\n\t\t\t\t\t$transaction_id = $response->transaction_id;\n\n\t\t\t\t\tif ( $transaction_id ) { // Check to make sure the response was valid\n\n\t\t\t\t\t\tforeach ( $items_to_capture as $deal_id => $amount ) {\n\t\t\t\t\t\t\tunset( $data['uncaptured_deals'][$deal_id] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( !isset( $data['capture_response'] ) ) {\n\t\t\t\t\t\t\t$data['capture_response'] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['capture_response'][] = $response;\n\t\t\t\t\t\t$payment->set_data( $data );\n\t\t\t\t\t\tdo_action( 'payment_captured', $payment, array_keys( $items_to_capture ) );\n\t\t\t\t\t\tif ( $status == 'Complete' ) {\n\t\t\t\t\t\t\t$payment->set_status( Group_Buying_Payment::STATUS_COMPLETE );\n\t\t\t\t\t\t\tdo_action( 'payment_complete', $payment );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$payment->set_status( Group_Buying_Payment::STATUS_PARTIAL );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function check_webpay_response( $posted ){\r\n\t\t\tglobal $woocommerce;\r\n\r\n\t\t\tif( isset( $_GET['reference'] ) ){\r\n\r\n\t\t\t\t$txnref \t\t= $_GET['reference'];\r\n\t\t\t\t$order_details \t= explode('_', $txnref);\r\n\t\t\t\t$txn_ref \t\t= $order_details[0];\r\n\t\t\t\t$order_id \t\t= $order_details[1];\r\n\r\n\t\t\t\t$order_id \t\t= (int) $order_id;\r\n\r\n\t\t $order \t\t\t= new WC_Order($order_id);\r\n\t\t $order_total\t= $order->get_total();\r\n\r\n\t\t $total = $order_total * 100;\r\n\r\n//\t\t $response = $this->tbz_webpay_transaction_details( $txnref, $total);\r\n\r\n//\t\t\t\t$response_code \t= $response['ResponseCode'];\r\n//\t\t\t\t$amount_paid = $response['Amount'] / 100;\r\n//\t\t\t\t$response_desc = $response['ResponseDescription'];\r\n\r\n $response_code \t= '00';\r\n\t\t\t\t$amount_paid = 15;\r\n\t\t\t\t$response_desc = 'hz hz';\r\n\r\n\t\t\t\t// after payment hook\r\n do_action('tbz_wc_webpay_after_payment', $_POST, $response );\r\n\r\n\t\t\t\t//process a successful transaction\r\n\t\t\t\tif( '00' == $response_code){\r\n\r\n\t\t\t\t\t// check if the amount paid is equal to the order amount.\r\n\t\t\t\t\tif($order_total != $amount_paid)\r\n\t\t\t\t\t{\r\n\r\n\t\t //Update the order status\r\n\t\t\t\t\t\t$order->update_status('on-hold', '');\r\n\r\n\t\t\t\t\t\t//Error Note\r\n\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your payment transaction was successful, but the amount paid is not the same as the total order amount.<br />Your order is currently on-hold.<br />Kindly contact us for more information regarding your order and payment status.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t$message_type = 'notice';\r\n\r\n\t\t\t\t\t\t//Add Customer Order Note\r\n\t $order->add_order_note( $message, 1 );\r\n\r\n\t //Add Admin Order Note\r\n\t $order->add_order_note('Look into this order. <br />This order is currently on hold.<br />Reason: Amount paid is less than the total order amount.<br />Amount Paid was &#8358; '.$amount_paid.' while the total order amount is &#8358; '.$order_total.'<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t$woocommerce->cart->empty_cart();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\r\n\t\t if($order->status == 'processing'){\r\n\t\t $order->add_order_note('Payment Via Interswitch Webpay<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t //Add customer order note\r\n\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is currently being processed.<br />We will be shipping your order to you soon.<br /Transaction Reference: '.$txnref, 1);\r\n\r\n\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\tWC()->cart->empty_cart();\r\n\r\n\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is currently being processed.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t\t$message_type = 'success';\r\n\t\t }\r\n\t\t else{\r\n\r\n\t\t \tif( $order->has_downloadable_item() ){\r\n\r\n\t\t \t\t//Update order status\r\n\t\t\t\t\t\t\t\t$order->update_status( 'completed', 'Payment received, your order is now complete.' );\r\n\r\n\t\t\t //Add admin order note\r\n\t\t\t $order->add_order_note('Payment Via Interswitch Webpay<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t\t //Add customer order note\r\n\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is now complete.<br />Transaction Reference: '.$txnref, 1);\r\n\r\n\t\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is now complete.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t\t\t$message_type = 'success';\r\n\r\n\t\t \t}\r\n\t\t \telse{\r\n\r\n\t\t \t\t//Update order status\r\n\t\t\t\t\t\t\t\t$order->update_status( 'processing', 'Payment received, your order is currently being processed.' );\r\n\r\n\t\t\t\t\t\t\t\t//Add admin order noote\r\n\t\t\t $order->add_order_note('Payment Via Interswitch Webpay<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t\t //Add customer order note\r\n\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is currently being processed.<br />We will be shipping your order to you soon.<br />Transaction Reference: '.$txnref, 1);\r\n\r\n\t\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is currently being processed.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t\t\t$message_type = 'success';\r\n\t\t \t}\r\n\r\n\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\tWC()->cart->empty_cart();\r\n\t\t }\r\n\t }\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//process a failed transaction\r\n\t \t$message = \t'Thank you for shopping with us. <br />However, the transaction wasn\\'t successful, payment wasn\\'t received.<br />Reason: '. $response_desc.'<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t$message_type = 'error';\r\n\r\n\t\t\t\t\t//Add Customer Order Note\r\n \t$order->add_order_note( $message, 1 );\r\n\r\n //Add Admin Order Note\r\n \t$order->add_order_note( $message );\r\n\r\n\t //Update the order status\r\n\t\t\t\t\t$order->update_status('failed', '');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n \t$message = \t'Thank you for shopping with us. <br />However, the transaction wasn\\'t successful, payment wasn\\'t received.';\r\n\t\t\t\t$message_type = 'error';\r\n\r\n\t\t\t}\r\n\r\n $notification_message = array(\r\n \t'message'\t=> $message,\r\n \t'message_type' => $message_type\r\n );\r\n\r\n\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, \"2.2\" ) >= 0 ) {\r\n\t\t\t\tadd_post_meta( $order_id, '_transaction_id', $txnref, true );\r\n\t\t\t}\r\n\r\n\t\t\tupdate_post_meta( $order_id, '_tbz_interswitch_wc_message', $notification_message );\r\n\r\n $redirect_url = $this->get_return_url( $order );\r\n\r\n wp_redirect( $redirect_url );\r\n exit;\r\n\t\t}", "function process_payment($order_id)\n {\n\n $order = new WC_Order($order_id);\n\n // Return thankyou redirect\n return array(\n 'result' => 'success',\n 'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))\n );\n\n }", "public function notifyPayment()\n {\n }", "public function isSuccessful()\n {\n return $this->isPaid();\n }", "public function plgVmConfirmedOrder($cart, $order)\n {\n $session = JFactory::getSession();\n\n $paymentMethodId = $order['details']['BT']->virtuemart_paymentmethod_id;\n\n if (!($method = $this->getVmPluginMethod($paymentMethodId))) {\n return null;\n }\n\n if (!$this->selectedThisElement($method->payment_element)) {\n return false;\n }\n\n $amount = $order['details']['BT']->order_total;\n $sessionId = (string) intval(microtime(true));\n $orderId = $order['details']['BT']->virtuemart_order_id;\n $orderNumber = $order['details']['BT']->order_number;\n\n $baseUrl = JURI::root().'index.php?option=com_virtuemart&view=pluginresponse'.\n '&task=pluginresponsereceived'.\n '&cid='.$paymentMethodId;\n\n $returnUrl = $baseUrl;\n\n $config = $this->getAllConfig();\n\n $transbankSdkWebpay = new TransbankSdkWebpay($config);\n $result = $transbankSdkWebpay->createTransaction($amount, $sessionId, $orderNumber, $returnUrl);\n\n $session->set('webpay_order_id', $orderId);\n\n if (isset($result['token_ws'])) {\n $url = $result['url'];\n $tokenWs = $result['token_ws'];\n\n $session->set('webpay_payment_ok', 'WAITING');\n $session->set('webpay_token_ws', $tokenWs);\n\n $this->toRedirect($url, ['token_ws' => $tokenWs]);\n } else {\n $session->set('webpay_payment_ok', 'FAIL');\n $app = JFactory::getApplication();\n $app->redirect($returnUrl);\n }\n\n exit();\n }", "public function hookPaymentReturn($params)\n {\n if ($this->active == false) {\n return;\n }\n\n $order = $params['objOrder'];\n\n if ($order->getCurrentOrderState()->id != Configuration::get('PS_OS_ERROR')) {\n $this->smarty->assign('status', 'ok');\n }\n\n $this->smarty->assign(array(\n 'id_order' => $order->id,\n 'reference' => $order->reference,\n 'params' => $params,\n 'total' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),\n ));\n\n return $this->display(__FILE__, 'views/templates/hook/confirmation.tpl');\n }", "public function hookPaymentReturn($params)\n {\n if ($this->active == false) {\n return;\n }\n\n $order = $params['objOrder'];\n\n if ($order->getCurrentOrderState()->id != Configuration::get('PS_OS_ERROR')) {\n $this->smarty->assign('status', 'ok');\n }\n\n $this->smarty->assign(array(\n 'id_order' => $order->id,\n 'reference' => $order->reference,\n 'params' => $params,\n 'total' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),\n ));\n\n return $this->display(__FILE__, 'views/templates/hook/confirmation.tpl');\n }", "public function doExpressCheckoutPayment()\n {\n }", "abstract function doPayment();", "function void(&$order){\r\n\t\t//need a transaction id\r\n\t\tif(empty($order->payment_transaction_id))\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t//code to void an order at the gateway and test results would go here\r\n\r\n\t\t//simulate a successful void\r\n\t\t$order->payment_transaction_id = \"TEST\" . $order->code;\r\n\t\t$order->updateStatus(\"voided\");\t\t\t\t\t\r\n\t\treturn true;\r\n\t}", "public function isSuccessful()\n {\n if ($this->data['is_paid']) {\n return true;\n }\n\n return false;\n }", "function submit() {\n\t\tif ( get_option( 'paypal_pro_testmode' ) == \"on\" )\n\t\t\t$paypal_url = \"https://api-3t.sandbox.paypal.com/nvp\"; // Sandbox testing\n\t\telse\n\t\t\t$paypal_url = \"https://api-3t.paypal.com/nvp\"; // Live\n\n\t\t$options = array(\n\t\t\t'timeout' => 20,\n\t\t\t'body' => $this->collected_gateway_data,\n\t\t\t'user-agent' => $this->cart_data['software_name'] . \" \" . get_bloginfo( 'url' ),\n\t\t\t'sslverify' => false,\n\t\t);\n\t\t$response = wp_remote_post( $paypal_url, $options );\n\n\t\t// parse the response body\n\n\t\t$error_data = array( );\n\t\tif ( is_wp_error( $response ) ) {\n\t\t\t$error_data[0]['error_code'] = null;\n\t\t\t$error_data[0]['error_message'] = __( 'There was a problem connecting to the payment gateway.', 'wpsc' );\n\t\t} else {\n\t\t\tparse_str( $response['body'], $parsed_response );\n\t\t}\n\n\t\t// List of error codes that we need to convert to something more human readable\n\t\t$paypal_error_codes = array( '10500', '10501', '10507', '10548', '10549', '10550', '10552', '10758', '10760', '15003' );\n\n\t\t// Extract the error messages from the array\n\t\tforeach ( (array)$parsed_response as $response_key => $response_value ) {\n\t\t\tif ( preg_match( \"/L_([A-Z]+){1}(\\d+){1}()/\", $response_key, $matches ) ) {\n\t\t\t\t$error_number = $matches[2];\n\t\t\t\tswitch ( $matches[1] ) {\n\t\t\t\t\tcase 'ERRORCODE':\n\t\t\t\t\t\t$error_data[$error_number]['error_code'] = $response_value;\n\t\t\t\t\t\tif ( in_array( $response_value, $paypal_error_codes ) ) {\n\t\t\t\t\t\t\t$error_data[$error_number]['error_message'] = __( 'There is a problem with your PayPal account configuration, please contact PayPal for further information.', 'wpsc' ) . $response_value;\n\n\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'LONGMESSAGE':\n\t\t\t\t\t\t// Oddly, this comes with two levels of slashes, so strip them twice\n\t\t\t\t\t\t$error_data[$error_number]['error_message'] = esc_html( stripslashes( stripslashes( $response_value ) ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch ( $parsed_response['ACK'] ) {\n\t\t\tcase 'Success':\n\t\t\tcase 'SuccessWithWarning':\n\t\t\t\t$this->set_transaction_details( $parsed_response['TRANSACTIONID'], 3 );\n\t\t\t\t$this->go_to_transaction_results( $this->cart_data['session_id'] );\n\t\t\t\tbreak;\n\n\t\t\tcase 'Failure': /// case 2 is order denied\n\t\t\tdefault: /// default is http or unknown error state\n\t\t\t\tforeach ( (array)$error_data as $error_row ) {\n\t\t\t\t\t$this->set_error_message( $error_row['error_message'] );\n\t\t\t\t}\n\t\t\t\t$this->return_to_checkout();\n\t\t\t\texit();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function applePayTransactionSuccess() {\n // успешный платеж\n $response = [\"action\" => \"SALE\", 'result' => 'SUCCESS'];\n\n $order = $this->getCookieOrder();\n\n $order_id = $order['data']['order_id'];\n\n $this->updatePaymentOrder($order_id, self::APPLE_PAY, $response);\n\n $this->telegramMessage($response, $order_id, 'PLATON APPLE PAY SALE SUCCESS');\n\n return $this->moveToSuccessCheckoutPage($order_id, self::APPLE_PAY, false);\n }", "public function postProcess()\n {\n require_once _PS_MODULE_DIR_ . 'alipay/alipay-sdk/config.php';\n require_once _PS_MODULE_DIR_ . 'alipay/alipay-sdk/pagepay/service/AlipayTradeService.php';\n require_once(dirname(__FILE__) . '/../../api/loader.php');\n // $alipay = new Alipay();\n //$payment_response = new PaymentResponse();\n // $payment_response->getPostData();\n //if ($payment_response->getTradeStatus() == 'TRADE_FINISHED') {\n //校验签名是否合法\n $arr = $_GET;\n $alipaySevice = new AlipayTradeService($config);\n $result = $alipaySevice->check($arr);\n $cart = $this->context->cart;\n $authorized = false;\n foreach (Module::getPaymentModules() as $module) {\n if ($module['name'] == 'alipay') {\n $authorized = true;\n break;\n }\n }\n\n if (!$authorized) {\n die($this->trans('This payment method is not available.', array(), 'Modules.Checkpayment.Shop'));\n }\n $customer = new Customer($cart->id_customer);\n if (!Validate::isLoadedObject($customer)) {\n Tools::redirect('index.php?controller=order&step=1');\n }\n\n $currency = $this->context->currency;\n $total = (float)$cart->getOrderTotal(true, Cart::BOTH);\n //notify_url.php 在通知页面已经validateOrder\n $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_PAYMENT'), $total,\n '支付宝', '支付成功', var_export($arr), (int)$currency->id, false, $customer->secure_key);\n Tools::redirect('index.php?controller=order-confirmation&id_cart=' . (int)$cart->id . '&id_module=' . (int)$this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key);\n }", "public function is_paid()\n {\n }", "public function verifyHSBCPayment()\n {\n if ( (isset($_POST['METHOD']) && ($_POST['METHOD'] == 'hsbc') )\n && ( isset($_POST['RESULT']) && ($_POST['RESULT'] == '00') )\n )\n {\n // building the param variables; refer some configuration variable below from table.\n $param = $this->getConfig();\n $param->order_id = ''; // add value here\n\n $post = $_POST;\n $param->timestamp = isset($post['TIMESTAMP']) ? $post['TIMESTAMP'] : '';\n $param->order_id = isset($post['ORDER_ID']) ? $post['ORDER_ID'] : '';\n $param->result = isset($post['RESULT']) ? $post['RESULT'] : '';// payment success status : 00 for true;\n $param->message = isset($post['MESSAGE']) ? $post['MESSAGE'] : '';\n $param->pasref = isset($post['PASREF']) ? $post['PASREF'] : '';\n $param->authcode = isset($post['AUTHCODE']) ? $post['AUTHCODE'] : '';\n $param->hash_response = isset($post['SHA1HASH']) ? $post['SHA1HASH'] : '';\n $param->amount = isset($post['AMOUNT']) ? $post['AMOUNT'] : '';\n\n // Built HASH String: (TIMESTAMP.MERCHANT_ID.ORDER_ID.RESULT.PASREF.AUTHCODE)\n $tmp = \"$param->timestamp.$param->merchant_id.$param->order_id.$param->result.$param->message.$param->pasref.$param->authcode\";\n $tmp = sha1($tmp);\n $hash_new = sha1( \"$tmp.secret\" ) ;\n\n if ($param->hash_response == $hash_new) {\n // Payment successful\n\n // ...write codes to update the database and redirection.\n return true;\n }\n else {\n // Payment Failure\n // .... write codes to display error\n\n return false;\n }\n } else {\n // Payment Failure\n // .... write codes to display error\n return false;\n }\n }", "function GoogleCheckout($merchant_id, $merchant_key,$produceDetails,$productDescription,$amount,$uid,$currency,$ip,$convertCurrency,$userCurrency,$talktime,$uname) \n{\n // Create a new shopping cart object\n //$server_type = \"checkout\";\n $server_type = \"sandbox\";\n //$currency = \"GBP\";\n $cart = new GoogleCart($merchant_id, $merchant_key, $server_type, $currency);\n $digital_url=\"https://voip91.com/index.php\";\n // Add items to the cart\n $item = new GoogleItem($produceDetails,$productDescription, 1, $amount);\n //set digital content to item\n $item->SetURLDigitalContent($digital_url,\"\",$productDescription) ;\n $cart->AddItem($item);\n //$cart->AddItem($item2);\n // Add <merchant-private-data>\n $cart->SetMerchantPrivateData(\n new MerchantPrivateData(array(\"uip\" => $ip,\"oId\"=>$uid,'convertCurrency' => $convertCurrency,'userCurrency' => $userCurrency,'talktime'=> $talktime,'uname'=>$uname)));\n $gresult = new GoogleResult();\n $gresult->SetShippingDetails(\"\",0,\"false\");\n\n //Display XML data\n// echo \"<pre>\";\n// echo htmlentities($cart->GetXML());\n// echo \"</pre>\";\n// // Display a medium size button\n \n echo $cart->CheckoutButtonCode(\"SMALL\");\n\n}", "public function brokerPay()\r\n {}", "public function success()\n\t{\n\t $this->result = $this->session->get('payment_result');\n\t\tif(!$this->result){\n\t\t\turl::redirect(PATH);\n\t\t}\n\t $this->session->delete('payment_result');\n\t\t\t\n\t\t$this->template->content = new View(\"themes/\".THEME_NAME.\"/success_payment\");\n\t}", "function _prePayment( $data )\n {\n // prepare the payment form\n Tienda::load( 'TiendaHelperBase', 'helpers._base' );\n $helper = TiendaHelperBase::getInstance();\n \n $params = $this->get('params', array());\n \n $vars = new JObject();\n $vars->action = $params->get('action', '1');\n $vars->track_id = $data['order_id'];\n $vars->orderpayment_id = $data['orderpayment_id'];\n $vars->total = number_format($data['orderpayment_amount'], 2, \".\", \"\");\n $vars->email = JFactory::getUser()->email;\n \n $vars->response_url = JURI::base().'plugins/tienda/'.$this->_element.'/tmpl/response.php';\n $vars->error_url = JURI::base().'plugins/tienda/'.$this->_element.'/tmpl/error.php';\n \n \n // Is Demo or production?\n if($this->params->get('demo', '0') == 0){\n \t$vars->url = 'https://www.constriv.com/cg/servlet/PaymentInitHTTPServlet';\n \t$vars->account_id = $params->get('account_id', '');\n \t$vars->password = $params->get('password', '');\n } else{\n \t$vars->url = 'https://test4.constriv.com/cg301/servlet/PaymentInitHTTPServlet';\n \t$vars->account_id = $params->get('account_id_demo', '');\n \t$vars->password = $params->get('password_demo', '');\n }\n \n $vars->currency = $params->get('currency', '978');\n \n \n // Language\n \t\tif ($this->params->get('language', 'auto') == 'auto')\n \t\t{\n \t// automatic language from joomla\n \t\t\tjimport('joomla.language.helper');\n \t\t\t$lang = JLanguageHelper::detectLanguage();\n // TODO Use JFactory::getLanguage(); \n // and explode the language's code by the '-' to get the var->lang for 2CO\n \t\t\tswitch($lang)\n \t\t\t{\n \t\t\t\tcase \"es-ES\":\n \t\t\t\t\t$vars->language = \"ESP\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase \"en-US\":\n \t\t\t\t\t$vars->language = \"USA\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase \"de-DE\":\n \t\t\t\t\t$vars->language = \"DEU\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase \"fr-FR\":\n \t\t\t\t\t$vars->language = \"FRA\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase \"it-IT\":\n \t\t\t\t\t$vars->language = \"ITA\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase \"en-GB\":\n \t\t\t\tdefault: \t \n \t\t\t\t\t$vars->language = 'ENG';\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t\t\n } else{\n \t$vars->language = $this->params->get('language', 'ENG');\n }\n \n $data = new JObject();\n \n // Check the parameters!!\n\t\t //Apro la connessione\n\t\t $ch=curl_init($vars->url);\n\n\t\t $DataToSend =\"id=$vars->account_id&password=$vars->password&action=$vars->action&amt=\".$vars->total.\"&amp;currencycode=$vars->currency&langid=\".$vars->language.\"&responseURL=$vars->response_url&errorURL=$vars->error_url&trackid=$vars->track_id&udf3=EMAILADDR:\".$vars->email.\"&udf1=\".$vars->orderpayment_id;\n\t\t \n\t\t //Imposto gli headers HTTP\n\t\t //imposto curl per protocollo https\n\t\t curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t curl_setopt($ch,CURLOPT_POST,1);\n\t\t \n\t\t //Invio i dati\n\t\t curl_setopt($ch,CURLOPT_POSTFIELDS,$DataToSend);\n\t\t \n\t\t //imposta la variabile PHP \n\t\t curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); \n\t\t \n\t\t //Ricevo la risposta dal server\n\t\t $varResponse=curl_exec($ch); \n\t\t \n\t\t //chiudo la connessione \n\t\t curl_close($ch); \n\t\t \n\t\t if (substr($varResponse,0,7) == '!ERROR!') {\n\t\t \n\t\t \t\t$data->error = 1;\n\t\t \t\t$data->message = $varResponse;\n\t\t \n\t\t } else {\n\t\t \n\t\t \t\t//Separo il contenuto della stringa ricevuta (PaymentID:RedirectURL)\n\t\t \t\t \t\t\n\t\t \t\t$varPosiz= strpos($varResponse, ':http');\n\t\t \t\t$varPaymentId= substr($varResponse,0,$varPosiz);\n\t\t \t\t$nc=strlen($varResponse);\n\t\t \t\t$nc=($nc-17);\n\t\t \t\t$varRedirectURL=substr($varResponse,$varPosiz+1);\n\t\t \n\t\t\t\t//Creo l'URL di redirezione\n\t\t \t\t$varRedirectURL =\"$varRedirectURL?PaymentID=$varPaymentId\";\n\t\t \t\t//echo $varRedirectURL;\n\t\t\t\t\n\t\t\t\t//Redirezione finale del browser sulla HPP\n\t\t \t\t$data->error = 0;\n\t\t \t\t$data->redirect = $varRedirectURL;\n\t\t}\n \n\t\t\n $html = $this->_getLayout('prepayment', $data);\n //$html = \"<meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=$varRedirectURL\\\">\";\n return $html;\n }", "public function confirm()\n { $entry = PaymentLog::forMethod('complete');\n $entry->orderId = $this->baseBooker->orderBookingId . '-' . $this->bill->id;\n $url = 'transaction/complete';\n $credentials = $this->credentials;\n\n $params = array();\n $params['MerchantId'] = $credentials['id'];\n\n $params['TransactionId'] = $this->bill->transactionId;\n $params['ContentType'] = 'text';\n $params = $this->contributeToConfirm($params);\n\n $params['SecurityKey'] = $this->getSignature($params);\n $entry->request = json_encode($params);\n $entry->startProfile();\n $entry->save();\n list($code, $result) = $this->callApi($url, $params);\n $entry->finishProfile();\n $entry->response = json_encode($result);\n if(isset($result['TransactionId'])) {\n $entry->transactionId = $result['TransactionId'];\n $entry->save();\n }\n // FIXME check AMOUNT?\n if($result['Result'] == 'Ok')\n {\n// $bill->status = Bill::STATUS_PAID;\n $this->bill->transactionId = $result['TransactionId'];\n $this->bill->status = 'PAI';\n $this->bill->save();\n return true;\n }\n $entry->errorDescription = \"ConfirmError: \" . $this->rawResponse;\n $entry->save();\n return false;\n }", "function _postPayment( $data )\n\t{\n\t\t// Process the payment\n\t\t$paction = JRequest::getVar('paction');\n\t\t$vars = new JObject();\n\t\t$html=\"\";\n\t\tswitch ($paction)\n\t\t{\n\t\t\tcase \"display_message\":\n\t\t\t\t$html .= $this->_renderHtml( JText::_('COM_TIENDA_GOOGLECHECKOUT_MESSAGE_PAYMENT_ACCEPTED_FOR_VALIDATION') );\n\t\t\t\t$html .= $this->_displayArticle();\n\t\t\t\tbreak;\n\t\t\tcase \"process\":\n\t\t\t\t$vars->message = $this->_process();\n\t\t\t\t$html = $this->_getLayout('message', $vars);\n\t\t\t\techo $html; // TODO Remove this\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$app->close();\n\t\t\t\tbreak;\n\t\t\tcase \"cancel\":\n\t\t\t\t$vars->message = JText::_('COM_TIENDA_GOOGLECHECKOUT_MESSAGE_CANCEL');\n\t\t\t\t$html = $this->_getLayout('message', $vars);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$vars->message = JText::_('COM_TIENDA_GOOGLECHECKOUT_MESSAGE_INVALID_ACTION');\n\t\t\t\t$html = $this->_getLayout('message', $vars);\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $html;\n\t}", "public function onSubscriptionTransactionReturn(Payment_Model_Order $order, array $params = array()) \n\t{\n\t\t// Check that gateways match\n\t\tif ($order -> gateway_id != $this -> _gatewayInfo -> gateway_id) \n\t\t{\n\t\t\tthrow new Engine_Payment_Plugin_Exception('Gateways do not match');\n\t\t}\n\n\t\t// Get related info\n\t\t$user = $order -> getUser();\n\t\t$subscription = $order -> getSource();\n\t\t$package = $subscription -> getPackage();\n\n\t\t// Check subscription state\n\t\tif ($subscription -> status == 'active' || $subscription -> status == 'trial')\n\t\t{\n\t\t\treturn 'active';\n\t\t} \n\t\telse if ($subscription -> status == 'pending') \n\t\t{\n\t\t\treturn 'pending';\n\t\t}\n\t\t// Update order with profile info and complete status?\n\t\t$order -> state = 'complete';\n\t\t$order -> gateway_transaction_id = $params['transaction_id'];\n\t\t$order -> save();\n\n\t\t// Insert transaction\n\t\t$transactionsTable = Engine_Api::_() -> getDbtable('transactions', 'payment');\n\t\t$transactionsTable -> insert(array(\n\t\t\t'user_id' => $order -> user_id, \n\t\t\t'gateway_id' => $this -> _gatewayInfo -> gateway_id, \n\t\t\t'timestamp' => new Zend_Db_Expr('NOW()'), \n\t\t\t'order_id' => $order -> order_id, 'type' => 'payment', \n\t\t\t'state' => 'okay', \n\t\t\t'gateway_transaction_id' => $params['transaction_id'], \n\t\t\t'amount' => $params['amount'], // @todo use this or gross (-fee)?\n\t\t\t'currency' => $params['currency']));\n\n\t\t// Get benefit setting\n\t\t$giveBenefit = Engine_Api::_() -> getDbtable('transactions', 'payment') -> getBenefitStatus($user);\n\n\t\t//YN - Random a code\n\t\t$sid = 'abcdefghiklmnopqstvxuyz0123456789ABCDEFGHIKLMNOPQSTVXUYZ';\n\t\t$max = strlen($sid) - 1;\n\t\t$rCode = \"\";\n\t\tfor ($i = 0; $i < 16; ++$i) {\n\t\t\t$rCode .= $sid[mt_rand(0, $max)];\n\t\t}\n\n\t\t// Update subscription info\n\t\t$subscription -> gateway_id = $this -> _gatewayInfo -> gateway_id;\n\t\t$subscription -> gateway_profile_id = ($params['transaction_id']) ? $params['transaction_id'] : $rCode;\n\n\t\t$subscription -> payment_date = date('Y-m-d H:i:s');\n\t\t// Payment success\n\t\t$subscription -> onPaymentSuccess();\n\n\t\t// send notification\n\t\tif ($subscription -> didStatusChange()) {\n\t\t\tEngine_Api::_() -> getApi('mail', 'core') -> sendSystem($user, 'payment_subscription_active', array('subscription_title' => $package -> title, 'subscription_description' => $package -> description, 'subscription_terms' => $package -> getPackageDescription(), 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Zend_Controller_Front::getInstance() -> getRouter() -> assemble(array(), 'user_login', true), ));\n\t\t}\n\t\treturn 'active';\n\t}", "private function successfulPaymentNotification() {\n $this->setCommonPaymentFields();\n \n // <editor-fold defaultstate=\"collapsed\" desc=\"For manual offline payment\">\n $this->paymentData['manually_entered'] = $this->handleBooleanValues($this->webhookNotification->manually_entered);\n $this->paymentData['payment_method'] = !empty($this->webhookNotification->payment_method)?$this->webhookNotification->payment_method:NULL;\n // </editor-fold>\n\n $this->savePaymentData();\n }", "public function confirmThreeDPayment()\n {\n print(\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.0 Transitional//EN\\\">\");\n print(\"<html>\");\n print(\"<body><div style=\\\"width:350px;margin:0 auto;\\\">\");\n\n date_default_timezone_set('Europe/Istanbul');\n\n $obj = new iParaPayment();\n\n $response = array();\n\n $obj->private_key = $this->private_key;\n $obj->public_key = $this->public_key;\n\n try {\n // iPara nin gonderdigi 3D Secure sonuc bilgileri request bilgisinden alinir\n $response = $obj->getThreeDResponse($_POST);\n if ($response['result'] != 1) {\n print \"<span style=\\\"font-weight:bold\\\">ÖDEME İŞLEMİNİZ BAŞARISIZ</span>\";\n return;\n }\n } catch (Exception $e) {\n print \"<span style=\\\"font-weight:bold\\\">ÖDEME İŞLEMİNİZ BAŞARISIZ</span>\";\n print '</br>' . $e->getMessage();\n return;\n }\n\n // Odeme bilgilerinin hazirlanmasi\n\n // odenecek toplam tutarin hesaplanmasi\n $amount = 0;\n foreach ($this->products as $product) {\n $amount = $amount + ($product['quantity'] * $product['price']);\n }\n\n $obj->mode = \"T\";\n $obj->three_d_secure_code = $response['three_d_secure_code'];\n $obj->order_id = $response['order_id'];\n $obj->amount = $amount;\n $obj->echo = \"echo message\";\n// $obj->vendor_id = $this->vendor_id;\n $obj->products = $this->products;\n $obj->shipping_address = $this->shipping_address;\n $obj->invoice_address = $this->invoice_address;\n $obj->purchaser = $this->purchaser;\n\n $response = array();\n try {\n // 3D Secure sonuc bilgileri API ile odeme servisine iletilir.\n $response = $obj->pay();\n } catch (Exception $e) {\n print \"<span style=\\\"font-weight:bold\\\">ÖDEME İŞLEMİNİZ BAŞARISIZ</span>\";\n print '</br>' . $e->getMessage();\n return;\n }\n\n if ($response['result'] == 1) {\n print \"<span style=\\\"font-weight:bold\\\">ÖDEME İŞLEMİNİZ BAŞARILI</span>\";\n } else {\n print \"<span style=\\\"font-weight:bold\\\">ÖDEME İŞLEMİNİZ BAŞARISIZ</span>\";\n }\n print \"</br>\";\n print \"</br><span style=\\\"font-weight:bold\\\">result : </span>\" . $response['result'];\n print \"</br><span style=\\\"font-weight:bold\\\">order_id : </span>\" . $response['order_id'];\n print \"</br><span style=\\\"font-weight:bold\\\">amount : </span>\" . $response['amount'];\n print \"</br><span style=\\\"font-weight:bold\\\">mode : </span>\" . $response['mode'];\n print \"</br><span style=\\\"font-weight:bold\\\">public_key : </span>\" . $response['public_key'];\n print \"</br><span style=\\\"font-weight:bold\\\">echo : </span>\" . $response['echo'];\n print \"</br><span style=\\\"font-weight:bold\\\">error_code : </span>\" . $response['error_code'];\n print \"</br><span style=\\\"font-weight:bold\\\">error_message : </span>\" . $response['error_message'];\n print \"</br><span style=\\\"font-weight:bold\\\">transaction_date : </span>\" . $response['transaction_date'];\n print \"</br><span style=\\\"font-weight:bold\\\">hash : </span>\" . $response['hash'];\n print(\"</div></body>\");\n print(\"</html>\");\n }", "public function markAsPaymentProcessed();", "function process_payment($order_id)\n\t\t\t{\n\t\t\t\t$order = new WC_Order($order_id);\n\t\t\t\tif (!$this->form_submission_method) {\n\t\t\t\t\t$vtcpay_args = $this->get_vtcpay_args($order);\n\t\t\t\t\tif ($this->testmode == 'yes'):\n\t\t\t\t\t\t$vtcpay_server = $this->testurl; else :\n\t\t\t\t\t\t$vtcpay_server = $this->liveurl;\n\t\t\t\t\tendif;\n\t\t\t\t\t$vtcpay_url = $this->createRequestUrl($vtcpay_args, $vtcpay_server);\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t\t'redirect' => $vtcpay_url\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t\t'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}", "public function hookPaymentReturn($params)\n {\n throw new \\Exception(\"hookPaymentReturn\", 1);\n if ($this->active == false) {\n return;\n }\n\n $order = $params['objOrder'];\n\n if ($order->getCurrentOrderState()->id != Configuration::get('PS_OS_ERROR')) {\n $this->smarty->assign('status', 'ok');\n }\n\n $this->smarty->assign(array(\n 'id_order' => $order->id,\n 'reference' => $order->reference,\n 'params' => $params,\n 'total' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),\n ));\n\n return $this->display(__FILE__, 'views/templates/hook/confirmation.tpl');\n }", "public function capturePayment();", "public function capturePayment();", "public function jazzcash_success()\n {\n $params = $this->session->userdata('params');\n if ($_POST['pp_ResponseCode'] == '000') {\n $tran_id = $_POST['pp_TxnRefNo'];\n $arrayFees = array(\n 'allocation_id' => $params['allocation_id'],\n 'type_id' => $params['type_id'],\n 'collect_by' => \"\",\n 'amount' => floatval($params['amount']),\n 'discount' => 0,\n 'fine' => $params['fine'],\n 'pay_via' => 12,\n 'collect_by' => 'online',\n 'remarks' => \"Fees deposits online via JazzCash TXN ID: \" . $tran_id,\n 'date' => date(\"Y-m-d\"),\n );\n $this->savePaymentData($arrayFees);\n set_alert('success', translate('payment_successfull'));\n redirect(base_url('userrole/invoice'));\n } elseif($_POST['pp_ResponseCode'] == '112') {\n set_alert('error', \"Transaction Failed\");\n redirect(base_url('userrole/invoice'));\n } else {\n set_alert('error', $_POST['pp_ResponseMessage']);\n redirect(base_url('userrole/invoice'));\n }\n }", "public function gateway_subscription_payment( $order ) {\r\n\r\n\t\t\t// Make sure the order requested is a subscription, or contains a subscription.\r\n\t\t\tif ( $this->order_contains_subscription( $order->id ) ) /*&& !$order->has_status( wcs_get_subscription_ended_statuses() )*/ \r\n\t\t\t{\r\n\r\n\t\t\t\t$order->update_status( 'on-hold' );\r\n\r\n\t\t\t\t// generate a renewal order as normal\r\n\t\t\t\t$renewal_order = wcs_create_renewal_order( $order );\r\n\t\t\t\t$renewal_order->set_payment_method( $order->payment_gateway );\r\n\r\n\t\t\t\t// Update the renewal order status to completed\r\n\t\t\t\t// This also makes the subscription active\r\n\t\t\t\t$renewal_order->update_status('completed');\r\n\r\n\t\t\t\t// Add a custom note for logging\r\n\t\t\t\t$order->add_order_note( __( 'Create and complete renewal order requested by gateway.', 'woocommerce-subscriptions' ), false, true );\r\n\r\n\t\t\t\t$order->update_status( 'completed' );\r\n\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t}\r\n\r\n\t return false;\r\n\r\n\t }", "public function testPurchaseSuccess()\n {\n $this->options['card']['number'] = '4242424242424242';\n $response = $this->gateway->purchase($this->options)->send();\n\n $this->assertInstanceOf('\\Omnipay\\Dummy\\Message\\Response', $response);\n $this->assertTrue($response->isSuccessful());\n $this->assertFalse($response->isRedirect());\n $this->assertNotEmpty($response->getTransactionReference());\n $this->assertSame('Success', $response->getMessage());\n }", "public function sendOrderInfoToPayPal()\n {\n }", "function checkPayment() {\n\t\tif ($this->_debug) trigger_error(\"Reports -> \" . get_class($this). \" ! checkPayment()\" , E_USER_NOTICE);\n\t\t$retVal = true;\n\t\t$arg_list = func_get_args();\n\t\tif ($this->_mode == PAYMENT_ENGINE_RECEIVE) {\n\t\t\tif (PAYMENT_IGNORE_TEST_PAYMENT) {\n\n\t\t\t\t/*** MODIFIED CODE BEGIN ***/\n\n\t\t\t\t// !!! On ccbill there is no test regime\n\n\t\t\t\t/*if (isset($_REQUEST[$this->_arrayField['test_mode']]) &&\n\t\t\t\t\t\t $_REQUEST[$this->_arrayField['test_mode']] == \"1\") {\n\t\t\t\t\tif ($this->_debug) trigger_error(\"- The payment was processed in demo mode.\", E_USER_NOTICE);\n\t\t\t\t\t$retVal = false;\n\t\t\t\t}*/\n\n\t\t\t\t/*** MODIFIED CODE END ***/\n\n\t\t\t}\n\t\t\tif (PAYMENT_LOG_PAYER_INFO) {\n\n\t\t\t\t/*** MODIFIED CODE BEGIN ***/\n\n\t\t\t\t// !!! The data about pl'zovatele do not come on ccbill\n\n\t\t\t\t/*** MODIFIED CODE END ***/\n\n\t\t\t}\n\t\t\tif ($this->_verifyData()) {\n\t\t\t\t/*** MODIFIED CODE BEGIN ***/\n\n\t\t\t\t$arg_list[0] = $_REQUEST[$this->_arrayField['order_id']];\n\n\t\t\t\t$AlternateMerchantPassphraseHash = md5($this->getField('secret_word'));\n\n\t\t\t\t$combined = $_REQUEST['PAYMENT_ID'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['PAYEE_ACCOUNT'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['PAYMENT_AMOUNT'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['PAYMENT_UNITS'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['PAYMENT_METAL_ID'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['PAYMENT_BATCH_NUM'] . \":\";\n\t\t\t\t$combined .= $AlternateMerchantPassphraseHash . \":\";\n\t\t\t\t$combined .= $_REQUEST['ACTUAL_PAYMENT_OUNCES'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['USD_PER_OUNCE'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['FEEWEIGHT'] . \":\";\n\t\t\t\t$combined .= $_REQUEST['TIMESTAMPGMT'];\n\n\t\t\t\t$rezultHash = strtoupper(md5($combined));\n\n\t\t\t\tif ($_REQUEST['V2_HASH'] == $rezultHash) {\n\t\t\t\t\tif ($this->_debug) trigger_error(\"- md5 hash is correct.\", E_USER_NOTICE);\n\t\t\t\t\t$retVal = true;\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->_debug) trigger_error(\"- md5 hash is not correct!\", E_USER_NOTICE);\n\t\t\t\t\t$retVal = false;\n\t\t\t\t}\n\n\t\t\t\t/*** MODIFIED CODE END ***/\n\n\t\t\t} else {\n\t\t\t\tif ($this->_debug) trigger_error(\"- Some obligatory parameters were not set.\", E_USER_ERROR);\n\t\t\t\t$retVal = false;\n\t\t\t}\n\t\t} else {\n\t\t\ttrigger_error(\"- In mode PAYMENT_ENGINE_SEND method verifyIncoming() is not available.\", E_USER_ERROR);\n\t\t\t$retVal = false;\n\t\t}\n\t\tif ($this->_debug) trigger_error(\"Processed <- \" . get_class($this). \" ! doPayment().\" , E_USER_NOTICE);\n\t\treturn $retVal;\n\t}", "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n // clear the session payment ID\n Session::forget('paypal_payment_id');\n\n $payerId = \\Input::get('PayerID');\n $token = \\Input::get('token');\n\n if (empty($payerId) || empty($token)) {\n return \\Redirect::route('home')\n ->with('message', 'Hubo un problema al intentar pagar con Paypal');\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n\n $execution = new PaymentExecution();\n $execution->setPayerId(\\Input::get('PayerID'));\n\n $result = $payment->execute($execution, $this->_api_context);\n\n\n if ($result->getState() == 'approved') {\n\n $this->saveOrder();\n\n Session::forget('cart');\n\n return Redirect::route('home')\n ->with('message', 'Compra realizada de forma correcta');\n }\n return Redirect::route('home')\n ->with('message', 'La compra fue cancelada');\n }", "private function caddyEpaymentOrderIsPayed()\n {\n $isPayed = false;\n\n $sesArray = $GLOBALS[ 'TSFE' ]->fe_user->getKey( 'ses', $this->extKey . '_' . $GLOBALS[ \"TSFE\" ]->id );\n\n $currentOrderNumber = $sesArray[ 'numberOrderCurrent' ];\n $epaymentOrderNumber = $sesArray[ 'e-payment' ][ 'order' ][ 'numberOrderCurrent' ];\n\n//var_dump( __FILE__, __LINE__, $sesArray['numberOrderCurrent'], $sesArray['e-payment']['order']['numberOrderCurrent'] );\n // RETURN false : Order isn't payed\n if ( $currentOrderNumber != $epaymentOrderNumber )\n {\n $isPayed = false;\n//var_dump( __FILE__, __LINE__, $isPayed );\n return $isPayed;\n }\n\n // Get payed status from session\n $isPayed = $sesArray[ 'e-payment' ][ 'order' ][ 'isPayed' ];\n // RETURN payed status\n//var_dump( __FILE__, __LINE__, $sesArray['e-payment'] );\n return $isPayed;\n }", "function check_payu_response2(){\n\n\t \t//wp_die('die' );\n\t global $woocommerce;\n\n\t if(isset($_REQUEST['txnid']) && isset($_REQUEST['mihpayid'])){\n\t $order_id_time = $_REQUEST['txnid'];\n\t $order_id = explode('_', $_REQUEST['txnid']);\n\t $order_id = (int)$order_id[0];\n\t if($order_id != ''){\n\t try{\n\t $order = new WC_Order( $order_id );\n\t $merchant_id = $_REQUEST['key'];\n\t $amount = $_REQUEST['Amount'];\n\t $hash = $_REQUEST['hash'];\n\n\t $status = $_REQUEST['status'];\n\t $productinfo = \"Order $order_id\";\n\t echo $hash;\n\t echo \"{$this->salt}|$status|||||||||||{$order->billing_email}|{$order->billing_first_name}|$productinfo|{$order->order_total}|$order_id_time|{$this->merchant_id}\";\n\t $checkhash = hash('sha512', \"{$this->salt}|$status|||||||||||{$order->billing_email}|{$order->billing_first_name}|$productinfo|{$order->order_total}|$order_id_time|{$this->merchant_id}\");\n\t $transauthorised = false;\n\t if($order -> status !=='completed'){\n\t if($hash == $checkhash)\n\t {\n\n\t $status = strtolower($status);\n\n\t if($status==\"success\"){\n\t $transauthorised = true;\n\t $this -> msg['message'] = \"Thank you for shopping with us. Your account has been charged and your transaction is successful. We will be shipping your order to you soon.\";\n\t $this -> msg['class'] = 'woocommerce_message';\n\t if($order -> status == 'processing'){\n\n\t }else{\n\t $order -> payment_complete();\n\t $order -> add_order_note('PayU payment successful<br/>Unnique Id from PayU: '.$_REQUEST['mihpayid']);\n\t $order -> add_order_note($this->msg['message']);\n\t $woocommerce -> cart -> empty_cart();\n\t }\n\t }else if($status==\"pending\"){\n\t $this -> msg['message'] = \"Thank you for shopping with us. Right now your payment staus is pending, We will keep you posted regarding the status of your order through e-mail\";\n\t $this -> msg['class'] = 'woocommerce_message woocommerce_message_info';\n\t $order -> add_order_note('PayU payment status is pending<br/>Unnique Id from PayU: '.$_REQUEST['mihpayid']);\n\t $order -> add_order_note($this->msg['message']);\n\t $order -> update_status('on-hold');\n\t $woocommerce -> cart -> empty_cart();\n\t }\n\t else{\n\t $this -> msg['class'] = 'woocommerce_error';\n\t $this -> msg['message'] = \"Thank you for shopping with us. However, the transaction has been declined.\";\n\t $order -> add_order_note('Transaction Declined: '.$_REQUEST['Error']);\n\t //Here you need to put in the routines for a failed\n\t //transaction such as sending an email to customer\n\t //setting database status etc etc\n\t }\n\t }else{\n\t $this -> msg['class'] = 'error';\n\t $this -> msg['message'] = \"Security Error. Illegal access detected\";\n\n\t //Here you need to simply ignore this and dont need\n\t //to perform any operation in this condition\n\t }\n\t if($transauthorised==false){\n\t $order -> update_status('failed');\n\t $order -> add_order_note('Failed');\n\t $order -> add_order_note($this->msg['message']);\n\t }\n\t add_action('the_content', array(&$this, 'showMessage'));\n\t }}catch(Exception $e){\n\t // $errorOccurred = true;\n\t $msg = \"Error\";\n\t }\n\n\t }\n\n\n\n\t }\n\n\t }" ]
[ "0.6991698", "0.68768245", "0.6837104", "0.68300796", "0.67029905", "0.6702087", "0.6669221", "0.6658528", "0.6656175", "0.66503", "0.664724", "0.6642404", "0.6623684", "0.6608741", "0.66033167", "0.65943116", "0.6593562", "0.658879", "0.6571298", "0.65634936", "0.65612495", "0.6551321", "0.64978534", "0.64876807", "0.6485554", "0.64849097", "0.64689535", "0.645835", "0.6455345", "0.6455143", "0.64534295", "0.6435915", "0.64280033", "0.6427079", "0.64253217", "0.640378", "0.6398715", "0.6387265", "0.6383448", "0.6375798", "0.63718724", "0.63614637", "0.6344752", "0.6338025", "0.6326874", "0.63258296", "0.63133514", "0.62957764", "0.629085", "0.6287619", "0.62824506", "0.628115", "0.6280071", "0.62784", "0.62761515", "0.6272399", "0.6272399", "0.62707263", "0.62692493", "0.6262859", "0.6258721", "0.62554765", "0.6229508", "0.622487", "0.62218916", "0.62190735", "0.6217801", "0.6216443", "0.6216443", "0.62116575", "0.62082446", "0.6193203", "0.6182419", "0.6178782", "0.6168592", "0.61665326", "0.6164846", "0.6162395", "0.61617625", "0.61611336", "0.6155506", "0.61462873", "0.61405724", "0.61393565", "0.61373305", "0.61304766", "0.6118826", "0.6117758", "0.6117383", "0.61161804", "0.61145574", "0.61145574", "0.6106728", "0.6105493", "0.61047375", "0.60963964", "0.6088867", "0.6087479", "0.60849273", "0.60845906" ]
0.76823217
0
Get order from cookie
Получить заказ из куки
public function getCookieOrder() { $order = (isset($_COOKIE["san"])) ? json_decode(base64_decode($_COOKIE["san"]), true) : []; if(!empty($order)) return $order; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrder() ;", "function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "function getCookies() {}", "public function actionObtenercookie($cookie)\n {\n $cookies = $_COOKIE[$cookie];\n // \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return $cookies;\n }", "function getCookie() {\n\t\treturn $this->_cookie;\n\t}", "function getOrder()\n {\n return 3;\n }", "function getOrder()\n {\n return 3;\n }", "public function GetOrderToken()\n\t{\n\t\treturn @$_COOKIE['SHOP_ORDER_TOKEN'];\n\t}", "public function GetOrderToken()\n\t{\n\t\treturn @$_COOKIE['SHOP_ORDER_TOKEN'];\n\t}", "public function getCookies();", "public function getCookies();", "public function getCookies();", "public function getCookies();", "public function getCookie()\n {\n return Mage::getSingleton('core/cookie');\n }", "public function getOrder() {}", "protected function getCookieElement()\n {\n if (! request()->hasCookie(config('cart_manager.cookie_name'))) {\n $cookie = Str::random(20);\n\n Cookie::queue(Cookie::make(\n config('cart_manager.cookie_name'),\n $cookie,\n config('cart_manager.cookie_lifetime')\n ));\n } else {\n $cookie = Cookie::get(config('cart_manager.cookie_name'));\n }\n\n return ['cookie' => $cookie];\n }", "function getOrder() {\n\t\t\t$session_id = session_id();\n\t\t\t$query = \" SELECT *\n\t\t\t\t\t\tFROM fs_order\n\t\t\t\t\t\tWHERE session_id = '$session_id' \n\t\t\t\t\t\tAND is_temporary = 1 \";\n\t\t\tglobal $db;\n\t\t\t$db -> query($query);\n\t\t\treturn $rs = $db->getObject();\n\t\t\t\n\t\t}", "function getCookie()\r\n{\r\n\t$codigo = 0;\r\n\tif(isset($_COOKIE['LOGINRE']))\r\n\t{ \r\n\t\t$codigo = $_COOKIE['LOGINRE'];\r\n\t}\r\n\treturn $codigo;\r\n}", "public function getCookie()\n {\n return $this->cookie;\n }", "abstract protected function getOrder();", "abstract public function get_order();", "public function getCookie()\n {\n return Mage::getModel('core/cookie');\n }", "function getOrder()\n {\n return 23;\n }", "function getOrder()\r\n {\r\n return 1;\r\n }", "function get_order_entry( $key ) {\n\t\treturn $_SESSION['usces_entry']['order'][$key];\n\t}", "public function getCookie($cookiename);", "public function getCookies()\n {\n return $this->headers['cookie'];\n }", "public function get_cookies()\n {\n }", "function retrieveorder(){\r\n\t\treturn array();\r\n\t}", "function readOrder() { return $this->_order; }", "public function cookie()\n {\n return $this->cookie;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder() {\n return 1;\n }", "public function getOrder()\n {\n return $this->get(self::order);\n }", "function getOrder()\n {\n return 30;\n }", "public function getOrder()\r\n {\r\n return $this->fields['Order']['value'];\r\n }", "function get_cookie() {\n\tglobal $_COOKIE;\n\t$hid = explode ( \"|\", $_COOKIE ['main_tcsso_1'] );\n\t$handleName = $_COOKIE ['handleName'];\n\t// print_r($hid);\n\t$hname = explode ( \"|\", $_COOKIE ['direct_sso_user_id_1'] );\n\t$meta = new stdclass ();\n\t$meta->handle_id = $hid [0];\n\t$meta->handle_name = $handleName;\n\treturn $meta;\n}", "public function getCookies(){\n return $this->cookies;\n }", "function getOrder()\n {\n return 4;\n }", "function getOrder()\n {\n return 4;\n }", "public function get_basic_order();", "public function getParsedCookie()\n {\n return $this->parseCookie();\n }", "function GetCookie()\r\n\t{\r\n\t\treturn $this->sessionid;\r\n\t}", "public function getOrder ()\n {\n return 3;\n }", "function get_cookies(){\n print_r($_COOKIE);\n // GET current lat\n // get cuurnt lon\n}", "private function readCookie() {\n $cipher = new Cipher();\n $auth = $cipher->decrypt($_COOKIE['auth']);\n list($user, $pass) = explode('|', $auth);\n $this->authUser(base64_decode($user), base64_decode($pass));\n }", "public function getCookie()\n {\n return $this->client->getConfig('cookies');\n }", "public function cookie();", "public static function get_cookie()\n {\n return Session::get('uzanto');\n }", "private function getCookieElement() {\n if (!request()->hasCookie(config('productcart.cookie_name'))) {\n//create new cookie and assign config file\n $cookie = Str::random(40);\n $parameters = Cookie::make(\n config('productcart.cookie_name'),\n $cookie,\n config('productcart.cookie_lifetime')\n );\n\n Cookie::queue($parameters);\n } else {\n\n $cookie = Cookie::get(config('productcart.cookie_name'));\n }\n\n return $cookie;\n }", "public function getCookies()\n {\n\n }", "function getOrder()\n {\n return 12;\n }", "public function order()\n {\n $order = static::getOrderKey();\n return $this->request->{$order} ?: static::getDefaultOrder();\n }", "public function getCookies()\n {\n return $this->__getCookies();\n }", "public function get_saved_item_from_cookie() {\n\n\t\t\t$saved_items = array();\n\n\t\t\tif ( ! empty( $_COOKIE['sa_saved_for_later_profile_id'] ) ) {\n\n\t\t\t\t$unique_id = $_COOKIE['sa_saved_for_later_profile_id'];\n\n\t\t\t\t$saved_items = get_option( 'sa_saved_for_later_profile_' . $unique_id );\n\n\t\t\t}\n\n\t\t\treturn $saved_items;\n\n\t\t}", "function getOrder()\n {\n return 5;\n }", "function getOrder()\n {\n return 5;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "public function getOrder()\n {\n return 3;\n }", "function getOrder() {\n\t\treturn $this->order;\n\t}", "function getOrder()\n {\n return 101;\n }", "public function getCookie($name = null);", "public function getCookie($cookieName);", "function getOrder()\n {\n return 11;\n }", "public function getCookie()\n {\n return empty(self::$cookie) ? self::$cookie = $this->requestCookie() : self::$cookie;\n }", "public function get_order()\n {\n return $this->order;\n }", "function getAll() {\n\t\treturn $_COOKIE;\n\t}", "public function getOrder()\n {\n return $this->getData(self::ORDER);\n }", "public function getCookie() {\n return $this->stack->getCurrentRequest()->cookies->get('reactions_sessions', FALSE);\n }", "public function get()\n {\n return $this->cookieManager->getCookie(self::COOKIE_NAME);\n }", "protected static function get_cookie_array()\n {\n return json_decode(json_encode(Session::get('uzanto')), true);\n }", "private function getOrderId(): int\n {\n /*\n if (Auth::guard('web')->check()) {\n $user = User::find($this->req->user()->id);\n return $this->getActOrderByUser($user);\n }\n */\n $this->checkOrderOfPurchase();\n //Если в сессии нет ключа текущего Ордера\n if (!$this->req->session()->has(self::SESSION_KEY)) {\n //создаем новый Ордер и записываем его в кэш-переменнную.\n if ($this->createOrder()) {\n //Если при этом еще есть зарегистрированный пользователь\n if ($this->req->user()) {\n $user = User::find($this->req->user()->id);\n $this->saveUserForOrder($user, $this->_order->id);\n }\n $this->req->session()->put(self::SESSION_KEY, $this->_order->id);\n }\n }\n //Просто возвращаем тот ключ Ордера из сессии - котрый там был\n return $this->req->session()->get(self::SESSION_KEY);\n }", "private function getCookies()\n {\n return $this->getCache()->get(self::SESSION_LOGIN, array());\n }", "public function getCookieParams(): array;", "public function getCookieParams(): array;", "public function getOrder() {\r\n return 3;\r\n }", "public function get_order()\n {\n }", "function getOrder() {\n\t\treturn $this->_order;\n\t}" ]
[ "0.64667374", "0.63487154", "0.6225081", "0.6225081", "0.6225081", "0.6225081", "0.6225081", "0.6225081", "0.6225081", "0.6225081", "0.62242293", "0.61988115", "0.6196117", "0.6165243", "0.6165243", "0.6141949", "0.6141949", "0.61384726", "0.61384726", "0.61384726", "0.61384726", "0.60738105", "0.60702443", "0.6046791", "0.60433155", "0.60291797", "0.5982657", "0.5971176", "0.5958912", "0.59539765", "0.59466404", "0.59275097", "0.59232235", "0.59153354", "0.5905993", "0.5890414", "0.58766073", "0.587024", "0.58698106", "0.58524853", "0.58524853", "0.58524853", "0.58524853", "0.5839488", "0.58374965", "0.5826007", "0.5819347", "0.580223", "0.5787496", "0.57724375", "0.57724375", "0.576484", "0.57593095", "0.5754809", "0.5751547", "0.57316995", "0.5721765", "0.5718848", "0.57143277", "0.571076", "0.5693449", "0.5690544", "0.5683496", "0.56734407", "0.5664759", "0.5664508", "0.56562126", "0.56562126", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.5655855", "0.56517524", "0.56459564", "0.5638892", "0.56295633", "0.5626236", "0.5624896", "0.5622785", "0.56182927", "0.5615053", "0.5614139", "0.56083494", "0.56048685", "0.56026036", "0.5599471", "0.559582", "0.559582", "0.5595745", "0.55940205", "0.5589045" ]
0.74988633
0
When we defer a DeferEvent. (The publisher decides that this should be a defer event)
Когда мы откладываем DeferEvent. (Издатель решает, что это должен быть событие откладывания)
public function onDeferEvent(DeferEvent $event) { $message=$this->messageService->createMessage($event->getDeferredEvent()); $this->queue->addMessage($message, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defer() {\n return TRUE;\n }", "public function defer($callback) {}", "public function onNonDeferEvent(Event $event)\n {\n // save original dispatcher\n $orgDispatcher=$event->getDispatcher();\n\n // add a dummy dispatcher because we cannot serialize or unserialize PDO instances\n $event->setDispatcher(new DummyEventDispatcher());\n $message=$this->messageService->createMessage($event);\n $this->queue->addMessage($message);\n\n // reset to the original dispatcher\n $event->setDispatcher($orgDispatcher);\n }", "public function set_defer($defer)\n\t{\n\t\t\t$this->defer = $defer;\n\t}", "public function defer() {\n return false;\n }", "public function isDeferred(): bool\n {\n return $this->defer;\n }", "public function isDeferred()\n\t{\n\t\treturn $this->defer;\n\t}", "public function isDeferred()\n {\n }", "function getDefer()\n {\n return $this->getAttribute(\"defer\");\n }", "public static function deferred(): bool\n {\n return true;\n }", "public function isDeferred(): bool\n {\n return true;\n }", "public function testTaskDefer()\n {\n $entity = $this->createMock(TaskEntity::class);\n $entity\n ->expects($this->once())\n ->method('setPid')\n ->with(1001);\n $entity\n ->expects($this->once())\n ->method('setExitCode')\n ->with(0);\n\n $connection = $this->createMock(Connection::class);\n\n $entityManager = $this->createMock(EntityManagerInterface::class);\n $entityManager\n ->expects($this->once())\n ->method('getConnection')\n ->will($this->returnValue($connection));\n\n $entityManager\n ->expects($this->exactly(2))\n ->method('flush');\n\n $task = new Task($entityManager, $entity);\n\n $this->assertSame($task, $task->defer(1001, function () {\n return 0;\n }));\n }", "public function getDeferred()\n {\n return $this->deferred;\n }", "public function run_deferred_actions()\n {\n }", "protected function _delayFaxDetectedEventDispatch()\n {\n $faxToneDetectedEventDispatchDelay = $this->_options[self::OPT_FAX_TONE_DETECTED_EVENT_DISPATCH_DELAY];\n if ( $faxToneDetectedEventDispatchDelay > 0 ) {\n $this->_timer->reset();\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => $faxToneDetectedEventDispatchDelay ) );\n $this->_timer->addEventListener(\n Streamwide_Engine_Events_Event::TIMEOUT,\n array(\n 'callback' => array( $this, 'onTimeout' ),\n 'options' => array( 'autoRemove' => 'before' )\n )\n );\n $this->_timer->arm();\n } else {\n $this->_unsubscribeFromEngineEvents();\n $this->_stateManager->setState( self::STATE_READY );\n return $this->dispatchEvent( new Streamwide_Engine_Events_Event( $this->_detectionGoalAttainedEventName ) );\n }\n }", "public function testPostFlushNoDeferred()\n {\n $args = Mocks::getEventArgsMock($this);\n\n $this->fileStorage->expects($this->never())->method('upload');\n $this->dataStorage->expects($this->never())->method('postFlush');\n\n $listener = $this->getUploaderListener();\n $this->assertEquals($listener->getDeferredObjectNum(), 0);\n $listener->postFlush($args);\n $this->assertEquals($listener->getDeferredObjectNum(), 0);\n }", "public static function defer(callable $callback): void {\n dump_trace();\n self::get()->defer($callback);\n }", "public static function notify( $event, $defer = true ) {\n\t\tif ( $defer ) {\n\t\t\t// defer job insertion till end of request when all primary db transactions\n\t\t\t// have been committed\n\t\t\tDeferredUpdates::addCallableUpdate(\n\t\t\t\tfunction() use ( $event ) {\n\t\t\t\t\tglobal $wgEchoCluster;\n\t\t\t\t\t$params = array( 'event' => $event );\n\t\t\t\t\tif ( wfGetLB()->getServerCount() > 1 ) {\n\t\t\t\t\t\t$params['mainDbMasterPos'] = wfGetLB()->getMasterPos();\n\t\t\t\t\t}\n\t\t\t\t\tif ( $wgEchoCluster ) {\n\t\t\t\t\t\t$lb = wfGetLBFactory()->getExternalLB( $wgEchoCluster );\n\t\t\t\t\t\tif ( $lb->getServerCount() > 1 ) {\n\t\t\t\t\t\t\t$params['echoDbMasterPos'] = $lb->getMasterPos();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$title = $event->getTitle() ? $event->getTitle() : Title::newMainPage();\n\t\t\t\t\t$job = new EchoNotificationJob( $title, $params );\n\t\t\t\t\tJobQueueGroup::singleton()->push( $job );\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if the event object has valid event type. Events with invalid\n\t\t// event types left in the job queue should not be processed\n\t\tif ( !$event->isEnabledEvent() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only send web notification for welcome event\n\t\tif ( $event->getType() == 'welcome' ) {\n\t\t\tself::doNotification( $event, $event->getAgent(), 'web' );\n\t\t} else {\n\t\t\t// Get the notification types for this event, eg, web/email\n\t\t\tglobal $wgEchoDefaultNotificationTypes;\n\t\t\t$notifyTypes = $wgEchoDefaultNotificationTypes['all'];\n\t\t\tif ( isset( $wgEchoDefaultNotificationTypes[$event->getType()] ) ) {\n\t\t\t\t$notifyTypes = array_merge( $notifyTypes, $wgEchoDefaultNotificationTypes[$event->getType()] );\n\t\t\t}\n\t\t\t$notifyTypes = array_keys( array_filter( $notifyTypes ) );\n\n\t\t\t$users = self::getUsersToNotifyForEvent( $event );\n\n\t\t\t$blacklisted = self::isBlacklisted( $event );\n\t\t\tforeach ( $users as $user ) {\n\t\t\t\t// Notification should not be sent to anonymous user\n\t\t\t\tif ( $user->isAnon() ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( $blacklisted && !self::isWhitelistedByUser( $event, $user ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\twfRunHooks( 'EchoGetNotificationTypes', array( $user, $event, &$notifyTypes ) );\n\n\t\t\t\tforeach ( $notifyTypes as $type ) {\n\t\t\t\t\tself::doNotification( $event, $user, $type );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function setDeferredURL($url) {\n $this->deferredURL = $url;\n }", "function setDefer($value)\n {\n $this->setAttribute(\"defer\", $value);\n return $this;\n }", "protected static function getFacadeAccessor()\n {\n return 'defer';\n }", "function themify_defer_js($tag,$handle,$src){\n\tif ( ! empty( $tag ) && strpos( $tag, ' defer' ) === false ) {\n\t\tstatic $isJq=null;\n\t\tif($isJq===null){\n\t\t\t$isJq = themify_check( 'setting-jquery', true ) && ( !is_admin() || themify_is_ajax() ) && !is_customize_preview() && !themify_is_login_page();\n\t\t}\n\t\tif($isJq===true || $handle === 'admin-bar' || Themify_Enqueue_Assets::is_themify_file( $src, $handle ) || in_array( $handle, Themify_Enqueue_Assets::getKnownJs(), true )){\n\t\t\tstatic $ex=null;\n\t\t\tif($ex===null){\n\t\t\t\t$ex = apply_filters( 'themify_defer_js_exclude', array() );\n\t\t\t}\n\t\t\tif(!in_array( $handle, $ex,true)){\n\t\t\t\t$tag = str_replace(' src', ' defer=\"defer\" src', $tag);\n\t\t\t}\n\t\t}\n\t}\n\n return $tag;\n}", "function add_async_defer( $tag, $handle, $src ) {\n\tglobal $wp_scripts;\n\n\tif ( ! empty( $wp_scripts->registered[$handle]->extra['async'] ) ) {\n\t\tif ( preg_match( '/async([=\\s]([\\'\\\"])((?!\\2).+?[^\\\\\\])\\2)?/', $tag, $match ) ) {\n\t\t\t$tag = str_replace( $match[0], 'async', $tag );\n\t\t} else {\n\t\t\t$tag = str_replace( '<script ', '<script async ', $tag );\n\t\t}\n\t}\n\n\tif ( ! empty( $wp_scripts->registered[$handle]->extra['defer'] ) ) {\n\t\tif ( preg_match( '/defer([=\\s]([\\'\\\"])((?!\\2).+?[^\\\\\\])\\2)?/', $tag, $match ) ) {\n\t\t\t$tag = str_replace( $match[0], 'defer', $tag );\n\t\t} else {\n\t\t\t$tag = str_replace( '<script ', '<script defer ', $tag );\n\t\t}\n\t}\n\n\treturn $tag;\n}", "public static function name(): string\n {\n return 'defer';\n }", "public function defer($pid, SmsMessage $message)\n\t{\n\t\t$m = $this->serialize($message);\n\t\t$this->redis->lRem($this->key.':active:'.$pid,$m);\n\t\t$this->redis->lPush($this->key.':deferred',$m);\n\t}", "public function testPostFlushHasDeferred()\n {\n $args = Mocks::getEventArgsMock($this);\n $obj = new DummyEntity();\n $file = Mocks::getFileMock($this);\n\n $propertyMapping = $this->createFilledPropertyMapping($file);\n $this->setDataStorageObjectMapping($obj, $propertyMapping);\n\n $listener = $this->getUploaderListener();\n $listener->prePersist(Mocks::getEventArgsMock($this));\n $this->assertEquals($listener->getDeferredObjectNum(), 1);\n\n\n $this->fileStorage->expects($this->once())\n ->method('upload')\n ->with($propertyMapping, $file)\n ->will($this->returnValue(array('fileName' => 'NEW_NAME')));\n\n $propertyMapping->expects($this->once())\n ->method('setFileDataPropertyValue')\n ->with(array('fileName' => 'NEW_NAME'));\n\n $this->dataStorage->expects($this->once())->method('postFlush');\n\n $listener->postFlush($args);\n $this->assertEquals($listener->getDeferredObjectNum(), 0);\n }", "public function isChangeTrackingDeferredExplicit()\n {\n return $this->changeTrackingPolicy == self::CHANGETRACKING_DEFERRED_EXPLICIT;\n }", "public function testDoubleDetach()\n {\n $this->eventDispatcher->attach('e', $this->eventListener);\n $this->eventDispatcher->detach('e', $this->eventListener);\n $this->eventDispatcher->detach('e', $this->eventListener);\n }", "public function isChangeTrackingDeferredExplicit() {\n return $this->changeTrackingPolicy == self::CHANGETRACKING_DEFERRED_EXPLICIT;\n }", "public function markFired()\n {\n $this->fired = true;\n }", "public function isDeferred()\n {\n return $this instanceof DeferrableProvider;\n }", "public function deferEvents($events)\n {\n $this->_events\n ->registerOne('beforeTransaction', function() use ($events) {\n $events->cork();\n })\n ->registerOne('rollback', function() use ($events) {\n $events->discard()->uncork();\n })\n ;\n\n $this->connection()->events()->registerOne('afterCommit', function() use ($events) {\n $events->uncork();\n });\n\n return $this;\n }", "function addDeferredJs()\n {\n $this->bodyCollection->addJS('handlebars-v1.1.2.js', array('type' => 'defer'));\n }", "public function defer($id)\n\t{\n\t\t$result = [];\n\n\t\tif (!TaskAccessController::can($this->userId, ActionDictionary::ACTION_TASK_DEFER, (int)$id))\n\t\t{\n\t\t\t$this->addForbiddenError();\n\t\t\treturn $result;\n\t\t}\n\n\t\tif ($id = $this->checkTaskId($id))\n\t\t{\n\t\t\t// todo: move to \\Bitrix\\Tasks\\Item\\Task\n\t\t\t$task = \\CTaskItem::getInstance($id, Util\\User::getId());\n\t\t\t$task->defer();\n\t\t}\n\n\t\treturn $result;\n\t}", "public function DoEvent($nEvent) {}", "function EnableEventWaiting(): void { }", "public static function assertNothingDispatched()\n {\n /** @var \\Illuminate\\Support\\Testing\\Fakes\\EventFake $instance */\n $instance->assertNothingDispatched();\n }", "function samyerkes_defer_scripts( $tag, $handle, $src ) {\n if ( $handle == 'samyerkes' ) {\n return '<script type=\"text/javascript\" src=\"' . $src . '\" defer></script>' . \"\\n\";\n }\n return $tag;\n}", "function rejectEvent(){\n\n\t}", "public function getDeferLoading()\n {\n return $this->deferLoading;\n }", "abstract protected function when(DomainEvent $event);", "function jp_pbe_set_event( $post_id = 0 ) {\n\t// Check if Reveal JS Presentations is activated\n\t// https://github.com/cgrymala/reveal-js-presentations\n\tif ( ! class_exists( 'Reveal_Presentations' ) ) {\n\t\treturn;\n\t}\n\n\t// Check if this is a JP post by email request\n\tif ( empty( $_REQUEST ) ) {\n\t\treturn;\n\t}\n\tif ( 'jetpack' !== $_REQUEST['for'] ) {\n\t\treturn;\n\t}\n\n\twp_schedule_single_event( time() + 60, 'jp_pbe_cron_hook', array( $post_id ) );\n}", "private function fireFinishedEvent()\n {\n (new FinishedEvent())->fire();\n }", "public function shouldResolveByEvent()\r\n {\r\n return $this->getResolveStrategy() === self::RESOLVE_BY_EVENT;\r\n }", "function DisableEventWaiting(): void { }", "function delete_event()\n\t\t{\n\t\t\treturn false;\n\t\t}", "abstract function isDelayedNotification();", "function add_defer_to_jquery( $tag, $handle, $src ) {\n\n if (is_admin())\n return $tag;\n\n if ( strpos($handle, 'jquery-core') === false ) {\n return str_replace( ' src=', ' defer=\"defer\" src=', $tag );\n }\n\n return $tag;\n}", "public function awaitDownloadWillBegin(ContextInterface $ctx): DownloadWillBeginEvent;", "function notify($event) {\n \t$this->_eventdispatcher->notify($event); \n }", "public function awaitPaused(ContextInterface $ctx): PausedEvent;", "public function until($event, $payload = [])\n {\n # code...\n }", "public function onPostpone(Event $event, $eventName)\n {\n if ($event instanceof Amqp\\AmqpEvent) {\n if ($this->postpone($event)) {\n $event->ack();\n }\n if ($this->stopPropagation) {\n $event->stopPropagation();\n }\n }\n }", "public function event ( $event ) { return null; }", "public function dispatchOnDataSetInitEvent();", "public function until(string|object $event, mixed $payload = []): mixed;", "public function X1ResetEvent($ladder_id);", "public function notify(atkDGEvent $event);", "function add_asyncdefer_attribute($tag, $handle)\n{\n $param = '';\n if ( strpos($handle, 'async') !== false ) $param = 'async ';\n if ( strpos($handle, 'defer') !== false ) $param .= 'defer ';\n if ( $param )\n return str_replace('<script ', '<script ' . $param, $tag);\n else\n return $tag;\n}", "public function setup_post( $post = null ) {\n\t\t$this->event = $this->get_post_event_data( $post );\n\t}", "public function done(callable $onFulfilled = null, callable $onRejected = null);", "public function later($delay, $view, array $data, $callback, $queue = null);", "public static function do_deferred_product_sync()\n {\n }", "public function notify(Event $event);", "function agregar_async_defer($tag, $handle){\n\t\tif('maps' !== $handle)\n\t\t\treturn $tag;\n\t\treturn str_replace('src','async=\"async\" defer=\"defer\" src', $tag);\n\t}", "public function laterOn(string $queue, $delay, $job, $data = '');", "function _future_post_hook($deprecated = '', $post) {\n\twp_clear_scheduled_hook( 'publish_future_post', $post->ID );\n\twp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID));\n}", "public function flush() : void\n {\n while ($nextEvent = $this->dequeue()) {\n $this->eventPublisher->publish($nextEvent);\n }\n }", "public function firstEvent(): Event\n {\n return $this->calledEvent;\n }", "function acf_doing($event = '', $context = '') {}", "public function onOrderWasDelivered(OrderWasDelivered $event, StoredEvent $storedEvent)\n {\n }", "public function fire(string|object $event, mixed $payload = [], bool $halt = false): void;", "public function postDown()\n {\n }", "function publish_future_post_now($id) {\n\tif(!empty($_POST[\"post_type\"]) && $_POST[\"post_type\"] == \"event\")\n\t wp_publish_post($id);\n}", "public static function sendSetupEvent()\n {\n /** @var Configuration $configService */\n $configService = ServiceRegister::getService(Configuration::CLASS_NAME);\n\n if (!$configService->isSetupFinished()\n && $configService->getDefaultParcel() !== null\n && $configService->getDefaultWarehouse() !== null\n ) {\n /** @var ShippingMethodService $shippingService */\n $shippingService = ServiceRegister::getService(ShippingMethodService::CLASS_NAME);\n\n if (count($shippingService->getActiveMethods()) === 1) {\n /** @var Proxy $proxy */\n $proxy = ServiceRegister::getService(Proxy::CLASS_NAME);\n $proxy->sendAnalytics(Analytics::EVENT_SETUP);\n $configService->setSetupFinished();\n }\n }\n }", "function add_defer_async($tag, $handle)\n{\n if ('google-maps' !== $handle) {\n return $tag;\n }\n return str_replace(' src', ' async defer src', $tag);\n}", "public function fire($event, $payload = [], $halt = false);", "function <%= themeNameSpace_script_tag_defer($tag, $handle) {\n // exclusions, admin and jquery and maps scripts\n if (is_admin()){\n return $tag;\n }\n if (strpos($tag, '/wp-includes/js/jquery/jquery') || strpos($tag, 'ajax.googleapis.com/ajax/libs/jquery') || strpos($tag, 'maps.googleapis.com/maps/api/js')) {\n return $tag;\n }\n\n // old IE can't handle the truth!\n if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 9.') !==false) {\n return $tag;\n }\n if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.') !==false) {\n return $tag;\n }\n // add defer\n else {\n return str_replace(' src',' defer src', $tag);\n }\n}", "public function onPaymentDone(PaymentOrderDoneEvent $paymentOrderDoneEvent)\n{\n $test = 'test';\n/*\n* Your code for this event\n*/\n}", "function rocket_defer_js( $buffer ) {\r\n\t_deprecated_function( __FUNCTION__ . '()', '3.8', 'WP_Rocket\\Engine\\Optimization\\DeferJS\\DeferJS::defer_js()' );\r\n\r\n\tif ( ( defined( 'DONOTROCKETOPTIMIZE' ) && DONOTROCKETOPTIMIZE ) || ( defined( 'DONOTASYNCCSS' ) && DONOTASYNCCSS ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( ! get_rocket_option( 'defer_all_js' ) ) {\r\n\t\treturn $buffer;\r\n\t}\r\n\r\n\tif ( is_rocket_post_excluded_option( 'defer_all_js' ) ) {\r\n\t\treturn $buffer;\r\n\t}\r\n\r\n\t$buffer_nocomments = preg_replace( '/<!--(.*)-->/Uis', '', $buffer );\r\n\t// Get all JS files with this regex.\r\n\tpreg_match_all( '#<script\\s+([^>]+[\\s\\'\"])?src\\s*=\\s*[\\'\"]\\s*?([^\\'\"]+\\.js(?:\\?[^\\'\"]*)?)\\s*?[\\'\"]([^>]+)?\\/?>#iU', $buffer_nocomments, $tags_match );\r\n\r\n\tif ( ! isset( $tags_match[0] ) ) {\r\n\t\treturn $buffer;\r\n\t}\r\n\r\n\t$exclude_defer_js = implode( '|', get_rocket_exclude_defer_js() );\r\n\r\n\tforeach ( $tags_match[0] as $i => $tag ) {\r\n\t\t// Check if this file should be deferred.\r\n\t\tif ( preg_match( '#(' . $exclude_defer_js . ')#i', $tags_match[2][ $i ] ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t// Don't add defer if already async.\r\n\t\tif ( false !== strpos( $tags_match[1][ $i ], 'async' ) || false !== strpos( $tags_match[3][ $i ], 'async' ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t// Don't add defer if already defer.\r\n\t\tif ( false !== strpos( $tags_match[1][ $i ], 'defer' ) || false !== strpos( $tags_match[3][ $i ], 'defer' ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t$deferred_tag = str_replace( '>', ' defer>', $tag );\r\n\t\t$buffer = str_replace( $tag, $deferred_tag, $buffer );\r\n\t}\r\n\r\n\treturn $buffer;\r\n}", "public function notify()\n {\n $this->getLog()->debug('DataSet ' . $this->dataSetId . ' wants to notify');\n\n $this->displayFactory->getDisplayNotifyService()->collectNow()->notifyByDataSetId($this->dataSetId);\n }", "function defer_js ( $url ) {\nif ( FALSE === strpos( $url, '.js' ) ) return $url;\nif ( strpos( $url, 'jquery.js' ) ) return $url;\nreturn \"$url.' async onload='myinit()\";\n}", "public function setDecesed($decesed) {\n\t\t$this->decesed = $decesed;\n\t}", "public function setSkipPreEventMetaData()\n {\n $this->skipPreEventMetaData = true;\n }", "public function WillFire() {}", "public function testGetEventWithEventSet(): void\n {\n $event = new AdapterChainEvent();\n\n $this->adapterChain->setEvent($event);\n\n $this->assertEquals(\n $event,\n $this->adapterChain->getEvent(),\n 'Asserting the event fetched is the same as the event set'\n );\n }", "public function laterOn($queue, $delay, $sportevent, $data = '')\n {\n return $this->push($sportevent, $data, $queue);\n }", "public function triggerMessageEventSubscription() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "public function triggerMessageEventSubscription() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "public function testBeforeEvent()\n {\n $query = new Query();\n\n //force entity to be a stdClass\n $query->getEmitter()->addListener('build.select', function (QueryBuilderEvent $event) {\n $event->getBuilder()->setEntity(Post::class);\n });\n\n $result = $query->select()->from('post')->where('id = 1')->execute();\n\n $query->getEmitter()->removeAllListeners('build.select');\n\n $this->assertInstanceOf(Post::class, $result);\n }", "public function later($delay, Queue $queue);", "public function later($delay, Queue $queue);", "public function testComDayCqWcmCoreImplEventTemplatePostProcessor() {\n\n }", "public function addDelayedExchange(): void\n {\n $this->channel->exchange_declare($this->exchangeDelayTopic(), $this->topicExchangeTypeName, false, true,false);\n }", "function agregar_async_defer($tag, $handle){\n\tif ('gmap' !== $handle) \n\t\treturn $tag;\n\t\treturn str_replace(' src', 'async=\"async\" defer=\"defer\" src', $tag);\n\t\n\n}", "public function isChangeTrackingDeferredImplicit() {\n return $this->changeTrackingPolicy == self::CHANGETRACKING_DEFERRED_IMPLICIT;\n }", "public static function schedule_events() {\n\t\t\tif ( ! wp_next_scheduled( 'pj_transient_cleaner' ) )\n\t\t\t\twp_schedule_event( time(), 'daily', 'pj_transient_cleaner' );\n\n\t\t\tadd_action( 'pj_transient_cleaner', array( __CLASS__, 'cleaner' ) );\n\t\t}", "function isReadyToGo()\n {\n return (strtotime($this->Created) + $this->DeferTimeInSeconds) < time();\n }", "public function isChangeTrackingDeferredImplicit()\n {\n return $this->changeTrackingPolicy == self::CHANGETRACKING_DEFERRED_IMPLICIT;\n }", "public function deliver();" ]
[ "0.6208928", "0.61595905", "0.611216", "0.59390754", "0.5911803", "0.57107836", "0.57071763", "0.56608886", "0.55944246", "0.55901974", "0.5486446", "0.5220866", "0.51642513", "0.5089483", "0.5083392", "0.4981265", "0.49689227", "0.48111248", "0.47716898", "0.47673228", "0.47619194", "0.4746595", "0.47193047", "0.4697731", "0.46883515", "0.46629798", "0.46249357", "0.46246913", "0.46246627", "0.46129885", "0.45857495", "0.45839074", "0.4581612", "0.45691857", "0.45684248", "0.45490766", "0.45381758", "0.4496215", "0.44824165", "0.44815692", "0.44663572", "0.44646016", "0.44446653", "0.4416979", "0.4416644", "0.44121197", "0.43939513", "0.43926045", "0.43887687", "0.4388652", "0.4373471", "0.43686804", "0.43596494", "0.43587127", "0.43584105", "0.43567923", "0.4352999", "0.4345713", "0.4342132", "0.4338928", "0.43370736", "0.43367878", "0.4318005", "0.43143556", "0.43071935", "0.4298204", "0.42952845", "0.42862812", "0.42445648", "0.42369783", "0.4219117", "0.42142102", "0.42065915", "0.41979763", "0.4194604", "0.41782844", "0.41772476", "0.41683176", "0.4163203", "0.41430938", "0.41414046", "0.41379642", "0.41276142", "0.4123402", "0.41205913", "0.41169408", "0.41124207", "0.41108575", "0.41108575", "0.41041017", "0.41028455", "0.41028455", "0.41026914", "0.40988436", "0.4097629", "0.40951586", "0.4092806", "0.40909538", "0.40901357", "0.40890422" ]
0.70311224
0
/ Function to get the url of the photo (for the moment it's the photo of the main site)
Функция для получения URL фотографии (на данный момент это фотография главной страницы)
function getPhotoURL() { $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; $host = $_SERVER['HTTP_HOST']; $script = substr($_SERVER['SCRIPT_NAME'],0,strrpos($_SERVER['SCRIPT_NAME'],"/")); return $protocol . '://' . $host . $script . '/assets/img/logo_fb1.jpg'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotoUrl() : string {\n\t\treturn($this->photoUrl);\n\t}", "public function getURLToPhoto(): string {\n return \"photo.php?p=\" . $this->id;\n }", "public function getPhotoUrl()\n {\n return $this->photoUrl;\n }", "public function getURL() {\n\t\t$title = elgg_get_friendly_title($this->getTitle());\n\t\t$url = \"photos/image/$this->guid/$title\";\n\t\treturn elgg_normalize_url($url);\n\t}", "public function getPhoto()\n\t{\n\t\t$photo = $this->getRecipe()->selectOne('.photo');\n\n\t\tif ($photo->length === 1) {\n\t\t\treturn $this->getParser()->getAbsoluteUrl($photo->src);\n\t\t}\n\n\t\treturn false;\n\t}", "public function getImageurl()\n {\n return $this->getPictureUrl();\n }", "function getPhotoUrl($photo_id, $photoInfo = false) {\n \n\t//if photoInfo is false/empty, load info for photo id\n\tif ($photoInfo) \n $photo = $photoInfo;\n // else look in the array for photo page url\n\telse\n $photo = $this->loadPhotoInfo($photo_id);\n $url = $photo['photo']['urls']['url'][0]['_content'];\n return $url;\n }", "public function getPicUrl() {\n return $this->get(self::PIC_URL);\n }", "public function getPhotoImgUrl() {\n return $this->photoImgUrl;\n }", "static function get_ImageURL(){\n\t\treturn self::get_SiteHOME(). '/' .self:: getImagePasta();\n\n\t}", "abstract public function getPictureUrl();", "public function getPictureUrl()\n {\n return $this->getField('photo_max_orig');\n }", "public static function samplePhotoUrl(){\n return url('/img/img-1.jpg');\n }", "function url(): string { return wp_get_attachment_url($this->id()); }", "public function getPictureUrl()\n {\n $user = $this->getOauthUser();\n return $user['pic_url'];\n }", "public function getImageUrl()\n {\n $path = $this->getPath('origin'); \n \n $url = $this->getUrl('origin'); \n if(!file_exists($path)){\n $url = false; \n } \n return $url;\n }", "public function getUrl(): string {\n\t\treturn $this->url_image;\n\t}", "public function getPhotoUrl(): ?string;", "public function getUrlFoto()\n {\n return self::RUTA_IMAGES_AUTORES . $this->getFoto();\n }", "public function get_image_url() {\n\n\t\treturn $this->img_url;\n\t}", "public function get_image_url() {\n\t\t$settings = $GLOBALS['WCCSP_Settings']->get_settings();\n\t\t$image_meta = wp_get_attachment_metadata( $settings['image_id'] );\n\t\t$size = isset( $image_meta['sizes']['wccsp_image_medium_rectangle'] ) ? 'wccsp_image_medium_rectangle' : 'full'; \n\t\t$image = wp_get_attachment_image_src( $settings['image_id'], $size );\n\t\t\n\t\treturn $image ? $image[0] : false;\n\t}", "public function getUrl()\n {\n return Config::get('app.image_url').$this->imageId;\n }", "public function getPhotoURL()\n\t{\n\t\t$path = Yii::getAlias('@web/images/upload/user');\n\t\tif(!$path) return false;\n\t\treturn $path. '/' . $this->id . '.jpg';\n\t}", "public function getimageurl() {\r\n $row = $this -> getdbdata();\r\n return $row['image'];\r\n }", "public function getImageURL() {\n\t\t// check if http or https is being used in order to build up the url\n\t\t$httpOrHttps = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\");\n\t\t// get the hostname / domain name for current url\n\t\t$host = $_SERVER['HTTP_HOST'];\n\t\t// link url to navigate to image\n\t\t$url = \"/v1/tasks/\".$this->getTaskID().\"/images/\".$this->getID();\n\t\t// return the built up url to access the image directly\n\t\treturn $httpOrHttps.\"://\".$host.$url;\n\t}", "public function getPicUrl()\r\n {\r\n return $this->getAttr('PicUrl');\r\n }", "public function profilePhotoUrl()\n {\n return url($this->profile_photo_path.'/'.$this->profile_photo_name);\n }", "public function get_image_url()\n {\n }", "public function image()\n {\n return optional($this->media->first())->getFullUrl('thumbnail');\n }", "public function getUrlImage()\n {\n return $this->urlImage;\n }", "public function getPicUrl()\n {\n return $this->picUrl;\n }", "public function getPicUrl()\n {\n return $this->picUrl;\n }", "private function photo2url($photo)\n {\n return base_url(UPLOADPATH_PHOTO . $photo);\n }", "function getExternalUrl() {\n // Return the direct image.\n $parts = $this->parameters;\n return 'http://'. $parts['u'] . $this->base_url .'images/' . $parts['p'] .'/'. $parts['s'];\n }", "public function getPictureUrl()\n {\n return $this->getValueByKey($this->response, 'pictureUrl');\n }", "public function url()\n {\n if ( isset($this->avatarService) ) {\n return $this->avatarService->getUrl();\n }\n\n return null;\n }", "public function image()\n {\n if ($this->media->first()) {\n return $this->media->first()->getFullUrl('thumb');\n }\n\n return null;\n }", "function get_image_url(){\n\t$image_id = get_post_thumbnail_id();\n\t$image_url = wp_get_attachment_image_src($image_id,'large');\n\t$image_url = $image_url[0];\n\techo $image_url;\n\t}", "public function getPhotoUrl($type)\n\t{\n if ($info = parent::getData()) {\n \t$ci =& get_instance();\n $ci->load->config('dir');\n $upload_path = $ci->config->item('upload_dir');\n\n if($type == 1){\n \t$path = $upload_path . 'media/' . $info['photo']; \n } elseif($type == 2){\n \t$path = $upload_path . 'media/thumbnails/' . $info['photo']; \n } \n\n if (!file_exists($path) || $info['photo'] == '') {\n \t$url = base_url().BASE_IMG . 'user-photo.jpg';\n } else {\n $url = site_url($path);\n }\n }\t\n\n return $url;\t\n\t}", "public function getThumbnailUrl()\n {\n return Url::site($this->path.$this->thumbnail);\n }", "public function lvGetCoverPictureUrl() {\n // target field \n if ( method_exists( $this, 'lvGetBestAffiliateDetails' ) ) {\n $aBestArticleDetails = $this->lvGetBestAffiliateDetails();\n $oProduct = $aBestArticleDetails['product'];\n }\n else {\n $oProduct = $this->lvGetProduct();\n }\n\n $sCoverPicFieldName = $oProduct->oxarticles__lvcoverpic->value;\n \n if ( $sCoverPicFieldName != '' ) {\n $sCoverPicFieldName = \"oxarticles__\".$sCoverPicFieldName;\n $sPicUrl = $oProduct->$sCoverPicFieldName->value;\n if ( $sPicUrl == '' ) {\n $sPicUrl = $this->_lvSaveAndSetAlternativeCoverFromOtherVendor( $oProduct );\n if ( $sPicUrl == '' ) {\n $sPicUrl = $this->lvGetFirstPictureUrl();\n } \n }\n else if ( strpos( $sPicUrl, 'http' ) === false ) {\n // seems to be a native picture, but existing\n $sSize = $this->getConfig()->getConfigParam( 'aDetailImageSizes' );\n $sPicUrl = oxRegistry::get(\"oxPictureHandler\")->getProductPicUrl( \"product/1/\", $sPicUrl, $sSize, 'oxpic1' );\n }\n }\n else {\n // falbackurl\n $sPicUrl = $this->lvGetFirstPictureUrl();\n }\n \n return $sPicUrl;\n }", "public function getImageUrl();", "public abstract function getUrlImageProfile();", "public abstract function getUrlImageProfile();", "public function getImgFullPathUrl()\n {\n return \\Yii::$app->get($this->urlManager)->getHostInfo() . $this->imgFileUrl;\n }", "function getImageURL()\n\t{\n\t\t$url = $_SERVER['REQUEST_URI'];\n\t\t$url = substr( $url, 0, strrpos( $url, '/') );\n\t\t$url .= '/test.jpg';\n\t\treturn $url;\n\t\t\n\t}", "public function getPictureUrl()\n {\n if (xoops_trim($this->getVar('product_image_url')) != '') {\n return OLEDRION_PICTURES_URL . '/' . $this->getVar('product_image_url');\n } else {\n return '';\n }\n }", "public function getURLImage() {\n\t\treturn $this->_uRLImage;\n\t}", "public function getPictureURL()\n {\n return $this->pictureURL;\n }", "public function getPictureURL()\n {\n return $this->pictureURL;\n }", "function get_image_link($occasion)\n {\n \n return $occasion->algemeen->fotos[0]->alternatieven[1]->url;\n }", "function getURL()\n {\n return 'http://wakka.xiffy.nl/popupimagegd';\n }", "public function imageUrl(): string\n {\n return $this->imageUrl;\n }", "public function getUrl(Picture $picture);", "public final function getImageUrl()\n {\n return $this->_getUrl('image');\n }", "function ecf_get_image_url($url) {\n\t$upload_url_path = get_option('upload_url_path');\n\tif (!$upload_url_path) {\n\t\t$upload_url_path = get_option('home') . '/wp-content/uploads/';\n\t}\n\treturn $upload_url_path . $url;\n}", "private function __getPhotoSourceURL($photo, $type){\n\t\treturn \"http://farm{$photo['farm']}.staticflickr.com/{$photo['server']}/{$photo['id']}_{$photo['secret']}_$type.jpg\";\n\t}", "public function getImageUrl()\n {\n return $this->image_url;\n }", "public function getImageUrl()\n {\n return $this->image_url;\n }", "public function getBannerPictureUrl()\n {\n if (isset($this->oxactions__oxpic) && $this->oxactions__oxpic->value) {\n $sPromoDir = oxRegistry::get(\"oxUtilsFile\")->normalizeDir(oxUtilsFile::PROMO_PICTURE_DIR);\n\n return $this->getConfig()->getPictureUrl($sPromoDir . $this->oxactions__oxpic->value, false);\n }\n }", "public function getPhotoAttribute()\n {\n if (empty($this->attributes['photo'])) {\n return null;\n }\n return env('APP_URL') . 'administrador/temas/imagem/' . $this->attributes['id'];\n }", "public function getImageUrl()\n {\n return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . self::MEDIA_DIR;\n }", "public function getImage(){\n\t\treturn Yii::$app->homeUrl . $this->post_image;\n\t}", "public function getPhotoUrl($type = null)\n\t{\n\t\t$field = 'photo_id';\n\t\tif ($type == 'thumb.large')\n\t\t{\n\t\t\t$field = 'large_photo_id';\n\t\t}\n\t\tif (empty($this -> $field))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t$file = Engine_Api::_() -> getItemTable('storage_file') -> getFile($this -> $field, $type);\n\t\tif (!$file)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $file -> map();\n\t}", "public function getThumpnailUrl() {\n $page_map = $this->search_result_item->getPagemap();\n return isset($page_map['cse_thumbnail'][0]['src']) ? $page_map['cse_thumbnail'][0]['src'] : '';\n }", "public function getPhotoThumbnailUrl() {\n return $this->photoThumbnailUrl;\n }", "public function getImageUrl()\n {\n return ($this->response['has_pic']) ? $this->response['pic'] : '' ;\n }", "function getImage(){\n\t\treturn $this->imageLink;\n\t}", "public function getImageUrl() {\n $imgAttribute = $this->imagePathAttribute();\n return empty($this->owner()->$imgAttribute) ? null : (Yii::$app->params['uploadsUrl'] . $this->owner()->$imgAttribute);\n }", "public function getProfilePictureURL() {\n //if img src is from google+\n if (substr($this->_imageSrc, 0, 4) == 'http') {\n return $this->_imageSrc;\n }\n //if img is from local folder\n else {\n return \"../static/img/profile/users/\" . $this->_imageSrc;\n }\n }", "function photochrom_get_media_url( $id, $size ) {\n\techo esc_url( ( $i = wp_get_attachment_image_src( $id, $size ) ) && is_array( $i ) ? reset( $i ) : null );\n}", "public function getImage()\n {\n return Mage::getBaseUrl('media') . $this->current_banner->getImage();\n }", "public function getImageUrl()\n {\n return $this->imageUrl;\n }", "public function getUrlToImageFolder()\n {\n return Yii::app()->homeUrl . $this->owner->partUrlFromHome;\n }", "public function lvGetCoverPictureUrl() {\n return $this->getProduct()->lvGetCoverPictureUrl();\n }", "public function getURL();", "public function getURL();", "public function getURL();", "public function getPhotoUrl($type = null) {\r\n $photo_id = $this->photo_id;\r\n if (!$photo_id && !$this->is_locked)\r\n return 'application/modules/Sesvideo/externals/images/video.png';\r\n if ($this->is_locked)\r\n return 'application/modules/Sesvideo/externals/images/locked-video.jpg';\r\n $file = Engine_Api::_()->getItemTable('storage_file')->getFile($photo_id, $type);\r\n if (!$file)\r\n return 'application/modules/Sesvideo/externals/images/video.png';\r\n return $file->map();\r\n }", "public function getPhoto() {\n $filename = self::PHOTO_DIRECTORY . $this->userToken . '.jpg';\n\n if (!file_exists($filename))\n return null;\n\n return 'https://' . $_SERVER['SERVER_NAME'] . '/avatars/' . filemtime($filename) .\n '/' . $this->userToken . '.jpg';\n }", "abstract public function getThumbURL();", "public function getImageUri() {\n if ($image_uri = $this->get('imageUri')) {\n return $image_uri;\n }\n $object = $this->getObject();\n if ($object->uri) {\n $wrapper = file_stream_wrapper_get_instance_by_uri($object->uri);\n return $wrapper->getLocalThumbnailPath();\n }\n }", "public function getPhotoUrl($type = null) {\n\n $module = \"Siteevent\";\n $shorType = \"event\";\n\n if (empty($this->photo_id)) {\n\n $type = ( $type ? str_replace('.', '_', $type) : 'main' );\n return Zend_Registry::get('Zend_View')->layout()->staticBaseUrl . 'application/modules/' . $module . '/externals/images/nophoto_' . $shorType . '_'\n . $type . '.png';\n } else {\n $file = Engine_Api::_()->getItemTable('storage_file')->getFile($this->photo_id, $type);\n if (!$file) {\n $type = ( $type ? str_replace('.', '_', $type) : 'main' );\n return Zend_Registry::get('Zend_View')->layout()->staticBaseUrl . 'application/modules/' . $module . '/externals/images/nophoto_' . $shorType . '_'\n . $type . '.png';\n }\n\n return $file->map();\n }\n }", "public function getImageUrl()\n {\n return $this->_imageUrl;\n }", "public function getImageUrl()\n {\n if (array_key_exists(\"imageUrl\", $this->_propDict)) {\n return $this->_propDict[\"imageUrl\"];\n } else {\n return null;\n }\n }", "public function getImageLink()\n {\n return $this->current_banner->getImageLink();\n }", "function get_url_from_img_id($id)\n{\n return wp_get_attachment_image_url($id, 'full');\n}", "public function get_attachment_url_media_library(){\n\t\t\n\t\t$url = '';\n\t\t$attachmentID = isset($_REQUEST['attachmentID']) ? $_REQUEST['attachmentID'] : '';\n\t\tif($attachmentID){\n\t\t\t$url = wp_get_attachment_url($attachmentID);\n\t\t}\n\t\t\n\t\techo $url;\n\t\t\n\t\tdie();\n\t}", "public function getImageLink()\n {\n return $this->imageLink;\n }", "public function GetImage() {\n\t\treturn get_field('og_image', $this->page_id);\n\t}", "public function getImageUrl(): string\n {\n return $this->imageUrl;\n }", "public function getWasUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $avatar = isset($this->upload_file) ? $this->upload_file : '';\n return \\Yii::$app->params['uploadUrl'] . $avatar;\n }", "public function getExternalPictureURL()\n {\n return $this->externalPictureURL;\n }", "public function getPhotoUrl($type = null)\r\n\t{\r\n\t\tif (empty($this->file_id))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t$file = Engine_Api::_()->getItemTable('storage_file')->getFile($this->file_id, $type);\r\n\t\tif (!$file)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn $file->map();\r\n\t}", "public function getImageUrl()\n {\n return Config::get('site/path') . 'images/' . $this->contentType . 's/' . $this->getImage();\n }", "public function getImageUrl()\n {\n //$id_image = isset($this->id_image) ? $this->id_image : 'default_user.jpg';\n //return Yii::$app->params['uploadUrl'] . $id_image;\n return \\Yii::$app->request->BaseUrl . '/' . $this->id_image;\n }", "public function get_image_link()\n {\n }", "function the_image_url($return = null) {\n\tglobal $post;\n\tif(!$post->image_url) {\n\t\timage_setup($post);\n\t}\n\tif ($return) \n\t\treturn $post->image_url;\n\telse\n\t\techo $post->image_url;\n}", "public function getImageUri()\n {\n return $this->image_uri;\n }", "public function getImageUri()\n {\n return $this->image_uri;\n }" ]
[ "0.78519726", "0.78453827", "0.78194207", "0.7818686", "0.78033864", "0.77162457", "0.76255137", "0.75872093", "0.7580941", "0.75610477", "0.7546526", "0.752417", "0.75132704", "0.74617463", "0.74301726", "0.741664", "0.7410718", "0.7373296", "0.736129", "0.73463553", "0.7334793", "0.7283462", "0.725525", "0.72532755", "0.7246963", "0.7238082", "0.7235694", "0.7233165", "0.72301996", "0.72295433", "0.7200359", "0.7200359", "0.71938044", "0.7187002", "0.71769506", "0.7145099", "0.71346176", "0.7109224", "0.7096418", "0.70954007", "0.708854", "0.7084402", "0.70528305", "0.70528305", "0.70503765", "0.70476097", "0.7004701", "0.7000323", "0.69734955", "0.69734955", "0.69671667", "0.69606805", "0.69451344", "0.6944125", "0.6943344", "0.6931913", "0.6916981", "0.6908788", "0.6908788", "0.6903811", "0.6896472", "0.68894136", "0.68890345", "0.6888757", "0.6875711", "0.68713427", "0.6859534", "0.6857779", "0.6855286", "0.6844618", "0.68427306", "0.6836458", "0.6826795", "0.6824802", "0.6822242", "0.6811372", "0.6811372", "0.6811372", "0.6806294", "0.68060297", "0.68047285", "0.6797458", "0.6797397", "0.6795511", "0.6789893", "0.6788681", "0.67783433", "0.67745084", "0.677207", "0.677125", "0.677054", "0.6765365", "0.67551994", "0.67379767", "0.6737791", "0.6737407", "0.67373884", "0.673071", "0.6722547", "0.6722547" ]
0.80528075
0
Get the value of id_commande
Получить значение id_commande
public function getId_commande() { return $this->id_commande; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId_Commande()\n{\nreturn $this->Id_Commande;\n}", "public function getId_produit()\n {\n return $this->id_produit;\n }", "public function getIdCommandeLabo(): ?string\n {\n return $this->id;\n }", "function getIdProduit() {\n return $this->idProduit;\n }", "public function getId_produto()\n {\n return $this->id_produto;\n }", "public function getIdcorrecao()\n {\n return $this->idcorrecao;\n }", "function getCommandeById($idCommande){\r\n\t$cnx = spdo::getDB();\r\n\t$rqt = \"SELECT * FROM commande WHERE idCommande = $idCommande\";\r\n\treturn $cnx->query($rqt);\r\n}", "public function getIdProduto()\n {\n return $this->idProduto;\n }", "public function getCommandeById($id) {\n\n //\n $response = Database::getDB()->prepare('SELECT commande.id,date,montant,nom,prenom FROM commande\n INNER JOIN personne on personne.id = commande.idUser\n WHERE commande.id = :id');\n $response->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, 'Commande');\n $response->execute([':id' => $id]);\n $commande = $response->fetch();\n\n $response->closeCursor();\n\n return $commande; \n }", "public function getId_producto(){\n\t\treturn $this->id_producto;\n\t}", "public function getIdDebito() {\n return $this->idDebito;\n }", "public function getId(){\n\t\treturn $this->crmbuscador->getIdcrm();\n\t}", "public function getIdProjet(){\n return $this->idProjet;\n }", "public function commande__get($Code_commande) {\n return $this->get('commande/'.$Code_commande.'?mf_token='.$this->mf_token.'&mf_connector_token='.$this->mf_connector_token.'&mf_instance='.$this->mf_instance);\n }", "function readContratID(){\n\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id = ? LIMIT 0,1\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->no_contrat = $row['ref_contrat'];\n $this->idimmatveh = $row['collaborateur'];\n }", "public function getIdComprobante() {\n return $this->idComprobante;\n }", "function findCommande($id)\n{\n $db = DB();\n $sql = \"SELECT commandes.*, client.* FROM commandes JOIN client ON commandes.id_client = client.id_client where commandes.id_cmd =?\";\n $q = $db->prepare($sql);\n $q->execute(array($id));\n $data = $q->fetch(PDO::FETCH_ASSOC);\n return $data;\n}", "public function getId(){\n\t\treturn $this->operacion->getId_oper();\n\t}", "public function getID()\r\n{\r\nreturn $this->comentario;\r\n}", "public function getId($valeur) {\n\t\t return $this->id;\n\t}", "public function getIdDetalle()\n {\n return $this->idDetalle;\n }", "public function getIdColecao() {\n return $this->idColecao;\n }", "function consulta_idpedido($id_detalle)\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t\n\t\t\t$sql = 'select id_pedido from detalle_pedido where id=\"'.$id_detalle.'\"';\n\t\t\t$rtdo=$CI->db->query($sql);\n\t\t\tif($rtdo->num_rows()==0)\n \t\t\t\t{\n \t\t\techo \"Hubo un error \";\n \t\t\t}\n \t\t\telse\n \t\t\t{ \n\t\t\t$resul= $rtdo->row();\n\t\t\t\t}\n\t\t\treturn $resul->id_pedido;\n\t\t}", "public function getId_compra(){\n\t\treturn $this->id_compra;\n\t}", "private function getIdComuna ( $comuna )\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$id_comuna = null;\r\n\t\t\t\r\n\t\t\t$sql = \"SELECT * from comunas WHERE Nombre_Comunas = '$comuna'\";\t\t\t\r\n\t\t\t$result = mysql_query($sql);\r\n\t\t\t\r\n\t\t\tif ( mysql_num_rows($result) > 0 )\r\n\t\t\t{\r\n\t\t\t\twhile ( $f = mysql_fetch_array($result) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$id_comuna = $f[ \"idComunas\" ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $id_comuna;\r\n\t\t\t \r\n\t\t}\r\n\t\tcatch ( exception $ex )\r\n\t\t{\r\n\t\t\t//\r\n\t\t}\r\n\t}", "public function getId()\n\t{\n\t\treturn (int)$this->id_cliente;\n\t}", "private function getID(){\n\t\treturn $this->ultimoID;\n\t}", "public function getId(){\n return $this->noticias_id;\n }", "public function getModeleCommande(): ?string {\n return $this->modeleCommande;\n }", "public function getModeleCommande(): ?string {\n return $this->modeleCommande;\n }", "public function getChargeId()\n {\n return $this->getResponse()['data']['id'];\n }", "public function getIdCompartilhamento()\n {\n return $this->id_compartilhamento;\n }", "public function GetId()\n\t{\n\t\t$datas = $this->db->query('select DISTINCT no_formulir,namadepartemen from v_tblformulir order by no_formulir asc');\n\t\treturn $datas;\n\t}", "public function getNbCommande(): ?string {\n return $this->nbCommande;\n }", "public function getNbCommande(): ?string {\n return $this->nbCommande;\n }", "function commande($user_id)\n {\n $bdd = db_connect();\n\n $sql = 'SELECT id_commande,total FROM `commande` where id_user = ? and total is not null'; //le total n'est set que quand on passe la commande (filtrage)\n\n $req = $bdd -> prepare ($sql) ;\n $req->execute([$user_id]);\n\n $data = $req->fetchAll();\n return $data; \n }", "public function getIdCartao()\n {\n return $this->idCartao;\n }", "public function getId(){\n return $this->idPersona;\n }", "public function getId()\n {\n return $this->$v_id;\n }", "function DameIdProximoCargMltar()\r\n {\r\n return $this->modelcargomitar->buscaridproximo();\r\n\r\n }", "public function getIdProducto(){\n return $this->idProducto;\n }", "public function gestion_cliente_id($gestion_id){\r\n $query = $this->conexion->prepare(\"SELECT cliente_id FROM gestion WHERE id= :gestion_id\");\r\n $query->execute(array(':gestion_id'=>$gestion_id));\r\n \r\n $rows = $query->fetchAll(PDO::FETCH_ASSOC);\r\n foreach ($rows as $valor){\r\n $cliente_id = $valor[\"cliente_id\"];\r\n }\r\n\r\n return $cliente_id;\r\n }", "public function getIdValue();", "public function GetIDCompte($Pseudo, $Attaque, $Defense, $Soin)\n {\n\n $req = \"SELECT `IDCompte`,`Nom`,`Attaque`,`Defense`,`Soin` FROM `perso` WHERE `Nom`= '$Pseudo' AND `Attaque`= $Attaque AND `Defense`= $Defense AND `Soin`= $Soin\";\n //SELECT `ID`,`Nom`,`Attaque`,`Defense`,`Soin` FROM `perso` WHERE `Nom`= 'Gros Chien' AND `Attaque`= 50 AND `Defense`= 10 AND `Soin`= 30\n $reponse = $this->_BDD->query($req);\n \n $Tab = $reponse->fetch(); //\n $this->_ID = $Tab['IDCompte'];\n\n echo \"this IDCompte : \".$Tab['ID'];\n\n return $this->_ID;\n }", "public function getIdcompte()\n{\nreturn $this->idcompte;\n}", "public function idRespo()\n {\n return $this->idRespo;\n }", "public function getIdMotivoD() {\n return $this->idMotivoD;\n }", "private function _getIdicadorCartao(){\r\n\t\treturn 1;\r\n\t}", "public function getCodigo(){\n\t\treturn $this->comentariocod;\n\t}", "public function setId_commande($id_commande)\n {\n $this->id_commande = $id_commande;\n\n return $this;\n }", "public function getId(){\n\t\treturn $this->__get('id');\n\t}", "function voirProduitByCommande($id){\n $conditions = array();\n array_push($conditions, array('nameChamps'=>'idCommande','type'=>'=','name'=>'idCommande','value'=>$id));\n $req = new myQueryClass('produit',$conditions);\n $r = $req->myQuerySelect();\n if(count($r)==0){\n $r = false;\n }else{\n $r = $r;\n }\n\treturn $r;\n}", "public function getId(){\n return $this->__get('id');\n }", "public function getPantallaId(){\n\t\treturn $this->pantalla_id;\n\t}", "public function getValue() {\n return $this->p_id;\n }", "public function getIdProducto()\n {\n return $this->idProducto;\n }", "public function getID(): string {\n return $this->data['id'];\n }", "public function getIdDocteur()\n {\n return $this->id_docteur;\n }", "public function get_cad_id($cadre){\n\t\t\t//echo \"jhdfh\".$cadre;\n\t\t\t$r= $this->db->where('cil_cadre', $cadre)\n\t\t\t\t\t\t->get('cadre')\n\t\t\t\t\t\t->result_array()[0]['sno'];\n\t\t\t\t\t\t//dump($this->db->last_query());\n\t\t}", "public function getContacts_id($valeur) {\n\t\t return $this->contacts_id;\n\t}", "public function getIdDirectivo( ){\n\t\treturn $this->idDirectivo;\n\t}", "public function commande_option($id = 0)\n {\n $resultat = $this->m_controle_recurrents->commande_by_client($id);\n $results = json_decode(json_encode($resultat), true);\n echo \"<option value='0' selected='selected'>(choisissez)</option>\";\n echo \"<option value='-1'>Pas de Commande</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['cmd_id'] . \"'>\" . $row['cmd_reference'] . \"</option>\";\n }\n }", "public function getId() {\n\t\treturn $this->data['id'];\n\t}", "function getidManif(){\n return $this->idmanif;\n }", "public function getIdCompra()\r\n{\r\nreturn $this->idCompra;\r\n}", "public function getIdCompra()\r\n{\r\nreturn $this->idCompra;\r\n}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function buscarID() { \n $sentencia = \"SELECT id FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try{\n $stm = $this->db->prepare ($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r){\n $id = $r->id;\n } \n return $id;\n\n }catch(Exception $e){\n echo $e->getMessage();\n }\n }", "public function getId_cliente()\n {\n return $this->id_cliente;\n }", "function get_id( ) {\n // returns the value of id\n return $this->id;\n }", "function getid_cmpt(){ return $this->id_cmpt;}", "public function getCompraId()\n {\n return $this->compra_id;\n }", "public function get_id();", "public function get_id();", "public function get_id();", "public function get_id();", "public function getId (){\n\t\treturn $this->id;\n\t}", "public function getId (){\n\t\treturn $this->id;\n\t}", "function consul_idPerCob($perCob){\n global $mysqli;\n $sql=\"SELECT id FROM periodos_cobro WHERE periodo_cobro='$perCob'\";\n $result = mysqli_query ($mysqli,$sql);\n mysqli_data_seek ($result,0);\n $extraido= mysqli_fetch_array($result);\n if(isset($extraido[0])){\n return $extraido[0];\n }\n}", "public function id()\n {\n return $this['order_id'];\n }", "public function getIdChamado() {\n return $this->idChamado;\n }", "public function getIdConvenio()\n {\n return $this->idConvenio;\n }", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getIdCodigo() {\n return $this->idCodigo;\n }", "public function getId(){\n return $this->$id;\n }", "function getIdasociada() { return $this->idasociada;\n }" ]
[ "0.71336746", "0.7053007", "0.7039846", "0.69142807", "0.68051493", "0.67889714", "0.6682382", "0.6659845", "0.6630929", "0.6627981", "0.66007066", "0.65974534", "0.6582739", "0.6576865", "0.6576816", "0.6566035", "0.6547698", "0.65432316", "0.65041924", "0.6500318", "0.6485652", "0.6474374", "0.6392968", "0.6391404", "0.6386749", "0.636175", "0.6359635", "0.6348548", "0.6308771", "0.6308771", "0.628625", "0.6276603", "0.6245028", "0.6224626", "0.6224626", "0.62241614", "0.6216704", "0.6209429", "0.62092966", "0.62023807", "0.6200797", "0.6184848", "0.61770767", "0.6175056", "0.6165429", "0.61580056", "0.6155843", "0.6149452", "0.6145443", "0.61427224", "0.6140407", "0.6130045", "0.61299354", "0.61296415", "0.61283255", "0.6119211", "0.6104831", "0.61013997", "0.610084", "0.60999465", "0.6094093", "0.60924494", "0.60839355", "0.6082635", "0.60745084", "0.60745084", "0.60742795", "0.60742795", "0.60742795", "0.60742795", "0.60741276", "0.6074102", "0.6071025", "0.60699904", "0.60638154", "0.6063793", "0.6063793", "0.6063793", "0.6063793", "0.60633576", "0.60633576", "0.6061438", "0.6056809", "0.60565794", "0.60535276", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6050232", "0.6049915", "0.60498214", "0.6044876" ]
0.84991646
0
Set the value of id_commande
Задайте значение id_commande
public function setId_commande($id_commande) { $this->id_commande = $id_commande; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId_commande()\n {\n return $this->id_commande;\n }", "public function getId_Commande()\n{\nreturn $this->Id_Commande;\n}", "function Modification_Etat_Commande($id_commande)\n{\n\t$bdd_connection = new Connection();\n\t$bdd=$bdd_connection->Bdd_get();\n\ttry\n\t{\n\t\t$req = $bdd->prepare('UPDATE Commande SET ID_Etat_Commande = :ID_Etat_Commande WHERE ID_Commande = :ID_Commande');\n\n\t$req->execute(array(\n\n 'ID_Commande' => $id_commande,\n\n 'ID_Etat_Commande' => '1' // payer\n\n ));\n\t\n\treturn 1;\n\t\n\t}\n\tcatch(Exception $e)\n\t{\n\t\tdie('Erreur : '.$e->getMessage());\n\t\treturn false;\n\t}\n\n\t\n//fin fonction\t\n}", "public function setId($valor){\r\n $this->id=$valor;\r\n }", "public function setIdDebito($idDebito) {\n $this->idDebito = $idDebito;\n }", "public function setId($valor){\r\n $this->id = $valor;\r\n }", "function setId($value)\n {\n $this->goods_id=$value;\n }", "function _set_id( $idAsistencia ){\n \t\t$this->idAsistencia = $idAsistencia;\n }", "public function set_id($value)\n {\n }", "public function set_id($value)\n {\n }", "function setId($value) { $this->id=$value; }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "function EditCommande()\n {\n $commandeBlock = new FactureCommandeBlock($this->Core);\n echo $commandeBlock->EditCommande(Request::GetPost(\"commandeId\"));\n }", "public function setIdComprobante($idComprobante) {\n $this->idComprobante = $idComprobante;\n }", "public function set_id($value)\r\n\t\t\t{\r\n\t\t\t}", "public function setID($value){\r\n $this->id = $value;\r\n }", "public function setIdColecao($idColecao) {\n $this->idColecao = $idColecao;\n }", "function setIdPrograma($val)\n { $this->id_programa=$val;}", "public function setId($valor) {\n\t\t$this->id = $valor;\n\t}", "function SetId($value) { $this->id=$value; }", "function SetId($value) { $this->id=$value; }", "public function setIdgarante($p_idgarante){\r\n\t$this->idgarante=$p_idgarante;\r\n}", "public function setIdcliente($p_idcliente){\r\n\t$this->idcliente=$p_idcliente;\r\n}", "public function edit(Commande $commande)\n {\n //\n }", "function setIdtrabajador($val) {$this->idtrabajador=$val;}", "public function SetIdConta($valor){\n\t\t $this->id_conta= $valor;\n\t }", "public function set_id($value) {\r\n\t\t$this->id = $value;\r\n\t}", "public function testSetModeleCommande() {\n\n $obj = new Clients();\n\n $obj->setModeleCommande(\"modeleCommande\");\n $this->assertEquals(\"modeleCommande\", $obj->getModeleCommande());\n }", "public function setID($_id){\n\t\t\t$this->id = $_id;\n\t\t\t\n\t\t\t// Set the chemical\n\t\t\t$this->chemical = new Chemical($this->dbi);\n\t\t\t$this->chemical->setByID($this->id);\n\t\t}", "public function commande_option($id = 0)\n {\n $resultat = $this->m_controle_recurrents->commande_by_client($id);\n $results = json_decode(json_encode($resultat), true);\n echo \"<option value='0' selected='selected'>(choisissez)</option>\";\n echo \"<option value='-1'>Pas de Commande</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['cmd_id'] . \"'>\" . $row['cmd_reference'] . \"</option>\";\n }\n }", "public function setId($id){\n\t\t$this->crmbuscador->setIdcrm($id);\n\t}", "public function setID($value) {\r\n $this->id = $value;\r\n }", "public function setID($value) {\r\n $this->id = $value;\r\n }", "function set_id($id) {\r\n\t\t$this->id_ma = $id;\r\n\t}", "function setIdPersonne($idPersonne) {\n $this->idPersonne = $idPersonne;\n }", "public function setIdSeccion($idSeccion) {\r\n $this->idSeccion = $idSeccion;\r\n }", "public function setIdchequera($p_idchequera){\r\n\t$this->idchequera=$p_idchequera;\r\n}", "public function setDiarioId($valor){\n\t\t\t$this->diarioId = $valor;\n\t\t}", "public function setIdcliente($idcliente) {\n $this->_idcliente = $idcliente;\n }", "function set_idLegajo( $idLegajo ) {\n $this->idLegajo = $idLegajo;\n }", "function setIdcouriel($idcouriel)\n {\n $this->idcouriel = $idcouriel;\n }", "function _set_id( $id_comment ){\n \t\t$this->id_comment = $id_comment;\n }", "public function repara_add_id_denuncias() {\n\n\t\techo \"<h1>Modificando tabla comentarios...</h1>\";\n\n\t\t$boyuyo = $this -> comentarios_model -> repara_add_id_denuncias();\n\n\t\tif ($boyuyo == true) {\n\t\t\t// Todo correcto\n\t\t\techo \"<p>Terminado con exito!</p>\";\n\t\t} else {\n\t\t\t// Hubo un error\n\t\t\techo \"<p>Hubo un error</p>\";\n\t\t}\n\t}", "public function getId_produit()\n {\n return $this->id_produit;\n }", "function set_idObjeto( $idObjeto ) {\n // sets the value of idObjeto\n $this->idObjeto = $idObjeto;\n }", "public function getID()\r\n{\r\nreturn $this->comentario;\r\n}", "public function set_id( $id );", "public function setIdEmpleado($idEmpresa){$this->idEmpresa = $idEmpresa;}", "function setid_cmpt($val){ return $this->id_cmpt=$val;}", "function setid_ingreso($val){ return $this->id_ingreso=$val;}", "function setId_diario($id_diario) {\n $this->id_diario = $id_diario;\n }", "public function createAction($id_commande) {\n $entity = new DetailCommande();\n $request = $this->getRequest();\n $form = $this->createForm(new DetailCommandeType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager(); \n \n $commande = $em->getRepository('CrossknowledgeOrderManagementBundle:Commande')->find($id_commande);\n \n $entity->setCommande($commande);\n \n /* Enregistrement du créateur de la demande d'achat */\n $user = $this->get('security.context')->getToken()->getUser();\n $entity->setcreatedBy($user);\n \n /* Calcul du prix HT et du prix TTC */\n $prixUHT = $entity->getPrixHT();\n $tva = $entity->getTva() / 100;\n $fournisseur = $entity->getCommande()->getFournisseur();\n if (!isset($prixUHT))\n {\n $prix = $em->getRepository('CrossknowledgeOrderManagementBundle:Tarif')->getPrice($entity->getArticle(), $fournisseur)->getPrix();\n $prixHT = $entity->getQuantite() * $prix;\n $prixTTC = $prixHT * (1 + $tva);\n $entity->setPrixHT($prixHT);\n $entity->setPrixTTC($prixTTC);\n }\n else\n {\n $prixHT = $entity->getQuantite() * $prixUHT;\n $prixTTC = $prixHT * (1 + $tva);\n $entity->setPrixHT($prixHT);\n $entity->setPrixTTC($prixTTC);\n }\n\n /* Mise à jour du CA commandé et lettré du fournisseur */\n $caCom = $fournisseur->getCaCommande() + $prixHT;\n $fournisseur->setCaCommande($caCom);\n if ($entity->getLettrage() == true) {\n $caLett = $fournisseur->getCaLettre() + $prixHT;\n $fournisseur->setCaLettre($caLett);\n }\n $em->persist($fournisseur);\n\n /* Mise à jour du budget du responsable */\n $commande = $entity->getCommande();\n if ($commande->getTypeCommande() == 'Budget') {\n $manager = $entity->getassignedTo();\n $manager->setBudgetRestant($manager->getBudgetRestant() - $prixHT);\n $em->persist($manager);\n }\n\n /* Mise à jour DA/OA */\n if ($entity->getAccordBUM() == true) {\n $entity->setType('OA');\n } else {\n $entity->setType('DA');\n }\n\n $em->persist($entity);\n $em->flush();\n\n /* Envoi d'un e-mail au manager pour validation */\n $username = $this->container->get('security.context')->getToken()->getUser();\n $userManager = $this->get('fos_user.user_manager');\n $user = $userManager->findUserBy(array('username' => $username));\n $manager = $userManager->findUserBy(array('username' => $entity->getassignedTo()));\n \n if ($entity->getAccordBUM() != true)\n {\n $managerMail = $manager->getEmail();\n $recipient = $user->getEmail();\n $message = \\Swift_Message::newInstance()\n ->setSubject('Nouvelle demande d\\'achat')\n ->setFrom('achats@crossknowledge.com')\n ->setTo($managerMail)\n ->setCc($recipient)\n ->setBody($this->renderView('CrossknowledgeOrderManagementBundle:DetailCommande:emailDA.txt.twig', array('name' => $username, 'entity' => $entity, 'manager' => $manager)), 'text/html')\n ;\n $this->get('mailer')->send($message);\n }\n elseif ($entity->getAccordBUM() == true)\n {\n $managerMail = $manager->getEmail();\n $recipient = $user->getEmail();\n $message = \\Swift_Message::newInstance()\n ->setSubject('Validation de votre demande d\\'achat')\n ->setFrom('achats@crossknowledge.com')\n ->setTo($managerMail)\n ->setCc($recipient)\n ->setBody($this->renderView('CrossknowledgeOrderManagementBundle:DetailCommande:emailOA.txt.twig', array('name' => $username, 'entity' => $entity, 'manager' => $manager)), 'text/html')\n ;\n $this->get('mailer')->send($message);\n }\n return $this->redirect($this->generateUrl('detailcommande_show', array('id' => $entity->getId())));\n }\n\n return $this->render('CrossknowledgeOrderManagementBundle:DetailCommande:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function setId_produit($id_produit)\n {\n $this->id_produit = $id_produit;\n\n return $this;\n }", "public function setIdcompra($idcompra)\n {\n $this->idcompra = $idcompra;\n }", "public function setIdDetalleFolio( $idDetalleFolio ){\n\t\t$this->idDetalleFolio = $idDetalleFolio;\n\t}", "function set_id( $id ) {\n // sets the value of id\n $this->id = $id;\n }", "public function getIdCommandeLabo(): ?string\n {\n return $this->id;\n }", "public function setclient_id($value);", "public function setId($id){\n\t\t$this->operacion->setId_oper($id);\n\t}", "public function setIdProducto($idProducto){\n $this->idProducto = $idProducto;\n }", "public function setIdCliente(int $id_cliente): void\n {\n $this->id_cliente = $id_cliente;\n }", "function _set_id( $id ){\n \t\t$this->id = $id;\n }", "function setId_entorno($id_entorno) {\n $this->id_entorno = $id_entorno;\n }", "private function setIdContratto($id){\r\n $this->idContrattoWork=$id;\r\n }", "public function setId($value)\n {\n $this->_id = $value;\n }", "public function setId($value)\n {\n $this->_id = $value;\n }", "function set_id($id) {\n $this->id = $id;\n }", "public function setIdExtrato($idExtrato) {\n $this->idExtrato = $idExtrato;\n }", "function setObjeto($idobjeto){\n $idobjeto['idcartas'] = $this->idcartas;\n OperaBD::inserta('datos.objetoscartas',$idobjeto);\n }", "function _set_id($id) {\n $this->id = $id;\n }", "public function setId($value)\n\t{\n\t\t$this->_id = $value;\n\t}", "public function setIdMeta($valeur){\n $this->idMeta = $valeur;\n }", "protected function setID($id){\r\n $this->id = $id;\r\n }", "public function set_order_id($value)\n {\n }", "function getIdProduit() {\n return $this->idProduit;\n }", "public function setId($id)\n {\n $this->idcompany = $id;\n }", "function creerCommande() {\r\n\t\t$numerop=SelectMax(\"numerop\",\"if_bo_com\");\r\n\t\t$numerop++;\r\n\t\tmysql_query(\"INSERT INTO if_bo_com (numerop,numclient,etat,ttva) VALUES ('$numerop','$this->numclient','0','$this->ttva')\");\r\n\t\treturn mysql_insert_id(); //numcom\r\n\t}", "function edit($com_id)\n { \n // check if the commande exists before trying to edit it\n $data['commande'] = $this->Commande_model->get_commande($com_id);\n \n if(isset($data['commande']['com_id']))\n {\n $this->load->library('form_validation');\n\n\t\t\t$this->form_validation->set_rules('numRef','NumRef','required|is_unique[commandes.numRef]');\n\t\t\t$this->form_validation->set_rules('qteCom','QteCom','required');\n\t\t\t$this->form_validation->set_rules('produit_sid','Produit Sid','required');\n\t\t\t$this->form_validation->set_rules('abonne_sid','Abonne Sid','required');\n\t\t\t$this->form_validation->set_rules('charroi_sid','Charroi Sid','required');\n\t\t\t$this->form_validation->set_rules('zone_sid','Zone Sid','required');\n\t\t\n\t\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t\t'abonne_sid' => $this->input->post('abonne_sid'),\n\t\t\t\t\t'produit_sid' => $this->input->post('produit_sid'),\n\t\t\t\t\t'zone_sid' => $this->input->post('zone_sid'),\n\t\t\t\t\t'charroi_sid' => $this->input->post('charroi_sid'),\n\t\t\t\t\t'numRef' => $this->input->post('numRef'),\n\t\t\t\t\t'dateCom' => $this->input->post('dateCom'),\n\t\t\t\t\t'qteCom' => $this->input->post('qteCom'),\n\t\t\t\t\t'observation' => $this->input->post('observation'),\n );\n\n $this->Commande_model->update_commande($com_id,$params); \n redirect('commande/index');\n }\n else\n {\n\t\t\t\t$this->load->model('Abonne_model');\n\t\t\t\t$data['all_abonnes'] = $this->Abonne_model->get_all_abonnes();\n\n\t\t\t\t$this->load->model('Produit_model');\n\t\t\t\t$data['all_produits'] = $this->Produit_model->get_all_produits();\n\n\t\t\t\t$this->load->model('Zone_model');\n\t\t\t\t$data['all_zones'] = $this->Zone_model->get_all_zones();\n\n\t\t\t\t$this->load->model('Charroi_model');\n\t\t\t\t$data['all_charrois'] = $this->Charroi_model->get_all_charrois();\n\n $data['_view'] = 'commande/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The commande you are trying to edit does not exist.');\n }", "public function set_id($id) {\n\t$this->id = $id;\n }", "public function setIdMotivoD($idMotivoD) {\n $this->idMotivoD = $idMotivoD;\n }", "public function setId() {\n\t\t$this -> id = genUuid();\n\t\t$this -> save();\n\t}", "public function setIdProgramme($idProgramme)\n{\n $this->_idProgramme = $idProgramme;\n}", "function setId_ciudad($id_ciudad) {\n $this->id_ciudad = $id_ciudad;\n }", "public function set_id($id)\n {\n }", "public function setIdFundacionVinculacion($idFundacionVinculacion){\n $this->idFundacionVinculacion = $idFundacionVinculacion;\n }", "public function SetIdClasse($valor){\n\t\t$this->id_classe= $valor;\n\t}", "public function setId($nouvelleValeur) {\n\t\t/* La modification de l'identifiant DB est interdite SAUF SI l'objet est vide au depart */\n\t\tif (!$this->getEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\t$this->id = $nouvelleValeur;\n\t}", "function setId_nom($iid_nom = '')\n {\n $this->iid_nom = $iid_nom;\n }", "function setId_nom($iid_nom = '')\n {\n $this->iid_nom = $iid_nom;\n }", "public function setId($id)\n {\n // Convertit l'argument en nombre entier si c'en était déjà un, rien ne change\n $id = (int) $id;\n \n // Nombre est bien strictement positif\n if ($id > 0)\n {\n $this->_id = $id;\n }\n }", "public function setIdcompte($idcompte)\n{\n$this->idcompte = $idcompte;\n\nreturn $this;\n}", "public function setId_mesa($id_mesa)\r\n {\r\n $this->id_mesa = $id_mesa;\r\n\r\n return $this;\r\n }", "function setID($id) {\n $this->id = $id;\n }", "public function setID($id) { $this->id = $id; }", "function setId($value)\n {\n $this->setConfig(\"id\", $value);\n }", "public function getId_produto()\n {\n return $this->id_produto;\n }", "function setID($id) {\n\t\t$this->id = $id;\n\t}", "public function setIdEvento(int $idevento){$this->idEvento=$idevento;}", "public function setId( $id = NULL )\n\t{\n\t\t\n\t\tif( empty($id) || ! is_integer($id) )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\t\n\t\t\n\t\t$this->id_cliente = $id;\n\t\t\n\t\treturn TRUE;\n\t\t\n\t}", "public function setId($id){\n $this->id = $id;\n }" ]
[ "0.7484102", "0.65616846", "0.64374965", "0.6434715", "0.64233816", "0.64196914", "0.6346106", "0.6338109", "0.630157", "0.6301549", "0.63008624", "0.6288424", "0.6273643", "0.62680674", "0.62521684", "0.62421405", "0.62056214", "0.6188389", "0.6165666", "0.6163171", "0.6163171", "0.6161493", "0.6136376", "0.61116904", "0.61048585", "0.60995996", "0.6081983", "0.60808784", "0.60475826", "0.60379714", "0.6027607", "0.60126555", "0.60126555", "0.59956545", "0.59900594", "0.5973085", "0.5967677", "0.5959663", "0.59500855", "0.5940919", "0.593591", "0.59255606", "0.5920399", "0.5918529", "0.59162873", "0.59127796", "0.5909322", "0.59046394", "0.58982164", "0.5895715", "0.58950514", "0.58859444", "0.5885378", "0.5871294", "0.5865689", "0.58609873", "0.5842773", "0.58426255", "0.5832067", "0.583141", "0.58272314", "0.5823707", "0.5821391", "0.58183545", "0.581674", "0.581674", "0.5803816", "0.5800661", "0.5793031", "0.57925236", "0.5784457", "0.57821906", "0.5777123", "0.5770286", "0.57605594", "0.575896", "0.5755423", "0.5743091", "0.57417375", "0.5741413", "0.5739964", "0.57309633", "0.57297915", "0.5728278", "0.57206434", "0.5717238", "0.571658", "0.5716101", "0.5716101", "0.5715539", "0.5713983", "0.5708076", "0.57032186", "0.56992966", "0.5697634", "0.56942564", "0.5693647", "0.56904954", "0.5689972", "0.5670452" ]
0.7608562
0
Runs the EnsureIndexes Job
Запускает задачу EnsureIndexes
public function perform() { try { $this->debugLog("[JOBID " . $this->job->payload['id'] . "] EnsureIndexes::perform() start"); $timer = new \Tripod\Timer(); $timer->start(); $this->validateArgs(); \Tripod\Mongo\Config::setConfig($this->args[self::TRIPOD_CONFIG_KEY]); $this->debugLog('Ensuring indexes for tenant=' . $this->args[self::STORENAME_KEY]. ', reindex=' . $this->args[self::REINDEX_KEY] . ', background=' . $this->args[self::BACKGROUND_KEY]); $this->getIndexUtils()->ensureIndexes( $this->args[self::REINDEX_KEY], $this->args[self::STORENAME_KEY], $this->args[self::BACKGROUND_KEY] ); $timer->stop(); // stat time taken to process job, from time it was picked up $this->getStat()->timer(MONGO_QUEUE_ENSURE_INDEXES_SUCCESS,$timer->result()); $this->debugLog("[JOBID " . $this->job->payload['id'] . "] EnsureIndexes::perform() done in {$timer->result()}ms"); } catch(\Exception $e) { $this->getStat()->increment(MONGO_QUEUE_ENSURE_INDEXES_FAIL); $this->errorLog("Caught exception in ".get_class($this).": ".$e->getMessage()); throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSuccessfullyEnsureIndexesJob()\n {\n $job = $this->createMockJob();\n $job->args = $this->createDefaultArguments();\n $this->jobSuccessfullyEnsuresIndexes($job);\n\n $this->performJob($job);\n }", "protected function commitUpdateIndex() {}", "public function processRunUpdateIndex() {\n $Elasticsearch = new \\App\\ElasticSearch();\n echo \"Updating index..\";\n $result = $Elasticsearch->updateIndex();\n if ($result['success']){\n echo \"Success: \" . $result['message'];\n } else {\n echo \"Failed: \" . $result['message'];\n }\n }", "public function main()\n {\n $this->client->ping();\n\n // Resolve the new index name and the alias name\n $new_index_name = sprintf(\n '%s_%s',\n $this->opts->index_name,\n date('Y_m_d_U')\n );\n\n $alias_name = $this->opts->index_name;\n\n $existing_aliases = $this->getIndexAliases($alias_name);\n\n // Create the new index\n $this->createIndex($this->client, $new_index_name, $this->opts->index_config);\n\n // Copy data from the old index into the new one\n if($this->opts->copy_data) {\n $this->copyData($this->client, $this->opts->batch_size);\n }\n\n // Delete the old index\n if($this->opts->delete_old) {\n $this->deleteOldIndices($this->client, $existing_aliases);\n // empty the existing aliases array\n $existing_aliases = array();\n }\n\n // Move the alias from the old indexes to the new index\n if($this->opts->move_alias) {\n $this->moveAlias($this->client, $existing_aliases, $new_index_name, $alias_name);\n }\n\n echo 'Created index ', $new_index_name, PHP_EOL;\n }", "public function testEnsureIndexesJobThrowsErrorWhenCreatingIndexes()\n {\n $job = $this->createMockJob();\n $job->args = $this->createDefaultArguments();\n $this->jobThrowsExceptionWhenEnsuringIndexes($job);\n $this->setExpectedException('Exception', \"Ensuring index failed\");\n\n $this->performJob($job);\n }", "private function setupIndexes()\n {\n\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'got_events')->ensureIndex('d.args.queue');\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'got_events')->ensureIndex('d.args.payload.class');\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'got_events')->ensureIndex('d.worker');\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'fail_events')->ensureIndex('d.job_id');\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'done_events')->ensureIndex('d.job_id');\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'shutdown_events')->ensureIndex('d.worker');\n Service::Mongo()->selectCollection(Service::$settings['Mongo']['database'], 'start_events')->ensureIndex('d.worker');\n }", "public function createIndexBulk()\n {\n }", "protected function _build_indexes()\n\t{\n\t\treturn;\n\t}", "public static function ensureIndexes() {\n\t\t$client = new self();\n\t\t$client->getCollection()->ensureIndex(array('status' => 1, 'type' => 1), array('background' => true));\n\t\t$client->getCollection()->ensureIndex(array('email' => 1), array('background' => true, 'unique' => true));\n\t\t$client->getCollection()->ensureIndex(array('name' => 1), array('background' => true));\n\t\treturn true;\n\t}", "public function run() {\n\t\tSubindex::create([\n\t\t\t'name' => '专业知识',\n\t\t\t'seq' => '1',\n\t\t\t'order' => 0,\n\t\t\t'score' => 4,\n\t\t\t'description' => '熟悉工作所需要的专业基本知识、法律法规、政策等',\n\t\t\t'index_id' => 1,\n\t\t]);\n\t\tSubindex::create([\n\t\t\t'name' => '工作效率',\n\t\t\t'seq' => '2',\n\t\t\t'order' => 1,\n\t\t\t'score' => 10,\n\t\t\t'description' => '(1)熟悉岗位业务,履责认真,工作有条理,办事流程公开,无失职、推诿现象。\n(2)与本部门其他同事有效沟通合作,同事之间关系融洽。\n(3)与校内外其他部门有效地沟通,主动配合其他部门工作,同事之间关系融洽。\n(4)校党委常委会、校长办公会、校领导工作协调会等会议精神以及学校督查、督办事项落实到位。\n(5)学校教代会提案办理和答复情况良好,积极采纳合理化建议,无工作推诿现象。评估整改工作完成情况。\n',\n\t\t\t'index_id' => 1,\n\t\t]);\n\t\tSubindex::create([\n\t\t\t'name' => '服务质量',\n\t\t\t'seq' => '3',\n\t\t\t'order' => 2,\n\t\t\t'score' => 6,\n\t\t\t'description' => '(1)服务意识好,热心、细心、耐心服务,服务对象满意度高。\n(2)形象良好,言行端庄,办公室干净整洁。\n(3)遵守服务承诺制、首问负责制,及时回复,限时办结。\n(4)服务对象的满意情况。\n',\n\t\t\t'index_id' => 1,\n\t\t]);\n\t}", "public function doCreateIndex() {\n\t\t$this->db = x(\"db\");\n\t\t$this->collection = xn(\"collection\");\n\t\t$this->nativeFields = MCollection::fields($this->_mongo->selectDB($this->db), $this->collection);\n\t\tif ($this->isPost()) {\n\t\t\t$db = $this->_mongo->selectDB($this->db);\n\t\t\t$collection = $this->_mongo->selectCollection($db, $this->collection);\n\n\t\t\t$fields = xn(\"field\");\n\t\t\tif (!is_array($fields)) {\n\t\t\t\t$this->message = \"Index contains one field at least.\";\n\t\t\t\t$this->display();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orders = xn(\"order\");\n\t\t\t$attrs = array();\n\t\t\tforeach ($fields as $index => $field) {\n\t\t\t\t$field = trim($field);\n\t\t\t\tif (!empty($field)) {\n\t\t\t\t\t$attrs[$field] = ($orders[$index] == \"asc\") ? 1 : -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($attrs)) {\n\t\t\t\t$this->message = \"Index contains one field at least.\";\n\t\t\t\t$this->display();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//if is unique\n\t\t\t$options = array();\n\t\t\tif (x(\"is_unique\")) {\n\t\t\t\t$options[\"unique\"] = 1;\n\t\t\t\tif (x(\"drop_duplicate\")) {\n\t\t\t\t\t$options[\"dropDups\"] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options[\"background\"] = 1;\n\t\t\t$options[\"safe\"] = 1;\n\n\t\t\t//name\n\t\t\t$name = trim(xn(\"name\"));\n\t\t\tif (!empty($name)) {\n\t\t\t\t$options[\"name\"] = $name;\n\t\t\t}\n\t\t\t$collection->ensureIndex($attrs, $options);\n\n\t\t\t$this->redirect(\"collection.collectionIndexes\", array(\n\t\t\t\t\"db\" => $this->db,\n\t\t\t\t\"collection\" => $this->collection\n\t\t\t));\n\t\t}\n\n\t\t$this->display();\n\t}", "abstract protected function doReindexFull();", "private function runIndexers(){\n\t\techo 'Running indexers... '.PHP_EOL;\n\t $indexer = $this->_indexerFactory->create();\n\t $indexerCollection = $this->_indexerCollectionFactory->create();\n\n\t $ids = $indexerCollection->getAllIds();\n\t foreach ($ids as $id){\n\t $idx = $indexer->load($id);\n\t \techo $id.PHP_EOL;\n\t $idx->reindexAll($id);\n\t }\n\n\t}", "public function testCreateIndexInBackground()\n {\n $result = $this->collectionHandler->createHashIndex(\n 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp,\n ['test'],\n false, \n false, \n true\n );\n\n $indices = $this->collectionHandler->getIndexes('ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp);\n\n $indicesByIdentifiers = $indices['identifiers'];\n\n static::assertArrayHasKey($result['id'], $indicesByIdentifiers);\n\n $indexInfo = $indicesByIdentifiers[$result['id']];\n\n static::assertEquals(\n CollectionHandler::OPTION_HASH_INDEX,\n $indexInfo[CollectionHandler::OPTION_TYPE]\n );\n static::assertEquals(['test'], $indexInfo['fields']);\n static::assertFalse($indexInfo[CollectionHandler::OPTION_UNIQUE], 'unique was not set to false!');\n static::assertFalse($indexInfo[CollectionHandler::OPTION_SPARSE], 'sparse flag was not set to false!');\n }", "public function executeIndex() {\n\t\trequire_once DIMS_APP_PATH . '/include/class_timer.php' ;\n\n\t\t// Utilisation d'un lock\n\t\tif(file_exists(_DIMS_TEMPORARY_UPLOADING_FOLDER.\"/index_running\")){\n\t\t\t$pid = file_get_contents(_DIMS_TEMPORARY_UPLOADING_FOLDER.\"/index_running\");\n\t\t\t$pids = explode(PHP_EOL, `ps -e | awk '{print $1}'`);\n\t\t\tif(in_array($pid, $pids)){\n\t\t\t\techo \"\\n Indexation deja en cours... \\n\";ob_flush();\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\techo \"\\n Indexation mal terminée ... \\n\";\n\t\t\t\tunlink(_DIMS_TEMPORARY_UPLOADING_FOLDER.\"/index_running\");\n\t\t\t}\n\t\t}\n\t\tfile_put_contents(_DIMS_TEMPORARY_UPLOADING_FOLDER.\"/index_running\", getmypid());\n\n\t\t// execution timer\n\t\t$dims_timer = new timer();\n\t\t$dims_timer->start();\n\n\t\t// check for availables keywords, if exists => update, else complete insert\n\t\t$res=$this->db->query(\"select count(id) as cpte from dims_keywords\");\n\n\t\tif ($this->db->numrows($res)) {\n\t\t\tif($f=$this->db->fetchrow($res)) {\n\t\t\t\t$this->cpte=$f['cpte'];\n\t\t\t}\n\t\t}\n\n\t\t// nombre de mots entre chaque traitement a atteindre\n\t\t$tabsizecompare=$this->checksize;\n\n\t\t//////////////////////////////////////////////////////////////////////////////\n\t\t// Test si procedure en live ou en cron table\n\t\t//////////////////////////////////////////////////////////////////////////////\n\t\tif ($this->cpte==0) {\n\t\t\t//Cyril 19/04/2012 - Refonte Métabase -> récupération de metadata à partir de la classe dims désormais en fait c'est le cronindex qui le file\n\t\t\t//$this->prepareMetaData();\n\t\t\t$dims = dims::getInstance();\n\n\t\t\tif(empty($this->metadata) ){\n\t\t\t\t$this->metadata = dims::getInstance()->prepareMetaData();\n\t\t\t}\n\n\t\t\t$this->queryDeleteData(); // erase data\n\t\t\t$this->queryDeleteIndex();// erase index for fast insert cmd\n\n\t\t\t$tabsize=0;\n\n\t\t\t$post_relations = array();#Tableau qui servira à stocker les objets qui méritent d'aller voir les relations\n\n\t\t\tforeach ($this->metadata as $tablename => $obj) {\n\t\t\t\t$sql=$obj['sql'];\n\t\t\t\t$fields=$obj['fields'];\n\t\t\t\tif ($sql!='') {\n\n\t\t\t\t\t//echo $sql.\"\\n\";\n\t\t\t\t\t$res=$this->db->query($sql);\n\n\t\t\t\t\tif ($this->db->numrows($res)>0) {// && $this->db->numrows($res)>37000 && $this->db->numrows($res)<38000) {\n\t\t\t\t\t\t$totallignes=intval($this->db->numrows($res));\n\t\t\t\t\t\t$nblignes=0;\n\t\t\t\t\t\t$courvalue=0;\n\t\t\t\t\t\t// boucle sur toutes les lignes de contenus\n\t\t\t\t\t\twhile($fieldsfetch=$this->db->fetchrow($res)) {\n\t\t\t\t\t\t\t$id_workspace=($fieldsfetch['id_workspace']==\"\" || is_null($fieldsfetch['id_workspace'])) ? 0 : $fieldsfetch['id_workspace'];\n\t\t\t\t\t\t\t$id_module=($fieldsfetch['id_module']==\"\" || is_null($fieldsfetch['id_module'])) ? 0 : $fieldsfetch['id_module'];\n\t\t\t\t\t\t\t$id_user=($fieldsfetch['id_user']==\"\" || is_null($fieldsfetch['id_user'])) ? 0 : $fieldsfetch['id_user'];\n\t\t\t\t\t\t\t$id_record=$fieldsfetch[$obj['id_label']];\n\t\t\t\t\t\t\t$id_object=(empty($fieldsfetch['id_object'])) ? 0 : $fieldsfetch['id_object'];\n\t\t\t\t\t\t\t$id_module_type=(empty($fieldsfetch['id_module_type'])) ? 0 : $fieldsfetch['id_module_type'];\n\t\t\t\t\t\t\t$id_globalobject=($fieldsfetch['id_globalobject']==\"\" || is_null($fieldsfetch['id_globalobject'])) ? 0 : $fieldsfetch['id_globalobject'];\n\t\t\t\t\t\t\t$nbwords=0;\n\t\t\t\t\t\t\t$nblignes++;\n\n\t\t\t\t\t\t\tif (isset($this->execron)) {\n\t\t\t\t\t\t\t\tif (intval(($nblignes/$totallignes)*100)>$courvalue) {\n\t\t\t\t\t\t\t\t\techo \"$tablename: \".$courvalue.\"/100\".\"\\r\";ob_flush();\n\t\t\t\t\t\t\t\t\t$courvalue=intval(($nblignes/$totallignes)*100);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tforeach($fields as $key =>$fieldname) {\n\t\t\t\t\t\t\t\tif(strpos($fieldname,\".\") !== false){\n\t\t\t\t\t\t\t\t\t$ff = explode('.',$fieldname);\n\t\t\t\t\t\t\t\t\t$content=trim($fieldsfetch[$ff[count($ff)-1]]);\n\t\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t\t\t$content=trim($fieldsfetch[$fieldname]);\n\n\t\t\t\t\t\t\t\t// on recupere id meta du champ\n\t\t\t\t\t\t\t\t$id_metafield=$obj['corresp'][$fieldname];\n\n\t\t\t\t\t\t\t\t// test si fichier ou non\n\n\t\t\t\t\t\t\t\tif (substr($content,0,17)==\"[dimscontentfile]\") {\n\t\t\t\t\t\t\t\t\t$indicators = $this->handle_filecontent($tabsizecompare, $id_metafield, $id_record, $id_object, $id_user, $id_workspace, $id_module, $id_module_type, $id_globalobject, $fieldname, $content);\n\t\t\t\t\t\t\t\t\tif(isset($indicators['cpteglobal'])) $this->cpteglobal += $indicators['cpteglobal'];\n\t\t\t\t\t\t\t\t\tif(isset($indicators['tabsizecompare'])) $tabsizecompare = $indicators['tabsizecompare'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (_DIMS_ENCODING!=\"UTF-8\" && mb_check_encoding($content,\"UTF-8\")) $content=utf8_decode($content);\n\t\t\t\t\t\t\t\t\tif ($id_module>0 && $id_module_type>0 && $id_user>=0 && $id_object>0 && $id_record>0 && $id_metafield && strlen($content)>0) {\n\t\t\t\t\t\t\t\t\t\t$cpteglobal+=$this->indexFields($id_metafield,$id_record,$id_object,$id_user,$id_workspace,$id_module,$id_module_type,$id_globalobject,$fieldname,$content);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//traitement du volume m�moire important\n\t\t\t\t\t\t\t\t\tif (sizeof($this->tabwords)>$tabsizecompare) {\n\t\t\t\t\t\t\t\t\t\t$this->storeTempKeywords();\n\t\t\t\t\t\t\t\t\t\t$tabsize=sizeof($this->tabwords);\n\t\t\t\t\t\t\t\t\t\t$tabsizecompare=$tabsize+$checksize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t#Traitement des relations éventuelles\n\t\t\t\t\t\t\t##- Récupération en session des infos du mbobject courant\n\t\t\t\t\t\t\t$mbo_details = $dims->getMBObjectFields($id_module_type, $id_object);\n\t\t\t\t\t\t\tif( ! empty($mbo_details)){\n\t\t\t\t\t\t\t\t##- Récupération des relations de la classe associée\n\t\t\t\t\t\t\t\t$mb_class = $dims->getMBClassDataFromID($mbo_details['id_class']);\n\t\t\t\t\t\t\t\tif(! empty($mb_class) ){\n\t\t\t\t\t\t\t\t\t$relations = $dims->getMBObjectRelationsOn($mb_class['classname']);\n\t\t\t\t\t\t\t\t\tif( ! empty($relations) ){\n\t\t\t\t\t\t\t\t\t\t#Alors là, on doit récupérer pour chaque relation les meta_fields à indexer pour l'objet courant\n\t\t\t\t\t\t\t\t\t\tforeach($relations as $id_class_to => $tab){\n\t\t\t\t\t\t\t\t\t\t\tforeach($tab as $col_on => $tab2){\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($tab2 as $col_to => $rel){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($rel['type'] == mb_object_relation::MB_RELATION_BELONGS_TO && $rel['extended_indexation'] > mb_object_relation::MB_RELATION_NO_INDEX){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t#Alimentation de la structure pour traitement à posteriori (souci d'optimisation)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$post_relations[$id_module_type][$id_object][$id_class_to][$col_on][$col_to][$rel['extended_indexation']][$id_globalobject] = $id_globalobject;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // fin de boucle sur les lignes de la table courante\n\t\t\t\t\t\t#Traitement à posteriori des lignes de relations\n\t\t\t\t\t\tif(!empty($post_relations)){\n\t\t\t\t\t\t\tforeach($post_relations as $id_module_type => $tab){\n\t\t\t\t\t\t\t\tforeach($tab as $id_object => $tab2){\n\t\t\t\t\t\t\t\t\t$mbo_details = $dims->getMBObjectFields($id_module_type, $id_object);\n\t\t\t\t\t\t\t\t\t$mb_class = $dims->getMBClassDataFromID($mbo_details['id_class']);\n\t\t\t\t\t\t\t\t\tforeach($tab2 as $id_class_to => $tab3){\n\t\t\t\t\t\t\t\t\t\t#Récupération de la classe distante\n\t\t\t\t\t\t\t\t\t\t$foreign_class = $dims->getMBClassDataFromID($id_class_to);\n\t\t\t\t\t\t\t\t\t\tforeach($tab3 as $col_on => $tab4){\n\t\t\t\t\t\t\t\t\t\t\tforeach($tab4 as $col_to => $tab5){\n\t\t\t\t\t\t\t\t\t\t\t\tforeach($tab5 as $type_rel => $idgos){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($idgos)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tswitch($type_rel){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase mb_object_relation::MB_RELATION_ON_ME_INDEX:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#On teste si cette table est dans Metafield sinon ça sert à rien d'aller plus loin\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$remote_fields = $dims->getMetafieldsOf($foreign_class['tablename']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif( ! empty($remote_fields)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#construction d'une requête SQL pour éviter de faire trop d'open\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$params = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql3 = \"SELECT remote.*, glob.id_record, current.id_globalobject as cur_iggo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM \".$foreign_class['tablename'].\" remote\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t INNER JOIN \".$mb_class['tablename'].\" current ON current.\".$col_on.\" = remote.\".$col_to.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t INNER JOIN dims_globalobject glob ON glob.id = current.id_globalobject\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE current.id_globalobject IN (\".$this->db->getParamsFromArray($idgos, 'idglobalobject', $params).\")\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$res3 = $this->db->query($sql3, $params);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile($f = $this->db->fetchrow($res3)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach($remote_fields as $nom){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($f[$nom])){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$content=$f[$nom]; //on va s'assurer que le champ contient bien des données\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($content!='') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(substr($content,0,17)==\"[dimscontentfile]\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$indicators = $this->handle_filecontent($tabsizecompare, $dims->getMetaFieldID($foreign_class['tablename'], $nom), $f['id_record'], $id_object, $f['id_user'], $f['id_workspace'], $f['id_module'], $id_module_type, $f['cur_iggo'], $nom, $content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isset($indicators['cpteglobal'])) $cpteglobal += $indicators['cpteglobal'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->cpteglobal+=$this->indexFields($dims->getMetaFieldID($foreign_class['tablename'], $nom),$f['id_record'],$id_object,$f['id_user'],$f['id_workspace'],$f['id_module'],$id_module_type, $f['cur_iggo'],$nom,$content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase mb_object_relation::MB_RELATION_ON_REMOTE_INDEX:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#On teste si cette table est dans Metafield sinon ça sert à rien d'aller plus loin\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$my_fields = $dims->getMetafieldsOf($mb_class['tablename']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif( ! empty($my_fields)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#construction d'une requête SQL pour éviter de faire trop d'open\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$params = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sql3 = \"SELECT current.*, glob.id as cur_idgo, glob.id_object, glob.id_module_type, glob.id_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM \".$mb_class['tablename'].\" current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t INNER JOIN \".$foreign_class['tablename'].\" remote ON current.\".$col_on.\" = remote.\".$col_to.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t INNER JOIN dims_globalobject glob ON glob.id = remote.id_globalobject\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE current.id_globalobject IN (\".$this->db->getParamsFromArray($idgos, 'idglobalobject', $params).\")\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$res3 = $this->db->query($sql3, $params);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile($f = $this->db->fetchrow($res3)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach($my_fields as $nom){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($f[$nom])){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$content=$f[$nom]; //on va s'assurer que le champ contient bien des données\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($content!='') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(substr($content,0,17)==\"[dimscontentfile]\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$indicators = $this->handle_filecontent($tabsizecompare, $dims->getMetaFieldID($mb_class['tablename'], $nom),$f['id_record'],$f['id_object'],$f['id_user'],$f['id_workspace'],$f['id_module'],$f['id_module_type'],$f['cur_idgo'],$nom,$content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isset($indicators['cpteglobal'])) $cpteglobal += $indicators['cpteglobal'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->cpteglobal+=$this->indexFields($dims->getMetaFieldID($mb_class['tablename'], $nom),$f['id_record'],$f['id_object'],$f['id_user'],$f['id_workspace'],$f['id_module'],$f['id_module_type'],$f['cur_idgo'],$nom,$content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tunset($post_relations);\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"$tablename: 100/100\".\"\\n\";ob_flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//\n\t\t\t// on indexe par appel de la cron\n\t\t\t// on va traiter ce qu'il y a dans la table preindex\n\t\t\t// on charge la table courante des mots cles enregistres\n\t\t\t// on va test si présence d'un fichier temporaire\n\n\t\t\t// on met à jour la tables des mots en y insérant les nouveaux mots\n\t\t\t$res=$this->db->query(\"select * from dims_keywords_preindex\");\n\t\t\t// on traite l'ensemble des lignes enregistrees\n\t\t\tif ($this->db->numrows($res)) {\n\t\t\t\t$res=$this->db->query(\"select * from dims_keywords\");\n\n\t\t\t\twhile($wo=$this->db->fetchrow($res)) {\n\t\t\t\t\t$word[0]=$wo['id'];\n\t\t\t\t\t$word[1]=false;\n\t\t\t\t\t$word[2]=$wo['count'];\n\t\t\t\t\t$word[3]=$wo['stype'];\n\t\t\t\t\t$this->tabwords[$wo['word']]=$word;\n\t\t\t\t}\n\n\t\t\t\t// on compte le nbre de phrases\n\t\t\t\t//$this->lastinsertword=sizeof($this->tabwords);\n\t\t\t\t// on compte le nbre de sentences pr commencer le nouveau travail\n\t\t\t\t$res=$this->db->query(\"select max(id) as cpte from dims_keywords\");\n\n\t\t\t\tif($f=$this->db->fetchrow($res)) {\n\t\t\t\t\t$this->lastinsertword=$f['cpte'];\n\t\t\t\t}\n\n\t\t\t\t// on compte le nbre de sentences pr commencer le nouveau travail\n\t\t\t\t$res=$this->db->query(\"select max(id) as cpte from dims_keywords_sentence\");\n\n\t\t\t\tif($f=$this->db->fetchrow($res)) {\n\t\t\t\t\t$this->lastinsertsentence=$f['cpte'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->lastinsertsentence=0;\n\t\t\t\t}\n\n\t\t\t\t$this->lastinsertsentence+=1;\n\t\t\t\t// sauvegarde du premier indice de phrase pour post traitement des campagnes\n\t\t\t\t$firstnewsentence=$this->lastinsertsentence;\n\n\t\t\t\t// on cree la structure pour le keywords_metafield\n\t\t\t\t$res=$this->db->query(\"select * from dims_keywords_metafield\");\n\n\t\t\t\twhile($f=$this->db->fetchrow($res)) {\n\t\t\t\t\t$this->tabwordsmetafield[$f['id_keyword']][$f['id_metafield']]=false;\n\t\t\t\t}\n\n\t\t\t\t$time = round($dims_timer->getexectime(),3);\n\t\t\t\t$time = sprintf(\"%d\",$time*1000);\n\t\t\t\tif (isset($this->execron)) echo \"\\n Chargement du dictionnaire de \".sizeof($this->tabwords).\" mots et \".$this->lastinsertsentence.\" phrases en \".($time-$timedeb).\" ms \\n\";ob_flush();\n\n\t\t\t\t$oldrecord=0;\n\t\t\t\t$oldobject=0;\n\t\t\t\t$oldmodule=0;\n\t\t\t\t$oldgo=0;\n\t\t\t\t$res=$this->db->query(\"select * from dims_keywords_preindex p order by id_module,id_object,id_record\");\n\n\t\t\t\twhile($f=$this->db->fetchrow($res)) {\n\t\t\t\t\t//$fcpte=$f['cpte'];\n\t\t\t\t\t$id_workspace=$f['id_workspace'];\n\t\t\t\t\t$id_module=$f['id_module'];\n\t\t\t\t\t$id_module_type=$f['id_module_type'];\n\t\t\t\t\t$id_user=($f['id_user']==\"\" || is_null($f['id_user'])) ? 0 : $f['id_user'];\n\t\t\t\t\t$id_record=$f['id_record'];\n\t\t\t\t\t$id_object=$f['id_object'];\n\t\t\t\t\t$id_globalobject=($f['id_globalobject']==\"\" || is_null($f['id_globalobject'])) ? 0 : $f['id_globalobject'];\n\t\t\t\t\t$fieldname=$f['typecontent'];\n\t\t\t\t\t$content=trim($f['content']);\n\t\t\t\t\t$id_metafield=0;\n\n\t\t\t\t\t// on recupere id meta du champ\n\t\t\t\t\t$id_metafield=$f['id_metafield'];\n\n\t\t\t\t\t//if ($oldrecord!=$id_record || $oldmodule!=$id_module || $oldobject!=$id_object) {\n\t\t\t\t\tif ($oldgo!=$id_globalobject) {\n\t\t\t\t\t\tif (isset($this->execron)) echo \"\\n Suppression de \".$id_record.\" sur \".$id_oject.\" \".$id_module.\"\\n\";ob_flush();\n\t\t\t\t\t\t$this->queryDeleteIndexDataWithGlobalObject($id_globalobject,$fieldname);\n\t\t\t\t\t\t$oldgo=$id_globalobject;\n\t\t\t\t\t}\n\t\t\t\t\tif (substr($content,0,17)==\"[dimscontentfile]\") {\n\t\t\t\t\t\t$indicators = $this->handle_filecontent($tabsizecompare, $id_metafield,$id_record,$id_object,$id_user,$id_workspace,$id_module,$id_module_type,$id_globalobject,$fieldname,$content);\n\t\t\t\t\t\tif(isset($indicators['cpteglobal'])) $this->cpteglobal += $indicators['cpteglobal'];\n\t\t\t\t\t\tif(isset($indicators['tabsizecompare'])) $tabsizecompare = $indicators['tabsizecompare'];\n\n\t\t\t\t\t\t$time = round($dims_timer->getexectime(),3);\n\t\t\t\t\t\t$time = sprintf(\"%d\",$time*1000);\n\t\t\t\t\t\tif (isset($this->execron)) echo ($time-$timec).\" ms \\n\";ob_flush();\n\t\t\t\t\t}\n\t\t\t\t\t// traitement de la ligne courante\n\t\t\t\t\tif (strlen($content)>0) {\n\t\t\t\t\t\t$this->cpteglobal+=$this->indexFields($id_metafield,$id_record,$id_object,$id_user,$id_workspace,$id_module,$id_module_type,$id_globalobject,$fieldname,$content);\n\t\t\t\t\t}\n\n\t\t\t\t\t// traitement du volume m�moire important\n\t\t\t\t\tif (sizeof($this->tabwords)>$tabsizecompare) {\n\t\t\t\t\t\t$this->storeTempKeywords();\n\t\t\t\t\t\t$tabsize=sizeof($this->tabwords);\n\t\t\t\t\t\t$tabsizecompare=$tabsize+$checksize;\n\t\t\t\t\t}\n\n\t\t\t\t\t// suppression de la ligne courante\n\t\t\t\t\t$resu=$this->db->query(\"DELETE from dims_keywords_preindex where id_record= :idrecord and id_object= :idobject and id_module= :idmodule and typecontent = :fieldname\", array(\n\t\t\t\t\t\t':idrecord' => array('type' => PDO::PARAM_INT, 'value' => $id_record),\n\t\t\t\t\t\t':idobject' => array('type' => PDO::PARAM_INT, 'value' => $id_object),\n\t\t\t\t\t\t':idmodule' => array('type' => PDO::PARAM_INT, 'value' => $id_module),\n\t\t\t\t\t\t':fieldname' => array('type' => PDO::PARAM_STR, 'value' => $fieldname),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// on met a jour la table index et corresp\n\t\t// insert rest of $line ans $this->linecorresp\n\t\tif (!empty($this->line)) $res=$this->db->query($script.$this->line);\n\n\t\t//echo $this->scriptcorresp.$this->linecorresp.\"\\n\";ob_flush();die();\n\t\tif (!empty($this->linecorresp)) {\n\t\t\t$res=$this->db->query($this->scriptcorresp.$this->linecorresp);\n\t\t}\n\n\t\t// on enregistre les acquisitions\n\t\tunset($this->line);\n\t\tunset($this->linecorresp);\n\n\t\t$time = round($dims_timer->getexectime(),3);\n\t\t$time = sprintf(\"%d\",$time*1000);\n\t\tif (isset($this->execron)) echo ($time-$timedeb).\" ms \\nOn traite les mots cles : \";ob_flush();\n\t\t$line=array();\n\t\t$lineword=array();\n\t\t$i=0;\n\t\t$j=0;\n\t\t$nbmots=sizeof($this->tabwords);\n\n\t\t// on insert maintenant les mots cles\n\t\tforeach ($this->tabwords as $word =>$newword) {\n\t\t\t// on ajoute ceux que l'on n'avait pas en v�rifiant\n\t\t\tif ($newword[1]) {\n\t\t\t\t$i++;\n\t\t\t\t// calcul du soundex\n\t\t\t\t$sdex=soundex($word);\n\t\t\t\t$code=substr($sdex,1);\n\t\t\t\t$meta=metaphone($word);\n\t\t\t\t$flascii=ord(substr($word,0,1));\n\t\t\t\tarray_push($line,\"(\\\"\".$newword[0].\"\\\",\".$this->db->getPdo()->quote($word).\",\".strlen($word).\",\".$newword[2].\",\\\"\".$sdex.\"\\\",\".$code.\",\".$newword[3].\",'\".$meta.\"',\".$flascii.\")\");\n\n\t\t\t\tif ($i>300) {\n\t\t\t\t\t$res=$this->db->query($this->scriptword.implode(\",\",$line));\n\t\t\t\t\t// on exexute maintenant la mise a jour des campagnes\n\t\t\t\t\tunset($line);\n\t\t\t\t\tunset($lineword);\n\t\t\t\t\t$line=array();\n\t\t\t\t\t$lineword=array();\n\t\t\t\t\t$i=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// update du nombre\n\t\t\t\t$this->db->query(\"UPDATE dims_keywords set count= :count where id= :idkeywords \", array(\n\t\t\t\t\t':count' => array('type' => PDO::PARAM_INT, 'value' => $newword[2]),\n\t\t\t\t\t':idkeywords' => array('type' => PDO::PARAM_INT, 'value' => $newword[0]),\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($line)) {\n\t\t\t$res=$this->db->query($this->scriptword.implode(\",\",$line));\n\t\t}\n\t\tunset($line);\n\n\t\t$time = round($dims_timer->getexectime(),3);\n\t\t$time = sprintf(\"%d\",$time*1000);\n\t\tif (isset($this->execron)) echo ($time-$timedeb).\" ms fini \\nOn traite maintenant les doublons\\n\";ob_flush();\n\n\t\t$this->db->query(\"DROP TABLE IF EXISTS `dims_keywords_temp`;\");\n\t\t$this->db->query(\"CREATE TABLE `dims_keywords_temp` (`key_from` INT( 11 ) NOT NULL ,`key_to` INT( 11 ) NOT NULL,count INT(11) NOT NULL DEFAULT '0' ) ENGINE = MYISAM ;\");\n\n\t\t$res=$this->db->query(\"SELECT id,word,count from dims_keywords order by id\");\n\t\t$matrix=array();\n\t\t$matrixdelete=array();\n\t\t$line=array();\n\t\t$i=0;\n\t\t$c=0;\n\n\t\tif ($this->db->numrows($res)>0) {\n\t\t\twhile ($kw=$this->db->fetchrow($res)) {\n\t\t\t\t$c++;\n\t\t\t\tif (isset($matrix[$kw['word']])) {\n\t\t\t\t\t$i++;\n\t\t\t\t\t// on a un doublon (au moins)\n\t\t\t\t\tarray_push($line,\"(\".$kw['id'].\",\".$matrix[$kw['word']].\",\".$kw['count'].\")\");\n\t\t\t\t\t$matrixdelete[]=$kw['id'];\n\n\t\t\t\t\tif ($i>100) {\n\t\t\t\t\t\t$this->db->query(\"INSERT into dims_keywords_temp values \".implode(\",\",$line));\n\t\t\t\t\t\tunset($line);\n\t\t\t\t\t\t$line=array();\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse $matrix[$kw['word']]=$kw['id'];\n\t\t\t}\n\t\t}\n\t\tunset($line);\n\n\t\t$this->db->query(\" ALTER TABLE `dims_keywords_temp` ADD INDEX (`key_from`)\");\n\t\t$this->db->query(\" ALTER TABLE `dims_keywords_temp` ADD INDEX (`key_to`)\");\n\n\t\t// update des tables li�es aux correspondances\n\t\t$sql=\"update dims_keywords_index, dims_keywords_temp\n\t\t\t\tset dims_keywords_index.id_keyword =dims_keywords_temp.key_to where dims_keywords_index.id_keyword =dims_keywords_temp.key_from\";\n\t\t$this->db->query($sql);\n\n\t\t// update count word\n\t\t$sql=\"update dims_keywords, dims_keywords_temp\n\t\t\t\tset dims_keywords.count=dims_keywords.count+dims_keywords_temp.count where dims_keywords.id =dims_keywords_temp.key_to\";\n\t\t$this->db->query($sql);\n\n\t\t// update corresp : k1 et k2\n\t\t$sql=\"update dims_keywords_corresp, dims_keywords_temp\n\t\t\t\tset dims_keywords_corresp.k1 =dims_keywords_temp.key_to where dims_keywords_corresp.k1 =dims_keywords_temp.key_from\";\n\t\t$this->db->query($sql);\n\n\t\t$sql=\"update dims_keywords_corresp, dims_keywords_temp\n\t\t\t\tset dims_keywords_corresp.k2 =dims_keywords_temp.key_to where dims_keywords_corresp.k2 =dims_keywords_temp.key_from\";\n\t\t$this->db->query($sql);\n\n\t\t// suppressions des doublons\n\t\t$sql=\"delete from dims_keywords where id in (select key_from from dims_keywords_temp)\";\n\t\t$this->db->query($sql);\n\n\t\tif (isset($this->execron)) echo ($time-$timedeb).\" ms \\nOn traite les mots cles metafield:\\n\";ob_flush();\n\t\t$line=array();\n\t\t$i=0;\n\t\t$j=0;\n\n\t\t// on insert maintenant les mots cl�s\n\t\tforeach ($this->tabwordsmetafield as $key =>$elem) {\n\t\t\tforeach ($elem as $metafield => $value)\n\t\t\tif ($value) {\n\t\t\t\t$i++;\n\t\t\t\t// verification deje existant\n\t\t\t\t//$res=$this->db->query(\"select id from dims_keywords where id='\".$newword['id'].\"'\");\n\t\t\t\t//if ($this->db->numrows($res)==0) {\n\t\t\t\tarray_push($line,\"(\".$key.\",\".$metafield.\")\");\n\t\t\t\t//}\n\t\t\t\tif ($i>1000) {\n\t\t\t\t\t$res=$this->db->query($this->scriptwordmeta.implode(\",\",$line));\n\t\t\t\t\t// on exexute maintenant la mise � jour des campagnes\n\t\t\t\t\t//$this->db->query($this->scriptwordcampaign.implode(\",\",$lineword).\")\");\n\t\t\t\t\tunset($line);\n\t\t\t\t\tunset($lineword);\n\t\t\t\t\t$line=array();\n\t\t\t\t\t$lineword=array();\n\t\t\t\t\t$i=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($line)) {\n\t\t\t$res=$this->db->query($this->scriptwordmeta.implode(\",\",$line));\n\t\t}\n\t\tunset($line);\n\n\t\tif (isset($this->execron))\techo \"$nbmots mots indexes et $this->cpteglobal correspondances trouvees \\n\";ob_flush();\n\n\t\tif ($this->cpte==0) {\n\t\t\tif (isset($this->execron))\techo \"Creation des index \\n\";ob_flush();\n\t\t\t// execute Create indexes\n\t\t\t$this->queryCreateIndex();\n\n\t\t}\n\n\t\tif (isset($this->execron))\techo \"Suppression des anciens indexes \\n\";ob_flush();\n\t\t$this->updateDeleteIndexData();\n\n\t\tif (isset($this->execron))\techo \"Optimisation des tables \\n\";ob_flush();\n\n\t\t$this->db->query(\" OPTIMIZE TABLE `dims_keywords` , `dims_keywords_index` , `dims_keywords_preindex` , `dims_keywords_corresp`;\");\n\t\tif(file_exists(_DIMS_TEMPORARY_UPLOADING_FOLDER.\"/index_running\")) unlink(_DIMS_TEMPORARY_UPLOADING_FOLDER.\"/index_running\");\n\n\t\tif (isset($this->execron))\techo \"...termine\\n\";ob_flush();\n\t}", "private function loadIndices() {\r\n\t\t/* Queue up all the indexes to make a list */\r\n\t\t$this -> index = Model_Index::addIndex($this -> index, new Model_Index($this -> table -> pk, null, true));\r\n\t\tforeach($this -> parent as $parent) {\r\n\t\t\t$new = Model_Index::fromModel_Relationship($parent);\r\n\t\t\t$this -> index = Model_Index::addIndex($this -> index, $new);\r\n\t\t}\r\n\t\tforeach($this -> table -> unique as $unique) {\r\n\t\t\t$new = Model_Index::fromSQL_Unique($unique);\r\n\t\t\t$this -> index = Model_Index::addIndex($this -> index, $new);\r\n\t\t}\r\n\t\tforeach($this -> table -> index as $index) {\r\n\t\t\t$new = Model_Index::fromSQL_Index($index);\r\n\t\t\t$this -> index = Model_Index::addIndex($this -> index, $new);\r\n\t\t}\n\t}", "protected function setupIndex()\n {\n if($this->createIndex($this->index)){\n \t if($client = $this->getClient()) {\n \t\tforeach($this->items as $it){\n \t\t $type = strtolower($it->getKey());\n \t\t\t$params = [];\n \t\t\t$params['index'] = $this->index;\n \t\t\t$params['type'] = $type;\n \t\t\t\n \t\t\t$mapping = $this->getItemMapping($it);\n \t\t\t \t\t\t\n \t\t\t// Update the index mapping if necessary\n \t\t\t$current = $client->indices()->getMapping($params);\n \t\t\t$updateMapping = true;\n \n \t\t\tif($current = @$current[$this->index]['mappings'][$type]){\n \t\t\t $updateMapping = $current['properties'] != $mapping['properties'];\n \t\t\t}\n \n \t\t\ttry{\n \t\t\tif ($updateMapping){\n \t\t\t $params['body'][$type] = $mapping; \t\t\t\n \t\t\t $client->indices()->putMapping($params);\n \t\t\t}\n \t\t\t} catch(BadRequest400Exception $e) {\n \t\t\t $message = \"ElasticSearch type '$type' fails to update its mapping. Run the following commands to address this issue 'curl -XDELETE http://localhost:9200/friends/$type' './artisan recommendation:populate-engine -i $type'\";\n \t\t\t \\Log::critical($message);\n \t\t\t}\n \t\t}\n \t }\n \t}\n\n \n }", "public static function ensureIndexes() {\n $user = new self();\n $user->getCollection()->ensureIndex(array('key' => 1), array('unique' => true, 'background' => true));\n return true;\n }", "public function startReindexMode() {}", "protected function completeReindexMode() {}", "public function execute()\n {\n $response = $this->client->allDocs(100);\n $lastKey = null;\n\n do {\n if ($response->status !== 200) {\n throw new \\RuntimeException('Error while migrating at offset '.$offset);\n }\n\n $bulkUpdater = $this->client->createBulkUpdater();\n foreach ($response->body['rows'] as $row) {\n $doc = $this->migrate($row['doc']);\n if ($doc) {\n $bulkUpdater->updateDocument($doc);\n }\n $lastKey = $row['key'];\n }\n\n $bulkUpdater->execute();\n $response = $this->client->allDocs(100, $lastKey);\n } while (count($response->body['rows']) > 1);\n }", "public function run()\n {\n ArticleCategory::create(['idx' => 'cat_a']);\n ArticleCategory::create(['idx' => 'cat_b']);\n\n }", "protected function verifyIndexAccess(){}", "function generateIndex()\n {\n // delete old index\n $delete = new rex_sql();\n $delete->setTable($this->tablePrefix.'587_searchindex');\n $delete->delete();\n $delete2 = new rex_sql();\n $delete2->setTable($this->tablePrefix.'587_searchcacheindex_ids');\n $delete2->delete();\n $delete3 = new rex_sql();\n $delete3->setTable($this->tablePrefix.'587_searchcache');\n $delete3->delete();\n \n // index articles\n $art_sql = new rex_sql();\n $art_sql->setTable($this->tablePrefix.'article');\n if($art_sql->select('id,clang'))\n {\n foreach($art_sql->getArray() as $art)\n {\n $this->indexArticle($art['id'], $art['clang']);\n }\n }\n \n // index columns\n foreach($this->includeColumns as $table => $columnArray)\n {\n foreach($columnArray as $column)\n {\n $this->indexColumn($table, $column);\n }\n }\n \n // index mediapool\n if($this->indexMediapool)\n {\n $mediaSQL = new rex_sql();\n $mediaSQL->setTable($this->tablePrefix.'file');\n if($mediaSQL->select('file_id, category_id, filename'))\n {\n foreach($mediaSQL->getArray() as $file)\n {\n $this->indexFile(str_replace('\\\\','/',substr($this->mediaFolder, strlen($this->documentRoot))).'/'.$file['filename'], false, false, $file['file_id'], $file['category_id']);\n }\n }\n }\n \n // index files\n foreach($this->includeDirectories as $dir)\n {\n foreach(a587_getFiles($dir, $this->fileExtensions) as $filename)\n {\n $this->indexFile($filename);\n }\n }\n }", "private function _doIndexJob($parameters) {\n\t\trequire(wgPaths::getModulePath().'actions/class.index.php');\n\t\t$class = new blogActionsIndex();\n\t\tif ((bool) $class->init()) { wgError::add('actionok', 2);\n\t\t\treturn true;\n\t\t}\n\t\telse { wgError::add('actionfailed');\n\t\t\treturn false;\n\t\t}\n\t}", "protected function runDaignostic()\r\n {\r\n \t\r\n \t$this->registerModelsIndexes();\r\n }", "public function actionGenerate()\n {\n try {\n Hawksearch::getInstance()->index->generateIndex();\n $this->stdout('Index succesfully generated.' . PHP_EOL);\n } catch (\\Exception $e) {\n var_dump($e);\n $this->stderr('Failed to generate index.' . PHP_EOL);\n }\n }", "public function handle()\n {\n $index = $this->indexHandler->generateIndexName();\n\n $this->indexHandler->createIndex($index);\n\n // Before do these steps,\n // we should verify that write and read aliases not pointing to any indices\n $this->indexHandler->addWriteAlias($index);\n $this->indexHandler->addReadAlias($index);\n }", "public function doIndex()\n {\n $this->index();\n }", "public function doDeleteIndex() {\n\t\t$this->db = x(\"db\");\n\t\t$this->collection = xn(\"collection\");\n\n\t\t$db = $this->_mongo->selectDB($this->db);\n\t\t$collection = $this->_mongo->selectCollection($db, $this->collection);\n\t\t$indexes = $collection->getIndexInfo();\n\t\tforeach ($indexes as $index) {\n\t\t\tif ($index[\"name\"] == trim(xn(\"index\"))) {\n\t\t\t\t$ret = $db->command(array(\"deleteIndexes\" => $collection->getName(), \"index\" => $index[\"name\"]));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->redirect(\"collection.collectionIndexes\", array(\n\t\t\t\"db\" => $this->db,\n\t\t\t\"collection\" => $this->collection\n\t\t));\n\t}", "private function _doIndexJob($parameters) {\n\t\trequire(wgPaths::getModulePath().'actions/class.index.php');\n\t\t$class = new systemusersActionsIndex();\n\t\tif ((bool) $class->init()) { wgError::add('actionok', 2);\n\t\t\treturn true;\n\t\t}\n\t\telse { wgError::add('actionfailed');\n\t\t\treturn false;\n\t\t}\n\t}", "protected function reportIndexingDone()\n {\n $this->container->indexManager->reportIndexingDone();\n }", "public static function createIndex()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->createIndex(static::index(), [\n 'settings' => ['index' =>\n ['refresh_interval' => '1s', 'blocks' => ['read_only_allow_delete' => false]]\n ],\n 'mappings' => static::mapping(),\n\n ]);\n }", "public function createOrUpdateIndexStructures() {}", "public function createOrUpdateIndexStructures() {}", "public function createOrUpdateIndexStructures() {}", "public function createOrUpdateIndexStructures() {}", "public function rebuildAllIndexes(): void\n {\n $this->rebuildIndex(false);\n $sub = $this->getSubPackages();\n foreach ($sub as $pack) {\n $this->rebuildIndex($pack);\n }\n }", "public static function createIndex()\n\t{\n\t\t$db = static::getDb();\n\t\t$command = $db->createCommand();\n\t\t$command->createIndex(static::index(), [\n\t\t\t'settings' => [\n\t\t\t\t'number_of_replicas' => 0,\n\t\t\t\t'number_of_shards' => 1,\n\t\t\t],\n\t\t\t'mappings' => static::mapping(),\n\t\t\t//'warmers' => [ /* ... */ ],\n\t\t\t//'aliases' => [ /* ... */ ],\n\t\t\t//'creation_date' => '...'\n\t\t]);\n\t}", "public static function ensureIndexes() {\n $icd = new self();\n $icd->getCollection()->ensureIndex(array('code' => 1), array('unique' => true, 'background' => true));\n return true;\n }", "public function flush(): void\n {\n foreach ($this->indexes as $index) {\n if ($index instanceof DenormalizedIndex) {\n $index = $this->index($index->config()->denormalizedClass());\n }\n\n if ($index instanceof ElasticsearchIndex) {\n $index->refresh();\n }\n }\n }", "public static function createIndex()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->createIndex(static::index(), [\n //'settings' => [],\n 'mappings' => static::mapping(),\n //'warmers' => [ ],\n //'aliases' => [ ],\n //'creation_date' => '...'\n ]);\n }", "protected function flushIndex() {\n\t\t$this->canIndex();\n\t\t/** Set indexer to use mview */\n\t\t$this->_indexer->setScheduled( true );\n\n\t\t$writeAdapter = $this->_resourceConnection->getConnection( 'core_write' );\n\n\t\t/** Flush all old data */\n\t\t$indexTable = $this->_resourceConnection->getTableName( 'bazaarvoice_index_product' );\n\t\t$writeAdapter->truncateTable( $indexTable );\n\t\t$changelogTable = $this->_resourceConnection->getTableName( 'bazaarvoice_product_cl' );\n\t\t$writeAdapter->truncateTable( $changelogTable );\n\n\t\t/** Setup dummy rows */\n\t\t$productTable = $this->_resourceConnection->getTableName( 'catalog_product_entity' );\n\t\t$writeAdapter->query( \"INSERT INTO `$indexTable` (`product_id`, `version_id`) SELECT DISTINCT `entity_id`, '0' FROM `$productTable`;\" );\n\t\t$writeAdapter->query( \"INSERT INTO `$changelogTable` (`entity_id`) SELECT DISTINCT `entity_id` FROM `$productTable`;\" );\n\n\t\t/** Reset mview version */\n\t\t$mviewTable = $this->_resourceConnection->getTableName( 'mview_state' );\n\t\t$writeAdapter->query( \"UPDATE `$mviewTable` SET `version_id` = NULL, `status` = 'idle' WHERE `view_id` = 'bazaarvoice_product';\" );\n\t\t$indexCheck = $writeAdapter\n\t\t\t->query( \"SELECT COUNT(1) indexIsThere FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_schema=DATABASE() AND table_name='{$changelogTable}' AND index_name='entity_id';\" );\n\t\t$indexCheck = $indexCheck->fetchObject();\n\t\tif ( $indexCheck->indexIsThere == 0 ) {\n\t\t\t$writeAdapter->query( \"ALTER TABLE `{$changelogTable}` ADD INDEX (`entity_id`);\" );\n\t\t}\n\n\t}", "public function massReindexAction()\n {\n /* @var $indexer Mage_Index_Model_Indexer */\n $indexer = Mage::getSingleton('index/indexer');\n $processIds = $this->getRequest()->getParam('process');\n if (empty($processIds) || !is_array($processIds)) {\n $this->_getSession()->addError(Mage::helper('index')->__('Please select Indexes'));\n } else {\n try {\n $counter = 0;\n foreach ($processIds as $processId) {\n /* @var $process Mage_Index_Model_Process */\n $process = $indexer->getProcessById($processId);\n if ($process && $process->getIndexer()->isVisible()) {\n $process->reindexEverything();\n $counter++;\n }\n }\n $this->_getSession()->addSuccess(\n Mage::helper('index')->__('Total of %d index(es) have reindexed data.', $counter)\n );\n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()->addException($e, Mage::helper('index')->__('Cannot initialize the indexer process.'));\n }\n }\n\n $this->_redirect('*/*/list');\n }", "public function testCreateIndexConcurrently()\n {\n $q = new CreateIndexQuery;\n $q->create('idx_salary')\n ->on('employees', [ 'last_name', 'salary' ])\n ->concurrently()\n ;\n $this->assertSqlStrings($q, [ \n [ new MySQLDriver, 'CREATE INDEX `idx_salary` ON `employees` (last_name,salary)' ],\n [ new PgSQLDriver, 'CREATE INDEX CONCURRENTLY \"idx_salary\" ON \"employees\" (last_name,salary)' ],\n ]);\n }", "public function actionDoIndexing($country_code = 'au', $reindex = false)\n {\n \t\n \t/*The algorithm in brief*/\n //if the compnay is not in the processed list\n \t//get company_name, and web\n \t//put it in the processed list\n \t//get table name\n\t //get all distinct category_l1 from table and company\n\t //get all distinct category_l2 from table and company\n\t //get all distinct category_l3 from table and company\n\t //get all distinct category_l4 from table and company\n\t //get business description and other info\n\t //form the data with category JSON\n\t //insert index\n\t //update all records to is_indexed=1 where company_name, and web same\n \t\n \techo \"\\n\\rcountry_code =\".$country_code.\"\\n\\r\";\n $query = new Query;\n $connection = \\Yii::$app->getDb();\n $table_name = \"amt_au_company\";\n $command = $query->createCommand();\n $rs = $command->о($country_code);\n if(!isset($rs) && empty($rs)) {\n \t$rs = $command->createIndex($country_code);\n \tif(isset($rs) && !empty($rs))\n \t\tprint \"Index is created\\n\\r\";\n }\n else {\n \tprint \"Index already exists\\n\\r\";\n }\n $index = $country_code;\n $type = 'company';\n $count = 0;\n switch ($country_code) {\n \t//australia\n \tcase 'au': $count = AmtAUCompany::find()->count(); $datamodel = new AmtAUCompany(); $table_name = 'amt_au_company';\n \tbreak;\n \t//france\n \tcase 'fr': $count = AmtFRCompany::find()->count(); $datamodel = new AmtFRCompany();$table_name = 'amt_fr_company';\n \tbreak;\n \t//korea\n \tcase 'kr': $count = AmtKRCompany::find()->count(); $datamodel = new AmtKRCompany();$table_name = 'amt_kr_company';\n \tbreak;\n }\n \n $chunk = ceil($count/10);\n print \"Total data chunk: \".$chunk.\"\\n\\r\";\n for($i=0;$i<$chunk;$i++){\n \t$lower_limit = $i*10;\n \t$upper_limit = 10;//($i+1)*100;\n \tprint \"Indexing Range: \".$lower_limit.\" - \".$upper_limit*($i+1).\"\\n\\r\";\n \t$companies = \"\";\n \tif(!$reindex) {\n \t\t$companies = $datamodel->find()\n \t\t\t\t\t->where('amt_rank != :rank_score and is_indexed = :index_status', ['rank_score'=>0, 'index_status'=>0])\n \t\t\t\t\t->orderBy('company_key')\n \t\t\t\t\t->offset($lower_limit)\n \t\t\t\t\t->limit($upper_limit)->all();\n \t\t\t}\n \telse {\n \t\t$companies = $datamodel->find()\n \t\t\t\t\t->orderBy('company_key')\n \t\t\t\t\t->offset($lower_limit)\n \t\t\t\t\t->limit($upper_limit)->all();\n \t\t\t}\n\n \tprint \"total companies: \".sizeof($companies).\"\\n\\r\"; \n \tprint \"Start Key: \".$companies[0]->company_key;\n \tprint \"\\tEnd Key: \".$companies[sizeof($companies)-1]->company_key.\"\\n\\r\";\n \t$company_processed = array();\n \tforeach($companies as $acompany){\n \t if($acompany->is_indexed !=1){\n \t\t$company_name = $acompany->company_name;\n \t\t$web = $acompany->web;\n \t\t$company_str = $company_name.\" \".$web;\n \t\tif(!in_array($company_str, $company_processed)){\n \t\t\tprint \"Indexing :\".$company_str.\"\\n\\r\";\n \t\t\tarray_push($company_processed, $company_str);\n \t\t\t$business_description = isset($acompany->business_description) ? $acompany->business_description : $acompany->company_description;\n \t\t\t$amt_rank =$acompany->amt_rank;\n \t\t\t$company_key = $acompany->company_key;\n \t\t\t$category1 = [];\n \t\t\t$category2 = [];\n \t\t\t$category3 = [];\n \t\t\t$category4 = [];\n \t\t\t$sqlcommand = $connection->createCommand(\"SELECT distinct(category_l1) from $table_name where company_name = '$company_name' and web = '$web'\");\n \t\t\t$result = $sqlcommand->queryAll();\n \t\t\tif(!empty($result) && isset($result)){\n \t\t\tforeach($result as $id=>$row){\n \t\t\t\tif(!empty($row) && isset($row))\n \t\t\t\tforeach($row as $id2=>$val){\n \t\t\t\t\tarray_push($category1,$val);\n \t\t\t\t\t//print \"$val\\n\\r\";\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(!empty($category1))\n \t\t\t\tprint \"Category 1 extraction.....OK\\n\\r\";\n \t\t\t}\n \t\t\telse\n \t\t\t\tprint \"Category 1 is empty......\\n\\r\";\n \t\t\t\n \t\t\t$sqlcommand = $connection->createCommand(\"SELECT distinct(category_l2) from $table_name where company_name = '$company_name' and web = '$web'\");\n \t\t\t$result = $sqlcommand->queryAll();\n \t\t\tif(!empty($result) && isset($result)){\n \t\t\tforeach($result as $id=>$row){\n \t\t\t\tif(!empty($row) && isset($row))\n \t\t\t\tforeach($row as $id2=>$val){\n \t\t\t\t\tarray_push($category2,$val);\n \t\t\t\t\t//print \"$val\\n\\r\";\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(!empty($category2))\n \t\t\t\tprint \"Category 2 extraction.....OK\\n\\r\";\n \t\t\t}\n \t\t\telse\n \t\t\t\tprint \"Category 2 is empty....\\n\\r\";\n \t\t\t\n \t\t\t$sqlcommand = $connection->createCommand(\"SELECT distinct(category_l3) from $table_name where company_name = '$company_name' and web = '$web'\");\n \t\t\t$result = $sqlcommand->queryAll();\n \t\t\tif(!empty($result) && isset($result)){\n \t\t\tforeach($result as $id=>$row){\n \t\t\t\tif(is_array($row) && !empty($row))\n \t\t\t\tforeach($row as $id2=>$val){\n \t\t\t\t\tarray_push($category3,$val);\n \t\t\t\t\t//print \"$val\\n\\r\";\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(!empty($category3))\n \t\t\t\tprint \"Category 3 extraction.....OK\\n\\r\";\n \t\t\t}\n \t\t\telse\n \t\t\t\tprint \"Category 3 is empty....\\n\\r\";\n \t\t\t\n \t\t\t$sqlcommand = $connection->createCommand(\"SELECT distinct(category_l4) from $table_name where company_name = '$company_name' and web = '$web'\");\n \t\t\t$result = $sqlcommand->queryAll();\n \t\t\t\n \t\t\tif(!empty($result) && isset($result)){\n \t\t\tforeach((array)$result as $id=>$row){\n \t\t\t\tif(is_array($row) && !empty($row)){\n \t\t\t\tforeach((array)$row as $id2=>$val){\n \t\t\t\t\tarray_push($category4,$val);\n \t\t\t\t\t//print \"$val\\n\\r\";\n \t\t\t\t}\n \t\t\t}\n \t\t\t}\n \t\t\tif(!empty($category4))\n \t\t\t\tprint \"Category 4 extraction.....OK\\n\\r\";\n \t\t\t}\n \t\t\telse\n \t\t\t\tprint \"Category 4 is empty.....\\n\\r\";\n \t\t\t\n \t\t\t//saving the data to the index\n \t\t\t$data = [\n \t\t\t\t\t\"company_key\"=> $company_key,\n \t\t\t\t\t\"category_l1\"=>isset($category1) ? json_encode($category1) : $acompany->category,\n \t\t\t\t\t\"category_l2\"=>isset($category2) ? json_encode($category2) : $acompany->address,\n \t\t\t\t\t\"category_l3\"=>isset($category3) ? json_encode($category3) : $acompany->suburb,\n \t\t\t\t\t\"category_l4\"=>isset($category4) ? json_encode($category4) : $acompany->state,\n \t\t\t\t\t\"company_name\"=>$company_name,\n \t\t\t\t\t\"web\" => $web,\n \t\t\t\t\t\"business_description\"=>isset($business_description) ? $business_description : $acompany->company_description,\n \t\t\t\t\t\"amt_rank\"=>$amt_rank,\n \t\t\t];\n \t\t\t\n \t\t\t$command->insert( $index, $type, $data, $id = null, $options = [] );\n \t\t\t$data = \"\";\n \t\t\t$targetcompanies = $datamodel->find()->where(['company_name' => $company_name, 'web'=>$web])->all();\n \t\t\tprint sizeof($targetcompanies).\" records are set to is_indexed = TRUE\\n\\r\";\n \t\t\tforeach ($targetcompanies as $id=>$target){\n \t\t\t\t$target->is_indexed = 1;\n \t\t\t\t$target->save();\n \t\t\t}\n \t\t\t$targetcompanies=\"\";\n \n \t\t}\n \t\telse {\n \t\t\tprint \"The company is already indexed....OK\\n\\r\";\n \t\t}\n \t}\n \t\telse {\n \t\t\tprint \"The record is already indexed....OK\\n\\r\";\n \t\t}\n \t\t \n \t}\n \t\n \t \n }\n \n }", "public function createIndexes()\n {\n foreach ($this->getCollections() as $collection) {\n if (empty($indexes = $collection->getIndexes())) {\n continue;\n }\n\n $odmCollection = $this->odm->database(\n $collection->getDatabase()\n )->selectCollection(\n $collection->getName()\n );\n\n foreach ($indexes as $index) {\n $options = [];\n if (isset($index[DocumentEntity::INDEX_OPTIONS])) {\n $options = $index[DocumentEntity::INDEX_OPTIONS];\n unset($index[DocumentEntity::INDEX_OPTIONS]);\n }\n\n $odmCollection->createIndex($index, $options);\n }\n }\n }", "public static function createIndex()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->createIndex(static::index(), [\n 'settings' => [ /* ... */ ],\n 'mappings' => static::mapping(),\n //'warmers' => [ /* ... */ ],\n //'aliases' => [ /* ... */ ],\n //'creation_date' => '...'\n ]);\n }", "public function handle()\n {\n $foreignKeyColumns = $this->getForeignKeyColumns();\n $indexedColumns = $this->getIndexedColumns();\n\n $columnsWithoutIndex = [];\n\n foreach ($foreignKeyColumns as $table => $columns) {\n foreach ($columns as $column) {\n if (!isset($indexedColumns[$table][$column])) {\n $columnsWithoutIndex[$table][] = $column;\n }\n }\n }\n\n $totalIndexesCreatedCount = $this->createIndex($columnsWithoutIndex);\n\n if ($totalIndexesCreatedCount) {\n $this->info(\"Successfully created {$totalIndexesCreatedCount} index(es)!\");\n } else {\n $this->info('There is no unindexed foreign keys!');\n }\n }", "public function createIndexTable(){}", "public function build()\n {\n $this->execCommand('Create search indexes', 'massive:search:reindex');\n }", "public function createIndexes()\n {\n $types = $this->app->jbtype->getSimpleList();\n\n if (!empty($types)) {\n foreach ($types as $type => $typeName) {\n $this->createIndexTable($type);\n }\n }\n }", "public static function optimizeIndex() {\r\n\r\n\t\t$index = self::getIndex();\r\n\t\t$index->optimize();\r\n\t}", "protected function indexSetup() {\n }", "public function fire()\n {\n $this->client = App::make('elasticsearch');\n\n $indexers = [\n 'App\\Haku\\Indexers\\BusinessIndexer',\n 'App\\Haku\\Indexers\\UserIndexer',\n ];\n\n foreach ($indexers as $indexer) {\n // If there is already an index, skip it\n if ($this->client->indices()->exists(['index' => $indexer::INDEX_NAME])) {\n continue;\n }\n\n // Create index\n $params = [\n 'index' => $indexer::INDEX_NAME,\n 'body' => [\n 'settings' => [\n 'analysis' => [\n 'analyzer' => $this->getAnalyzer(),\n 'tokenizer' => $this->getTokenizer(),\n ],\n ],\n 'mappings' => [\n $indexer::INDEX_TYPE => $this->getMapping($indexer::getMapping())\n ],\n ],\n ];\n\n $this->client->indices()->create($params);\n $this->info('Index ['.$indexer::INDEX_NAME.'] created.');\n }\n\n $this->line('Indexing business data');\n $businesses = Business::notHidden()->get();\n foreach ($businesses as $business) {\n $indexer = new BusinessIndexer($business);\n $indexer->index();\n\n $this->output->write('.');\n }\n\n $this->line('');\n $this->line('Indexing user data');\n // Leave consumer accounts alone\n $users = User::whereNull('consumer_id')->get();\n foreach ($users as $user) {\n $indexer = new UserIndexer($user);\n $indexer->index();\n\n $this->output->write('.');\n }\n\n $this->line('');\n $this->info('Done!');\n }", "public function synchronize()\n {\n foreach ($this->synchronizables as $synchronizable) {\n $this->upsertES($synchronizable);\n $this->deleteES($synchronizable);\n $this->updateViewsES($synchronizable);\n $this->updateAverageReviewES($synchronizable);\n }\n\n $this->container->get(\"search.engine\")->getElasticaIndex()->flush();\n }", "public function reCreateIndex(){\r\n\t\t$this->deleteIndexRecursive($this->indexPath);\r\n\t\t$this->createIndex();\r\n\t}", "public function createSearchIndexAndRunSphinx()\n {\n $container = $this->getContainer();\n\n $container->get('sphinx')->closeConnection();\n\n $dataDir = $container->getParameter('javer_sphinx.data_dir');\n if (!is_dir($dataDir)) {\n mkdir($dataDir, 0755, true);\n }\n\n $configPath = $dataDir . '/sphinx.conf';\n\n $daemon = $container->get('sphinx.daemon')->setConfigPath($configPath);\n $daemon->stop();\n\n $indexes = $container->get('sphinx.converter.mysql_to_realtime')\n ->convertConfig($container->getParameter('javer_sphinx.config_path'), $configPath);\n\n $daemon->start();\n\n $container->get('sphinx.loader.doctrine')->loadDataIntoIndexes($indexes);\n }", "private function _doIndexJob($parameters) {\n\t\trequire(wgPaths::getModulePath().'actions/class.index.php');\n\t\t$class = new mobileappsActionsIndex();\n\t\tif ((bool) $class->init()) { wgError::add('actionok', 2);\n\t\t\treturn true;\n\t\t}\n\t\telse { wgError::add('actionfailed');\n\t\t\treturn false;\n\t\t}\n\t}", "public function reindexAll();", "public static function index() {\n\n \t$indexes = Search::where( 'status', 0 )->orderBy( 'updated_at', 'asc' )->take(10)->get();\n\n \tforeach ( $indexes as $i ) {\n\n \t\t$id = $i->object_id;\n\n \t\tswitch ( $i->object_type ):\n\n \t\t\tcase 'test_cases':\n\n \t\t\t\t$object = Cases::find( $id );\n \t\t\t\tif ( $object ) $keywords = implode( ' ', [ $object->name, $object->description, $object->instructions, $object->fail_criteria, $object->pass_criteria ] );\n\n \t\t\tbreak;\n\n \t\t\tcase 'test_issues':\n\n\t\t\t\t\t$object = Issues::find( $id );\n \t\t\t\tif ( $object ) $keywords = implode( ' ', [ $object->title, $object->details ] );\n\n \t\t\tbreak;\n\n \t\t\tcase 'test_scenarios':\n\n\t\t\t\t\t$object = Scenarios::find( $id );\n \t\t\t\tif ( $object ) $keywords = implode( ' ', [ $object->name, $object->description ] );\n\n \t\t\tbreak;\n\n\t\t\t\tcase 'test_suites':\n\n\t\t\t\t\t$object = Suites::find( $id );\n \t\t\t\tif ( $object ) $keywords = implode( ' ', [ $object->name, $object->description ] );\n\n \t\t\tbreak; \t\t\t\n\n \t\t\tdefault:\n \t\t\tbreak;\n\n \t\tendswitch;\n\n \t\tif ( isset( $object ) && isset( $keywords ) ) {\n\n \t\t\t$words = string_to_words( $keywords );\n\n \t\t\t$i->update( [ 'keywords' => $words, 'status' => 1 ] );\n\n \t\t}\n\n \t}\n\n }", "public function testExecute() : void\n {\n $this->addChildColumns();\n try {\n $result = $this->indexer->execute();\n } catch (LocalizedException $e) {\n if ($e->getPrevious() instanceof \\Zend_Db_Statement_Exception) {\n $this->fail($e->getMessage());\n }\n throw $e;\n }\n $this->assertInstanceOf(FlatIndexerFull::class, $result);\n }", "public function testEnsureIndexesCreateJobDefaultQueue()\n {\n $jobData = array(\n 'storeName' => 'tripod_php_testing',\n 'tripodConfig' => \\Tripod\\Config::getConfig(),\n 'reindex' => false,\n 'background' => true\n );\n\n //create mock job\n $job = $this->createMockJob();\n $job->expects($this->once())\n ->method('submitJob')\n ->with(\n \\Tripod\\Mongo\\Config::getEnsureIndexesQueueName(),\n 'MockEnsureIndexes',\n $jobData\n );\n\n $job->createJob('tripod_php_testing', false, true);\n }", "private function runIndexing()\n\t{\n\t\t$fileColumn = $this->columnList['file'];\n\n\t\t$uniquePaths = array();\n\n\t\tif (!empty($this->seekPath))\n\t\t{\n\t\t\t$uniquePaths[$this->seekPath] = 1;\n\t\t}\n\n\t\t$pathIndexer = new Index\\PathIndexCollection();\n\n\t\t$currentLine = 0;\n\t\twhile ($csvRow = $this->csvFile->fetch())\n\t\t{\n\t\t\t$currentLine ++;\n\n\t\t\tif ($this->seekLine > 0)\n\t\t\t{\n\t\t\t\tif ($currentLine <= $this->seekLine)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t!\\is_array($csvRow) ||\n\t\t\t\tempty($csvRow) ||\n\t\t\t\t(\\count($csvRow) == 1 && ($csvRow[0] === null || $csvRow[0] === ''))\n\t\t\t)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$filePath = (isset($csvRow[$fileColumn]) ? $csvRow[$fileColumn] : '');\n\t\t\tif ($filePath == '')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (Translate\\IO\\Path::isLangDir($filePath, true) !== true)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$filePath = Translate\\IO\\Path::normalize('/'.$filePath);\n\n\t\t\tif (isset($uniquePaths[$filePath]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($this->languageList as $languageId)\n\t\t\t{\n\t\t\t\t$langFilePath = Translate\\IO\\Path::replaceLangId($filePath, $languageId);\n\n\t\t\t\t$fullPath = self::$documentRoot. $langFilePath;\n\t\t\t\t$fullPath = Main\\Localization\\Translation::convertLangPath($fullPath, $languageId);\n\n\t\t\t\t$langFile = new Translate\\File($fullPath);\n\t\t\t\t$langFile->setLangId($languageId);\n\n\t\t\t\tif (!$langFile->load())\n\t\t\t\t{\n\t\t\t\t\t$this->addErrors($langFile->getErrors());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($langFile->getFileIndex()->getId() <= 0)\n\t\t\t\t{\n\t\t\t\t\t$topPath = $pathIndexer->constructAncestorsByPath($filePath);\n\n\t\t\t\t\tif ($topPath['ID'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fileIndex = $langFile->getFileIndex();\n\t\t\t\t\t\t$fileIndex->setPathId($topPath['ID']);\n\t\t\t\t\t\t$fileIndex->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$langFile->updatePhraseIndex();\n\t\t\t}\n\n\t\t\t$uniquePaths[$filePath] = 1;\n\t\t\t$this->processedItems ++;\n\n\t\t\tif ($this->instanceTimer()->hasTimeLimitReached())\n\t\t\t{\n\t\t\t\t$this->seekLine = $currentLine;\n\t\t\t\t$this->seekPath = $filePath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->csvFile->close();\n\n\t\tif ($this->instanceTimer()->hasTimeLimitReached() !== true)\n\t\t{\n\t\t\t$this->declareAccomplishment();\n\t\t\t$this->clearProgressParameters();\n\t\t}\n\n\t\treturn array(\n\t\t\t'PROCESSED_ITEMS' => $this->processedItems,\n\t\t\t'TOTAL_ITEMS' => $this->totalItems,\n\t\t);\n\t}", "public function reindex($arg) {\n extract($this->_commonVars);\n $indexerScript = $this->_rootPath.'shell'.DS.'indexer.php';\n $availableIndexes = $this->_getIndexList();\n switch ($arg) {\n case 'all':\n $command = \"php $indexerScript reindexall\";\n echo 'Reindexing ...', $n;\n break;\n default:\n if (in_array($arg, array_keys($availableIndexes))) {\n $command = \"php $indexerScript --reindex $arg\";\n } else {\n echo 'Usage: php ', $_script. ' -i [all|index]', $n, $n;\n echo 'Available indexes:', $n;\n foreach ($availableIndexes as $code => $name) {\n echo OutputCLI::columnize($code, 2, $name, self::SECOND_COLUMN_LEFT), $n;\n }\n }\n break;\n }\n \n if (isset($command) && !empty($command)) {\n echo shell_exec($command);\n }\n }", "public function handle()\n {\n ini_set('memory_limit','1G');\n \n if (app()->runningInConsole()) {\n pcntl_async_signals(true);\n pcntl_signal(SIGINT, [$this, 'handleCancel']);\n pcntl_signal(SIGTERM, [$this, 'handleCancel']);\n }\n\n $isMonitoring = $this->option('monitor');\n $easyCount = $this->option('easy-count');\n $limit = $this->option('limit') ? intval($this->option('limit')) : 100;\n $index = Helpers::getIndexByName($this->argument('index'));\n $monitor = new Monitoring();\n\n foreach ($index->getLinkedModels() as $model) {\n $from = $this->option('from') ? $this->option('from') : 0;\n $model = new $model();\n $modelName = class_basename($model);\n\n $this->line(\"\");\n $this->info(\"Indexing $modelName model\");\n\n $this->info(\"Getting total number of records...\");\n $queryBuilder = $model->getIndexQueryBuilder();\n $this->currentAllRecordsCount = $easyCount ? $model->count() : $queryBuilder->count();\n $this->currentTotalCount = $easyCount ? $model->count() : $queryBuilder->when($from, fn ($q) => $q->where($model->getKeyName(), '>', $from))->count();\n $this->currentTotalDuration = 0;\n $this->currentRecordsIndexed = 0;\n $this->jobId = (string) \\Str::uuid();\n\n $this->info(\"Total number of records: {$this->currentTotalCount}\");\n\n do \n {\n $monitor->clearTimers();\n $monitor->startTimer('duration');\n\n $isMonitoring && $monitor->startTimer('getRecords');\n $queryBuilder = $model->getIndexQueryBuilder();\n\n $records = $queryBuilder\n ->when($from, fn ($q) => $q->where($model->getKeyName(), '>', $from))\n ->limit($limit ?? $model->getBulkSize())\n ->orderBy($model->getKeyName(), 'asc')\n ->get();\n\n $meta = $model->addMetaData($records);\n\n $count = count($records);\n \n $isMonitoring && $monitor->endTimer('getRecords');\n \n $actionCounts = [\n 'created' => 0,\n 'updated' => 0,\n 'deleted' => 0,\n 'skipped' => 0,\n 'errors' => 0,\n ];\n $params = [\n 'index' => [],\n 'create' => [],\n 'update' => [],\n 'delete' => []\n ];\n\n if (!$count) break;\n\n $isMonitoring && $monitor->startTimer('createIndexDocuments');\n foreach ($records as $record) {\n $indexData = $record->sendIndexData($meta, $params);\n\n foreach ($indexData as $type => $values) {\n $params[$type] = array_merge($params[$type], $values);\n }\n };\n $isMonitoring && $monitor->endTimer('createIndexDocuments');\n\n $from = $records->last()->{ $model->getKeyName() };\n\n unset($records);\n unset($meta);\n \n if (!empty($params)) {\n $isMonitoring && $monitor->startTimer('indexing');\n $response = $index->bulk($params);\n $isMonitoring && $monitor->endTimer('indexing');\n \n unset($params);\n \n if ($response['errors']) {\n if ($this->option('dump-errors', false)) \n dd($response['items']);\n\n $errorBatch = collect([]);\n \n foreach ($response['items'] as $i => $actionValues) {\n foreach ($actionValues as $value) {\n if (isset($value['error']))\n $errorBatch->push($value);\n }\n }\n \n $errorCount = $errorBatch->count();\n\n if ($errorCount) {\n Helpers::getIndexLogModel()::insert($errorBatch->map(fn ($value) => [\n 'job_id' => $this->jobId,\n 'document_id' => $value['_id'],\n 'status' => $value['status'],\n 'index' => $value['_index'],\n 'type' => $value['error']['type'],\n 'reason' => $value['error']['reason'],\n ]) ->toArray());\n\n $actionCounts['errors'] += $errorCount;\n }\n }\n \n\n $response = collect($response['items'])->each(function ($value) use (&$actionCounts, $response) {\n $action = array_key_first($value);\n\n if (isset($value[$action]['error'])) return;\n\n switch ($action) {\n case 'index':\n if ($value['index']['result'] === 'created') $actionCounts['created']++;\n elseif ($value['index']['result'] === 'updated') $actionCounts['updated']++;\n break;\n\n case 'create': \n $actionCounts['created']++;\n break;\n\n case 'update':\n if ($value['update']['result'] === 'noop') $actionCounts['skipped']++;\n elseif ($value['update']['result'] === 'updated') $actionCounts['updated']++;\n break;\n }\n });\n\n unset($response);\n }\n \n $monitor->endTimer('duration');\n $duration = $monitor->getData('duration');\n \n $this->currentRecordsIndexed += $count;\n $this->currentTotalDuration += $duration;\n\n $actionCountString = collect($actionCounts)->map(function ($value, $key) {\n if ($value) return \"$key: $value\";\n else return null;\n })->reject(fn ($value) => !$value)->implode(', ');\n\n $timeRemaningString = $this->__getTimeRemaningString();\n\n $this->comment(\"$modelName: $count records indexed in {$duration}s (total: {$this->currentRecordsIndexed}, $actionCountString, last ID: $from, $timeRemaningString)\");\n\n if ($isMonitoring) {\n $this->line('<fg=white>' . collect($monitor->getOutput())->map(fn ($v, $k) => \"$k: {$v}s\")->implode(', ') . '</>');\n }\n }\n while ($count);\n }\n\n $this->line(\"\");\n $this->info(ucfirst($index->getIndexName()) . \": {$this->currentRecordsIndexed} records indexed in {$this->currentTotalDuration}s\");\n $this->line(\"\");\n }", "public function index()\n {\n try {\n $batchSize = $this->config['batch_size'];\n $iteration = 1;\n $params = ['body' => []];\n while ($xmlNode = $this->xml->getNode()) {\n $record = (array) simplexml_load_string($xmlNode);\n $this->prepareBulkIndexRequest($params, $record, $this->config);\n // Every 100 elements stop and send the bulk request\n if ($iteration % $batchSize == 0) {\n $this->bulkIndex($params);\n $params = ['body' => []];\n }\n $iteration++;\n }\n // Send the last batch if it exists\n if (!empty($params['body'])) {\n $this->bulkIndex($params);\n }\n } catch (Exception $ex) {\n throw $ex;\n }\n }", "abstract public function createIndexTable();", "public function createIndex() {\r\n\t\t//Query for the index\r\n\t\t$sql = \"SELECT e.id as exerciseId, e.title, e.description, e.language, e.tags, e.source, e.name, e.thumbnail_uri as thumbnailUri, e.adding_date as addingDate,\r\n\t\t e.duration, u.name as userName, avg (suggested_level) as avgDifficulty, e.status, license, reference, a.complete as isSubtitled\r\n\t\t\t\tFROM exercise e \r\n\t\t\t\t\t INNER JOIN users u ON e.fk_user_id= u.ID\r\n\t \t\t\t\t LEFT OUTER JOIN exercise_score s ON e.id=s.fk_exercise_id\r\n \t\t\t\t LEFT OUTER JOIN exercise_level l ON e.id=l.fk_exercise_id\r\n \t\t\t\t LEFT OUTER JOIN subtitle a ON e.id=a.fk_exercise_id\r\n \t\t\tWHERE e.status = 'Available'\r\n\t\t\t\tGROUP BY e.id\";\r\n\t\t$result = $this->conn->_multipleSelect ( $sql );\r\n\t\tif($result){\r\n\t\t\t//Create the index\r\n\t\t\t$this->index = Zend_Search_Lucene::create($this->indexPath);\r\n\r\n\t\t\t//To recognize numerics\r\n\t\t\tZend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());\r\n\r\n\t\t\tforeach ( $result as $line ) {\r\n\t\t\t\t\r\n\t\t\t\t$lineAvgScore = $this->getExerciseAvgBayesianScore($line->exerciseId);\r\n\t\t\t\t$line->avgRating = $lineAvgScore ? $lineAvgScore->avgScore : 0;\r\n\t\t\t\t$descriptors = $this->getExerciseDescriptors($line->exerciseId,$line->language);\r\n\t\t\t\tif($descriptors)\r\n\t\t\t\t\t$line->descriptors = implode(\"\\n\",$descriptors);\r\n\t\t\t\telse\r\n\t\t\t\t\t$line->descriptors = '';\r\n\t\t\t\t$this->addDoc($line,$this->unindexedFields);\r\n\t\t\t}\r\n\t\t\t$this->index->commit();\r\n\t\t\t$this->index->optimize();\r\n\t\t}\r\n\t}", "public function testEnsureIndexesCreateJobSpecifyQueue()\n {\n $jobData = array(\n 'storeName' => 'tripod_php_testing',\n 'tripodConfig' => \\Tripod\\Config::getConfig(),\n 'reindex' => false,\n 'background' => true\n );\n\n $job = $this->createMockJob();\n\n $queueName = \\Tripod\\Mongo\\Config::getEnsureIndexesQueueName() . '::TRIPOD_TESTING_QUEUE_' . uniqid();\n\n $job->expects($this->once())\n ->method('submitJob')\n ->with(\n $queueName,\n 'MockEnsureIndexes',\n $jobData\n );\n\n $job->createJob('tripod_php_testing', false, true, $queueName);\n }", "static function updateSearchIndexAll ( )\n\t{\n\t\t_db_query( 'BEGIN' );\n\t\t\n\t\t$res = _db_query( \"SELECT `\" . self::F_ABUID .\"`,`\" . self::T_ABCOMPANIES . \"`.`\" . self::F_ABID .\"` FROM `\" . self::T_ABCOMPANIES . \"` JOIN `\" . self::T_AB . \"` ON ( `\" . self::T_AB . \"`.`\" . self::F_ABID . \"` = `\" . self::T_ABCOMPANIES . \"`.`\" . self::F_ABID . \"` )\" );\n\n\t\tif ( $res && _db_rowcount( $res ) )\n\t\t\twhile ( $row = _db_fetchrow ( $res ) )\n\t\t\t{\n\t\t\t\t$rc = new AbOrg( $row[self::F_ABUID] );\n\t\t\t\t$rc->updateSearchIndex( $row[self::F_ABID] );\n\t\t\t}\n\n\t\t_db_query( 'COMMIT' );\n\t}", "protected function _rebuildIndex()\n {\n $indexedColumns = array_keys($this->_indexColumns);\n foreach ($indexedColumns as $columnIndexToRebuild) {\n $this->_rebuildIndexOfColumn($columnIndexToRebuild);\n }\n $this->_indexIsDirty = false;\n }", "public function createIndexes() {\n\t\t// add the indexes\n\t\tforeach ($this->indexes as $column) {\n\t\t\t$this->addIndex($column);\n\t\t}\n\t}", "function Overview() {\r\n header('Content-type: text/html');\r\n echo \"<html><head><title>GenerateIndex v20161130</title><style>#error-div {width:100%;height:300px;border:3px solid red; position:absolute;top:0px;background-color:rgb(200,200,200)}</style></head><body>\";\r\n try{\r\n set_time_limit(MAX_TIME_LIMIT); \r\n include(\"Config.php\");\r\n \r\n //post or get?\r\n $repoId = 'generic';\r\n $this->comm = $_GET;\r\n if( isset($this->comm['repo']) ) {\r\n $repoId = $this->comm['repo'];\r\n $this->logger = new Logger($this->loglevel, $repoId, true);\r\n } else {\r\n throw new Exception('Generate index called without repo identifier');\r\n }\r\n\r\n $doTest=false;\r\n if( isset($this->comm['test']) ) {\r\n $doTest = ($this->comm['test']=='true');\r\n echo '<p>Working in test mode, the index is not adapted!</p>';\r\n }\r\n\r\n \r\n $comps = array();\r\n $repo = Config::getRepoConfig($repoId);\r\n if(!$repo) {\r\n throw new Exception(\"Generate Index called with unknown repository $repoId\");\r\n }\r\n $paths = $repo['paths'];\r\n\r\n for($kk=0; $kk<count($paths); $kk++) {\r\n echo \"<p>Searching for components in folder \".$paths[$kk].\": </p><ul>\";\r\n $cc=$this->findComponents($repo['basePath'], $paths[$kk], 0);\r\n echo \"</ul>\";\r\n $comps = array_merge($comps, $cc);\r\n }\r\n $this->createComponentsFile($comps, $repo);\r\n $this->removeIndexFiles($comps);\r\n foreach($comps as $cc) {\r\n //$this->addIdToItem($cc, $repo);\r\n $this->generateComponentIndex($cc, $repo);\r\n } \r\n \r\n if(!$doTest){\r\n $this->commitChanges($comps, $repo);\r\n }\r\n \r\n echo \"<h1>Success</h1></body></html>\";\r\n} catch(Exception $e) {\r\n echo \"<div id='error-div'><h1>Failed</h1><p>A problem occurred while scanning the content. Please resolve this problem and retry.</p></p>\".$e->getMessage().\"</div></body></html>\";\r\n $this->logger->trace(LEVEL_ERROR, $e->getMessage());\r\n} \r\n }", "public function testEnsureIndexesCreateJobStatusFalse()\n {\n $jobData = array(\n 'storeName' => 'tripod_php_testing',\n 'tripodConfig' => \\Tripod\\Config::getConfig(),\n 'reindex' => false,\n 'background' => true\n );\n\n $job = $this->getMockBuilder('\\Tripod\\Mongo\\Jobs\\EnsureIndexes')\n ->setMethods(array('warningLog', 'enqueue', 'getJobStatus'))\n ->getMock();\n\n // both of these methods will be called 6 times because after the first attempt fails it will\n // retry 5 times.\n $job->expects($this->exactly(6))->method(\"enqueue\")->will($this->returnValue(\"sometoken\"));\n $job->expects($this->exactly(6))->method(\"getJobStatus\")->will($this->returnValue(false));\n\n // expect 5 retries. Catch this with call to warning log\n $job->expects($this->exactly(5))->method(\"warningLog\");\n $this->setExpectedException('\\Tripod\\Exceptions\\JobException', 'Exception queuing job - Could not retrieve status for queued job - job sometoken failed to tripod::ensureindexes');\n $job->createJob('tripod_php_testing', false, true);\n }", "public function indexonprocess()\n\t{\n\t}", "public function index(Indexer $indexer): void;", "public function run()\n {\n $companies = [\n \t[\n 'id' => 1,\n 'name' => 'Manila-Oslo Renewable Enterprise, Inc.', \n 'abbreviation' => 'MORE',\n 'desc' => 'Manila-Oslo Renewable Enterprise, Inc.'\n ],\n \t[\n 'id' => 2,\n 'name' => 'SN Aboitiz Power-Generation, Inc.', \n 'abbreviation' => 'SNAPG',\n 'desc' => 'SN Aboitiz Power-Generation, Inc.'\n ],\n \t[\n 'id' => 3,\n 'name' => 'SN Aboitiz Power-Magat, Inc.', \n 'abbreviation' => 'SNAPM',\n 'desc' => 'SN Aboitiz Power-Magat, Inc.'\n ],\n \t[\n 'id' => 4,\n 'name' => 'SN Aboitiz Power-Benguet, Inc.', \n 'abbreviation' => 'SNAPB',\n 'desc' => 'SN Aboitiz Power-Benguet, Inc.'\n ],\n ];\n\n /* Loop and create companies */\n foreach ($companies as $key => $company) {\n\t Company::create([\n\t \t'name' => $company['name'],\n\t \t'abbreviation' => $company['abbreviation'],\n 'description' => $company['desc'],\n\n\t \t'creator_id' => 1,\n\t \t'updater_id' => 1,\n\t ]);\n }\n\n\n\n /* Add to scout index */\n Company::get()->searchable();\n }", "protected function ensureIndex($ns, $set, $bin, $index_name, $index_type) {\n if ($this->annotate) display_code(__FILE__, __LINE__, 9);\n $status = $this->client->info(\"sindex/$ns/$index_name\", $response, $this->config);\n if ($status !== Aerospike::OK) {\n $status = $this->client->createIndex($ns, $set, $bin, $index_type, $index_name);\n return ($status === Aerospike::OK);\n } else if (strrpos($response, 'NO INDEX') !== false) {\n $status = $this->client->createIndex($ns, $set, $bin, $index_type, $index_name);\n return ($status === Aerospike::OK);\n }\n return true;\n }", "public function bulkIndex($params)\n {\n if (!empty($params[\"body\"])) {\n $this->elasticsearch->bulk($params);\n }\n }", "public function testCreateIndex()\n {\n $result = $this->collectionHandler->createIndex(\n 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, [\n 'type' => 'hash',\n 'name' => 'mr-hash',\n 'fields' => ['a', 'b'],\n 'unique' => true,\n 'sparse' => true,\n 'inBackground' => true\n ]\n ); \n \n $indices = $this->collectionHandler->getIndexes('ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp);\n\n $indicesByIdentifiers = $indices['identifiers'];\n\n static::assertArrayHasKey($result['id'], $indicesByIdentifiers);\n\n $indexInfo = $indicesByIdentifiers[$result['id']];\n\n static::assertEquals('hash', $indexInfo[CollectionHandler::OPTION_TYPE]);\n static::assertEquals(['a', 'b'], $indexInfo['fields']);\n static::assertTrue($indexInfo['unique']);\n static::assertTrue($indexInfo['sparse']);\n static::assertEquals('mr-hash', $indexInfo['name']);\n }", "public function dropIndexes(): void;", "public function run()\n {\n $indexing = [\n 0 => [\n 'slug' => 'backend',\n 'id' => null,\n 'type' => null,\n ],\n 1 => [\n 'slug' => 'admin',\n 'id' => null,\n 'type' => null,\n ],\n 2 => [\n 'slug' => 'login',\n 'id' => null,\n 'type' => null,\n ],\n 3 => [\n 'slug' => 'sign-in',\n 'id' => null,\n 'type' => null,\n ],\n 4 => [\n 'slug' => 'register',\n 'id' => null,\n 'type' => null,\n ],\n 5 => [\n 'slug' => 'sign-up',\n 'id' => null,\n 'type' => null,\n ],\n 6 => [\n 'slug' => 'forgot-password',\n 'id' => null,\n 'type' => null,\n ],\n 7 => [\n 'slug' => 'reset-password',\n 'id' => null,\n 'type' => null,\n ],\n 8 => [\n 'slug' => 'maintenance',\n 'id' => null,\n 'type' => null,\n ],\n 9 => [\n 'slug' => 'feed',\n 'id' => null,\n 'type' => null,\n ],\n 10 => [\n 'slug' => 'landing',\n 'id' => null,\n 'type' => null,\n ],\n 11 => [\n 'slug' => 'search',\n 'id' => null,\n 'type' => null,\n ],\n 12 => [\n 'slug' => 'page',\n 'id' => null,\n 'type' => null,\n ],\n 13 => [\n 'slug' => 'section',\n 'id' => null,\n 'type' => null,\n ],\n 14 => [\n 'slug' => 'category',\n 'id' => null,\n 'type' => null,\n ],\n 15 => [\n 'slug' => 'post',\n 'id' => null,\n 'type' => null,\n ],\n 16 => [\n 'slug' => 'catalog',\n 'id' => null,\n 'type' => null,\n ],\n 17 => [\n 'slug' => 'gallery',\n 'id' => null,\n 'type' => null,\n ],\n // 18 => [\n // 'slug' => 'album',\n // 'id' => null,\n // 'type' => null,\n // ],\n // 19 => [\n // 'slug' => 'playlist',\n // 'id' => null,\n // 'type' => null,\n // ],\n 20 => [\n 'slug' => 'link',\n 'id' => null,\n 'type' => null,\n ],\n 21 => [\n 'slug' => 'inquiry',\n 'id' => null,\n 'type' => null,\n ],\n 22 => [\n 'slug' => config('custom.language.default'),\n 'id' => null,\n 'type' => null,\n ],\n 23 => [\n 'slug' => 'organisasi',\n 'id' => null,\n 'type' => null,\n ],\n 24 => [\n 'slug' => 'dokumen',\n 'id' => null,\n 'type' => null,\n ],\n 25 => [\n 'slug' => 'kontak',\n 'id' => 1,\n 'type' => 'App\\Models\\Inquiry\\Inquiry',\n ],\n ];\n\n foreach ($indexing as $value) {\n \n IndexUrl::create([\n 'slug' => $value['slug'],\n 'urlable_id' => $value['id'],\n 'urlable_type' => $value['type'],\n ]);\n }\n }", "public function actionSync()\n {\n // Use a custom index manager if defined ( esp if it's got it's own $defaultModelPaths )\n if (\\Yii::$app->has('indexManager')) {\n $indexManager = \\Yii::$app->indexManager;\n if (!method_exists($indexManager, 'buildModelClassList')) {\n $indexManager = null;\n }\n }\n $indexManager = $indexManager ?? \\Yii::createObject('mozzler\\base\\components\\IndexManager');\n\n // Find all the models\n $models = $indexManager->buildModelClassList($this->modelPaths);\n\n foreach ($models as $className) {\n $indexManager->logs = [];\n\n $this->stdout('Processing model: ' . $className . \"\\n\", Console::FG_GREEN);\n\n $indexManager->syncModelIndexes($className);\n $this->outputLogs($indexManager->logs);\n }\n\n return ExitCode::OK;\n }", "public function resetItemIndexes()\n {\n $users = $this->User->getAll();\n foreach($users as $user)\n {\n $items = $this->Item->getOwnedByUser($user, 999999);\n foreach($items as $item)\n {\n $this->Item->save($item);\n }\n }\n\n require_once BASE_PATH.'/core/controllers/components/SearchComponent.php';\n $component = new SearchComponent();\n $index = $component->getLuceneItemIndex();\n\n $index->optimize();\n }", "public function safeUp()\n\t{\n\t\tif (craft()->db->tableExists('locales'))\n\t\t{\n\t\t\tCraft::log('Adding index to sortOrder column of the locales table.', LogLevel::Info, true);\n\t\t\t$this->createIndex('locales', 'sortOrder');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Tried to add index to sortOrder column of the locales table, but it does not exist. Wut?', LogLevel::Error);\n\t\t}\n\n\t\tif (craft()->db->tableExists('fields'))\n\t\t{\n\t\t\tCraft::log('Adding index to context column of the fields table.', LogLevel::Info, true);\n\t\t\t$this->createIndex('fields', 'context');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Tried to add index to context column of the fields table, but it does not exist. Wut?', LogLevel::Error);\n\t\t}\n\n\t\treturn true;\n\t}", "function add_clean_index($table, $index)\n{\n}", "public function create()\n {\n // we do not need this because we are creating in the index itself\n }", "public function reindexAllAction()\n {\n\n }", "function testCreateIndex(){\r\n global $webUrl;\r\n global $lang, $SERVER, $DATABASE;\r\n \r\n // Go to the Indexes page\r\n\t\t$this->assertTrue($this->get(\"$webUrl/indexes.php\", array(\r\n\t\t\t'server' => $SERVER,\r\n\t\t\t'action' => 'create_index',\r\n\t\t\t'database' => $DATABASE,\r\n\t\t\t'schema' => 'public',\r\n\t\t\t'table' => 'student'))\r\n\t\t);\r\n \r\n // Set properties for the new index \r\n $this->assertTrue($this->setField('formIndexName', 'stu_name_idx'));\r\n $this->assertTrue($this->setField('TableColumnList', array('name')));\r\n $this->assertTrue($this->setField('IndexColumnList[]', 'name')); \r\n $this->assertTrue($this->setField('formIndexType', 'BTREE')); \r\n $this->assertTrue($this->setField('formUnique', FALSE));\r\n $this->assertTrue($this->setField('formSpc', 'pg_default')); \r\n \r\n $this->assertTrue($this->clickSubmit($lang['strcreate']));\r\n \r\n // Verify if the index is created correctly.\r\n $this->assertTrue($this->assertWantedText($lang['strindexcreated']));\r\n \r\n return TRUE; \r\n }", "public function purgeIndex();", "public function execute()\n {\n $this->_metadata->setInProgressStatus()->save();\n\n // Let the index process all data\n $this->_indexer->reindexAll();\n\n if ($this->_metadata->getStatus() == Enterprise_Mview_Model_Metadata::STATUS_IN_PROGRESS) {\n $this->_metadata->setValidStatus()->save();\n }\n\n return $this;\n }", "static function post(){\n\t\t\tcheck_admin_referer('searchcn_update_options') ;\n\n\t\t\tif ($_POST['reindex_all_sites']) {\n\t\t\t\tnew BatchIndexer() ;\n\t\t\t}\n\t\t\tupdate_site_option('searchcn_indexer_url', $_POST['indexer_url']) ;\n\t\t\tself::index();\n\t\t}", "function deleteIndex()\n {\n $delete = new rex_sql();\n $delete->setTable($this->tablePrefix.'587_searchindex');\n $delete->delete();\n \n $this->deleteCache();\n }", "public function restructure()\n {\n //First clean up existing data by deleting index\n $url = 'http://' . $this->getConfig('elastic')->get(APPLICATION_ENV) . '/' . APPLICATION_ENV . '-'\n . 'creators/';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n curl_exec($ch);\n curl_close($ch);\n\n //Now recreate index\n $ch = curl_init($url);\n $data\n = '{\n \"aliases\":{\n },\n \"mappings\":{\n \"accounts\":{\n \"properties\":{\n \"id_factor_network\":{\n \"type\":\"string\"\n },\n \"alias\":{\n \"type\":\"string\"\n },\n \"followers\":{\n \"type\":\"string\"\n },\n \"name\":{\n \"type\":\"string\"\n },\n \"network\":{\n \"type\":\"string\"\n },\n \"photo\":{\n \"type\":\"string\"\n },\n \"price\":{\n \"type\":\"double\"\n },\n \"segmentation_age\":{\n \"type\":\"string\"\n },\n \"segmentation_gender\":{\n \"type\":\"string\"\n },\n \"segmentation_income\":{\n \"type\":\"string\"\n },\n \"segmentation_interests\":{\n \"type\":\"string\"\n },\n \"segmentation_language\":{\n \"type\":\"string\"\n },\n \"segmentation_family\":{\n \"type\":\"string\"\n },\n \"segmentation_civil_state\":{\n \"type\":\"string\"\n },\n \"tags\":{\n \"type\":\"string\"\n },\n \"bio\":{\n \"type\":\"string\"\n }\n }\n }\n },\n \"settings\":{\n \"index\":{\n \"number_of_shards\":\"5\",\n \"number_of_replicas\":\"1\"\n }\n },\n \"warmers\":{\n }\n }';\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_exec($ch);\n curl_close($ch);\n }", "function createOrUpdateIndexStructures() ;", "abstract protected function _prepareIndex($entityIds = null, $attributeId = null);", "public function actionIndexAll($purgeBefore = false)\n {\n foreach ($this->module->models as $model) {\n $this->run('index-model', [$model, $purgeBefore]);\n $this->stdout(\"\\n\");\n }\n }", "protected function initIndexes() {\r\n \r\n include_once 'creole/metadata/IndexInfo.php'; \r\n\r\n // columns have to be loaded first\r\n if (!$this->colsLoaded) $this->initColumns(); \r\n\r\n $sql = 'PRAGMA index_list('.$this->name.')';\r\n $res = sqlite_query($this->conn->getResource(), $sql);\r\n \r\n while($row = sqlite_fetch_array($res, SQLITE_ASSOC)) { \r\n $name = $row['name'];\r\n $this->indexes[$name] = new IndexInfo($name);\r\n \r\n // get columns for that index\r\n $res2 = sqlite_query($this->conn->getResource(), 'PRAGMA index_info('.$name.')');\r\n while($row2 = sqlite_fetch_array($res2, SQLITE_ASSOC)) {\r\n $colname = $row2['name'];\r\n $this->indexes[$name]->addColumn($this->columns[ $colname ]);\r\n }\r\n } \r\n \r\n $this->indexesLoaded = true;\r\n }", "public function set_indexes($sql = \"CREATE INDEX %s ON %s (%s)\")\n {\n $dbh = $this->getdbh();\n \n foreach ($this->idx as $idx_data) {\n // Create name\n $idx_name = $this->get_index_name($idx_data);\n $this->exec(sprintf($sql, $idx_name, $this->enquote($this->tablename), join(',', $idx_data)));\n }\n \n }" ]
[ "0.7329709", "0.6914656", "0.6716275", "0.65391535", "0.64643335", "0.6451751", "0.6418415", "0.6404797", "0.6367451", "0.6361012", "0.6303565", "0.62668496", "0.62599045", "0.61926776", "0.61322784", "0.6123085", "0.61051285", "0.6083867", "0.6068649", "0.60152316", "0.60102516", "0.60041124", "0.5995572", "0.59718925", "0.59606904", "0.59336925", "0.59135836", "0.5906242", "0.5886634", "0.5884586", "0.5879935", "0.58784693", "0.5876681", "0.5854226", "0.5854226", "0.5854226", "0.5854226", "0.5843173", "0.5830094", "0.5829181", "0.5815712", "0.5814581", "0.5805247", "0.5801826", "0.5798381", "0.57766324", "0.57741046", "0.57708985", "0.5757991", "0.5750996", "0.57509005", "0.5749693", "0.5748518", "0.57216704", "0.57171845", "0.56871206", "0.568505", "0.5684292", "0.565561", "0.56524223", "0.5645393", "0.56304866", "0.5628325", "0.5625822", "0.56133896", "0.56027204", "0.5597217", "0.5589026", "0.5573245", "0.55619115", "0.5560545", "0.55593216", "0.55400753", "0.55307037", "0.5508563", "0.5506518", "0.5502524", "0.54676425", "0.5466222", "0.5455452", "0.54528195", "0.5452731", "0.54432976", "0.5432906", "0.5428236", "0.54231495", "0.5422793", "0.54119706", "0.540854", "0.53790647", "0.5374931", "0.5374004", "0.537094", "0.5369687", "0.53641903", "0.5363048", "0.5360901", "0.5344455", "0.53431606", "0.5326398" ]
0.79790497
0
Delete calendar from CalendarsGrid
Удалить календарь из CalendarsGrid
public function calendarsGridDelete(){ // Get record $record = model('CalendarModel')->get(Input::postInt('id')); if(!$record){ output_json_encode(array( 'success' => false, 'message' => 'Record bestaat niet (meer)' )); } // Delete record model('CalendarModel')->delete($record['id']); output_json_encode(array( 'success' => true )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete() {\n\t\t\ttry {\n\t\t\t\tDB::beginWork('Deleting calendar @ ' . __CLASS__);\n\n\t\t\t\tparent::delete();\n\n\t\t\t\t$calendar_events = CalendarEvents::findByCalendar($this->object, STATE_TRASHED);\n\t\t\t\tif (is_foreachable($calendar_events)) {\n\t\t\t\t\tforeach ($calendar_events as $calendar_event) {\n\t\t\t\t\t\tif ($calendar_event instanceof CalendarEvent) {\n\t\t\t\t\t\t\t$calendar_event->state()->delete();\n\t\t\t\t\t\t} // if\n\t\t\t\t\t} // foreach\n\t\t\t\t} // if\n\n\t\t\t\tDB::commit('Calendar deleted @ ' . __CLASS__);\n\t\t\t} catch(Exception $e) {\n\t\t\t\tDB::rollback('Failed to delete calendar @ ' . __CLASS__);\n\n\t\t\t\tthrow $e;\n\t\t\t} // try\n\t\t}", "public function deleteCalendar($cal_id) {\r\n\t\t$this->ilRoomSharingDatabaseCalender->deleteCalendar($cal_id);\r\n\t}", "public function drawDeleteCalendar(&$calendar) {\n\t\t$page = $this->cObj->fileResource ($this->conf ['view.'] ['delete_calendar.'] ['template']);\n\t\tif ($page == '') {\n\t\t\treturn '<h3>calendar: no confirm calendar template file found:</h3>' . $this->conf ['view.'] ['delete_calendar.'] ['template'];\n\t\t}\n\t\t\n\t\t$this->object = $calendar;\n\t\t\n\t\tif (! $this->object->isUserAllowedToDelete ()) {\n\t\t\treturn 'You are not allowed to delete this calendar!';\n\t\t}\n\t\t\n\t\t$rems = Array ();\n\t\t$sims = Array ();\n\t\t$wrapped = Array ();\n\t\t\n\t\t$sims ['###UID###'] = $this->conf ['uid'];\n\t\t$sims ['###TYPE###'] = $this->conf ['type'];\n\t\t$sims ['###VIEW###'] = 'save_event';\n\t\t$sims ['###LASTVIEW###'] = $this->controller->extendLastView ();\n\t\t$sims ['###L_DELETE_CALENDAR###'] = $this->controller->pi_getLL ('l_delete_calendar');\n\t\t$sims ['###L_DELETE###'] = $this->controller->pi_getLL ('l_delete');\n\t\t$sims ['###L_CANCEL###'] = $this->controller->pi_getLL ('l_cancel');\n\t\t$sims ['###ACTION_URL###'] = htmlspecialchars ($this->controller->pi_linkTP_keepPIvars_url (array (\n\t\t\t\t'view' => 'remove_calendar' \n\t\t)));\n\t\t$this->getTemplateSubpartMarker ($page, $sims, $rems, $wrapped);\n\t\t$page = \\TYPO3\\CMS\\Cal\\Utility\\Functions::substituteMarkerArrayNotCached ($page, Array (), $rems, $wrapped);\n\t\t$page = \\TYPO3\\CMS\\Cal\\Utility\\Functions::substituteMarkerArrayNotCached ($page, $sims, Array (), Array ());\n\t\t$sims = Array ();\n\t\t$rems = Array ();\n\t\t$wrapped = Array ();\n\t\t$this->getTemplateSingleMarker ($page, $sims, $rems, $wrapped);\n\t\t$page = \\TYPO3\\CMS\\Cal\\Utility\\Functions::substituteMarkerArrayNotCached ($page, Array (), $rems, $wrapped);\n\t\t$page = \\TYPO3\\CMS\\Cal\\Utility\\Functions::substituteMarkerArrayNotCached ($page, $sims, Array (), Array ());\n\t\treturn \\TYPO3\\CMS\\Cal\\Utility\\Functions::substituteMarkerArrayNotCached ($page, $sims, Array (), Array ());\n\t}", "public function deleteEvent() {\n try {\n if (!($this->calendar instanceof Base_Model_ObtorLib_App_Core_System_Entity_Calendar)) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception(\" System Calendar Entity not intialized\");\n } else {\n $objCalendar = new Base_Model_ObtorLib_App_Core_System_Dao_Calendar();\n $objCalendar->calendar = $this->calendar;\n return $objCalendar->deleteEvent();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception($ex);\n }\n }", "public function destroy(Calendar $calendar)\n {\n //\n }", "public function destroy(Calendar $calendar)\n {\n //\n }", "public function destroy()\n {\n return Calendar::getQuery()->delete();\n }", "public function destroy(Calendar $calendar)\n {\n try {\n $calendar = Calendar::findOrFail($calendar->id);\n $calendar->delete();\n \n $data = [\n 'calendar' => $calendar,\n 'staff_name' => Auth::user()->name,\n 'subject' => '【EPARK人間ドック】カレンダー登録・更新・削除のお知らせ',\n 'processing' => '削除'\n ];\n//  Mail::to(config('mail.to.system'))->send(new CalendarSettingNotificationMail($data));\n\n return redirect('calendar')->with('error', trans('messages.deleted', ['name' => trans('messages.names.calendar')]));\n } catch (StaleModelLockingException $e) {\n Session::flash('error', trans('messages.model_changed_error'));\n return redirect()->back();\n } catch (\\Exception $e) {\n Session::flash('error', trans('messages.update_error'));\n return redirect('calendar');\n }\n }", "public function delete($calendar_id) {\n\t\t$this->db->where('calendar_id', $calendar_id);\n\t\t$this->db->delete('calendar');\n\t\tif(($deleted_items = $this->db->affected_rows()) === 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Delete the calendar's events.\n\t\t$this->db->where('event_calendar_id', $calendar_id);\n\t\t$this->db->delete('calendar_event');\n\t\t\t\t\n\t\t// Write the flash message.\n\t\t$this->session->set_flashdata('admin/message', 'Calendar & associated Events deleted');\n\t\treturn $deleted_items;\n\t}", "function deleteCalendar($calendarId) {\n\n foreach ($this->calendars as $k => $calendar) {\n if ($calendar['id'] === $calendarId) {\n unset($this->calendars[$k]);\n }\n }\n\n }", "public function deleteEvent ($id){\n $deleteEvent = SimpleCalendar::find($id);\n $deleteEvent->delete();\n return redirect()->to('/calendar');\n}", "function delete_calendar($module_key,$space_key,$link_key,$delete_action) \r\n{\r\n\tglobal $CONN, $CONFIG;\r\n\r\n\tif ($delete_action=='all' || $delete_action=='last') {\r\n\t\t$sql = \"DELETE FROM {$CONFIG['DB_PREFIX']}calendars WHERE module_key='$module_key'\";\r\n\t\t$CONN->Execute($sql);\r\n\t\t$rows_affected = $CONN->Affected_Rows();\r\n\t\tif ($rows_affected < '1') {\t\r\n\t\t\t$message = \"There was an problem deleting a $module_code link during a module link deletion module_key=$module_key\".$CONN->ErrorMsg();\r\n\t\t\temail_error($message);\r\n\t\t\treturn $message;\r\n\t\t} else { \r\n\t\t\t$sql=\"DELETE FROM {$CONFIG['DB_PREFIX']}calendar_events WHERE module_key='$module_key'\";\r\n\t\t\tif ($CONN->Execute($sql) === false) { \r\n\t\t\t\t$message = 'There was an error deleting calendar events - '.$CONN->ErrorMsg();\r\n\t\t\t\temail_error($message);\r\n\t\t\t\treturn $message;\r\n\t\t\t} else {\t\r\n\t\t\t\t$sql=\"DELETE FROM {$CONFIG['DB_PREFIX']}event_types WHERE parent='$module_key'\";\r\n\t\t\t\tif ($CONN->Execute($sql) === false) { \r\n\t\t\t\t\t$message = 'There was an error deleting event types - '.$CONN->ErrorMsg();\r\n\t\t\t\t\temail_error($message);\r\n\t\t\t\t\treturn $message;\r\n\t\t\t\t} else {\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\t\r\n\t\treturn true;\r\n\t}\r\n}", "function deleteCalendar($calendarId, $save = FALSE) {\n\n if (!$save) {\n // display confirm dialog first\n $calInfo = $this->calendarObj->loadCalendar($calendarId);\n if (!$calInfo) {\n $this->_showError('Invalid Calendar!');\n return;\n }\n $hidden = array(\n 'cmd' => 'delete_calendar',\n 'calendar' => $calendarId,\n 'save' => 1,\n );\n $message = $this->_gtf(\n 'Delete Calendar \"%s\" and all of its Events?', $calInfo['title']);\n $type = 'question';\n $dialog =\n new base_msgdialog($this->module, $this->paramName, $hidden, $message, $type);\n $dialog->baseLink = $this->getBaseLink();\n $dialog->buttonTitle = 'Delete';\n\n $this->layout->add($dialog->getMsgDialog());\n $this->editCalendar($calendarId);\n return;\n }\n\n // really delete calendar\n if ($this->calendarObj->deleteCalendar($calendarId)) {\n $type = 'info';\n $message = $this->_gt('Calendar Deleted!');\n } else {\n $type = 'error';\n $message = $this->_gt('Database Error!');\n }\n\n $hidden = array();\n\n $msgdialog =\n new base_msgdialog($this->module, $this->paramName, $hidden, $message, $type);\n $msgdialog->buttonTitle = 'OK';\n $msgdialog->baseLink = $this->getBaseLink();\n\n $this->module->layout->add($msgdialog->getMsgDialog());\n $this->showDefaultScreen();\n }", "public function deleteCalendar($calendarId) {\n\n throw new Exception('Not implemented');\n\n }", "public function actionDeleteOccurrence()\n {\n $this->requirePostRequest();\n $this->requireAjaxRequest();\n\n $eventId = craft()->request->getPost('eventId');\n $date = craft()->request->getPost('date');\n\n /** @var Calendar_EventModel $event */\n $event = craft()->calendar_events->getEventById($eventId);\n\n if (!$event) {\n $this->returnErrorJson(Craft::t('Event could not be found'));\n }\n\n PermissionsHelper::requireEventEditPermissions($event);\n\n $date = DateTimeUTC::createFromString($date);\n $date->setTime(0, 0, 0);\n\n if ($event->repeatsOnSelectDates()) {\n craft()->calendar_selectDates->removeDate($event, $date);\n } else {\n craft()->calendar_exceptions->saveException($event, $date);\n }\n\n\n $this->returnJson('success');\n }", "public function delete($calificacion){\n $idCalificacion=$calificacion->getIdCalificacion();\n\n try {\n $sql =\"DELETE FROM `calificacion` WHERE `idCalificacion`='$idCalificacion'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "function delete_get_calendar_cache()\n{\n}", "public function confirm_delete() {\n $user = $this->get_user_or_redirect();\n \n if(!$user->check_owned_calendar($_POST['idcalendar']))\n throw new Exception(\"Current user does not own this calendar!\");\n \n if (isset($_POST[\"idcalendar\"])) \n {\n $idcalendar = $_POST[\"idcalendar\"];\n if(isset($_POST[\"cancel\"]))\n {\n if ($user->check_owned_calendar($idcalendar)) // vérifie l'utilisateur courant\n $this->redirect(\"calendar\",\"my_calendars\");\n }\n else\n {\n $calendar = Calendar::get_calendar($idcalendar);\n if(isset($_POST[\"confirm\"]) || !$calendar->hasEvents())\n {\n if ($user->check_owned_calendar($idcalendar)) // vérifie l'utilisateur courant\n {\n $calendar->delete();\n $this->redirect(\"calendar\",\"my_calendars\");\n }\n } \n }\n \n (new View(\"confirm_calendar_delete\"))->show(array(\"idcalendar\" => $idcalendar));\n }\n else \n throw new Exception(\"Missing Calendar ID\");\n }", "function deleteCalendar($accountId, $calendarId){\n if (hasCalendarPermission($accountId, $calendarId, 'delete')){\n\n global $conn;\n\n echo \"<br> ******* Deleting Calendar with CalendarId = \" . $calendarId . \" ******* <br>\";\n\n $query = \"DELETE FROM Calendars WHERE calendarId = $calendarId\";\n echo(\"RESULTING QUERY: \" . $query);\n mysqli_query($conn, $query);\n\n return checkUpdateSuccess($conn, $query);\n }\n else{\n echo \"<br> !!!!!! COULD NOT Delete Calendar with CalendarId = \" . $calendarId . \" !!!!!! <br>\";\n return false;\n }\n}", "public function destroy(Calendar $calendar)\n {\n return $this->locationRepository->delete($calendar);\n }", "function delete() {\n\n $this->caldavBackend->deleteSchedulingObject($this->objectData['principaluri'], $this->objectData['uri']);\n\n }", "public function calendar_delete($uid)\n {\n $this->_registry->calendar->delete($uid);\n }", "public function deleteSchedule(){\n $sql = \"DELETE FROM booking_table WHERE doctor_id = '$this->id' AND booking_date = '$this->s_date' AND booking_day = '$this->s_day' \";\n $query = $this->DBH->prepare($sql);\n $result = $query->execute();\n\n if ($result){\n Message::message(\"Doctor Schedule Deleted Successfully !\");\n }else{\n Message::message(\"Doctor Schedule Delete Fail !\");\n }\n Utility::redirect(\"index.php\");\n }", "public function actionDelete($id)\n {\n if (!$this->canManageCalendar()) {\n throw new HttpException(403, Yii::t('CalendarExtensionModule.base', 'You are not allowed to show External Calendar!'));\n }\n\n// $this->findModel($id)->delete();\n\n $model = CalendarExtensionCalendar::find()->contentContainer($this->contentContainer)->where(['calendar_extension_calendar.id' => $id])->one();\n\n if ($model === null) {\n throw new HttpException(404, Yii::t('base', 'Page not found.'));\n }\n\n $model->delete();\n\n return $this->redirect($this->contentContainer->createUrl('index'));\n }", "public function destroy(calificacion $calificacion)\n {\n //\n }", "function autofunctions_calendar($last_cron) {\r\n\tglobal $CONN, $CONFIG;\r\n\t\r\n\t$CONN->Execute(\"DELETE from {$CONFIG['DB_PREFIX']}calendar_events WHERE remove_date < CURDATE() AND remove_date > '0'\");\r\n\t\t\r\n\treturn true;\r\n\r\n}", "function deleteCalendarObject($calendarId,$objectUri) {\n\n throw new Exception('Not implemented');\n\n\n }", "public function destroy(Calendar $calendar, CalendarEvent $calendarEvent)\n {\n //\n }", "public function delete_event()\n {\n $current_event = CalendarEvent::find(Input::get('id'));\n $current_event->delete();\n return 1;\n }", "public function destroy($id)\n {\n $calendar = Calendar::find($id);\n $calendar->delete();\n return redirect()->route('calendar.list')->with(\"success\",\"Xóa thành công\");\n }", "public function DeleteFlowchartGrid() {\n\t\t\t$this->objFlowchartGrid->Delete();\n\t\t}", "public function clear_events() {\n $this->check_session();\n\n $result = $this->Dashboard_model->delete_events_db();\n echo $result;\n }", "function deleteScheduling() {\n\t\t$db = PearDatabase::getInstance();\n\t\t$db->pquery('DELETE FROM vtiger_scheduled_reports WHERE reportid = ?', array($this->getId()));\n\t}", "function removeAccountFromCalendar($accId, $calendarId) {\n\tglobal $conn;\n\n\t$stmt = mysqli_prepare($conn, \"DELETE FROM Groups WHERE accId=? && calendarId=?;\");\n\tmysqli_stmt_bind_param($stmt, \"ii\", $accId, $calendarId);\n\tmysqli_stmt_execute($stmt);\n\n\t$affected_rows = mysqli_stmt_affected_rows($stmt);\n\n\tmysqli_stmt_close($stmt); // close statement\n\n\treturn $affected_rows > 0;\n}", "public function deleteAction()\n {\n $eventId = $this->getRequest()->getParam('containerRowId');\n \n // get form\n $form = $this->_model->getForm('delete');\n \n //set form action\n $form->setAction($this->view->url(\n array(\n 'action' => 'delete',\n 'containerId' => $this->_category->id,\n 'containerRowId' => $eventId,\n ),\n 'event'\n )); \n \n $this->processDelete(\n $form, \n $this->view->translate('msg_event_deleted'),\n $this->view->url(\n array(\n 'action' => 'index',\n 'containerId' => $this->_category->id),\n 'event'\n ),\n $eventId\n );\n }", "function delete_all_events(){\r\n global $course_id, $uid, $is_editor, $is_admin;\r\n if($is_admin || $is_editor){\r\n $resp = Database::get()->query(\"DELETE FROM agenda WHERE course_id = ?\", $course_id);\r\n if($resp){\r\n Log::record($course_id, MODULE_ID_AGENDA, LOG_DELETE, array('user_id' => $uid, 'course_id' => $course_id, 'id' => 'all'));\r\n return array('success'=>true,'message'=>'');\r\n } else {\r\n return array('success'=>false,'message'=>'Database error');\r\n }\r\n } else {\r\n return array('success'=>true,'message'=>$langNotAllowed);\r\n }\r\n }", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'agenda', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query_desc = $this->podb->deleteFrom('agenda_description')->where('id_agenda', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query_desc->execute();\n\t\t\t$query_pag = $this->podb->deleteFrom('agenda')->where('id_agenda', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query_pag->execute();\n\t\t\t$this->poflash->success($GLOBALS['_']['agenda_message_3'], 'admin.php?mod=agenda');\n\t\t}\n\t}", "public function eliminarCaldera()\n {\n $cald_id = $this->input->post('cald_id');\n $response = $this->Calderas->eliminarCaldera($cald_id);\n echo json_encode($response);\n }", "function _egwcalendarsync_delete($guid)\n{\n\t// Handle an arrray of GUIDs for convenience of deleting multiple\n\t// events at once.\n\t$state =& $_SESSION['SyncML.state'];\n\tif (is_array($guid))\n\t{\n\t\tforeach ($guid as $g) {\n\t\t\t$result = _egwcalendarsync_delete($g);\n\t\t\tif (is_a($result, 'PEAR_Error')) return $result;\n\t\t}\n\t\treturn true;\n\t}\n\n\n\tHorde::logMessage(\"SymcML: egwcalendarsync delete id: \".$state->get_egwId($guid),\n\t\t__FILE__, __LINE__, PEAR_LOG_DEBUG);\n\n\t$boCalendar = new calendar_boupdate();\n\t$_id = $state->get_egwId($guid);\n\t$parts = preg_split('/:/', $_id);\n\t$eventId = $parts[0];\n\t$recur_date = (isset($parts[1]) ? $parts[1] : 0);\n\t$user = $GLOBALS['egw_info']['user']['account_id'];\n\n\t// Check if the user has at least read access to the event\n\tif (!($event =& $boCalendar->read($eventId))) return false;\n\n\n\tif (!$boCalendar->check_perms(EGW_ACL_EDIT, $eventId)\n\t\t&& isset($event['participants'][$user]))\n\t{\n\t\tif ($recur_date && $event['recur_type'] != MCAL_RECUR_NONE) {\n\t\t\t$boCalendar->set_status($event, $user, $event['participants'][$user], $recur_date);\n\t\t} else {\n\t\t\t// user rejects the event by deleting it from his device\n\t\t\t$boCalendar->set_status($eventId, $user, 'R', $recur_date);\n\t\t}\n\t\treturn true;\n\t}\n\n\tif ($recur_date && $event['recur_type'] != MCAL_RECUR_NONE)\n\t{\n\t\t// Delete the pseudo exception by propagation\n\t\t$event['recur_exception'] = array_unique(array_merge($event['recur_exception'], array($recur_date)));\n\t\t$boCalendar->update($event, true);\n\t\treturn true;\n\n\t\t// Delete a \"status only\" exception of a recurring event\n\t\t$participants = $boCalendar->so->get_participants($event['id'], 0);\n\t\tforeach ($participants as &$participant)\n\t\t{\n\t\t\tif (isset($event['participants'][$participant['uid']]))\n\t\t\t{\n\t\t\t\t$participant['status'] = $event['participants'][$participant['uid']][0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Will be deleted from this recurrence\n\t\t\t\t$participant['status'] = 'G';\n\t\t\t}\n\t\t}\n\t\tforeach ($participants as $attendee)\n\t\t{\n\t\t\t// Set participant status back\n\t\t\t$boCalendar->set_status($event, $attendee['uid'], $attendee['status'], $recur_date);\n\t\t}\n\t\treturn true;\n\t}\n\n\treturn $boCalendar->delete($eventId);\n}", "public function calendar_modal_edit_remove()\r\n\t\t{\r\n\t\t\t$this->load->view($this->admin_views . \"edit_remove_single_slot\");\r\n\t\t}", "function user_delete_calendar($user_key, $deleted_user) {\r\n\r\n\tglobal $CONN, $CONFIG;\r\n\t\r\n\t$CONN->Execute(\"UPDATE {$CONFIG['DB_PREFIX']}CalenderEvents SET user_key='$deleted_user' WHERE user_key='$user_key'\");\r\n\t\t\r\n\treturn true;\r\n\r\n}", "public function markDeleted()\n\t{\n\t\t$oUser = Core_Entity::factory('User', 0)->getCurrent();\n\n\t\t$aCalendar_Caldavs = Core_Entity::factory('Calendar_Caldav')->getAllByActive(1);\n\t\tforeach ($aCalendar_Caldavs as $oCalendar_Caldav)\n\t\t{\n\t\t\t$oCalendar_Caldav_User = $oCalendar_Caldav->Calendar_Caldav_Users->getByUser_id($oUser->id);\n\n\t\t\tif (!is_null($oCalendar_Caldav_User)\n\t\t\t\t&& !is_null($oCalendar_Caldav_User->caldav_server)\n\t\t\t\t&& !is_null($oCalendar_Caldav_User->username)\n\t\t\t\t&& !is_null($oCalendar_Caldav_User->password)\n\t\t\t)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t$Calendar_Caldav_Controller = Calendar_Caldav_Controller::instance($oCalendar_Caldav->driver);\n\n\t\t\t\t\t$Calendar_Caldav_Controller\n\t\t\t\t\t\t->setUrl($oCalendar_Caldav_User->caldav_server)\n\t\t\t\t\t\t->setUsername($oCalendar_Caldav_User->username)\n\t\t\t\t\t\t->setPassword($oCalendar_Caldav_User->password)\n\t\t\t\t\t\t->setData($oCalendar_Caldav_User->data)\n\t\t\t\t\t\t->connect();\n\n\t\t\t\t\t$aCalendars = $Calendar_Caldav_Controller->findCalendars();\n\n\t\t\t\t\tif (count($aCalendars))\n\t\t\t\t\t{\n\t\t\t\t\t\t$Calendar_Caldav_Controller->setCalendar(array_shift($aCalendars));\n\n\t\t\t\t\t\t$oModule = Core_Entity::factory('Module')->getByPath('event');\n\n\t\t\t\t\t\t$sUid = $this->id . '_' . $oModule->id;\n\t\t\t\t\t\t$sUrl = $Calendar_Caldav_Controller->getCalendar() . $sUid . '.ics';\n\n\t\t\t\t\t\t$Calendar_Caldav_Controller->delete($sUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\tCore_Message::show($e->getMessage(), 'error');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn parent::markDeleted();\n\t}", "public function executeDelete()\n {\n if($this->hasRequestParameter('ids')){\n $events = EventPeer::retrieveByPKs(json_decode($this->getRequestParameter('ids')));\n\n foreach($events as $event){\n\t$event->delete();\n }\n //$this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Noticias borradas.\"));\n\n }elseif($this->hasRequestParameter('id')){\n $event = EventPeer::retrieveByPk($this->getRequestParameter('id'));\n $event->delete();\n //$this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Noticia borrada.\"));\n }\n\n $this->getUser()->setAttribute('id', null, 'tv_admin/event'); //delete mejor\n\n if($this->hasRequestParameter(\"cal\")){\n return $this->renderComponent('events', 'calendar');\n }else{\n return $this->renderComponent('events', 'array');\n }\n }", "public function delete()\n {\n if (preg_match($this->eventPattern, $this->event)) {\n $queryBuilder = getPDO()\n ->delete('events')\n ->where('pk_event = ?')\n ->setParameter(0, $this->event);\n $queryBuilder->execute();\n if (unlink(\"..\".$this->event)) {\n $this->success(\"delete\");\n } else {\n $this->duplicateText(\"delete\");\n }\n } else {\n $this->otherError();\n }\n }", "public function ___delete() {\n\t\tif ($this->isNew()) {\n\t\t\treturn true;\n\t\t}\n\n\t\ttry {\n\t\t\t$db = wire('database');\n\t\t\t$queryVars = [\n\t\t\t\t':id' => $this->getID()\n\t\t\t];\n\n\t\t\t$preparedQuery = 'DELETE FROM `' . MfCalendar::tableTimespans . '` WHERE `event_id`=:id;';\n\t\t\t$preparedQuery .= 'DELETE FROM `' . MfCalendar::tableEvents . '` WHERE `id`=:id;';\n\n\t\t\t$query = $db->prepare($preparedQuery);\n\t\t\t$query->closeCursor();\n\t\t\t$query->execute($queryVars);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function deleteCalendar($handle) {\n\n $url = \"https://www.google.com/calendar/feeds/default/owncalendars/full/$handle\";\n $ch = $this->curlDeleteHandle($url, true, array());\n\n $response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\n if($http_code==200) {\n return true;\n } else {\n return false;\n }\n }", "public function deleting(CylicCalendarEvent $user)\n {\n //\n }", "public function actionDelete()\n {\n $id = $_POST['id'];\n $ownerid = $_SESSION['ownerid'];\n $result = $this->rest()->getResponse('services/' . $id, 'delete',null,$ownerid);\n\n if ($result['code'] == 200) {\n $services = Yii::app()->cache->get($ownerid . '_myservices');\n if ($services) {\n foreach ($services as $servicekey => $servicevals) {\n if ($servicevals->serviceid == $id) {\n array_splice($services, $servicekey, 1);\n }\n }\n Yii::app()->cache->set($ownerid . '_myservices', $services, CACHETIME);\n }\n // dump($services);exit;\n\n $cache_myschedules = Yii::app()->cache->get($ownerid . '_myschedules');\n $schedules = array();\n if ($cache_myschedules === array() || $cache_myschedules) {\n foreach ($cache_myschedules as $cache_myschedules_vals) {\n if ($cache_myschedules_vals->serviceid == $id) {\n // $schedules = $cache_myschedules_vals;\n array_push($schedules, $cache_myschedules_vals);\n }\n }\n } else {\n $arr = array(\n 'ownerid' => $ownerid,\n 'lastupdatetime' => '0000-00-00 00:00:00'\n );\n\n $service_result = $this->rest()->getResponse('services/' . $id . '/schedules', 'get', $arr);\n if ($service_result['code'] == 200) {\n $schedules = json_decode($service_result['response'])->schedules;\n }\n }\n // dump($schedules);exit;\n if ($schedules) {\n\n foreach ($schedules as $schedulesvals) {\n\n $schedules_result = $this->rest()->getResponse('schedules/' . $schedulesvals->scheduleid, 'delete');\n\n // echo $schedules_result['code'];\n\n //api error-- can not delete schedule\n // if($schedules_result['code'] == 200){\n $myschedules = Yii::app()->cache->get($ownerid . '_myschedules');\n // dump($myschedules);exit;\n if ($myschedules) {\n foreach ($myschedules as $schedulekey => $scheduleval) {\n if ($schedulesvals->scheduleid == $scheduleval->scheduleid) {\n array_splice($myschedules, $schedulekey, 1);\n }\n }\n }\n\n Yii::app()->cache->set($ownerid . '_myschedules', $myschedules, CACHETIME);\n\n // dump($myschedules);exit;\n // echo 'ok';\n // }\n }\n }\n\n\n /*$sharedmembers_cache = Yii::app()->cache->get($id.'_sharedmembers');\n if($sharedmembers_cache === array() || $sharedmembers_cache){\n $sharedmembers = $sharedmembers_cache;\n }else{\n $lastupdatetime = '0000-00-00 00:00:00';\n $arr = array(\n 'ownerid'=>$ownerid,\n 'lastupdatetime'=>$lastupdatetime\n );\n $sharedmembers_result = $this->rest()->getResponse('services/'.$id.'/sharedmembers','get',$arr);\n if($sharedmembers_result['code'] == 200){\n $sharedmembers = json_decode($sharedmembers_result['response'])->sharedmembers;\n }else{\n $sharedmembers = array();\n }\n }\n\n if($sharedmembers){\n foreach($sharedmembers as $sharedmembersvals){\n $this->rest()->getResponse('services/'.$id.'/sharedmembers/'.$sharedmembersvals->memberid,'delete',NULL,$ownerid);\n }\n }\n\n\n\n if($sharedmembers_cache){\n Yii::app()->cache->delete($id.'_sharedmembers');\n }*/\n // success to delete the service\n echo 'ok';\n } else if ($result['code'] == 202) {\n //this service can’t be deleted\n // echo 'This activity can’t be deleted.';\n } else {\n // echo 'Busy network,try it later.';\n }\n }", "public function delete(){\n $id = $_POST['id'];\n\n Fullcalendarevento::destroy($id);\n }", "public function manage_events() {\r\n Eabi_Ipenelo_Calendar::service()->getStatic('models/Event', 'applyStatuses');\r\n if (isset($_GET['enable_links'])) {\r\n Eabi_Ipenelo_Calendar::set('show_link', 1);\r\n Eabi_Ipenelo_Calendar::addMessage($this->__->l('Thank you for your support!'));\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar'));\r\n die();\r\n }\r\n\r\n //handle delete\r\n if (isset($_GET['action'])) {\r\n switch ($_GET['action']) {\r\n case 'delete':\r\n $valid = true;\r\n if (!wp_verify_nonce($_GET['_wpnonce'], 'deleteEvent')) {\r\n $valid = false;\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Security check failed'));\r\n }\r\n $ids = explode(',', $_GET['ids']);\r\n\r\n if (count($ids) > 0 && $valid) {\r\n for ($i = 0; $i < count($ids); $i++) {\r\n $ids[$i] = (int) trim($ids[$i]);\r\n if ($ids[$i] == 0) {\r\n $valid = false;\r\n break;\r\n }\r\n }\r\n\r\n //perform the delete\r\n\r\n $deleteModel = Eabi_Ipenelo_Calendar::service()->get('models/Event');\r\n $deleteRegModel = Eabi_Ipenelo_Calendar::service()->get('models/Registrant');\r\n\r\n if ($valid) {\r\n//\t\t\t\t\t\t\techo \"delete from \".$deleteModel->getTableName().\" where id in (\".implode(',', $ids).\")\";\r\n $regRows = Eabi_Ipenelo_Calendar::service()->get('database')->query(\"delete from \" . $deleteRegModel->getTableName() . \" where event_id in (\" . implode(',', $ids) . \")\");\r\n $rows = Eabi_Ipenelo_Calendar::service()->get('database')->query(\"delete from \" . $deleteModel->getTableName() . \" where id in (\" . implode(',', $ids) . \")\");\r\n Eabi_Ipenelo_Calendar::addMessage($this->__->l('Number of registrants deleted:') . ' ' . $regRows);\r\n Eabi_Ipenelo_Calendar::addMessage($this->__->l('Number of events deleted:') . ' ' . $rows);\r\n } else {\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Security check failed'));\r\n }\r\n }\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar'));\r\n die();\r\n break;\r\n case 'updateStatus':\r\n $valid = true;\r\n if (!wp_verify_nonce($_GET['_wpnonce'], 'updateStatus')) {\r\n $valid = false;\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Security check failed'));\r\n }\r\n $ids = explode(',', $_GET['ids']);\r\n\r\n if (count($ids) > 0 && $valid) {\r\n for ($i = 0; $i < count($ids); $i++) {\r\n $ids[$i] = (int) trim($ids[$i]);\r\n if ($ids[$i] == 0) {\r\n $valid = false;\r\n break;\r\n }\r\n }\r\n\r\n //perform the delete\r\n\r\n $model = Eabi_Ipenelo_Calendar::service()->get('models/Event');\r\n\r\n $newStatus = $_GET['status'];\r\n $allowedStatuses = Eabi_Ipenelo_Calendar_Model_Event::toStatusArray();\r\n if (!isset($allowedStatuses[$newStatus])) {\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Invalid new status'));\r\n $valid = false;\r\n }\r\n\r\n if ($valid) {\r\n//\t\t\t\t\t\t\techo \"update \".$model->getTableName().\" set status = \".$newStatus.\" where id in (\".implode(',', $ids).\")\";\r\n//\t\t\t\t\t\t\tdie();\r\n $rows = Eabi_Ipenelo_Calendar::service()->get('database')->query(\"update \" . $model->getTableName() . \" set status = \" . $newStatus . \" where id in (\" . implode(',', $ids) . \")\");\r\n Eabi_Ipenelo_Calendar::addMessage($this->__->l('Number of events updated to new status:') . $rows);\r\n Eabi_Ipenelo_Calendar::addMessage($this->__->l('New status:') . ' ' . $allowedStatuses[$newStatus]);\r\n } else {\r\n Eabi_Ipenelo_Calendar::addError($this->__->l('Security check failed'));\r\n }\r\n }\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar'));\r\n die();\r\n break;\r\n }\r\n }\r\n\r\n\r\n $grid = Eabi_Ipenelo_Calendar::service()->get('grids/Event');\r\n\r\n\r\n echo $grid->render();\r\n\r\n return;\r\n }", "function churchcal_delAddition($params) {\n $db = db_query(\"SELECT cal_id FROM {cc_cal_add}\n WHERE id=:id\",\n array (\":id\" => $params[\"id\"]))\n ->fetch();\n\n if ($db == false) throw new CTException(t('manual.event.not.found', $params[\"id\"]));\n if (!churchcal_isAllowedToEditEvent($db->cal_id)) throw new CTNoPermission(\"AllowToEditEvent\", \"churchcal\");\n\n $i = new CTInterface();\n $i->setParam(\"id\");\n\n db_delete(\"cc_cal_add\")\n ->fields($i->getDBInsertArrayFromParams($params))\n ->condition(\"id\", $params[\"id\"], \"=\")\n ->execute(false);\n}", "public function deleteAction() {\r\n $announcement_id = (int) $this->_getParam('announcement_id');\r\n $event_id = $this->_getParam('event_id');\r\n Engine_Api::_()->getDbtable('announcements', 'siteevent')->delete(array('announcement_id = ?' => $announcement_id, 'event_id = ?' => $event_id));\r\n exit();\r\n }", "public function delete($cicle){\n\n //datos del ciclo\n $year=$cicle['Anualidad'];\n $month=$cicle['Mes'];\n\n //borramos todo en el ciclo\n $this->mySql->query(\"DELETE FROM Reporte WHERE Anualidad = '\".$year.\"' AND Mes = '\".$month.\"' ;\");\n\n }", "public function deleted ( AgendaScheduleEvent $event )\n {\n Cache::tags( [ 'TsAgenda', $event->event_instance->name ] )->flush();\n }", "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SettingContentBundle:EventCalender')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find EventCalender entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('eventcalender'));\n }", "public function delete()\n {\n $ids = Request::get(\"id\");\n\n $ids = is_array($ids) ? $ids : [$ids];\n\n foreach ($ids as $id) {\n\n $center = Center::findOrFail($id);\n\n $center->delete();\n $center->services()->detach();\n\n }\n\n return Redirect::back()->with(\"message\", trans(\"services::centers.events.deleted\"));\n }", "function delete_event($params)\n {\n $url = self::API_ROOT_URL . \"/\" . self::API_VERSION . \"/calendars/\" . $params['calendar_id'] . \"/events\";\n\n $headers = array();\n $headers[] = 'Authorization: Bearer ' . $this->access_token;\n $headers[] = 'Host: api.cronofy.com';\n $headers[] = 'Content-Type: application/json; charset=utf-8';\n\n $postfields = array('event_id' => $params['event_id']);\n\n $result = $this->http_delete($url, $postfields, $headers);\n\n if (empty($result)) {\n return true;\n } else {\n return json_decode($result, true);\n }\n }", "function deleteC($date){\n $this->DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql=\"DELETE FROM carreras where id=?\";\n $q=$this->DB->prepare($sql);\n $q->execute(array($date));\n Database::disconnect();\n }", "function delete_event($calid)\n{\n $query = \"DELETE FROM tbl_news WHERE calid='{$calid}'\";\n $result = mysql_query($query);\n if (mysql_affected_rows() == 1) {\n return true;\n } \n else\n {\n return false; // Query failed\n }\n}", "function removeTimeFromArrByCal($calendar){\n foreach ($calendar as $item){\n $this->removeTime($this->getMinutesFromString($item[0]),$this->getMinutesFromString($item[1]));\n }\n }", "function delete_schedule() {\r\n $schedule = $this->input->post('schedule');\r\n //************************ ADD CHECKING HERE ********************************************//\r\n // Delete data\r\n $this->db->where('id',$schedule['id']);\r\n $this->db->delete(\"schedules\");\r\n $this->db->where('schedule_id',$schedule['id']);\r\n $this->db->delete(\"schedule_times\");\r\n }", "public function delete($calendarId, $optParams = array())\n {\n $params = array('calendarId' => $calendarId);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params));\n }", "public function delete($calendarId, $optParams = array())\n {\n $params = array('calendarId' => $calendarId);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params));\n }", "public function actionDelete()\n {\n\n $id_usuario_actual=\\Yii::$app->user->id;\n $buscaConcursante = Concursante::find()->where(['id' => $id_usuario_actual])->one();\n\n\n $request = Yii::$app->request;\n $id_tabla_cartaGantt=$request->get('id_tabla_cartaGantt');\n $id_postulacion = $request->get('id_postulacion');\n $buscaPostulacion = Postulacion::find()->where(['and',['id_postulacion' => $id_postulacion],['id_concursante' => $buscaConcursante->id_concursante]])->one();\n $buscaTablaGantt = Tablacartagantt::find()->where(['id_tabla_cartaGantt' => $id_tabla_cartaGantt])->one();\n if($buscaPostulacion != null && $buscaTablaGantt != null){\n\n $this->findModel($id_tabla_cartaGantt)->delete();\n\n return $this->redirect(['/site/section6', 'id_postulacion' => $id_postulacion]);\n\n }else{\n throw new NotFoundHttpException('La página solicitada no existe.');\n } \n\n }", "public function delete(){\n $this->delete_from('project');\n }", "public function ajax_delete($sched_id)\r\n {\r\n $this->schedules->delete_by_id($sched_id);\r\n echo json_encode(array('status' => TRUE));\r\n }", "function flag_calendar_for_deletion($module_key,$space_key,$link_key,$delete_action) \r\n{\r\n\treturn true;\r\n}", "public function deleteAction() {\n \n // Check an event id has been given to us\n if ($eventId = $this->getRequest()->getParam('event_id')) {\n try {\n // initialise the model and then do the delete\n /** @var $model DG_Events_Model_Event */\n $model = Mage::getModel('events/event');\n $model->load($eventId);\n if (!$model->getEventId()) {\n Mage::throwException(Mage::helper('events')\n ->__('Unable to find event in database')\n );\n }\n $model->delete();\n\n // display a succes message\n $this->_getSession()->addSuccess(\n Mage::helper('events')\n ->__('The event has been deleted succesfully')\n );\n } catch (Mage_core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()->addException($e,\n Mage::helper('events')->__('And Error occurec while trying to delete the event.')\n );\n }\n }\n\n // Go back to the management grid\n $this->_redirect('*/*/');\n }", "public function delete() {\n\t\tself::deleteAll ( $this->entryID );\n\t}", "public function deleteCollection();", "public function removeSharedCalendar($id) {\n\t\tif (!$this->canWriteCalendar($id)) {\n\t\t\tPNApplication::error(\"You cannot remove this calendar\");\n\t\t\treturn false;\n\t\t}\n\t\tSQLQuery::create()->bypassSecurity()->removeKey(\"Calendar\", $id);\n\t\treturn true;\n\t}", "public function delete($parameters): Response\n {\n if (is_array($parameters)) {\n if (!$this->arrayIsAssociative($parameters)) {\n $parameters = [\n 'CalendarIds' => $parameters,\n ];\n }\n } else {\n $parameters = [\n 'CalendarIds' => [intval($parameters)],\n ];\n }\n \n $request = new Request('DELETE', 'v1/calendars/delete', $parameters);\n $request->requireAuthentication(true);\n return new Response($this->getApiAdapter()->request($request));\n }", "public function delete($date);", "public function delete(Data\\TiendaInterface $tienda);", "function deleteCalendarObject($calendarId, $objectUri) {\n\n unset($this->calendarData[$calendarId][$objectUri]);\n\n }", "public function destroy(calendarInfo $calendarInfo)\n {\n //\n }", "public function deleteACalendar(mixed $calendarId): array\n {\n $calendarId = Helper::fooToArray($calendarId);\n\n V::doValidate(V::simpleArray(V::stringType()::notEmpty()), $calendarId);\n\n $queues = [];\n\n foreach ($calendarId as $id)\n {\n $request = $this->options\n ->getAsync()\n ->setPath($id)\n ->setHeaderParams($this->options->getAuthorizationHeader());\n\n $queues[] = static function () use ($request)\n {\n return $request->delete(API::LIST['oneCalendar']);\n };\n }\n\n $pools = $this->options->getAsync()->pool($queues, false);\n\n return Helper::concatPoolInfos($calendarId, $pools);\n }", "public function delete_event()\n {\n delete_event($this->serial_number, $this->tablename);\n }", "public function destroy($id)\n {\n $calendar = Calendar::find($id)->delete();\n return response()->json($calendar);\n }", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id_adm_group'][] = $strValue;\n }\n $dataGroup = new cAdmGroup();\n $dataGroup->deleteMultiple($arrKeys);\n $myDataGrid->message = $dataGroup->strMessage;\n}", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n }\n $dataHrdExchangeRate = new cHrdExchangeRate();\n $dataHrdExchangeRate->deleteMultiple($arrKeys);\n $myDataGrid->message = $dataHrdExchangeRate->strMessage;\n}", "public function delete($celular);", "public function edit(Calendar $calendar)\n {\n //\n }", "public function edit(Calendar $calendar)\n {\n //\n }", "public static function deleteAgendaItems($request){\n\t\t$userid = $request->session()->get('user.global.id');\n\n\t\t$ids_to_delete = [];\n\t\t$agendaids_to_delete = [];\n\t\t$eventids_to_delete = [];\n\n\t\t//Get all the component data\n\t\t$data = $request->all();\n\t\t$test = [];\n\t\t//Loop through the array containing the url of the images that will be deleted\n\t\tforeach ($data['jsondata'] as $item) {\n\t\t\tif($data['userDetail']['pageid'] != ''){\n\t\t\t\t//Get the page id\n\t\t\t\t$detailpage_id = $data['userDetail']['pageid'];\n\t\t\t\t$deleteitem = $item['deleteitem'];\n\t\t\t\t$agenda_id = $item['agenda_id'];\n\t\t\t\tif(isset($item['event_id'])){\n\t\t\t\t\t$event_id = $item['event_id'];\n\t\t\t\t}else{\n\t\t\t\t\t$event_id = '';\n\t\t\t\t}\n\n\t\t\t\t//Check if the user can change the item by getting the agenda_id\n\t\t $agenda_id = Agenda::checkRecord('agendas.id',$agenda_id,$userid,$detailpage_id);\n\n\t\t if($agenda_id != ''){\n\t\t \t$agendaids_to_delete[] = $agenda_id;\n\t\t }\n\t\t //Check if the user can change the item by getting the agenda_id\n\t\t if($event_id != ''){\n\t\t\t $searchable = Event::checkRecord('searchable',$event_id,$userid);\n\t\t\t if($searchable < 1){\n\t\t\t \t$test[] = $searchable;\n\t\t\t \t$eventids_to_delete[] = $event_id;\n\t\t\t }else{\n\t\t\t \t//Destroy items from pivot table\n\t\t\t \t$empty_array = [];\n\t\t\t \t$empty_array[] = $event_id;\n\t\t\t\t\t\tEvent_User::destroy($empty_array);\n\t\t\t }\n\t\t }\n\t\t } \n\t\t}\n\n\t\t//Delete the agenda records from the pivot and agendas table\n\t\tif(!empty($agendaids_to_delete)){\n\t\t\t// Delete records from agenda table\n\t\t\tAgenda::destroy($agendaids_to_delete);\n\t\t\t//Destroy items from pivot table\n\t\t\tAgenda_User::destroy($agendaids_to_delete);\n\t\t}\n\n\t\t//Delete the event records from the pivot and events table\n\t\tif(!empty($eventids_to_delete)){\n\t\t\t// Delete records from agenda table\n\t\t\tEvent::destroy($eventids_to_delete);\n\t\t\t//Destroy items from pivot table\n\t\t\tEvent_User::destroy($eventids_to_delete);\n\t\t}\n\t}", "function delalloodevok($id){\n\n$id = explode(\"|\",$id);\n\nfor ($i=0;$i<count($id);$i++){\n\nmysql_query(\"delete from events where id='\".$id[$i].\"'\");\n}\n\n echo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0; url=calendar.php\\\">\";\n}", "public function removeOldWorkSchedule() {\n $arrUserId = $this->getUserIdArray();\n $criteria = new CDbCriteria();\n $criteria->addInCondition('employee_id', $arrUserId);\n $criteria->addBetweenCondition('work_day', $this->date_from, $this->date_to);\n $rowDeleted = HrWorkSchedules::model()->deleteAll($criteria);\n Loggers::info('Deleted', $rowDeleted, __CLASS__ . '::' . __FUNCTION__ . '(' . __LINE__ . ')');\n }", "public function g_delete_event($id, $email, $password)\n\t{\n\t\t$gcal = load_init_cal($email, $password);\n\t\tif (isset($id)) {\n\t\t try { \n\t\t\t $event = $gcal->getCalendarEventEntry('http://www.google.com/calendar/feeds/default/private/full/' . $_GET['id']);\n\t\t\t $event->delete();\n\t\t } catch (Zend_Gdata_App_Exception $e) {\n\t\t\t echo \"Error: \" . $e->getResponse();\n\t\t } \n\t\t echo 'Sự kiện đã xóa thành công!'; \n\t\t} else {\n\t\t echo 'Không có sự kiện nào';\n\t\t}\n\t}", "public function deleteCalendarEntriesOfBookings($a_booking_ids) {\r\n\t\t$this->ilRoomSharingDatabaseCalender->deleteCalendarEntriesOfBookings($a_booking_ids);\r\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM field_reservation\n\t\t\t\tWHERE fr_id=?\";\n\t\t$this->ffm->query($sql, array($this->fr_id));\n\t}", "public function cekForDelete($organisasi_id);", "public function deleteAll()\n {\n $this->getAgendaDao()->open();\n $this->getAgendaDao()->deleteAll();\n $this->getAgendaDao()->close();\n }", "function delevok($id){\n\n $query = \"delete from events where id='$id'\";\n mysql_query($query);\n echo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0; url=calendar.php\\\">\";\n\n}", "public function deleteCreatedContacts($event)\n {\n $contactName = $event->getScenario()->getTokens()['username'];\n $this->iLoggedInSugarCRMAsAdministrator();\n $topMenuPage = $this->getPage(TopMenuPage::class);\n $topMenuPage->goToContacts();\n $contactsPage = $this->getPage(ContactsPage::class);\n $contactsPage->removeContact($contactName);\n $topMenuPage->logout();\n }", "function deleteAppointments() {\n $sql = $this->database->prepare('DELETE FROM `appointments` WHERE `id` = :id');\n $sql->bindValue(':id', $this->id, PDO::PARAM_INT);\n return $sql->execute();\n }", "public function deleteCalendarEntryOfBooking($a_booking_id) {\r\n\t\t$this->ilRoomSharingDatabaseCalender->deleteCalendarEntryOfBooking($a_booking_id);\r\n\t}", "public function destroy($calendarId, $id)\n {\n // redirect\n $task = Task::find($id);\n $task->delete();\n return redirect()->route('calendar.show', ['calendarId' => $calendarId]);\n }", "function churchservice_deleteEvent($params) {\n global $user;\n if (!user_access(\"edit events\", \"churchservice\")) throw new CTNoPermission(\"edit events\", \"churchservice\");\n ct_log(\"[ChurchService] \". t('remove.event'), 2, $params[\"id\"], \"service\");\n\n $db_event = db_query(\"SELECT e.*, DATE_FORMAT(e.startdate, '%d.%m.%Y %H:%i') AS date_de\n FROM {cs_event} e\n WHERE id=:event_id\",\n array (\":event_id\" => $params[\"id\"]))\n ->fetch();\n if (!$db_event) {\n if ($params[\"id\"]) throw new CTException(\"deleteEvent(\" . $params[\"id\"] . \"): \" . t('x.not.found', t('event')));\n else return;\n }\n\n // Inform people about the deleted event\n if (getVar(\"informDeleteEvent\", false, $params)) {\n $db_cal = db_query(\"SELECT * FROM {cc_cal}\n WHERE id=:cal_id AND DATEDIFF(startdate, now())>=0\",\n array (\":cal_id\" => $db_event->cc_cal_id))\n ->fetch();\n if ($db_cal!=false) {\n $db = db_query(\"SELECT p.id p_id, p.vorname, p.name, IF(p.spitzname, p.spitzname, p.vorname) AS nickname, p.email FROM {cs_eventservice} es, {cdb_person} p\n WHERE event_id = :event_id AND valid_yn = 1 AND p.id = es.cdb_person_id\n AND es.cdb_person_id IS NOT NULL AND p.email != ''\",\n array (\":event_id\" => $params[\"id\"]));\n foreach ($db as $p) {\n $lang = getUserLanguage($p->p_id);\n $subject = \"[\" . getConf('site_name') . \"] \" . t2($lang, 'cancelation.of.event.date', $db_cal->bezeichnung, $db_event->date_de);\n $data = array(\n 'person' => $p,\n 'eventTitle' => $db_cal->bezeichnung,\n 'eventDate' => $db_event->date_de\n );\n // Deine Dienstanfrage wurde entsprechend entfernt.'\n $content = getTemplateContent('email/eventDeleted', 'churchservice', $data, null, $lang);\n churchservice_send_mail($subject, $content, $p->email);\n }\n }\n }\n\n if (getVar(\"deleteCalEntry\", 1, $params) == 1) {\n db_query(\"DELETE FROM {cs_eventservice}\n WHERE event_id=:event_id\",\n array (\":event_id\" => $params[\"id\"]), false);\n\n db_query(\"DELETE FROM {cs_event}\n WHERE id=:event_id\",\n array (\":event_id\" => $params[\"id\"]), false);\n }\n else {\n db_query(\"UPDATE {cs_event} SET valid_yn=0\n WHERE id=:id\",\n array (\":id\" => $params[\"id\"]));\n }\n}", "public function actionDelete()\n {\n $time = strtotime(\"-3 month\");\n $command = Yii::$app->db->createCommand('DELETE FROM `tv_data` WHERE `created_at` < :created_at');\n $command->bindValue(':created_at', $time);\n $command->execute();\n }", "public function _delete() {\n\n $event_id = $this->event_id;\n $db = Engine_Db_Table::getDefaultAdapter();\n\n $db->beginTransaction();\n try {\n Engine_Api::_()->fields()->getTable('siteevent_event', 'search')->delete(array('item_id = ?' => $event_id));\n Engine_Api::_()->fields()->getTable('siteevent_event', 'values')->delete(array('item_id = ?' => $event_id));\n\n // Delete leader list\n $this->getLeaderList()->delete();\n\n // Delete all memberships\n $this->membership()->removeAllMembers();\n\n //DELETE EVENT DOCUMENTS\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('siteeventdocument')) {\n\n $documents = Engine_Api::_()->getItemTable('siteeventdocument_document')->getSiteeventDocuments($event_id, 0);\n\n foreach ($documents as $document) {\n Engine_Api::_()->getItem('siteeventdocument_document', $document->document_id)->delete();\n }\n }\n \n $documentEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('document');\n if ($documentEnabled) {\n $table = Engine_Api::_()->getItemTable('document');\n $select = $table->select()\n ->from($table->info('name'), 'document_id')\n ->where('parent_type = ?', 'siteevent_event')\n ->where('parent_id = ?', $event_id);\n $rows = $table->fetchAll($select)->toArray();\n if (!empty($rows)) {\n foreach ($rows as $key => $document_ids) {\n $resource = Engine_Api::_()->getItem('document', $document_ids['document_id']);\n if ($resource)\n $resource->delete();\n }\n }\n }\n\n //FETCH EVENT IDS\n $reviewTable = Engine_Api::_()->getDbtable('reviews', 'siteevent');\n $select = $reviewTable->select()\n ->from($reviewTable->info('name'), 'review_id')\n ->where('resource_id = ?', $this->event_id)\n ->where('resource_type = ?', 'siteevent_event');\n $reviewDatas = $reviewTable->fetchAll($select);\n foreach ($reviewDatas as $reviewData) {\n Engine_Api::_()->getItem('siteevent_review', $reviewData->review_id)->delete();\n }\n\n //FETCH EVENT VIDEO IDS\n $reviewVideoTable = Engine_Api::_()->getDbtable('videos', 'siteevent');\n $selectVideoTable = $reviewVideoTable->select()\n ->from($reviewVideoTable->info('name'), 'video_id')\n ->where('event_id = ?', $this->event_id);\n $reviewVideoDatas = $reviewVideoTable->fetchAll($selectVideoTable);\n foreach ($reviewVideoDatas as $reviewVideoData) {\n Engine_Api::_()->getItem('siteevent_video', $reviewVideoData->video_id)->delete();\n }\n\n Engine_Api::_()->getDbtable('clasfvideos', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('albums', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('photos', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('vieweds', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('posts', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('topics', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('topicWatches', 'siteevent')->delete(array('resource_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('locations', 'siteevent')->delete(array('event_id = ?' => $event_id));\n Engine_Api::_()->getDbtable('otherinfo', 'siteevent')->delete(array('event_id = ?' => $event_id));\n \n Engine_Api::_()->getDbtable('userreviews', 'siteevent')->delete(array('event_id = ?' => $event_id));\n \n //GET DIARIES HAVING THIS EVENT ID\n $diaryTable = Engine_Api::_()->getDbtable('diaries', 'siteevent');\n $diaryTableName = $diaryTable->info('name');\n $diaryMapTable = Engine_Api::_()->getDbtable('diarymaps', 'siteevent');\n $diaryMapTableName = $diaryMapTable->info('name');\n\n $diaryDatas = $diaryTable->select()\n ->from($diaryTableName, 'diary_id')\n ->where('event_id = ?', $event_id)\n ->query()\n ->fetchAll(Zend_Db::FETCH_COLUMN);\n\n if (!empty($diaryDatas)) {\n $select = $diaryMapTable->select()\n ->from($diaryMapTableName)\n ->where($diaryMapTableName . '.event_id != ?', $event_id)\n ->where(\"diary_id IN (?)\", (array) $diaryDatas)\n ->order('date ASC')\n ->group($diaryMapTableName . '.diary_id');\n\n $diaryMapDatas = $diaryMapTable->fetchAll($select);\n if (!empty($diaryMapDatas)) {\n\n $diaryMapDatas = $diaryMapDatas->toArray();\n foreach ($diaryMapDatas as $diaryMapData) {\n $diaryTable->update(array('event_id' => $diaryMapData['event_id']), array('diary_id = ?' => $diaryMapData['diary_id'], 'event_id = ?' => $event_id));\n }\n }\n }\n\n $diaryTable->update(array('event_id' => 0), array('event_id = ?' => $event_id));\n $diaryMapTable->delete(array('event_id = ?' => $event_id));\n\n //FETCH OCCURRENCES IDS\n $occurrenceTable = Engine_Api::_()->getDbtable('occurrences', 'siteevent');\n $select = $occurrenceTable->select()\n ->from($occurrenceTable->info('name'), 'occurrence_id')\n ->where('event_id = ?', $event_id);\n $occurrenceDatas = $occurrenceTable->fetchAll($select);\n foreach ($occurrenceDatas as $occurrenceData) {\n \n $waitlistTable = Engine_Api::_()->getDbtable('waitlists', 'siteevent');\n $select = $waitlistTable->select()\n ->from($waitlistTable->info('name'))\n ->where('occurrence_id = ?', $occurrenceData->occurrence_id);\n $wishlistDatas = $waitlistTable->fetchAll($select);\n foreach($wishlistDatas as $wishlistData) {\n $wishlistData->delete();\n } \n }\n \n //DELETE EVENT FROM OCCURRENCE TABLE\n $occurrenceTable->delete(array('event_id = ?' => $event_id));\n\n //DELETE EVENT FROM MEMBERSHIP TABLE\n Engine_Api::_()->getDbtable('membership', 'siteevent')->delete(array('resource_id = ?' => $event_id));\n\n //DELETE EVENT ENTRY FROM FOLLOW TABLE\n Engine_Api::_()->getDbtable('follows', 'seaocore')->delete(array('resource_id = ?' => $event_id, 'resource_type =?' => 'siteevent_event'));\n\n //DELETE EVENT ENTRY FROM RATING TABLE\n $ratingTable = Engine_Api::_()->getDbtable('ratings', 'siteevent');\n $ratingTable->delete(array('review_id =?' => 0, 'resource_id =?' => $event_id, 'resource_type =?' => 'siteevent_event'));\n\n \n //DELETE EVENT FROM TICKET TABLE\n if(Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('siteeventticket')){\n Engine_Api::_()->getDbtable('tickets', 'siteeventticket')->delete(array('event_id = ?' => $event_id));\n \n //DELETE NOTIFICATIONS FOR ORDERS\n $orderTable = Engine_Api::_()->getDbtable('orders', 'siteeventticket');\n $select = $orderTable->select()\n ->from($orderTable->info('name'))\n ->where('event_id = ?', $event_id);\n $orderDatas = $orderTable->fetchAll($select);\n foreach($orderDatas as $orderData) {\n Engine_Api::_()->getDbtable('notifications', 'activity')->delete(array('type = ?' => 'siteeventticket_order_place', 'object_type = ?' => 'siteeventticket_order', 'object_id = ?' => $orderData->order_id));\n } \n } \n \n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //DELETE EVENT\n parent::_delete();\n }" ]
[ "0.7237205", "0.7003718", "0.673249", "0.6630412", "0.661975", "0.661975", "0.66135013", "0.64451325", "0.64200187", "0.63776016", "0.6228385", "0.6132179", "0.60730684", "0.60518086", "0.60363424", "0.60208064", "0.6018489", "0.59864014", "0.5973407", "0.59635925", "0.5957858", "0.59508294", "0.5940969", "0.5870973", "0.58699286", "0.586608", "0.5834904", "0.5833063", "0.5833036", "0.5821421", "0.58211327", "0.5818511", "0.5786258", "0.5777656", "0.5750527", "0.5744331", "0.57236135", "0.5711371", "0.5686284", "0.56838095", "0.5677412", "0.56423545", "0.563709", "0.5631366", "0.5629307", "0.5598657", "0.5557583", "0.55569744", "0.5530027", "0.54955757", "0.5483434", "0.5480446", "0.54725665", "0.5456785", "0.54560524", "0.54558516", "0.5453404", "0.54526395", "0.54446614", "0.54412776", "0.54357433", "0.54352015", "0.54352015", "0.54064345", "0.54041207", "0.54013723", "0.539391", "0.5390646", "0.53644156", "0.53591335", "0.535842", "0.5351856", "0.53435004", "0.53376853", "0.5334175", "0.53316545", "0.53315556", "0.53094035", "0.5302467", "0.5290589", "0.5288179", "0.5282237", "0.52765906", "0.52765906", "0.52765894", "0.52746266", "0.5271659", "0.52639246", "0.52606714", "0.525333", "0.5251338", "0.52503246", "0.52484787", "0.52416843", "0.52354133", "0.5231936", "0.52259934", "0.52181643", "0.5216349", "0.52135646" ]
0.7789034
0
Save calendar details from CalendarsFormWindow
Сохранить детали календаря из CalendarsFormWindow
public function calendarsFormWindowSave(){ // Validate input $validator = library('Validator'); $validator->registerPost('id')->number(); $validator->registerPost('month')->required()->date(); $validator->registerPost('online')->number(); $validator->registerFile('file')->fileType('application/pdf'); if($validator->validate()){ // Save form $data = array( 'month' => Input::post('month'), 'description' => Input::postHtml('description'), 'online' => Input::postInt('online') ); if(Input::post('id')){ $data['id'] = Input::postInt('id'); $data['updated'] = date('Y-m-d H:i:s'); }else{ $data['created'] = date('Y-m-d H:i:s'); } $id = model('CalendarModel')->save($data); // Delete and save new file if($file = Input::file('file')){ model('FileModel')->deleteAllByRelatedTableId('calendars', $id); $filename = FileUpload::saveUpload('calendars', $file); $extension = FileUpload::getExtension($filename); model('FileModel')->save(array( 'filename' => $filename, 'mimetype' => $file['type'], 'extension' => $extension, 'size' => $file['size'], 'related_table' => 'calendars', 'related_id' => $id, 'sequence' => 1 )); } // Output record $record = model('CalendarModel')->adminGetCalendarForGrid($id); output_json_encode(array( 'success' => true, 'record' => $record )); } // Output validation errors output_json_encode(array( 'success' => false, 'msg' => 'Gelieve alle aangeduide velden te controleren en opnieuw te proberen', 'errors' => $validator->getAdminErrors() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveCalendar($title, $color, $calendarId = NULL) {\n\n $calInfo = array(\n 'title' => $title,\n 'color' => substr($color, 0, 1) == '#' ? substr($color, 1) : $color,\n );\n\n $update = FALSE;\n if (!is_null($calendarId)) {\n $calInfo['calendar_id'] = $calendarId;\n $update = TRUE;\n }\n\n $dialog = $this->_getCalendarDialog($calInfo);\n\n if ($dialog->checkDialogInput()) {\n\n if ($update) {\n // update an existing calendar\n $status = $this->calendarObj->updateCalendar($calInfo);\n $message = $this->_gt('Calendar updated!');\n $baseLink = $this->getLink(\n array(\n 'cmd' => 'calendar',\n 'calendar' => $calendarId\n )\n );\n } else {\n // save a new calendar\n $status = $this->calendarObj->addCalendar($calInfo);\n $message = $this->_gt('Calendar added!');\n $baseLink = $this->getBaseLink();\n if ($status != FALSE) {\n $calInfo['calendar_id'] = $status;\n $baseLink = $this->getLink(\n array(\n 'cmd' => 'calendar',\n 'calendar' => $status\n )\n );\n $dialog = $this->_getCalendarDialog($calInfo);\n }\n }\n\n // show dialog\n $type = 'info';\n if ($status == FALSE) {\n $type = 'error';\n $message = $this->_gt('Database Error!');\n }\n\n $hidden = array();\n\n $msgdialog = new base_msgdialog(\n $this->module, $this->paramName, $hidden, $message, $type\n );\n $msgdialog->buttonTitle = 'OK';\n $msgdialog->baseLink = $baseLink;\n\n $this->layout->add($msgdialog->getMsgDialog());\n }\n $this->layout->addLeft($this->_getPublicCalendarsList(@$calInfo['calendar_id']));\n $this->layout->addLeft($this->_getRecommendedEventsList());\n $this->layout->add($dialog->getDialogXML());\n }", "public function calendarModalSave(Request $request)\n {\n $data = $request->all();\n CalendarEvent::create($data);\n\n return redirect()->back();\n }", "public function store(CalendarFormRequest $request)\n {\n try {\n $calendar = $this->saveCalendar($request, null);\n\n $data = [\n 'calendar' => $calendar,\n 'staff_name' => Auth::user()->name,\n 'subject' => '【EPARK人間ドック】カレンダー登録・更新・削除のお知らせ',\n 'processing' => '登録'\n ];\n// Mail::to(config('mail.to.system'))->send(new CalendarSettingNotificationMail($data));\n\n $request->session()->flash('success', trans('messages.created', ['name' => trans('messages.names.calendar')]));\n return redirect('calendar');\n } catch (\\Exception $e) {\n return redirect()->back()->withErrors(trans('messages.create_error'))->withInput();\n }\n }", "public function calendarsFormWindowLoad(){\n\n\t\t// Get record\n\t\t$record = model('CalendarModel')->adminGetCalendarForForm(Input::postInt('id'));\n\t\tif($record){\n\t\t\toutput_json_encode(array(\n\t\t\t\t'success'\t=> true,\n\t\t\t\t'record'\t=> $record\n\t\t\t));\n\t\t}else{\n\t\t\toutput_json_encode(array(\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'message'\t=> 'Gegevens konden niet geladen worden'\n\t\t\t));\n\t\t}\n\t}", "public function saveCalendar() {\n $output = $this->createCalendar();\n if( false === ( $dirfile = $this->getConfig( util::$URL )))\n $dirfile = $this->getConfig( util::$DIRFILE );\n return ( false === file_put_contents( $dirfile, $output, LOCK_EX )) ? false : true;\n }", "public function SaveEvent() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->calDateTime) $this->objEvent->DateTime = $this->calDateTime->DateTime;\n\t\t\t\tif ($this->txtLocation) $this->objEvent->Location = $this->txtLocation->Text;\n\t\t\t\tif ($this->txtDescription) $this->objEvent->Description = $this->txtDescription->Text;\n\t\t\t\tif ($this->txtImages) $this->objEvent->Images = $this->txtImages->Text;\n\t\t\t\tif ($this->txtVideos) $this->objEvent->Videos = $this->txtVideos->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Event object\n\t\t\t\t$this->objEvent->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function showCalendarTools(){\n\t\techo \"\\n\\n<br><!--Calendar Tools-->\\n<div class='toolPanel' style='width:612px;'>\";\n\t\techo \"\\n\\t<form action='\".basename($_SERVER['PHP_SELF']).\"' method='post'>\\n\\t\\t<fieldset><legend>Manage Calendars</legend>\";\n\t\techo \"\\n\\t<input type='hidden' name='savedata' value='calendarTools'>\";\n\n\t\techo \"\\n\\t\\t<strong>Currently selected calendar: </strong>\".$this->calHandle->calName.\"<br><br>\";\n\n\t\t//Display all of the calendars in a listbox, label the default calendar\n\t\techo \"\\n\\t\\t<select name='selCalName' id='selCalName'><option value='-1'>(select one)</option>\";\n\t\t$r=MealDB::runQuery(\"SELECT name,isdefault,calendarId FROM Calendars ORDER BY name\");\n\t\twhile ($g=mysqli_fetch_row($r)){\n\t\t\t$default = $g[1]=='1' ? \" (default)\" : \"\";\n\t\t\techo \"\\n\\t\\t\\t<option value='\".$g[2].\"'>\".$g[0].$default.\"</option>\";\n\t\t}\n\t\techo \"\\n\\t\\t</select> <button type='submit' name='submit' value='changeCalendar'>Select This Calendar</button>\";\n\t\techo \"\\n\\t\\t<button type='submit' name='submit' value='defaultCalendar'>Set To Default</button>\";\n\t\techo \"\\n\\t\\t<button type='submit' name='submit' value='deleteCalendar' onclick='return confirmMessage(\".'\"Are you sure you want to permenantly delete the selected calendar? This action cannot be reversed.\"'.\")'>Delete Calendar</button>\";\n\n\t\techo \"\\n\\t\\t<br><br><strong>Create New Calendar</strong><br><input type='text' name='newCalName' placeholder='Name of Calendar'/> <button type='submit' name='submit' value='addCalendar'>Add New Calendar</button>\";\n\n\t\techo \"\\n\\t</fieldset>\\n\\t</form>\";\n\t\techo \"\\n</div>\";\n\t}", "public function save() {\n\t\t$formValues = $this->_form->getSubmitValues();\n\t\t$startTime = (\"{$formValues['start_time']['Y']}-\" . str_pad($formValues['start_time']['M'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($formValues['start_time']['d'], 2, '0', STR_PAD_LEFT) . ' ' . date('H:i:s'));\n\t\t$endTime = (isset($formValues['never_expire']) || !is_numeric($formValues['end_time']['Y']) ? '2100-01-01 00:00:00' : (\"{$formValues['end_time']['Y']}-\" . str_pad($formValues['end_time']['M'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($formValues['end_time']['d'], 2, '0', STR_PAD_LEFT) . ' ' . date('H:i:s')));\n $consumer_club_id = $this->_distributor->get_consumer_account_id($this->_distributor->id);\n\t\t\n\t\tif (NULL == $this->_dinId) {\n\t\t\t$this->_distributorIdentification->updateDistributorIdentificationNumber($this->_distributor->distributor_id, $formValues['din_type'], $formValues['din_number'], $formValues['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n if (!empty($consumer_club_id)) {\n $this->_distributorIdentification->updateDistributorIdentificationNumber($consumer_club_id, $formValues['din_type'], $formValues['din_number'], $formValues['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n }\n\t\t} else {\n\t\t\t$this->_distributorIdentification->updateDistributorIdentificationNumber($this->_distributor->distributor_id, $this->_din['distributor_identification_number_type_id'], $formValues['din_number'], $this->_din['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n if (!empty($consumer_club_id)) {\n $this->_distributorIdentification->updateDistributorIdentificationNumber($consumer_club_id, $this->_din['distributor_identification_number_type_id'], $formValues['din_number'], $this->_din['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n }\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public function SaveEventSignupForm() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstSignupForm) $this->objEventSignupForm->SignupFormId = $this->lstSignupForm->SelectedValue;\n\t\t\t\tif ($this->calDateStart) $this->objEventSignupForm->DateStart = $this->calDateStart->DateTime;\n\t\t\t\tif ($this->calDateEnd) $this->objEventSignupForm->DateEnd = $this->calDateEnd->DateTime;\n\t\t\t\tif ($this->txtLocation) $this->objEventSignupForm->Location = $this->txtLocation->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the EventSignupForm object\n\t\t\t\t$this->objEventSignupForm->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "public function save($sCalendar)\n\t{\n\t\tif (is_null($this->_client))\n\t\t{\n\t\t\tthrow new Core_Exception('No connection. Try connect().');\n\t\t}\n\n\t\tif (is_null($this->_calendar_url))\n\t\t{\n\t\t\tthrow new Core_Exception('No calendar selected.');\n\t\t}\n\n\t\t// Parse $sCalendar for UID\n\t\tif (preg_match('#^UID:(.*?)\\r?\\n?$#m', $sCalendar, $matches))\n\t\t{\n\t\t\t$sUid = $matches[1];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Core_Exception('Can\\'t find UID in iCalendar-data');\n\t\t}\n\n\t\t$iCAL = $this->_calendar_url . $sUid . '.ics';\n\n\t\t$aEvent = $this->getEvent($iCAL);\n\n\t\tif (isset($aEvent['etag']) && strlen($aEvent['etag']))\n\t\t{\n\t\t\t$this->update($aEvent, $iCAL, $sCalendar);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->create($aEvent, $iCAL, $sCalendar);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function updateCalendar() {\n try {\n if (!($this->calendar instanceof Base_Model_ObtorLib_App_Core_System_Entity_Calendar)) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception(\" System Calendar Entity not intialized\");\n } else {\n $data = array('title' => $this->calendar->getTitle(),\n 'updated_on' => $this->calendar->getUpdatedOn(),\n 'updated_by' => $this->calendar->getUpdatedBy());\n return $this->update($data, 'id = ' . (int) $this->calendar->getId());\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception($ex);\n }\n }", "function calendar_framework_calendar_form_submit($form, &$form_state) {\n $calendar = $form_state['values']['calendar'];\n\n // Saving necessary configs.\n unset($form_state['values']['op'],\n $form_state['values']['submit'],\n $form_state['values']['form_id'],\n $form_state['values']['calendar'],\n $form_state['values']['form_token'],\n $form_state['values']['form_build_id']\n );\n variable_set('calendar_framework_settings_' . $calendar['identifier'], $form_state['values']);\n\n $form_state['redirect'] = 'admin/settings/date-time/calendars';\n drupal_set_message(t('Configuration for <em>@calendar</em> has been successfully saved.',\n array('@calendar' => calendar_framework_calendar_title($calendar['identifier']))\n ));\n}", "public function store(Request $request, Calendar $calendar)\n {\n //\n }", "public function store(CalendarSave $request)\n {\n $result = [\n \t'result' => false,\n \t'id' => null,\n ];\n \n $length = $request->input('length');\n // check length of other projects?\n \n $project = Project::find($request->project_id);\n\t\tif ($project) {\n\t\t\t\n\t\t\t $task = Calendar::create([\n\t 'date' => $request->date,\n\t 'user_id' => $request->user_id,\n\t 'client_id' => $project->client_id,\n\t 'project_id' => $project->id, \n\t 'length' => $length,\n\t 'away' => null,\n\t ]);\n\t \n\t if ($task) {\n\t\t $result = [\n\t\t \t'result' => true,\n\t\t \t'id' => $task->id,\n\t\t ];\t \n\t }\n\t\t\t\n\t\t}\n \n\t\treturn response()->json($result);\n }", "public function SaveEvent() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->calDateTime) $this->objEvent->DateTime = $this->calDateTime->DateTime;\n\t\t\t\tif ($this->txtLocation) $this->objEvent->Location = $this->txtLocation->Text;\n\t\t\t\tif ($this->txtDescription) $this->objEvent->Description = $this->txtDescription->Text;\n\n\t\t\t\t$str = \"\";\n\n\t\t\t\t//var_dump($this->txtImages1);die();\n\t\t\t\tif ($this->txtImages1->File != null) \n\t\t\t\t\t$str .= $this->txtImages1->File . \";\";\t\n\t\t\t\tif ($this->txtImages2->File != null) \n\t\t\t\t\t$str .= $this->txtImages2->File . \";\";\t\n\t\t\t\tif ($this->txtImages3->File != null) \n\t\t\t\t\t$str .= $this->txtImages3->File . \";\";\t\n\n\n//\t\t\t\techo $str;die();\n\t\t\t\t$this->objEvent->Images = $str;\n\n\t\t\t\t\n\t\t\t\tif ($this->txtVideos) $this->objEvent->Videos = $this->txtVideos->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Event object\n\t\t\t\t$this->objEvent->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function update()\n {\n $validator = new calendarValidator();\n $validMessage = null;\n \n //Check if the calendar name is valid\n if ($validator->validEditedCalendarName($_POST['calendarName'], $_POST['calendarID']))\n {\n \n //Check if the slug is valid\n if ($validator->validEditedCalendarSlug($_POST['calendarSlug'], $_POST['calendarID']))\n {\n \n $calendar = new Calendar($_POST['calendarID'], false);\n $calendar->setName($_POST['calendarName']);\n $calendar->setDescription($_POST['calendarDescription']);\n $calendar->setSlug($validator->cleanCalendarSlug($_POST['calendarSlug']));\n \n //Revalidate the slug after it's been cleaned, to make sure something is there\n if (!$validator->validEditedCalendarSlug($calendar->getSlug(), $_POST['calendarID']))\n {\n $validMessage = 'he calendar slug is invalid. Calendar could not be updated';\n }\n else\n {\n $calendar->update();\n }\n }\n //If the slug isn't valid\n else\n {\n $validMessage = 'The calendar slug is invalid. Calendar could not be updated';\n }\n }\n //If the name isn't valid\n else\n {\n $validMessage = 'The calendar name is invalid. Calendar could not be updated';\n }\n \n //If we have an error message then print it for the user\n if (! empty($validMessage))\n {\n raiserror($validMessage);\n }\n }", "public function addCalendar() {\n try {\n if (!($this->calendar instanceof Base_Model_ObtorLib_App_Core_System_Entity_Calendar)) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception(\" System Calendar Entity not intialized\");\n } else {\n $data = array('title' => $this->calendar->getTitle(),\n 'title_category' => $this->calendar->getTitleCategory(),\n 'start' => $this->calendar->getStartDate(),\n 'allDay'=> $this->calendar->getAllDay(),\n 'end' => $this->calendar->getEndDate(),\n 'added_on' => $this->calendar->getAddedOn(),\n 'added_by' => $this->calendar->getAddedBy(),\n 'updated_on' => $this->calendar->getUpdatedOn(),\n 'updated_by' => $this->calendar->getUpdatedBy());\n\n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception($ex);\n }\n }", "public function updateCalendar() {\n try {\n if (!($this->calendar instanceof Base_Model_ObtorLib_App_Core_System_Entity_Calendar)) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception(\" System Calendar Entity not intialized\");\n } else {\n $objCalendar = new Base_Model_ObtorLib_App_Core_System_Dao_Calendar();\n $objCalendar->calendar = $this->calendar;\n return $objCalendar->updateCalendar();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception($ex);\n }\n }", "function calendar_framework_calendar_form(&$form_state, $identifier) {\n $calendar = calendar_framework_calendars('calendar', $identifier);\n\n if ($calendar && function_exists($calendar['config callback'])) {\n $form = $calendar['config callback']($calendar['config']);\n\n // Needed for validation and submission callbacks.\n $form['calendar'] = array(\n '#type' => 'value',\n '#value' => $calendar,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n // Set calendar configuration page title.\n drupal_set_title(t('@calendar Configuration',\n array('@calendar' => calendar_framework_calendar_title($identifier))\n ));\n\n return $form;\n }\n\n drupal_not_found();\n exit();\n}", "public function edit(Calendar $calendar)\n {\n //\n }", "public function edit(Calendar $calendar)\n {\n //\n }", "public function edit(calendarInfo $calendarInfo)\n {\n //\n }", "public function edit_calendar_config() {\r\n\r\n $model = Eabi_Ipenelo_Calendar::service()->get('models/Configuration')->load();\r\n\r\n $html = '';\r\n\r\n\r\n\r\n $event = Eabi_Ipenelo_Calendar::service()->get('forms/Configuration', (array) $model);\r\n\r\n $event->setOptionFunctions($model->getOptionFunctions());\r\n $html .= $event->render();\r\n\r\n $res = $event->toDb();\r\n if ($res !== false) {\r\n foreach ($res as $key => $value) {\r\n update_option($key, $value);\r\n }\r\n self::addMessage($this->__->l('Settings have been successfully saved'));\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar_config'));\r\n exit();\r\n }\r\n Eabi_Ipenelo_Calendar::service()->import('events/Abstract');\r\n Eabi_Ipenelo_Calendar_Event_Abstract::detectAvailableEventHandlers();\r\n\r\n echo $html;\r\n }", "public function store()\n {\n $entry = $this->form->getEntry();\n\n $this->saveDefaultLocale($entry);\n $this->saveTranslations($entry);\n }", "function calendar_set($data)\n\t{\n\t\tif (!($infolog = $this->bo->read($data['entry_id'])))\n\t\t{\n\t\t\treturn $data;\n\t\t}\n\t\t$event = array_merge($data,array(\n\t\t\t'category'\t=> $GLOBALS['egw']->categories->check_list(EGW_ACL_READ, $infolog['info_cat']),\n\t\t\t'priority'\t=> $infolog['info_priority'] + 1,\n\t\t\t'public'\t=> $infolog['info_access'] != 'private',\n\t\t\t'title'\t\t=> $infolog['info_subject'],\n\t\t\t'description'\t=> $infolog['info_des'],\n\t\t\t'location'\t=> $infolog['info_location'],\n\t\t\t'start'\t\t=> $infolog['info_startdate'],\n\t\t\t'end'\t\t=> $infolog['info_enddate'] ? $infolog['info_enddate'] : $infolog['info_datecompleted']\n\t\t));\n\t\tunset($event['entry_id']);\n\t\tif (!$event['end']) $event['end'] = $event['start'] + (int) $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength']*60;\n\n\t\t// Match categories by name\n\t\t$event['category'] = $GLOBALS['egw']->categories->name2id(categories::id2name($infolog['info_cat']));\n\n\t\t// make current user the owner of the new event, not the selected calendar, if current user has rights for it\n\t\t$event['owner'] = $user = $GLOBALS['egw_info']['user']['account_id'];\n\n\t\t// add/modify participants according to prefs\n\t\t$prefs = explode(',',$this->prefs['calendar_set'] ? $this->prefs['calendar_set'] : 'responsible,contact,user');\n\n\t\t// if no default participants (selected calendars) --> remove all\n\t\tif (!in_array('selected',$prefs))\n\t\t{\n\t\t\t$event['participants'] = $event['participant_types'] = array();\n\t\t}\n\t\t// Add responsible as participant\n\t\tif (in_array('responsible',$prefs))\n\t\t{\n\t\t\tforeach($infolog['info_responsible'] as $responsible)\n\t\t\t{\n\t\t\t\t$event['participants'][$responsible] = $event['participant_types']['u'][$responsible] =\n\t\t\t\t\tcalendar_so::combine_status($user==$responsible?'A':'U');\n\t\t\t}\n\t\t}\n\t\t// Add linked contact as participant\n\t\tif (in_array('contact',$prefs) && $infolog['info_link']['app'] == 'addressbook')\n\t\t{\n\t\t\t$event['participants'][calendar_so::combine_user('c',$infolog['info_link']['id'])] =\n\t\t\t\t$event['participant_types']['c'][$infolog['info_link']['id']] = calendar_so::combine_status('U');\n\t\t}\n\t\tif (in_array('owner',$prefs))\n\t\t{\n\t\t\t$event['participants'][$infolog['info_owner']] = $event['participant_types']['u'][$infolog['info_owner']] =\n\t\t\t\tcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\t\t// Add current user, if set or no other participants, which is not allowed\n\t\tif (in_array('user',$prefs))\n\t\t{\n\t\t\t$event['participants'][$user] = $event['participant_types']['u'][$user] =\n\t\t\t\tcalendar_so::combine_status('A',1,'CHAIR');\n\t\t}\n\n\t\t// Add infolog link to calendar entry\n\t\t$event['link_app'][] = $infolog['info_link']['app'];\n\t\t$event['link_id'][] = $infolog['info_link']['id'];\n\n\t\t// Copy infolog's links\n\t\tforeach(egw_link::get_links('infolog',$infolog['info_id'],'','link_lastmod DESC',true) as $link)\n\t\t{\n\t\t\tif ($link['app'] != egw_link::VFS_APPNAME)\n\t\t\t{\n\t\t\t\t$event['link_app'][] = $link['app'];\n\t\t\t\t$event['link_id'][] = $link['id'];\n\t\t\t}\n\t\t}\n\t\t// Copy same custom fields\n\t\tforeach(array_keys(config::get_customfields('calendar')) as $name)\n\t\t{\n\t\t\tif ($this->bo->customfields[$name]) $event['#'.$name] = $infolog['#'.$name];\n\t\t}\n\t\t//error_log(__METHOD__.'('.array2string($data).') infolog='.array2string($infolog).' returning '.array2string($event));\n\t\treturn $event;\n\t}", "function saveToDataBase() {\n\t\tglobal $wpdb;\n\t\tglobal $user_ID;\n\t\tglobal $fsCalendar;\n\t\t\n\t\t$errors = array();\n\t\t\n\t\tif ($this->eventid <= 0 && !$fsCalendar->userCanAddEvents()) {\n\t\t\treturn __('No permission to create event', fsCalendar::$plugin_textdom);\n\t\t}\n\t\tif ($this->eventid > 0 && !$this->userCanEditEvent()) {\n\t\t\treturn __('No permission to edit event', fsCalendar::$plugin_textdom);\n\t\t}\n\t\t\n\t\t// Do all the validaten\n\t\tif (!is_array($this->categories)) {\n\t\t\t$this->categories = array(1); // Uncategorized\n\t\t}\n\t\t\n\t\t// Vaidate subject\n\t\tif (empty($this->subject)) {\n\t\t\t$errors[] = __('Please enter a subject', fsCalendar::$plugin_textdom);\n\t\t}\n\t\t// Validate date/time\n\t\t$ret_df = fse_ValidateDate($this->date_admin_from, $this->date_admin_format);\n\t\tif ($ret_df === false) {\n\t\t\t$errors[] = __('Please enter a valid `from` date', fsCalendar::$plugin_textdom);\n\t\t} else {\n\t\t\t$this->date_admin_from = $ret_df;\n\t\t}\n\t\tif ($this->allday == 0) {\n\t\t\t$ret_tf = fse_ValidateTime($this->time_admin_from);\n\t\t\tif ($ret_tf === false) {\n\t\t\t\t$errors[] = __('Please enter a valid `from` time', fsCalendar::$plugin_textdom);\n\t\t\t} else {\n\t\t\t\t$this->time_admin_from = $ret_tf;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->time_admin_from = '00:00';\n\t\t}\n\t\t$ret_dt = fse_ValidateDate($this->date_admin_to, $this->date_admin_format);\n\t\tif ($ret_dt === false) {\n\t\t\t$errors[] = __('Please enter a valid `to` date', fsCalendar::$plugin_textdom);\n\t\t} else {\n\t\t\t$this->date_admin_to = $ret_dt;\n\t\t}\n\t\tif ($this->allday == 0) {\n\t\t\t$ret_tt = fse_ValidateTime($this->time_admin_to);\n\t\t\tif ($ret_tt === false) {\n\t\t\t\t$errors[] = __('Please enter a valid `to` time', fsCalendar::$plugin_textdom);\n\t\t\t} else {\n\t\t\t\t$this->time_admin_to = $ret_tt;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->time_admin_to = '00:00';\n\t\t}\n\t\t\n\t\t$fd = fse_ValidateDate($this->date_admin_from, $this->date_admin_format, true);\n\t\t$ft = fse_ValidateTime($this->time_admin_from, true);\n\t\t$td = fse_ValidateDate($this->date_admin_to, $this->date_admin_format, true);\n\t\t$tt = fse_ValidateTime($this->time_admin_to, true);\n\t\t\n\t\t$from = date('Y-m-d H:i:s', mktime($ft['h'], $ft['m'], 0, $fd['m'], $fd['d'], $fd['y']));\n\t\t$to = date('Y-m-d H:i:s', mktime($tt['h'], $tt['m'], 0, $td['m'], $td['d'], $td['y']));\n\t\t\t\t\n\t\t//$ts_from = mktime($ft['h'], $ft['m'], 0, $fd['m'], $fd['d'], $fd['y']);\n\t\t//$ts_to = mktime($tt['h'], $tt['m'], 0, $td['m'], $td['d'], $td['y']);\n\t\t\n\t\tif (empty($this->state)) {\n\t\t\t$this->state = 'draft';\n\t\t}\n\t\t\n\t\tif ($from > $to) {\n\t\t\t$errors[] = __('End is before start', fsCalendar::$plugin_textdom);\n\t\t}\n\t\t\n\t\t// Error -> return them\n\t\tif (count($errors) > 0) {\n\t\t\treturn $errors;\n\t\t}\n\t\t\t\t\t\t\t\n\t\tif ($this->eventid > 0) {\n\t\t\t// Check authority\n\t\t\tif ($this->userCanEditEvent()) {\n\t\t\t\t$sql = $wpdb->prepare(\"UPDATE \".$wpdb->prefix.'fsevents '.\"\n\t\t\t\t\tSET `subject`=%s, `datefrom`=%s, `dateto`=%s, `allday`=%d, `description`=%s, `location`=%s, `state`=%s, \n\t\t\t\t\t`updatedbypost`=%d \n\t\t\t\t\tWHERE `eventid`=$this->eventid\",\n\t\t \t$this->subject, $from, $to, ($this->allday == true ? 1 : 0), $this->description, $this->location, $this->state, ($this->updatedbypost == true ? 1 : 0));\n\t\t\t} else {\n\t\t\t\t$errors[] = __('No permission to edit event', fsCalendar::$plugin_textdom);\n\t\t\t}\n\t\t} else {\n\t\t\tif ($fsCalendar->userCanAddEvents()) {\n\t\t\t\t$now = get_date_from_gmt(date('Y-m-d H:i:s'));\n\t\t\t\t\n\t\t\t\tif (empty($this->postid))\n\t\t\t\t\t$postid = 'NULL';\n\t\t\t\telse\n\t\t\t\t\t$postid = intval($this->postid);\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t$sql = $wpdb->prepare(\"INSERT INTO \".$wpdb->prefix.'fsevents '.\"\n\t\t\t\t\t(`subject`, `datefrom`, `dateto`, `allday`, `description`, `location`, `author`, `createdaten`, `state`, `postid`, `updatedbypost`)\n\t\t\t\t\tVALUES (%s, %s, %s, %d, %s, %s, $user_ID, %s, %s, $postid, %d)\", \n\t\t \t$this->subject, $from, $to, ($this->allday == true ? 1 : 0), $this->description, $this->location, $now, $this->state, ($this->updatedbypost == true ? 1 : 0));\n\t\t\t} else {\n\t\t\t\t$errors[] = __('No permission to create event', fsCalendar::$plugin_textdom);\n\t\t\t}\n\t\t}\n \n\t\t// Error -> return them\n\t\tif (count($errors) > 0) {\n\t\t\treturn $errors;\n\t\t}\n\t\t\n\t\tif (defined('FSE_SQL_DEBUG') && FSE_SQL_DEBUG == true && defined('WP_DEBUG') && WP_DEBUG == true) {\n\t\t\techo '<p>'.$sql.'</p>';\n\t\t}\n\t\t\n if ($wpdb->query($sql) !== false) {\n \tif ($this->eventid <= 0) {\n\t \t$this->eventid = $wpdb->insert_id;\n\t \t\n\t \t$this->author = $user_ID;\n\t \t$this->createdate = $now;\n\t \t\n\t \t$u = new WP_User($user_ID);\n\t \t$this->author_t = $u->display_name;\n\t \tunset($u);\n\t \t\n\t \t$action = 'edit'; // Switch to edit mode!\n \t} else {\n \t\t$success[] = __('Event updated', fsCalendar::$plugin_textdom);\n \t}\n \t\n \t// Handle categories\n \t$ret_cats = $wpdb->get_col('SELECT `catid` FROM '.$wpdb->prefix.'fsevents_cats WHERE eventid='.$this->eventid);\n \tif (!is_array($ret_cats)) {\n \t\t$ret_cats = array();\n \t}\n \t\n \t// Insert missing\n \tforeach($this->categories as $c) {\n \t\tif (!in_array($c, $ret_cats)) {\n \t\t\t$sql = 'INSERT INTO '.$wpdb->prefix.'fsevents_cats VALUES ('.$this->eventid.','.$c.')';\n \t\t\t$wpdb->query($sql);\n \t\t}\n \t}\n \t// Remove old\n \tforeach($ret_cats as $c) {\n \t\tif (!in_array($c, $this->categories)) {\n \t\t\t$sql = 'DELETE FROM '.$wpdb->prefix.'fsevents_cats WHERE `eventid`='.$this->eventid.' AND `catid`='.$c;\n \t\t\t$wpdb->query($sql);\n \t\t}\n \t}\n \treturn true;\n \t\n } else {\n \t$errors[] = __('DB Error', fsCalendar::$plugin_textdom);\n \treturn $errors;\n }\n\t}", "function saveScheduleInformation() {\n\t\t$db = PearDatabase::getInstance();\n\n\t\t$selectedRecipients = $this->get('selectedRecipients');\n\t\t$scheduledInterval = $this->get('scheduledInterval');\n\t\t$scheduledFormat = $this->get('scheduledFormat');\n\n\t\t$db->pquery('INSERT INTO vtiger_scheduled_reports(reportid, recipients, schedule, format, next_trigger_time) VALUES\n\t\t\t(?,?,?,?,?)', array($this->getId(), $selectedRecipients, $scheduledInterval, $scheduledFormat, date(\"Y-m-d H:i:s\")));\n\t}", "public function store(CalendarRequest $request)\n {\n $date = $this->getDesiredDateRepository->_getDate($request->event, $request->weeks, $request->from, $request->to);\n $this->destroy();\n Calendar::insert($date);\n return $date;\n }", "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'timestamp' => $this->timestamp,\n 'userId' => $this->userId,\n 'location' => $this->location,\n 'description' => $this->description,\n 'calendarId' => $this->calendarId\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function editCalendar($calendarId) {\n $calendar = new base_community_calendar();\n $calInfo = $this->calendarObj->loadCalendar($calendarId);\n if (!$calInfo) {\n $this->_showError('Invalid Calendar!');\n return;\n }\n\n $editDialog = $this->_getCalendarDialog($calInfo);\n $this->layout->add($editDialog->getDialogXML());\n\n $this->layout->addLeft($this->_getPublicCalendarsList($calendarId));\n $this->layout->addLeft($this->_getRecommendedEventsList());\n $this->layout->addRight($this->_getEventsList($calendarId, NULL, $calInfo['title']));\n }", "public function save() {\n \n if (!db_utils::inTransaction()) {\n throw new DBException(\"Sem transaçao ativa com o banco de dados\");\n }\n \n $oDaoCalendario = db_utils::getDao('calendario');\n $oDaoCalendario->ed52_c_descr = $this->sDescricao;\n $oDaoCalendario->ed52_i_ano = $this->iAnoExecucao;\n $oDaoCalendario->ed52_c_passivo = $this->lPassivo ? \"S\" : \"N\";\n $oDaoCalendario->ed52_i_diasletivos = $this->iDiasLetivos;\n $oDaoCalendario->ed52_i_duracaocal = $this->iPeriodicidade;\n $oDaoCalendario->ed52_i_periodo = $this->iPeriodo;\n $oDaoCalendario->ed52_d_inicio = $this->oDtInicio->getDate(DBDate::DATA_EN);\n $oDaoCalendario->ed52_d_fim = $this->oDtFim->getDate(DBDate::DATA_EN);\n $oDaoCalendario->ed52_d_resultfinal = $this->oDtResultado->getDate(DBDate::DATA_EN);\n $oDaoCalendario->ed52_c_aulasabado = $this->lAulaSabado ? \"S\" : \"N\";\n $oDaoCalendario->ed52_i_semletivas = $this->iSemanasLetivas;\n $oDaoCalendario->ed52_i_calendant = $this->getCalendarioAnterior()->getCodigo();\n \n if (empty($this->iCodigo)) {\n \n $oDaoCalendario->ed52_i_codigo = null;\n $oDaoCalendario->incluir(null);\n $this->iCodigo = $oDaoCalendario->ed52_i_codigo;\n } else {\n \n $oDaoCalendario->ed52_i_codigo = $this->iCodigo;\n $oDaoCalendario->alterar($this->iCodigo);\n }\n \n if ($oDaoCalendario->erro_status == 0) {\n \n $sErroMsg = \"Erro ao incluir/alterar o Calendario {$this->sDescricao}.\";\n throw new BusinessException($sErroMsg);\n }\n \n /**\n * Garantimos vinculo do calendario com a escola somente:\n * Quando nao hover o vinculo\n */\n if (!is_null($this->getEscola())) {\n \n $oDaoCalendario = db_utils::getDao('calendarioescola');\n\n $sWhere = \" ed38_i_escola = \" . $this->oEscola->getCodigo();\n $sWhere .= \" and ed38_i_calendario = {$this->iCodigo}\";\n \n $sSqlCalendario = $oDaoCalendario->sql_query_file(null, \"1\", null, $sWhere);\n $rsCalendario = $oDaoCalendario->sql_record($sSqlCalendario);\n \n if ($oDaoCalendario->numrows == 0) {\n \n $oDaoCalendario->ed38_i_calendario = $this->iCodigo;\n $oDaoCalendario->ed38_i_escola = $this->oEscola->getCodigo();\n $oDaoCalendario->ed38_i_codigo = null;\n \n $oDaoCalendario->incluir(null);\n \n if ($oDaoCalendario->erro_status == 0) {\n \n $sErroMsg = \"Erro ao vincular o calendário a Escola.\";\n throw new BusinessException($sErroMsg);\n }\n }\n }\n \n if ($this->getTipoOperacao() != \"Importar\") {\n \n /**\n * Salvamos os periodos do calendario\n */\n foreach ($this->getPeriodos() as $oPeriodo) {\n \n $oPeriodo->salvar($this);\n }\n \n /**\n * Salva os eventos do calendario\n */\n foreach ($this->getEventos() as $oEvento) {\n $oEvento->salvar($this);\n }\n }\n \n return true;\n }", "public function store(CreateCalendarRequest $request)\n\t{\n $input = $request->all();\n\n\t\t$calendar = Calendar::create($input);\n\n\t\tFlash::message('Calendar saved successfully.');\n\n\t\treturn redirect(route('calendars.index'));\n\t}", "public function setCalendar(Calendar $calendar);", "function wec_create_calendar_page(){\n\t\n?>\n<form method=\"post\" action=\"<?php wec_currentURL ()?>?page=calendar.php\">\n\t\n\t\n<table class=\"form-table\">\n\n\t<tr valign=\"top\">\n\t\t<th scope=\"row\"><label for=\"calendarName\">Calendar Name</label></th>\n\t\t<td>\n\t\t\t<input name=\"calendarName\" type=\"text\" id=\"calendarName\" onkeyup=\"duplicateField('calendarName', 'calendarSlug');\" onblur=\"validateCalendarNameOnCreate('<?php echo bloginfo('url'); ?>', 'calendarNameErrorField', 'calendarName', 'submitCalendarAdd');\"/>\n\t\t\t<span class=\"setting-description\" id=\"calendarNameErrorField\"></span>\n\t\t</td>\n\t</tr>\n\t\n<!--\n\t<tr valign=\"top\">\n\t\t<th scope=\"row\"><label for=\"calendarColor\">Calendar Colour</label></th>\n\t\t<td><input name=\"calendarColor\" type=\"text\" id=\"calendarColor\" /></td>\n\t</tr>\n-->\n\n\t<tr valign=\"top\">\n\t\t<th scope=\"row\"><label for=\"calendarSlug\">Calendar Slug</label></th>\n\t\t<td>\n\t\t\t<input name=\"calendarSlug\" type=\"text\" id=\"calendarSlug\" onfocus=\"changeColorBack('calendarSlug');\" onblur=\"validateCalendarSlugOnCreate('<?php echo bloginfo('url'); ?>', 'calendarSlugErrorField', 'calendarSlug', 'submitCalendarAdd');\"/>\n\t\t\t<span class=\"setting-description\" id=\"calendarSlugErrorField\"></span>\n\t\t\t<br />Every calendar automatically becomes an RSS feed of it's contents. \n\t\t\t<br />The slug defines what the URL to the feed looks like.\n\t\t</td>\n\t</tr>\n\t\n\t<tr valign=\"top\">\n\t\t<th scope=\"row\"><label for=\"calendarDescription\">Calendar Description</label></th>\n\t\t<td>\n\t\t\t<input name=\"calendarDescription\" type=\"text\" id=\"calendarDescription\" />\n\n\t\t\t<br />In the RSS feed the description for this calendar will be required\n\t\t\t\n\t\t</td>\n\t</tr>\n\t\n\t\n</table>\n<input type=\"hidden\" name=\"wec_action\" value=\"createCalendar\" />\n<?php wp_nonce_field('createCalendar'); ?>\n<p class=\"submit\"><input type=\"submit\" name=\"Submit\" class=\"button-secondary\" value=\"Save Changes\" id=\"submitCalendarAdd\"/>\n<a href=\"<?php wec_currentURL ()?>?page=calendar.php\"><input type=\"button\" value=\"Back\" class=\"button-secondary\"/></a></p>\n</form>\n\n\n<script type=\"text/javascript\">\n\tdocument.getElementById('calendarName').focus();\n</script>\n\t\n\t\n<?php\n}", "function save() {\n\t\t$values = $this->get_form_values();\t\n\t}", "public function store(Request $request)\n {\n $_calendar = $request->input('calendar') ?: 'Bill Reminders';\n $_id = false;\n\n Calendar::setVar('calendar', '');\n $_calendars = Calendar::readCalendar();\n if ($_calendars->items) {\n $_found = false;\n foreach ($_calendars->items as $_cal) {\n if ($_cal->summary == $_calendar) {\n $_id = $_cal->id;\n break;\n }\n }\n }\n\n if (!$_id) {\n Calendar::setVar('calendar', 'create');\n $_results = Calendar::createCalendar([\n 'summary' => $request->input('calendar') ?: 'Bill Reminders',\n 'description' => 'Created by BillReminder',\n ]);\n /* TO-DO: Needs proper checks. */\n $_id = $_results->id;\n }\n\n if ($_id) {\n Auth::user()->calendar = $_id;\n Auth::user()->save();\n } else {\n die('shoot');\n }\n\n return redirect('home');\n }", "public function store(Request $request)\n {\n $input = $request->all();\n $event_id = $input['event'];\n $user = Auth::user();\n $event = Event::find($event_id);\n $calendar = New Calendar();\n if (!empty($event_id)) {\n $calendar->event_id = $event_id;\n $calendar->price = $event->price;\n $calendar->title = $event->name;\n $calendar->description = $event->description;\n $calendar->created_by = $user->id;\n }\n $calendar->location = $input['location'];\n $calendar->background_color = $input['backgroundColor'];\n $calendar->start = $input['date'];\n $calendar->all_day = $input['all_day'];\n $calendar->save();\n return $calendar;\n }", "function saveEvent($event) {\n $dialog = &$this->_getEventDialog();\n\n if (!$this->calendarObj->validateEventInputDialog($dialog)) {\n $this->layout->add($dialog->getDialogXML());\n $this->layout->addLeft($this->_getPublicCalendarsList());\n $this->layout->addLeft($this->_getRecommendedEventsList());\n return;\n }\n\n $event = $this->calendarObj->getEventFromParams($this->module->params);\n $event['calendar_id'] = (int)$this->module->params['calendar_id'];\n\n $hidden = array();\n\n if (isset($event['event_id'])) {\n\n // update existing event\n\n if ($this->calendarObj->updateEvent($event)) {\n // update successful\n $msgdialog = new base_msgdialog(\n $this, $this->paramName, $hidden, $this->_gt('Event updated.'), 'info'\n );\n $msgdialog->buttonTitle = 'OK';\n $msgdialog->baseLink = $this->getLink(\n array(\n 'cmd' => 'event',\n 'event' => $event['event_id'],\n )\n );\n $this->layout->add($msgdialog->getMsgDialog());\n $this->showEvent((int)$event['event_id']);\n } else {\n // update failed\n $msgdialog = new base_msgdialog(\n $this, $this->paramName, $hidden, $this->_gt('Database error.'), 'error'\n );\n $msgdialog->buttonTitle = 'OK';\n $msgdialog->baseLink = $this->getLink(\n array(\n 'cmd' => 'edit_event',\n 'event' => $event['event_id'],\n )\n );\n $this->layout->add($msgdialog->getMsgDialog());\n $this->editEvent((int)$event['event_id']);\n }\n\n } else {\n\n // add new event\n\n $status = $this->calendarObj->addEvent($event);\n\n if ($status == FALSE) {\n // save failed\n $msgdialog = new base_msgdialog(\n $this, $this->paramName, $hidden, $this->_gt('Database error.'), 'error'\n );\n $msgdialog->buttonTitle = 'OK';\n $msgdialog->baseLink = $this->getLink(\n array(\n 'cmd' => 'add_event',\n )\n );\n $this->layout->add($msgdialog->getMsgDialog());\n $message = $this->_gt('Database error.');\n $type = 'error';\n $this->addEvent();\n } else {\n // save successful\n $msgdialog = new base_msgdialog(\n $this, $this->paramName, $hidden, $this->_gt('Event saved.'), 'info'\n );\n $msgdialog->buttonTitle = 'OK';\n $msgdialog->baseLink = $this->getLink(\n array(\n 'cmd' => 'event',\n 'event' => $status,\n )\n );\n $this->layout->add($msgdialog->getMsgDialog());\n $this->showEvent((int)$status);\n }\n\n }\n }", "public function save_event()\n {\n $event = new CalendarEvent(Input::all());\n $date_init=new \\DateTime(date('Y:m:d h:i:s',strtotime(Input::get('init_at'))));\n $date_end =new \\DateTime(date('Y:m:d h:i:s',strtotime(Input::get('end_at'))));\n $event->init_at = $date_init;\n $event->end_at = $date_end;\n $eventsLikeThisByName = CalendarEvent::where('name',$event->name)->where('all_day','1')->get();\n if(count($eventsLikeThisByName)>0)\n {\n foreach($eventsLikeThisByName as $ev)\n {\n $date_end_ev =new \\DateTime(date('Y:m:d h:i:s',strtotime($ev->end_at)));\n if($ev->all_day && $date_init->diff($date_end_ev)->days<=1 && $date_init>=$date_end_ev)\n {\n $ev->end_at = $event->end_at;\n $ev->save();\n return $ev->id;\n }\n }\n }\n $event->save();\n return $event->id;\n }", "public function saveEvent()\n {\n\n App::get('database')->insert('events',\n [\n 'name' => $_POST['name'],\n 'event_description' => $_POST['event_description'],\n 'image' => '../images/home4.jpg',\n 'date' => $_POST['date'],\n 'user_id' => $_SESSION['user_id'],\n ]\n );\n\n $success = \"Event Created Successfully\";\n\n $events = App::get('database')->selectAll('events');\n\n return page('calender', compact('success', 'events'));\n\n }", "function save_form(){\n\t\n\t// create entry-object and check the data\n\t$entry_obj = new Entries(PATH_TO_DATA, 1);\n\t$entry_obj->check_new_entry($_SESSION['gbook']['new_entry']);\n\t\n\t\n\t// errors -> create error-messages and display form with errors\n\tif(0<count($entry_obj->error)){\n\t\t$errormessage = '<p class=\"gb_error\">';\n\t\tforeach($entry_obj->error as $error){\n\t\t\t$errormessage .= $error.'<br/>';\n\t\t}\n\t\t$errormessage .= '</p>';\n\t\t\n\t\treturn display_form($errormessage);\n\t}\n\t\n\t\n\t// no errors -> save entry\n\telse{\n\t\n\t\t// could save the new entry\n\t\tif($entry_obj->new_entry($_SESSION['gbook']['new_entry'])){\n\t\t\t\n\t\t\t// display info for success and admin-mail\n\t\t\tif(ENABLE_ENTRIES){\n\t\t\t\treturn display_entries('<p class=\"gb_message\">###save_successful_with_adminmail###</p>');\n\t\t\t}\n\t\t\t// display info for success\n\t\t\telse{\n\t\t\t\treturn display_entries('<p class=\"gb_message\">###save_successful###</p>');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// there was a problem when saving the entry\n\t\telse{\n\t\t\treturn display_entries('<p class=\"gb_error\">###save_problem###:<br/>'.$entry_obj->error[0].'</p>');\n\t\t}\n\t}\n}", "public function update(Request $request, Calendar $calendar)\n {\n\n //Verify if it is a new calendar\n if($request['idcalendar']==\"new\"){\n // Validate form submission\n $valid = $request->validate([\n 'school_year' => 'required|string|max:9',\n 'begin_dt' => 'required|date',\n 'end_dt' => 'required|date',\n 'is_active' => 'required|integer'\n ]);\n\n //Insert new calendar in the table\n $calendar_rec = new Calendar($valid);\n $calendar_rec->created_at = Carbon::now();\n $calendar_rec->updated_at = Carbon::now();\n $calendar_rec->save();\n return redirect('/dominos/calendars')->\n with('success', 'Calendar has been added.');\n }else\n {\n // Validate form submission\n $valid = $request->validate([\n 'idcalendar' => 'required|string',\n 'school_year' => 'required|string|max:9',\n 'begin_dt' => 'required|date',\n 'end_dt' => 'required|date',\n 'is_active' => 'required|integer'\n ]); \n\n //Update values for calendar\n $calendar_rec = Calendar::find($valid['idcalendar']);\n $calendar_rec->school_year = $valid['school_year'];\n $calendar_rec->begin_dt = $valid['begin_dt'];\n $calendar_rec->end_dt = $valid['end_dt'];\n $calendar_rec->is_active = $valid['is_active'];\n $calendar_rec->updated_at = Carbon::now();\n $calendar_rec->save();\n return redirect('/dominos/calendars')->\n with('success', 'Calendar has been updated.'); \n }\n\n \n }", "public function actionCreate()\n {\n\n if (!$this->canManageCalendar()) {\n throw new HttpException(403, Yii::t('CalendarExtensionModule.permissions', 'You are not allowed to manage External Calendar!'));\n }\n\n $model = new CalendarExtensionCalendar();\n// $model->title = Yii::$app->request->get('title');\n// $model->scenario = 'create';\n\n $model->content->setContainer($this->contentContainer);\n// $model->content->visibility = ($model->load(Yii::$app->request->post('public'))) ? Content::VISIBILITY_PUBLIC : Content::VISIBILITY_PRIVATE ;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n try {\n // load ical and parse it\n $ical = new ICal($model->url, array(\n 'defaultTimeZone' => Yii::$app->timeZone,\n ));\n // add info to CalendarModel\n $model->addAttributes($ical);\n $model->save();\n } catch (\\Exception $e) {\n return $this->render('create', [\n 'model' => $model,\n 'message' => $e,\n 'contentContainer' => $this->contentContainer\n ]);\n }\n $model->content->visibility = ($model->public) ? Content::VISIBILITY_PUBLIC : Content::VISIBILITY_PRIVATE ;\n $model->save();\n return $this->redirect($this->contentContainer->createUrl('view', array('id' => $model->id)));\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'contentContainer' => $this->contentContainer\n ]);\n }\n }", "public function edit_category() {\r\n\r\n $id = isset($_GET['id']) ? $_GET['id'] : null;\r\n $model = Eabi_Ipenelo_Calendar::service()->get('models/Category');\r\n $model->load($id);\r\n\r\n if (!isset($model->id)) {\r\n $model->is_active = '1';\r\n $model->sort_order = '1';\r\n }\r\n\r\n\r\n\r\n\r\n $event = Eabi_Ipenelo_Calendar::service()->get('forms/Category', (array) $model);\r\n $event->setRenderOnlyCore(false);\r\n\r\n\r\n $html = $event->render();\r\n\r\n $res = $event->toDb();\r\n\r\n //validate\r\n $validationResult = $event->validate($res);\r\n//\t\techo '<pre>'.print_r($res, true).'</pre>';\r\n//\t\techo '<pre>'.print_r($validationResult, true).'</pre>';\r\n//\t\tdie();\r\n\r\n if ($res !== false && count($validationResult) == 0 && !$event->getReadOnly()) {\r\n if (!isset($model->id)) {\r\n Eabi_Ipenelo_Calendar::service()->get('database')->insert($model->getTableName(), $res);\r\n $model->id = Eabi_Ipenelo_Calendar::service()->get('database')->insert_id;\r\n } else {\r\n Eabi_Ipenelo_Calendar::service()->get('database')->update($model->getTableName(), $res, array('id' => $model->id));\r\n }\r\n \r\n if ($model->id <= 0) {\r\n self::addError($this->__->l('Category save failed'));\r\n if (Eabi_Ipenelo_Calendar::service()->get('database')->last_error != '') {\r\n self::addError(htmlspecialchars(Eabi_Ipenelo_Calendar::service()->get('database')->last_error));\r\n }\r\n } else {\r\n self::addMessage($this->__->l('Category successfully saved'));\r\n }\r\n\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar_categories'));\r\n exit();\r\n } else if ($res !== false && count($validationResult) > 0) {\r\n foreach ($validationResult as $error) {\r\n self::addError($error);\r\n }\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n $event->setModel($res);\r\n } else {\r\n //larger problem\r\n }\r\n//\t\techo '<pre>'.print_r($event->toDb(), true).'</pre>';\r\n\r\n echo $html;\r\n //activate the first submenu element\r\n echo $this->openMenu(3);\r\n }", "function drawCreateCalendar($pidList, $object=''){\t\n\t\t$this->objectString = 'calendar';\n\t\tif(is_object($object)){\n\t\t\t$this->conf['view'] = 'edit_'.$this->objectString;\n\t\t}else{\n\t\t\t$this->conf['view'] = 'create_'.$this->objectString;\n\t\t\tunset($this->controller->piVars['uid']);\n\t\t}\n\t\t\n\t\t$requiredFieldSims = Array();\n\t\t$allRequiredFieldsAreFilled = $this->checkRequiredFields($requiredFieldsSims);\n\n\t\t$sims = array();\n\t\t$rems = array();\n\t\t$wrapped = array();\n\n\t\t// If an event has been passed on the form is a edit form\n\t\tif(is_object($object) && $object->isUserAllowedToEdit()){\n\t\t\t$this->isEditMode = true;\n\t\t\t$this->object = $object;\n\t\t}else{\n\t\t\t$a = array();\n\t\t\t$this->object = new tx_cal_calendar_model($a, '');\n\t\t\t$allValues = array_merge($this->getDefaultValues(),$this->controller->piVars);\n\t\t\t$this->object->updateWithPIVars($allValues);\n\t\t}\n\n\t\t$constrainFieldSims = Array();\n\t\t$noComplains = $this->checkContrains($constrainFieldSims);\n\n\t\tif($allRequiredFieldsAreFilled && $noComplains){\n\t\t\t$this->conf['lastview'] = $this->controller->extendLastView();\n\n\t\t\t$this->conf['view'] = 'confirm_'.$this->objectString;\n\t\t\treturn $this->controller->confirmCalendar();\n\t\t}\n\t\t\n\t\t//Needed for translation options:\n\t\t$this->serviceName = 'cal_'.$this->objectString.'_model';\n\t\t$this->table = 'tx_cal_'.$this->objectString;\n\t\t\n\t\t$page = $this->cObj->fileResource($this->conf['view.']['create_calendar.']['template']);\n\t\tif ($page=='') {\n\t\t\treturn '<h3>calendar: no create calendar template file found:</h3>'.$this->conf['view.']['create_calendar.']['template'];\n\t\t}\n\t\t\n\t\tif(is_object($object) && !$object->isUserAllowedToEdit()){\n\t\t\treturn $this->controller->pi_getLL('l_not_allowed_edit').$this->objectString;\n\t\t}else if(!is_object($object) && !$this->rightsObj->isAllowedTo('create',$this->objectString,'')){\n\t\t\treturn $this->controller->pi_getLL('l_not_allowed_create').$this->objectString;\n\t\t}\n\t\t\n\t\t$this->getTemplateSubpartMarker($page, $sims, $rems, $wrapped, $this->conf['view']);\n\n\t\t$page = tx_cal_functions::substituteMarkerArrayNotCached($page, array(), $rems, $wrapped);\n\t\t$page = tx_cal_functions::substituteMarkerArrayNotCached($page, $sims, array(), array ());\n \n\t\t$sims = array();\n\t\t$rems = array();\n\t\t$wrapped = array();\n\n\t\t$this->getTemplateSingleMarker($page, $sims, $rems, $this->conf['view']);\n\t\t$sims['###ACTION_URL###'] = htmlspecialchars($this->controller->pi_linkTP_keepPIvars_url(array('formCheck'=>'1')));\t\n $page = tx_cal_functions::substituteMarkerArrayNotCached($page, array(), $rems, $wrapped);\n\t\t$page = tx_cal_functions::substituteMarkerArrayNotCached($page, $sims, array(), array ());\n\t\treturn tx_cal_functions::substituteMarkerArrayNotCached($page, $requiredFieldsSims, array(), array ());\n\t}", "protected function add_calendar() {\n\t\t// Create an instance of calendar in order to check if it already exists, and only if not add the new one\n\t\t$calendar_obj = new Calendar();\n\n\t\t// Check if calendar was correctly created.\n\t\tif(!$calendar_obj -> exists($this -> f3 -> get('POST.categoria'))) {\n\n\t\t\t$calendar_obj = new Calendar(array(\n\t\t\t\t'categoria' => $this -> f3 -> get('POST.categoria'),\n\t\t\t\t'categorias_por_serie' => $this -> f3 -> get('POST.equipas_por_serie')\n\t\t\t));\n\t\t\t$this -> f3 -> set('message_code', 92);\n\t\t} else {\n\t\t\t$this -> f3 -> set('message_code', 93);\n\t\t}\n\t}", "function wpbs_refresh_calendar() {\n\n\tif( empty( $_POST['action'] ) || $_POST['action'] != 'wpbs_refresh_calendar' ) {\n\t\techo __( '', 'wp-booking-system' );\n\t\twp_die();\n\t}\n\n\tif( empty( $_POST['id'] ) ) {\n\t\twp_die();\n\t}\n\n\t$calendar_id = absint( $_POST['id'] );\n\t$calendar = wpbs_get_calendar( $calendar_id );\n\t$calendar_args = array();\n\n\tforeach( $_POST as $key => $val ) {\n\n\t\tif( in_array( $key, array_keys(wpbs_get_calendar_output_default_args()) ) )\n\t\t\t$calendar_args[$key] = sanitize_text_field( $val );\n\n\t}\n\n\t$calendar_outputter = new WPBS_Calendar_Outputter( $calendar, $calendar_args );\n\t\n\techo $calendar_outputter->get_display();\n\twp_die();\n\n}", "function _getCalendarDialog($data = array('color' => '#FFFFFF')) {\n $data['color'] = @strtoupper($data['color']);\n if (substr($data['color'], 0, 1) != '#') {\n $data['color'] = '#'.$data['color'];\n }\n $fields = array(\n 'title' => array('Title', 'isNoHTML', TRUE, 'input', 255),\n 'color' => array('Color', '/^#[0-9a-f]{6}$/i', TRUE, 'color', 7,\n 'Background color in #RRGGBB Format'),\n );\n $hidden = array('cmd' => 'save_calendar');\n\n if (isset($data['calendar_id'])) {\n $hidden['calendar_id'] = $data['calendar_id'];\n $dialogTitle = 'Edit Calendar';\n } else {\n $dialogTitle = 'Add Calendar';\n }\n\n $dialog = new base_dialog($this->module, $this->paramName, $fields, $data, $hidden);\n $dialog->dialogTitle = $dialogTitle;\n $dialog->loadParams();\n return $dialog;\n }", "function SaveForm()\r\n\t{\r\n\r\n\t}", "public function photoalbumsFormWindowSave(){\n\n\t\t// Validate input\n\t\t$validator = library('Validator');\n\t\t$validator->registerPost('id')->number();\n\t\t$validator->registerPost('title')->required()->maxLength(255);\n\t\t$validator->registerPost('date')->required()->date();\n\t\t$validator->registerPost('online')->number();\n\n\t\tif($validator->validate()){\n\n\t\t\t// Save form\n\t\t\t$data = array(\n\t\t\t\t'title'\t\t\t=> Input::post('title'),\n\t\t\t\t'quicklink'\t\t=> quicklink(Input::post('title')),\n\t\t\t\t'date'\t\t\t=> Input::post('date'),\n\t\t\t\t'description'\t=> Input::post('description'),\n\t\t\t\t'online'\t\t=> Input::postInt('online')\n\t\t\t);\n\t\t\tif(Input::post('id')){\n\t\t\t\t$data['id']\t\t\t= Input::postInt('id');\n\t\t\t\t$data['updated']\t= date('Y-m-d H:i:s');\n\t\t\t}else{\n\t\t\t\t$data['created']\t= date('Y-m-d H:i:s');\n\t\t\t}\n\t\t\t$id = model('PhotoalbumModel')->save($data);\n\n\t\t\t// Output record\n\t\t\t$record = model('PhotoalbumModel')->adminGetPhotoalbumForGrid($id);\n\t\t\toutput_json_encode(array(\n\t\t\t\t'success'\t=> true,\n\t\t\t\t'record'\t=> $record\n\t\t\t));\n\t\t}\n\n\t\t// Output validation errors\n\t\toutput_json_encode(array(\n\t\t\t'success'\t=> false,\n\t\t\t'msg'\t\t=> 'Gelieve alle aangeduide velden te controleren en opnieuw te proberen',\n\t\t\t'errors'\t=> $validator->getAdminErrors()\n\t\t));\n\t}", "public function testSaveForm()\n {\n\n $exhibit = $this->_exhibit();\n\n $exhibit->saveForm(array(\n 'spatial_layers' => array('1','2'),\n 'spatial_layer' => '3',\n 'widgets' => array('4','5'),\n 'title' => '6',\n 'slug' => '7',\n 'narrative' => '8',\n 'public' => '9',\n 'styles' => '10',\n 'map_focus' => '11',\n 'map_zoom' => '12'\n ));\n\n $exhibit = $this->_reload($exhibit);\n\n $this->assertEquals('1,2', $exhibit->spatial_layers);\n $this->assertEquals('3', $exhibit->spatial_layer);\n $this->assertEquals('4,5', $exhibit->widgets);\n $this->assertEquals('6', $exhibit->title);\n $this->assertEquals('7', $exhibit->slug);\n $this->assertEquals('8', $exhibit->narrative);\n $this->assertEquals(9, $exhibit->public);\n $this->assertEquals(10, $exhibit->styles);\n $this->assertEquals(11, $exhibit->map_focus);\n $this->assertEquals(12, $exhibit->map_zoom);\n\n }", "function save()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$data \t= $app->input->post->get('jform', array(), 'array');\n\n\t\tparent::save();\n\t\t\n\t\t$this->setRedirect('index.php?option=com_formularios&view=fields&formId='.$data['formId']);\n\t}", "private function save()\n\t{\n\t\techo(HTML_hiddenVar('cl1', $this->clientOrFile1).HTML_hiddenVar('cl2', $this->clientOrFile2));\n\t\techo(HTML_hiddenVar('orig1', $this->clientOrFile1Orig).HTML_hiddenVar('orig2', $this->clientOrFile2Orig));\n\t\tHTML_showFormEnd();\n\t}", "function _culturefeed_entry_ui_event_save_weekscheme(&$event, $date_control) {\n\n $weekscheme = NULL;\n // Construct the weekscheme.\n if (isset($date_control['opening_times']) && !$date_control['opening_times']['all_day']) {\n\n $weekscheme = new CultureFeed_Cdb_Data_Calendar_Weekscheme();\n foreach ($date_control['opening_times']['days'] as $day => $opening_times) {\n\n $opening_info = new CultureFeed_Cdb_Data_Calendar_SchemeDay($day);\n $open_type = CultureFeed_Cdb_Data_Calendar_SchemeDay::SCHEMEDAY_OPEN_TYPE_CLOSED;\n foreach ($opening_times as $opening_time) {\n if (!empty($opening_time['open_from']) && !empty($opening_time['open_till'])) {\n $open_type = CultureFeed_Cdb_Data_Calendar_SchemeDay::SCHEMEDAY_OPEN_TYPE_OPEN;\n $opening_info->addOpeningTime(new CultureFeed_Cdb_Data_Calendar_OpeningTime($opening_time['open_from'], $opening_time['open_till']));\n }\n }\n\n $opening_info->setOpenType($open_type);\n $weekscheme->setDay($day, $opening_info);\n\n }\n\n }\n\n if ($date_control['type'] == 'period') {\n $calendar = new CultureFeed_Cdb_Data_Calendar_PeriodList();\n $period = new CultureFeed_Cdb_Data_Calendar_Period($date_control['period']['start_date'], $date_control['period']['end_date']);\n if ($weekscheme) {\n $period->setWeekScheme($weekscheme);\n }\n $calendar->add($period);\n }\n else {\n $calendar = new CultureFeed_Cdb_Data_Calendar_Permanent();\n if ($weekscheme) {\n $calendar->setWeekScheme($weekscheme);\n }\n }\n\n $event->setCalendar($calendar);\n\n}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|max:25', \n 'description' => 'required|max:100', \n 'start_time' => 'required|date|date_format:Y-m-d H:i:s|before:end_time',\n 'end_time' => 'required|date|date_format:Y-m-d H:i:s|after:start_time'\n ]);\n\n $event = new Calendar($request->all());\n $event->user_id = Auth::user()->id;\n $event->save();\n\n Session::flash('message', 'Wydarzenie zostało dodane');\n\n return redirect('/calendar');\n }", "public function updateCalendarDate() {\n try {\n if (!($this->calendar instanceof Base_Model_ObtorLib_App_Core_System_Entity_Calendar)) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception(\" System Calendar Entity not intialized\");\n } else {\n $data = array('start' => $this->calendar->getStartDate(),\n 'end' => $this->calendar->getEndDate());\n return $this->update($data, 'id = ' . (int) $this->calendar->getId());\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception($ex);\n }\n }", "function saveSettings() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\timport('classes.notification.form.NotificationSettingsForm');\n\n\t\t$notificationSettingsForm = new NotificationSettingsForm();\n\t\t$notificationSettingsForm->readInputData();\n\n\t\tif ($notificationSettingsForm->validate()) {\n\t\t\t$notificationSettingsForm->execute();\n\t\t\tPKPRequest::redirect(NotificationHandler::getContextDepthArray(), 'notification', 'settings');\n\t\t} else {\n\t\t\t$notificationSettingsForm->display();\n\t\t}\n\t}", "public function action_saveschedule()\n\t{\n\t\t$startdate = $_POST[\"startdate\"];\n\t\t$startdate = date('Y-m-d',strtotime($startdate));\n\t\t$enddate = $_POST[\"enddate\"];\n\t\t$enddate = date('Y-m-d',strtotime($enddate));\n\t\t$doccalendarid = $_POST[\"calid\"];\n\t\t$docid = $_POST[\"docid\"];\n\t\t$shortvisit = $_POST[\"shortvisit\"];\n\t\t$longvisit = $_POST[\"longvisit\"];\n\t\t$appstartegy = $_POST[\"appstartegy\"];\n\t\t$restricteddates = $_POST[\"restricteddates\"];\t\t\n\t\t$mondaydata = $_POST[\"monday\"];\t\t\n\t\t$tuesdaydata = $_POST[\"tuesday\"];\n\t\t$wednesdaydata = $_POST[\"wednesday\"];\n\t\t$thursdaydata = $_POST[\"thursday\"];\n\t\t$fridaydata = $_POST[\"friday\"];\n\t\t$saturdaydata = $_POST[\"saturday\"];\n\t\t$sundaydata = $_POST[\"sunday\"];\n\t\t$chargetype = $_POST[\"chargetype\"];\n\t\t$schedulename = $_POST[\"schedulename\"];\n\t\tif($appstartegy == \"blockslot\")\n\t\t\t$blockval = $_POST[\"blockval\"];\n\t\telse\n\t\t\t$blockval =\"\";\t\t\n\t\t\n\t\t//get actual dates in the range of start date and end date\n\t\t$completearr = $this->getdatesinrange($startdate,$enddate) ;\n\t\t\n\t\t//find all active schedules of the doctor\n\t\t$objdoctorschedule = new Model_Doctorschedule;\n\t\t$objdoctorschedule=$objdoctorschedule-> where('refdocschedulecalendarid_c','=',$doccalendarid )->where('status_c','=','active') ->find_all();\n\t\t\n\t\t//if any previous schedule overlaps then delete it\t\t\n\t\tforeach($objdoctorschedule as $res)\n\t\t{\n\t\t\tfor($i=0;$i<sizeof($completearr);$i++ )\n\t\t\t{\n\t\t\t\tif($res->startdate_c <= $completearr[$i] && $completearr[$i]<=$res->enddate_c )\n\t\t\t\t{\n\t\t\t\t\t$oldscheduleid =$res->id;\n\t\t\t\t\t$objdoctorschedule = new Model_Doctorschedule;\n\t\t\t\t\t$objdoctorschedule-> where('id','=',$oldscheduleid );\n\t\t\t\t\t\n\t\t\t\t\tforeach($objdoctorschedule->find_all() as $res)\n\t\t\t\t\t{\n\t\t\t\t\t\t$objdoctorscheduleslots = new Model_Doctorscheduleslot;\t\t\t\n\t\t\t\t\t\t$objdoctorscheduleslots = $objdoctorscheduleslots->where('refdoctorscheduleslotid_c','=',$res->id)->find_all();\n\t\t\t\t\t\tforeach($objdoctorscheduleslots as $r )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$r->delete();\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$res->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t//push all new restricted dates in $newresticteddates\n\t\t$arrresdates= explode(\",\", $restricteddates);\n\t\t$newresticteddates = array();\n\t\t\n\t\tfor($j=0;$j<sizeof($arrresdates);$j++ )\n\t\t{\n\t\t\tif( strtotime($startdate)<= strtotime($arrresdates[$j] ) && strtotime($arrresdates[$j]) <= strtotime( $enddate) )\n\t\t\t{\n\t\t\t\tarray_push( $newresticteddates, date('Y-m-d',strtotime( $arrresdates[$j])));\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t//set new scheule and save it\n\t\tfor($i=0;$i<sizeof($completearr);$i++ )\n\t\t{\n\t\t\t$result = $this->savedocschedule($doccalendarid,$completearr[$i] ,$completearr[$i] ,$shortvisit,$longvisit,$blockval,$appstartegy,$restricteddates,$schedulename);\n\t\t\tif( array_search($completearr[$i],( $newresticteddates)) == FALSE)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->adddayschedule($result,date('l',strtotime($completearr[$i] )) ,$mondaydata,$tuesdaydata,$wednesdaydata,$thursdaydata,$fridaydata,$saturdaydata,$sundaydata );\n\t\t\t}\n\t\t}\n\t\techo $result;\t\n\t}", "public function _formSave(\\stdClass $formData);", "function save()\n {\n $cst_id = self::getFilterID($_POST[\"title\"]);\n // loop through all available date fields and prepare the values for the sql query\n $date_fields = array(\n 'created_date',\n 'updated_date',\n 'last_response_date',\n 'first_response_date',\n 'closed_date'\n );\n foreach ($date_fields as $field_name) {\n $date_var = $field_name;\n $filter_type_var = $field_name . '_filter_type';\n $date_end_var = $field_name . '_end';\n if (@$_POST['filter'][$field_name] == 'yes') {\n $$date_var = \"'\" . Misc::escapeString($_POST[$field_name][\"Year\"] . \"-\" . $_POST[$field_name][\"Month\"] . \"-\" . $_POST[$field_name][\"Day\"]) . \"'\";\n $$filter_type_var = \"'\" . $_POST[$field_name]['filter_type'] . \"'\";\n if ($$filter_type_var == \"'between'\") {\n $$date_end_var = \"'\" . Misc::escapeString($_POST[$date_end_var][\"Year\"] . \"-\" . $_POST[$date_end_var][\"Month\"] . \"-\" . $_POST[$date_end_var][\"Day\"]) . \"'\";\n } elseif (($$filter_type_var == \"'null'\") || ($$filter_type_var == \"'in_past'\")) {\n $$date_var = \"NULL\";\n $$date_end_var = \"NULL\";\n } else {\n $$date_end_var = \"NULL\";\n }\n } else {\n $$date_var = 'NULL';\n $$filter_type_var = \"NULL\";\n $$date_end_var = 'NULL';\n }\n }\n\n // save custom fields to search\n if ((is_array($_POST['custom_field'])) && (count($_POST['custom_field']) > 0)) {\n foreach ($_POST['custom_field'] as $fld_id => $search_value) {\n if (empty($search_value)) {\n unset($_POST[$fld_id]);\n }\n }\n $custom_field_string = serialize($_POST['custom_field']);\n } else {\n $custom_field_string = '';\n }\n\n if (empty($_POST['is_global'])) {\n $is_global_filter = 0;\n } else {\n $is_global_filter = $_POST['is_global'];\n }\n if ($cst_id != 0) {\n $stmt = \"UPDATE\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"custom_filter\n SET\n cst_iss_pri_id='\" . Misc::escapeInteger($_POST[\"priority\"]) . \"',\n cst_keywords='\" . Misc::escapeString($_POST[\"keywords\"]) . \"',\n cst_users='\" . Misc::escapeString($_POST[\"users\"]) . \"',\n cst_reporter=\" . Misc::escapeInteger($_POST[\"reporter\"]) . \",\n cst_iss_sta_id='\" . Misc::escapeInteger($_POST[\"status\"]) . \"',\n cst_iss_pre_id='\" . Misc::escapeInteger(@$_POST[\"release\"]) . \"',\n cst_iss_prc_id='\" . Misc::escapeInteger(@$_POST[\"category\"]) . \"',\n cst_rows='\" . Misc::escapeString($_POST[\"rows\"]) . \"',\n cst_sort_by='\" . Misc::escapeString($_POST[\"sort_by\"]) . \"',\n cst_sort_order='\" . Misc::escapeString($_POST[\"sort_order\"]) . \"',\n cst_hide_closed='\" . Misc::escapeInteger(@$_POST[\"hide_closed\"]) . \"',\n cst_show_authorized='\" . Misc::escapeString(@$_POST[\"show_authorized_issues\"]) . \"',\n cst_show_notification_list='\" . Misc::escapeString(@$_POST[\"show_notification_list_issues\"]) . \"',\n cst_created_date=$created_date,\n cst_created_date_filter_type=$created_date_filter_type,\n cst_created_date_time_period='\" . @Misc::escapeInteger(@$_REQUEST['created_date']['time_period']) . \"',\n cst_created_date_end=$created_date_end,\n cst_updated_date=$updated_date,\n cst_updated_date_filter_type=$updated_date_filter_type,\n cst_updated_date_time_period='\" . @Misc::escapeInteger(@$_REQUEST['updated_date']['time_period']) . \"',\n cst_updated_date_end=$updated_date_end,\n cst_last_response_date=$last_response_date,\n cst_last_response_date_filter_type=$last_response_date_filter_type,\n cst_last_response_date_time_period='\" .@ Misc::escapeInteger(@$_REQUEST['last_response_date']['time_period']) . \"',\n cst_last_response_date_end=$last_response_date_end,\n cst_first_response_date=$first_response_date,\n cst_first_response_date_filter_type=$first_response_date_filter_type,\n cst_first_response_date_time_period='\" . @Misc::escapeInteger(@$_REQUEST['first_response_date']['time_period']) . \"',\n cst_first_response_date_end=$first_response_date_end,\n cst_closed_date=$closed_date,\n cst_closed_date_filter_type=$closed_date_filter_type,\n cst_closed_date_time_period='\" . @Misc::escapeInteger(@$_REQUEST['closed_date']['time_period']) . \"',\n cst_closed_date_end=\" . Misc::escapeString($closed_date_end) . \",\n cst_is_global=\" . Misc::escapeInteger($is_global_filter) . \",\n cst_search_type='\" . Misc::escapeString($_POST['search_type']) . \"',\n cst_custom_field='\" . Misc::escapeString($custom_field_string) . \"'\n WHERE\n cst_id=$cst_id\";\n } else {\n $stmt = \"INSERT INTO\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"custom_filter\n (\n cst_usr_id,\n cst_prj_id,\n cst_title,\n cst_iss_pri_id,\n cst_keywords,\n cst_users,\n cst_reporter,\n cst_iss_sta_id,\n cst_iss_pre_id,\n cst_iss_prc_id,\n cst_rows,\n cst_sort_by,\n cst_sort_order,\n cst_hide_closed,\n cst_show_authorized,\n cst_show_notification_list,\n cst_created_date,\n cst_created_date_filter_type,\n cst_created_date_time_period,\n cst_created_date_end,\n cst_updated_date,\n cst_updated_date_filter_type,\n cst_updated_date_time_period,\n cst_updated_date_end,\n cst_last_response_date,\n cst_last_response_date_filter_type,\n cst_last_response_date_time_period,\n cst_last_response_date_end,\n cst_first_response_date,\n cst_first_response_date_filter_type,\n cst_first_response_date_time_period,\n cst_first_response_date_end,\n cst_closed_date,\n cst_closed_date_filter_type,\n cst_closed_date_time_period,\n cst_closed_date_end,\n cst_is_global,\n cst_search_type,\n cst_custom_field\n ) VALUES (\n \" . Auth::getUserID() . \",\n \" . Auth::getCurrentProject() . \",\n '\" . Misc::escapeString($_POST[\"title\"]) . \"',\n '\" . Misc::escapeInteger($_POST[\"priority\"]) . \"',\n '\" . Misc::escapeString($_POST[\"keywords\"]) . \"',\n '\" . Misc::escapeString($_POST[\"users\"]) . \"',\n '\" . Misc::escapeInteger($_POST[\"reporter\"]) . \"',\n '\" . Misc::escapeInteger($_POST[\"status\"]) . \"',\n '\" . Misc::escapeInteger(@$_POST[\"release\"]) . \"',\n '\" . Misc::escapeInteger(@$_POST[\"category\"]) . \"',\n '\" . Misc::escapeString($_POST[\"rows\"]) . \"',\n '\" . Misc::escapeString($_POST[\"sort_by\"]) . \"',\n '\" . Misc::escapeString($_POST[\"sort_order\"]) . \"',\n '\" . Misc::escapeInteger(@$_POST[\"hide_closed\"]) . \"',\n '\" . Misc::escapeString(@$_POST[\"show_authorized_issues\"]) . \"',\n '\" . Misc::escapeString(@$_POST[\"show_notification_list_issues\"]) . \"',\n $created_date,\n $created_date_filter_type,\n '\" . @Misc::escapeInteger(@$_REQUEST['created_date']['time_period']) . \"',\n $created_date_end,\n $updated_date,\n $updated_date_filter_type,\n '\" . @Misc::escapeInteger(@$_REQUEST['updated_date']['time_period']) . \"',\n $updated_date_end,\n $last_response_date,\n $last_response_date_filter_type,\n '\" . @Misc::escapeInteger(@$_REQUEST['response_date']['time_period']) . \"',\n $last_response_date_end,\n $first_response_date,\n $first_response_date_filter_type,\n '\" . @Misc::escapeInteger(@$_REQUEST['first_response_date']['time_period']) . \"',\n $first_response_date_end,\n $closed_date,\n $closed_date_filter_type,\n '\" . @Misc::escapeInteger(@$_REQUEST['closed_date']['time_period']) . \"',\n $closed_date_end,\n \" . Misc::escapeInteger($is_global_filter) . \",\n '\" . Misc::escapeString($_POST['search_type']) . \"',\n '\" . Misc::escapeString($custom_field_string) . \"'\n )\";\n }\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return -1;\n } else {\n return 1;\n }\n }", "public function save()\n {\n $_SESSION['reservation'] = serialize($this);\n }", "public function saveFormValues()\n {\n $mumieTask = $this->object;\n\n $mumieTask->setTitle($this->form->getInput('title'));\n $mumieTask->setServer($this->form->getInput('xmum_server'));\n $mumieTask->setMumieCourse($this->form->getInput('xmum_course'));\n $mumieTask->setTaskurl($this->form->getInput('xmum_task'));\n $mumieTask->setLanguage($this->form->getInput('xmum_language'));\n $mumieTask->setLaunchcontainer($this->form->getInput('xmum_launchcontainer'));\n $mumieTask->setMumieCoursefile($this->form->getInput('xmum_coursefile'));\n\n $mumieTask->setDescription($this->form->getInput('description'));\n $mumieTask->update();\n\n require_once('Customizing/global/plugins/Services/Repository/RepositoryObject/MumieTask/classes/tasks/class.ilMumieTaskMultiUploadProcessor.php');\n $tasks_json = $this->form->getInput(\"xmum_multi_problems\");\n if (!empty($tasks_json)) {\n ilMumieTaskMultiUploadProcessor::process($mumieTask, $tasks_json);\n }\n }", "function edit($id){\nglobal $language,$maand;\n\n$query = \"select id,title,description,url,email,cat,cat_name,day,month,year from events left join calendar_cat on events.cat=calendar_cat.cat_id where events.id='$id'\";\n$result = mysql_query($query);\n$rowe = mysql_fetch_object($result);\n\necho \"<h3>\".translate(\"upevent\").\"</h3>\\n\";\necho \"<form action=calendar.php?op=upevent&id=$id method=post>\\n\";\necho translate(\"eventitle\").\"<br>\\n\";\necho \"<input type=text name=title value=\\\"\".stripslashes($rowe->title).\"\\\"><br>\\n\";\necho translate(\"description\").\"<br>\\n\";\necho \"<textarea name=description cols=50 rows=7>\".stripslashes(strip_tags($rowe->description)).\"</textarea><br>\\n\";\necho translate(\"email\").\"<br>\\n\";\necho \"<input type=text name=email value=\\\"\".$rowe->email.\"\\\"><br>\\n\";\necho \"URL<br>\\n\";\necho \"<input type=text name=url value=\\\"\".$rowe->url.\"\\\"><br>\\n\";\n// get the categories\necho \"<select name=cat>\\n\\t\";\n$query = \"select cat_id,cat_name from calendar_cat\";\n$result = mysql_query($query);\n while ($row = mysql_fetch_object($result)){\n echo \"\\t<option value=\".$row->cat_id;\n if ($rowe->cat == $row->cat_id){\n echo \" selected\";\n }\n echo \">\".$row->cat_name.\"\\n\";\n }\n\necho \"</select>\\n<br>\\n\";\n\n// get days\necho translate(\"bdate\").\"<br>\\n\";\necho \"<select name=bday>\\n\\t\";\nfor ($i = 1;$i<=31;$i++){\necho \"\\t<option\";\nif ($rowe->day == $i){\necho \" selected\";\n}\necho \">$i\\n\";\n}\necho \"</select>&nbsp;&nbsp;\\n\";\n\n// get months\necho \"<select name=bmonth>\\n\\t<option value=0>\".translate(\"selectmonth\").\"\\n\";\nfor($i=1;$i<13;$i++){ \n echo \"\\t<option\";\n if ($rowe->month == $i){\n echo \" selected\";\n }\n echo \" value=\".$i.\">\".ucfirst($maand[$i]).\"\\n\"; \n} \necho \"</select>&nbsp;&nbsp;\\n\";\n\n// get year and give 3 years more to select\necho \"<select name=byear>\\n\\t\";\n$year = date(\"Y\");\nfor ($i=0;$i<=4;$i++){\necho \"\\t<option\";\nif ($rowe->year == $year){\necho \" selected\";\n}\necho \">$year\\n\";\n$year += 1;\n}\necho \"</select><br>\\n\";\n\necho \"<input type=submit value=\\\"\".translate(\"upevent\").\"\\\">\\n<br>\\n\";\n\necho \"<form>\\n\";\n\n\n}", "public function actionCreate()\n {\n $model = new Calendar();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create_edit_event_dialog() {\n\t\t?>\n\t\t\t<div id=\"edit-event-dialog\" style=\"display:none\">\n\t\t\t<input type=\"hidden\" id=\"editEventDate\" value=\"\"/>\n\t\t\t\t<div class=\"wpa-add-result-field\">\n\t\t\t\t\t<label class=\"required\"><?php echo $this->get_property('add_result_name'); ?>:</label>\n\t\t\t\t\t<input style=\"background: #fff\" class=\"ui-widget ui-widget-content ui-state-default ui-corner-all add-result-required\" size=\"40\" maxlength=100 type=\"text\" id=\"editEventName\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"wpa-add-result-field add-result-no-bg\">\n\t\t\t\t\t<label class=\"required\"><?php echo $this->get_property('add_result_event_category'); ?>:</label>\n\t\t\t\t\t<select class=\"add-result-required\" id=\"editEventCategory\">\n\t\t\t\t\t\t<option value=\"\" selected=\"selected\"></option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"wpa-add-result-field add-result-no-bg\">\n\t\t\t\t\t<label class=\"required\"><?php echo $this->get_property('add_result_location'); ?>:</label>\n\t\t\t\t\t<input class=\"ui-widget ui-widget-content ui-state-default ui-corner-all add-result-required\" size=\"25\" maxlength=100 type=\"text\" id=\"editEventLocation\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"wpa-add-result-field add-result-no-bg\">\n\t\t\t\t\t<label class=\"required\"><?php echo $this->get_property('add_result_event_sub_type'); ?>:</label>\n\t\t\t\t\t<select class=\"add-result-required\" id=\"editEventSubType\">\n\t\t\t\t\t\t<option value=\"\" selected=\"selected\"></option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"wpa-add-result-field add-result-no-bg\">\n\t\t\t\t\t<label class=\"required\"><?php echo $this->get_property('add_result_event_date'); ?>:</label>\n\t\t\t\t\t<input readonly=\"readonly\" style=\"position:relative; top:-2px\" class=\"ui-widget ui-widget-content ui-state-default ui-corner-all add-result-required\" size=\"30\" type=\"text\" id=\"editResultDate\"/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php\n\t\t}", "public function store(Request $request)\n {\n $calendar = new Calendar;\n\n $calendar->id = $request->id;\n $calendar->starteddate = $request->starteddate;\n $calendar->enddate = $request->enddate;\n $calendar->frequency = $request->frequency; \n\n if($calendar->save()){\n return new CalendarResource($calendar);\n } \n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $h_calendar_patan_dt = HCalendarPatanDts::findFirstByid($id);\n\n if (!$h_calendar_patan_dt) {\n $this->flash->error(\"カレンダーパタンが見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($h_calendar_patan_dt->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスからカレンダーパタンが変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $h_calendar_patan_dt->kousin_user_id . \" tb=\" . $h_calendar_patan_dt->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"bikou\",\n \"updated\",\n ];\n \n\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ($this->request->getPost($post_fld) !== $h_calendar_patan_dt->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"h_calendar_patan_dts\",\n \"action\" => \"edit\",\n \"params\" => array($h_calendar_patan_dt->id)\n ));\n\n return;\n }\n\n $this->_bakOut($h_calendar_patan_dt, 0);\n\n foreach ($post_flds as $post_fld) {\n $h_calendar_patan_dt->$post_fld = $this->request->getPost($post_fld);\n }\n\n if (!$h_calendar_patan_dt->save()) {\n\n foreach ($h_calendar_patan_dt->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"カレンダーパタンの情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'edit',\n 'params' => array($h_calendar_patan_dt->id)\n ));\n }", "function createCalendar($title, $details, $timezone, $hidden, $color, $location) {\n if ($this->authenticated === false) {\n return false;\n } else if (empty($title) || empty($timezone) || !is_bool($hidden) || empty($color) || empty($location)) {\n return false;\n }\n\n $data = array(\n \"data\" => array(\n \"title\" => $title,\n \"details\" => $details,\n \"timeZone\" => $timezone,\n \"hidden\" => $hidden,\n \"color\" => $color,\n \"location\" => $location\n )\n );\n\n $headers = array('Content-type: application/json');\n\n $ch = $this->curlPostHandle(\"https://www.google.com/calendar/feeds/default/owncalendars/full\", true, $headers);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n curl_setopt($ch, CURLOPT_HEADER, true);\n\n $response = curl_exec($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $response_headers = $this->http_parse_headers($response);\n\n curl_close($ch);\n unset($ch);\n\n if ($http_code == 302) {\n\n $url = $response_headers['Location'];\n\n $ch = $this->curlPostHandle($url, true, $headers);\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n\n $response = curl_exec($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if ($http_code == 201) {\n return json_decode($response);\n } else {\n return false;\n }\n\n } else if ($http_code == 201) {\n return json_decode($response);\n } else {\n return false;\n }\n }", "public function edit_registrant() {\r\n $id = isset($_GET['id']) ? $_GET['id'] : null;\r\n $model = Eabi_Ipenelo_Calendar::service()->get('models/Registrant');\r\n $model->load($id);\r\n\r\n if (!isset($model->id)) {\r\n $model->registration_date = date('Y-m-d H:i:s', current_time('timestamp'));\r\n\r\n //check the event id\r\n $eventModel = Eabi_Ipenelo_Calendar::service()->get('models/Event');\r\n\r\n if (isset($_REQUEST['event_id']) && is_numeric($_REQUEST['event_id'])\r\n && $eventModel->exists($_REQUEST['event_id'])) {\r\n $model->event_id = $_REQUEST['event_id'];\r\n } else {\r\n self::addError($this->__->l('Event does not exist'));\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar'));\r\n exit();\r\n }\r\n }\r\n\r\n\r\n\r\n $event = Eabi_Ipenelo_Calendar::service()->get('forms/Registrant', (array) $model);\r\n\r\n $event->setRenderOnlyCore(false);\r\n if (isset($_GET['event_id'])) {\r\n $event->addHiddenField('event_id', $_GET['event_id']);\r\n }\r\n\r\n\r\n $html = $event->render();\r\n\r\n $res = $event->toDb();\r\n $evModel = $event->getModel();\r\n if ((int) $id > 0) {\r\n $evModel['id'] = $id;\r\n $event->setModel($evModel);\r\n }\r\n\r\n //validate\r\n $validationResult = $event->validate($res);\r\n//\t\techo '<pre>'.print_r($res, true).'</pre>';\r\n//\t\techo '<pre>'.print_r($validationResult, true).'</pre>';\r\n//\t\tdie();\r\n\r\n if ($res !== false && count($validationResult) == 0 && !$event->getReadOnly()) {\r\n unset($res['id']);\r\n if (!isset($model->id)) {\r\n $res['order_hash'] = $model->getHash();\r\n\r\n //if wp_user_id has been set and first_name, last_name is empty then set them\r\n if ($res['wp_user_id'] > 0 && ($res['first_name'] == '' || $res['last_name'] == '')) {\r\n $userData = get_userdata($res['wp_user_id']);\r\n if ($userData === false) {\r\n throw new Exception('Invalid wp_user_id');\r\n }\r\n\r\n if ($res['first_name'] == '') {\r\n $res['first_name'] = $userData->user_firstname;\r\n }\r\n if ($res['last_name'] == '') {\r\n $res['last_name'] = $userData->user_lastname;\r\n }\r\n }\r\n\r\n //if status == STATUS_ACCEPTED (check payment date, and warn else mark paid, accept)\r\n //if status == PAYMENT_ACCEPTED (set payment date, mark paid)\r\n $runMarkPaid = false;\r\n $runMarkAccepted = false;\r\n $runMarkRejected = false;\r\n if ($res['status'] == Eabi_Ipenelo_Calendar_Model_Registrant::STATUS_ACCEPTED) {\r\n $eventModel->load($_GET['event_id']);\r\n if ($eventModel->is_paid_event) {\r\n $runMarkPaid = true;\r\n if ($res['payment_date'] == '' || $res['payment_date'] == '0000-00-00 00:00:00') {\r\n self::addError($this->__->l('Payment date was not set for the event, if the saved Registrant did not actually pay, then re-open the registrant and verify details before saving'));\r\n }\r\n }\r\n $runMarkAccepted = true;\r\n }\r\n if ($res['status'] == Eabi_Ipenelo_Calendar_Model_Registrant::STATUS_PAYMENT_ACCEPTED) {\r\n $runMarkPaid = true;\r\n }\r\n if ($res['status'] == Eabi_Ipenelo_Calendar_Model_Registrant::STATUS_REJECTED) {\r\n $runMarkRejected = true;\r\n }\r\n\r\n\r\n Eabi_Ipenelo_Calendar::service()->get('database')->insert($model->getTableName(), $res);\r\n $model->id = Eabi_Ipenelo_Calendar::service()->get('database')->insert_id;\r\n if ($model->id > 0) {\r\n\r\n $eventParams = array(\r\n 'registrant' => (array) $model->load($model->id),\r\n 'event' => (array) $eventModel->load($model->event_id),\r\n );\r\n Eabi_Ipenelo_Calendar::service()->get('event')->event('new_registrant', $eventParams);\r\n\r\n if ($runMarkPaid) {\r\n if ($model->markAsPaid(true)) {\r\n self::addMessage($this->__->l('Registrant was marked as paid'));\r\n } else {\r\n self::addError($this->__->l('Event was not marked as paid'));\r\n }\r\n }\r\n if ($runMarkAccepted) {\r\n self::addMessage($this->__->l('Registrant marked as accepted'));\r\n Eabi_Ipenelo_Calendar::service()->get('event')->event('accept_registrant', $eventParams);\r\n }\r\n if ($runMarkRejected) {\r\n self::addMessage($this->__->l('Registrant marked as rejected'));\r\n Eabi_Ipenelo_Calendar::service()->get('event')->event('reject_registrant', $eventParams);\r\n }\r\n }\r\n } else {\r\n Eabi_Ipenelo_Calendar::service()->get('database')->update($model->getTableName(), $res, array('id' => $model->id));\r\n }\r\n\r\n if ($model->id <= 0) {\r\n self::addError($this->__->l('Registrant failed'));\r\n if (Eabi_Ipenelo_Calendar::service()->get('database')->last_error != '') {\r\n self::addError(htmlspecialchars(Eabi_Ipenelo_Calendar::service()->get('database')->last_error));\r\n }\r\n } else {\r\n self::addMessage($this->__->l('Registrant successfully saved'));\r\n }\r\n\r\n wp_redirect(admin_url('admin.php?page=ipenelo_calendar_view_registrants&event_id=' . $model->event_id));\r\n exit();\r\n } else if ($res !== false && count($validationResult) > 0) {\r\n foreach ($validationResult as $error) {\r\n self::addError($error);\r\n }\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n if ((int) $id > 0) {\r\n $res['id'] = $id;\r\n }\r\n\r\n $event = Eabi_Ipenelo_Calendar::service()->get('forms/Registrant', (array) $res);\r\n $event->reset();\r\n $event->setModel($res);\r\n $html = $event->render();\r\n } else {\r\n //larger problem\r\n }\r\n//\t\techo '<pre>'.print_r($event->toDb(), true).'</pre>';\r\n\r\n echo $html;\r\n //activate the first submenu element\r\n echo $this->openMenu(1);\r\n }", "public function saveBuildingForm()\n {\n $msg = \"Building created successfully\";\n \n $validatedData = $this->validate();\n\n $newBuilding = Building::updateOrCreate(\n ['id' => $this->building_id],\n $validatedData\n );\n\n if (strcmp($this->submit_btn_title, \"save\")==0) {\n $newBuilding->contact()->create(['type' => 'primary']);\n } else {\n $msg = \"Building updated successfully\";\n }\n \n $this->dispatchBrowserEvent('closeBuildingModal');\n $this->emit('refreshBuildings');\n //$this->emit('refreshApartments');\n $this->emit(\n 'alert', \n [\n 'type'=>'success',\n 'message'=>$msg,\n ]\n );\n }", "public function reportForm( $com_dat )\n\t{\n\t\t$this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ), 'calendar' );\n\n\t\t$eventid\t= intval($this->request['event_id']);\n\t\t$comment\t= intval($this->request['comment_id']);\n\t\t$st\t\t\t= intval($this->request['st']);\n\t\t\n\t\tif( ! $eventid )\n\t\t{\n\t\t\t$this->registry->output->showError( 'reports_no_event', 10177 );\n\t\t}\n\n\t\t/**\n\t\t * Load event\n\t\t */\n\t\t$event = $this->DB->buildAndFetch( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'e.*',\n\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'cal_events' => 'e' ),\n\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'e.event_id=' . $eventid,\n\t\t\t\t\t\t\t\t\t\t\t\t'add_join'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'c.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'cal_calendars' => 'c' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'c.cal_id=e.event_calendar_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)\t\t);\n\n\t\t/* Loop through the cache and build calendar jump */\n\t\tif ( count( $this->caches['calendars'] ) AND is_array( $this->caches['calendars'] ) )\n\t\t{\n\t\t\tforeach( $this->caches['calendars'] as $cal_id => $cal )\n\t\t\t{\n\t\t\t\tif( $cal_id == $event['event_calendar_id'] )\n\t\t\t\t{\n\t\t\t\t\t/* Got a perm */\n\t\t\t\t\tif( ! $this->registry->permissions->check( 'view', $cal ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->registry->output->showError( 'reports_no_event', 10178 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$ex_form_data = array(\n\t\t\t\t\t\t\t\t'event_id'\t=> $eventid,\n\t\t\t\t\t\t\t\t'ctyp'\t\t=> 'calendar',\n\t\t\t\t\t\t\t\t'title'\t\t=> $comment ? sprintf( $this->lang->words['rc_comment_pre'], $event['event_title'] ) : $event['event_title'],\n\t\t\t\t\t\t\t\t'comment'\t=> $comment,\n\t\t\t\t\t\t\t\t'st'\t\t=> $st,\n\t\t\t\t\t\t\t);\n\t\t\n\t\t$this->registry->output->setTitle( $comment ? $this->lang->words['report_cal_pagec'] : $this->lang->words['report_cal_page'] );\n\t\t$this->registry->output->addNavigation( $comment ? sprintf( $this->lang->words['rc_comment_pre'], $event['event_title'] ) : $event['event_title'], \"app=calendar&amp;module=calendar&amp;section=view&amp;do=showevent&amp;event_id={$event['event_id']}\" . ( $comment ? \"&amp;st={$st}#comment_{$comment}\" : '' ), $event['event_title_seo'], 'cal_event' );\n\t\t$this->registry->output->addNavigation( $comment ? $this->lang->words['report_cal_pagec'] : $this->lang->words['report_cal_page'], '' );\n\t\t\n\t\t$this->lang->words['report_basic_title']\t\t= $this->lang->words['report_cal_title'];\n\t\t$this->lang->words['report_basic_url_title']\t= $this->lang->words['report_cal_title'];\n\t\t$this->lang->words['report_basic_enter']\t\t= $this->lang->words['report_cal_msg'];\n\t\t\n\t\t$url = $this->registry->output->buildSEOUrl( \"app=calendar&amp;module=calendar&amp;section=view&amp;do=showevent&amp;event_id={$event['event_id']}\" . ( $comment ? \"&amp;st={$st}#comment_{$comment}\" : '' ), 'public', $event['event_title_seo'], 'cal_event' );\n\t\t\n\t\treturn $this->registry->getClass('reportLibrary')->showReportForm( $comment ? sprintf( $this->lang->words['rc_comment_pre'], $event['event_title'] ) : $event['event_title'], $url, $ex_form_data );\n\t}", "public function manageCalendarAction()\n {\n \n if($this->_request->isGet() && isset($this->_request->selectMonth)) {\n $cal = new Calendar_Service_Calendar($this->_request->selectMonth);\n }\n else {\n //today's date\n $date = new Zend_Date();\n \n $cal = new Calendar_Service_Calendar($date->toString('MMMM yyyy'));\n }\n //allow only months from -1 to 12 months ahead\n \n $cal->setMonthsInRange(-1, 12);\n $this->view->calUi = $cal->getCalendarHtml(\n array(\n 'showToday' => true,\n 'showPrevMonthLink' => false,\n 'showNextMonthLink' => false,\n 'tableClass' => \"calendar\",\n 'selectBox' => true,\n 'selectBoxName' => \"selectMonth\",\n 'selectBoxFormName' => \"selectMonthForm\"\n ));\n // here we have an edit\n if($this->_request->isPost()) {\n Zend_Debug::dump($this->_request->getPost());\n \n // here we branch based on the control flag set in the ajax action for either creation of an event or editing an event\n switch ($this->_request->flag) {\n \n case 'edit':\n $eventData = (object) $this->_request->getPost();\n $event = $this->mEvents->fetchById($eventData->eventId);\n $event->setFromArray((array)$eventData);\n $event->save();\n break;\n \n case 'create':\n $event = $this->mEvents->fetchNew();\n $eventData = $this->_request->getPost();\n //Zend_Debug::dump($this->mCalendar->fetchMonthIdByName($eventData['month']));\n $eventData['month'] = $this->mCalendar->fetchMonthIdByName($eventData['month']);\n $eventData['calendarId'] = $this->mCalendar->fetchCalIdByName($eventData['calName']);\n $event->setFromArray($eventData);\n $event->save();\n \n break;\n \n default:\n \n break;\n }\n } \n }", "function _culturefeed_entry_ui_ui_event_form_save_event($form, &$form_state, CultuurNet\\Search\\ActivityStatsExtendedEntity $location = NULL, CultuurNet\\Search\\ActivityStatsExtendedEntity $organiser = NULL) {\n $values = $form_state['values'];\n $performerList = new CultureFeed_Cdb_Data_PerformerList();\n $mails = array();\n $phones = array();\n $links = array();\n $performers_count = 0;\n $language_list = new CultureFeed_Cdb_Data_LanguageList();\n\n foreach ($values['wrapper'] as $extra) {\n if (is_array($extra)) {\n // Performer\n if (!empty($extra['performer']) || !empty($extra['role'])) {\n $performer = new CultureFeed_Cdb_Data_Performer();\n $performer->setLabel($extra['performer']);\n $performer->setRole($extra['role']);\n $performerList->add($performer);\n $performers_count++;\n }\n\n // Contacts\n if (isset($extra['channel_input'])) {\n\n switch ($extra['channel']) {\n case '0':\n $phone = new CultureFeed_Cdb_Data_Phone($extra['channel_input'], CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE, FALSE, FALSE);\n array_push($phones, $phone);\n break;\n case '1':\n if ($extra['channel_input']) {\n $mail = new CultureFeed_Cdb_Data_Mail($extra['channel_input'], FALSE, FALSE);\n array_push($mails, $mail);\n }\n break;\n }\n }\n\n if (!empty($extra['spoken_language']) && !empty($extra['in_language'])) {\n switch ($extra['spoken_language']) {\n case 1:\n $spoken_language = 'spoken';\n break;\n case 2:\n $spoken_language = 'dubbed';\n break;\n case 3:\n $spoken_language = 'subtitles';\n break;\n }\n\n switch ($extra['in_language']) {\n case 1:\n $in_language = 'Engels';\n break;\n case 2:\n $in_language = 'Spaans'; //Zit niet in UDB, dus werkt niet\n break;\n case 3:\n $in_language = 'Nederlands';\n break;\n case 4:\n $in_language = 'Duits';\n break;\n case 5:\n $in_language = 'Frans';\n }\n\n $language_list->add(new CultureFeed_Cdb_Data_Language($in_language, $spoken_language));\n }\n }\n }\n\n\n // Links\n $media_links = array();\n foreach ($values['links'] as $link_data) {\n\n if ($link_data['URL']) {\n\n if (!preg_match(\"@^https?://@\", $link_data['URL'])) {\n $link_data['URL'] = 'http://' . $link_data['URL'];\n }\n\n $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBRESOURCE;\n\n if (strpos($link_data['URL'], 'plus.google.com')) {\n $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_GOOGLEPLUS;\n }\n\n if (strpos($link_data['URL'], 'facebook.com')) {\n $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_FACEBOOK;\n }\n\n if (strpos($link_data['URL'], 'twitter.com')) {\n $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_TWITTER;\n }\n\n if (strpos($link_data['URL'], 'youtube.com') || strpos($link_data['URL'], 'youtu.be')) {\n $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_YOUTUBE;\n }\n\n if ($link_data['reservation']) {\n\n // Make reservation link for contact element\n $link = new CultureFeed_Cdb_Data_Url($link_data['URL'], FALSE, $link_data['reservation']);\n array_push($links, $link);\n\n // Make reservation link for media element\n $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_RESERVATIONS;\n\n }\n\n $link = new CultureFeed_Cdb_Data_File();\n $link->setHLink($link_data['URL']);\n $link->setMediaType($mediatype);\n if ($link_data['reservation']) {\n $link->setTitle(t('Order tickets'));\n }\n array_push($media_links, $link);\n }\n }\n\n\n $update = FALSE;\n if (isset($form['#event'])) {\n $update = TRUE;\n $event = $form['#event'];\n }\n else {\n $event = new CultureFeed_Cdb_Item_Event();\n }\n\n // Publication date.\n if ($values['wrapper']['date']) {\n $event->setAvailableFrom($values['wrapper']['date'] . 'T00:00:00');\n }\n\n // Age\n if ($values['age']) {\n $event->setAgeFrom(($values['age'] ? $values['age'] : 0));\n }\n else {\n // Age Category\n switch ($values['age_category']) {\n case '1-12':\n $event->setAgeFrom(1);\n break;\n case '12-18':\n $event->setAgeFrom(12);\n break;\n case '18+':\n $event->setAgeFrom(18);\n break;\n case 'everyone':\n default:\n break;\n }\n }\n\n // Timestamps.\n if ($values['when']['date_control']['type'] == 'timestamps') {\n _culturefeed_entry_ui_event_save_timestamps($event, $values['when']['date_control']['timestamps']['stamps']);\n }\n\n // Period.\n if ($values['when']['date_control']['type'] == 'period') {\n _culturefeed_entry_ui_event_save_period($event, $values['when']['date_control']['period']);\n }\n\n // Weekscheme.\n if ($values['when']['date_control']['type'] == 'period' || $values['when']['date_control']['type'] == 'permanent') {\n _culturefeed_entry_ui_event_save_weekscheme($event, $values['when']['date_control']);\n }\n\n // Categories.\n $category_options = array();\n\n $category_options[$values['what']] = culturefeed_search_get_eventtype_categories(array('tid' => $values['what']));\n $categories = new CultureFeed_Cdb_Data_CategoryList();\n foreach ($category_options as $key => $value) {\n if ($value) {\n $categories->add(new CultureFeed_Cdb_Data_Category(CultureFeed_Cdb_Data_Category::CATEGORY_TYPE_EVENT_TYPE, $key, $value[$key]));\n }\n }\n\n if (isset($values['themes'])) {\n $theme_options[$values['themes']] = culturefeed_search_get_theme_categories(array('tid_like' => $values['themes']));\n foreach ($theme_options as $key => $value) {\n if ($value && isset($value[$key])) {\n $categories->add(new CultureFeed_Cdb_Data_Category(CultureFeed_Cdb_Data_Category::CATEGORY_TYPE_EVENT_TYPE, $key, $value[$key]));\n }\n }\n }\n\n $event->setCategories($categories);\n\n // Event details.\n $detail = new CultureFeed_Cdb_Data_EventDetail();\n $detail->setTitle($values['title']);\n\n if (!empty($values['description']['sd']['short_description'])) {\n $detail->setShortDescription($values['description']['sd']['short_description']);\n }\n if (!empty($values['description']['ld']['long_description'])) {\n $detail->setLongDescription($values['description']['ld']['long_description']);\n }\n\n // Photo\n if ($values['photo']['upload']) {\n\n // Save to Drupal\n $drupal_file = file_load($values['photo']['upload']);\n $drupal_file->status = FILE_STATUS_PERMANENT;\n file_save($drupal_file);\n file_usage_add($drupal_file, 'culturefeed_entry_ui', 'event', $drupal_file->fid);\n\n // Add to detail\n $file = new CultureFeed_Cdb_Data_File();\n $file->setMediaType($file::MEDIA_TYPE_PHOTO);\n $file->setCopyright($values['photo']['copyright_text']);\n $file->setMain(TRUE);\n switch ($drupal_file->filemime) {\n case 'image/gif':\n $file->setFileType($file::FILE_TYPE_GIF);\n break;\n case 'image/jpg':\n case 'image/jpeg':\n $file->setFileType($file::FILE_TYPE_JPEG);\n break;\n case 'image/png':\n $file->setFileType($file::FILE_TYPE_PNG);\n break;\n }\n $file->setHLink(file_create_url($drupal_file->uri));\n $file->setFilename($drupal_file->filename);\n\n $detail->getMedia()->add($file);\n }\n\n // Media links\n if ($media_links) {\n foreach ($media_links as $media_link) {\n $detail->getMedia()->add($media_link);\n }\n }\n\n\n // Price\n if ($values['price']['free']) {\n $price = new CultureFeed_Cdb_Data_Price(0);\n $detail->setPrice($price);\n }\n else {\n if (!empty($values['price']['amount'])) {\n $price = new CultureFeed_Cdb_Data_Price(floatval(str_replace(',','.', $values['price']['amount'])));\n if (!empty($values['price']['extra']['extra_info'])) {\n $price->setDescription($values['price']['extra']['extra_info']);\n }\n $detail->setPrice($price);\n }\n }\n\n // Performers\n if ($performers_count) {\n $detail->setPerformers($performerList);\n }\n\n $detail->setLanguage(culturefeed_entry_ui_get_preferred_language());\n\n $details = new CultureFeed_Cdb_Data_EventDetailList();\n $details->add($detail);\n\n // Translations Dutch.\n if (culturefeed_search_get_preferred_language() != 'nl') {\n if ($values['dutch']['language'] || $values['dutch']['short_description'] || $values['dutch']['long_description']) {\n\n $detail = new CultureFeed_Cdb_Data_EventDetail();\n if ($values['dutch']['language']) {\n $detail->setTitle($values['dutch']['language']);\n }\n if (!empty($values['dutch']['short_description'])) {\n $detail->setShortDescription($values['dutch']['short_description']);\n }\n if (!empty($values['dutch']['long_description'])) {\n $detail->setLongDescription($values['dutch']['long_description']);\n }\n\n $detail->setLanguage(\"nl\");\n $details->add($detail);\n }\n }\n\n // Translations English.\n if (culturefeed_search_get_preferred_language() != 'en') {\n if ($values['english']['language'] || $values['english']['short_description'] || $values['english']['long_description']) {\n\n $detail = new CultureFeed_Cdb_Data_EventDetail();\n if ($values['english']['language']) {\n $detail->setTitle($values['english']['language']);\n }\n if (!empty($values['english']['short_description'])) {\n $detail->setShortDescription($values['english']['short_description']);\n }\n if (!empty($values['english']['long_description'])) {\n $detail->setLongDescription($values['english']['long_description']);\n }\n\n $detail->setLanguage(\"en\");\n $details->add($detail);\n }\n }\n\n // Translations French.\n if (culturefeed_search_get_preferred_language() != 'fr') {\n if ($values['french']['language'] || $values['french']['short_description'] || $values['french']['long_description']) {\n\n $detail = new CultureFeed_Cdb_Data_EventDetail();\n if ($values['french']['language']) {\n $detail->setTitle($values['french']['language']);\n }\n if (!empty($values['french']['short_description'])) {\n $detail->setShortDescription($values['french']['short_description']);\n }\n if (!empty($values['french']['long_description'])) {\n $detail->setLongDescription($values['french']['long_description']);\n }\n\n $detail->setLanguage(\"fr\");\n $details->add($detail);\n }\n }\n\n // Translations German.\n if (culturefeed_search_get_preferred_language() != 'de') {\n if ($values['german']['language'] || $values['german']['short_description'] || $values['german']['long_description']) {\n\n $detail = new CultureFeed_Cdb_Data_EventDetail();\n if ($values['german']['language']) {\n $detail->setTitle($values['german']['language']);\n }\n if (!empty($values['german']['short_description'])) {\n $detail->setShortDescription($values['german']['short_description']);\n }\n if (!empty($values['german']['long_description'])) {\n $detail->setLongDescription($values['german']['long_description']);\n }\n\n $detail->setLanguage(\"de\");\n $details->add($detail);\n }\n }\n\n $event->setDetails($details);\n\n // Location.\n $address = culturefeed_entry_ui_location_form_save($event, $location, $form_state);\n\n // Event organiser.\n if ($organiser) {\n $organiser_object = new CultureFeed_Cdb_Data_Organiser();\n $organiser_detail = $organiser->getEntity()->getDetails()\n ->getDetailByLanguage(culturefeed_search_get_preferred_language());\n if (!$organiser_detail) {\n $organiser_detail = $organiser->getEntity()->getDetails()\n ->getDetailByLanguage(\"nl\");\n }\n $organiser_object->setLabel($organiser_detail->getTitle());\n $organiser_object->setCdbid($organiser->getEntity()->getCdbId());\n $event->setOrganiser($organiser_object);\n }\n else {\n if (isset($values['organiser']['new_actor'])) {\n $organiser_object = new CultureFeed_Cdb_Data_Organiser();\n $organiser_object->setLabel($values['organiser']['new_actor']);\n $event->setOrganiser($organiser_object);\n }\n }\n\n // Contact info.\n $physical_address = $address->getPhysicalAddress();\n $contact_object = new CultureFeed_Cdb_Data_ContactInfo();\n $contact_object->addAddress(new CultureFeed_Cdb_Data_Address($physical_address));\n\n foreach ($mails as $mail) {\n $contact_object->addMail($mail);\n }\n foreach ($phones as $phone) {\n $contact_object->addPhone($phone);\n }\n foreach ($links as $link) {\n $contact_object->addUrl($link);\n }\n\n $event->setContactInfo($contact_object);\n\n // Keywords.\n culturefeed_entry_ui_tags_form_save($event, $form_state);\n\n // Members.\n if ($values['members']) {\n $event->setPrivate(TRUE);\n }\n\n //if ($language_list) {\n $event->setLanguages($language_list);\n\n //}\n\n $form_state['submit_time'] = time();\n\n // Allow alterations by other modules.\n drupal_alter('culturefeed_entry_ui_event_pre_save', $event, $form, $form_state);\n\n try {\n if ($update) {\n Drupalculturefeed_EntryApi::updateEvent($event);\n $form_state['#event_id'] = $event->getCdbId();\n watchdog('culturefeed_entry_ui', 'Event %eventid updated.', array('%eventid' => $form_state['#event_id']));\n cache_clear_all('culturefeed:results:detail:event:' . $event->getCdbId(), 'cache_culturefeed_search');\n }\n else {\n $form_state['#event_id'] = Drupalculturefeed_EntryApi::createEvent($event);\n watchdog('culturefeed_entry_ui', 'Event %eventid created.', array('%eventid' => $form_state['#event_id']));\n }\n\n module_invoke_all('culturefeed_entry_ui_event_post_save', $event, $form, $form_state);\n $form_state['#update_event'] = $update;\n\n } catch (Exception $e) {\n watchdog_exception('culturefeed_entry_ui', $e);\n form_set_error('', t('An error occurred while saving the event'));\n }\n\n // Delete files from file system\n if ($form_state['values']['photo']['upload']) {\n $file = file_load($form_state['values']['photo']['upload']);\n file_delete($file);\n }\n if (isset($form_state['values']['photo']['current_file'])) {\n $file = file_load($form_state['values']['photo']['current_file']);\n file_delete($file);\n }\n\n}", "public function saveEmpfehlungsmanagerAdminWindowAllgemeineEinstellungen() {\n // *************************************************************************\n $curAllDataArr = $this->getEmpfehlungsmanagerAdminAllgemeineEinstellungenDataArr();\n $allOtherSettings = $curAllDataArr['emOtherSettingJson'];\n $allOtherSettingsArr = array();\n if (isset($allOtherSettings) && !empty($allOtherSettings)) {\n $allOtherSettingsArr = json_decode($allOtherSettings, true);\n }\n \n $allOtherSettingsArr['ownGratuliereText'] = $_POST['_empfMaGratuliereText'];\n $allOtherSettingsArr['ownEmpfehlenWeiterText'] = $_POST['_empfMaEmpfehlenWeiterText'];\n $allOtherSettingsArr['ownMailTextDomainGeneriert'] = $_POST['_empfMaMailTextDomainGeneriert'];\n $allOtherSettingsArr['ownMailTextAnfrageErhalten'] = $_POST['_empfMaMailTextAnfrageErhalten'];\n $allOtherSettingsArr['ownMailTextBuchungErhalten'] = $_POST['_empfMaMailTextBuchungErhalten'];\n \n $allOtherSettingsArrJson = json_encode($allOtherSettingsArr);\n // *************************************************************************\n \n $sqlText = 'UPDATE vempfehlungsmanager SET emMail = \"'.$this->dbDecode($_POST['_empfMaMail']).'\", emKontaktSiteId = \"'.$this->dbDecode($_POST['_empfMaKontaktSiteId']).'\", emFirmaName = \"'.$this->dbDecode($_POST['_empfMaFirmaName']).'\", emRabattText = \"'.$this->dbDecode($_POST['_empfMaRabattText']).'\", emGeschenkeRules = \"'.$this->dbDecode($_POST['_empfMaGeschenkeRules']).'\", emFbShareSmallDesc = \"'.$this->dbDecode($_POST['_empfMaFbAppPostSmallDesc']).'\", emFbShareDesc = \"'.$this->dbDecode($_POST['_empfMaFbAppPostLongDesc']).'\", emFbShareBild = \"'.$this->dbDecode($_POST['_empfMaFbAppPostBild']).'\", emTextZwNameFirma = \"'.$this->dbDecode($_POST['_empfMaTextZwEmpfNameUndFirma']).'\", emOtherSettingJson = \"'.$this->dbDecode($allOtherSettingsArrJson).'\" WHERE emID = 1';\n return $this->dbAbfragen($sqlText);\n }", "public function store(Request $request)\n {\n $calendar_weeks = CalendarWeek::where('semester', $request->input('semester'))\n ->orderBy('week')\n ->get();\n\n $all = [];\n $item = [];\n foreach ($calendar_weeks as $calendar_week) {\n $content = $request->input('w' . $calendar_week->week . '_content');\n $calendar_date = $request->input('date' . $calendar_week->week);\n foreach ($content as $k => $v) {\n if (!empty($v)) {\n $att['calendar_week_id'] = $calendar_week->id;\n $att['semester'] = $request->input('semester');\n $att['calendar_kind'] = $request->input('calendar_kind');\n $att['content'] = $v;\n $att['user_id'] = auth()->user()->id;\n $att['job_title'] = auth()->user()->title;\n $att['order_by'] = auth()->user()->order_by;\n\n $one = [\n 'calendar_week_id' => $att['calendar_week_id'],\n 'semester' => $att['semester'],\n 'calendar_kind' => $att['calendar_kind'],\n 'content' => substr($calendar_date[$k], 5, 5) . ' ' . $att['content'],\n 'user_id' => $att['user_id'],\n 'job_title' => $att['job_title'],\n 'order_by' => $att['order_by'],\n 'created_at' => now(),\n 'updated_at' => now(),\n ];\n\n array_push($all, $one);\n\n if (isset($calendar_date[$k])) {\n if ($calendar_date[$k] != null) {\n $item[$calendar_date[$k]] = $att['content'];\n }\n }\n }\n }\n }\n\n Calendar::insert($all);\n\n //寫入校務月曆\n foreach ($item as $k => $v) {\n $att3['item_date'] = $k;\n $att3['item'] = $v;\n $att3['user_id'] = auth()->user()->id;\n MonthlyCalendar::create($att3);\n }\n\n\n return redirect()->route('calendars.index');\n }", "public function saveAction() {\n $redirectPath = '*/*';\n $redirectParams = array();\n \n // check if data sent\n $data = $this->getRequest()->getPost();\n if ($data) {\n $data = $this->_filterPostData($data);\n \n // initialise a model object to put our data into\n /** @var $model DG_Events_Model_Event */\n $model = Mage::getModel('events/event');\n \n // if the events already exists, load it \n $eventId = $this->getRequest()->getParam('event_id');\n if ($eventId) {\n $model->load($eventId);\n }\n \n // Serialize the stores array so we can store it in a text field\n // in our database\n $data['store'] = serialize($data['store']);\n\n\n // Extract the image because we don't want to store that in the DB\n if (isset($data['image'])) {\n $imageData = $data['image'];\n unset($data['image']);\n } else {\n $imageData = array();\n }\n\n // Funny thing with the end date, set null to clear\n // - empty string gives unix epoch (no our event should not end in\n // 1970!!\n if (!$data['enddate']) {\n $data['enddate'] = null;\n }\n\n $model->addData($data);\n try {\n //== Try to save the image\n /** @var $imageHelper DG_Events_Helper_Image */\n $imageHelper = Mage::helper('events/image');\n \n // remove old image\n if (isset($imageData['delete']) && $model->getImage()) {\n $imageHelper->removeImage($model->getImage());\n $model->setImage(null);\n }\n \n // upload new image\n $imageFile = $imageHelper->uploadImage('image');\n if ($imageFile) {\n if ($model->getImage()) {\n $imageHelper->removeImage($model->getImage());\n }\n $model->setImage($imageFile);\n }\n \n //= Save all the text data\n $model->save();\n $this->_getSession()->addSuccess(\n Mage::helper('events')\n ->__('The event has been saved successfully.')\n );\n \n if ($this->getRequest()->getParam('back')) {\n $redirectPath = '*/*/edit';\n $redirectParams = array('event_id' => $model->getId());\n } else {\n $redirectPath = '*/*/';\n $redirectParams = array();\n }\n \n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()->addException($e,\n Mage::helper('events')\n ->__('An error occured while trying to save the news item.'));\n }\n }\n $this->_redirect($redirectPath, $redirectParams);\n }", "public function editSave()\n {\n \t$schedule_model = $this->loadModel('Schedule');\n \t$exam = new Exam();\n \t$exam->setId($_POST['examId']); \t\n \t$exam->setLocation($_POST['textLocation']);\n \t$exam->setDate($_POST['textDate']);\n \t$exam->setTime($_POST['textTime']);\n \t$schedule_model->editExam($exam); \n \t\t\n }", "public function saveDataToSession(){\n\t\t$data = $this->getData();\n\t\tSession::set(\"FormInfo.{$this->FormName()}.data\", $data);\n\t}", "public function update(Request $request)\n {\n $calendar = Calendar::find($request->input('id'));\n $att['content'] = $request->input('content');\n $calendar->update($att);\n echo \"<body onload='opener.location.reload();window.close();'>\";\n }", "public function updateCalendar($obj)\n {\n if (!($class = Loader::loadClassFromModule('TimeIt', 'calendar'))) {\n pn_exit(__f('Unable to load class of the object type %s.', 'calendar', ZLanguage::getModuleDomain('TimeIt')));\n }\n\n // instantiate the object type\n $object = new $class();\n $object->setData($obj);\n return $object->save();\n }", "function addCalendar() {\n $dialog = $this->_getCalendarDialog();\n $this->layout->add($dialog->getDialogXML());\n $this->layout->addLeft($this->_getPublicCalendarsList());\n $this->layout->addLeft($this->_getRecommendedEventsList());\n }", "public function postSimpleCal(Request $request)\n {\n $this->validate($request, [\n 'event_name' => 'required',\n 'event_des' => 'required',\n 'created_by' => 'required',\n 'event_link' => 'required',\n 'event_priority' => 'required',\n 'event_status' => 'required',\n 'event_label' => 'required',\n 'event_start' => 'required',\n 'event_end' => 'required',\n 'event_start_time' => 'required',\n 'event_end_time' => 'required',\n\n ]);\n Auth::user()->SimpleCalendar()->create([\n 'event_name' => $request->input('event_name'),\n 'event_des' => $request->input('event_name'),\n 'created_by' => $request->input('created_by'),\n 'event_link' => $request->input('event_link'),\n 'event_priority' => $request->input('event_priority'),\n 'event_status' => $request->input('event_status'),\n 'event_label' => $request->input('event_label'),\n 'event_start' => $request->input('event_start'),\n\t 'event_end' => $request->input('event_end'),\n 'event_start_time' => $request->input('event_start_time'),\n 'event_end_time' => $request->input('event_end_time'),\n\t ]);\n return redirect()->route('calendar')\n ->with('signupsuccess', 'event Added');\n }", "protected function save() {\n //inspect($_SESSION);\n try {\n if (!$this->document->getUser()->isAuthenticated() && !$this->getParam('noCaptcha')) {\n $this->checkCaptcha();\n }\n $this->saveData();\n\n $this->response->redirectToCurrentSection('success/');\n } catch (SystemException $e) {\n $this->failure($e->getMessage(), $_POST[$this->getTableName()]);\n }\n }", "function save_access_token_of_calendar() {\n if (!empty($_GET)) {\n $this->google_calendar->save_access_token(get_array_value($_GET, 'code'), $this->login_user->id);\n app_redirect(\"events\");\n }\n }", "function theme_calendar_framework_calendars_form($form) {\n // Include helpers.\n module_load_include('inc', 'calendar_framework');\n // Register theme callbacks only if the patch is applied.\n if (_calendar_framework_patch_applied()) {\n $rows = array();\n // Set form table rows.\n foreach ($form['sitewide'] as $name => $element) {\n if (!isset($element['_id']) || !is_array($element['_id'])) {\n continue;\n }\n $rows[] = array(\n drupal_render($form['default_calendar'][$element['_id']['#value']]),\n check_plain($name),\n drupal_render($element['_config']),\n );\n }\n unset($form['sitewide']);\n\n // Sets form table header.\n $header = array(\n t('Default'),\n t('Calendar'),\n array(\n 'colspan' => 1,\n 'data' => t('Actions'),\n )\n );\n\n $output = '<h3>' . t('System Default Calendar') . '</h3>';\n $output .= theme('table', $header, $rows);\n $output .= drupal_render($form);\n return $output;\n }\n\n // Patch is not yet applied.\n return drupal_render($form);\n}", "static function save_event_info($event, $post, $calender){\n\t\tupdate_post_meta($post->ID, 'gc_enabled', '1');\n\t\tupdate_post_meta($post->ID, 'event_info', array('cal_id'=>$calender, 'event_id'=>$event['id']));\n\t}", "function display_calendar ()\n\t\t{\t\n\t\t\tif (!$this->authentication->logged_in (\"admin\"))\n\t\t\t\tredirect(\"admin\");\n\t\t\t\n\t\t\t//calls DML for processing data\n\t\t\tif($_POST)\n\t\t\t\t$this->_dbEventProcessor();\n\t\t\t\n\t\t\t//gets the region and subregion for filter purpose\n\t\t\t$this->_get_regions_subregions();\n\t\t\t\n\t\t\t// gets the calendar (month || year)\n\t\t\tif(isset($_POST['hdnTimeid']) && $_POST['hdnTimeid']!=0)\n\t\t\t\t$time = $_POST['hdnTimeid'];\n\t\t\telse \n\t\t\t\t$time = strtotime('-8 hour');\n\t\t\t\n\t\t\t$this->gen_contents['sec_timing'] = $time;\n\t\t\t\n\t\t\t$_POST['sltSearchRegion'] = '';\n\t\t\t$_POST['sltSearchSubregion'] = '';\n\t\t\t//selected search options are saved to a variable\n\t\t\tif($_POST){\n\t\t\t\t$this->gen_contents['region_search'] \t= $_POST['sltSearchRegion'];\n\t\t\t\t$this->gen_contents['subregion_search'] = $_POST['sltSearchSubregion'];\n\t\t\t}\n\t\t\t\n\t\t\t//helps to change the mode of calendar by choosing the link from subregion list out \n\t\t\tif($this->session->userdata('CLASS')){\n\t\t\t\t$this->gen_contents['class_mode'] \t= 1;\n\t\t\t\t$this->gen_contents['title']\t\t= 'Class Management';\n\t\t\t\t$this->gen_contents['page_title']\t= 'Class Management';\n\t\t\t}\n\t\t\t\t\n\t\t\t// we call _date function to get all the details of calendar n its event\n\t\t\t$this->gen_contents = array_merge($this->gen_contents,$this->_date($time));\n\t\t\t\n\t\t\t//default listing events for the current date\n\t\t\t//'hdnCurrentDate' field stores the date fo today onload\n\t\t\t//once a date is choosen to list the events or for adding the hidden filed will contain that date\n\t\t\t//after traversing the calendar and when returned back to the current month default listing should be provided\n\t\t\tif(isset($_POST['hdnCurrentDate'])){\n\t\t\t\t$this->gen_contents['hdnCurrentDate'] \t= date('Y/m/d',strtotime($_POST['hdnCurrentDate'])); \n\t\t\t\t\n\t\t\t\tif(($this->gen_contents['actual_month_year'] == $this->gen_contents['current_month_year']) && $_POST['hdnCurrentDate'] == ''){\n\t\t\t\t\t$this->gen_contents['hdnCurrentDate'] \t= $this->gen_contents['today'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->_template('display_calendar',$this->gen_contents);\n\t\t}", "function guardaSolicitudLab()\n{\n\t//falta obtener el periodo\n\t$respuesta \t\t= false;\n\tsession_start();\n\tif(!empty($_SESSION['nombre']))\n\t{\n\t\t$periodo \t\t= periodoActual();\n\t\t$clave \t\t\t= GetSQLValueString($_POST[\"clave\"],\"text\");\n\t\t$claveCal\t\t= GetSQLValueString($_POST[\"claveCal\"],\"text\");\n\t\t$estatus \t\t= GetSQLValueString($_POST[\"estatus\"],\"text\");\n\t\t$fecha \t\t\t= GetSQLValueString($_POST[\"fecha\"],\"text\");\n\t\t$hora \t\t\t= GetSQLValueString($_POST[\"hora\"],\"text\");\n\t\t$firmaJefe \t\t= GetSQLValueString($_POST[\"firmaJefe\"],\"int\");\n\t\t$comentarios\t= GetSQLValueString($_POST[\"comentarios\"],\"text\");\n\t\t$conexion \t\t= conectaBDSICLAB();\n\t\tif(existeSolLab($clave))\n\t\t{\n\t\t\t$consulta \t\t= sprintf(\"insert into lbcalendarizaciones values(%s,%s,%s,%s,%d,%s,%s,%s)\",$periodo,$claveCal,$fecha,$hora,$firmaJefe,$estatus,$comentarios,$clave);\n\t\t\t$res \t \t= mysql_query($consulta);\n\t\t\tif(mysql_affected_rows()>0)\n\t\t\t$respuesta = true; \n\t\t}\n\t}\n\telse\n\t{\n\t\t//salir();\n\t}\n\t$arrayJSON = array('respuesta' => $respuesta);\n\t\tprint json_encode($arrayJSON);\n}", "public function saveDataToSession()\n {\n $data = $this->getData();\n $session = $this->currentController->getRequest()->getSession();\n $session->set(\"FormInfo.{$this->FormName()}.data\", $data);\n }", "public function store(CalendarRequest $request) {\n $calendar = $this->service->store($request);\n return response()->json($calendar);\n }", "public function updateCalendarDate() {\n try {\n if (!($this->calendar instanceof Base_Model_ObtorLib_App_Core_System_Entity_Calendar)) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception(\" System Calendar Entity not intialized\");\n } else {\n $objCalendar = new Base_Model_ObtorLib_App_Core_System_Dao_Calendar();\n $objCalendar->calendar = $this->calendar;\n return $objCalendar->updateCalendarDate();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_System_Exception($ex);\n }\n }", "function _erpal_calendar_helper_config_form_submit($form, $form_state){\n\n $values = $form_state['input'];\n \n $date_item_tags = $values['date_item_tags'];\n foreach ($date_item_tags as $entity_type=>$bundles) {\n foreach ($bundles as $bundle_name=>$fields) {\n foreach ($fields as $field_name=>$tag) {\n _erpal_calendar_helper_field_tag($entity_type, $bundle_name, $field_name, $tag);\n }\n }\n }\n\n //now set the special tags\n $user_holiday_tag_string = $values['date_item_tags_special']['erpal_calendar_user_holiday_tag_string'];\n variable_set('erpal_calendar_user_holiday_tag_string', $user_holiday_tag_string);\n \n // notifications settings\n if(!empty($form_state['values']['calendar_notifications'])){\n $notifications = $form_state['values']['calendar_notifications'];\n // subject\n if(!empty($notifications['erpal_calendar_assigned_subject'])){\n _erpal_calendar_set_assigned_subject($notifications['erpal_calendar_assigned_subject']);\n }\n // message\n if(!empty($notifications['erpal_calendar_assigned_message'])){\n _erpal_calendar_set_assigned_message($notifications['erpal_calendar_assigned_message']);\n }\n \n // subject comment\n if(!empty($notifications['erpal_calendar_comment_subject'])){\n _erpal_calendar_set_comment_subject($notifications['erpal_calendar_comment_subject']);\n }\n // message comment\n if(!empty($notifications['erpal_calendar_comment_message'])){\n _erpal_calendar_set_comment_message($notifications['erpal_calendar_comment_message']);\n }\n }\n \n $preset_user = !empty($values['date_item_preset_global_cal_with_username']) ? $values['date_item_preset_global_cal_with_username'] : FALSE;\n variable_set('date_item_preset_global_cal_with_username', $preset_user);\n}", "public function store(Request $request)\n {\n //\n\n //dd($request->all());\n $this->validate($request, [\n 'customer_id' => 'required',\n 'service' => 'required',\n 'hour' => 'required',\n 'date' => 'required'\n ]);\n\n $myDate = new Date();\n $myDate->customer_id = $request->customer_id;\n $myDate->service = $request->service;\n $myDate->note = $request->note;\n $myDate->status = 'programmed';\n\n if ($myDate->save()) {\n # code...\n $myCalendar = new Calendar();\n $myCalendar->hour = '0' . $request->hour . ':00:00';\n $myCalendar->date = $request->date;\n $myCalendar->date_id = $myDate->id;\n\n if ($myCalendar->save()) {\n # code...\n return redirect()->back()->with('success', 'Cita creado con Éxito');\n }\n\n }\n\n }", "public function update(Request $request, Calendar $calendar)\n {\n //\n }", "public function update(Request $request, Calendar $calendar)\n {\n //\n }", "public function update(Request $request, Calendar $calendar)\n {\n //\n }", "public function saveEvent(&$event) {\n\t\t$calendar_id = $event[\"calendar_id\"];\n\t\tif (!$this->canWriteCalendar($calendar_id)) {\n\t\t\tPNApplication::error(\"Access denied: you cannot modify this calendar.\");\n\t\t\treturn false;\n\t\t}\n\t\tif (isset($event[\"id\"])) {\n\t\t\t// this is an update\n\t\t\t// check the event belongs to the calendar\n\t\t\t$res = SQLQuery::create()->bypassSecurity()->select(\"CalendarEvent\")->where(\"id\",$event[\"id\"])->executeSingleRow();\n\t\t\tif ($res == null) {\n\t\t\t\tPNApplication::error(\"Invalid event id: does not exist\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($res[\"calendar\"] <> $calendar_id) {\n\t\t\t\tPNApplication::error(\"Invalid event id: does not belong to the given calendar\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (isset($event[\"uid\"]) && $event[\"uid\"] <> $res[\"uid\"]) {\n\t\t\t\tPNApplication::error(\"Event id and uid do not match\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$data = array();\n\t\t\t$data[\"start\"] = intval($event[\"start\"]);\n\t\t\t$data[\"end\"] = intval($event[\"end\"]);\n\t\t\t$data[\"all_day\"] = $event[\"all_day\"];\n\t\t\t$data[\"last_modified\"] = time();\n\t\t\t$data[\"title\"] = $event[\"title\"];\n\t\t\t$data[\"description\"] = $event[\"description\"];\n\t\t\t$data[\"app_link\"] = @$event[\"app_link\"];\n\t\t\t$data[\"app_link_name\"] = @$event[\"app_link_name\"];\n\t\t\tSQLQuery::create()->bypassSecurity()->updateByKey(\"CalendarEvent\", $event[\"id\"], $data);\n\t\t\t$this->saveEventFrequency($event[\"id\"], @$event[\"frequency\"], false);\n\t\t\t$this->saveEventAttendees($event[\"id\"], @$event[\"attendees\"], false);\n\t\t\tif (PNApplication::hasErrors())\n\t\t\t\treturn false;\n\t\t\t$event[\"uid\"] = $res[\"uid\"];\n\t\t} else {\n\t\t\t// this is a new event\n\t\t\t$data[\"calendar\"] = $calendar_id;\n\t\t\t$data[\"uid\"] = $calendar_id.\"-\".time().\"-\".rand(0, 100000).\"@pn.\".PNApplication::$instance->current_domain;\n\t\t\t$data[\"start\"] = intval($event[\"start\"]);\n\t\t\t$data[\"end\"] = intval($event[\"end\"]);\n\t\t\t$data[\"all_day\"] = $event[\"all_day\"];\n\t\t\t$data[\"last_modified\"] = time();\n\t\t\t$data[\"title\"] = $event[\"title\"];\n\t\t\t$data[\"description\"] = $event[\"description\"];\n\t\t\t$data[\"app_link\"] = @$event[\"app_link\"];\n\t\t\t$data[\"app_link_name\"] = @$event[\"app_link_name\"];\n\t\t\t$event[\"id\"] = SQLQuery::create()->bypassSecurity()->insert(\"CalendarEvent\", $data);\n\t\t\t$event[\"uid\"] = $data[\"uid\"];\n\t\t\t$this->saveEventFrequency($event[\"id\"], @$event[\"frequency\"], true);\n\t\t\t$this->saveEventAttendees($event[\"id\"], @$event[\"attendees\"], true);\n\t\t\tif (PNApplication::hasErrors()) return false;\n\t\t}\n\t\treturn true;\n\t}", "public function getCalendarInfo() {\n\t\treturn $this->information;\n\t}", "static function save_event_info($event, $post, $calender){\n\t\tif($event){\n\t\t\tupdate_post_meta($post->ID, 'gc_enabled', '1');\n\t\t\tupdate_post_meta($post->ID, 'event_info', array('cal_id'=>$calender, 'event_id'=>$event->id));\n\t\t}\n\t}", "function save(){\r\t\t /*\r\t\t\r\t\tif(isset($_SESSION[\"id_role\"]) && $_SESSION[\"id_role\"] !== '1'){\t//NO ES EL ADMIN GENERAL\r\t\t\t$id_sucursal = $_SESSION[\"id_sucursal\"];\t//EL form se les deshabilita y no envia el POST, entonces recurrir a su SESSION\r\t\t} else if($_SESSION[\"id_role\"] == '1') {\r\t\t\tif(isset($_POST[\"IdSucursal\"])){\r\t\t\t\t$id_sucursal = $_POST[\"IdSucursal\"];\t//El admin general si puede decidir que Id de Sucursal mandar en un Request tipo $_POST\t\t\t\t\r\t\t\t} else {\r\t\t\t\t$id_sucursal = $_POST[\"IdSucursal\"];\t//El admin general si puede decidir que Id de Sucursal mandar en un Request tipo $_POST\t\t\t\t\t\t\t\t\r\t\t\t}\r\t\t} */\r \r //si es un usuario con rol difeente a administrador general\r //toma $id_sucursal de los datos del usuario logueado\r\t\tif(isset($_SESSION[\"id_role\"]) && $_SESSION[\"id_role\"] !== '1')\r\t\t{\r\t\t\t$id_sucursal = $_SESSION[\"id_sucursal\"];\r\t\t}\r\t\telse\r\t\t{\t\t\t\r\t\t\t//si es administrador general toma $id_sucursal del combobox \r\t\t\t$id_sucursal = $_POST[\"IdSucursal\"];\r\t\t}\t\r\r\t\tif(isset($_SESSION[\"id_employe\"]) && isset($_SESSION[\"id_sucursal\"]))\r\t\t{\r\t\t\t$caja= new CajaChicaModel(null, $id_sucursal, $_POST['IdTipoMovimiento'], $_POST['Descripcion'], $_POST['Monto'],$_SESSION['id_employe'],$_POST['Fecha'], null);\r\t\t\tCajaChicaModel::save($caja);\r\t\t\t#$this->show();\r\t\t}\r\r\r\t}" ]
[ "0.645075", "0.62630063", "0.60733974", "0.6031356", "0.5811947", "0.57962567", "0.5769755", "0.5726817", "0.5725749", "0.57005763", "0.56272745", "0.5575811", "0.5554741", "0.5552255", "0.55511665", "0.5550441", "0.54934", "0.54918534", "0.54860747", "0.547901", "0.547901", "0.54686415", "0.5465829", "0.5415412", "0.5411115", "0.5406259", "0.5394834", "0.53481525", "0.53308904", "0.5321072", "0.53123635", "0.5310579", "0.53023875", "0.52900386", "0.5286706", "0.5272095", "0.5270072", "0.5254246", "0.52345055", "0.52309966", "0.5223616", "0.522348", "0.5220115", "0.5212214", "0.52075046", "0.52011734", "0.5185368", "0.5170694", "0.5170614", "0.5166226", "0.51618046", "0.5157083", "0.51322", "0.5123553", "0.51182795", "0.51076853", "0.5107195", "0.5098539", "0.5095783", "0.5091029", "0.50867426", "0.50696623", "0.5056954", "0.5056878", "0.5035776", "0.5012833", "0.50045574", "0.50009227", "0.4996687", "0.49901763", "0.49885082", "0.498689", "0.49798024", "0.4977199", "0.49734628", "0.49724784", "0.49705657", "0.49624622", "0.49621135", "0.49548113", "0.49469873", "0.49452758", "0.4937361", "0.49347985", "0.4934701", "0.49342245", "0.49221432", "0.49166036", "0.4913675", "0.49010035", "0.49003503", "0.48993853", "0.4899074", "0.48988482", "0.48988482", "0.48988482", "0.4898425", "0.48973897", "0.48962918", "0.48926902" ]
0.7375619
0
Get spaceseparated list of classes to be added to the form class
Получить список классов, разделенных пробелами, которые необходимо добавить в класс формы
function getFormClasses(){ return " user "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function extraClass()\n {\n $aClasses = array('field', 'form-control', parent::extraClass());\n $aClasses[] = $this->getFieldClassName();\n\n return implode(' ', $aClasses);\n }", "protected function getFormClasses($parameters)\n {\n $classes = [];\n\n if (\n isset($parameters['bootstrap']) && $parameters['bootstrap']\n && isset($parameters['use-grid']) && $parameters['use-grid']\n && isset($parameters['form-direction-class']) && $parameters['form-direction-class'])\n {\n $classes[] = $parameters['form-direction-class'];\n }\n\n if (isset($parameters['class']) && $parameters['class']) {\n $classes[] = $parameters['class'];\n }\n\n return implode(' ', $classes);\n }", "public function get_classes()\n\t{\n\t\treturn implode(' ', $this->_config['classes']);\n\t}", "public function getClasses()\n {\n return implode(' ', $this->classes);\n }", "private function classes(): string\n {\n $classes = '';\n\n if ($this->style !== null) {\n $classes .= ' label-' . $this->style;\n }\n\n return $classes;\n }", "public function get_form_classes( $args ) {\n\n\t\t$float_labels_option = give_is_float_labels_enabled( $args )\n\t\t\t? 'float-labels-enabled'\n\t\t\t: '';\n\n\t\t$form_classes_array = apply_filters( 'give_form_classes', array(\n\t\t\t'give-form',\n\t\t\t'give-form-' . $this->ID,\n\t\t\t'give-form-type-' . $this->get_type(),\n\t\t\t$float_labels_option,\n\t\t), $this->ID, $args );\n\n\t\t// Remove empty class names.\n\t\t$form_classes_array = array_filter( $form_classes_array );\n\n\t\treturn implode( ' ', $form_classes_array );\n\n\t}", "private function getClassesSelected()\r\n {\r\n $classes = explode(' ', $this->classes);\r\n\r\n return array_combine($classes, $classes);\r\n }", "public function get_classes()\r\n {\r\n return explode(' ', $this->get_class());\r\n }", "protected function getClasses()\n {\n $res = $this->classes;\n\n if($this->style['muted']) {\n $res[] = 'fc-muted';\n }\n\n $res[] = 'kb-event-'.$this->type;\n\n return $res;\n }", "public function templateFriendlyClassList() {\n $classes = array('classes' => array());\n\n // Converts the class list into an array that's more usable in a .tpl\n foreach($this->class_list as $file => $class_name_array) {\n foreach($class_name_array as $class_name) {\n $info = array();\n $info[\"name\"] = $class_name;\n $info[\"location\"] = $file;\n $classes['classes'][] = $info;\n }\n }\n\n return $classes;\n }", "protected function getShortcodeClasses()\n {\n return [];\n }", "protected function gatherCssClasses()\r\n\t{\r\n\t\t$css = array_unique($this->getCSSClasses());\r\n\t\r\n\t\tif($this->isPrimary())\r\n\t\t{\r\n\t\t\t$css[] = \"btn-primary\";\r\n\t\t}\r\n\t\tif($this->getOmitPreventDoubleSubmission())\r\n\t\t{\r\n\t\t\t$css[] = \"omitPreventDoubleSubmission\";\r\n\t\t}\r\n\t\t\r\n\t\treturn implode(\" \", $css);\r\n\t}", "public function class() {\n\t\t$base = self::DEFAULTS['inputclass'];\n\t\t$class = $this->inputclass;\n\n\t\tif (in_array($this->size, self::SIZES)) {\n\t\t\t$class .= \" $base-$this->size\";\n\t\t}\n\t\t$class .= ' ' . implode(' ', $this->addclasses);\n\t\treturn trim($class);\n\t}", "function classes() {\n $classes = array_unique((array) $this->classes);\n $this->name and $classes[] = $this->name;\n $this->current() and $classes[] = 'current';\n return $classes ? join(' ', $classes) : null;\n }", "protected function getClasses() {\r\n\t\t$classes = $this->conf['classes.'];\r\n\t\t$a = array();\r\n\t\tif (is_array($classes)) {\r\n\t\t\tforeach ($classes as $class) \r\n\t\t\t\tarray_push($a, $class);\r\n\t\t}\r\n\t\treturn $a;\r\n\t}", "private function classes()\n {\n $classes = [ 'navbar' ];\n\n if ($this->options_set['expand'] === false) {\n $classes[]= 'navbar-expand-lg';\n }\n\n if ($this->options_set['style'] === false) {\n $classes[] = 'navbar-dark';\n }\n\n if ($this->options_set['background'] === false) {\n $classes[] = 'bg-dark';\n }\n\n return implode(' ', array_merge($classes, $this->classes['main']));\n }", "protected function formClass()\n {\n return Str::studly($this->formName());\n }", "public function getClassNames()\n {\n // Obtain Class Names:\n \n $classes = $this->styles('navbar.search');\n \n // Answer Class Names:\n \n return array_merge(\n parent::getClassNames(),\n $classes\n );\n }", "public function makeItemClass()\n {\n $classes = ['form-control'];\n\n if ($this->isInvalid() && ! isset($this->disableFeedback)) {\n $classes[] = 'is-invalid';\n }\n\n // The next workaround setups the plugin when using sm/lg sizes.\n // Note: this may change with newer plugin versions.\n\n if (isset($this->size) && \\in_array($this->size, ['sm', 'lg'], true)) {\n $classes[] = \"form-control-{$this->size}\";\n $classes[] = 'p-0';\n }\n\n return implode(' ', $classes);\n }", "public function getUniqueClassList() {\n\t\t$this->displayField = 'class';\n\t\t$classes = $this->find('list', array(\n\t\t\t'group' => array(\n\t\t\t\t$this->alias . '.class',\n\t\t\t),\n\t\t\t'order' => array(\n\t\t\t\t$this->alias . '.class' => 'asc',\n\t\t\t),\n\t\t));\n\n\t\tif (empty($classes)) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn array_combine($classes, $classes);\n\t}", "function ld_html_classes( $classes = array() ) {\n\t$classes = (array) $classes;\n\n\t$classes = apply_filters( 'html_class', $classes );\n\n\t// Get rid of any duplicate classes and escape the value of each class\n\t$classes = array_values($classes);\n\n\t$unique_classes = array();\n\tforeach($classes as $key => $name) {\n\t\t$name = esc_attr($name);\n\t\t$unique_classes[$name] = $name;\n\t}\n\n\techo implode(' ', $unique_classes);\n}", "public function getClasses() {\n $classes = [];\n\n if ($this->isSubmissionsNowPublic()) {\n $classes[] = 'cons-submissions-public';\n }\n elseif ($this->isSubmissionsEnabled()) {\n $classes[] = 'cons-submissions-enabled';\n }\n else {\n $classes[] = 'cons-submissions-hidden';\n }\n\n $classes[] = 'consultation-' . $this->getStatusCode();\n\n return $classes;\n }", "function uvasomdeptrfd_class($classes) {\n\t$classes[] = 'single-faculty-listing';\n\t// return the $classes array\n\treturn $classes;\n}", "function my_class_names($classes) {\n $classes[] = 'testigo-en-linea';\n // return the $classes array\n return $classes;\n }", "function get_classes()\n\t{\n\t\t$cls=\"user \";\n\t\t\n\t\tif($this->has_naostro)\n\t\t{\n\t\t\tif($this->has_full_points)\n\t\t\t{\n\t\t\t\t$cls.=\"naostro naostro6b \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cls.=\"naostro naostroe \";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cls.=\"nanecisto \";\n\t\t}\n\t\t\n\t\tif(StudentInfo::get($this->name, 'tutor') != \"\")\n\t\t{\n\t\t\t$cls.=$this->tutor;\n\t\t}\n\t\t\n\t\treturn $cls;\n\t}", "public function getEditableFieldClasses($includeLiterals = true) {\n\t\t$classes = ClassInfo::getValidSubClasses('EditableFormField');\n\n\t\t// Remove classes we don't want to display in the dropdown.\n\t\t$editableFieldClasses = array();\n\t\tforeach ($classes as $class) {\n\t\t\t// Skip abstract / hidden classes\n\t\t\tif(Config::inst()->get($class, 'abstract', Config::UNINHERITED) || Config::inst()->get($class, 'hidden')\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(!$includeLiterals && Config::inst()->get($class, 'literal')) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$singleton = singleton($class);\n\t\t\tif(!$singleton->canCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$editableFieldClasses[$class] = $singleton->i18n_singular_name();\n\t\t}\n\n\t\tasort($editableFieldClasses);\n\t\treturn $editableFieldClasses;\n\t}", "public function getClass(){\r\n if (count($this->T_CLASSES) == 0) return '';\r\n return ' class=\"'.implode(' ', $this->T_CLASSES).'\"';\r\n }", "function cx(array $controls)\n{\n $classes = [];\n\n foreach ($controls as $control => $value) {\n $classes[] = collect(\n require app()->resourcePath(\"fields/controls/{$control}.php\")\n )->get($value);\n }\n\n return implode(' ', $classes);\n}", "function formClass()\n {\n return 'form_user_add_peopletag';\n }", "function formClass()\n {\n return 'favor';\n }", "function CMSTreeClasses($controller) {\n\t\t$classes = $this->class;\n\t\tif($this->HasBrokenFile || $this->HasBrokenLink)\n\t\t\t$classes .= \" BrokenLink\";\n\n\t\tif(!$this->canAddChildren())\n\t\t\t$classes .= \" nochildren\";\n\n\t\tif(!$this->canDelete())\n\t\t\t$classes .= \" nodelete\";\n\n\t\tif($controller->isCurrentPage($this))\n\t\t\t$classes .= \" current\";\n\n\t\tif(!$this->canEdit() && !$this->canAddChildren()) \n\t\t\t$classes .= \" disabled\";\n\n\t\tif(!$this->ShowInMenus) \n\t\t\t$classes .= \" notinmenu\";\n\t\t\n\t\t$classes .= $this->markingClasses();\n\n\t\treturn $classes;\n\t}", "function formClass()\n {\n return 'form_user_remove_peopletag';\n }", "function maat_classes($new_classes, $other_classes = '')\n{\n $classes = array();\n if (is_array($new_classes)) {\n $classes = array_merge($classes, $new_classes);\n } else {\n $new_classes = explode(' ', $new_classes);\n $classes = array_merge($classes, $new_classes);\n }\n if (!empty($other_classes)) {\n if (is_array($other_classes)) {\n $classes = array_merge($classes, $other_classes);\n } else {\n $other_classes = explode(' ', $other_classes);\n $classes = array_merge($classes, $other_classes);\n }\n }\n if (!empty($classes)) {\n $classes = array_unique($classes);\n foreach ($classes as $key => $value) {\n if (empty($value)) {\n unset($classes[$key]);\n } else {\n $classes[$key] = sanitize_html_class($value);\n }\n }\n }\n return $classes;\n}", "private function get_used_class_names() {\n\t\tif ( isset( $this->used_class_names ) ) {\n\t\t\treturn $this->used_class_names;\n\t\t}\n\n\t\t$dynamic_class_names = [\n\n\t\t\t/*\n\t\t\t * See <https://www.ampproject.org/docs/reference/components/amp-dynamic-css-classes>.\n\t\t\t * Note that amp-referrer-* class names are handled in has_used_class_name() below.\n\t\t\t */\n\t\t\t'amp-viewer',\n\n\t\t\t// Classes added based on input mode. See <https://github.com/ampproject/amphtml/blob/bd29b0eb1b28d900d4abed2c1883c6980f18db8e/spec/amp-css-classes.md#input-mode-classes>.\n\t\t\t'amp-mode-touch',\n\t\t\t'amp-mode-mouse',\n\t\t\t'amp-mode-keyboard-active',\n\t\t];\n\n\t\t$classes = [];\n\n\t\t$i_amphtml_prefix = 'i-amphtml-';\n\t\t$i_amphtml_prefix_length = 10;\n\t\tforeach ( $this->dom->xpath->query( '//*/@class' ) as $class_attribute ) {\n\t\t\t/** @var DOMAttr $class_attribute */\n\t\t\t$mutated = false;\n\t\t\t$element_classes = [];\n\t\t\tforeach ( array_filter( preg_split( '/\\s+/', trim( $class_attribute->nodeValue ) ) ) as $class_name ) {\n\t\t\t\tif ( substr( $class_name, 0, $i_amphtml_prefix_length ) === $i_amphtml_prefix ) {\n\t\t\t\t\t$error = [\n\t\t\t\t\t\t'code' => self::DISALLOWED_ATTR_CLASS_NAME,\n\t\t\t\t\t\t'type' => AMP_Validation_Error_Taxonomy::HTML_ATTRIBUTE_ERROR_TYPE,\n\t\t\t\t\t\t'class_name' => $class_name,\n\t\t\t\t\t];\n\t\t\t\t\t$sanitized = $this->should_sanitize_validation_error( $error, [ 'node' => $class_attribute ] );\n\t\t\t\t\tif ( $sanitized ) {\n\t\t\t\t\t\t$mutated = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$element_classes[] = $class_name;\n\t\t\t}\n\t\t\tif ( $mutated ) {\n\t\t\t\t$class_attribute->nodeValue = implode( ' ', $element_classes );\n\t\t\t}\n\t\t\t$classes = array_merge( $classes, $element_classes );\n\t\t}\n\n\t\t// Find all [class] attributes and capture the contents of any single- or double-quoted strings.\n\t\tforeach ( $this->dom->xpath->query( '//*/@' . Document::AMP_BIND_DATA_ATTR_PREFIX . 'class' ) as $bound_class_attribute ) {\n\t\t\tif ( preg_match_all( '/([\\'\"])([^\\1]*?)\\1/', $bound_class_attribute->nodeValue, $matches ) ) {\n\t\t\t\t$classes = array_merge(\n\t\t\t\t\t$classes,\n\t\t\t\t\tpreg_split( '/\\s+/', trim( implode( ' ', $matches[2] ) ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$class_names = array_merge(\n\t\t\t$dynamic_class_names,\n\t\t\tarray_unique( array_filter( $classes ) )\n\t\t);\n\n\t\t// Find all instances of the toggleClass() action to prevent the class name from being tree-shaken.\n\t\tforeach ( $this->dom->xpath->query( '//*/@on[ contains( ., \"toggleClass\" ) ]' ) as $on_attribute ) {\n\t\t\tif ( preg_match_all( '/\\.\\s*toggleClass\\s*\\(\\s*class\\s*=\\s*(([\\'\"])([^\\1]*?)\\2|[a-zA-Z0-9_\\-]+)/', $on_attribute->nodeValue, $matches ) ) {\n\t\t\t\t$class_names = array_merge(\n\t\t\t\t\t$class_names,\n\t\t\t\t\tarray_map(\n\t\t\t\t\t\tstatic function ( $match ) {\n\t\t\t\t\t\t\treturn trim( $match, '\"\\'' );\n\t\t\t\t\t\t},\n\t\t\t\t\t\t$matches[1]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->used_class_names = array_fill_keys( $class_names, true );\n\t\treturn $this->used_class_names;\n\t}", "function loadClasses() {\n\t$cls\t= config( 'default_classes', decode( \\DEFAULT_CLASSES ) );\n\t// Trigger class load hook\n\thook( [ 'loadcssclasses', [ 'classes' => $cls ] ] );\n\t\n\t// Intercept extra classes and/or existing class replacements\n\t$sent\t= hookArrayResult( 'loadcssclasses' )['classes'] ?? [];\n\tif ( !empty( $sent ) ) {\n\t\t$cls\t= \\array_merge( $cls, $sent );\n\t}\n\t\t\n\t$cv\t= [];\n\t\n\t// Add new or appened classes while removing duplicates\n\tforeach( $cls as $k => $v ) {\n\t\t$cv['{' . $k . '}'] = \n\t\t\t\\implode( ' ', uniqueTerms( bland( $v ) ) );\n\t}\n\treturn $cv;\n}", "public function getBodyClasses()\n {\n $view = $this->getView();\n $request = $view->getRequest();\n $prefix = ($request->getParam('prefix')) ? 'prefix-' . $request->getParam('prefix') : 'prefix-site';\n\n $classes = [\n $prefix,\n 'theme-' . Str::low($view->getTheme()),\n 'plugin-' . Str::low($view->getPlugin()),\n 'view-' . Str::low($view->getName()),\n 'tmpl-' . Str::low($view->getTemplate()),\n 'layout-' . Str::low($view->getLayout())\n ];\n\n $pass = (array) $request->getParam('pass');\n if (count($pass)) {\n $classes[] = 'item-id-' . array_shift($pass);\n }\n\n return implode(' ', $classes);\n }", "public function getFieldHtmlClasses()\r\n {\r\n return property_exists(get_class($this), \"field_html_classes\") ? self::$field_html_classes : array();\r\n }", "function cs_boby_class_names( $classes ) {\r\n $classes[] = 'wp-jobhunt';\r\n return $classes;\r\n }", "protected function getEditmodeElementClasses() : array {}", "protected function inputClass() {\n $class = cssClass(\"form-\".$this->inputType());\n if ($this->isTextfield())\n $class.= \" form-textfield\";\n return $class;\n }", "function x_attr_class( $classes = array() ) {\n\n $result = '';\n\n if ( ! empty( $classes ) ) {\n $result = implode( ' ', array_filter( $classes ) );\n }\n\n return $result;\n\n}", "protected function get_input_class() {\n\t\t$class = '';\n\t\t$is_separate = $this->get_field_column( 'options' );\n\t\t$combo_name = FrmField::get_option( $this->field, 'combo_name' );\n\t\tif ( isset( $is_separate['H'] ) || ! empty( $combo_name ) ) {\n\t\t\t$class = 'auto_width frm_time_select';\n\t\t}\n\n\t\treturn $class;\n\t}", "function formClass()\n {\n return 'form_peopletag_edit_user_search';\n }", "function getClasses( string $name ) : array {\n\t$cls\t= rsettings( 'classes' );\n\t$n\t= '{' . bland( $name ) . '}';\n\t$va\t= [];\n\tforeach( $cls as $k => $v ) {\n\t\tif ( 0 != \\strcmp( $n , $k ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$va\t= uniqueTerms( $v );\n\t\tbreak;\n\t}\n\t\n\treturn $va;\n}", "public function get_css_class() {\n\n\t\t$prefix_input = GFFormsModel::get_input( $this, $this->id . '.2' );\n\t\t$first_input = GFFormsModel::get_input( $this, $this->id . '.3' );\n\t\t$middle_input = GFFormsModel::get_input( $this, $this->id . '.4' );\n\t\t$last_input = GFFormsModel::get_input( $this, $this->id . '.6' );\n\t\t$suffix_input = GFFormsModel::get_input( $this, $this->id . '.8' );\n\n\t\t$css_class = '';\n\t\t$visible_input_count = 0;\n\n\t\tif ( $prefix_input && ! rgar( $prefix_input, 'isHidden' ) ) {\n\t\t\t$visible_input_count++;\n\t\t\t$css_class .= 'has_prefix ';\n\t\t} else {\n\t\t\t$css_class .= 'no_prefix ';\n\t\t}\n\n\t\tif ( $first_input && ! rgar( $first_input, 'isHidden' ) ) {\n\t\t\t$visible_input_count++;\n\t\t\t$css_class .= 'has_first_name ';\n\t\t} else {\n\t\t\t$css_class .= 'no_first_name ';\n\t\t}\n\n\t\tif ( $middle_input && ! rgar( $middle_input, 'isHidden' ) ) {\n\t\t\t$visible_input_count++;\n\t\t\t$css_class .= 'has_middle_name ';\n\t\t} else {\n\t\t\t$css_class .= 'no_middle_name ';\n\t\t}\n\n\t\tif ( $last_input && ! rgar( $last_input, 'isHidden' ) ) {\n\t\t\t$visible_input_count++;\n\t\t\t$css_class .= 'has_last_name ';\n\t\t} else {\n\t\t\t$css_class .= 'no_last_name ';\n\t\t}\n\n\t\tif ( $suffix_input && ! rgar( $suffix_input, 'isHidden' ) ) {\n\t\t\t$visible_input_count++;\n\t\t\t$css_class .= 'has_suffix ';\n\t\t} else {\n\t\t\t$css_class .= 'no_suffix ';\n\t\t}\n\n\t\t$css_class .= \"gf_name_has_{$visible_input_count} ginput_container_name \";\n\n\t\treturn trim( $css_class );\n\t}", "public static function admin_body_class($classes)\n {\n if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'shortcode_editor' && isset($_REQUEST[piklist::$prefix . 'shortcode_data']['name']) && isset(self::$shortcodes[$_REQUEST[piklist::$prefix . 'shortcode_data']['name']]))\n {\n $classes .= ' shortcode_editor-' . esc_attr($_REQUEST[piklist::$prefix . 'shortcode_data']['name']);\n }\n \n return $classes;\n }", "function formClass()\n {\n return 'form_sharings_theme_directory';\n }", "public function getThemeEditorClasses()\n {\n $classes = array();\n /*\n $classes = array(\n array('title' => t('Title Thin'), 'menuClass' => 'title-thin', 'spanClass' => 'title-thin', 'forceBlock' => 1),\n array('title' => t('Image Caption'), 'menuClass' => 'image-caption', 'spanClass' => 'image-caption', 'forceBlock' => '-1'),\n );\n */\n return $classes;\n }", "protected function getLabelClasses($parameters)\n {\n $classes = [];\n\n if (isset($parameters['label-class']) && $parameters['label-class']) {\n $classes[] = $parameters['label-class'];\n }\n\n if (\n isset($parameters['use-grid']) && $parameters['use-grid']\n && isset($parameters['bootstrap']) && $parameters['bootstrap']\n && isset($parameters['label-grid-class']) && $parameters['label-grid-class']\n ) {\n $classes[] = $parameters['label-grid-class'];\n }\n\n if (\n isset($parameters['bootstrap']) && $parameters['bootstrap']\n && isset($parameters['control-label-class']) && $parameters['control-label-class']\n ) {\n $classes[] = $parameters['control-label-class'];\n }\n\n return implode(' ', $classes);\n }", "function formClass()\n {\n return 'form_make_admin';\n }", "protected function getClass()\n {\n return implode(' ', $this->classes);\n }", "function maat_item_classes($new_classes, $other_classes = '')\n{\n\n if (!empty($other_classes)) {\n $classes = maat_classes($new_classes, $other_classes);\n } else {\n $classes = maat_classes($new_classes);\n }\n $all_classes = '';\n if (!empty($classes)) {\n $all_classes = implode(' ', $classes);\n }\n return $all_classes;\n}", "protected function itemClass() {\n $type = $this->type;\n if ($this->multiple)\n $type = \"container\";\n $class = \"form-item \".cssClass(\"form-type-\".$type).\" \".cssClass(\"form-name-\".$this->name);\n if ($this->icon)\n $class.= \" form-item-icon\";\n if ($this->isTextfield())\n $class.= \" form-item-textfield\";\n if ($this->required)\n $class.= \" form-item-required\";\n if ($this->error)\n $class.= \" form-item-error\";\n if ($this->sortable)\n $class.= \" form-item-sortable\";\n if ($this->childError())\n $class.= \" form-item-child-error\";\n if (!$this->multiple && !empty($this->item_class))\n $class.= \" \".$this->item_class;\n if ($this->multiple && !empty($this->wrap_class))\n $class.= \" \".$this->wrap_class;\n return $class;\n }", "function classnames(...$classes)\n{\n if (! $classes) {\n return '';\n }\n\n $effectiveClasses = [];\n\n array_walk_recursive(\n $classes,\n function ($value, $key) use (&$effectiveClasses) {\n if (is_int($key)) {\n $class = $value;\n } elseif ($value) {\n $class = $key;\n } else {\n return;\n }\n\n array_push($effectiveClasses, ...explode(' ', $class));\n }\n );\n\n $effectiveClasses = array_map('trim', $effectiveClasses);\n $effectiveClasses = array_filter($effectiveClasses);\n\n return implode(' ', $effectiveClasses);\n}", "protected function addFormhandlerClass(&$classesArray, $className){\n\n\t\tif (!isset($classesArray) && !is_array($classesArray)) {\n\n\t\t\t//add class to the end of the array\n\t\t\t$classesArray[] = array('class' => $className);\n\t\t} else {\n\t\t\t$found = FALSE;\n\t\t\t$className = $this->utilityFuncs->prepareClassName($className);\n\t\t\tforeach ($classesArray as $idx => $classOptions) {\n\t\t\t\t$currentClassName = $this->utilityFuncs->getPreparedClassName($classOptions);\n\t\t\t\tif ($className === $currentClassName) {\n\t\t\t\t\t$found = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$found) {\n\n\t\t\t\t//add class to the end of the array\n\t\t\t\t$classesArray[] = array('class' => $className);\n\t\t\t}\n\t\t}\n\t}", "public function get_form_wrap_classes( $args ) {\n\t\t$custom_class = array(\n\t\t\t'give-form-wrap',\n\t\t);\n\n\t\tif ( $this->is_close_donation_form() ) {\n\t\t\t$custom_class[] = 'give-form-closed';\n\t\t} else {\n\t\t\t$display_option = ( isset( $args['display_style'] ) && ! empty( $args['display_style'] ) )\n\t\t\t\t? $args['display_style']\n\t\t\t\t: give_get_meta( $this->ID, '_give_payment_display', true );\n\n\t\t\t$custom_class[] = \"give-display-{$display_option}\";\n\n\t\t\t// If admin want to show only button for form then user inbuilt modal functionality.\n\t\t\tif ( 'button' === $display_option ) {\n\t\t\t\t$custom_class[] = 'give-display-button-only';\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Filter the donation form classes.\n\t\t *\n\t\t * @since 1.0\n\t\t */\n\t\t$form_wrap_classes_array = (array) apply_filters( 'give_form_wrap_classes', $custom_class, $this->ID, $args );\n\n\n\t\treturn implode( ' ', $form_wrap_classes_array );\n\n\t}", "protected function getInputClasses($parameters, $name)\n {\n $classes = [];\n\n if (\n isset($parameters['bootstrap']) && $parameters['bootstrap']\n && isset($parameters['form-control-class']) && $parameters['form-control-class']\n ) {\n $classes[] = $parameters['form-control-class'];\n }\n\n if (isset($parameters['class']) && $parameters['class']) {\n $classes[] = $parameters['class'];\n }\n\n if ($this->inputHasError($parameters, $name) && $parameters['error-class']) {\n $classes[] = $parameters['error-class'];\n }\n\n return implode(' ', $classes);\n }", "function apply_classes( $attr, $context ):array {\n\tglobal $shq_genestrap_classes;\n\n\t$classes = '';\n\tif ( isset( $shq_genestrap_classes[ $context ] ) ) {\n\t\t$classes = $shq_genestrap_classes[ $context ];\n\t\tif ( false === empty( $attr['class'] ) ) {\n\t\t\t$attr_classes = explode( ' ', $attr['class'] );\n\n\t\t\t$classes = array_unique( array_merge( $attr_classes, $classes ) );\n\t\t}\n\n\t\t$classes = implode( ' ', $classes );\n\t}\n\n\t$attr['class'] = $classes;\n\n\treturn $attr;\n}", "function formClass()\n {\n return 'form_settings';\n }", "function formClass()\n {\n return 'form_settings';\n }", "public function getClass()\n {\n if (empty($this->_class)) {\n return false;\n }\n $classes = array();\n foreach ($this->_class as $class) {\n $classes[] = htmlspecialchars($class, ENT_QUOTES);\n }\n\n return implode(' ', $classes);\n }", "private function parseClasses($classes)\n {\n if (is_array($classes) && count($classes) > 0) {\n $classes = implode(' ', $classes);\n }\n return (is_string($classes)) ? \" class='{$classes}'\" : '';\n }", "protected function supportClass()\n {\n return [\n $this->config->getMembreClass(),\n $this->config->getFamilleClass(),\n $this->config->getGeniteurClass(),\n ];\n }", "private function compiledClasses()\n\t\t{\n\t\t\treturn implode(\" \", $this->classes);\n\t\t}", "public function getTagClasses();", "public function getClasses(){\n\t\treturn $this->classes;\n\t}", "function uvasomrfdsearch_add_classes( $classes ) {\n\t$classes[] = 'search';\n\treturn $classes;\n}", "function uvasomrfdsearch_add_classes( $classes ) {\n\t$classes[] = 'search';\n\treturn $classes;\n}", "public function getListClassNames()\n {\n $classes = [\n 'icons',\n 'show-icons',\n 'hide-text'\n ];\n \n $this->extend('updateListClassNames', $classes);\n \n return $classes;\n }", "public function getClassName()\n {\n if (!is_null($this->customClass)) {\n $this->class = $this->customClass;\n } elseif ($this->type === 'hidden') {\n $this->class = null;\n } elseif (in_array($this->type, ['checkbox', 'radio'])) {\n $this->class = 'form-check-input';\n } elseif ($this->type === 'file') {\n $this->class = 'form-control-file';\n } elseif ($this->type === 'range') {\n $this->class = 'form-control-range';\n }\n\n if ($this->isHasError && ($this->type !== 'hidden')) {\n $this->class .= ' ' . $this->errorClass;\n }\n\n return $this->class;\n }", "public function getClassList() {\n return $this->class_list;\n }", "private function getClasses($params){\n\t\t$classes = array();\n\n\t\tif ($params['slider_size'] !== ''){\n\t\t\t$classes[] = 'qode-slider-size-'.$params['slider_size'];\n\t\t} else {\n\t\t\t$classes[] = 'qode-slider-size-landscape';\n\t\t}\n\n if($params['content_in_grid'] !== 'yes'){\n\t\t\t$classes[] = 'qode-slider1-item-wide';\n }\n\n\t\treturn implode(' ', $classes);\n\t}", "public static function classes(){\n return self::renderWithLayout(\"Klas\", ['title' => 'Klassen Overzicht', 'opleidingen' => Opleiding::all(), 'klassen'=> klas::all()]);\n }", "public function cssClass($list)\n {\n\n $classes = Arr::get($this->classes, $list, []);\n\n return $classes;\n\n }", "public function getClasses ()\n {\n return $this->classes;\n }", "abstract public function cssClasses(): ClassAttribute;", "function training_video_post_class( $classes ) {\n\t$post_id = get_the_ID();\n\n\t/* If we have a post ID, proceed. */\n\tif ( !empty( $post_id ) ) {\n\t\t/* Get the custom post class. */\n\t\t$post_class = get_post_meta( $post_id, 'patr_post_class', true );\n\n\t\t/* If a post class was input, sanitize it and add it to the post class array. */\n\t\tif ( !empty( $post_class ) )\n\t\t\t$classes[] = sanitize_html_class( $post_class );\n\t}\n\n\treturn $classes;\n}", "public function getFormClass()\n {\n return 'CotizacionesForm';\n }", "public function getClasses()\n\t{\n\t\treturn $this->getProp('rdfs:type');\n\t}", "public function getClasses() {}", "public function getClasses()\n\t{\n\t\treturn $this->classes;\n\t}", "public function getClasses() {\n\n\t\t// Check if we should use responsive layout\n\t\t$responsive = false;\n\t\tforeach ($this->chunks as $c) {\n\t\t\tif ($c->responsive) {\n\t\t\t\t$responsive = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Build classes\n\t\t$cls = \"\";\n\t\tif ($responsive) $cls .= \"row \";\n\n\t\t// Pick layer positioning\n\t\tif ($this->position == LayerPosition::Body) {\n\t\t\t$cls .= \" l-body\";\n\t\t} elseif ($this->position == LayerPosition::Fixed) {\n\t\t\t$cls .= \" l-fixed\";\n\t\t} elseif ($this->position == LayerPosition::ParallaxFront) {\n\t\t\t$cls .= \" l-parallax l-front\";\n\t\t} elseif ($this->position == LayerPosition::ParallaxBack) {\n\t\t\t$cls .= \" l-parallax l-back\";\n\t\t}\n\n\t\t// Return class\n\t\treturn trim($cls);\n\n\t}", "function add_pagename_class($classes) {\n\t\n\tglobal $post;\n\tif( $post ){\n\t\t$classes[] = esc_attr( sanitize_html_class( $post->post_name ) );\n\t}\n return $classes;\n\n}", "public static function classnames(array $classes): string {}", "function qode_listing_version_class($classes) {\n\t\t$classes[] = 'qode-listing-'.QODE_LISTING_VERSION;\n\t\t\n\t\treturn $classes;\n\t}", "public function getFieldTypeClasses() : array\n {\n return [InnerFormType::class];\n }", "protected function getInputWrapperClasses($parameters)\n {\n $classes = [];\n\n if (\n isset($parameters['bootstrap']) && $parameters['bootstrap']\n && isset($parameters['use-grid']) && $parameters['use-grid']\n ) {\n if (empty($parameters['label'])) {\n $classes[] = $parameters['offset-input-grid-class'];\n } else {\n $classes[] = $parameters['input-grid-class'];\n }\n }\n\n if (isset($parameters['wrapper-class']) && $parameters['wrapper-class']) {\n $classes[] = $parameters['wrapper-class'];\n }\n\n return implode(' ', $classes);\n }", "public function getClasses()\n {\n return $this->classes;\n }", "public function getClasses()\n {\n return $this->classes;\n }", "public function getClasses()\n {\n return $this->classes;\n }", "public function getClasses()\n {\n return $this->classes;\n }", "abstract protected function getClassList(): array;", "public function getClasses() : array\n {\n return $this->classes;\n }", "function mountain_custom_shortcodes_class( $classes, $atts = array(), $tag = '' ) {\n\t\tif ( function_exists( 'vc_shortcode_custom_css_class' ) && ! empty( $atts['css'] ) ) {\n\t\t\t$classes[] = vc_shortcode_custom_css_class( $atts['css'], ' ' );\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function CSSClasses($stopAtClass = self::class)\n {\n $classes = [];\n $classAncestry = array_reverse(ClassInfo::ancestry(static::class) ?? []);\n $stopClasses = ClassInfo::ancestry($stopAtClass);\n\n foreach ($classAncestry as $class) {\n if (in_array($class, $stopClasses ?? [])) {\n break;\n }\n $classes[] = $class;\n }\n\n // optionally add template identifier\n if (isset($this->template) && !in_array($this->template, $classes ?? [])) {\n $classes[] = $this->template;\n }\n\n // Strip out namespaces\n $classes = preg_replace('#.*\\\\\\\\#', '', $classes ?? '');\n\n return Convert::raw2att(implode(' ', $classes));\n }", "public function getFieldContainerHtmlClasses()\r\n {\r\n return property_exists(get_class($this), \"field_container_html_classes\") ?\r\n self::$field_container_html_classes :\r\n array();\r\n }", "function output_css_classes( $classes, $echo = true ) {\n\n\tif ( is_string( $classes ) ) {\n\t\t$classes = explode( ' ', $classes );\n\t}\n\n\t$classes = implode( ' ', array_map( 'sanitize_html_class', (array) $classes ) );\n\n\tif ( $echo ) {\n\t\techo $classes; // phpcs:ignore\n\t} else {\n\t\treturn $classes;\n\t}\n}", "public function getClass(){\n\t\textract($_POST);\n\t\t$data = array(\n\t\t\t\t\"shiftid\" => $shf\n\t\t\t);\n\t\t$class = $this->db->get_where(\"class_catg\",$data)->result();\n\n\t\t$className = '';\n\t\t$classId = '';\n\n\n\t\tforeach( $class as $cls ):\n\t\t\t$className .= $cls->class_name.',';\n\t\t\t$classId .= $cls->classid.',';\n\t\tendforeach;\n\n\t\techo substr($className,0,-1).'+'.substr($classId,0,-1);\n\n\t}", "public function getClasses();", "public function getClassArray()\n {\n return $this->classes;\n }" ]
[ "0.72874683", "0.70465124", "0.6990947", "0.69322443", "0.69008523", "0.6887923", "0.6806093", "0.67606723", "0.67256176", "0.67044777", "0.6702368", "0.66958725", "0.66885495", "0.6663512", "0.66404593", "0.662699", "0.6609973", "0.6583803", "0.65737236", "0.6568306", "0.65318966", "0.65171957", "0.6506414", "0.64441234", "0.6429778", "0.6419297", "0.6401006", "0.64004683", "0.6385803", "0.6352982", "0.6341858", "0.6310988", "0.62867445", "0.62667125", "0.6253375", "0.6242692", "0.6241249", "0.62391776", "0.6225114", "0.6213518", "0.61922604", "0.61840665", "0.61580795", "0.6134406", "0.6090766", "0.6071477", "0.6067417", "0.6049334", "0.6049173", "0.6042939", "0.6037933", "0.60293597", "0.6017735", "0.6004939", "0.5999111", "0.5993852", "0.5989898", "0.59832567", "0.5981616", "0.5981616", "0.5975636", "0.59741485", "0.5961119", "0.5960355", "0.5959325", "0.59483725", "0.5943949", "0.5943949", "0.5943267", "0.594117", "0.59315693", "0.5927365", "0.5906877", "0.5904785", "0.59033155", "0.58907217", "0.5886517", "0.58834696", "0.5883064", "0.58775777", "0.58771497", "0.5850798", "0.5844808", "0.5834707", "0.5833482", "0.58332694", "0.58305645", "0.5824292", "0.5824292", "0.5824292", "0.5824292", "0.5822713", "0.582158", "0.5816261", "0.58146274", "0.58115953", "0.5810568", "0.5809672", "0.5805323", "0.58047926" ]
0.7663836
0
Returns the app event for this event.
Возвращает событие приложения для этого события.
public function getAppEvent() { return $this->appEvent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApp()\n {\n $this->ensureExact();\n return $this->app;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent() {\n\t\treturn $this->event;\n\t}", "public function getEvent() {\n if (!$this->eventInstance) {\n $this->eventInstance = EventApi::createNewInstance($this->event);\n }\n\n return $this->eventInstance;\n }", "public function getApp() {\n\t\treturn $this->_app;\n\t}", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function event()\n {\n return Event::i();\n }", "public function getApp()\n {\n if (!isset($this->app_name))\n Throw new Error('App name was not set for this form and cannot be returned');\n\n return $this->app_name;\n }", "public function getAppId()\n {\n return $this->_appID;\n }", "public function getAppId()\n\t{\n\t\treturn $this->id;\n\t}", "private function getEvent()\n {\n $eventData = $this->coreRegistry->registry('current_store_event');\n\n return $eventData;\n }", "public function getApplication()\n\t{\n\t\treturn ((isset($this->_applications[0]))? $this->_applications[0] : NULL);\n\t}", "public function getApp() {\n return $this->app;\n }", "public function getApp() {\n return $this->app;\n }", "public function getApp() {\n return $this->app;\n }", "public function getEvent()\r\n {\r\n return $this->getAttr('Event');\r\n }", "public function get_app() {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getApp()\n {\n return $this->app;\n }", "public function getAppId()\n {\n return isset($this->app_id) ? $this->app_id : '';\n }", "static public function getApp()\n\t{\n\t\treturn self::$application;\n\t}", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication() {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public function getApplication()\n {\n return $this->application;\n }", "public static function getApp()\n\t{\n\t\treturn self::getInstance()->app;\n\t}", "public final function getApp()\r\n\t{\r\n\t\treturn Fw::app();\r\n\t}", "public function get_appID()\n {\n return $this->appID;\n }", "public function get_appID()\n {\n return $this->appID;\n }", "public function getApplication() {\n\n\t\treturn $this -> application;\n\n\t}", "public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }", "public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }", "public function getAppName()\n\t{\n\t\tif (!$this->_app) {\n\t\t\t$this->_app = $this->__get($this->_appKey);\n\t\t}\n\t\treturn $this->_app;\n\t}", "public function getAppId()\n {\n return $this->appId;\n }", "public function getApplication()\n {\n return isset($this->application) ? $this->application : null;\n }", "public function getAppId() {\n return $this->appId;\n }", "public function getAppId() {\n return $this->appId;\n }", "public function getApplication()\n\t{\n\t\treturn $this->application;\n\t}", "public function getApplication()\n {\n return $this->configuration[\"application\"];\n }", "public function getAppfrom()\n {\n return $this->appfrom;\n }", "public function getAppID()\n {\n return $this->app_id;\n }", "public function getApplication(){\n\t\t//TODO\n\t}", "public function getApplication(){\n\t\treturn $this->_application;\n\t}", "public static function get_app(){\n return AppServer::get_instance()->get_app();\n }", "public function getEventName()\n {\n return $this->eventName;\n }", "public function getEventName()\n {\n return $this->eventName;\n }", "public function getEventName()\n {\n return $this->eventName;\n }", "public function getAppId()\n\t{\n\t\treturn ee()->config->item('fbc_app_id');\n\t}", "public static function getApp()\n {\n return self::$app;\n }", "public function getEventer() {\n return $this->eventer;\n }", "public function getApp()\n {\n return $this->command('App')->get($this->appId);\n }", "public function get_event()\n {\n }", "public function get_appointment() {\n if ($this->is_restored()) {\n throw new \\coding_exception('get_appointment() is intended for event observers only');\n }\n return $this->appointment;\n }", "public function getEventName()\n {\n return $this->eventName;\n }", "public function getDApp()\n {\n return $this->d_app;\n }", "public function get_event_id()\n {\n return $this->event_id;\n }", "public function getApp() : ?string\n {\n return $this->app;\n }", "public function getSourceApp()\n {\n return $this->sourceApp;\n }", "public static function getApplication()\n {\n return self::$application;\n }", "public function getApplication();", "public function getEventName(): string\n {\n return $this->eventName;\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function getEventId()\n {\n return $this->eventId;\n }", "public function application()\n {\n return $this->application;\n }", "public function application()\n {\n return $this->application;\n }", "public function application() {\r\n\t\treturn $this->_application;\r\n\t}", "public static function event() {\n\n // Get Global\n global $event_emitter;\n\n // Return\n return $event_emitter;\n }", "public function getAppID()\n {\n return $this->appId;\n }", "protected function getApplication()\n {\n return $this->application;\n }", "protected function getApplication()\n {\n return $this->application;\n }", "static public function getApplication()\n\t{\n\t\treturn self::$application;\n\t}", "protected function getEvent()\n {\n $event = new ModelEvent();\n $event->setTarget($this);\n return $event;\n }", "public static function get_app_id() {\n\t\treturn Woo_App::get_id();\n\t}", "public function getEvent()\n {\n return $this->readOneof(5);\n }", "function get_ev() {\n return $this->ev;\n }", "public function getAppIdentifier()\n {\n if (array_key_exists(\"appIdentifier\", $this->_propDict)) {\n return $this->_propDict[\"appIdentifier\"];\n } else {\n return null;\n }\n }", "public function get_app_id() {\n\t\tif (!empty($this->app_id)) {\t\n\t\t\treturn $this->app_id;\n\t\t} else {\n\t\t\t throw new Exception('Application ID Missing');\n\t\t}\n\t}", "public function getApplicationId()\r\n\t{\r\n\t\treturn $this->appId;\r\n\t}", "public function Event()\n {\n return Event::i();\n }", "public function application()\n {\n return Application::where('user_id', $this->user_id)->where('status', 1)->latest('created_at')->first();\n }" ]
[ "0.7065368", "0.697586", "0.697586", "0.697586", "0.697586", "0.697586", "0.697586", "0.697586", "0.697586", "0.697586", "0.697586", "0.6896223", "0.6884865", "0.6835442", "0.673032", "0.673032", "0.673032", "0.673032", "0.673032", "0.6708661", "0.6693505", "0.6693366", "0.6685715", "0.66824234", "0.6653944", "0.66524476", "0.66524476", "0.66524476", "0.66181827", "0.66025287", "0.66025114", "0.66025114", "0.66025114", "0.66025114", "0.65484875", "0.65259165", "0.6515751", "0.65001154", "0.6482324", "0.6482324", "0.6482324", "0.6482324", "0.6482324", "0.6482324", "0.6482324", "0.6471287", "0.64647293", "0.6458402", "0.6458402", "0.6455868", "0.64556885", "0.64556885", "0.6449711", "0.64457023", "0.6437765", "0.6436047", "0.6432076", "0.643058", "0.6419326", "0.63956475", "0.63857025", "0.6378874", "0.63660735", "0.63576317", "0.6336", "0.6336", "0.6336", "0.6315429", "0.63068765", "0.62939507", "0.6292103", "0.62805355", "0.62756366", "0.62649953", "0.6264394", "0.62624085", "0.6260817", "0.62602717", "0.6259748", "0.62527233", "0.6239346", "0.6238027", "0.6238027", "0.6226933", "0.6226933", "0.61903346", "0.61743945", "0.6164226", "0.6157824", "0.6157824", "0.61546177", "0.6153802", "0.61531526", "0.6151034", "0.61505663", "0.615017", "0.6144856", "0.6143435", "0.6134305", "0.6128326" ]
0.8755152
0
Get paginator for the current selection. Paginate method should be already called.
Получить пагинатор для текущего выбора. Метод paginate должен быть уже вызван.
public function paginator() { return $this->paginator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaginator()\n {\n return $this->call('paginator');\n }", "public function getPaginator () {\n return $this->paginator;\n }", "public function getPaginator()\n {\n return $this->paginator;\n }", "public function getPaginator()\n {\n return $this->paginator;\n }", "public function paginator(){\n return\n $this->Paginator;\n }", "public function getPaginator();", "public function getPaginator();", "public function getMyPagintaor( )\n\t{\n\t\treturn $this->myPaginator;\t\n\t}", "public function getPaginator(): Paginator\n {\n return $this->paginator;\n }", "public function paginator()\n {\n return (new Tools\\Paginator($this))->render();\n }", "public function getPaginator()\n {\n return $this->getMapper()\n ->getPaginator();\n }", "public function getPaginator()\n {\n return $this->getMapper()\n ->getPaginator();\n }", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPagination() {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->get(self::pagination);\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination();", "public function getPagination();", "protected function currentPage()\n {\n return $this->paginator->currentPage();\n }", "protected function applyPagination()\n {\n if (empty($this->paginator)) {\n return $this;\n }\n\n return $this->paginator->paginate($this);\n }", "public function getCurrent()\n {\n if(null === $this->current)\n {\n $this->current = $this->getPaginator()->getQuery()->getFirstResult() == 0 \n ? 1\n : ($this->getPaginator()->getQuery()->getFirstResult() / $this->getPaginator()->getQuery()->getMaxResults());\n }\n \n return $this->current;\n }", "private function getPaginator()\n {\n $items = $this->data->slice($this->getOffset())->all();\n\n $queryParams = [];\n parse_str(request()->getQueryString(), $queryParams);\n\n return new Paginator($items, $this->options['itemsPerPage'], $this->getPage(), [\n 'path' => url()->current(),\n 'query' => $queryParams\n ]);\n }", "public function getPaginate() {}", "public function getPaginator() {\r\n\t\tif($this->page === null || $this->per_page === null)\r\n\t\t\treturn;\r\n\t\tif(!$this->paginatorFactory)\r\n\t\t\treturn new \\Asgard\\Common\\Paginator($this->count(), $this->page, $this->per_page);\r\n\t\treturn $this->paginatorFactory->create([$this->count(), $this->page, $this->per_page]);\r\n\t}", "public function getPagination()\n {\n return $this->smarty->fetch($this->getTemplate('pagination'));\n }", "public function get()\n {\n $query = $this->queryBuilder->getQuery();\n if ($this->itemsPerPage > 0) {\n $query->setMaxResults($this->itemsPerPage);\n }\n if ($this->pager) {\n $query->setFirstResult($this->startNumber);\n $paginator = new Paginator($query);\n $this->numberOfItems = count($paginator);\n return $paginator;\n } else {\n return $query->getResult();\n }\n }", "public function currentPagination()\n {\n return $this->limit && 0 < $this->start ? ($this->start / $this->limit) + 1 : 1;\n }", "public function getPaginator()\n {\n return $this->announceMapper->getPaginator();\n }", "function getPagination() {\n\t\tif (empty($this->_pagination))\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\tif (!$this->_total) $this->getItems();\n\t\t\t$this->_pagination = new JPagination( $this->_total, $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\t\treturn $this->_pagination;\n\t}", "function getPagination() {\n\t\tif (empty($this->_pagination))\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\tif (!$this->_total) $this->getItems();\n\t\t\t$this->_pagination = new JPagination( $this->_total, $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\t\treturn $this->_pagination;\n\t}", "function getPagination() {\r\n\t\tif (empty ( $this->_pagination )) {\n\t\t\tjimport ( 'joomla.html.pagination' );\n\t\t\t$this->_pagination = new JPagination ( $this->getTotal (), $this->getState ( 'limitstart' ), $this->getState ( 'limit' ) );\n\t\t}\n\t\t\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\t$limitstart = $this->getState('limitstart');\n\t\t$limit = $this->getState('limit');\n\t\tif (empty($this->_pagination)) {\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $limitstart, $limit );\n\t\t}\n\t\treturn $this->_pagination;\n\t}", "public function getPaginate()\n {\n $find_query = $this->buildQuery();\n $collection = $this->getCollection();\n $result = $this->paginate($collection, $find_query);\n\n return $this->createPaginationDataObj($result);\n }", "function getPagination()\n {\n \t// Lets load the pagination if it doesn't already exist\n \tif (empty($this->_pagination))\n \t{\n \t\tjimport('joomla.html.pagination');\n \t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n \t}\n \treturn $this->_pagination;\n }", "function getPagination(){\n\t\tif (empty($this->_pagination))\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\tif (!$this->_total) $this->getListPackages();\n\t\t\t$this->_pagination = new JPagination( $this->_total, $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\tif (empty($this->_pagination)) {\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "public function getPagination()\n\t{\n\t\t// Get a storage key.\n\t\t$store = $this->getStoreId('getPagination');\n\t\tJLoader::register('SRPagination', SRPATH_LIBRARY . '/pagination/pagination.php');\n\n\t\t// Try to load the data from internal storage.\n\t\tif (isset($this->cache[$store]))\n\t\t{\n\t\t\treturn $this->cache[$store];\n\t\t}\n\n\t\t// Create the pagination object.\n\t\t$limit = (int) $this->getState('list.limit') - (int) $this->getState('list.links');\n\t\t$page = new SRPagination($this->getTotal(), $this->getStart(), $limit);\n\n\t\t// Add the object to the internal cache.\n\t\t$this->cache[$store] = $page;\n\n\t\treturn $this->cache[$store];\n\t}", "function getPagination()\n {\n \tif (empty($this->_pagination)) {\n \t jimport('joomla.html.pagination');\n \t $this->_pagination = new JPagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n \t}\n \treturn $this->_pagination;\n }", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\n\t\treturn $this->_pagination;\n\t}", "protected function _getPaginatorAdapter(){\n \treturn new ArrayAdapter( $this->_paginatorAdapterData );\n }", "public function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_pagination;\n\t}", "public function getPagination() {\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\t\t\n\t\treturn $this->_pagination;\n\t}", "function getPagination() {\n if (empty($this->_pagination)) {\n jimport('joomla.html.pagination');\n $this->_pagination = new JPagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit'));\n }\n\n return $this->_pagination;\n }", "function getPagination()\n {\n if (empty($this->_pagination))\n {\n // Import the pagination library\n jimport('joomla.html.pagination');\n // Prepare the pagination values\n $total = $this->getTotal();\n $limitstart = $this->getState('limitstart');\n $limit = $this->getState('limit');\n // Create the pagination object\n $this->_pagination = new JPagination($total,$limitstart,$limit);\n }\n return $this->_pagination;\n }", "function getPagination()\r\n\t{\r\n\t if (empty($this->_pagination))\r\n\t {\r\n\t\t jimport('joomla.html.pagination');\r\n\t\t $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\r\n\t }\r\n\t return $this->_pagination;\r\n\t}", "public static function getCurrentPage(){\n\t\treturn \\Illuminate\\Pagination\\Environment::getCurrentPage();\n\t}", "public function Pagination()\n {\n return $this->Table()->Pagination();\n }", "public function getPagination() {\n if (!$this->hasPaginationOptions()) {\n return null;\n }\n\n $pagination = new Pagination($this->getPages(), $this->getPage());\n $pagination->setHref($this->getPaginationUrl());\n\n return $pagination;\n }", "public function getPagination()\n {\n // Lets load the content if it doesn't already exist\n if (empty($this->_pagination))\n {\n $this->_pagination = new JPagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit'));\n }\n \n return $this->_pagination;\n }", "public function calculate()\n {\n\n if (!($this->page && $this->itemsPerPage && $this->pageNumLimit && $this->total)) {\n $this->enabled = false;\n return $this;\n }\n\n if (!is_numeric($this->page)) {\n $this->page = 1;\n }\n $this->offset = ($this->page - 1) * $this->itemsPerPage;\n\n $nav = array();\n $nav['offset'] = $this->offset;\n $nav['thisPage'] = $this->page;\n\n $maxPage = ceil($this->total / $this->itemsPerPage);\n if ($this->page <= $this->pageNumLimit) {\n $startPage = 1;\n } else {\n $startPage = (floor(($this->page - 1) / $this->pageNumLimit) * $this->pageNumLimit) + 1;\n }\n\n $j = 0;\n $k = 0;\n $nav['beforePages'] = array();\n $nav['afterPages'] = array();\n for ($pageCount = 0, $i = $startPage; $i <= $maxPage; $i++) {\n if ($i < $this->page) {\n $nav['beforePages'][$j] = $i;\n $j++;\n }\n\n if ($i > $this->page) {\n $nav['afterPages'][$k] = $i;\n $k++;\n }\n\n $pageCount++;\n if ($pageCount == $this->pageNumLimit) {\n # display page number only.\n break;\n }\n }\n\n # First Page\n if ($this->page > 1) {\n $nav['firstPageNo'] = 1;\n $nav['firstPageEnable'] = 1;\n } else {\n $nav['firstPageEnable'] = 0;\n }\n\n # Previous Page\n if ($this->page > 1) {\n $nav['prePageNo'] = $this->page - 1;\n $nav['prePageEnable'] = 1;\n } else {\n $nav['prePageEnable'] = 0;\n }\n\n # Next page no.\n if ($this->page < $maxPage) {\n $nav['nextPageNo'] = $this->page + 1;\n $nav['nextPageEnable'] = 1;\n\n $nav['lastPageNo'] = $maxPage;\n $nav['lastPageEnable'] = 1;\n\n } else {\n $nav['nextPageEnable'] = 0;\n $nav['lastPageEnable'] = 0;\n }\n # Display multi page or not\n if (($maxPage <= 1) || ($this->page > $maxPage)) {\n $this->enabled = false;\n } else {\n $this->enabled = true;\n }\n\n # if page count is less than page num limit, fill page num till page num limit\n if ($maxPage > $this->pageNumLimit) {\n $allPagesCount = count($nav['beforePages']) + count($nav['afterPages']) + 1;\n if ($allPagesCount < $this->pageNumLimit) {\n $page = $this->page - 1;\n $filledPageCount = $this->pageNumLimit - $allPagesCount;\n if (isset($nav['beforePages'])) {\n $filledPageCount += count($nav['beforePages']);\n }\n $x = 0;\n while ($filledPageCount != $x) {\n $filledPages[] = $page;\n $page--;\n $x++;\n }\n $nav['beforePages'] = array();\n sort($filledPages);\n $nav['beforePages'] = $filledPages;\n }\n }\n\n $this->result = $nav;\n return $this;\n }", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tglobal $mainframe;\n\t\t\tif ($mainframe->isAdmin()){\n\t\t\t\tjimport('joomla.html.pagination');\n\t\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinclude_once(JPATH_COMPONENT_ADMINISTRATOR.\"/libraries/JevPagination.php\");\n\t\t\t\t$this->_pagination = new JevPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit'),true);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "public function getPagination()\n\t{\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\t$this->_pagination = new JPagination($this->getTotal(), $this->getState('list.start'), $this->getState('list.limit'));\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "public function initialPaginate()\n\t{\n\t\treturn $this->getModel()->paginate(self::getItemsPerPage());\n\t}", "public function getPagination() {\r\n if ($this->_pagination === null) {\r\n\r\n $this->_pagination = new CustomPagination;\r\n if (($id = $this->getId()) != '')\r\n $this->_pagination->pageVar = $id . '_page';\r\n }\r\n return $this->_pagination;\r\n }", "public function getPager()\n {\n return $this->_pager;\n }", "public function getPager()\n {\n return $this->_pager;\n }", "function getPagination()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$menutypes \t= MenusHelper::getMenuTypeList();\n\t\t$total\t\t= count( $menutypes );\n\t\t$limit\t\t= $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' );\n\t\t$limitstart = $mainframe->getUserStateFromRequest( 'com_menus.limitstart', 'limitstart', 0, 'int' );\n\n\t\tjimport('joomla.html.pagination');\n\t\t$pagination = new JPagination( $total, $limitstart, $limit );\n\t\treturn $pagination;\n\t}", "public function getPage(){\n return $this->currentPage;\n }", "public function getPaginationAdapter($collection, ServerRequestInterface $request): FractalPaginatorInterface;", "public function paginate()\n {\n return $this->sliced();\n }", "protected function paginate()\n {\n return $this->query\n ->paginate($this->getRecordsPerPage())\n ->appends(request()->query());\n }", "public function getPage()\n {\n return $this->currentPage;\n }", "public function getPagerRange()\n {\n return $this->_pagerRange;\n }", "public function getPage()\n {\n return $this->pagina;\n }", "public function getCurrentPage()\n {\n return $this->currentPage;\n }", "public function getCurrentPage()\n {\n return $this->currentPage;\n }", "public function getCurrentPage()\n {\n return $this->currentPage;\n }", "public function getCurrentPage()\n {\n return $this->currentPage;\n }", "public function getPerPage()\n {\n }", "public function getPaginated()\n\t{\n\t\treturn $this->resource->paginate($this->resource->perPage);\n\t}", "function currentPage()\n {\n return $this->currentPage;\n }", "public function getCurrentPage()\n {\n return $this->_currentPage;\n }", "public function getCurrentPage()\n {\n return $this->_currentPage;\n }", "public function getCurrentPage()\r\n {\r\n \treturn $this->currentPage;\r\n }", "public function currentPage()\n {\n return $this->currentPage;\n }", "public function perpage_select() {\n global $PAGE, $OUTPUT;\n\n $options = array_combine(self::$validperpage, self::$validperpage);\n\n $url = new moodle_url($PAGE->url);\n $url->remove_params(['page', 'perpage']);\n\n $out = '';\n $select = new \\single_select($url, 'perpage', $options, $this->perpage, null, 'perpagechanger');\n $select->label = get_string('itemsperpage', 'gradereport_singleview');\n $out .= $OUTPUT->render($select);\n\n return $out;\n }", "function getPage() {\n\t\t\tif (is_null($this->page)) {\n\t\t\t\t$this->page= 1;\n\t\t\t}\n\t\t\tif ($this->getTotal() > 0) {\n\t\t\t\tif($this->page > $this->getPageCount()) {\n\t\t\t\t\t$this->page = $this->getPageCount();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->page < 1) {\n\t\t\t\t$this->page = 1;\n\t\t\t}\n\t\t\treturn $this->page;\n\t\t}", "public function getPaginator()\n {\n return $this->getParagraphMapper()\n ->getPaginator(\n array(\n new TypedParameters(\n '?.? = ?.? OR ?.? IS NULL',\n array(\n 'paragraph', 'id',\n 'paragraph', 'rootId',\n 'paragraph', 'id',\n ),\n array(\n TypedParameters::TYPE_IDENTIFIER,\n TypedParameters::TYPE_IDENTIFIER,\n TypedParameters::TYPE_IDENTIFIER,\n TypedParameters::TYPE_IDENTIFIER,\n TypedParameters::TYPE_IDENTIFIER,\n TypedParameters::TYPE_IDENTIFIER,\n )\n ),\n ),\n array(\n new Expression(\n 'COALESCE( ?.?, 0 ) ASC',\n array(\n 'paragraph', 'id',\n ),\n array(\n Expression::TYPE_IDENTIFIER,\n Expression::TYPE_IDENTIFIER,\n )\n ),\n ),\n null,\n array(\n 'customize_global' => array(\n 'type' => 'FULL OUTER',\n 'table' => array(\n 'customize_global' => new Values( array( null ) )\n ),\n 'where' => new Expression( 'FALSE' ),\n 'columns' => array(),\n ),\n 'customize_extra' => array(\n 'type' => Select::JOIN_LEFT,\n 'table' => 'customize_extra',\n 'where' => new Expression(\n '?.? IS NOT DISTINCT FROM ?.?',\n array(\n 'customize_extra', 'rootParagraphId',\n 'paragraph', 'id',\n ),\n array(\n Expression::TYPE_IDENTIFIER,\n Expression::TYPE_IDENTIFIER,\n Expression::TYPE_IDENTIFIER,\n Expression::TYPE_IDENTIFIER,\n )\n ),\n 'columns' => array(\n 'updated' => 'updated',\n ),\n ),\n )\n );\n }", "public function getPagado()\r\n {\r\n return $this->Pagado;\r\n }", "public function paginated()\n {\n return $this->repo->paginated(config('cms.pagination', 25));\n }", "public function getCurrentPage()\n {\n \treturn $this->currentPage;\n }", "protected function getPerPage()\n {\n return self::PERPAGE_DEFAULT;\n }", "public function &getPagination()\n\t{\n\t\tjimport('joomla.html.pagination');\n\n\t\t// Create the pagination object.\n\t\t$instance = new JPagination($this->getTotal(), (int)$this->getState('list.start'), (int)$this->getState('list.limit'));\n\n\t\treturn $instance;\n\t}", "function getCurrentPage()\n\t{\n\t\treturn $this->currentPage;\n\t}", "protected function _getPaginatorResponse()\n {\n $totalItems = $this->_getTotalItemsCount();\n $resource = $this->getResource();\n $data = $this->getData();\n\n return array(\n 'current_page_number' => !empty($resource) ? $this->getResource('page') : null,\n 'total_item_count' => $totalItems,\n 'item_count_per_page' => !empty($resource) ? $this->getResource('per_page') : null,\n 'current_item_count' => count($data),\n 'page_count' => !empty($resource) ? ceil($totalItems / $this->getResource('per_page')) : 0,\n 'current_items' => $data\n );\n }", "public function getPages() {\n\t\t$this->pages = ceil($this->total / $this->perPage);\n\t\t// Validate current page\n\t\tif($this->currentPage < 1) {\n\t\t\t$this->currentPage = 1;\n\t\t} elseif($this->currentPage > $this->pages) {\n\t\t\t$this->currentPage = $this->pages;\n\t\t}\n\t\t// Get our page cut off\n\t\t$pageNumbers = $this->getPagesCutOff();\n\t\t// Init\n\t\t$next = $previous = $first = $last = null;\n\t\t// If we have more than one page add the first and previous\n\t\tif($this->pages > 1 && $this->currentPage > 1) {\n\t\t\t$first = $this->buildLink($this->strings['first'], $this->start, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'first')));\n\t\t\t$previous = $this->buildLink($this->strings['previous'], $this->currentPage-1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'previous')));\n\t\t}\n\t\t// Loop and create links\n\t\tforeach($pageNumbers as $i) {\n\t\t\t$this->links[] = $this->buildLink($i, $i, $this->getLocation(), $this->getParams(), $this->getLinkHtmlOptions());\n\t\t}\n\t\t// If we have more than one page add the next and last\n\t\tif($this->pages > 1 && $this->currentPage < $this->pages) {\n\t\t\t$next = $this->buildLink($this->strings['next'], $this->currentPage+1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'next')));\n\t\t\t$last = $this->buildLink($this->strings['last'], $this->pages, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'last')));\n\t\t}\n\t\treturn str_replace(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'{\n\t\titems\n\t}\n\t', '{\n\t\ttotal\n\t}\n\t', '{\n\t\tpages\n\t}\n\t', '{\n\t\tcurrent\n\t}\n\t', '{\n\t\tfirst\n\t}\n\t', '{\n\t\tprevious\n\t}\n\t', '{\n\t\tnext\n\t}\n\t', '{\n\t\tlast\n\t}\n\t',\n\t\t\t\t\t\t'{\n\t\tdataStart\n\t}\n\t', '{\n\t\tdataCurrent\n\t}\n\t', '{\n\t\tdataRange\n\t}\n\t', '{\n\t\tdataEnd\n\t}\n\t', '{\n\t\tdataLast\n\t}\n\t'\n\t\t\t\t\t), \n\t\t\t\t\tarray(\n\t\t\t\t\t\timplode(' ', $this->links), $this->total, $this->pages, $this->currentPage, $first, $previous, $next, $last,\n\t\t\t\t\t\t$this->dataStart, $this->currentPage, $this->perPage, $this->dataEnd, $this->pages\n\t\t\t\t\t), \n\t\t\t\t$this->itemsTemplate);\n\t}", "public function getPagination(){ \n // PAGINATION - get the bottom navigation\n $pagination = $this->dom->find('ul[class=pagination]' , 1);\n\n if( count($pagination) ){\n foreach( $pagination->find('a') as $link) {\n // Ignore Next link\n if( $link->plaintext !== 'Next'){\n // Get all anchor attributes of links\n //$link_url = $this->DEFAULT_URL .$link->href;\n $link_url = self::DEFAULT_URL .$link->href;\n $this->pagination[] = $link_url;\n } \n }\n }\n \n return $this->pagination;\n }", "public function getPagination()\n\t{\n\t\t$store = $this->getStoreId('getPagination');\n\t\n\t\t// Try to load the data from internal storage.\n\t\tif (isset($this->cache[$store]))\n\t\t{\n\t\t\treturn $this->cache[$store];\n\t\t}\n\t\n\t\t// Create the pagination object.\n\t\t$limit = (int) $this->getState('list.limit') - (int) $this->getState('list.links');\n\t\t$page = new ProfilerHelperPagination($this->getTotal(), $this->getStart(), $limit);\n\t\n\t\t// Add the object to the internal cache.\n\t\t$this->cache[$store] = $page;\n\t\n\t\treturn $this->cache[$store];\n\t}", "public function getPaginationClass()\n {\n return $this->pagerClass;\n }", "public function getPaginator($page = 1){\n $paginator = $this->paginator;\n\n $newsPaginator = $paginator->paginate($this->query, $page, 10);\n return $newsPaginator;\n }" ]
[ "0.77047014", "0.7548794", "0.7490026", "0.7490026", "0.7484127", "0.72254497", "0.72254497", "0.71468973", "0.7091693", "0.7061334", "0.70466477", "0.70466477", "0.67260987", "0.67260987", "0.67260987", "0.67260987", "0.67260987", "0.66085297", "0.660181", "0.6601755", "0.6601755", "0.6601755", "0.65893674", "0.65893674", "0.656594", "0.6562573", "0.65177715", "0.64917237", "0.64704424", "0.64702845", "0.64650905", "0.6437419", "0.6422334", "0.63983434", "0.6391822", "0.6391822", "0.6365096", "0.6356854", "0.63446516", "0.6314437", "0.62890345", "0.6286206", "0.62594235", "0.62447774", "0.62447774", "0.62447774", "0.62427425", "0.6242595", "0.6229936", "0.62206006", "0.6212654", "0.6208501", "0.6206129", "0.61939335", "0.61925566", "0.6162353", "0.6132804", "0.611068", "0.6081625", "0.6054928", "0.604443", "0.6038347", "0.60116917", "0.6010872", "0.60082453", "0.60082453", "0.5993954", "0.5983034", "0.59708905", "0.5955256", "0.59478235", "0.59443367", "0.5942794", "0.5941804", "0.5940498", "0.5940498", "0.5940498", "0.5940498", "0.5924781", "0.5917477", "0.5906503", "0.5898988", "0.5898988", "0.58922267", "0.58848274", "0.58587223", "0.5848355", "0.58457214", "0.5843856", "0.5842312", "0.5841122", "0.5830669", "0.58285195", "0.5815434", "0.58110136", "0.5806547", "0.5783789", "0.5781397", "0.5779565", "0.5777897" ]
0.7702893
1
Indication that object was paginated.
Указание на то, что объект был пагинирован.
public function isPaginated() { return !empty($this->paginator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_paged()\n {\n }", "public function paginated(): bool\n {\n return $this->paginate;\n }", "function results_are_paged()\n {\n }", "public function isPaged()\n\t{\n\t\treturn $this->withPaging;\n\t}", "public function hasPagination(): bool;", "protected function isPaginated()\n {\n $response = $this->response();\n\n if (!is_array($response)) {\n return false;\n }\n\n return array_key_exists('data', $response)\n && is_array($response['data'])\n && array_key_exists('data', $response['data']);\n }", "public function canPaginate()\n {\n return false;\n }", "public function isPaginated()\n {\n return $this->product_rows > 0;\n }", "public function getPaginationVisibility(){\n\t\treturn $this->bShowPagination;\n\t}", "public function hasPaginator(): bool;", "public function paginated($paginate);", "function paggingInfo($obj)\n{\n return [\n 'start' => (($obj->currentPage()-1) * $obj->perPage() + 1),\n 'end' => (($obj->currentPage()*$obj->perPage()) > $obj->total() ? $obj->total() : ($obj->currentPage()*$obj->perPage())),\n 'total' => $obj->total()\n ];\n}", "public function paginate();", "public function paginate();", "public function willShowPagination() {\n\t\treturn $this->showPagination ? true : false;\n\t}", "public function getPaginate() {}", "public function getPagination();", "public function getPagination();", "public function do_paging()\n {\n }", "public function isPaginationEnabled() {\n\t\treturn $this->isPaginationEnabled ? true : false;\n\t}", "public function supports_paging() {\n return true;\n }", "public function setWillShowPagination($flag) {\n\t\t$this->showPagination = $flag;\n\t}", "public function haveToPaginate()\n {\n return $this->getNumResults() > $this->getMaxPerPage();\n }", "public function isPaginationable(): bool\n {\n return ! is_null($this->request->input('start')) &&\n ! is_null($this->request->input('length')) &&\n $this->request->input('length') != -1;\n }", "public function implementsPaging() : bool {\n return false;\n}", "function getObjectsPerPage() {\n $value = parent::getObjectsPerPage();\n return $value > 0 ? $value : 30;\n }", "public function hasPaginator()\r\n {\r\n return ($this->_pagniatorConfig);\r\n }", "public function paginateAllResources();", "public function getLimitPaginate()\n {\n return self::$limit_paginate;\n\n return true;\n }", "public function paginates($request);", "public function hasVisiblePages() {}", "public function hasNextPage();", "public function paginated()\n {\n return $this->repo->paginated(config('cms.pagination', 25));\n }", "public function haveToPaginate()\n {\n return $this->getMaxPerPage() && $this->getNbResults() > $this->getMaxPerPage();\n }", "public function getHaveToPaginate()\n {\n return (bool) ($this->totalItem>$this->itemsPerPage);\n }", "function afficher_pagination()\n\t {\n\t }", "public function shouldPaginateRequest(): bool\n {\n // no matter the size of the page. Because of that, when ordering by those fields, it's better to load the\n // whole dataset at once, until that issue is fixed.\n\n if (! isset($this->query['orderBy'])) {\n return true;\n }\n\n [$field] = explode('-', $this->query['orderBy']);\n $orderFieldsThatShouldNotPaginate = [\n TagsListOrderField::SHORT_URLS_COUNT->value,\n TagsListOrderField::VISITS_COUNT->value,\n ];\n\n return ! in_array($field, $orderFieldsThatShouldNotPaginate, true);\n }", "public function get_pagenum()\n {\n }", "public function getPaginated()\n\t{\n\t\treturn $this->resource->paginate($this->resource->perPage);\n\t}", "public function paginate()\n {\n return $this->sliced();\n }", "public function hasPages() {}", "public function getPaginationGotoVisibility() {\n return $this->bShowGotoNavigation;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "private function paginateView(Doctrine_Query $QueryObject, $pagina_atual, $registros_por_pagina) {\n\n try {\n\n //Recebe o total de registros\n $total_registros = $QueryObject->count();\n\n //Verifica se a paginação é necessária\n if ($total_registros > $registros_por_pagina) {\n //Calcula o total de paginas\n $total_paginas = ceil($total_registros / $registros_por_pagina);\n\n //Verifica se o usuário esta solicitando uma página que não existe\n if ($pagina_atual > $total_paginas) {\n\n //Retorna falso, pois a página solicitada não existe\n return false;\n } else {\n\n //Calcula a sessão anterior de páginas\n if (($pagina_atual - $this->num_paginas_por_sessao) < 1)\n $anterior = 1;\n else\n $anterior = $pagina_atual - $this->num_paginas_por_sessao;\n\n //Calcula a sessão posterior de páginas\n if (($pagina_atual + $this->num_paginas_por_sessao) > $total_paginas)\n $posterior = $total_paginas;\n else\n $posterior = $pagina_atual + $this->num_paginas_por_sessao;\n\n //Retorna o resultado final da paginação\n return array(\n 'total_rows' => $total_registros,\n 'total_pages' => $total_paginas,\n 'current_page' => $pagina_atual,\n 'prev' => $anterior,\n 'next' => $posterior);\n }\n }else {\n\n //Paginação não necessária\n return false;\n }\n } catch (Doctrine_Exception $e) {\n\n echo $e->getMessage();\n }\n }", "public function paginate()\n {\n return $this->user->paginate();\n }", "public function hasMorePages(): bool;", "public function withPagination() : bool\n {\n return $this->getQuery('format', 'string') == 'true';\n }", "public function hasPageSize(){\n return $this->_has(1);\n }", "public function getPagination() {\n return $this->pagination;\n }", "public function hasNextPage(): bool\n {\n return $this->end() < $this->total();\n }", "public function getPagado()\r\n {\r\n return $this->Pagado;\r\n }", "public function hasPages()\n {\n return $this->paginator->hasPages();\n }", "public function hasPages()\n {\n return $this->paginator->hasPages();\n }", "public function authorize()\n {\n $this->paginate = $this->paginate === null ?: $this->paginate;\n\n return true;\n }", "public function isLastPage() {}", "public function get_pagination_data() {\n\n\t\treturn ! empty( $this->response_data->paging ) ? $this->response_data->paging : new \\stdClass();\n\t}", "function Paginate($bool = true,$perPage = 1)\n {\n \t$this->withPag = $bool;\n \tif($bool == true)\n {\n \t\t$this->paginatorObj = new TPaginator($this,$perPage);\n \t}\n }", "private function isValid(){\nif (property_exists($this->obj,'perPage') ) {\n\n\t$this->isPaginat = true;\n\treturn true;\n}else{ return false;}\n}", "public function hasPageSize(){\n return $this->_has(2);\n }", "public function hasPageSize(){\n return $this->_has(2);\n }", "public function hasPageSize(){\n return $this->_has(2);\n }", "public function hasPageSize(){\n return $this->_has(2);\n }", "public function hasPageSize(){\n return $this->_has(2);\n }", "public static function pagination()\n {\n return 20;\n }", "public function getPerPage()\n {\n }", "public function Paginator(){\n\n\n }", "protected function paginationInformation()\n {\n $paginated = $this->resource->toArray();\n\n return [\n 'links' => $this->paginationLinks($paginated),\n 'meta' => $this->meta($paginated),\n ];\n }", "function paginatedview(){\n if($this->RequestHandler->isAjax()){\n $this->layout='ajax';\n }\n //$this->layout='ajax';\n $this->paginate=array(\n 'limit'=>STUDENT_PAGINATION_LIMIT,\n 'order'=>array(\n 'Student.created'=>'desc'\n ),\n 'conditions'=>array(\n 'school_id'=>$this->Session->read('School.id')\n )\n );\n $studentData=$this->Paginate('Student');\n $this->set(compact('studentData'));\n \n }", "public function initialPaginate()\n\t{\n\t\treturn $this->getModel()->paginate(self::getItemsPerPage());\n\t}", "private function paginated($value) : void\n {\n $value = json_decode($value);\n\n if($value){\n $this->result = $this->result->paginate($this->request->get('limit'));\n\n $this->return['page'] = $this->result->currentPage() - 1;\n $this->return['pages'] = $this->result->lastPage();\n }else{\n $this->result = $this->result->get();\n }\n }", "public function paginate(PaginableInterface $paginable);", "public function get_page_permastruct()\n {\n }", "public function hasPreviousPage();", "public function hasPages()\n\t{\n\t\treturn $this->pagination->hasPages();\n }", "public function setIsPaginationEnabled($flag) {\n\t\t$this->isPaginationEnabled = $flag;\n\t}", "public function getPageCount() {}", "public function hasPageSize(){\n return $this->_has(3);\n }", "public function hasPageSize(){\n return $this->_has(3);\n }", "public function hasPageSize(){\n return $this->_has(3);\n }", "public function hasPageSize(){\n return $this->_has(3);\n }", "function hasNextPage() { \n\t\t\t\n\t\t\t$this->POD->tolog(\"hasNextPage? \" .$this->totalCount() . \" > \" . $this->nextPage() );\n\t\t\tif ($this->totalCount() > $this->nextPage()) { \n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t}", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function hasPages(): bool\n {\n return $this->total() > $this->limit();\n }", "function paginate($object = null, $scope = array(), $whitelist = array())\n\t{\n\t\tif (is_string($object))\n\t\t\t$this->passedArgs['show'] = $this->passedArgs['limit'] = $this->paginate[$object]['limit'];\n\t\t$results = parent::paginate($object, $scope, $whitelist);\n\t\t\n\t\treturn $results;\n\t}", "protected function currentPageHasSubPages() {}", "public function paginate(array $data);", "public function perPage(): int;", "function getPageCount() {\r\n return $this->page_count;\r\n }", "function paginate($obj)\n {\n // integrate bootstrap pagination\n $config['full_tag_open'] = '<ul class=\"pagination justify-content-end mb-0\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t\n\t\t$config['first_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['first_link'] = '<i class=\"fas fa-angle-left\"></i>';\n\t\t$config['first_tag_close'] = '</li>';\n\t\t\n\t\t$config['next_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['next_link'] = '<i class=\"fas fa-angle-double-right\"></i>';\n\t\t$config['next_tag_close'] = '</li>';\n\t\t\n\t\t$config['prev_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['prev_link'] = '<i class=\"fas fa-angle-double-left\"></i>';\n $config['prev_tag_close'] = '</li>';\n $config['num_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t\n\t\t$config['last_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['last_link'] = '<i class=\"fas fa-angle-right\"></i>';\n\t\t$config['last_tag_close'] = '</li>';\n\t\t\n $config['cur_tag_open'] = '<li class=\"active page-item\"><span><b>';\n\t\t$config['cur_tag_close'] = '</b></span></li>';\n\t\t\n\t\t// set these mostly...\n\t\t$config['page_query_string'] = TRUE;\n\t\t$config['query_string_segment'] = 'offset';\n\t\t$config['reuse_query_string'] = TRUE;\n\n\n\t\t// custom config\n\t\t$config['base_url'] = $obj['base_url'];\n\t\t$config['total_rows'] = $obj['total_rows'];\n\t\t$config['per_page'] = $obj['per_page'];\n\t\t$config['uri_segment'] = $obj['uri_segment'];\n\n\t\t// link tag class [ <a href=\"#\" class=\"page-link\"></a>]\n\t\t$config['attributes'] = array('class' => 'page-link');\n\n\t\t$this->ci->pagination->initialize($config);\n\t\t// return pagination links\n\t\treturn $this->ci->pagination->create_links();\n }", "function atFirstPage()\n {\n if ($this->currentPage == WFPaginator::PAGINATOR_FIRST_PAGE)\n {\n return true;\n }\n return false;\n }", "public function hasMorePages()\n {\n return $this->hasMore;\n }", "public function hasMorePages()\n {\n return $this->hasMore;\n }", "public function paginate($direction = 'desc', $limit = NULL);", "public function getPaginator();", "public function getPaginator();", "protected function GetPageSize()\n {\n return -1;\n }", "public function paginator()\n {\n return $this->paginator;\n }" ]
[ "0.7284793", "0.70886016", "0.7032561", "0.6935953", "0.686017", "0.67942566", "0.67031884", "0.66436523", "0.65619475", "0.65048796", "0.6443378", "0.6424259", "0.63822937", "0.63822937", "0.6375883", "0.63592607", "0.62580657", "0.62580657", "0.62178844", "0.6155788", "0.6084073", "0.60795707", "0.60773766", "0.60529965", "0.6049444", "0.60480565", "0.6011285", "0.6007102", "0.60047907", "0.5985436", "0.59837353", "0.5927923", "0.5917566", "0.590053", "0.5894032", "0.5840539", "0.5817961", "0.5810173", "0.5808504", "0.5805262", "0.5805", "0.5766838", "0.57452404", "0.57452404", "0.57452404", "0.573974", "0.57342595", "0.5725954", "0.5696656", "0.5683634", "0.568086", "0.5680194", "0.5674789", "0.56552696", "0.56552696", "0.5638316", "0.56296057", "0.56167525", "0.56137085", "0.560371", "0.56019783", "0.56019783", "0.56019783", "0.56019783", "0.56019783", "0.5600123", "0.5593267", "0.5591987", "0.5591293", "0.5570724", "0.55698955", "0.5564353", "0.5548106", "0.5531563", "0.55029255", "0.55007935", "0.5497716", "0.5492806", "0.5477188", "0.5477188", "0.5477188", "0.5477188", "0.5470592", "0.5446455", "0.5446455", "0.5441913", "0.5431774", "0.54244965", "0.54244834", "0.5424307", "0.54122674", "0.5392269", "0.537179", "0.53693664", "0.53693664", "0.5368402", "0.53662205", "0.53662205", "0.53638256", "0.5359892" ]
0.71195346
1
Apply pagination to current object. Will be applied only if internal paginator already constructed.
Применить пагинацию к текущему объекту. Будет применена только в том случае, если внутренний пагинатор уже построен.
protected function applyPagination() { if (empty($this->paginator)) { return $this; } return $this->paginator->paginate($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function applyPagination() {\n $this->countRows = count($this->values);\n\n if (!$this->pageRows) {\n return;\n }\n\n $this->pages = ceil($this->countRows / $this->pageRows);\n if ($this->page > $this->pages || $this->page < 1) {\n $this->page = 1;\n }\n\n $offset = ($this->page - 1) * $this->pageRows;\n\n $this->values = array_slice($this->values, $offset, $this->pageRows, true);\n }", "protected function buildPagination() {}", "protected function buildPagination() {}", "protected function updateIterator() {\n // Determine the current page by seeing the current item number and\n // comparing with the number of results per page.\n $current_page = (int) ceil(($this->currentPosition + 1) / $this->perPage);\n\n // Fetch the page from the API if we don't have it yet.\n if ($this->currentPage != $current_page) {\n\n // Get the page of results.\n $this->currentPageResults = $this->apiGetPaintCans->getPostsData($current_page);\n $this->currentPage = $current_page;\n }\n }", "public function setPagination(PaginationInterface $pagination): void;", "function paginate($obj)\n {\n // integrate bootstrap pagination\n $config['full_tag_open'] = '<ul class=\"pagination justify-content-end mb-0\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t\n\t\t$config['first_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['first_link'] = '<i class=\"fas fa-angle-left\"></i>';\n\t\t$config['first_tag_close'] = '</li>';\n\t\t\n\t\t$config['next_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['next_link'] = '<i class=\"fas fa-angle-double-right\"></i>';\n\t\t$config['next_tag_close'] = '</li>';\n\t\t\n\t\t$config['prev_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['prev_link'] = '<i class=\"fas fa-angle-double-left\"></i>';\n $config['prev_tag_close'] = '</li>';\n $config['num_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t\n\t\t$config['last_tag_open'] = '<li class=\"page-item\">';\n\t\t$config['last_link'] = '<i class=\"fas fa-angle-right\"></i>';\n\t\t$config['last_tag_close'] = '</li>';\n\t\t\n $config['cur_tag_open'] = '<li class=\"active page-item\"><span><b>';\n\t\t$config['cur_tag_close'] = '</b></span></li>';\n\t\t\n\t\t// set these mostly...\n\t\t$config['page_query_string'] = TRUE;\n\t\t$config['query_string_segment'] = 'offset';\n\t\t$config['reuse_query_string'] = TRUE;\n\n\n\t\t// custom config\n\t\t$config['base_url'] = $obj['base_url'];\n\t\t$config['total_rows'] = $obj['total_rows'];\n\t\t$config['per_page'] = $obj['per_page'];\n\t\t$config['uri_segment'] = $obj['uri_segment'];\n\n\t\t// link tag class [ <a href=\"#\" class=\"page-link\"></a>]\n\t\t$config['attributes'] = array('class' => 'page-link');\n\n\t\t$this->ci->pagination->initialize($config);\n\t\t// return pagination links\n\t\treturn $this->ci->pagination->create_links();\n }", "protected function pagination()\n {\n $this->pageLength = $this->request->has('limit') ? $this->request->limit : $this->pageLength;\n $page = $this->request->page ?? 1;\n $page -= 1;\n\n $this->query->limit($this->pageLength);\n $this->query->offset($page * $this->pageLength);\n }", "function afficher_pagination()\n\t {\n\t }", "protected function addPaging()\n {\n $limit = $this->parser->getLimit();\n $offset = $this->parser->getOffset();\n\n if ($offset <= 0) {\n $skip = 0;\n }\n else {\n $skip = $offset;\n }\n\n $this->query->skip($skip);\n\n $this->query->take($limit);\n\n return $this;\n }", "protected function initializePager() {\n if ($this->pager && !empty($this->pager['limit']) && !$this->count) {\n $page = \\Drupal::service('pager.parameters')->findPage($this->pager['element']);\n $count_query = clone $this;\n $this->pager['total'] = $count_query->count()->execute();\n $this->pager['start'] = $page * $this->pager['limit'];\n \\Drupal::service('pager.manager')->createPager($this->pager['total'], $this->pager['limit'], $this->pager['element']);\n $this->range($this->pager['start'], $this->pager['limit']);\n }\n }", "function PaginateIt(){\n $this->SetCurrentPage(1);\n $this->SetItemsPerPage(10);\n $this->SetItemCount(0);\n $this->SetLinksFormat('&laquo; Back',' &bull; ','Next &raquo;');\n $this->SetLinksHref($_SERVER['PHP_SELF']);\n $this->SetLinksToDisplay(10);\n $this->SetQueryStringVar('page');\n $this->SetQueryString($_SERVER['QUERY_STRING']);\n $this->SetModRewrite(0);\n \n //if(isset($_GET[$this->queryStringVar]) && is_numeric($_GET[$this->queryStringVar])){\n // $this->SetCurrentPage($_GET[$this->queryStringVar]);\n //}\n }", "public function applyPagination($query)\n {\n return $query->paginate($this->perPage);\n }", "protected function applyPageSize()\n {\n if (!empty($this->_pageSize)) {\n $dataProvider = $this->gridOptions['dataProvider'];\n $pagination = $dataProvider->getPagination();\n $pagination->pageSize = $this->_pageSize;\n $dataProvider->setPagination($pagination);\n $this->gridOptions['dataProvider'] = $dataProvider;\n }\n }", "public function paginated($paginate);", "public function postDispatch ( )\n {\n parent::postDispatch();\n\n $this->view->paginator = new Zend_Paginator(\n $this->getModel($this->_modelName)->getTable()->getPaginationAdapter()\n );\n }", "public function paginate();", "public function paginate();", "public function calculate()\n {\n\n if (!($this->page && $this->itemsPerPage && $this->pageNumLimit && $this->total)) {\n $this->enabled = false;\n return $this;\n }\n\n if (!is_numeric($this->page)) {\n $this->page = 1;\n }\n $this->offset = ($this->page - 1) * $this->itemsPerPage;\n\n $nav = array();\n $nav['offset'] = $this->offset;\n $nav['thisPage'] = $this->page;\n\n $maxPage = ceil($this->total / $this->itemsPerPage);\n if ($this->page <= $this->pageNumLimit) {\n $startPage = 1;\n } else {\n $startPage = (floor(($this->page - 1) / $this->pageNumLimit) * $this->pageNumLimit) + 1;\n }\n\n $j = 0;\n $k = 0;\n $nav['beforePages'] = array();\n $nav['afterPages'] = array();\n for ($pageCount = 0, $i = $startPage; $i <= $maxPage; $i++) {\n if ($i < $this->page) {\n $nav['beforePages'][$j] = $i;\n $j++;\n }\n\n if ($i > $this->page) {\n $nav['afterPages'][$k] = $i;\n $k++;\n }\n\n $pageCount++;\n if ($pageCount == $this->pageNumLimit) {\n # display page number only.\n break;\n }\n }\n\n # First Page\n if ($this->page > 1) {\n $nav['firstPageNo'] = 1;\n $nav['firstPageEnable'] = 1;\n } else {\n $nav['firstPageEnable'] = 0;\n }\n\n # Previous Page\n if ($this->page > 1) {\n $nav['prePageNo'] = $this->page - 1;\n $nav['prePageEnable'] = 1;\n } else {\n $nav['prePageEnable'] = 0;\n }\n\n # Next page no.\n if ($this->page < $maxPage) {\n $nav['nextPageNo'] = $this->page + 1;\n $nav['nextPageEnable'] = 1;\n\n $nav['lastPageNo'] = $maxPage;\n $nav['lastPageEnable'] = 1;\n\n } else {\n $nav['nextPageEnable'] = 0;\n $nav['lastPageEnable'] = 0;\n }\n # Display multi page or not\n if (($maxPage <= 1) || ($this->page > $maxPage)) {\n $this->enabled = false;\n } else {\n $this->enabled = true;\n }\n\n # if page count is less than page num limit, fill page num till page num limit\n if ($maxPage > $this->pageNumLimit) {\n $allPagesCount = count($nav['beforePages']) + count($nav['afterPages']) + 1;\n if ($allPagesCount < $this->pageNumLimit) {\n $page = $this->page - 1;\n $filledPageCount = $this->pageNumLimit - $allPagesCount;\n if (isset($nav['beforePages'])) {\n $filledPageCount += count($nav['beforePages']);\n }\n $x = 0;\n while ($filledPageCount != $x) {\n $filledPages[] = $page;\n $page--;\n $x++;\n }\n $nav['beforePages'] = array();\n sort($filledPages);\n $nav['beforePages'] = $filledPages;\n }\n }\n\n $this->result = $nav;\n return $this;\n }", "public function init() {\n\t\t$model = $this->model;\n\t\t\n\t\t// Set options to select models efficiently\n\t\t$count_options = array(\n\t\t\t'select'\t\t=> $model::table()->table .'.id',\n\t\t\t'conditions' \t=> $this->conditions,\n\t\t\t'joins'\t\t\t=> $this->joins\n\t\t);\n\t\t\n\t\t// Calculate total pages\n\t\t$this->total = ceil( count( $model::all($count_options) ) / $this->limit );\n\t\t\n\t\t// If actual_page is false (0) or it's bigger than total pages\n\t\tif(!$this->active or $this->active > $this->total)\n\t\t\t// Set actual page to first page\n\t\t\t$this->active = 1;\n\t\t\n\t\t// Set default page range\n\t\t$this->range(3);\n\t\t\n\t\t// Calculate offset\n\t\t$offset = ($this->active - 1) * $this->limit;\n\t\t\n\t\t// Return results\n\t\t$this->results = $model::all(array(\n\t\t\t'conditions'\t=>\t$this->conditions,\n\t\t\t'joins'\t\t\t=>\t$this->joins,\n\t\t\t'include'\t\t=>\t$this->include,\n\t\t\t'limit'\t\t\t=>\t$this->limit,\n\t\t\t'order'\t\t\t=>\t$this->order,\n\t\t\t'offset'\t\t=>\t$offset\n\t\t));\n\t\t\n\t\treturn $this;\n\t}", "protected function paginate()\n {\n return $this->query\n ->paginate($this->getRecordsPerPage())\n ->appends(request()->query());\n }", "protected function applyPageSize()\n {\n if (isset($this->_pageSize) && $this->_pageSize != '' && $this->allowPageSetting) {\n /** @var BaseDataProvider $dataProvider */\n $dataProvider = $this->gridOptions['dataProvider'];\n if ($dataProvider instanceof ArrayDataProvider) {\n $dataProvider->refresh();\n }\n if ($this->_pageSize > 0) {\n $pagination = $dataProvider->getPagination();\n $pagination->pageSize = $this->_pageSize;\n $dataProvider->setPagination($pagination);\n } else {\n $dataProvider->setPagination(false);\n }\n if ($dataProvider instanceof SqlDataProvider) {\n $dataProvider->prepare(true);\n }\n $this->gridOptions['dataProvider'] = $dataProvider;\n }\n }", "public function initialPaginate()\n\t{\n\t\treturn $this->getModel()->paginate(self::getItemsPerPage());\n\t}", "public function paginate(Builder $query, $per_page, $current_page);", "public function setPaginationData($params){\n\n\n }", "protected function applyPagination(Request $request, QueryBuilder $query)\n {\n // because it cannot predict the total count in the database.\n // The solution to that is simple and direct, you can provide the count manually through the hint on the query.\n $count = count($query->getQuery()->getScalarResult());\n $query->getQuery()->setHint('knp_paginator.count', $count);\n\n $pagination = $this->paginator->paginate(\n $query,\n $request->query->get('page', 1)/*page number*/,\n $this->limit_per_page /*limit per page*/,\n array()\n );\n\n $pagination->setTemplate('admin_flock/crud/_pagination.html.twig');\n\n return $pagination;\n }", "protected function _setupPagination() {\n $this->Paginator->settings = array(\n 'limit' => 12,\n 'conditions' => array(\n $this->modelClass . '.active' => 1,\n $this->modelClass . '.client' => \"GSE\",\n $this->modelClass . '.email_verified' => 1\n )\n );\n }", "public function getPagination();", "public function getPagination();", "public function paginateAllResources();", "private function loadPaginator(){\n \n $Interface = \"\\\\Voodoo\\\\Core\\\\Interfaces\\\\Pagination\";\n \n $ClassInjection = $this->getConfig(\"VoodooDependencies.Controller.Pagination\");\n \n $DI = new \\ReflectionClass($ClassInjection);\n \n if(!$DI->implementsInterface($Interface))\n throw new Exception(\"{$ClassInjection} Must implement the interface: {$Interface}\");\n \n \n $this->Paginator = $DI->newInstanceArgs(array($this->getRequestURI(),$this->getConfig(\"Views.Pagination.PagePattern\"))); \n \n $this->Paginator->setItemsPerPage($this->getConfig(\"Views.Pagination.ItemsPerPage\"))\n ->setNavigationSize($this->getConfig(\"Views.Pagination.NavigationSize\"));\n return\n $this;\n }", "public function toPagination()\n\t{\n\t\t$pagination = $this->resolve(array());\n\t\t\n\t\t$classes = array();\n\t\t$classes['ul'] = $pagination['ul_class'];\n\t\t$classes['li'] = array();\n\t\t$classes['li']['default'] = array();\n\t\t$classes['li']['active'] = array();\n\t\t$classes['li']['disabled'] = array();\n\t\t\n\t\tif($pagination['li_class'] !== null && !empty($pagination['li_class']))\n\t\t{\n\t\t\t$classes['li']['default'][] = $pagination['li_class'];\n\t\t\t$classes['li']['active'][] = $pagination['li_class'];\n\t\t\t$classes['li']['disabled'][] = $pagination['li_class'];\n\t\t}\n\t\t\n\t\tif($pagination['li_class_active'] !== null && !empty($pagination['li_class_active']))\n\t\t{\n\t\t\t$classes['li']['active'][] = $pagination['li_class_active'];\n\t\t}\n\t\t\n\t\tif($pagination['li_class_disabled'] !== null && !empty($pagination['li_class_disabled']))\n\t\t{\n\t\t\t$classes['li']['disabled'][] = $pagination['li_class_disabled'];\n\t\t}\n\t\t\n\t\treturn new Pagination(\n\t\t\t$pagination['template'],\n\t\t\t$pagination['param'],\n\t\t\t$pagination['rows_per_page'],\n\t\t\t$pagination['show_empty'],\n\t\t\t$classes,\n\t\t\t$pagination['prev_label'],\n\t\t\t$pagination['next_label'],\n\t\t\t$pagination['max_pages']\n\t\t);\n\t}", "public function paginate(PaginableInterface $paginable);", "public function getPaginate() {}", "public function do_paging()\n {\n }", "public function paginateResults($perPage)\n {\n $this->paginate = $perPage;\n\n return $this;\n }", "private function preparePaginationInfo() {\n $postIsPaginate = $this->getSetting('_post_paginate');\n $postNextPageUrlSelectors = $this->getSetting('_post_next_page_url_selectors');\n $postAllPageUrlsSelectors = $this->getSetting('_post_next_page_all_pages_url_selectors');\n\n // Add whether or not to paginate the post when saving to the db\n $this->postData->setPaginate($postIsPaginate ? true : false);\n\n // Before clearing the content, check if the post should be paginated and take related actions.\n // Do this before clearing the content, because pagination might be inside the content and the user might mark\n // it as unnecessary element.\n if($postIsPaginate) {\n // Get next page URL of the post\n foreach($postNextPageUrlSelectors as $nextPageSelector) {\n $attr = isset($nextPageSelector[\"attr\"]) && $nextPageSelector[\"attr\"] ? $nextPageSelector[\"attr\"] : \"href\";\n if ($nextPageUrl = $this->extractData($this->crawler, $nextPageSelector[\"selector\"], $attr, false, true, true)) {\n\n $this->postData->setNextPageUrl(Utils::prepareUrl($this->getSiteUrl(), $nextPageUrl, $this->postUrl));\n break;\n }\n }\n\n // Get all page URLs of the post\n foreach($postAllPageUrlsSelectors as $selector) {\n $attr = isset($selector[\"attr\"]) && $selector[\"attr\"] ? $selector[\"attr\"] : \"href\";\n if ($allPageUrls = $this->extractData($this->crawler, $selector, $attr, \"part_url\", false, true)) {\n $allPageUrls = Utils::array_msort($allPageUrls, [\"start\" => SORT_ASC]);\n\n $this->postData->setAllPageUrls($allPageUrls);\n break;\n }\n }\n }\n }", "public function buildPagination()\n {\n $this->adjustForForcedNumberOfLinks();\n\n $pages = array();\n $start = max($this->currentPage - $this->pagesBefore, 0);\n $end = min($this->numberOfPages, $this->currentPage + $this->pagesAfter + 1);\n for ($i = $start; $i < $end; $i++) {\n $j = $i + 1;\n $pages[] = array('number' => $j, 'isCurrent' => (intval($j) === intval($this->currentPage)));\n }\n\n $pagination = array(\n 'pages' => $pages,\n 'current' => $this->currentPage,\n 'numberOfPages' => $this->numberOfPages,\n 'numberOfItems' => $this->numberOfItems,\n 'pagesBefore' => $this->pagesBefore,\n 'pagesAfter' => $this->pagesAfter,\n 'firstPageItem' => ($this->currentPage - 1) * (int)$this->configuration['itemsPerPage'] + 1\n );\n if ($this->currentPage < $this->numberOfPages) {\n $pagination['nextPage'] = $this->currentPage + 1;\n $pagination['lastPageItem'] = $this->currentPage * (integer)$this->configuration['itemsPerPage'];\n } else {\n $pagination['lastPageItem'] = $pagination['numberOfItems'];\n }\n\n // previous pages\n if ($this->currentPage > 1) {\n $pagination['previousPage'] = $this->currentPage - 1;\n }\n\n // less pages (before current)\n if ($start > 0 && $this->lessPages) {\n $pagination['lessPages'] = true;\n }\n\n // next pages (after current)\n if ($end != $this->numberOfPages && $this->lessPages) {\n $pagination['morePages'] = true;\n }\n\n return $pagination;\n }", "protected function setPaginationDisplayValues()\n {\n if ((int)$this->display_items_per_page_count === 0) {\n $this->display_items_per_page_count = 9999999;\n $this->start_page_number = 1;\n $this->display_page_link_count = 0;\n }\n\n $this->setStartParameter();\n\n $this->setDisplayPageLinkCount();\n\n return $this;\n }", "public function paginator(PaginatorInterface $value): static\n {\n $new = clone $this;\n $new->paginator = $value;\n\n return $new;\n }", "public function get_pagination() {\n\n // Get the pagination\n $pagination = $this->the_pagination();\n\n // Verify if pagination exists\n if ( $pagination ) {\n\n // Set current page\n $current = $pagination['current'];\n\n // Limit variable\n $limit = $pagination['limit'];\n\n // Total\n $total = $pagination['total'];\n\n // Url\n $url = $pagination['url'];\n\n // Verify if the current page is greater than 1\n if ($current > 1) {\n\n // Calculate the previous link\n $previous = $current - 1;\n\n // Set previous\n $pages = '<li>'\n . '<a href=\"' . $url . $previous . '\">'\n . 'Prev'\n . '</a>'\n . '</li>';\n\n } else {\n\n // Set previous\n $pages = '<li class=\"pagehide\">'\n . '<a href=\"#\">'\n . 'Prev'\n . '</a>'\n . '</li>';\n\n }\n\n // Calculate the page by total and limit\n $total = $total / $limit;\n\n // Set new total value\n $total = ceil($total) + 1;\n\n // Set the page from where to start the counting\n $from = ($current > 2) ? $current - 2 : 1;\n\n // List pages\n for ($p = $from; $p < $total; $p++) {\n\n // Verify if is the current page\n if ($p == $current) {\n\n // Set the current page\n $pages .= '<li class=\"active\">'\n . '<a href=\"' . $url . $p . '\">'\n . $p\n . '</a>'\n . '</li>';\n\n } else if ( ( $p < $current + 3 ) && ( $p > $current - 3 ) ) {\n\n // Set pages link\n $pages .= '<li>'\n . '<a href=\"' . $url . $p . '\">'\n . $p\n . '</a>'\n . '</li>';\n\n } else if (($p < 6) && ($total > 5) && (($current == 1) || ($current == 2))) {\n\n // Set pages link\n $pages .= '<li>'\n . '<a href=\"' . $url . $p . '\">'\n . $p\n . '</a>'\n . '</li>'; \n\n } else {\n\n break;\n \n }\n\n }\n\n // Verify if current page is 1\n if ($p === 1) {\n\n // Set the active page\n $pages .= '<li class=\"active\">'\n . '<a href=\"' . $url . $p . '\">'\n . $p\n . '</a>'\n . '</li>';\n\n }\n\n // Set next page\n $next = $current;\n\n // Increase next page\n $next++;\n \n // Verify if next page exists\n if ( $next < $total ) {\n\n // Display pagination\n echo '<ul class=\"pagination\">'\n . $pages\n . '<li>'\n . '<a href=\"' . $url . $next . '\">'\n . 'Next'\n . '</a>'\n . '</li>'\n . '</ul>';\n\n } else {\n\n // Display pagination\n echo '<ul class=\"pagination\">'\n . $pages\n . '<li class=\"pagehide\">'\n . '<a href=\"#\">'\n . 'Next'\n . '</a>'\n . '</li>'\n . '</ul>';\n \n }\n\n }\n\n }", "public function updatingPerPage(): void\n {\n $this->resetPage();\n }", "protected function buildPagination() {\r\n\t\t\t$pagination = parent::buildPagination();\r\n\r\n\t\t\t$this->configuration['margin'] = 2;\r\n\t\t\tif( empty($this->widgetConfiguration['configuration']['margin']) ) {\r\n\t\t\t\t$this->configuration['margin'] = $this->widgetConfiguration['configuration']['margin'];\r\n\t\t\t}\r\n\t\t\t$pagination['count'] = $this->numberOfPages;\r\n\t\t\t$pagination['paginationStart'] = max(2, $this->currentPage - $this->configuration['margin']);\r\n\t\t\t$pagination['paginationEnd'] = min($this->currentPage + $this->configuration['margin'], max(0, $this->numberOfPages-1));\r\n\t\t\t$pagination['thresholdStart'] = $this->configuration['margin'] + 2;\r\n\t\t\t$pagination['thresholdEnd'] = count($pagination['pages']) - $this->configuration['margin'] - 1;\r\n\t\t\t$pagination['first'] = $pagination['pages'][0];\r\n\t\t\t$pagination['last'] = $pagination['pages'][max(0,$this->numberOfPages - 1)];\r\n\r\n\t\t\treturn $pagination;\r\n\t\t}", "public function withPaginator()\n {\n $this->withPaginator = true;\n\n return $this;\n }", "protected function initPaginator()\n {\n $this->paginator = $this->grid->model()->paginator();\n }", "public function setPaginationArguments($pagination_arguments);", "private function __translatePaginationQueries()\n {\n $customFinderOptions = [];\n if ($this->request->action === 'index') {\n if (!empty($this->request->query('sort'))) {\n $customFinderOptions['sort'] = $this->request->query('sort');\n }\n if (!empty($this->request->query('direction'))) {\n $customFinderOptions['direction'] = $this->request->query('direction');\n }\n if (!empty($this->request->query('conditions'))) {\n $customFinderOptions['where'] = $this->request->query('conditions');\n }\n }\n $this->_registry->getController()->paginate += [\n 'finder' => [\n 'encrypted' => $customFinderOptions\n ],\n ];\n }", "public function setPagination($params, &$qb)\n {\n $repo_helper = $this->getRepositoryHelper();\n return $repo_helper::setPagination($params, $qb);\n }", "public function setPaginationFrom(iterable $container)\n {\n $this\n ->setOffset($container['offset'] ?? null)\n ->setLimit($container['limit'] ?? null);\n\n return $this;\n }", "function planmyday_woocommerce_pagination() {\n\t\t$style = planmyday_get_custom_option('blog_pagination');\n\t\tplanmyday_show_pagination(array(\n\t\t\t'class' => 'pagination_wrap pagination_' . esc_attr($style),\n\t\t\t'style' => $style,\n\t\t\t'button_class' => '',\n\t\t\t'first_text'=> '',\n\t\t\t'last_text' => '',\n\t\t\t'prev_text' => '',\n\t\t\t'next_text' => '',\n\t\t\t'pages_in_group' => $style=='pages' ? 10 : 20\n\t\t\t)\n\t\t);\n\t}", "public function setPaginator(PaginatorInterface $paginator);", "protected function simplePaginate()\n {\n return $this->query\n ->simplePaginate($this->getRecordsPerPage())\n ->appends(request()->query());\n }", "protected function _setupAdminPagination() {\n $this->Paginator->settings = array(\n 'limit' => 20,\n 'order' => array(\n $this->modelClass . '.created' => 'desc'\n )\n );\n }", "public function applyToBuilder(QueryBuilder|ScoutBuilder|EloquentBuilder|Relation $builder): Paginator\n {\n $methodName = $this->type->isSimple()\n ? 'simplePaginate'\n : 'paginate';\n\n if ($builder instanceof ScoutBuilder) {\n return $builder->{$methodName}($this->first, 'page', $this->page);\n }\n\n return $builder->{$methodName}($this->first, ['*'], 'page', $this->page);\n }", "public function getPages() {\n\t\t$this->pages = ceil($this->total / $this->perPage);\n\t\t// Validate current page\n\t\tif($this->currentPage < 1) {\n\t\t\t$this->currentPage = 1;\n\t\t} elseif($this->currentPage > $this->pages) {\n\t\t\t$this->currentPage = $this->pages;\n\t\t}\n\t\t// Get our page cut off\n\t\t$pageNumbers = $this->getPagesCutOff();\n\t\t// Init\n\t\t$next = $previous = $first = $last = null;\n\t\t// If we have more than one page add the first and previous\n\t\tif($this->pages > 1 && $this->currentPage > 1) {\n\t\t\t$first = $this->buildLink($this->strings['first'], $this->start, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'first')));\n\t\t\t$previous = $this->buildLink($this->strings['previous'], $this->currentPage-1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'previous')));\n\t\t}\n\t\t// Loop and create links\n\t\tforeach($pageNumbers as $i) {\n\t\t\t$this->links[] = $this->buildLink($i, $i, $this->getLocation(), $this->getParams(), $this->getLinkHtmlOptions());\n\t\t}\n\t\t// If we have more than one page add the next and last\n\t\tif($this->pages > 1 && $this->currentPage < $this->pages) {\n\t\t\t$next = $this->buildLink($this->strings['next'], $this->currentPage+1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'next')));\n\t\t\t$last = $this->buildLink($this->strings['last'], $this->pages, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'last')));\n\t\t}\n\t\treturn str_replace(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'{\n\t\titems\n\t}\n\t', '{\n\t\ttotal\n\t}\n\t', '{\n\t\tpages\n\t}\n\t', '{\n\t\tcurrent\n\t}\n\t', '{\n\t\tfirst\n\t}\n\t', '{\n\t\tprevious\n\t}\n\t', '{\n\t\tnext\n\t}\n\t', '{\n\t\tlast\n\t}\n\t',\n\t\t\t\t\t\t'{\n\t\tdataStart\n\t}\n\t', '{\n\t\tdataCurrent\n\t}\n\t', '{\n\t\tdataRange\n\t}\n\t', '{\n\t\tdataEnd\n\t}\n\t', '{\n\t\tdataLast\n\t}\n\t'\n\t\t\t\t\t), \n\t\t\t\t\tarray(\n\t\t\t\t\t\timplode(' ', $this->links), $this->total, $this->pages, $this->currentPage, $first, $previous, $next, $last,\n\t\t\t\t\t\t$this->dataStart, $this->currentPage, $this->perPage, $this->dataEnd, $this->pages\n\t\t\t\t\t), \n\t\t\t\t$this->itemsTemplate);\n\t}", "public function paginates($request);", "public function generatePagination()\n {\n \t$temp_query = $this->query;\n \t\n \t// cuantos resultados?\n \t$this->registry->getObject('db')->executeQuery( $temp_query );\n \t$nums = $this->registry->getObject('db')->numRows();\n \t$this->numRows = $nums;\n \t\n \t// limite!\n \t$limit = \" LIMIT \";\n \t$limit .= ( $this->offset * $this->limit ) . \", \" . $this->limit;\n \t$temp_query = $temp_query . $limit;\n \t$this->executedQuery = $temp_query;\n\n \tif( $this->method == 'cache' )\n \t{\n \t\t$this->cache = $this->registry->getObject('db')->cacheQuery( $temp_query );\n \t}\n \telseif( $this->method == 'do' )\n \t{\n \t\t$this->registry->getObject('db')->executeQuery( $temp_query );\n \t\t$this->results = $this->registry->getObject('db')->getRows();\n \t}\n\t\t\n\t\t// num pages\n\t\t$this->numPages = ceil($this->numRows / $this->limit);\n\t\t\n\t\t// is first\n\t\t$this->isFirst = ( $this->offset == 0 ) ? true : false;\n\t\t\n\t\t// is last\n\t\t\n\t\t$this->isLast = ( ( $this->offset + 1 ) == $this->numPages ) ? true : false;\n\t\t\n\t\t// current page\n\t\t$this->currentPage = ( $this->numPages == 0 ) ? 0 : $this->offset +1;\n\t\t$this->numRowsPage = $this->registry->getObject('db')->numRows();\n\t\tif( $this->numRowsPage == 0 )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n \t\n }", "public function setPagination($nextURL = null, $previousURL = null, $firstURL = null, $lastURL = null){\n\t\tif(empty($nextURL) && empty($previousURL) && empty($firstURL) && empty($lastURL)){\n\t\t\tdie('At least one URL must be specified for pagination to work.');\n\t\t}\n\t\tif(!empty($nextURL)){\n\t\t\t$this->setAtomLink($nextURL, 'next');\n\t\t}\n\t\tif(!empty($previousURL)){\n\t\t\t$this->setAtomLink($previousURL, 'previous');\n\t\t}\n\t\tif(!empty($firstURL)){\n\t\t\t$this->setAtomLink($firstURL, 'first');\n\t\t}\n\t\tif(!empty($lastURL)){\n\t\t\t$this->setAtomLink($lastURL, 'last');\n\t\t}\n\n\t\treturn $this;\n\t}", "private function _set_pagination_offset ()\n\t{\n\t\t\n\t\t// Instantiate the CI super object so we can use the uri class\n\t\t$CI = & get_instance();\n\t\t\n\t\t// Store pagination offset if it is set\n\t\tif (strstr($CI->uri->uri_string(), $this->pagination_selector)) {\n\t\t\t\n\t\t\t// Get the segment offset for the pagination selector\n\t\t\t$segments = $CI->uri->segment_array();\n\t\t\t\n\t\t\t// Loop through segments to retrieve pagination offset\n\t\t\tforeach ($segments as $key => $value) {\n\t\t\t\t\n\t\t\t\t// Find the pagination_selector and work from there\n\t\t\t\tif ($value == $this->pagination_selector) {\n\t\t\t\t\t\n\t\t\t\t\t// Store pagination offset\n\t\t\t\t\t$this->offset = $CI->uri->segment($key + 1);\n\t\t\t\t\t\n\t\t\t\t\t// Store pagination segment\n\t\t\t\t\t$this->uri_segment = $key + 1;\n\t\t\t\t\t\n\t\t\t\t\t// Set base url for paging. This only works if the\n\t\t\t\t\t// pagination_selector and paging offset are AT THE END of\n\t\t\t\t\t// the URI!\n\t\t\t\t\t$uri = $CI->uri->uri_string();\n\t\t\t\t\t$pos = strpos($uri, $this->pagination_selector);\n\t\t\t\t\t$page = substr($uri, 0, $pos + strlen($this->pagination_selector));\n\t\t\t\t\t//echo $page;\n\t\t\t\t\t//$this->base_url = $CI->config->item('base_url') . substr($uri, 0, $pos + strlen($this->pagination_selector));\n\t\t\t\t\t//$this->base_url = site_url(str_replace($this->pagination_selector, '', $page));\n\t\t\t\t\t//echo '<pre>'.$this->offset.'</pre><BR>';\n\t\t\t\t\tif ( ! $CI->uri->segment($key + 1))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->base_url = site_url(str_replace($this->pagination_selector, '', $page));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->base_url = site_url($page);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Pagination selector was not found in URI string. So offset is 0\n\t\t\t$this->offset = 0;\n\t\t\t$this->uri_segment = 0;\n\n\t\t\t//$this->base_url = $CI->config->item('base_url') . substr($CI->uri->uri_string(), 1) . '/' . $this->pagination_selector;\n\t\t\t$this->base_url = site_url(substr($CI->uri->uri_string(), 1) . '/' . $this->pagination_selector);\n\t\t}\n\t}", "public function generatePagination()\r\n {\r\n \t$temp_query = $this->query;\r\n \t\r\n \t// its more efficient to query one row (if possible) and include a count, as opposed to querying all of them\r\n \tif( preg_match( '#SELECT DISTINCT((.+?)),#si', $temp_query ) > 0 )\r\n \t{\r\n \t\t// this is a distinct query, we really have to query them all :-(\r\n\t \t$q = mysqli_query( $this->db, $temp_query );\r\n\t \t$nums = mysqli_num_rows( $q );\r\n\t \t$this->numRows = $nums;\r\n \t}\r\n \telse\r\n \t{\r\n \t\t// normal query, let's strip out everything before the \"primary\" FROM \r\n \t\t$q = mysqli_query( $this->db, \"SELECT COUNT(*) AS nums \" . $this->excludePrimarySelects( $temp_query ) . \" LIMIT 1\" );\r\n \t\tif( mysqli_num_rows( $q ) == 1 )\r\n \t\t{\r\n \t\t\t// how many rows?\r\n \t\t\t$row = mysqli_fetch_array( $q, MYSQLI_ASSOC );\r\n \t\t\t$this->numRows = $row['nums'];\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\t// query didn't work...0 rows\r\n \t\t\t$this->numRows = 0;\r\n \t\t}\r\n \t}\r\n \t \t\r\n \t// limit!\r\n \t$this->executedQuery = $temp_query . \" LIMIT \" . ( $this->offset * $this->limit ) . \", \" . $this->limit;\r\n \t\r\n \t$q = mysqli_query( $this->db, $this->executedQuery );\r\n \twhile( $row = mysqli_fetch_array( $q, MYSQLI_ASSOC ) )\r\n \t{\r\n \t\t$this->results[] = $row;\r\n \t}\r\n \t\r\n \t// be nice...do some calculations\r\n\t\t\r\n\t\t// num pages\r\n\t\t$this->numPages = ceil($this->numRows / $this->limit);\r\n\t\t// is first\r\n\t\t$this->isFirst = ( $this->offset == 0 ) ? true : false;\r\n\t\t// is last\r\n\t\t$this->isLast = ( ( $this->offset + 1 ) == $this->numPages ) ? true : false;\r\n\t\t// current page\r\n\t\t$this->currentPage = ( $this->numPages == 0 ) ? 0 : $this->offset +1;\r\n\t\t$this->numRowsPage = mysqli_num_rows( $q );\r\n\t\t\r\n\t\treturn ( $this->numRowsPage == 0 ) ? false : true;\r\n \t\r\n }", "public function shouldApplyPagination(bool $applyPagination = true)\n {\n $this->applyPagination = $applyPagination;\n\n return $this;\n }", "public function withPagination(\n ?PaginatedRequest $paginated,\n ): self {\n if ($paginated instanceof PaginatedRequest) {\n $this->params += $paginated->build();\n }\n\n return $this;\n }", "public function mountWithPerPagePagination(): void\n {\n $this->perPage = session()->get('perPage', $this->perPage);\n }", "public function setPaginationPresenter($presenter)\n {\n $this->_paginationPresenter = $presenter;\n return $this;\n }", "protected function buildPagination() {\n\t\t$pages = array();\n\t\tfor ($i = 1; $i <= $this->numberOfPages; $i++) {\n\t\t\t$pages[] = array('number' => $i, 'isCurrent' => ($i === $this->currentPage));\n\t\t}\n\t\t$pagination = array(\n\t\t\t'pages' => $pages,\n\t\t\t'current' => $this->currentPage,\n\t\t\t'numberOfPages' => $this->numberOfPages,\n\t\t);\n\n\t\t// If there are more pages, then provide nextPage\n\t\tif ($this->currentPage < $this->numberOfPages) {\n\t\t\t$pagination['nextPage'] = $this->currentPage + 1;\n\t\t}\n\t\t// If there are more pages and beyond the next one\n\t\tif ($this->currentPage < $this->numberOfPages - 1){\n\t\t\t$pagination['nextNextPage'] = $this->currentPage + 2;\n\t\t}\n\t\t// If we're not on the first page\n\t\tif ($this->currentPage > 1) {\n\t\t\t$pagination['previousPage'] = $this->currentPage - 1;\n\t\t}\n\t\t// If we're not on the first or second page\n\t\tif ($this->currentPage > 2) {\n\t\t\t$pagination['previousPreviousPage'] = $this->currentPage - 2;\n\t\t}\n\t\t// If we're not on the last page and the nextPage is not the last page\n\t\tif ($this->numberOfPages != $this->currentPage && $this->numberOfPages != $pagination['nextPage']) {\n\t\t\t$pagination['lastPage'] = $this->numberOfPages;\n\t\t}\n\t\t// If we're not on the first page and the previousPage is not the first page\n\t\tif ($this->currentPage != 1 && $pagination['previousPage'] != 1) {\n\t\t\t$pagination['firstPage'] = 1;\n\t\t}\n\n\t\treturn $pagination;\n\t}", "function organics_woocommerce_pagination() {\n\t\t$style = organics_get_custom_option('blog_pagination');\n\t\torganics_show_pagination(array(\n\t\t\t'class' => 'pagination_wrap pagination_' . esc_attr($style),\n\t\t\t'style' => $style,\n\t\t\t'button_class' => '',\n\t\t\t'first_text'=> '',\n\t\t\t'last_text' => '',\n\t\t\t'prev_text' => '',\n\t\t\t'next_text' => '',\n\t\t\t'pages_in_group' => $style=='pages' ? 10 : 20\n\t\t\t)\n\t\t);\n\t}", "public function init()\n {\n $this->_count_total_items();\n\n $this->_init_pagination();\n\n $this->_fetch_page_items();\n\n if (count($this->page_items) > 0)\n {\n $this->_init_listo_actions();\n $this->_init_listo_columns();\n $this->listo->set_data($this->page_items);\n }\n\n return $this;\n }", "public function paginate(array $data);", "function paginate($object = null, $scope = array(), $whitelist = array()) {\n\t\tif (is_array($object)) {\n\t\t\t$whitelist = $scope;\n\t\t\t$scope = $object;\n\t\t\t$object = null;\n\t\t}\n\t\t$assoc = null;\n\n\t\tif (is_string($object)) {\n\t\t\t$assoc = null;\n\t\t\tif (strpos($object, '.') !== false) {\n\t\t\t\tlist($object, $assoc) = pluginSplit($object);\n\t\t\t}\n\t\n\t\t\tif ($assoc && isset($this->{$object}->{$assoc})) {\n\t\t\t\t$object =& $this->{$object}->{$assoc};\n\t\t\t} elseif (\n\t\t\t\t\t$assoc && isset($this->{$this->modelClass}) &&\n\t\t\t\t\tisset($this->{$this->modelClass}->{$assoc}\n\t\t\t)) {\n\t\t\t\t$object =& $this->{$this->modelClass}->{$assoc};\n\t\t\t} elseif (isset($this->{$object})) {\n\t\t\t\t$object =& $this->{$object};\n\t\t\t} elseif (\n\t\t\t\t\tisset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$object}\n\t\t\t)) {\n\t\t\t\t$object =& $this->{$this->modelClass}->{$object};\n\t\t\t}\n\t\t} elseif (empty($object) || $object === null) {\n\t\t\tif (isset($this->{$this->modelClass})) {\n\t\t\t\t$object =& $this->{$this->modelClass};\n\t\t\t} else {\n\t\t\t\t$className = null;\n\t\t\t\t$name = $this->uses[0];\n\t\t\t\tif (strpos($this->uses[0], '.') !== false) {\n\t\t\t\t\tlist($name, $className) = explode('.', $this->uses[0]);\n\t\t\t\t}\n\t\t\t\tif ($className) {\n\t\t\t\t\t$object =& $this->{$className};\n\t\t\t\t} else {\n\t\t\t\t\t$object =& $this->{$name};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tif (!is_object($object)) {\n\t\t\ttrigger_error(sprintf(\n\t\t\t__('Controller::paginate() - can\\'t find model %1$s in controller %2$sController',\n\t\t\ttrue\n\t\t\t), $object, $this->name\n\t\t\t), E_USER_WARNING);\n\t\t\treturn array();\n\t\t}\n\t\t$options = array_merge($this->params, $this->params['url'], $this->passedArgs);\n\t\n\t\tif (isset($this->paginate[$object->alias])) {\n\t\t\t$defaults = $this->paginate[$object->alias];\n\t\t} else {\n\t\t\t$defaults = $this->paginate;\n\t\t}\n\t\n\t\tif (isset($options['show'])) {\n\t\t\t$options['limit'] = $options['show'];\n\t\t}\n\t\n\t\tif (isset($options['sort'])) {\n\t\t\t$direction = null;\n\t\t\tif (isset($options['direction'])) {\n\t\t\t\t$direction = strtolower($options['direction']);\n\t\t\t}\n\t\t\tif ($direction != 'asc' && $direction != 'desc') {\n\t\t\t\t$direction = 'asc';\n\t\t\t}\n\t\t\t$options['order'] = array($options['sort'] => $direction);\n\t\t}\n\t\n\t\tif (!empty($options['order']) && is_array($options['order'])) {\n\t\t\t$alias = $object->alias ;\n\t\t\t$key = $field = key($options['order']);\n\t\n\t\t\tif (strpos($key, '.') !== false) {\n\t\t\t\tlist($alias, $field) = explode('.', $key);\n\t\t\t}\n\t\t\t$value = $options['order'][$key];\n\t\t\tunset($options['order'][$key]);\n\t\n\t\t\tif ($object->hasField($field)) {\n\t\t\t\t$options['order'][$alias . '.' . $field] = $value;\n\t\t\t} elseif ($object->hasField($field, true)) {\n\t\t\t\t$options['order'][$field] = $value;\n\t\t\t} elseif (isset($object->{$alias}) && $object->{$alias}->hasField($field)) {\n\t\t\t\t$options['order'][$alias . '.' . $field] = $value;\n\t\t\t}\n\t\t}\n\t\t$vars = array('fields', 'order', 'limit', 'page', 'recursive');\n\t\t$keys = array_keys($options);\n\t\t$count = count($keys);\n\t\n\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\tif (!in_array($keys[$i], $vars, true)) {\n\t\t\t\tunset($options[$keys[$i]]);\n\t\t\t}\n\t\t\tif (empty($whitelist) && ($keys[$i] === 'fields' || $keys[$i] === 'recursive')) {\n\t\t\t\tunset($options[$keys[$i]]);\n\t\t\t} elseif (!empty($whitelist) && !in_array($keys[$i], $whitelist)) {\n\t\t\t\tunset($options[$keys[$i]]);\n\t\t\t}\n\t\t}\n\t\t$conditions = $fields = $order = $limit = $page = $recursive = null;\n\n\t\tif (!isset($defaults['conditions'])) {\n\t\t\t$defaults['conditions'] = array();\n\t\t}\n\t\n\t\t$type = 'all';\n\t\n\t\tif (isset($defaults[0])) {\n\t\t\t$type = $defaults[0];\n\t\t\tunset($defaults[0]);\n\t\t}\n\t\n\t\t$options = array_merge(array('page' => 1, 'limit' => 20), $defaults, $options);\n\t\t$options['limit'] = (int) $options['limit'];\n\t\tif (empty($options['limit']) || $options['limit'] < 1) {\n\t\t\t$options['limit'] = 1;\n\t\t}\n\n\t\textract($options);\n\t\n\t\tif (is_array($scope) && !empty($scope)) {\n\t\t\t$conditions = array_merge($conditions, $scope);\n\t\t} elseif (is_string($scope)) {\n\t\t\t$conditions = array($conditions, $scope);\n\t\t}\n\t\tif ($recursive === null) {\n\t\t\t$recursive = $object->recursive;\n\t\t}\n\t\n\t\t$extra = array_diff_key($defaults, compact(\n\t\t\t\t'conditions', 'fields', 'order', 'limit', 'page', 'recursive'\n\t\t));\n\t\tif ($type !== 'all') {\n\t\t\t$extra['type'] = $type;\n\t\t}\n\n\t\tif (method_exists($object, 'paginateCount')) {\n\t\t\t$count = $object->paginateCount($conditions, $recursive, $extra);\n\t\t} else {\n\t\t\t$parameters = compact('conditions');\n\t\t\tif ($recursive != $object->recursive) {\n\t\t\t\t$parameters['recursive'] = $recursive;\n\t\t\t}\n\t\t\t$count = $object->find('count', array_merge($parameters, $extra));\n\t\t}\n\n\t\t// Show all records\n\t\tif ((isset($extra['show']) && 'all' == $extra['show']) || (isset($this->params['named']['show']) && 'all' == $this->params['named']['show'])) {\n\t\t\tif ($count != 0) {\n\t\t\t\t$options['limit'] = $defaults['limit'] = $limit = $count;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$pageCount = intval(ceil($count / $limit));\n\t\n\t\tif ($page === 'last' || $page >= $pageCount) {\n\t\t\t$options['page'] = $page = $pageCount;\n\t\t} elseif (intval($page) < 1) {\n\t\t\t$options['page'] = $page = 1;\n\t\t}\n\t\t$page = $options['page'] = (integer)$page;\n\t\n\t\tif (method_exists($object, 'paginate')) {\n\t\t\t$results = $object->paginate(\n\t\t\t\t\t$conditions, $fields, $order, $limit, $page, $recursive, $extra\n\t\t\t);\n\t\t} else {\n\t\t\t$parameters = compact('conditions', 'fields', 'order', 'limit', 'page');\n\t\t\tif ($recursive != $object->recursive) {\n\t\t\t\t$parameters['recursive'] = $recursive;\n\t\t\t}\n\t\t\t$results = $object->find($type, array_merge($parameters, $extra));\n\t\t}\n\t\t$paging = array(\n\t\t\t\t'page'\t\t=> $page,\n\t\t\t\t'current'\t=> count($results),\n\t\t\t\t'count'\t\t=> $count,\n\t\t\t\t'prevPage'\t=> ($page > 1),\n\t\t\t\t'nextPage'\t=> ($count > ($page * $limit)),\n\t\t\t\t'pageCount'\t=> $pageCount,\n\t\t\t\t'defaults'\t=> array_merge(array('limit' => 20, 'step' => 1), $defaults),\n\t\t\t\t'options'\t=> $options\n\t\t);\n\t\t$this->params['paging'][$object->alias] = $paging;\n\t\n\t\tif (!in_array('Paginator', $this->helpers) && !array_key_exists('Paginator', $this->helpers)) {\n\t\t\t$this->helpers[] = 'Paginator';\n\t\t}\n\t\treturn $results;\n\t}", "protected function adjustOffset()\n {\n // Define new total of pages\n $this->setLastPage(\n max(1, ceil($this->getNumResults() / $this->getMaxPerPage()))\n );\n \n $offset = ($this->getPage() - 1) * $this->getMaxPerPage();\n $this->offset = $offset;\n }", "public function paginator(){\n return\n $this->Paginator;\n }", "public function getPaginator();", "public function getPaginator();", "private function fetchPaginatedResults()\n {\n $select = new Select($this->tableGateway->getTable());\n\n // Create a new result set based on the Album entity:\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new UserProfile());\n\n // Create a new pagination adapter object:\n $paginatorAdapter = new DbSelect(\n // our configured select object:\n $select,\n // the adapter to run it against:\n $this->tableGateway->getAdapter(),\n // the result set to hydrate:\n $resultSetPrototype\n );\n\n $paginator = new Paginator($paginatorAdapter);\n return $paginator;\n }", "protected function pager($context = 'relative') {\n\n $found = $this->getQuery()->found();\n $limit = $this->getQueryLimit();\n $start = $this->getQueryStart(); // Get start based on start or page param, or 0.\n $route = $this->getRoute();\n\n $logical_offset = $start % $limit; // Offset from logical page start.\n $current_logical_start = $start - $logical_offset; // Logical page start.\n\n $current_logical_page = $this->logicalPage($start); // Logical page the starting row is on, offset or not.\n $num_logical_pages = $this->numPages($found, $limit);\n\n $current_relative_page = $this->relativePage($start); // Relative page the starting row is on, if not offset.\n $num_relative_pages = $logical_offset == 0 ? $this->numPages($found, $limit) : $this->numPages($found, $limit, $start);\n\n $nav_base_params = $this->getNavUrlBaseParameters();\n\n if ($context == 'logical') {\n\n $page_num = $current_logical_page;\n $num_pages = $num_logical_pages;\n $use_page_number = $this->getConfig()->getPaginationConfig()['use_page_number'];\n\n if ($current_logical_start < $limit) {\n\n if ($start === 0) {\n // We're really on the first logical page.\n $prev_page = $first_page = null;\n } else {\n // Start is offset but less than limit, enable prev/first controls.\n if ($use_page_number) {\n $first_page = $route.$this->urlQueryWithPage($nav_base_params, strval(1));\n $prev_page = $route.$this->urlQueryWithPage($nav_base_params, strval($current_logical_page - 1));\n } else {\n $first_page = $route.$this->urlQueryWithStart($nav_base_params, strval(0));\n $prev_page = $route.$this->urlQueryWithStart($nav_base_params, strval(0));\n }\n }\n\n } else {\n\n if ($use_page_number) {\n $first_page = $route.$this->urlQueryWithPage($nav_base_params, strval(1));\n $prev_page = $route.$this->urlQueryWithPage($nav_base_params, strval($current_logical_page - 1));\n } else {\n $first_page = $route.$this->urlQueryWithStart($nav_base_params, strval(0));\n $prev_page = $route.$this->urlQueryWithStart($nav_base_params, strval($current_logical_start - $limit));\n }\n }\n\n if (($current_logical_start + $limit) >= $found)\n $next_page = $last_page = null; // We're already on last page, offset or not.\n else {\n if ($use_page_number) {\n $next_page = $route.$this->urlQueryWithPage($nav_base_params, strval($current_logical_page + 1));\n $last_page = $route.$this->urlQueryWithPage($nav_base_params, strval( ceil($found / $limit) ));\n } else {\n $next_page = $route.$this->urlQueryWithStart($nav_base_params, strval($current_logical_start + $limit));\n $last_page = $route.$this->urlQueryWithStart($nav_base_params, strval((ceil($found / $limit) - 1) * $limit));\n }\n }\n }\n else { // relative\n\n $page_num = $current_relative_page;\n $num_pages = $num_relative_pages;\n\n if ($start < $limit) {\n if ($logical_offset == 0)\n $prev_page = $first_page = null; // We're already on first page.\n else {\n $first_page = $route.$this->urlQueryWithStart($nav_base_params, strval(0));\n $prev_page = $route.$this->urlQueryWithStart($nav_base_params, strval($current_logical_start));\n }\n }\n else {\n $first_page = $route.$this->urlQueryWithStart($nav_base_params, strval(0));\n $prev_page = $route.$this->urlQueryWithStart($nav_base_params, strval($start - $limit));\n }\n\n if (($start + $limit) >= $found)\n $next_page = $last_page = null; // We're already on last page.\n else {\n $next_page = $route.$this->urlQueryWithStart($nav_base_params, strval($start + $limit));\n $last_page = $route.$this->urlQueryWithStart($nav_base_params, strval($start + ((ceil(($found - $start) / $limit) - 1) * $limit)));\n }\n }\n\n return [\n 'context' => $context,\n 'pages' => [\n 'first' => $first_page,\n 'prev' => $prev_page,\n 'next' => $next_page,\n 'last' => $last_page\n ],\n 'page_num' => $page_num,\n 'num_pages' => $num_pages\n ];\n }", "function plumbing_parts_woocommerce_pagination() {\n\t\t$style = plumbing_parts_get_custom_option('blog_pagination');\n\t\tplumbing_parts_show_pagination(array(\n\t\t\t'class' => 'pagination_wrap pagination_' . esc_attr($style),\n\t\t\t'style' => $style,\n\t\t\t'button_class' => '',\n\t\t\t'first_text'=> '',\n\t\t\t'last_text' => '',\n\t\t\t'prev_text' => 'Prev',\n\t\t\t'next_text' => 'Next',\n\t\t\t'pages_in_group' => $style=='pages' ? 10 : 20\n\t\t\t)\n\t\t);\n\t}", "public function withDefaultPageSize($pageSize) {}", "function paginate($object = null, $scope = array(), $whitelist = array())\n\t{\n\t\tif (is_string($object))\n\t\t\t$this->passedArgs['show'] = $this->passedArgs['limit'] = $this->paginate[$object]['limit'];\n\t\t$results = parent::paginate($object, $scope, $whitelist);\n\t\t\n\t\treturn $results;\n\t}", "function setItemsPerPage($arg0) {\n\t\t\t$this->items_per_page = $arg0;\n\t\t\treturn $this;\n\t\t}", "public function customPaginate($items, $perPage = null)\n\t\t{\n\t\t\tif ($perPage == null) {\n\t\t\t\t$perPage = 10;\n\t\t\t}\n\t\t\t\n\t\t\t$currentPage = LengthAwarePaginator::resolveCurrentPage();\n\t\t\t\n\t\t\t//Slice the collection to get the items to display in current page\n\t\t\t$currentPageItems = $items->slice(($currentPage - 1) * $perPage, $perPage);\n\t\t\t\n\t\t\t//Create our paginator and pass it to the view\n\t\t\treturn new LengthAwarePaginator($currentPageItems, count($items), $perPage);\n\t\t}", "public function paginator()\n {\n return $this->paginator;\n }", "public function paginated()\n {\n return $this->repo->paginated(config('cms.pagination', 25));\n }", "public function paginate($perPage=10){\n $this->eagerLoadRelations();\n $this->applyCriteria();\n\n $result = $this->model->paginate($perPage);\n $result->appends(request()->query());\n $this->resetScope();\n\n return $result;\n }", "public function customPaginate($params = [])\n\t{\n\t\t$page = isset($params['page']) ? $params['page'] : 1;\n\t\t$per_page = isset($params['per_page']) ? $params['per_page'] : config('repository.pagination.perPage');\n\n\t\t$results = $this->buildPaginateQuery($params, $page, $per_page);\n\n\t\t$last_page = $results['last_page'];\n\t\t$total = $results['total'];\n\t\t$data = $results['query']->get()->toArray();\n\n\t\treturn compact('page', 'per_page', 'last_page', 'total', 'data');\n\t}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function pages() {\n return new PageIterator($this);\n }", "public function getPagination() {\r\n if ($this->_pagination === null) {\r\n\r\n $this->_pagination = new CustomPagination;\r\n if (($id = $this->getId()) != '')\r\n $this->_pagination->pageVar = $id . '_page';\r\n }\r\n return $this->_pagination;\r\n }", "function set_pagination( $total_num_of_records_we_are_going_to_fetch, $num_of_results_per_page = 50 ) {\n\n\n\n\n $pagination['current_page_name'] = get_current_page_name(); # get_current_page_name() is a user-defined function\n\n\n\n\n $pagination['first_page'] = 1;\n\n\n\n\n $pagination['current_page'] = empty( $_GET['page'] ) ? 1 : $_GET['page']; # If current page is empty (have no value) then make it equals to 1\n\n\n\n\n $pagination['next_page'] = $pagination['current_page'] + 1;\n\n\n\n\n $pagination['previous_page'] = $pagination['current_page'] - 1;\n\n\n\n\n $pagination['num_of_results_per_page'] = $num_of_results_per_page;\n\n\n\n\n $pagination['start_record'] = ( $pagination['current_page'] - 1 ) * $pagination['num_of_results_per_page'];\n\n\n\n\n\n\n\n\n\n # Determine last page number\n\n\n\n\n $pagination['last_page'] = ceil( $total_num_of_records_we_are_going_to_fetch / $pagination['num_of_results_per_page'] );\n\n\n\n\n\n\n\n\n\n # If there was no result then make the last page equals to 1\n\n\n\n\n if ( $pagination['last_page'] == 0 ) { $pagination['last_page'] = 1; }\n\n\n\n\n\n\n\n\n\n return $pagination;\n\n\n\n\n}", "protected function calculateCurrentAndLastPages()\n\t{\n\t\t$this->lastPage = (int) ceil($this->total / $this->perPage);\n\n\t\t$this->currentPage = $this->calculateCurrentPage($this->lastPage);\n\t}", "public function setRequest(PaginateRequest $request)\n {\n\n }", "protected function _renderLimit()\n {\n if($this->_pageSize){\n if($this->getCurPage() > 1) {\n $this->_query->skip(($this->getCurPage()-1) * $this->_pageSize);\n }\n $this->_query->limit($this->_pageSize);\n }\n return $this;\n }", "private function fetchPaginatedResults(){\n $news = $this->getAllNewsQuery();\n\n $adapter = new DoctrineAdapter(new ORMPaginator($news, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(4); \n \n \n return $paginator;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "public function getPagination()\n {\n return $this->pagination;\n }", "function setExtraPage()\r\n\t{\r\n\t\t$this->extra_page_num=$this->num_rows - ($this->base_page_num*$this->limit);\r\n\t}", "public function stylePagination()\n {\n $this->addJSToHead($this->mod->stylePagination());\n }" ]
[ "0.73005015", "0.6975258", "0.6975258", "0.6680574", "0.63993156", "0.6336676", "0.63058853", "0.6280248", "0.62520164", "0.6187304", "0.6183992", "0.6171521", "0.61657834", "0.6103009", "0.60938114", "0.60743976", "0.60743976", "0.604447", "0.604399", "0.6023894", "0.6001677", "0.5993248", "0.59769803", "0.5972305", "0.5963127", "0.5962165", "0.5961169", "0.5961169", "0.5957799", "0.59355044", "0.59233", "0.59158057", "0.591292", "0.5906567", "0.5883283", "0.5877513", "0.587654", "0.5875029", "0.58692557", "0.5861844", "0.58390105", "0.582882", "0.58072406", "0.57967436", "0.578639", "0.5778986", "0.57776713", "0.57726413", "0.57594955", "0.5757302", "0.57069695", "0.57006806", "0.56725687", "0.56721723", "0.5663376", "0.5652207", "0.564647", "0.5640101", "0.5635631", "0.5634965", "0.5629163", "0.5628205", "0.5625286", "0.5610502", "0.5606455", "0.5601304", "0.5601036", "0.5597976", "0.5589944", "0.5566484", "0.55623686", "0.55623686", "0.55607826", "0.55509317", "0.55423206", "0.5540552", "0.5539159", "0.552839", "0.551945", "0.5517358", "0.55119973", "0.5476375", "0.54738855", "0.5469811", "0.5469811", "0.5469811", "0.5469811", "0.5469811", "0.54648334", "0.5463077", "0.5460243", "0.5458154", "0.5453624", "0.54355365", "0.54333854", "0.5431186", "0.5431186", "0.5431186", "0.5421759", "0.54183465" ]
0.82521784
0
Check if you send raw data.
Проверьте, отправляете ли вы сырые данные.
protected function isRawData(): bool { return 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRaw(): bool;", "public function isRaw(): bool\n\t{\n\t\treturn true;\n\t}", "public function hasRawDatas();", "function data() {\n\n if ($this->is_connected()\n AND $this->send_data('DATA')\n AND substr(trim($error = $this->get_data()), 0, 3) === '354') {\n\n return TRUE;\n } else {\n $this->errors[] = trim(substr(trim($error), 3));\n return FALSE;\n }\n }", "public function send(mixed ...$data): bool;", "public function isSent() {}", "public function receiveRawMessage($data) {\n if (strpos($data['source'], '#') === 0) {\n $message = $data['message'];\n $parts = explode(' ', $message, 2);\n $command = $parts[0];\n if (in_array($command, $this->whiteList)) {\n $this->handle_channel_incoming($data['sender'], $data['source'], $message);\n } else {\n $this->handleIncoming($data['sender'], $message);\n }\n } else {\n $this->handleIncoming($data['sender'], $data['message']);\n }\n return true;\n }", "public function hasData(): bool;", "public function send_raw_message($data) {\n $this->connect();\n if (!$this->conn) {\n return false;\n }\n\n if ($data['type'] != 'delayedmessage') {\n if ($data['type'] != 'message') {\n // Nick checking\n $nickdata = $data['nickdata'];\n $usernick = $nickdata['user']->nickname;\n $screenname = $nickdata['screenname'];\n\n // Cancel any existing checks for this user\n if (isset($this->regChecksLookup[$usernick])) {\n unset($this->regChecks[$this->regChecksLookup[$usernick]]);\n }\n\n $this->regChecks[$screenname] = $nickdata;\n $this->regChecksLookup[$usernick] = $screenname;\n }\n\n // If there is a backlog or we need to wait, queue the message\n if ($this->messageWaiting || time() - $this->lastMessage < 1) {\n $this->enqueue_waiting_message(\n array(\n 'type' => 'delayedmessage',\n 'prioritise' => $data['prioritise'],\n 'data' => $data['data']\n )\n );\n $this->messageWaiting = true;\n return true;\n }\n }\n\n try {\n $this->conn->send($data['data']['command'], $data['data']['args']);\n } catch (Phergie_Driver_Exception $e) {\n $this->connected = false;\n $this->conn->reconnect();\n return false;\n }\n\n $this->lastMessage = time();\n return true;\n }", "private function hasDataError()\n\t{\n\t\tif ( strpos($this->body, '#ErrorData') !== false ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function getBodyRaw() {\n $back = false;\n\n try {\n if (!($putFd = fopen(\"php://input\", \"r\")))\n throw new Exception(\"Can't open file descriptor on the standard php://input.\");\n\n\n $data = fread($putFd, 8192);\n\n $back = $data;\n\n if (!fclose($putFd))\n throw new Exception(\"Can't close file Descriptor.\");\n\n } catch (Exception $e) {\n Logger::getInstance()->logError($e->getMessage(), 'wap_http_error');\n }\n\n return $back;\n }", "public function sendData()\n\t{\t\t$haveData = (\n\t\t\t\t\t(isset($_POST['commentmessage']) AND trim($_POST['commentmessage']) != \"\") // a comment message \n \t\t\t\t\tOR\n \t\t\t\t\t(isset($_FILES['commentfile']) AND $_FILES['commentfile']['error'] == \"0\") // a comment file\n \t\t\t\t\tOR\n \t\t\t\t\t(isset($_SESSION['filethrough']) AND ($_SESSION['filethrough'] != \"\")) // passed through from earlier preview\n\t\t\t\t);\n\n\t\treturn ($haveData == true && $this->dataPosted == false );\n\t}", "public function hasRawFileSize()\n {\n return $this->raw_file_size !== null;\n }", "public function isRaw() {\n\t\treturn ($this->_value === $this->_raw);\n\t}", "public function hasData(): bool\n\t{\n\t\treturn (\n\t\t\tparent::hasData() ||\n\t\t\tstrlen($this->username->value)>0 ||\n\t\t\tstrlen($this->password->value)>0\n\t\t);\n\t}", "public function hasData();", "public function hasData();", "protected function read() : bool\n {\n if (feof($this->socket)) {\n $this->connect();\n }\n // try to read 1 byte from the socket\n $type = stream_get_contents($this->socket, 1);\n\n if (strlen($type) == 0) {\n // no data yet\n return false;\n }\n\n $type = unpack('C', $type)[1];\n\n // got a packet, read length\n $multiplier = 1;\n $len = 0;\n do {\n $encodedByte = unpack('C', stream_get_contents($this->socket, 1))[1];\n $len += ($encodedByte & 0x7F) * $multiplier;\n $multiplier *= 0x80;\n if ($multiplier > 0x80*0x80*0x80) {\n throw new \\RuntimeException(\"Malformed length\");\n }\n } while (($encodedByte & 0x80) != 0);\n\n $data = stream_get_contents($this->socket, $len);\n\n // split the type and flags\n $flags = $type & 0x0F;\n $type = $type & 0xF0;\n\n switch ($type) {\n case self::TYPE_CONNACK:\n case self::TYPE_PINGREQ:\n case self::TYPE_PINGRESP:\n // nothing to do here\n break;\n case self::TYPE_SUBACK:\n $ident = unpack('nident', $data)['ident'];\n unset($this->state[$ident]);\n break;\n case self::TYPE_PUBLISH:\n $this->recvPublish($flags, $data);\n break;\n case self::TYPE_PUBREL:\n $this->recvPubrel($flags, $data);\n break;\n case self::TYPE_PUBACK:\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n case self::TYPE_PUBREC:\n // send PUBREL\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n $headers = pack('n', $ident);\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n $this->state[$ident] = [\n 'last_change' => time(),\n 'onfail' => function() use ($headers) {\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n }\n ];\n break;\n case self::TYPE_PUBCOMP:\n // finish publish qos 2\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n break;\n default:\n // unknown type, just ignore for now\n break;\n }\n\n return true;\n }", "protected function isRaw($object): bool\n {\n return $object instanceof Raw;\n }", "public function Read() {\n \n $raw = @socket_read( $this->socket, 512, PHP_NORMAL_READ );\n if ($raw === FALSE) {\n slog( \"Failed to read; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n return false;\n }\n\n if ($this->buffer) $raw = $this->buffer.$raw;\n\n if (substr($raw,-1) != \"\\n\") {\n $this->buffer = $raw;\n return false;\n }\n\n _log( $raw = trim( $raw ), \"<-\" );\n $this->buffer = \"\";\n unset( $this->Message );\n $this->Message = new Message( trim($raw) );\n return true;\n\n }", "public function isFullUploadedData(){\n\t\treturn true;\n\t}", "public function isReadBufferEmpty() {\n return (strlen($this->ibuf) == 0);\n }", "public function checkBlockData($data)\n {\n if ($data == '1') {\n return true;\n } elseif ($data == '0') {\n return false;\n }\n }", "public static function shouldReceive()\n {\n }", "public static function shouldReceive()\n {\n }", "public function isRead(): bool;", "public function canHandle()\n {\n if (\n array_key_exists('body', $this->payload) &&\n array_key_exists('path', $this->payload) &&\n array_key_exists('headers', $this->payload) &&\n array_key_exists('requestContext', $this->payload) &&\n !array_key_exists('elb', $this->payload['requestContext'])\n ) {\n return true;\n }\n return false;\n }", "public function processRawData();", "public function hasData()\n {\n return true;\n }", "public function processReceivedData()\r\n {\r\n }", "function processBody() {\n $data = '';\n $counter = 0;\n\n do {\n $status = socket_get_status($this->socket);\n if ($status['eof'] == 1) {\n break;\n }\n\n if ($status['unread_bytes'] > 0) {\n $buffer = fread($this->socket, $status['unread_bytes']);\n $counter = 0;\n } else {\n $buffer = fread($this->socket, 128);\n $counter++;\n usleep(2);\n }\n\n $data .= $buffer;\n } while ( ($status['unread_bytes'] > 0) || ($counter++ < 10) );\n\n return $data;\n }", "public function isEmpty(): bool\n {\n return feof($this->streamSocket);\n }", "private function hasFormData(): bool\n {\n return ! \\in_array($this->getRealMethod(), [self::METHOD_GET, self::METHOD_HEAD]);\n }", "protected function processReceivedData()\n {\n }", "public function isError(): bool\n {\n return isset($this->decodedBody['ok']) && ($this->decodedBody['ok'] === false);\n }", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "public function isResponse()\n {\n return is_numeric($this->command) &&\n (('001' <= $this->command && $this->command <= '099') or ('200' <= $this->command && $this->command <= '399'));\n }", "public function send(): bool;", "public function send(): bool;", "protected function _checkPost()\n {\n if (!$this->_getStorage()) {\n return false;\n }\n\n if (!$this->_getFilename()) {\n return false;\n }\n\n if (!$this->_getFilepath()) {\n return false;\n }\n\n if (!$this->_getFilesize()) {\n return false;\n }\n\n if (!$this->_getFile()) {\n return false;\n }\n\n if (!$this->_getContentType()) {\n return false;\n }\n\n if (!$this->_getMode()) {\n return false;\n };\n\n return true;\n }", "protected function processInputBuffer()\n {\n $this->logger->debug(\"Processing WS request...\");\n\n try {\n if ($this->currentFrame === null) //No frame in processing - new need to be build\n {\n $this->logger->debug(\"Creating new frame in client\");\n $this->currentFrame = new NetworkFrame($this->logger, $this->inputBuffer);\n }\n\n if (!$this->currentFrame->isComplete()) {\n $this->logger->debug(\"Frame not completed yet, skipping processing\");\n\n return true;\n }\n\n //Current frame is completed, this call also \"kick\" the frame to try fetching new data from buffer (if any)\n $this->routeCurrentFrame();\n\n return empty($this->inputBuffer); //This method will be called again if buffer is not empty\n\n\n } catch(Exception $e) {\n $this->handleWebSocketException($e);\n\n return true; //handleWebSocketException() will disconnect client, so it's useless to parse buffer\n }\n }", "public function getBlockSend()\n {\n return (bool)($this->flags & self::FLAG_BLOCK_SEND);\n }", "public function send(array $data = []): bool\n {\n return true;\n }", "public function hasData()\n\t{\n\t\treturn !empty($this->data);\n\t}", "public function checkTrustData($data)\n {\n return true;\n }", "public function isSuccessful()\n\t{\n\t\treturn ( empty( $this->data['message'] ) && $this->getCode() == 200 && $this->data['type'] != 'invalid_request' ) || ( isset( $this->data['type'] ) && $this->data['type'] == 'capture' );\n\t}", "function send_data($data) {\n\n if (is_resource($this->connection)) {\n return fwrite($this->connection, $data . CRLF, strlen($data) + 2);\n } else\n return FALSE;\n }", "public function read()\n\t{\n\t\t// Get the record header (first 8 bytes required)\n\t\t$data = fread($this->socket, 8);\n\t\tif (($len = strlen($data)) < 8) {\n\t\t\tif ($len > 0) {fseek($this->socket, 0 - $len, SEEK_CUR);}\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Parse the record header\n\t\t$this->version = ord($data[0]);\n\t\t$this->type = ord($data[1]);\n\t\t$this->length = (ord($data[4]) << 8) + ord($data[5]);\n\t\t$this->padding = ord($data[6]);\n\t\t$this->content = '';\n\t\t\n\t\tif ($this->debug) {cecho(\"--> Received record ({$this->requestID}:{$this->type}:{$this->length})\\n\");}\n\t\t\n\t\t// Get the record content\n\t\twhile (($clen = strlen($this->content)) < $this->length) {\n\t\t\tif(($data = fread($this->socket, $this->length - $clen)) === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->content .= $data;\n\t\t}\n\t\t\t\t\n\t\t// Skip over any padding\n\t\tif ($this->padding > 0) {\n\t\t\tfseek($this->socket, $this->padding, SEEK_CUR);\n\t\t}\n\t\t\n\t\t// Parse the content\n\t\tif ($this->type == MFCGI::END_REQUEST) {\n\n\t\t\t// Decode application status\n\t\t\t$this->appStatus = ord($this->content[0]) << 24;\n\t\t\t$this->appStatus += ord($this->content[1]) << 16;\n\t\t\t$this->appStatus += ord($this->content[2]) << 8;\n\t\t\t$this->appStatus += ord($this->content[3]);\n\t\t\t\n\t\t\t// Decode protocol status\n\t\t\t$this->protocolStatus = ord($this->content[4]);\n\t\t\t// 5-7 = reserved\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function hasData() {\n\t\treturn count($this->data) > 0;\n\t}", "public function isExpectingResult()\n {\n return $this->type !== MessageTypes::PING && $this->type !== MessageTypes::ONE_WAY;\n }", "public function rawOutput(): bool\n {\n return $this->rawOutput;\n }", "public function matchesRequest()\n {\n return ! is_null($this->event->get('MsgType')) && $this->event->get('MsgType') === 'image';\n }", "public function isSent(){\n if($this->form_attr['method'] == 'post'){\n if(isset($_POST[$this->form_attr['name']])){\n return true;\n }\n return false;\n }\n if(isset($_GET[$this->form_attr['name']])){\n return true;\n }\n return false;\n }", "public function shouldParse()\n\t{\n\t\tif( $this->_raw && !$this->_parsed )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isReceivingDataAvailable() { // {{{\n\t\tif (!$this->success || !$this->isReadMode) return false;\n\t\tif (!isset($this->commChanFdArr[0]) || !is_resource($this->commChanFdArr[0])) return false;\n\n\t\t$commChanFdArr = $this->commChanFdArr;\n\t\t$write = null; $except = null;\n\t\treturn (stream_select($commChanFdArr, $write, $except, 0, 15000) != 0);\n\t}", "public function hasData(){\r\n return is_object($this->getData()) || is_array($this->getData());\r\n }", "public function stream_eof()\n {\n return $this->pos >= strlen($this->data);\n }", "function check_for_data($data) {\n if ($data) {\n return \"|\";\n }\n }", "function check()\n {\n $headers = preg_split('((?<!\\\\\\)\\,|\\r\\n|\\n|\\r)', $this->_vars['headers']);\n if (!$headers) {\n return false;\n }\n\n $strings = preg_split('((?<!\\\\\\)\\,|\\r\\n|\\n|\\r)', $this->_vars['strings']);\n if (!$strings) {\n return false;\n }\n\n return true;\n }", "protected function isSerialized($data)\n {\n $pattern = '/^a:\\d+:\\{(i:\\d+;|s:\\d+:\\\".+\\\";|N;|O:\\d+:\\\"\\w+\\\":\\d+:\\{\\w:\\d+:)+|^O:\\d+:\\\"\\w+\\\":\\d+:\\{s:\\d+:\\\"/';\n return (is_string($data) && preg_match($pattern, $data));\n }", "public function isFromPost(){\r\n\t\treturn !empty($this->postData);\r\n\t}", "public function ping() {\n\n\t\t$data = Nabaztag::getInstance(NAB_SERIAL)->getNewData();\n\n\t\tif(isset($data['tts'])) {\n\n\t\t\t$mb = new MessageBlock(rand(11111, 99999));\n\t\t\t$mb->addLocalStream('broadcast/broad/tts/' . urlencode($data['tts']));\n\t\t\t$this->data = $mb->getHex();\n\n\t\t\tNabaztag::getInstance(NAB_SERIAL)->setSeen('tts', true);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function has_data()\n {\n }", "public function hasData(): bool\n {\n return ! $this->_hasNoData;\n }", "public function stream_eof() \r\n {\r\n return $this->_pos >= strlen($this->_data);\r\n }", "public function isRead()\n {\n }", "public function isEncoded()\n {\n return '' != $this->getContentEncoding();\n }", "public function hasData()\n {\n return count($this->data) > 0;\n }", "public function check(){\n\t\t\t$this->data = json_decode($this->storage->get('call'));\n\n\t\t\t// And check if it's a new message by comparing its time\n\t\t\tif($this->data->time !== $this->cache){\n\t\t\t\t$this->cache = $this->data->time;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function process($data){\n return true;\n }", "protected function smtp_ok()\r\n {\r\n $response = str_replace(\"\\r\\n\", '', fgets($this->_sock, 512));\r\n if (!preg_match('#^[23]#', $response)) {\r\n fputs($this->_sock, \"QUIT\\r\\n\");\r\n fgets($this->_sock, 512);\r\n return false;\r\n }\r\n return true;\r\n }", "public function hasData()\n {\n return $this->_resource !== null;\n }", "protected function contentCheck() {\n foreach ($this->data as $key => $value) {\n $this->data[$key] = isset($value) ? trim($value) : '';\n }\n /* if nothing is in the data field then there is not data */\n if (in_array(\"\", $this->data, true)) {\n return \\FALSE; // No Data:\n } else {\n return \\TRUE; // All Fields contain Data:\n }\n }", "function _isLastPacket($packet) {\r\n if (is_string($packet)) {\r\n return $packet === '';\r\n }\r\n return ! $packet;\r\n }", "public function isSupportedBinaryString($data);", "public function isSending()\n {\n return $this->status == self::STATUS_SENDING;\n }", "public function hasData(){\n return $this->_has(14);\n }", "function check()\n {\n $headers = preg_split('(\\r\\n|\\n|\\r)', $this->_vars['headers']);\n if (!$headers) {\n return false;\n }\n\n $addresses = preg_split('(\\r\\n|\\n|\\r)', $this->_vars['addresses']);\n if (!$addresses) {\n return false;\n }\n\n return true;\n }", "private function checkBasicRequest()\n {\n return (empty($this->verb) && empty($this->args));\n }", "public function isSerialized()\n {\n return $this->str === 'b:0;' || @unserialize($this->str) !== false;\n }", "public function read()\n {\n return false;\n }", "public function mustTransmitInvoicingData()\n {\n return $this->_mustTransimitInvoicingData;\n }", "public function isInternalSend()\n {\n return $this->internalSend;\n }", "function loadrtf($data) {\n\t\tif (($this->rtf = $this->uncompress($data))) {\n\t\t\t$this->rtf_len = strlen($this->rtf);\n\t\t};\n\t\tif ($this->rtf_len == 0) {\n\t\t\tdebugLog(\"No data in stream found\");\n\t\t\treturn false;\n\t\t};\n\t\treturn true;\n\t}", "public static function isSerialized($data){\n return (is_string($data) && preg_match(\"#^((N;)|((a|O|s):[0-9]+:.*[;}])|((b|i|d):[0-9.E-]+;))$#um\", $data));\n }", "public function testRawRequestDataCanBeAccessed()\n {\n $data = array(\n 'test_param1' => 'Testing1',\n 'test_param2' => array(\n 'Testing2',\n 'Testing3'\n )\n );\n\n $request = $this->getRequest();\n $request->setRequestData($data);\n\n $this->assertSame($data, $request->getRequestData(false));\n }", "public function is_ok($data){\n\t\tif(isset($data['status']) && $data['status'] == 1){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isConnectionUTF8();", "function isSerialized($data){\n\t\tif (trim($data) == \"\")\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (preg_match(\"/^(i|s|a|o|d)(.*);/si\",$data))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function isChunk(): bool\n {\n return $this->file->name === 'blob'\n && $this->file->type === 'application/octet-stream';\n }", "private function checkDefault(string $data): bool {\n if($this->is_json($data)) {\n\t\t\t$data = json_decode($data);\n\t\t\tif(isset($data->save)) {\n\t\t\t\t$this->logFile = $data->save;\n\t\t\t}\n if(isset($data->type) && isset($data->message)) {\n return true;\n } else {\n return false;\n }\n }\n return false;\n }", "public function handle_irc_message($data) {\n $this->plugin->enqueueIncomingRaw($data);\n return true;\n }", "public function checkContentLengthRequestHeader() : bool;", "public function checkReceiver();", "public function is_cachable()\n\t{\n\t\t$h = $this->server_reply_headers;\n\n\t\tif (isset($h['Content-Range'])) {\n\t\t\t$this->warnx(\"Uncachable: Content-Range header is present.\");\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif (!isset($h['Content-Type'])) {\n\t\t\t$this->warnx(\"No Content-Type header.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\telse if (strncasecmp($h['Content-Type'], 'video/', 6)) {\n\t\t\t$this->warnx(\"Content-Type is not video: [{$h['Content-Type']}].\");\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif (!isset($h['Content-Length'])) {\n\t\t\t$this->warnx(\"No Content-Length header.\");\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function hasData(){\n return $this->_has(4);\n }", "protected function characterData() {\n $tok = $this->scanner->current();\n\n // This should never happen...\n if ($tok === FALSE) {\n return FALSE;\n }\n // Null\n if ($tok === \"\\00\") {\n $this->parseError(\"Received NULL character.\");\n }\n // fprintf(STDOUT, \"Writing '%s'\", $tok);\n $this->buffer($tok);\n $this->scanner->next();\n return TRUE;\n }", "public function sendRaw(string $data): ?int\n {\n if ($this->accumulate) {\n @$this->buffer .= $data;\n return null;\n }\n return $this->socket->writeRaw($data);\n }", "public function has_data()\n {\n return array_key_exists('mail_from', $_POST) or\n array_key_exists('mail_email', $_POST) or\n array_key_exists('mail_subject', $_POST) or\n array_key_exists('mail_message', $_POST);\n }", "public function check_hook() \n {\n\n $payload = file_get_contents( 'php://input' );\n\t\t\n\t\tif( !array_key_exists( 'HTTP_X_HUB_SIGNATURE', $_SERVER ) ) {\n\t\t\tdie( 'Missing X-Hub-Signature header. Did you configure secret token in hook settings?' );\n\t\t}\n\t\tlist ( $enc, $git_sig ) = explode( \"=\", $_SERVER['HTTP_X_HUB_SIGNATURE'] );\n $payload_hash = hash_hmac( 'sha1', $payload, $this->secret );\n\n if ($payload_hash == $git_sig) {\n\t $this->data = json_decode( $payload );\n\t $this->build_details();\n\t } else {\n\t \tdie(\"X-Hub-Signature header did not match\");\n\t }\n }" ]
[ "0.70491666", "0.69811314", "0.6874076", "0.663485", "0.64363086", "0.6400417", "0.63298064", "0.62203413", "0.61425406", "0.61297375", "0.61125636", "0.6096543", "0.60864174", "0.6056251", "0.5970877", "0.58993363", "0.58993363", "0.5890126", "0.58682746", "0.58571833", "0.5852166", "0.5822285", "0.58168465", "0.57890034", "0.57890034", "0.57696337", "0.57693356", "0.57577", "0.575589", "0.5750114", "0.57398957", "0.57124245", "0.5700798", "0.5697627", "0.5682604", "0.56818205", "0.56746817", "0.56744045", "0.56744045", "0.5661448", "0.5647381", "0.5605589", "0.56024975", "0.5595423", "0.55833155", "0.55768514", "0.5574731", "0.5574167", "0.5569948", "0.5554821", "0.5528883", "0.552603", "0.55199605", "0.5519089", "0.54992014", "0.54946", "0.5491271", "0.5480878", "0.5480267", "0.54801214", "0.5466592", "0.5463964", "0.54626524", "0.54593104", "0.54578584", "0.5456004", "0.5449828", "0.5445788", "0.5440754", "0.54392725", "0.54380196", "0.5423767", "0.54189706", "0.5408348", "0.5405852", "0.54042244", "0.5403392", "0.53999484", "0.53991", "0.5396979", "0.5395409", "0.53920144", "0.53903407", "0.5383337", "0.5380661", "0.5372039", "0.53715795", "0.53598696", "0.53589225", "0.53534055", "0.5344128", "0.53424644", "0.53417486", "0.5335374", "0.5325687", "0.53209925", "0.531992", "0.5317859", "0.5316898", "0.531634" ]
0.76551473
0
Get test value for a webform element.
Получить тестовое значение для элемента веб-формы.
public function getTestValue(WebformInterface $webform, $name, array $element, array $options = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue($formElement)\n {\n if( !isset( $_POST[$formElement] ) ) {\n return null;\n }\n\n return $_POST[$formElement];\n }", "public function getValue()\n\t{\n\t\t// redefine html & value\n\t\t$value = $this->value;\n\n\t\t// added to form\n\t\tif($this->isSubmitted())\n\t\t{\n\t\t\t// post/get data\n\t\t\t$data = $this->getMethod(true);\n\n\t\t\t// submitted by post (may be empty)\n\t\t\tif(isset($data[$this->attributes['name']]))\n\t\t\t{\n\t\t\t\t// value\n\t\t\t\t$value = $data[$this->attributes['name']];\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\t}", "function getValue(){\n\t\treturn $this->getAttribute('value');\n\t}", "public function getSubmitValue() {\n return $this->attrs()->get('value');\n }", "public function getElement(Validation $form);", "public function getValue()\n {\n $this->eventManager->dispatchEvent(['get_value'], [__METHOD__, $this->getAbsoluteSelector()]);\n $inputType = $this->getElementByClass($this->getElementClass());\n return $this->find(sprintf($this->inputSelector, $this->attributeLabel), Locator::SELECTOR_CSS, $inputType)\n ->getValue();\n }", "public function getValue()\n\t{\n\t\t// redefine default value\n\t\t$value = $this->value;\n\n\t\t// added to form\n\t\tif($this->isSubmitted())\n\t\t{\n\t\t\t// post/get data\n\t\t\t$data = $this->getMethod(true);\n\n\t\t\t// submitted by post (may be empty)\n\t\t\tif(isset($data[$this->attributes['name']]))\n\t\t\t{\n\t\t\t\t// value\n\t\t\t\t$value = $data[$this->attributes['name']];\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\t}", "public function getValue()\n\t{\n\t\t// redefine default value\n\t\t$value = $this->value;\n\n\t\t// added to form\n\t\tif($this->isSubmitted())\n\t\t{\n\t\t\t// post/get data\n\t\t\t$data = $this->getMethod(true);\n\n\t\t\t// submitted by post/get (may be empty)\n\t\t\tif(isset($data[$this->attributes['name']]))\n\t\t\t{\n\t\t\t\t// value\n\t\t\t\t$value = (string) $data[$this->attributes['name']];\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\t}", "public function testGetHtmlValue()\n {\n $_POST['Elements'][(string)$this->_cutil->getElementId()] = array(\n '0' => array('html' => '1')\n );\n $this->assertEquals('1', $this->_cutil->getHtmlValue());\n\n $_POST['Elements'][(string)$this->_cutil->getElementId()] = array(\n '0' => array('html' => '3')\n );\n $this->assertEquals('3', $this->_cutil->getHtmlValue());\n }", "public function getTesto()\n {\n if(isset($_POST['testo']))\n {\n $testo= $_POST['testo'];\n }\n return $testo;\n }", "public function getValue()\n {\n return $this->_element->getValue();\n }", "public function getValue() {\n return $this->form->populator->getValue($this->name);\n }", "public function getValue(): mixed\n {\n if (true === $this->getForm()?->isSubmitted()) {\n return $this->submittedValue;\n }\n\n return $this->value;\n }", "public function testGetElementHtmlWithValue()\n {\n $fakeEntityAttribute = $this->prophesize(Mage_Catalog_Model_Resource_Eav_Attribute::class);\n $fakeEntityAttribute->getDefaultValue()\n ->shouldNotBeCalled();\n\n $fakeForm = $this->prophesize(UghMagicMethodsForm::class);\n\n $subj = new ErgonTech_SimpleProductAlert_Block_Adminhtml_Select_Renderer;\n $subj->setEntityAttribute($fakeEntityAttribute->reveal());\n $subj->setForm($fakeForm->reveal());\n $subj->setValue('something');\n $subj->getElementHtml();\n }", "function getSubmittedValue( $present=true ){\n if( !isset( $_POST[$this->htmlname] ) ){ \n $value = array();\n }else{\n $value = $_POST[$this->htmlname];\n }\n $this->set( $value );\n }", "public function getValue()\n\t{\n\t\treturn $this->getAttribute('value');\n\t}", "public function test_field_has_correct_value_attribute_when_changed()\n {\n $this->Field->attributes->value = $this->test_value;\n $dom = HtmlDomParser::str_get_html($this->Field->makeView()->render());\n $remove_button = current($dom->find($this->test_tag));\n $file_link = current($dom->find('span.file-name'));\n\n $this->assertEquals('Remove', $remove_button->value);\n $this->assertEquals('yoda.pdf', trim($file_link->plaintext));\n }", "public function getValue()\n {\n return $this->rawData['parameterArray']['itemFormElValue'] ?? null;\n }", "public function getTestValue() {}", "public function getTestValue() {}", "public function value($id)\n\t{\n\t\treturn $this->forms()->get_value($id);\n\t}", "public function getValue()\n {\n return $this->getAttribute('object.target.value');\n }", "public function getFieldValue();", "public function getValue()\n {\n return $this->getParam('value');\n }", "public function getValue()\n\t{\n\t\t// default value (may be null)\n\t\t$value = $this->getChecked();\n\n\t\t// post/get data\n\t\t$data = $this->getMethod(true);\n\n\t\t// form submitted\n\t\tif($this->isSubmitted())\n\t\t{\n\t\t\t// allow external data\n\t\t\tif($this->allowExternalData) $value = $data[$this->name];\n\n\t\t\t// external data NOT allowed\n\t\t\telse\n\t\t\t{\n\t\t\t\t// item is set\n\t\t\t\tif(isset($data[$this->name]) && isset($this->values[(string) $data[$this->name]])) $value = $data[$this->name];\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\t}", "public function testFormFill()\n {\n $this->url('/form.php');\n $this->assertEquals('Form', $this->title());\n\n $values = $this->fillForm();\n\n $this->element($this->using('css selector')->value('input[type=submit]'))->click();\n\n $body = $this->element($this->using('css selector')->value('body'))->attribute('innerHTML');\n\n foreach ($values as $value) {\n $this->assertContains($value, $body);\n }\n }", "public function getInput_value()\n {\n return $this->input_value;\n }", "public function getValue($elemento){\n\t\t\t$modulo = $elemento->getModuleName();\n\t\t\t$name = $this->getFormName();\n\t\t\t$sql = \"SELECT $name FROM \". $this->tabla .\"_$modulo WHERE uid_$modulo = \". $elemento->getUID();\n\t\t\t$exists = $this->db->query( $sql, 0, 0 );\n\t\t\treturn trim($exists);\n\t\t}", "public function getFormElement()\n {\n \n }", "public function getWebform() {\n return $this->webform;\n }", "function get_value()\n {\n\t\t$appx = new app();\n return $appx->unserialize64($_SESSION['form_value']);\n }", "public function getValue() {\n switch ($this->type) {\n case self::STRING:\n $this->value = HttpRequest::getInstance()->getString($this->name);\n break;\n case self::INT:\n $this->value = HttpRequest::getInstance()->getInt($this->name);\n break;\n case self::FLOAT:\n $this->value = HttpRequest::getInstance()->getFloat($this->name);\n break;\n case self::BOOL:\n $this->value = HttpRequest::getInstance()->getBool($this->name);\n break;\n default:\n throw new FormException('Unhandled parameter type');\n }\n return $this->value;\n }", "public function getCurrentWebform();", "public function getValue() {\n return $this->getChildValue('value');\n }", "public function getFieldValue() {\n return $this->field_value;\n }", "public function getValue()\n {\n return $this->getAttribute('disabled')\n ? null\n : $this->getAttribute('value');\n }", "function get_value() {\n\t\treturn $this->value;\n\t}", "public function getInputValue()\n {\n return $this->inputValue;\n }", "public function getInputValue()\n {\n return $this->inputValue;\n }", "function _getMetaValueForForm($form)\n{\n $tmpMetaForm =& _newMetaForm();\n $form = $tmpMetaForm->process($form);\n if (!preg_match('/<input[^>]+name=\"HTML_MetaForm\"[^>]*value=\"(.+?)\"[^>]*>/s', $form, $p)) return null;\n return $p[1];\n}", "public function getCurrentWebformSubmission();", "function input_value(){\n\t\treturn $this->_value;\n\n\t}", "function input_value(){\n\t\treturn $this->_value;\n\n\t}", "function input_value($name)\n{\n global $form;\n\n if (isset($_POST[$name]) && $form['success'] == false) {\n return esc_attr($_POST[$name]);\n } else {\n return '';\n }\n}", "public function getAnswerValue()\n {\n return $this->qaEntity->getAnswer($this->applicationStepEntity);\n }", "public function valueByKey($form_key) {\n if ($values = $this->valuesByKey($form_key)) {\n return reset($values);\n }\n return NULL;\n }", "abstract public function getTestValue() ;", "public function elementValue(FormRuntime $formRuntime, RootRenderableInterface $element)\n {\n $request = $formRuntime->getRequest();\n /** @var Result $validationResults */\n $validationResults = $formRuntime->getRequest()->getInternalArgument('__submittedArgumentValidationResults');\n if ($validationResults !== null && $validationResults->forProperty($element->getIdentifier())->hasErrors()) {\n return $this->getLastSubmittedFormData($request, $element->getIdentifier());\n }\n return ObjectAccess::getPropertyPath($formRuntime, $element->getIdentifier());\n }", "public function getFieldValue()\r\n {\r\n return $this->FieldValue;\r\n }", "public function get_value() {\r\n\t\t$reset = $this->page_data->get_get()->contains($this->get_reset_param());\r\n\t\treturn ($reset) ? '' : $this->page_data->get_get()->get_item($this->get_param(), '');\r\n\t}", "public function valueByName($name, $index, WebDriverElement $element = null)\n\t{\n\t\treturn $this->_select($this->getElementProvider()->byName($name, $element), 'value', $index);\n\t}", "public function get_value()\n { \n return $this->value;\n }", "public function testFormFillWithPreset()\n {\n $this->url('/form.php');\n $this->assertEquals('Form', $this->title());\n\n $lastName = str_shuffle(\"abcdefgh\");\n\n $desiredValues = [\"lastname\" => $lastName];\n\n $values = $this->fillForm($desiredValues);\n\n $this->assertContains($lastName, $values);\n\n $this->element($this->using('css selector')->value('input[type=submit]'))->click();\n\n $body = $this->element($this->using('css selector')->value('body'))->attribute('innerHTML');\n\n foreach ($values as $value) {\n $this->assertContains($value, $body);\n }\n }", "public function setValue(){\n\t\tif (isset($_POST[self::$value]))\n \t\treturn ($_POST[self::$value]);\n\t}", "function getFieldValue($fieldKey, $calendarForm, $store) \r\n{\r\n\tglobal $webID;\r\n\t$select = '\r\n\tPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\r\n\tPREFIX pb: <http://ld2sd.deri.org/pb/ns#>\r\n\t\r\n\tSELECT DISTINCT ?value\r\n\tWHERE {\r\n\tGRAPH <' . $webID .'> {\r\n\t' . $calendarForm . ' rdf:type pb:RDForm ;\r\n\t\t\t\t pb:field ?field . \r\n\t?field pb:key ?fieldKey ;\r\n\t\t pb:value ?fieldValue .\r\n\t?fieldKey rdf:value \"' . $fieldKey . '\" .\r\n\t?fieldValue rdf:value ?value .\r\n\t}\r\n\t}\r\n\t';\r\n\t\r\n\t$r = '';\r\n\tif ($rows = $store->query($select, 'rows')) {\r\n\t foreach ($rows as $row) {\r\n\t\treturn $row['value'];\r\n\t }\r\n\t}\r\n}", "function getvalue() {\n\treturn $this->value;\n}", "public function getValue($name)\n {\n $wrkname = $this->getIndexedName($name);\n $value = Post($wrkname);\n if (preg_match('/^(fn_)?(x|o)\\d*_/', $name) && $this->FormName != \"\") {\n $wrkname = $this->FormName . '$' . $wrkname;\n if (Post($wrkname) !== null) {\n $value = Post($wrkname);\n }\n }\n return $value;\n }", "public function setValue(){\n\t\tif (isset($_POST[self::$value]))\n \treturn ($_POST[self::$value]);\n\t}", "function getFormField() {\n\t}", "function getFormHTML()\n {\n global $dataMgr;\n $assignment = get_peerreview_assignment();\n $html = \"Hi\";\n\n return $html;\n }", "public function getVal();", "function getValueForSave($ele_value) {\n return $ele_value;\n }", "public function testCanGetValueOfMatchingElement()\n\t {\n\t\t$list = $this->object->query(\"/test/element[@attribute='attr']\");\n\t\t$this->assertEquals(\"value\", $this->object->getFirstItemValueFrom($list));\n\n\t\t$list = $this->object->query(\"/test/element[@attribute='non-existent']\");\n\t\t$this->assertFalse($this->object->getFirstItemValueFrom($list));\n\t }", "function get_value() {\r\n\r\n return $this->_value;\r\n\r\n }", "public function getValue()\n\t{\n\t\treturn Text::plain(urldecode($this->getAttribute('value')));\n\t}", "public function getInputValue();", "public function GetFormElement($element_name) {\n\t\treturn $this->form_elements[$element_name]; // Return the element only\n\t}", "public function get_value() {\n return $this->value;\n }", "public function get_value() {\n return $this->value;\n }", "public function testGetHtml()\n {\n $itemName = 'name';\n $this->_sessionMock\n ->expects($this->once())\n ->method('set')\n ->with($itemName);\n $input = new Formagic_Item_XsrfProtection(\n $itemName,\n array('session' => $this->_sessionMock)\n );\n\n $this->assertEmpty($input->getValue());\n $input->getHtml();\n $this->assertInternalType('string', $input->getValue());\n $this->assertNotEmpty($input->getValue());\n }", "public function get_value() {\n\t\treturn $this->value;\n\t}", "public function get_value() {\n\t\treturn $this->value;\n\t}", "public function valueById($id, $index, WebDriverElement $element = null)\n\t{\n\t\treturn $this->_select($this->getElementProvider()->byId($id, $element), 'value', $index);\n\t}", "public function getForm($form_arg);", "public function getValue(): mixed\n {\n return $this->field?->getValue();\n }", "public function getValue() {\n\t\treturn isset($this->attributes['value'])?$this->attributes['value']:null;\n\t}", "public function valueForHtmlField($field)\n {\n $pieces = preg_split(\"/[\\[\\]]+/\", $field, 0, PREG_SPLIT_NO_EMPTY);\n $params = $this->params;\n foreach (array_slice($pieces, 0, -1) as $key) {\n $params = $params[Util::delimiterToCamelCase($key)];\n }\n if ($key != 'custom_fields') {\n $finalKey = Util::delimiterToCamelCase(end($pieces));\n } else {\n $finalKey = end($pieces);\n }\n $fieldValue = isset($params[$finalKey]) ? $params[$finalKey] : null;\n return $fieldValue;\n }", "protected function getTestValue()\n {\n return 'H31l0 Wor1d$!';\n }", "function _getValue($field)\r\n\t{\r\n\t\t$value = $_POST[$field];\r\n\t\treturn $value;\r\n\t}", "public function test7()\n\t{\n\t\t$formData=array('mytest'=>'testing this');\n\t\t$this->get('/form_test.php','www.talkingpixels.org')\n\t\t\t->submitForm($formData)\n\t\t\t->assertContains(\"//*[@name='mytest']\",TEST::TYPE_XPATH);\n\t}", "public function value(string $input)\n {\n if(isset($_SERVER['HTTP_REFERER'])){\n $page = $_SERVER['HTTP_REFERER'];\n \n if(isset($_SESSION['VALIDATOR'][$page]['INPUTS'])){\n if(isset($_SESSION['VALIDATOR'][$page]['INPUTS'][$input])){ \n return $_SESSION['VALIDATOR'][$page]['INPUTS'][$input]; \n } \n }\n }\n \n return false;\n }", "function av_we_condition_condition_ajax_handler($form, &$form_state) {\n $elem = $form_state['triggering_element'];\n $parents = $elem['#parents'];\n $parents = array_slice($parents, 0, count($parents) - 1);\n $parents[] = 'data';\n return drupal_array_get_nested_value($form, $parents);\n}", "public function setFormIdInput()\n {\n $form = $this->parser->getForm();\n $input = $form->get('form-id');\n $this->assertEquals('login-form', $input->getValue());\n }", "public function getContent() {\n return $this->getAttribute('value');\n }", "public function getTest()\n {\n return $this->test;\n }", "public function getTest()\n {\n return $this->test;\n }", "abstract protected function _getFormElement($name);", "public function test(&$element, $value, $group = null, &$input = null, &$form = null)\n\t{\n\t\t// Get the possible field actions and the ones posted to validate them.\n\t\t$fieldActions = self::getFieldActions($element);\n\t\t$valueActions = self::getValueActions($value);\n\n\t\t// Make sure that all posted actions are in the list of possible actions for the field.\n\t\tforeach ($valueActions as $action)\n\t\t{\n\t\t\tif (!in_array($action, $fieldActions))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function getValue() {\n if (!$this->node->hasChildNodes()) return NULL;\n\n // Find selected\n foreach ($this->node->childNodes as $child) {\n if ('option' != $child->tagName || !$child->hasAttribute('selected')) continue;\n return iconv('utf-8', xp::ENCODING, $child->getAttribute('value'));\n }\n \n // Use first child's value\n return iconv('utf-8', xp::ENCODING, $this->node->childNodes->item(0)->getAttribute('value'));\n }", "static function get_single_input_value($form, $inputName) {\r\n\t\t$inp = $form->getInput($inputName);\r\n\t\t\r\n\t\tif ($inp === false) {\r\n\t\t\treturn [false, \"No input with that name found.\", null];\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($_POST['inputPost'][$form->name.'__'.$inputName])) {\r\n\t\t\t//Deserialize the input from the client and store it.\r\n\t\t\t$inpValue = $inp->receive($_POST['inputPost'][$form->name.'__'.$inputName]);\r\n\t\t\t//Validate the input on the server.\r\n\t\t\t$error = $inp->validate_server($inpValue);\r\n\t\t\tif ($error !== true) {\r\n\t\t\t\treturn [false, $error, null];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn [true, \"\", $inpValue];\r\n\t\t}else{\r\n\t\t\treturn [false, \"Not submited.\", null];\r\n\t\t}\r\n\t}", "public function testGetElementHtmlWithoutValue()\n {\n $fakeEntityAttribute = $this->prophesize(Mage_Catalog_Model_Resource_Eav_Attribute::class);\n $fakeEntityAttribute->getDefaultValue()\n ->willReturn('something')\n ->shouldBeCalled();\n\n $fakeForm = $this->prophesize(UghMagicMethodsForm::class);\n\n $subj = new ErgonTech_SimpleProductAlert_Block_Adminhtml_Select_Renderer;\n $subj->setEntityAttribute($fakeEntityAttribute->reveal());\n $subj->setForm($fakeForm->reveal());\n $subj->getElementHtml();\n }", "public function get_value($input)\n {\n }", "public function elementGetVal($el, $default=null){\n\t\t$tag_name = strtolower($el->nodeName);\n\t\tif('input'===$tag_name){ //TODO: test checkbox returned value if the checkbox is not checked\n\t\t\treturn self::nodeGetAttribute($el, 'value');\n\t\t}else\n\t\tif('select'===$tag_name){\n\t\t\t$attrs = self::getAttributeNames($el);\n\t\t\t$vals = array();\n\t\t\tforeach($el->childNodes as $opt){\n\t\t\t\t$opt_attrs = self::getAttributeNames($opt);\n\t\t\t\tif(!isset($opt_attrs['selected'])){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(isset($attrs['multiple'])){\n\t\t\t\t\t$vals[] = self::nodeGetAttribute($opt, 'value', $opt->nodeValue);\n\t\t\t\t}else{\n\t\t\t\t\treturn self::nodeGetAttribute($opt, 'value', $opt->nodeValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($attrs['multiple'])){\n\t\t\t\treturn $vals;\n\t\t\t}else{\n\t\t\t\treturn null;//TODO: should return first child option!\n\t\t\t}\n\t\t}else\n\t\tif('textarea'===$tag_name){\n\t\t\treturn $el->nodeValue;\n\t\t}\n\t}", "function get_field_value( $field_id ){\n \n foreach ( $this->fields as $field ){\n if ( $field->id == $field_id ){\n return $field->value;\n }\n }\n return false;\n }", "public function getForm();", "public function testToken()\n\t{\n\t\tJFactory::$application = $this->getMockWeb();\n\n\t\t$token = JSession::getFormToken();\n\n\t\t$this->assertThat(\n\t\t\tJHtml::_('form.token'),\n\t\t\t$this->equalTo('<input type=\"hidden\" name=\"' . $token . '\" value=\"1\" />')\n\t\t);\n\t}", "#[@test]\n public function getValue() {\n $this->assertEquals(null, $this->wrapper->getValue('orderdate'));\n }", "function getValue() {\r\n\t\treturn $this->value;\r\n\t}", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "public function valueOf($elementName)\n {\n $element = $this->getElement($elementName);\n\n if (!empty($element))\n $result = $element->getValue();\n\n else\n $result = NULL;\n\n return $result;\n }" ]
[ "0.6563485", "0.6386876", "0.6181173", "0.61392695", "0.6073513", "0.6042063", "0.6036194", "0.60195786", "0.59547704", "0.58792573", "0.58497286", "0.5838449", "0.58138734", "0.58001024", "0.5796593", "0.5764889", "0.5722554", "0.5710036", "0.56938237", "0.56938237", "0.56937116", "0.56108034", "0.5605821", "0.5593314", "0.5585977", "0.5582636", "0.5561907", "0.5553498", "0.55369544", "0.5509805", "0.5502146", "0.5465762", "0.54566777", "0.5429072", "0.5422577", "0.54054457", "0.5403758", "0.5403594", "0.5403594", "0.5396908", "0.538839", "0.5359288", "0.5359288", "0.5341758", "0.53343207", "0.53307885", "0.5318078", "0.5315563", "0.5309643", "0.5307977", "0.5304613", "0.53030574", "0.52857536", "0.52836597", "0.5281944", "0.5268817", "0.5268379", "0.5259703", "0.525837", "0.52566355", "0.52520645", "0.52480245", "0.52479696", "0.5233422", "0.52234083", "0.52157074", "0.5204725", "0.519659", "0.519659", "0.5191924", "0.5180318", "0.5180318", "0.51581115", "0.515429", "0.51528895", "0.5150793", "0.515012", "0.5146131", "0.5134461", "0.5132647", "0.5127811", "0.5127054", "0.51268375", "0.5122407", "0.5116707", "0.5116707", "0.510455", "0.5099265", "0.50946254", "0.508896", "0.5084156", "0.50836617", "0.5078155", "0.50763005", "0.5070394", "0.5068069", "0.5064612", "0.5063234", "0.50543606", "0.5054263" ]
0.72658044
0
Clear existing message variables
Очистить существующие переменные сообщений
public function clearVariables() { $this->message_variables = []; $this->assignTemplate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearMessages() {\n $this->messages = array();\n }", "public static function clearMessage()\r\n {\r\n self::setMessage(null);\r\n }", "public function clearMessages() {\n\t\t\t$this->messages = [];\n\t\t}", "public function resetMessages()\n {\n $this->messages = array();\n }", "public function clear()\n {\n $this->messages = [];\n $this->error = false;\n }", "final protected function clear_messages()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->messages = array('type'=>'', 'messages'=>array());\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function clear_message() {\n unset($_SESSION['message']);\n }", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "public function clearMessages()\n {\n $this->handler->clean();\n $this->messages = array();\n }", "public function clearTellMessages() {\n\t\t$this->tellMessages = array();\n\t}", "public function clear()\r\n {\r\n $this->_messages \t= array();\r\n $this->_warnings \t= array();\r\n $this->_errors \t\t= array();\r\n \r\n if(Zend_Session::namespaceIsset('Messages')) {\r\n $messages = new Zend_Session_Namespace('Messages');\r\n $messages->unsetAll();\r\n }\r\n }", "public function removeAll() {\n $this->messages = array();\n }", "public function reset()\n {\n $this->values[self::MESSAGEID] = null;\n $this->values[self::SOURETYPE] = null;\n $this->values[self::SYNCTYPE] = null;\n $this->values[self::CALLBACKURL] = null;\n $this->values[self::PRIORITY] = null;\n }", "public function resetAll() {\r\r\n\t\t\r\r\n\t\t$this->newMessage();\r\r\n\t\t$this->options = array();\r\r\n\t\t$this->tags = array();\r\r\n\t}", "public function clear()\n {\n $this->receivers = [];\n $this->messages = [];\n $this->injected = [];\n }", "function reset(){\n\t\t$this->state = 'message_headers';\n\t\t$this->headers = array();\n\t\t$this->mime_boundaries = array();\n\t}", "public function reset() {\n //$this->from = array();\n $this->replyTo = array();\n $this->to = array();\n $this->cc = array();\n $this->bcc = array();\n $this->priority = \"3\";\n $this->subject = \"\";\n $this->message = \"\";\n $this->isHTML = false;\n $this->attachments = array();\n $this->mimeMessage = new MIMEMessage();\n }", "private function clearmessage()\n\t{\n\t\t$userdata = array(\n\t\t\t'success' => '',\n 'error' => ''\n\t\t);\n\t\t$this->session->set_userdata($userdata);\n\t}", "public function reset()\n {\n $this->values[self::CODE_] = null;\n $this->values[self::MSG_] = null;\n $this->values[self::DATA_] = null;\n }", "function effacer_message_info(){\n\tunset($_SESSION[\"messages\"]);\n}", "public function clear(): void\n {\n $this->getSessionMessages(true);\n parent::clear();\n }", "public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n }", "public function reset()\n {\n $this->values[self::MAIL_ID] = null;\n $this->values[self::TYPE] = null;\n $this->values[self::TEMPLATE_ID] = null;\n $this->values[self::CREATE_TIME] = null;\n $this->values[self::READ_TIME] = null;\n $this->values[self::GET_TIME] = null;\n $this->values[self::TITLE] = null;\n $this->values[self::MSG] = null;\n $this->values[self::SENDER_TYPE] = null;\n $this->values[self::SENDER_ID] = null;\n $this->values[self::SENDER_NAME] = null;\n $this->values[self::LEAGUE_ID] = null;\n $this->values[self::LEAGUE_NAME] = null;\n $this->values[self::PACK_IDS] = array();\n $this->values[self::ITEMS] = array();\n $this->values[self::DATA] = null;\n $this->values[self::POS] = null;\n $this->values[self::RECIPIENT_ID] = null;\n $this->values[self::IS_GLOBAL] = null;\n $this->values[self::DELETED] = null;\n }", "public function clearMessages()\r\n {\r\n $this->_messageQueue = array();\r\n }", "function reset ()\n\t{\n\t\t$this->to = null ;\n\t\t$this->from = null ;\n\t\t$this->subject = null ;\n\t\t$this->content = null ;\n\t\t$this->attachements = array () ;\n\t\t$this->attachPath = null ;\n\t\t$this->vars = array () ;\n\t\t$this->language = null ;\n\t\t$this->cc = array () ;\n\t\t$this->bcc = array () ;\n\t\t$this->replyTo = null ;\n\t\t$this->receipt = null ;\n\t\t$this->return = null ;\n\t\t$this->charset = 'utf-8' ;\n\t\t$this->sendAs = 'both' ;\n\t\t$this->useCache = true ;\n\t\t$this->database_template = array () ;\n\t\t$this->template = array () ;\n\t\t$this->headers = array () ;\n\t\t$this->__current = array () ;\n\t\t$this->log = array () ;\n\t\t$this->resetCfg () ;\n\t}", "public function reset()\n {\n $this->values[self::RET] = null;\n $this->values[self::TOUSETNAME] = null;\n $this->values[self::MSGID] = null;\n $this->values[self::CLIENTMSGID] = null;\n $this->values[self::CREATETIME] = null;\n $this->values[self::SERVERTIME] = null;\n $this->values[self::TYPE] = null;\n $this->values[self::NEWMSGID] = null;\n }", "public function reset()\n {\n $this->values[self::REASON] = null;\n $this->values[self::ID] = null;\n $this->values[self::NAME] = null;\n $this->values[self::OID] = null;\n $this->values[self::ONAME] = null;\n $this->values[self::TIME] = null;\n $this->values[self::MSG] = array();\n }", "public function reset()\n {\n $this->values[self::ANNOTATION] = array();\n $this->values[self::MESSAGE_CONTENT] = null;\n }", "public static function clearLastMessages() {\n if (isset($_SESSION[\"messages\"])) {\n unset($_SESSION[\"messages\"]);\n }\n }", "public function clearvars()\n {\n $x = explode(\",\", EMPS_VARS);\n foreach ($x as $value) {\n if ($value == 'lang') {\n continue;\n }\n $GLOBALS[$value] = \"\";\n }\n }", "public function clear_messages() {\n\t\t$this->messages = array();\n\t\treturn $this;\n\t}", "public function clear() {\r\n $this->match = '';\r\n $this->bodyTexts = array();\r\n $this->stack = array();\r\n }", "public function clearRequestProperties()\n {\n if (!is_null($this->requestHeaders) && ($this->requestHeaders instanceof MessageHeader)) {\n $this->requestHeaders->clear();\n }\n }", "public function resetAll(): void\n {\n $this->errorMsg = [];\n $this->warningMsg = [];\n $this->infoMsg = [];\n $this->successMsg = [];\n }", "public static function clearLogger()\n {\n self::$_messages = array();\n }", "public function clear_errors() \n\t{\n\t\t$this->mail_errors = \"\";\n\t}", "public function reset() {\n $this->_vars = [];\n $this->vars = [];\n }", "public function reset()\n {\n $this->values[self::REQUEST_HEADER] = null;\n $this->values[self::PARTICIPANT_ID] = null;\n $this->values[self::EVENT_REQUEST_HEADER] = null;\n }", "public function reset()\n {\n $this->values[self::token] = null;\n $this->values[self::group_id] = null;\n $this->values[self::channel] = null;\n $this->values[self::plat_form] = null;\n $this->values[self::value_id] = null;\n $this->values[self::params] = null;\n $this->values[self::checksum] = null;\n $this->values[self::message] = null;\n $this->values[self::status] = null;\n $this->values[self::priority] = null;\n $this->values[self::typequeue] = null;\n }", "protected function clearFlashMessage() {\n\t\tPPI_Input::clearFlashMessage();\n\t}", "function resetProperties() {\n\t\t$this->setBody('');\n\t\t$this->setFromDate('');\n\t\t$this->setFromId('');\n\t\t$this->setFromIp('');\n\t\t$this->setFromType('');\n\t\t$this->setId('');\n\t\t$this->setImage('');\n\t\t$this->setIsRead('');\n\t\t$this->setIsSent('');\n\t\t$this->setName('');\n\t\t$this->setOwnerCd('');\n\t\t$this->setReadDate('');\n\t\t$this->setToId('');\n\t\t$this->setToType('');\n\t}", "public function reset()\n {\n $this->values[self::OBJECTID] = null;\n $this->values[self::RCVTIME] = null;\n $this->values[self::MESSAGETYPE] = null;\n $this->values[self::TRACK] = null;\n $this->values[self::STATUS] = null;\n $this->values[self::ALARM] = null;\n $this->values[self::CARRATE] = null;\n $this->values[self::STATUSDESC] = null;\n }", "public static function clear_msg(){\n $fh = fopen(Log::path_msg, 'w') or die(\"Can't create file\");\n fclose($fh);\n }", "public function reset()\n {\n $this->values[self::SESSION] = null;\n $this->values[self::CHANNEL] = null;\n }", "private function clear(): void{\n echo \"Clearing...\\n\";\n $slack = new SlackController();\n $channels = $slack->getInactiveTextMessageChannels();\n\n foreach ($channels as $channel){\n $slack->removeMembers($channel[\"id\"]);\n }\n }", "public function clearMessages() {\n $this->messages = array();\n return true;\n }", "public static function clear()\n {\n $session = new Session();\n $session->remove('alertType');\n $session->remove('alertMessage');\n }", "protected function clearPrePromptMessages()\n {\n $this->prePromptMessages = array();\n }", "function clearCc () {\r\n $this->sendcc = array();\r\n $this->all_emails = array();\r\n }", "public function clear () {}", "public function clear () {}", "public function clear () {}", "public function clear () {}", "function clear_validation_messages()\n{\n\t// Unset any previous error message...\n\tforeach ($_SESSION as $key=>$value):\n\t\tif (strpos($key,'.err')!==FALSE):\n\t\t\tunset($_SESSION[$key]);\n\t\t\tunset($_SESSION[substr($key,0,-4)]); // clear without the .err\n\t\t\t$key = substr($key,0,-3);\n\t\t\tif (isset($_SESSION[$key])):\n\t\t\t\tunset($_SESSION[$key]);\n\t\t\tendif;\n\t\tendif;\n\tendforeach;\t\n}", "public function reset()\n {\n $this->values[self::REQUEST_HEADER] = null;\n $this->values[self::PRESENCE_STATE_SETTING] = null;\n $this->values[self::DND_SETTING] = null;\n $this->values[self::DESKTOP_OFF_SETTING] = null;\n $this->values[self::MOOD_SETTING] = null;\n }", "public function flushMessages()\r\n\t{\r\n\t\t$this->messages = [];\r\n\t}", "public static function clear()\n\t{\n\t\t$session = new Zend_Session_Namespace('Blueberry_Notice');\n\t\t$session->notices = array();\n\t}", "public function purge()\n {\n foreach ($this as $index => $message) {\n unset($this->$index);\n }\n }", "public function clear($clearAttachments = false)\n {\n $this->subject = \"\";\n $this->body = \"\";\n $this->headerStr = \"\";\n $this->replytoFlag = false;\n $this->recipients = array();\n $this->headers = array();\n $this->debugMsg = array();\n $this->attachCount = 0;\n\n $this->setHeader('User-Agent', $this->useragent);\n $this->setDate();\n\n if ($clearAttachments !== false) {\n $this->attachmentsName = array();\n $this->attachmentsType = array();\n $this->attachmentsDisp = array();\n $this->attachmentsContent = array();\n }\n }", "public function clearReplyTos()\n {\n }" ]
[ "0.77420336", "0.7680396", "0.7545209", "0.7501912", "0.74997336", "0.7473374", "0.7388973", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73697466", "0.73150927", "0.73150927", "0.73150927", "0.73150927", "0.73150927", "0.73150927", "0.73150927", "0.73150927", "0.7309442", "0.7273218", "0.72303396", "0.7192776", "0.7155332", "0.7147036", "0.70437515", "0.70102364", "0.69932544", "0.6935089", "0.68308526", "0.6792975", "0.6735759", "0.6727255", "0.6702648", "0.6673203", "0.6648512", "0.6627046", "0.6614335", "0.6598541", "0.6596067", "0.65739775", "0.65486807", "0.653914", "0.65254784", "0.6470702", "0.6463026", "0.6412625", "0.64014935", "0.63910335", "0.6382185", "0.6373365", "0.6366293", "0.63627344", "0.6342365", "0.63249147", "0.63133144", "0.6300394", "0.62990063", "0.6288839", "0.6280423", "0.626468", "0.626468", "0.626468", "0.626468", "0.6257096", "0.62436783", "0.6241171", "0.6240819", "0.62341535", "0.62258434", "0.62254554" ]
0.8060194
0
Get the translation of a phrase or a word using its code.
Получите перевод фразы или слова с использованием его кода.
static public function translate($code) { return (isset($_ENV['lang'][$code])) ? $_ENV['lang'][$code] : $code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function trans($str, $code = LANGUAGE_CODE)\n {\n return $this->language->get($str, $code);\n }", "public function getTranslateByCode($code, $lang)\n {\n $sql = \"SELECT `t`.`value` \".\n \"FROM \".DB::TBL_WORDS.\" `w` \".\n \"INNER JOIN \".DB::TBL_TRANSLATES.\" `t` \".\n \"ON `w`.`id`=`t`.`word_id` AND `w`.`key`=?\".\n \"INNER JOIN \".DB::TBL_LANGS.\" `l` \".\n \"ON `t`.`lang_id`=`l`.`id` AND `l`.`code`=? \".\n \"LIMIT 1\";\n $st = $this->MySQL->getConn()->prepare($sql);\n $st->execute([$code, $lang]);\n $r = $st->fetchColumn();\n return !empty($r) ? $r : '';\n }", "public static function getPhrase($code)\n {\n switch ($code) {\n case 100:\n return 'Continue';\n break;\n case 101:\n return 'Switching Protocols';\n break;\n case 102:\n return 'Processing';\n break;\n case 103:\n return 'Early Hints';\n break;\n case 200:\n return 'OK';\n break;\n case 201:\n return 'Created';\n break;\n case 202:\n return 'Accepted';\n break;\n case 203:\n return 'Non-Authoritative Information';\n break;\n case 204:\n return 'No Content';\n break;\n case 205:\n return 'Rset Content';\n break;\n case 206:\n return 'Partial Content';\n break;\n case 207:\n return 'Multi-Status';\n break;\n case 208:\n return 'Already Reported';\n break;\n case 226:\n return 'IM Used';\n break;\n case 300:\n return 'Multiple Choices';\n break;\n case 301:\n return 'Moved Permanently';\n break;\n case 302:\n return 'Found';\n break;\n case 303:\n return 'See Other';\n break;\n case 304:\n return 'Not Modified';\n break;\n case 305:\n return 'Use Proxy';\n break;\n case 306:\n return '(Unused)';\n break;\n case 307:\n return 'Temporary Redirect';\n break;\n case 308:\n return 'Permanent Redirect';\n break;\n case 400:\n return 'Bad Request';\n break;\n case 401:\n return 'Unauthorized';\n break;\n case 402:\n return 'Payment Required';\n break;\n case 403:\n return 'Forbidden';\n break;\n case 404:\n return 'Not Found';\n break;\n case 405:\n return 'Method Not Allowed';\n break;\n case 406:\n return 'Not Acceptable';\n break;\n case 407:\n return 'Proxy Authentication Required';\n break;\n case 408:\n return 'Request Timeout';\n break;\n case 409:\n return 'Conflict';\n break;\n case 410:\n return 'Gone';\n break;\n case 411:\n return 'Length Required';\n break;\n case 412:\n return 'Precondition Failed';\n break;\n case 413:\n return 'Payload Too Large';\n break;\n case 414:\n return 'URI Too Long';\n break;\n case 415:\n return 'Unsupported Media Type';\n break;\n case 416:\n return 'Range Not Satisfiable';\n break;\n case 417:\n return 'Expectation Failed';\n break;\n case 421:\n return 'Misdirected Request';\n break;\n case 422:\n return 'Unprocessable Entity';\n break;\n case 423:\n return 'Locked';\n break;\n case 424:\n return 'Failed Dependency';\n break;\n case 425:\n return 'Too Early';\n break;\n case 426:\n return 'Upgrade Required';\n break;\n case 427:\n return 'Unassigned';\n break;\n case 428:\n return 'Precondition Required';\n break;\n case 429:\n return 'Too Many Requests';\n break;\n case 430:\n return 'Unassigned';\n break;\n case 431:\n return 'Request Header Fields Too Large';\n break;\n case 451:\n return 'Unavailable For Legal Reasons';\n break;\n case 500:\n return 'Internal Server Error';\n break;\n case 501:\n return 'Not Implemented';\n break;\n case 502:\n return 'Bad Gateway';\n break;\n case 503:\n return 'Service Unavailable';\n break;\n case 504:\n return 'Gateway Timeout';\n break;\n case 505:\n return 'HTTP Version Not Supported';\n break;\n case 506:\n return 'Variant Also Negotiates';\n break;\n case 507:\n return 'Insufficient Storage';\n break;\n case 508:\n return 'Loop Detected';\n break;\n case 509:\n return 'Unassigned';\n break;\n case 510:\n return 'Not Extended';\n break;\n case 511:\n return 'Network Authentication Required';\n break;\n default:\n return 'Unassigned';\n break;\n }\n }", "public static function toPhrase(string $code = self::CODE_COMMON): string\n {\n return static::getPhrase($code) ?? static::$map[self::CODE_COMMON];\n }", "public function getTranslation($lang_code) {\n $arr = $this->translation_table;\n\n $array = $this->rowsetToArray($arr->find($lang_code)->current());\n\n return $array['translation'];\n }", "private function get_translation( $language_code ) {\n\n\t\tif ( ! array_key_exists( $language_code, $this->translations ) ) {\n\t\t\t$translated_post_id = $this->fetch_translation( $language_code );\n\t\t\tif ( $translated_post_id !== 0 ) {\n\t\t\t\ttry {\n\t\t\t\t\t$translation = $this->element_factory->get_post_untranslated( $translated_post_id, $language_code );\n\t\t\t\t} catch ( Toolset_Element_Exception_Element_Doesnt_Exist $e ) {\n\t\t\t\t\t$translation = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$translation = null;\n\t\t\t}\n\n\t\t\t$this->translations[ $language_code ] = $translation;\n\t\t}\n\n\t\treturn $this->translations[ $language_code ];\n\n\t}", "function getTranslationByLanguageCode($text,$moduleName,$languageCode) {\n\t\t$translationObject = MultilangTextPeer::getByTextAndModuleNameAndCode($text,$moduleName,$languageCode);\n\t\tif (empty($translationObject))\n\t\t\t$translation = $text;\n\t\telse\n\t\t\t$translation = $translationObject->getText();\n\t\treturn $translation;\n\t}", "public static function getPhrase(?string $code): ?string\n {\n if ($code && isset(static::$map[$code])) {\n return static::$map[$code];\n }\n return null;\n }", "public static function getLangMessage($messageCode = '')\n\t{\n\t\treturn Loc::getMessage($messageCode);\n\t}", "protected function getText($code)\n {\n if (array_key_exists($code, $this->dictionary)) {\n return $this->dictionary[$code];\n }\n return $this->dictionary[self::ERROR_UNKNOWN];\n }", "public function getLangcode();", "public function translate( $language_code, $exact_match_only = false ) {\n\t\tif( $exact_match_only && $this->is_translatable() ) {\n\t\t\treturn $this->get_translation( $language_code );\n\t\t} else {\n\t\t\treturn $this->get_best_translation( $language_code );\n\t\t}\n\t}", "public function translate(): string;", "public function getLanguageByCode($code) {\n $chosen = NULL;\n foreach ($this->languages as $language) {\n if ($language->code == $code) {\n $chosen = $language;\n break;\n }\n }\n return $chosen;\n }", "public static function getCode( $code ) {\n\t\tglobal $wgLang, $wgBabelLanguageCodesCdb;\n\n\t\t$mediawiki = $wgLang->getLanguageName( $code );\n\t\tif ( $mediawiki !== '' ) {\n\t\t\treturn $code;\n\t\t}\n\n\t\t$codes = CdbReader::open( $wgBabelLanguageCodesCdb );\n\t\treturn $codes->get( $code );\n\t}", "function t($phrase) {\n /* Static keyword is used to ensure the file is loaded only once */\n static $translations = NULL;\n /* If no instance of $translations has occured load the language file */\n if (is_null($translations)) {\n $lang_file = LOCALE_PATH . '/' . LANGUAGE . '.json';\n if (!file_exists($lang_file)) {\n $lang_file = LOCALE_PATH . '/' . 'en.json';\n return \"[Couldn't find translation file]\";\n }else{\n if (!$lang_file_content = file_get_contents($lang_file) OR\n !$translations = json_decode($lang_file_content, true)) {\n return $phrase;\n }\n }\n }\n return $translations[$phrase];\n}", "public function translate($word) {\n\t\t$word = strtolower($word);\t\n\t\t$result = $this->getData($word);\n\t\tif(empty($result)) {\n\t\t\treturn $word;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function findLangCode($code)\n\t{\n\t\t$this->preload();\n\t\tforeach ($this->languages as $lang) {\n\t\t\tif ($lang->lang_code == $code) {\n\t\t\t\treturn $lang;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function getLanguageNameByCode($code) {\n\t\treturn (isset($this->languageCodes[$code]))\n\t\t\t? $this->languageCodes[$code]\n\t\t\t: $code;\n\t}", "function trr($Phrase,$Lang=null)\n{\n\tif (j::$i18n->Disabled) return $Phrase;\n\tif ($Lang===null)\n\t{\n\t\t$t=j::Registry(\"jf/i18n/langs\");\n\t\t$Lang=$t['current'];\n\t}\n\treturn j::$i18n->Translate($Phrase,$Lang);\n\t\n}", "public function findByWord($word)\n {\n $fixed_word = $this->replaceSpaces($word);\n $trans = LocalizationModel::where('word', $fixed_word)->first();\n if (!is_null($trans)) {\n return $trans->{'word_' . $this->currentLanguage()};\n }\n return $word;\n }", "private function get_best_translation( $language_code = null ) {\n\n\t\tif ( null === $language_code ) {\n\t\t\t$language_code = $this->wpml_service->get_current_language();\n\t\t}\n\n\t\tif( array_key_exists( $language_code, $this->best_translation_for ) ) {\n\t\t\treturn $this->best_translation_for[ $language_code ];\n\t\t}\n\n\t\tif ( $this->is_translated_to( $language_code ) ) {\n\t\t\t$post = $this->get_translation( $language_code );\n\t\t} else {\n\t\t\t$default_language = $this->wpml_service->get_default_language();\n\t\t\tif ( $this->is_translated_to( $default_language ) ) {\n\t\t\t\t$post = $this->get_translation( $default_language );\n\t\t\t} else {\n\t\t\t\t$post = $this->get_original_translation();\n\t\t\t}\n\t\t}\n\n\t\t$this->best_translation_for[ $language_code ] = $post;\n\n\t\treturn $post;\n\t}", "public function translate($msg){\n if(count($this->translateTable) == 0){\n return $msg;\n }else{\n $hash = self::hash($msg);\n $translated = $this->searchInTranslateTable($hash);\n if(strlen($translated) > 0){\n return $translated;\n }else{\n return $msg;\n }\n }\n }", "function get_lang_string($strcode, $section=null) {\n if (empty($this->lang_strings[$strcode])) {\n $this->lang_strings[$strcode] = get_string($strcode, $section);\n }\n return $this->lang_strings[$strcode];\n }", "function translate($word, $direction)\n{\n // Le dictionnaire du traducteur.\n $dictionary =\n [\n 'cat' => 'chat',\n 'dog' => 'chien',\n 'monkey' => 'singe',\n 'sea' => 'mer',\n 'sun' => 'soleil'\n ];\n\n\n // Traduction du mot en -> fr ou fr -> en.\n switch($direction)\n {\n case 'toFrench':\n /*\n * Le mot spécifié est en anglais, on veut traduire vers le français.\n *\n * Il s'agit donc d'un indice dans le dictionnaire.\n * Est-ce que ce mot existe en tant qu'indice dans le dictionnaire ?\n */\n if(array_key_exists($word, $dictionary) == true)\n {\n // Oui, récupération de la valeur, de la traduction en français.\n $translatedWord = $dictionary[$word];\n\n $message = \"Le mot '$word' se traduit par '$translatedWord'.\";\n }\n else\n {\n // Non, cet indice n'existe pas.\n $message = \"Je ne connais pas le mot '$word'.\";\n }\n break;\n\n case 'toEnglish':\n /*\n * Le mot spécifié est en français, on veut traduire vers l'anglais.\n *\n * Il s'agit donc d'une valeur dans le dictionnaire.\n * Est-ce que ce mot existe en tant que valeur dans le dictionnaire ?\n */\n if(in_array($word, $dictionary) == true)\n {\n // Oui, récupération de l'indice, de la traduction en anglais.\n $translatedWord = array_search($word, $dictionary);\n\n $message = \"Le mot '$word' se traduit par '$translatedWord'.\";\n }\n else\n {\n // Non, cette valeur n'existe pas.\n $message = \"Je ne connais pas le mot '$word'.\";\n }\n break;\n\n default:\n $message = \"Je ne sais traduire qu'en français et en anglais !\";\n }\n\n return $message;\n}", "function trans($word)\n{\n\n static $trans = array(\n 'HOME' => 'الرئيسية',\n 'DASHBOARD' => 'لوحة القيادة',\n 'EMPLOYEE' => 'الموظفين',\n 'ADD_EMP' => 'اضافة موظف',\n 'MANAGE_EMP'=> 'إدارة الموظفين'\n );\n return $trans[$word];\n\n}", "public function language(string $code)\n {\n $url = $this->endpoint.\"/lang/\" . $code;\n\n $response = $this->request($url);\n\n return $response;\n }", "function get_language( $language_code = null ) {\n\t\treturn $this->get_best_translation( $language_code )->get_language();\n\t}", "function GetTranslate($target,$fromlang){\n\tif ($fromlang == \"en\") {\n\t\t$url=\"https://translation.googleapis.com/language/translate/v2?key=AIzsWUY&source=en&target=zh-tw&q=\".$target;\n\t}else{\n\t\t$url=\"https://translation.googleapis.com/language/translate/v2?key=AIsWUY&source=zh-tw&target=en&q=\".$target;\n\t}\n\n\t// GET url value (json)\n\t$text = file_get_contents($url);\n\n\t// json decode\n\t$text_json = json_decode($text,true);\n\n\t// get translate word\n\t$text_fin = $text_json['data']['translations'][0]['translatedText'];\n\n\treturn $text_fin;\n}", "public static function getLanguageByCode(string $code): string\n {\n $languages = Param::getGroup('countries_languages');\n\n if (array_key_exists($code, $languages)) {\n return $languages[$code];\n }\n\n return 'en'; // default en lang\n }", "public function getLanguage($code = null): Language\n {\n if (!count($this->scores)) {\n return new EmptyLanguage();\n }\n\n if (is_null($code)) {\n $code = key($this->scores);\n }\n\n Assert::keyExists($this->languages, $code);\n\n return $this->languages[$code];\n }", "public function _($text) {\n\t\t\t// if no translation found, return original text\n\t\t\tif (isset($this->translation[$text])) {\n\t\t\t\treturn $this->translation[$text];\n\t\t\t} else {\n\t\t\t\treturn $text;\n\t\t\t}\n\t\t}", "function auth_code_to_text($code){\n switch ($code){\n case 0:\n $text = 'admin';\n break;\n case 1:\n $text = 'representative';\n break;\n case 2:\n $text = 'member';\n break;\n default:\n $text = 'normal';\n break;\n }\n\n return $text;\n}", "public static function mapCodeToLocale( $code = '', $langs = array() )\n\t{\n\t\tif( '' == $code )\n\t\t\treturn '';\n\t\t\t\n\t\tif( empty( $langs ) ) {\n\t\t\t$langs = self::getAllLocales();\n\t\t}\n\t\t\n\t\tif( !$langs )\n\t\t\treturn '';\n\t\t\t\n\t\t$locale = '';\n\t\tif( array_key_exists( $code , $langs ) ) {\n\t\t\t$locale = $langs[$code];\n\t\t}\n\t\t\t\n\t\treturn $locale;\n\t}", "private function fetch_translation( $language_code, $return_original_if_missing = false ) {\n\n\t\t// See https://wpml.org/wpml-hook/wpml_object_id/\n\t\t//\n\t\t// Notice that $return_original_if_missing is set to false by default, so we'll not get a result that's not\n\t\t// truly translated.\n\t\t//\n\t\t// P.S.: Can't use get_type() for the third argument because that requires having a\n\t\t// post instance and it could create an infinite recursion. Luckily, WPML interprets the 'any'\n\t\t// type as \"any post type\".\n\t\t$id = (int) apply_filters( 'wpml_object_id', $this->starting_post_id, 'any', $return_original_if_missing, $language_code );\n\n\t\treturn $id;\n\t}", "public function translate($message)\n {\n if (!isset($this->terms[$message])) {\n throw new Exception(\"The message code ({$message}) does not exist in session\");\n }\n return $this->terms[$message];\n }", "public function GetTranslator ();", "public function translate( $value );", "public static function translate($phrase, $default = ''){\n $class = 'SiteTranslation'.self::$lang;\n if (!class_exists($class)){\n if (file_exists(__DIR__.'/languages/'.self::$lang.'.php')) {\n include_once __DIR__.'/languages/'.self::$lang.'.php';\n } else {\n include_once __DIR__.'/languages/en.php';\n $class = 'SiteTranslationEn';\n }\n }\n \n return $class::translate($phrase, $default);\n }", "public static function getLanguageByCode($code)\n\t{\n\t\t$query = \"SELECT * FROM languages WHERE language_code = '$code'\";\n\t\t$dbh = SB_Factory::getDbh();\n\t\t$res = $dbh->Query($query);\n\t\tif( !$res )\n\t\t\treturn null;\n\t\treturn $dbh->FetchRow();\n\t}", "public function getLanguage($code)\n {\n $code = strtolower($code);\n $langs = $this->availableLanguages();\n if (isset($langs[$code])) {\n return $langs[$code];\n }\n return false;\n }", "function getLanguageIdByCode($code){\n $result = $this->db->query(\"SELECT `language_id` FROM `\" . DB_PREFIX . \"language` WHERE `code` LIKE '$code'\");\n $language_id = 0;\n if ($result->num_rows > 0) {\n foreach($result->rows as $row) {\n $language_id = $row['language_id'];\n }\n }\n return $language_id;\n }", "function getLanguageName($code)\n {\n $this->_prepareI18NLanguage();\n return $this->_ll->getName($code);\n }", "public function getLang()\n {\n $args = func_get_args();\n if (!isset($args[0])) {\n return false;\n }\n \n $word = __($args[0], $this->getLanguageDomain());\n if (!$word) {\n $word = $args[0];\n }\n \n $params = array_slice($args, 1);\n if ($params) {\n $word = vsprintf($word, $params);\n }\n \n return $word;\n }", "public function getReason($code)\n {\n $map = [\n 'БФ' => 'Без финансовых последствий для отправителя',\n 'ОО' => 'Отмена отправителем (груз не был передан курьеру)',\n 'ОН' => 'Отправитель недоступен',\n 'НВОП' => 'Не выполнена, опоздание к отправителю (груз не был передан курьеру)',\n 'ОКВ' => 'Отказ курьера от выполнения доставки',\n 'ООГ' => 'Отказ отправителя груз у курьера, будет создана обратная доставка',\n 'КГ' => 'Кража груза',\n 'УГ' => 'Груз утрачен/испорчен курьером',\n 'ОПГ' => 'Отмена получателем, груз у курьера, будет создана обратная доставка',\n 'ПН' => 'Получатель недоступен (груз был передан курьеру), будет создана обратная доставка',\n 'В' => 'Успешное выполнение заказа',\n 'И' => 'Истекла',\n 'ОКЛ' => 'Отменена клиентом',\n 'ОП' => 'Отмена получателем, груз не у курьера',\n 'ОМ' => 'Ошибка менеджера',\n 'ОС' => 'Ошибка системы',\n ];\n\n return array_key_exists($code, $map)\n ? $map[$code]\n : ('Unknown ' . $code);\n }", "public function get_translation( $name, $text ) {\n \n global $wpsl_settings;\n\n if ( defined( 'WPML_ST_VERSION' ) ) {\n $translation = $text;\n } elseif ( defined( 'POLYLANG_VERSION' ) && defined( 'PLL_INC' ) ) {\n\n if ( !function_exists( 'pll__' ) ) {\n require_once PLL_INC . '/api.php';\n }\n\n $translation = pll__( $text );\n } else {\n $translation = stripslashes( $wpsl_settings[$name] );\n }\n\n return $translation;\n }", "public static function translate($id) {\n\n\t\tglobal $config;\n\t\tglobal $translations;\n\n\t\t// If translations haven't been processed, get them\n\t\t// This ensures we only hit the filesystem once per pageload\n\t\tif (is_null($translations)) {\n\t\t\t$translations = self::get_translations();\n\t\t}\n\n\t\t// Find the array key for the requested phrase\n\t\t$key = array_search($id, $translations['ID']);\n\n\t\t// Return the translated id\n\t\treturn $translations[$config['language']][$key];\n\n\t}", "function _compile_lang($key) {\n\t\n\treturn $GLOBALS['_NG_LANGUAGE_']->getTranslation($key[1]);\n}", "function t($key, $lang = null, $returnKeyIfNot = true){\n return CHOQ_LanguageManager::getTranslation($key, $lang, $returnKeyIfNot);\n}", "function the_language_code($return = false) {\r\n\tglobal $post;\r\n\r\n\tif ($return) return $post->code;\r\n\telse echo $post->code;\r\n}", "function lang($text) {\n\t\t$langContent = HUS::load('langContent');\n\t\treturn $langContent[$text];\n\t}", "private function get_original_translation() {\n\t\t$translated_post_id = $this->fetch_translation(\n\t\t\t$this->wpml_service->get_default_language(),\n\t\t\ttrue\n\t\t);\n\n\t\t$post_language_details = apply_filters( 'wpml_post_language_details', null, $translated_post_id );\n\t\t$language_code = toolset_getarr( $post_language_details, 'language_code' );\n\n\t\t$translation = $this->element_factory->get_post_untranslated( $translated_post_id, $language_code );\n\n\t\t// Store it in cache only if we got a language code. At this point I don't trust anything.\n\t\tif ( is_string( $language_code ) && ! empty( $language_code ) ) {\n\t\t\t$this->translations[ $language_code ] = $translation;\n\t\t}\n\n\t\treturn $translation;\n\t}", "function getLanguageFullName ($languageCode) {\n $languageMap = array(\n \"en\" => \"English\",\n \"de\" => \"Deutsch\",\n \"es\" => \"Español\",\n \"it\" => \"Italiano\",\n \"gr\" => \"ελληνικά\"\n );\n\n // return code if no mapping is included above\n $languageName = $languageCode;\n if (array_key_exists($languageCode, $languageMap)) {\n $languageName = $languageMap[$languageCode];\n }\n return $languageName;\n}", "function get_template_by_code($code)\n\t{\n\t\tlog_message('debug', '_messenger/get_template_by_code');\n\t\tlog_message('debug', '_messenger/get_template_by_code:: [1] code='.$code);\n\t\t\n\t\t$cachedMessage = ENABLE_MESSAGE_CACHE? get_sys_message($code):'';\n\t\tlog_message('debug', '_messenger/get_template_by_code:: [2] cachedMessage='.$cachedMessage);\n\t\t\n\t\treturn (!empty($cachedMessage) && ENABLE_MESSAGE_CACHE)? $cachedMessage: $this->_query_reader->get_row_as_array('get_message_template', array('message_type'=>$code));\n\t}", "function getTranslation($original, $language, $variant = 0, $namespace = null);", "function getTranslate($data = null){\n \n // Define Default Language from Security to view\n @$data = $this->defTranslation($data);\n \n // Translate\n $data['edit'] = $this->Lang('update');\n $data['delete'] = $this->Lang('delete');\n $data['disactive'] = $this->Lang('disactive');\n $data['title'] = $this->Lang('unit');\n $data['name'] = $this->Lang('name');\n $data['list'] = $this->Lang('list');\n $data['create'] = $this->Lang('create');\n $data['desc'] = $this->Lang('desc');\n $data['code'] = $this->Lang('code');\n $data['c_total'] = $this->Lang('total');\n \n // Menu Active\n $data['ac_wards'] = 'active';\n \n return $data;\n }", "function getTranslation($text,$moduleName) {\n\t\t$languageCode = Common::getCurrentLanguageCode();\n\t\t$translationObject = MultilangTextPeer::getByTextAndModuleNameAndCode($text,$moduleName,$languageCode);\n\t\tif (empty($translationObject))\n\t\t\t$translation = $text;\n\t\telse\n\t\t\t$translation = $translationObject->getText();\n\t\treturn $translation;\n\t}", "function __( $text, $lang = CURRENT_LANGUAGE ) {\n return LANGUAGE[$text][$_SESSION['lang']];\n}", "public function translate($string)\r\n\t{\r\n\t\treturn $this->_lang[$string];\r\n\t}", "protected function translate($var) {\n return isset(static::$subs[$var]) ? static::$subs[$var] : $var;\n }", "private function get_translation( $string, $field_id ) {\n\t\t$wpml_interop = Types_Interop_Handler_Wpml::get_instance();\n\t\treturn $wpml_interop->get_translation( $string, $field_id, self::CONTEXT );\n\t}", "public function getByCode($code)\n {\n $languages = $this->getAll();\n return !empty($languages[$code]) ? $languages[$code] : false;\n }", "private function getLangCode() {\n\t\t$lang_code = new LangCodesDAO();\n\t\t$code_2_letters = $lang_code->GetLangCodeBy3LetterCode($_SESSION['lang']);\n\t\treturn $code_2_letters['code_2letters'];\n\t}", "public function getTranslation($what, $type = null, $locale = null)\n {\n if ($locale === null) {\n $locale = $this->_Locale;\n }\n\n switch (strtolower($type)) {\n case 'language' :\n $list = Zend_Locale_Data::getContent($locale, 'language', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'script' :\n $list = Zend_Locale_Data::getContent($locale, 'script', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'country' :\n $list = Zend_Locale_Data::getContent($locale, 'territory', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'territory' :\n $list = Zend_Locale_Data::getContent($locale, 'territory', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'calendar' :\n $list = Zend_Locale_Data::getContent($locale, 'type', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'month' :\n $list = Zend_Locale_Data::getContent($locale, 'month', array('gregorian', 'format', 'wide', $what));\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'month_short' :\n $list = Zend_Locale_Data::getContent($locale, 'month', array('gregorian', 'format', 'abbreviated', $what));\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'month_narrow' :\n $list = Zend_Locale_Data::getContent($locale, 'month', array('gregorian', 'stand-alone', 'narrow', $what));\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'day' :\n $list = Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'wide', $what));\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'day_short' :\n $list = Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'abbreviated', $what));\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'day_narrow' :\n $list = Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'stand-alone', 'narrow', $what));\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'dateformat' :\n $list = Zend_Locale_Data::getContent($locale, 'dateformat', array('gregorian', $what, 'narrow'));\n if (isset($list['pattern'])) {\n return $list['pattern'];\n }\n break;\n case 'timeformat' :\n $list = Zend_Locale_Data::getContent($locale, 'timeformat', array('gregorian', $what, 'narrow'));\n if (isset($list['pattern'])) {\n return $list['pattern'];\n }\n break;\n case 'timezone' :\n $list = Zend_Locale_Data::getContent($locale, 'timezone', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'currency' :\n $list = Zend_Locale_Data::getContent($locale, 'currencyname', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'currency_sign' :\n $list = Zend_Locale_Data::getContent($locale, 'currencysymbol', $what);\n if (isset($list[$what])) {\n return $list[$what];\n }\n break;\n case 'currency_detail' :\n $list = Zend_Locale_Data::getContent($locale, 'currencyforregion', $what);\n if (!empty($list)) {\n return $list;\n }\n break;\n case 'territory_detail' :\n $list = Zend_Locale_Data::getContent($locale, 'regionforterritory', $what);\n if (isset($list[$what])) {\n return explode(' ', $list[$what]);\n }\n break;\n case 'language_detail' :\n $list = Zend_Locale_Data::getContent($locale, 'territoryforlanguage', $what);\n if (isset($list[$what])) {\n return explode(' ', $list[$what]);\n }\n break;\n case 'characters' :\n $list = Zend_Locale_Data::getContent($locale, 'characters');\n return $list[0];\n break;\n default :\n return array('language', 'script', 'country', 'territory', 'calendar', 'month', 'month_short',\n 'month_narrow', 'day', 'day_short', 'day_narrow', 'dateformat', 'timeformat',\n 'timezone', 'currency', 'currency_sign', 'currency_detail', 'territory_detail',\n 'language_detail', 'characters');\n }\n return false;\n }", "function subLanguage($word){\n\t\t\tif($word == 'TH'){\n\t\t\t\t $language = 'Thai';\n\t\t\t}else if($word == 'EN'){\n\t\t\t\t$language = 'English';\n\t\t\t}else if($word == 'CN'){\n\t\t\t\t$language = 'Chinese';\n\t\t\t}else{\n\t\t\t\t$language = '-';\n\t\t\t }\n\t\t\t return $language;\n\t\t\n\t\t}", "public function translationKey();", "public static function getLanguageName( $code, $language = 'en' ) {\n\t\t$languages = TranslateUtils::getLanguageNames( $language );\n\n\t\tif ( isset( $languages[$code] ) ) {\n\t\t\treturn $languages[$code];\n\t\t} else {\n\t\t\treturn $code;\n\t\t}\n\t}", "abstract public function getTranslationIn(string $locale);", "function translate_with_context($text, $domain = 'default') {\n\t$whole = translate($text, $domain);\n\t$last_bar = strrpos($whole, '|');\n\tif ( false == $last_bar ) {\n\t\treturn $whole;\n\t} else {\n\t\treturn substr($whole, 0, $last_bar);\n\t}\n}", "public function gettext($p)\n {\n return rcube::get_instance()->gettext($p, $this->ID);\n }", "static function getTranslation ($key,$escape=true,$lang=null);", "function _gettext($msgid)\n{\n return ZGettext::getReader()->translate($msgid);\n}", "function findWord($word, $dict)\n{\n if (isset($dict[$word])) {\n return [\"english\", $dict[$word]];\n } else {\n $key = array_search($word, $dict);\n if ($key != false) {\n return [\"spanish\", $key];\n }\n }\n\n return null;\n}", "public function Translate($Code, $Default = FALSE) {\n// $Trace = debug_backtrace();\n// $LastIndex = NULL;\n// foreach ($Trace as $Index => $Item) {\n// if (in_array(strtolower($Item['function']), array('t', 'translate'))) {\n// $LastIndex = $Index;\n// continue;\n// } else {\n// break;\n// }\n// }\n// if (isset($Trace[$LastIndex])) {\n// $TraceItem = $Trace[$LastIndex];\n// }\n\n $Result = parent::Translate($Code, $Default);\n if ($Code)\n $this->_CapturedDefinitions[$Code] = $Result;\n\n return $Result;\n }", "public function translate($text)\n {\n return $text;\n }", "function language($language = null, $code = null){\n\n $lang = user()->language->name ?? session('language') ?? Language::first()['name'] ?? 'English';\n $lang_code = user()->language->short_form ?? session('short_form') ?? Language::first()['short_form'] ?? 'EN';\n \n if(is_null($language) && is_null($code))\n $response = $lang . ' (' . $lang_code . ')';\n else\n $response = $lang;\n\n return $response;\n }", "private function getMessageText($msg, $subst = [])\n {\n $message = $this->languageTexts[$msg];\n\n foreach ($subst as $ix => $sub) {\n $message = str_replace('&' . $ix, $sub, $message);\n }\n\n return $message;\n }", "public function getTranslator(): Translator;", "public static function _translate($const, $langId = null) {\n if (empty($const)) return $const;\n $const = strtoupper($const);\n if(is_null($langId)){\n $langId = intval(E()->getLanguage()->getCurrent());\n }\n $result = $const;\n\n //Мы еще не обращались за этим переводом\n if(!isset(self::$translationsCache[$langId][$const])){\n //Если что то пошло не так - нет смысл генерить ошибку, отдадим просто константу\n if(self::$findTranslationSQL->execute(array($const, $langId))){\n //записали в кеш\n if($result = self::$findTranslationSQL->fetchColumn()){\n self::$translationsCache[$langId][$const] = $result;\n }\n else {\n $result = $const;\n }\n }\n\n }\n //За переводом уже обращались Он есть\n elseif(self::$translationsCache[$langId][$const]){\n $result = self::$translationsCache[$langId][$const];\n }\n //Неявный случай - за переводом уже обращались но его нету\n //Отдаем константу\n\n return $result;\n }", "abstract public function translations();", "function __($id) { return Translator::translate($id); }", "public static function getTranslator()\n {\n }", "public function translate($code, $locale = null)\n {\n return str_replace(\n \"nikpay::{$this->bank}.\",\n '',\n trans(\"nikpay::{$this->bank}.$code\", [], $locale)\n );\n }", "function translateStatus($key, $code)\n {\n $statuses = config('statuses.' . $key);\n if ($statuses == null) {\n return '';\n }\n\n foreach ($statuses as $key => $value) {\n if ($value['code'] == $code) {\n return $value['text'];\n }\n }\n return '';\n }", "public function get()\n {\n $count = func_num_args();\n $args = func_get_args();\n\n $item = $args[0];\n if (strpos($item, 'translate:') === 0) { // Do we need to translate the message ?\n $item = substr($item, 10); // Grab the variable\n }\n if (isset($this->translateArray[$item])) {\n if ($count > 1) {\n unset($args[0]);\n return vsprintf($this->translateArray[$item], $args);\n }\n return $this->translateArray[$item];\n }\n $translateNotice = ($this->config['debug']) ? static::NOTICE : '';\n return $translateNotice . $item; // Let's notice the developers this line has no translate text\n }", "function translate_pattern_code($code) { \n\n\t$code_array = array('%A'=>'album',\n\t\t\t'%a'=>'artist',\n\t\t\t'%c'=>'comment',\n\t\t\t'%g'=>'genre',\n\t\t\t'%T'=>'track',\n\t\t\t'%t'=>'title',\n\t\t\t'%y'=>'year',\n\t\t\t'%o'=>'zz_other');\n\t\n\tif (isset($code_array[$code])) { \n\t\treturn $code_array[$code];\n\t}\n\t\n\n\treturn false;\n\t\n}", "function translate($phrase) {\r\n switch($phrase) {\r\n\tcase \"xdatestring\":\t\t$tmp = \"%A, %B %d @ %T %Z\"; break;\r\n\tcase \"linksdatestring\":\t$tmp = \"%Y年%m月%d日\"; break;\r\n\tcase \"xdatestring2\":\t\t$tmp = \"%A, %m月%d日\"; break;\r\n\tdefault: \t\t\t$tmp = \"$phrase\"; break;\r\n }\r\n return $tmp;\r\n}", "public function get_translation(){\r\n\t\t}", "function getName($code)\n{\n return Page::whereCode($code)->first()->pageText()->ofLang(App::getLocale())->first()->name;\n}", "public function translate($_text)\n {\n\n //Detect the language that the user is speaking\n $from = $this->detect_language($_text);\n \n $ch = curl_init();\n //echo \"parent to language code is \".parent::$to_language_code; \n // Set query data here with the URL\n $qry_str = \"?key=$this->appKey&q=$_text&source=$from&target=$this->to_language_code\";\n $url = self::TRANSLATE_URL . $qry_str;\n $url = str_replace(\" \",\"%20\",$url); // to properly format the url\n curl_setopt($ch, CURLOPT_URL, $url);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, '3');\n\n $json_response = curl_exec($ch);\n $json_obj = json_decode($json_response);\n $translated_text = $json_obj->data->translations[0]->translatedText;\n curl_close($ch);\n\n return $translated_text;\n \n \n }", "public function getCode($code) {\n return array_key_exists($code, $this->_codes) ? $this->_codes[$code] : 'Unknown error';\n }", "function s4w_get_post_language($post_id) {\n global $wpdb;\n if (function_exists('icl_get_languages')) {\n $query = sprintf(\"SELECT language_code, source_language_code FROM {$wpdb->prefix}icl_translations WHERE element_id='%d'\", $post_id);\n $language = $wpdb->get_results($query);\n $output = $language[0];\n }\n else {\n $output->language_code = 'en';\n }\n return $output;\n}", "function lang($phrase) {\n\n\tstatic $lang = array(\n\n\t\t// Navbar keys\n\t\t'Logo' \t\t=> 'Home',\n\t\t'cat' \t=> 'Categories',\n\t\t'item' \t=> 'Items',\n\t\t'member' \t=> 'Members',\n\t\t'comments' => 'Comments',\n\t\t'statistic' => 'Statistics',\n\t\t'log' \t=> 'Logs',\n\t\t'name' \t=> 'Eltaher',\n\n\t\t);\n\n\treturn $lang[$phrase];\n}", "public function translate($node)\n {\n return $this->getTranslate($node);\n }", "static public function translate($string)\r\n\t{\r\n\t\t$url = 'http://translate.yandex.net/api/v1/tr.json/translate?lang=ru-en&text=' . urlencode($string);\r\n\r\n\t\t$Core_Http = Core_Http::instance()\r\n\t\t\t->url($url)\r\n\t\t\t->timeout(3)\r\n\t\t\t->execute();\r\n\r\n\t\t$data = trim($Core_Http->getBody());\r\n\r\n\t\tif (strlen($data))\r\n\t\t{\r\n\t\t\t$oData = json_decode($data);\r\n\r\n\t\t\tif (is_object($oData) && $oData->code == 200 && isset($oData->text[0]))\r\n\t\t\t{\r\n\t\t\t\treturn $oData->text[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn NULL;\r\n\t}", "protected function findPrimaryLanguage(string $code): ?RestLanguage\n\t{\n\t\t$code = substr($code, 0, 2);\n\t\tforeach ($this->getLanguages() as $language) {\n\t\t\tif (($language->getIso2Code() == $code) && $language->getPrimaryOfGroup()) {\n\t\t\t\treturn $language;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function format_code_lang($code = '')\n{\n}", "public function getCountryByCode(string $code): string\n {\n $result = $this->makeRequest(self::GET_BY_CODE_COUNTRY . $code);\n return $result->toArray()['translations']['fr'];\n }", "public function translate($key)\n {\n $this->load($this->getCurrentLanguage());\n\n return array_get($this->translations, $key, $key);\n }", "public function getTranslate()\n {\n $language = Yii::$app->language;\n return $this->hasOne(LangCategory::class, ['category_id' => 'id'])->onCondition(['lang' => $language]);\n }" ]
[ "0.7179566", "0.6907574", "0.6645235", "0.66408044", "0.66391605", "0.6518", "0.64890146", "0.6452511", "0.6404422", "0.6402969", "0.63455844", "0.62614274", "0.6254002", "0.62362236", "0.6176131", "0.6155744", "0.6135554", "0.61124074", "0.6089931", "0.6031316", "0.6021483", "0.6003894", "0.59853774", "0.598361", "0.5959356", "0.5939358", "0.591641", "0.5881524", "0.5879311", "0.58759964", "0.5871776", "0.58350307", "0.5816033", "0.58148766", "0.5814693", "0.5805906", "0.57992303", "0.5794074", "0.5793888", "0.5743406", "0.5739234", "0.5737178", "0.5728681", "0.5705905", "0.57051915", "0.56983143", "0.5693054", "0.56793296", "0.56704986", "0.56690645", "0.56686574", "0.56626064", "0.56269526", "0.5624048", "0.5605094", "0.558811", "0.5586214", "0.55837625", "0.55756307", "0.5566836", "0.5565696", "0.55594134", "0.5553029", "0.55526894", "0.5547328", "0.55413264", "0.5533312", "0.5530586", "0.5527703", "0.5522938", "0.55186665", "0.5512274", "0.550982", "0.55053973", "0.550077", "0.5495756", "0.5495024", "0.5492597", "0.54920274", "0.5477394", "0.5474523", "0.5470529", "0.5470205", "0.5470077", "0.54655313", "0.54570484", "0.54534817", "0.54451615", "0.54404056", "0.54380894", "0.5437897", "0.54303575", "0.54261166", "0.5423372", "0.5410641", "0.54013747", "0.5397463", "0.5397083", "0.5394462", "0.53917664" ]
0.7128687
1
Returns an array of all form fields to add changelog support to a form.
Возвращает массив всех полей формы для добавления поддержки истории изменений в форму.
protected function getChangelogFormFields() { Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-metadata/jquery.metadata.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui-1.8rc3.custom.js'); Requirements::javascript(CHANGELOG_DIR . '/javascript/ChangelogForm.js'); Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/base/jquery.ui.all.css'); $fieldLogs = new TableField( 'FieldChangelogs', 'FieldChangelog', null, array( 'FieldName' => 'ReadonlyField', 'OriginalSummary' => 'DatalessField', 'ChangedSummary' => 'DatalessField', 'EditSummary' => 'TextField' ) ); $fieldLogs->setCustomSourceItems(new DataObjectSet()); $fieldLogs->setPermissions(array('show', 'edit')); $fieldLogs->showAddRow = false; $pastLogs = new ComplexTableField( $this->record, 'Changelogs', 'Changelog', null, null, sprintf( '"SubjectClass" = \'%s\' AND "SubjectID" = %d', $this->record->class, $this->record->ID ) ); $pastLogs->setPermissions(array('show')); return array( new HeaderField('ChangelogHeader', 'Changelog'), new TextField('EditSummary', 'Edit summary'), new ToggleCompositeField( 'FieldChangelogs', 'Field Changelogs', array($fieldLogs) ), new ToggleCompositeField( 'PastChangelogs', 'Past Changelogs', array($pastLogs) ), new LiteralField( 'ChangelogDialog', $this->record->renderWith('ChangelogDialog') ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_fields() {\n\t\treturn array();\n\t}", "public function getFormFields();", "public function getFormFields()\n {\n return $this->form_fields;\n }", "public function getFormFields()\n {\n return $this->formFields;\n }", "public function getFormFields(): array\n\t{\n\t\treturn static::$formFields;\n\t}", "function getFormFields() {\n return $this->formFields;\n }", "abstract public function getFormFields();", "public function get_form_fields() {\n\t\t$module = Module::load();\n\t\t$module_id = $this->module['id'];\n $pk_field = $this->module['pk_field'];\n\t\t$data = $module->get_data($module_id, false, false);\n\t\t$fields = $data['form_fields'];\n\t\t$ff= array();\n\t\n\t\tforeach ($fields as $field) {\n\t\t\t$ff[] = new Form_field($field);\n\t\t}\n\n if ( ! empty($this->module['use_archive']) ) {\n $cfg = array(\n 'name' => Model::MODEL_ARCHIVE_FIELD,\n 'label' => $this->App->lang('form.is_archive'),\n 'module' => $this->module_name,\n 'pk_field' => $pk_field,\n 'default' => '',\n 'field_type' => array(\n 'jqm_flipswitch' => array()\n )\n );\n $ff[] = new Form_field($cfg);\n }\n\n if ( ! empty($this->module['use_active']) ) {\n $cfg = array(\n 'name' => Model::MODEL_ACTIVE_FIELD,\n 'label' => $this->App->lang('form.is_active'),\n 'module' => $this->module_name,\n 'pk_field' => $pk_field,\n 'default' => '',\n 'field_type' => array(\n 'jqm_flipswitch' => array()\n )\n );\n $ff[] = new Form_field($cfg);\n }\n\t\t\n\t\treturn $ff;\n\t}", "public function get_form_fields()\n {\n }", "public function getFormFields() {\n\t\treturn $this->arrFormFields;\n\t}", "public function getFields()\n {\n $aFields = array();\n $aForm = $this->getForm();\n foreach ($aForm['form']['input'] as $aInput) {\n $aFields[] = $aInput['name'];\n }\n\n return $aFields;\n }", "public function getFormFields()\n {\n $cart = $this->getCart();\n\n $fields = [\n 'business' => $this->getConfigData('business_account'),\n 'invoice' => $cart->id,\n 'amount' => $cart->sub_total,\n 'tax' => $cart->tax_total,\n 'discount_amount' => $cart->discount,\n 'notification_url' => '',\n 'external_reference' => $cart->id\n ];\n\n $fields['back_urls']['success'] = route('mercadopago.success');\n $fields['back_urls']['failure'] = route('mercadopago.failure');\n $fields['back_urls']['pending'] = route('mercadopago.pending');\n\n\n $this->addLineItemsFields($fields);\n $this->addShipping($fields);\n $this->addPayer($fields);\n\n return $fields;\n }", "public function fields()\n {\n return $this->form->fields;\n }", "public function fields()\n {\n return [\n Select::make(__('Notification Level'), 'level')\n ->displayUsingLabels()\n ->sortable()\n ->default('info')\n ->options([\n 'info' => __('Notice'),\n 'success' => __('Attention'),\n 'error' => __('Alert'), \n ]),\n\n Text::make('Title', 'title')\n ->sortable()\n ->required()\n ->rules('required'), \n\n Text::make('Subtitle', 'subtitle')\n ->sortable()\n ->required()\n ->rules('required'), \n\n ];\n }", "protected function getFormFields()\n {\n return array(\n 'transactionID' => $this->transaction->getPublicTxnId(),\n 'returnURL' => $this->getReturnURL('transactionID')\n );\n }", "public function getFormFields() {\r\n\t\t$fieldList = parent::getFormFields();\r\n\t\t$fieldList->merge($this->getCreditCardFields());\r\n\r\n\t\treturn $fieldList;\r\n\t}", "function &getFormFields() {\n return $this->formFields;\n }", "public function getFormFields()\n {\n\n $modelInstance = $this->getModel();\n// $rules = collect($modelInstance->rules());\n\n\n $this->add('display_name', 'text')->add('name', 'text');\n\n if ($modelInstance->id) {\n $this->modify('name', 'text', [\n 'attr' => ['readonly' => true]\n ]);\n }\n $this->add('description', 'textarea');\n// $this->add('permission_group_id', 'text' );\n\n\n }", "public function formFields(){\n\t $fields = '';\n\n for($x=1;$x < $this->numFields();$x++){\n $field = $this->fieldName($x);\n\n\t\t if($x < $this->numFields()){\n $fields .= '<tr><td>'.ucFirst($field).'</td><td><input type=\"text\" name=\"'.$field.'\"></td><tr>'.\"\\n\";\n\t\t }\n\t }\n return $fields;\n }", "public function getChangedFields();", "public function fields()\n {\n return [\n Text::make('Info'),\n Select::make('Status')\n ->options([\n 'return' => '退回修改',\n 'cancel' => '取消采购',\n 'already' => '同意下单',\n ]),\n ];\n }", "public function getFormFields() {\r\n\t\t$fieldList = new FieldList();\r\n\r\n\t\t$fieldList->push(new NumericField('Amount', 'Amount', ''));\r\n\t\t$fieldList->push(new DropDownField('Currency', 'Select currency :', $this->gateway->getSupportedCurrencies()));\r\n\r\n\t\treturn $fieldList;\r\n\t}", "protected function getFieldChanges() : array {\n $changes = [];\n\n if($this->enableActivityLogging){\n // filter fields, where \"activity\" (changes) should be logged\n $fieldConf = array_filter($this->fieldConf, function($fieldConf, $key) {\n return isset($fieldConf['activity-log']) ? (bool)$fieldConf['activity-log'] : false;\n }, ARRAY_FILTER_USE_BOTH);\n\n if($fieldKeys = array_keys($fieldConf)){\n // model has fields where changes should be logged\n $schema = $this->getMapper()->schema();\n foreach($fieldKeys as $key){\n if($this->changed($key)){\n $changes[$key] = [\n 'old' => $schema[$key]['initial'],\n 'new' => $schema[$key]['value']\n ];\n }\n }\n }\n }\n\n return $changes;\n }", "public function fields() {\n\t\treturn array();\n\t}", "private function edit_get_fields( ) {\n $updates = array();\n\n // Captures the admin inputs\n $updates['id'] = $this->get_var( 'prompt_id', 0 );\n $updates['text'] = $this->get_var( 'text', '' );\n\n return( $updates );\n }", "function getFormViewFields(){\r\n\t\t$viewFields = [];\r\n\t\tif(is_array($this->fields)){\r\n\t\t\tforeach($this->fields as $field){\r\n\t\t\t\t$field->callIn();\r\n\t\t\t\t$viewFields[] = $field->getView();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $viewFields;\r\n\t}", "public function get_instance_form_fields()\n {\n return parent::get_instance_form_fields();\n }", "public function getFields()\n {\n $fieldList = [];\n\n $strName = 'tl_c4g_editor_project';\n\n $headlineField = new C4GHeadlineField();\n $headlineField->setTitle($GLOBALS['TL_LANG'][$strName]['headline']);\n $fieldList[] = $headlineField;\n\n $nameField = new C4GTextField();\n $nameField->setFieldName('caption')->setFormField()->setTitle($GLOBALS['TL_LANG'][$strName]['caption']);\n $nameField->setMandatory(true);\n $fieldList[] = $nameField;\n\n $descriptionField = new C4GTextareaField();\n $descriptionField->setFieldName('description')->setFormField()->setTitle($GLOBALS['TL_LANG'][$strName]['description']);\n $fieldList[] = $descriptionField;\n\n $groupidField = new C4GNumberField();\n $groupidField->setFieldName('groupid')->setHidden();\n $fieldList[] = $groupidField;\n\n $lastmemberField = new C4GNumberField();\n $lastmemberField->setFieldName('lastmemberid')->setHidden();\n $fieldList[] = $lastmemberField;\n\n $tstampField = new C4GNumberField();\n $tstampField->setFieldName('tstamp')->setHidden();\n $fieldList[] = $tstampField;\n\n return $fieldList;\n }", "public function fields() {\n return array();\n }", "public static function getFormFields() : array\n {\n return ArrayHelper::map(Skill::find()->all(), 'id', 'name');\n }", "public function fields()\n {\n return [\n //\n ];\n }", "protected function getFormFields()\n {\n \n\n $fields = array(\n\n 'total' => round($this->transaction->getValue(), 2),\n 'code' => $this->getCurrencyCode(),\n 'order_id' => $this->getOrder()->getOrderId(),\n 'txnId' => $this->transaction->getTransactionId()\n \n );\n\n return $fields;\n }", "public function get_instance_form_fields()\n {\n }", "public function get_instance_form_fields()\n {\n }", "public function getHistoryFields()\r\n {\r\n return ['firstname', 'lastname', 'username', 'email', 'enabled', 'password', 'roles'];\r\n }", "protected function fields(): array\n {\n return ['notes_wg'];\n }", "public function getFormFields() {\n\n $fields = $this->getAvailableFieldsWithPrefix();\n $fields['onpay_hmac_sha1'] = $this->generateSecret();\n return $fields;\n }", "protected function changedRevisionableFields()\n\t{\n\t\t$fields = array();\n\n\t\tforeach($this->dirty as $key => $value)\n\t\t{\n\t\t\tif($this->isRevisionable($key))\n\t\t\t{\n\t\t\t\t$fields[$key] = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// we don't need these any more, and they could\n\t\t\t\t// contain a lot of data, so lets trash them.\n\t\t\t\tunset($this->updatedData[$key]);\n\t\t\t\tunset($this->originalData[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "function getFields() {\n\n\t\t$aFieldTypes \t= $this->oField->getFieldTypes();\n\t\t$aFields \t\t= $this->oField->select()\n\t\t\t\t\t\t\t->columns('id, type_id, name, label')\n\t\t\t\t\t\t\t->from($this->oField->_name)\n\t\t\t\t\t\t\t->where(\"form_name = '\".$this->_formName.\"'\")\n\t\t\t\t\t\t\t->order('`order`')\n\t\t\t\t\t\t\t->getList();\n\n\t\t// Do the field type mapping\n\t\tforeach($aFields as $key => $aField) {\n\t\t\t$aFields[$key]['type'] = $aFieldTypes[$aField['type_id']]; // Set the field type\n\t\t\tforeach(array('type_id', 'id') as $unsetField) {\n\t\t\t\tunset($aFields[$key][$unsetField]);\n\t\t\t}\n\t\t\t$iFieldID = $aField['id'];\n\t\t\t// Get all the attributes and assign it to the\n\t\t\t$aFieldAttributes = $this->oField->getAttributes($iFieldID);\n\t\t\tforeach($aFieldAttributes as $attrkey => $attrval) {\n\t\t\t\t$aFields[$key][$attrkey] = $attrval;\n\t\t\t}\n\n\t\t}\n\t\t$this->_formFields = $aFields;\n\t}", "public function fieldsAction()\n\t{\n\t\treturn [];\n\t}", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields(): array\n {\n return $this->fields;\n }", "public function supported_plugins_fields() {\n\n\t\t// Get the supported plugins.\n\t\t$supported_plugins = $this->get_supported_plugins();\n\n\t\t// Setup logging options.\n\t\t$logging_options = array(\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'and log all messages', 'gravityforms' ),\n\t\t\t\t'value' => KLogger::DEBUG,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'and log only error messages', 'gravityforms' ),\n\t\t\t\t'value' => KLogger::ERROR,\n\t\t\t),\n\t\t);\n\n\t\t$plugin_fields = array();\n\t\t$nonce = wp_create_nonce( $this->_nonce_action );\n\n\t\t// Build the supported plugins fields array.\n\t\tforeach ( $supported_plugins as $plugin_slug => $plugin_name ) {\n\n\t\t\t$after_select = '';\n\n\t\t\tif ( $this->log_file_exists( $plugin_slug ) ) {\n\t\t\t\t$delete_url = add_query_arg( array( 'delete_log' => $plugin_slug, $this->_nonce_action => $nonce ), admin_url( 'admin.php?page=gf_settings&subview=gravityformslogging' ) );\n\n\t\t\t\t$after_select = '<br />';\n\t\t\t\t$after_select .= '<span style=\"font-size:85%\"><a href=\"' . esc_attr( $this->get_log_file_url( $plugin_slug ) ) . '\" target=\"_blank\">' . esc_html__( 'view log', 'gravityforms' ) . '</a>';\n\t\t\t\t$after_select .= '&nbsp;&nbsp;<a href=\"' . $delete_url . '\">' . esc_html__( 'delete log', 'gravityforms' ) . '</a>';\n\t\t\t\t$after_select .= '&nbsp;&nbsp;(' . $this->get_log_file_size( $plugin_slug ) . ')</span>';\n\t\t\t}\n\n\t\t\t$plugin_fields[] = array(\n\t\t\t\t'name' => $plugin_slug,\n\t\t\t\t'label' => $plugin_name . $after_select,\n\t\t\t\t'type' => 'checkbox_and_select',\n\t\t\t\t'checkbox' => array(\n\t\t\t\t\t'label' => esc_html__( 'Enable logging', 'gravityforms' ),\n\t\t\t\t\t'name' => $plugin_slug . '[enable]',\n\t\t\t\t),\n\t\t\t\t'select' => array(\n\t\t\t\t\t'name' => $plugin_slug . '[log_level]',\n\t\t\t\t\t'choices' => $logging_options,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$random = function_exists( 'random_bytes' ) ? random_bytes( 12 ) : wp_generate_password( 24, true, true );\n\t\t\t$plugin_fields[] = array(\n\t\t\t\t'name' => $plugin_slug . '[file_name]',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'default_value' => sha1( $plugin_slug . $random ),\n\t\t\t);\n\n\t\t}\n\n\t\treturn $plugin_fields;\n\n\t}", "public function getEditRoFields( )\n {\n\n return array\n (\n\n );\n\n }", "public function getFields(): array\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n ];\n }", "public function getChangedFields()\n\t{\n\t\treturn $this->changedfields;\n\t}", "public function getForm() {\n return array();\n }", "public function fields()\n {\n return [\n Text::make('Subject')->rules('required'),\n Trix::make('Announcement')->alwaysShow(),\n\n ];\n }", "public function fields() {\n return [];\n }", "public function getFields()\n {\n $hierarchy = [];\n foreach ($this->def->getTarget()->getFields() as $field) {\n $hierarchy = array_merge_recursive(\n $hierarchy,\n $this->createFieldHierarchyRecursive($field, $field->getName())\n );\n }\n\n $fields = [];\n\n /*******\n * CONDITIONAL GENERATED FIELD AREA\n *\n * so simplify things, you can put fields here that should be conditionally created by Graviton.\n * @TODO refactor into a FieldBuilder* type of thing where different builders can add fields conditionally.\n */\n\n // Versioning field, for version control.\n if ($this->def->getService() && $this->def->getService()->getVersioning()) {\n $definition = new Schema\\Field();\n $constraint = new Constraint();\n $constraint->setName('versioning');\n $definition->setName(VersionServiceConstraint::FIELD_NAME)->setTitle('Version')->setType('int')\n ->setConstraints([$constraint])\n ->setDescription('Document version. You need to send current version if you want to update.');\n $fields['version'] = $this->processSimpleField('version', $definition);\n }\n\n /*******\n * add fields as defined in the definition file.\n */\n\n foreach ($hierarchy as $name => $definition) {\n $fields[$name] = $this->processFieldHierarchyRecursive($name, $definition);\n }\n\n return $fields;\n }", "private function getFields()\n\t{\n\t\t$form = \\GFAPI::get_form($this->form_id);\n\t\tif ( !$form ) return $this->error(__('The form was not found.', 'gfpd'));\n\t\t$fields = $form['fields'];\n\t\tforeach ( $fields as $key => $field ){\n\t\t\t$this->fields[$key]['id'] = $field['id'];\n\t\t\t$this->fields[$key]['title'] = $field['label'];\n\t\t}\n\t}", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'url', 'isEnabled', 'channels',\n 'createdAt' => function () {\n return MongodbUtil::MongoDate2TimeStamp($this->createdAt);\n }\n ]\n );\n }", "public function getFields() : array\n {\n\n return $this->fields;\n }", "public function getFields() : array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getLeadFormSubmissionFields()\n {\n return $this->lead_form_submission_fields;\n }", "public function getForm() {\n return array ();\n }", "public function diff()\n\t{\n\t\t$changeLogRepository = ContainerFacade::getContainer()->get(\n\t\t\tChangeLogRepository::class\n\t\t);\n\t\t$diff = [];\n\t\tforeach ($this->fields as $field) {\n\t\t\tif ($field instanceof InputField) {\n\t\t\t\t$old = $field->getOrigValue();\n\t\t\t\t$new = $field->getValue();\n\t\t\t\tif ($old !== $new) {\n\t\t\t\t\t$prop = $field->getName();\n\t\t\t\t\t$diff[$prop] = $changeLogRepository->nieuw(\n\t\t\t\t\t\t$this->model,\n\t\t\t\t\t\t$prop,\n\t\t\t\t\t\t$old,\n\t\t\t\t\t\t$new\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $diff;\n\t}", "private function getFieldsView(): array\r\n {\r\n $data = [];\r\n $fields = $this->getModel()->getPqrFormFields();\r\n foreach ($fields as $PqrFormField) {\r\n $data[] = \"ft.$PqrFormField->name\";\r\n }\r\n return $data;\r\n }", "public function getFillableFields(): array;", "protected function getFields(): array {\n return $this->fields;\n }", "public function form() {\n\t\treturn array();\n\t}", "public function getFields(): array\n {\n return [\n 'xpub' => 'text',\n 'api_key' => 'text',\n 'guid' => 'text',\n 'password' => 'password',\n 'second_password' => 'password',\n //'address' => 'text',\n 'auto_min_fee_per_byte' => 'checkbox',\n 'min_fee_per_byte' => 'number',\n ];\n }", "protected function form_fields() {\n\t\t$form_fields = array(\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => 'title',\n\t\t\t\t'desc' => __( 'Title:', APP_TD )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'show_number',\n\t\t\t\t'desc' => __( 'Number to show:', APP_TD ),\n\t\t\t\t'extra' => array(\n\t\t\t\t\t'class' => 'widefat',\n\t\t\t\t\t'min' => 1,\n\t\t\t\t\t'step' => 1,\n\t\t\t\t),\n\t\t\t),\n\t\t\t/*array(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'scroll_number',\n\t\t\t\t'desc' => __( 'Number to scroll:', APP_TD ),\n\t\t\t\t'extra' => array(\n\t\t\t\t\t'class' => 'widefat',\n\t\t\t\t\t'min' => 1,\n\t\t\t\t\t'step' => 1,\n\t\t\t\t),\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'name' => 'center_mode',\n\t\t\t\t'desc' => __( 'Center Mode (best for odd numbered counts)', APP_TD ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'name' => 'fade',\n\t\t\t\t'desc' => __( 'Fade slides', APP_TD ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'name' => 'autoplay',\n\t\t\t\t'desc' => __( 'Autoplay', APP_TD ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'autoplay_speed',\n\t\t\t\t'desc' => __( 'Autoplay Speed in milliseconds:', APP_TD ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'name' => 'speed',\n\t\t\t\t'desc' => __( 'Slide/Fade animation speed:', APP_TD ),\n\t\t\t),\n\t\t);\n\n\t\treturn $form_fields;\n\t}", "public function getFieldsList(){\n return $this->_get(1);\n }", "public function fields(): array\n {\n return [\n self::input('title', '网站标题')->required(),\n\n self::input('link_to', '跳转地址')->required()->appendValidates([\n self::validateUrl()\n ]),\n\n self::image('网站图标', 'icon'),\n\n self::radio('is_show', '展示', BaseModel::ENABLE)->options(\n self::options()->add('是', BaseModel::ENABLE)\n ->add('否', BaseModel::DISABLE)->render()\n ),\n\n self::number('weight', '权重')->min(1)->max(10000)\n ];\n }", "public function getFields(): array\n {\n return $this->getOption('fields') ?? [];\n }", "protected function form()\n {\n return [];\n }", "public function plugin_settings_fields() {\n\n\t\t// Get supported plugin fields.\n\t\t$plugin_fields = $this->supported_plugins_fields();\n\n\t\t// Add save button to the plugin fields array.\n\t\t$plugin_fields[] = array(\n\t\t\t'type' => 'save',\n\t\t\t'messages' => array(\n\t\t\t\t'success' => esc_html__( 'Plugin logging settings have been updated.', 'gravityforms' ),\n\t\t\t),\n\t\t);\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'description' => $this->plugin_settings_description(),\n\t\t\t\t'fields' => $plugin_fields,\n\t\t\t),\n\t\t);\n\n\t}", "public function getFields()\t{ return array(); }", "public function getAvailableFields()\n {\n return array();\n }", "public function fields() : array;", "public function fields() : array;", "protected function getFormIntroductionFields()\n {\n return [\n (new Panel(__('Base page attributes'), $this->getBaseAttributeFields()))->withToolbar(),\n ];\n }", "public function getModelFields()\n {\n return [\n 'id' => (new LaradminField('ID'))\n ->setWidget(new TextWidget())\n ->setInput(new TextInput()),\n\n 'name' => (new LaradminField('Full name'))\n ->setWidget(new TextWidget())\n ->setInput(new TextInput()),\n\n 'email' => (new LaradminField('E-mail address'))\n ->setWidget(new EmailWidget())\n ->setInput(new TextInput()),\n ];\n }", "static function getFormFields($formId){\r\n //get all the fields of the form\r\n $fields = Form::getFields($formId);\r\n $main_fields = array();\r\n \r\n \r\n //loop through the fireds and populate the values\r\n for($i=0; $i<count($fields); $i++){\r\n //get the type of field class\r\n $cls = FHelpers::getFieldType($fields[$i][\"field_type\"], $fields[$i][\"field_category\"]);\r\n $fields[$i][\"data\"] = $cls->getValue($fields[$i][\"_field_value_id\"]);\r\n $main_fields[$fields[$i][\"field_name\"]] = $cls->getValue($fields[$i][\"_field_value_id\"]);\r\n }\r\n \r\n //return master array\r\n return $main_fields;\r\n }", "public function getFormElements()\n {\n return array(\n 'date' => array(\n 'type' => MceDialogAwareInterface::ELEMENT_TEXT,\n 'label' => 'Date',\n 'name' => 'date',\n 'value' => '',\n ),\n 'append' => array(\n 'type' => MceDialogAwareInterface::ELEMENT_TEXT,\n 'label' => 'append',\n 'name' => 'append',\n 'value' => ' years old',\n ),\n );\n }", "public function toggle_fields() {\n\t\treturn array();\n\t}", "public function getEditFields()\n {\n\n return array\n (\n 'my_user_profile' => array\n (\n 'name',\n 'id_person',\n 'id_mandant',\n 'rowid',\n 'm_time_created',\n 'm_role_create',\n 'm_time_changed',\n 'm_role_change',\n 'm_version',\n 'm_uuid',\n 'password',\n 'profile',\n 'level',\n 'description',\n ),\n 'embed_person' => array\n (\n 'firstname',\n 'lastname',\n 'academic_title',\n 'noblesse_title',\n 'rowid',\n 'm_time_created',\n 'm_role_create',\n 'm_time_changed',\n 'm_role_change',\n 'm_version',\n 'm_uuid',\n 'photo',\n ),\n\n );\n\n }", "public function fields(Request $request)\n {\n return [\n static::makeNotesField(),\n ];\n }", "public function get_fields();", "protected function fields()\n {\n return [\n 'ToUserName' => 'setServiceProvider',\n 'FromUserName' => 'setMessageTrigger',\n 'CreateTime' => 'setCreateTime',\n 'MsgType' => 'setMsgType',\n ];\n }", "public function getFields() {\n\t\t$this->initFields();\n\n\t\treturn $this->fields;\n\t}", "public function createFormFields()\n {\n return array(\n 'tab' => 'Invoice',\n 'fields' => array(\n array(\n 'name' => 'enabled',\n 'label' => $this->getTranslatedString('text_enable'),\n 'type' => 'onoff',\n 'doc' => $this->getTranslatedString('enable_heading_title_ratepayinvoice'),\n 'default' => 0,\n ),\n array(\n 'name' => 'title',\n 'label' => $this->getTranslatedString('config_title'),\n 'type' => 'text',\n 'default' => $this->getTranslatedString('heading_title_ratepayinvoice'),\n 'required' => true,\n ),\n array(\n 'name' => 'merchant_account_id',\n 'label' => $this->getTranslatedString('config_merchant_account_id'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getMerchantAccountId(),\n 'required' => true,\n ),\n array(\n 'name' => 'secret',\n 'label' => $this->getTranslatedString('config_merchant_secret'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getSecret(),\n 'required' => true,\n ),\n array(\n 'name' => 'base_url',\n 'label' => $this->getTranslatedString('config_base_url'),\n 'type' => 'text',\n 'doc' => $this->getTranslatedString('config_base_url_desc'),\n 'default' => $this->credentialsConfig->getBaseUrl(),\n 'required' => true,\n ),\n array(\n 'name' => 'http_user',\n 'label' => $this->getTranslatedString('config_http_user'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getHttpUser(),\n 'required' => true,\n ),\n array(\n 'name' => 'http_pass',\n 'label' => $this->getTranslatedString('config_http_password'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getHttpPassword(),\n 'required' => true,\n ),\n array(\n 'name' => 'payment_action',\n 'type' => 'hidden',\n 'default' => 'reserve',\n ),\n array(\n 'name' => 'billingshipping_same',\n 'label' => $this->getTranslatedString('config_billing_shipping'),\n 'type' => 'onoff',\n 'default' => 1\n ),\n array(\n 'name' => 'shipping_countries',\n 'label' => $this->getTranslatedString('config_shipping_countries'),\n 'type' => 'select',\n 'multiple' => true,\n 'size'=> 10,\n 'default' => array('AT', 'DE', 'CH'),\n 'options'=>'getCountries'\n ),\n array(\n 'name' => 'billing_countries',\n 'label' => $this->getTranslatedString('config_billing_countries'),\n 'type' => 'select',\n 'multiple'=>true,\n 'size'=> 10,\n 'default' => array('AT', 'DE', 'CH'),\n 'options'=>'getCountries'\n ),\n array(\n 'name' => 'allowed_currencies',\n 'label' => $this->getTranslatedString('config_allowed_currencies'),\n 'type' => 'select',\n 'multiple'=>true,\n 'size'=>10,\n 'default' => array('EUR'),\n 'options'=>'getCurrencies'\n ),\n array(\n 'name' => 'amount_min',\n 'label' => $this->getTranslatedString('config_basket_min'),\n 'type' => 'text',\n 'default' => 20,\n 'validator' => 'numeric'\n ),\n array(\n 'name' => 'amount_max',\n 'label' => $this->getTranslatedString('config_basket_max'),\n 'type' => 'text',\n 'default' => 3500,\n 'validator' => 'numeric'\n ),\n array(\n 'name' => 'shopping_basket',\n 'type' => 'hidden',\n 'default' => 1,\n ),\n array(\n 'name' => 'descriptor',\n 'label' => $this->getTranslatedString('config_descriptor'),\n 'type' => 'onoff',\n 'default' => 0,\n ),\n array(\n 'name' => 'send_additional',\n 'label' => $this->getTranslatedString('config_additional_info'),\n 'type' => 'onoff',\n 'default' => 1,\n ),\n array(\n 'name' => 'test_credentials',\n 'type' => 'linkbutton',\n 'required' => false,\n 'buttonText' => $this->getTranslatedString('test_config'),\n 'id' => 'invoiceConfig',\n 'method' => 'invoice',\n 'send' => array(\n 'WIRECARD_PAYMENT_GATEWAY_INVOICE_BASE_URL',\n 'WIRECARD_PAYMENT_GATEWAY_INVOICE_HTTP_USER',\n 'WIRECARD_PAYMENT_GATEWAY_INVOICE_HTTP_PASS'\n )\n )\n )\n );\n }", "public function fields(Request $request)\n {\n return [\n ID::make(__('ID'), 'id')->sortable(),\n Text::make(__('Current_version'), 'current_version'),\n Select::make(__('Platform'), 'platform')->options([\n 'ios' => 'ios',\n 'android' => 'android',\n 'web' => 'web',\n ]),\n Boolean::make(__('Current'), 'current'),\n Textarea::make(__('User_msg'), 'user_msg'),\n Textarea::make(__('About update'), 'about'),\n Select::make(__('Status'), 'status')->options([\n 'force_update' => 'force_update',\n 'stable_version' => 'stable_version',\n 'warning_update' => 'warning_update',\n ]),\n ];\n }", "public function FieldList()\n {\n return $this->_fieldList;\n }", "public function getFormFields()\n {\n //build URI\n $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/fields';\n\n //sign URI\n $signedURI = Utils::sign($strURI);\n\n //get response stream\n $responseStream = Utils::ProcessCommand($signedURI, 'GET', '');\n\n $json = json_decode($responseStream);\n\n return $json->Fields->List;\n }", "public function fields() {\n $f = [\n 'id' => 'id',\n 'isPublished' => 'is_published',\n 'blogId' => 'blog_id',\n 'title' => 'title',\n 'body' => function() { return $this->body_jvx; },\n ];\n\n return $f;\n }", "public function fields(): array;", "public function getSaveFields()\n {\n\n return array\n (\n 'wbfsys_my_issues' => array\n (\n 'title',\n 'id_type',\n 'id_category',\n 'id_status',\n 'id_severity',\n 'id_os',\n 'id_priority',\n 'id_browser',\n 'id_revision',\n 'id_finish_revision',\n 'flag_hidden',\n 'finish_till',\n 'id_responsible',\n 'progress',\n 'vid',\n 'description',\n 'error_message',\n 'id_vid_entity',\n 'm_version',\n ),\n\n );\n\n }", "private function get_form_fields(object $form, string $form_alias, array $data = []):array\n{\n\n // Get fields\n $fields = $form->get_fields($data);\n $field_names = array_keys($fields);\n\n // Send RPC message\n $msg = new event_message('core.forms.get_fields', $form, $form_alias, $data);\n $response = msg::dispatch($msg)->get_response();\n\n // Go through response\n foreach ($response as $pkg_alias => $vars) { \n if (!is_array($vars)) { continue; }\n if (!isset($vars['add'])) { continue; }\n if (!isset($vars['remove'])) { continue; }\n\n // Remove needed fields\n foreach ($vars['remove'] as $alias) { \n if (!isset($fields[$alias])) { continue; }\n unset($fields[$alias]);\n }\n\n // Add fields\n $current_position = 'bottom';\n foreach ($vars['add'] as $add) { \n if (!isset($add['name'])) { continue; }\n if (!isset($add['vars'])) { continue; }\n\n // Add field\n $position = $vars['position'] ?? $current_position;\n $fields[$add['name']] = $add['vars'];\n if ($position != 'bottom' && ($i = array_search($position, $field_names)) !== false) { \n array_splice($field_names, ($i + 1), 0, $add['name']);\n } else {\n $field_names[] = $add['name'];\n }\n $current_position = $add['name'];\n }\n }\n\n // Move submit button to bottom, if needed\n if (($x = array_search('submit', $field_names)) !== false) { \n array_splice($field_names, $x, 1);\n $field_names[] = 'submit';\n }\n\n // Finish new fields\n $new_fields = [];\n foreach ($field_names as $alias) { \n $new_fields[$alias] = $fields[$alias];\n }\n\n // Return\n return $new_fields;\n\n}", "function getFormElements()\n{\n $fields = array('email', 'password');\n \n return $fields;\n}" ]
[ "0.747895", "0.7470036", "0.72402996", "0.71540314", "0.71422845", "0.7124841", "0.712438", "0.7070278", "0.7064084", "0.70488554", "0.69544536", "0.68278193", "0.6811699", "0.6789714", "0.67896414", "0.67790365", "0.67544544", "0.6670298", "0.66472757", "0.6644289", "0.6635993", "0.66308373", "0.66175306", "0.6587288", "0.6568023", "0.6559469", "0.6535356", "0.6523762", "0.65153104", "0.6467775", "0.6443722", "0.6435423", "0.64346087", "0.64321345", "0.6413983", "0.6401702", "0.638448", "0.6379661", "0.6377888", "0.6374048", "0.63542575", "0.63542575", "0.63542575", "0.63542575", "0.63542575", "0.63542575", "0.6344232", "0.63388556", "0.63383025", "0.633705", "0.633665", "0.6328117", "0.6323142", "0.6308002", "0.6304775", "0.6297927", "0.62870884", "0.62845826", "0.6283287", "0.62796706", "0.62796706", "0.62796706", "0.62796706", "0.627777", "0.6275795", "0.6256592", "0.6254628", "0.6243078", "0.62395483", "0.62393737", "0.6215635", "0.62143743", "0.6210167", "0.620638", "0.6202322", "0.61986", "0.61972296", "0.6197177", "0.61883795", "0.6181857", "0.6181857", "0.6175911", "0.61688006", "0.6163464", "0.6162375", "0.6160989", "0.6145476", "0.6141168", "0.6136776", "0.61313176", "0.61255103", "0.61132073", "0.61088145", "0.6108071", "0.61054635", "0.6092712", "0.6091559", "0.60910887", "0.6085423", "0.6082002" ]
0.7860163
0
/ SELECT COUNT( assess_status ) FROM `view_house` WHERE `assess_status` = '1' AND `year` = '105' AND `school` = 'NFU'
SELECT COUNT( assess_status ) FROM `view_house` WHERE `assess_status` = '1' AND `year` = '105' AND `school` = 'NFU'
public function getStatistics($status){ $year = $_SESSION['years_assesstable'] ; $sitename = $_SESSION['sitename'] ; $this->db->select("assess_status"); if ($status == 0){ $this->db->where(Array("school"=> $sitename ,"year"=>$year,"assess_status"=>0)); $nonpass = $this->db->count_all_results('view_house'); return $nonpass; }else if ($status == 1){ $this->db->where(Array("school"=> $sitename ,"year"=>$year,"assess_status"=>1)); $pass = $this->db->count_all_results('view_house'); return $pass; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_students_count($filter){\n\n \n $str_query=\"select count(*) as no_rec \n from view_sponsored_student_detail v \n left join scholarship_package sp on v.`sponsored_student_id`=sp.`sponsored_student_sponsored_student_id` \n where $filter \";\n \n if(!$this->sql_query($str_query)){\n return false;\n }\n \n $row=$this->fetch();\n if($row==false){\n return 0;\n }\n return $row['no_rec'];\n }", "function count_res_adm($datea, $dateb, $r_id){\n\t$sql = \"SELECT COUNT(IF(dispo = 'Admitted', 1, NULL)) AS admitted, COUNT(IF(dispo = 'Discharged', 1, NULL)) AS discharged, COUNT(IF(dispo = 'Mortality', 1, NULL)) as mortality, COUNT(IF(dispo = 'HAMA', 1, NULL)) as hama, COUNT(IF(dispo = 'TOS', 1, NULL)) as tos, COUNT(IF(dispo = 'Absconded', 1, NULL)) as absconded, COUNT(IF(dispo = 'Admitted to Wards', 1, NULL)) as award FROM micu_census WHERE (r_id = ? OR sr_id = ?) AND (date_in >= ? AND date_in <= ?)\";\n\t$query = $this->db->query($sql, array($r_id, $r_id, $datea, $dateb));\n\treturn $query->result();\n}", "function au_students($au_id)\n{\n\t$ay_id = $_POST['ay_id'];\t\t\t\t\t\t\t\t\t\t\t// get academic_year_id\n\t\n\tif($au_id) \n\t{\n\t\t$query = \"\n\t\t\tSELECT COUNT(sau.student_id) AS 'Students' \n\t\t\tFROM StudentAssessmentUnit sau\n\t\t\tINNER JOIN StudentDegreeProgramme sdp ON sdp.student_id = sau.student_id AND sdp.academic_year_id = sau.academic_year_id AND sdp.status = 'ENROLLED'\n\t\t\tWHERE sau.academic_year_id = $ay_id \n\t\t\tAND sau.assessment_unit_id = $au_id\n\t\t\";\n\t\t$result = get_data($query);\n\t\treturn $result[0]['Students'];\n\t} else return FALSE;\n}", "function get_all_employees_count($school_id)\n {\n $this->db->where('school_id',$school_id);\n $query=$this->db->get('map_school_employee')->num_rows();\n return $query;\n }", "function count_apprvd_stat($req_id){\n\t\t$conn = $GLOBALS['conn'];\n\t\t$sql = \"SELECT count(id) as approno \n\t\tFROM fs_request_task_status \n\t\tWHERE rq_no='$req_id' and rq_status in ('Approved','Confirmed')\";\n\t\t$query = $conn->query($sql);\n\t\t$row = $query->fetch_assoc();\t\t\n\t\t$CountNo = $row['approno'];\n\t\treturn $CountNo;\n\t\t$conn->close();\n\t\t//return $genCode;\n}", "function getCollegeCount($semester, $course, $year_level, $status, $school_year){\n $this->db = $this->eskwela->db($school_year==NULL?$this->session->school_year:$school_year);\n $this->db->join('c_courses','profile_students_c_admission.course_id = c_courses.course_id', 'INNER');\n $this->db->join('profile','profile_students_c_admission.user_id = profile.user_id', 'INNER');\n $this->db->where('semester', $semester);\n ($course != 'NULL' && $course != NULL) ? $this->db->where('c_courses.course_id', $course) : '';\n ($year_level != 'NULL' && $year_level != NULL) ? $this->db->where('year_level', $year_level) : '';\n $this->db->wherE('status', $status);\n $this->db->order_by('date_admitted','ASC');\n $q = $this->db->get('profile_students_c_admission');\n// echo $this->db->last_query();\n return $q;\n }", "function countStudents(){\n $query =\"SELECT COUNT(*) as count FROM `student`\";\n $params = [];\n return DataBase::getInstance()->getOneRow($query,$params);\n }", "function company_giveoutroom(){\n\t $d=$con->query(\"SELECT COUNT(subject) as all FROM subject where subject.department='$dept' and subject.year1='$level' and subject.year2='$semester' GROUP BY subject.db1 \") or die(mysqli_error($con));\nwhile($df=$d->fetch_assoc()){\n\t$df['all'];\n\t\n}\n\n\n}", "function getCountNewBookingAll($status)\n\t{\n\t\t$sql = \"SELECT COUNT(*) AS allbook FROM booking \";\n\t\t$sql .= \"WHERE booking.book_status = '\".$status.\"' \";\n\t\t$sql .= \"AND user_view = '0' \";\n\t\t$query = mysql_query($sql) or die(\"SQL : \".$sql.\"<br>ERROR : \". mysql_error()); \n\t\t$result = mysql_fetch_array($query);\n\t\treturn $result[\"allbook\"]; // COUNT ALL ROW IN DATABASE\n\t}", "function count_all_today_events_forGrade()\r\n\t{\r\n\t\t$query = $this->db->get('agenda_details');\r\n\t\treturn $query->num_rows();\r\n\t}", "function countAccredited(){\n \n //$this->category_id = 19;\n\n // select all query\n $query = \"SELECT\n COUNT(number) AS accreditedvoters\n FROM\n voters\n WHERE\n status = 'ACCREDITTED'\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n \n }", "function countNotAccredited(){\n \n //$this->category_id = 19;\n\n // select all query\n $query = \"SELECT\n COUNT(number) AS notaccreditedvoters\n FROM\n voters\n WHERE\n status = 'NOT ACCREDITTED'\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n \n }", "public function countAdmit($year,$current_year) {\n $query_sql = \"SELECT\n COUNT(DISTINCT q1.visit_hn) AS hn\n ,COUNT(DISTINCT q1.visit_vn) AS visit\n ,SUM(CASE WHEN (q1.f_visit_ipd_discharge_type_id = '1' OR q1.f_visit_ipd_discharge_status_id IN('1','2'))\n THEN (CASE WHEN CAST(to_char(to_timestamp(q1.dc, 'YYYY-MM-DD HH24:MI:SS')-to_timestamp(q1.admit, 'YYYY-MM-DD HH24:MI:SS'),'HH24') AS INT) > 4\n THEN CAST(to_char(to_timestamp(q1.dc, 'YYYY-MM-DD HH24:MI:SS')-to_timestamp(q1.admit, 'YYYY-MM-DD HH24:MI:SS'),'DD') AS INT)+1\n\t\t\t\t\tELSE CAST(to_char(to_timestamp(q1.dc, 'YYYY-MM-DD HH24:MI:SS')-to_timestamp(q1.admit, 'YYYY-MM-DD HH24:MI:SS'),'DD') AS INT)\n\t\t\t\t\tEND )\n\t\t\tELSE CAST(to_char(to_timestamp(q1.dc, 'YYYY-MM-DD HH24:MI:SS')-to_timestamp(q1.admit, 'YYYY-MM-DD HH24:MI:SS'),'DD') AS INT)+1\n\t\t\tEND) AS admitday\n FROM\n (\n SELECT\n t_visit.visit_hn\n ,t_visit.visit_vn\n ,substr(t_visit.visit_begin_admit_date_time,1,10)||' '||substr(t_visit.visit_begin_admit_date_time,12,8) AS admit\n ,substr(t_visit.visit_ipd_discharge_date_time,1,10)||' '||substr(t_visit.visit_ipd_discharge_date_time,12,8) AS dc\n ,t_visit.f_visit_ipd_discharge_status_id\n ,t_visit.f_visit_ipd_discharge_type_id\n FROM\n t_visit\n LEFT JOIN t_patient ON t_visit.t_patient_id = t_patient.t_patient_id \n WHERE\n f_visit_type_id = '1'\n AND f_visit_status_id = '3'\n AND substr(visit_financial_discharge_time,1,10) BETWEEN substr('\".$year.\"'-10-01',1,10) AND substr('\".$current_year.\"'-09-30',1,10)\n ) q1\";\n\n $rawdata = Yii::$app->db_pg->createCommand($query_sql)->queryAll();\n return $rawdata;\n }", "function get_discussion_area_response_count($discussion_release_id,$conn){\r\n \t$query = \"SELECT count(*) as my_count from sns_course_discussion_response where discussion_release_id=$discussion_release_id\";\r\n\t$sel_result = $conn->query($query);\r\n\t$row = $sel_result->fetch_object();\r\n\treturn $row->my_count;\r\n }", "function getCountNewBooking($hotel_sec, $status)\n\t{\n\t\t$sql = \"SELECT COUNT(*) AS allbook FROM booking \";\n\t\t$sql .= \"WHERE booking.hotel_sec = '\".$hotel_sec.\"' \";\n\t\t$sql .= \"AND book_status = '\".$status.\"' \";\n\t\t$sql .= \"AND user_view = '0' \";\n\t\t$query = mysql_query($sql) or die(\"SQL : \".$sql.\"<br>ERROR : \". mysql_error()); \n\t\t$result = mysql_fetch_array($query);\n\t\treturn $result[\"allbook\"]; // COUNT ALL ROW IN DATABASE\n\t}", "function count_visit_details_by_occupation($Occupation)\n {\n $getResults = array();\n $getResults = $this->get_visit_details_by_occupation($Occupation);\n $countResults = count($getResults);\n $getResults['count'] = $countResults;\n return $getResults;\n }", "function user_wise_num_checkouts($connect, $user_id){\n\t$query = \"\n\tSELECT count(equipment_checkout.empl_id) as 'checks'\n\tFROM equipment_checkout\n\tWHERE empl_id = '\".$user_id.\"'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$count = 0;\n\t$result = $statement->fetchAll();\n\tif(isset($result)){\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$count = $row['checks'];\n\t\t}\n\t}\n\t// return $count;\n\treturn $count;\n}", "function getCounthadir() {\n $this->db->select('pakej');\n $this->db->from('cust_data');\n $this->db->where('pakej = \"bronze\" and status=\"active\"');\n $result = $this->db->count_all_results();\n echo $result;\n }", "function get_discussion_area_release_count($discussion_area_id,$conn){\r\n\t$query = \"SELECT count(*) as my_count from sns_course_discussion_release where discussion_area_id = $discussion_area_id\";\r\n\t$sel_result = $conn->query($query);\r\n\t$row = $sel_result->fetch_object();\r\n\treturn $row->my_count;\r\n }", "public function countScoresShotThisAcademicYear()\n {\n $academicYear = $this->calculateAcademicYearDates(Carbon::now());\n\n return \\DB::table('scores')\n ->whereBetween('shot_at', $academicYear)\n ->count();\n }", "function count_area($arr) {\r\n $whereCond = \"\";\r\n if (!empty($arr)) {\r\n if (!empty($arr['search_by_regional'])) {\r\n $whereCond .= \" and upper(regional_name) like upper('%\" . $arr['search_by_regional'] . \"%')\";\r\n }\r\n if (!empty($arr['search_by_status'])) {\r\n $whereCond .= \" and upper(area_status) =upper('\" . $arr['search_by_status'] . \"')\";\r\n }\r\n if (!empty($arr['search_by_type'])) {\r\n $whereCond .= \" and upper(isdomestic) =upper('\" . $arr['search_by_type'] . \"')\";\r\n }\r\n }\r\n\r\n $sql = \" SELECT COUNT (*) cnt\r\n FROM (SELECT area_status, area_desc, regional_address, area_id, area_name,\r\n regional_name, isdomestic, ismessenger\r\n FROM (SELECT area_status, area_desc, regional_address, area_id,\r\n area_name, regional_name, isdomestic, ismessenger\r\n FROM fm_mst_area \r\n where 1=1 $whereCond\r\n ORDER BY area_id DESC))\";\r\n $result = $this->db->query($sql)->row();\r\n return $result->CNT;\r\n }", "private function getStudentPublications() {\n global $db;\n $sql = $this->sqlHeader . \"WHERE caqc_flags & 128 AND \" . $this->whereClause;\n $result = $db->getRow($sql);\n return $result['COUNT(*)'];\n }", "function CountStudents()\n {\n// $this->db->cache_on();\n $this->db->select('count(student_id) as tot');\n $this->db->where('status', 1);\n $query = $this->db->get('tbl_student');\n return $query->row();\n }", "function count_employee_active($connect)\n{\n\t$query = \"\n\tSELECT * \n\tFROM user_details \n\tWHERE user_type = 'user' \n\tAND user_status = 'active'\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\treturn $statement->rowCount();\n}", "function count_active_site($connect){\n\t$query = \"\n\tSELECT site_status \n\tFROM sites\n\tWHERE site_status = 'active'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$result = $statement->fetchAll();\n\t$count=0;\n\tforeach($result as $row)\n\t{\n\t\t\t$count++;\n\t}\n\treturn $count;\n}", "function count_all_records_approved(){\n return mysqli_num_rows(query('SELECT * FROM orders WHERE order_status = \"Approved\"' ));\n}", "public function ussd_count(){\n\n $this->db->select('COUNT(*) as total');\n\n $this->db->from('ussdtransaction');\n\n $this->db->where('RecordDate >=', '2019-01-01 00:00:00');//from\n\n $this->db->where('RecordDate <=', '2019-03-26 00:00:00');//to\n \n $array = array('districtid IS NOT NULL'=>NULL,'regionid IS NOT NULL'=>NULL,'Level6 IS NOT NULL'=>NULL,\n 'subregionid IS NOT NULL'=>NULL,'Level0 IS NOT NULL'=>NULL,'Level7 IS NOT NULL'=>NULL,);\n \n $this->db->where($array);\n \n return $this->db->count_all_results(); \n \n }", "function get_number_of_users()\r\n{\r\n\t$curso = $_SESSION['curso']; \r\n\t$user_table = Database :: get_main_table(TABLE_MAIN_USER);\r\n\t$course_table = Database :: get_main_table(TABLE_MAIN_COURSE_USER_FD);\r\n\t\t\t\r\n\t$sql=\"SELECT count(u.user_id) as num_alumnos FROM \".$course_table .\" c, \".$user_table.\" u\r\n WHERE c.user_id = u.user_id and u.status = 5 and c.course_code = '\".$curso.\"'\";\r\n\t\r\n\t$res = api_sql_query($sql, __FILE__, __LINE__);\r\n\t$alumno = Database::fetch_array($res);\r\n\treturn $alumno['num_alumnos'];\r\n}", "function count_inactive_site($connect){\n\t$query = \"\n\tSELECT site_status \n\tFROM sites\n\tWHERE site_status = 'inactive'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$result = $statement->fetchAll();\n\t$count=0;\n\tforeach($result as $row)\n\t{\n\t\t\t$count++;\n\t}\n\treturn $count;\n}", "function active_homeworks_count($program='')\n\t{\n\t\t$sql \t\t= \"select distinct c.session_id, c.program_id, c.title, a.start_date, a.end_date, b.grader_id, d.user_id, d.status from prj_program a, prj_programs_users b, prj_session c, prj_homeworks d where a.program_id = b.program_id and b.session_id = c.session_id and c.session_id = d.session_id and d.grader_id = '\".$this->session->userdata('user_id').\"' and d.status != 'Completed'\";\n\t\t$result \t= $this->adodb->Execute($sql);\n\t\treturn $result;\n\t}", "public function get_total_policy_count_last_year(){\n $agent_result_set=$this->read_selective_agent(\"WHERE branch_manager_id=\".$_SESSION['id']);\n //generating the agent id constraint\n if($agent_result_set){\n $constraint_id=\" AND (\";\n while($agent_result=$agent_result_set->fetch_assoc()){\n $constraint_id=$constraint_id.\" agent_id=\".$agent_result['id'].\" OR\";\n }\n $constraint_id=substr($constraint_id,0,-2);\n $constraint_id=$constraint_id.\")\";\n }else{\n $constraint_id=\" AND FALSE\";\n }\n\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=($year-1).'-01-01';\n $date2=$year.'-01-01';\n $policy_result_set=$crud->select_custom(\"SELECT count(*) AS counts FROM policy WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\".$constraint_id);\n return $policy_result_set->fetch_assoc()['counts'];\n }", "public function countTotalActive()\n\t{\n\t\t$sql = \"SELECT * FROM students where status='active'\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->num_rows();\n\t}", "function count_all()\n\t{\n\t\t$this->db->from($this->table_name);\n\t\t$this->db->where('status',1);\n\t\treturn $this->db->count_all_results();\n\t}", "public function healthInfoCount(){\n $query = $this->db->where_in('active',array(1,2));\n if($this->getSearchData() != ''){\n $idz = array();\n $res1= $this->db->select(\"id\")\n ->like('LOWER(a.countryname)',$this->getSearchData(),'both')\n ->get('tbl_travel_countrylist a')->result_array(); \n foreach($res1 as $key=>$val){ array_push($idz, $val['id']); } \n \n $this->db->where_in('cid', $idz);\n } \n \n $count = $this->db->get('tbl_push_healthinfo')->num_rows(); \n return $count;\n }", "function count_all()\r\n\t{\r\n\t\t$query = $this->db->get('grade');\r\n\t\treturn $query->num_rows();\r\n\t}", "function get_discussion_area_count($course_id,$conn){\r\n\t$query = \"SELECT count(*) as my_count from sns_course_discussion \r\n\t\t\t\t\t\t\tWHERE course_id=$course_id\";\r\n\t$sel_result = $conn->query($query);\r\n\t$row = $sel_result->fetch_object();\r\n\treturn $row->my_count;\r\n }", "function getRequestCount($db){\n $hostel_name = substr($_SESSION['username'], -1);\n $query_request_count = \"Select count(*) from cleanrequest cr inner join student s on cr.rollnumber=s.rollnumber where s.hostel='$hostel_name'\";\n $result_request_count = mysqli_query($db, $query_request_count);\n if (mysqli_num_rows($result_request_count) == 1) {\n $countRow = mysqli_fetch_assoc($result_request_count);\n }\n return $countRow;\n }", "function count_equipment_total($connect){\n\t$query = \"\n\tSELECT * \n\tFROM equipment \n\tWHERE equip_status = 'active'\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\treturn $statement->rowCount();\n}", "function count_courier($arr) {\r\n $whereCond = \"\";\r\n if (!empty($arr)) {\r\n if (!empty($arr['search_by_courier'])) {\r\n $whereCond .= \" and upper(a.courier_name) like upper('%\" . $arr['search_by_courier'] . \"%')\";\r\n }\r\n if (!empty($arr['search_by_area'])) {\r\n $whereCond .= \" and upper(c.area_name) like upper('%\" . $arr['search_by_area'] . \"%')\";\r\n }\r\n if (!empty($arr['search_by_regional'])) {\r\n $whereCond .= \" and upper(c.regional_name) like upper('%\" . $arr['search_by_regional'] . \"%')\";\r\n }\r\n if (!empty($arr['search_by_status'])) {\r\n $whereCond .= \" and upper(b.price_status) =upper('\" . $arr['search_by_status'] . \"')\";\r\n }\r\n }\r\n\r\n $sql = \" SELECT COUNT (*) cnt\r\n FROM (SELECT price_id\r\n FROM (SELECT b.price_id\r\n FROM fm_mst_courier a, fm_courier_price b, fm_mst_area c\r\n WHERE a.courier_id = b.courier_id AND c.area_id = b.area_id $whereCond\r\n ORDER BY a.courier_name ASC))\";\r\n $result = $this->db->query($sql)->row();\r\n return $result->CNT;\r\n }", "function unapproved_users_count()\n{\n global $db;\n $row_cnt = 0;\n\n $sql = \"SELECT * \";\n $sql .= \" FROM users u, user_groups g \";\n $sql .= \" WHERE g.group_level=u.user_level AND u.status = '0' ORDER BY u.name ASC\";\n\n if ($result = $db->run_query($sql)) {\n $row_cnt = $db->num_rows($result);\n }\n\n return $row_cnt;\n}", "function getAllCount() {\n\t\t\treturn $this->db->get('hospital')->num_rows();\n\t\t}", "function getCountBookingAll($hotel_sec)\n\t{\n\t\t$sql = \"SELECT COUNT(*) AS allbook FROM booking \";\n\t\t$sql .= \"WHERE booking.hotel_sec = '\".$hotel_sec.\"' \";\n\t\t$sql .= \"AND book_status = '\".$book_status.\"' \";\n\t\t$query = mysql_query($sql) or die(\"SQL : \".$sql.\"<br>ERROR : \". mysql_error()); \n\t\t$result = mysql_fetch_array($query);\n\t\treturn $result[\"allbook\"]; // COUNT ALL ROW IN DATABASE\n\t}", "function criterio_evaluado($id_criterio) {\r\n $con = new Conexion();\r\n $c = $con->getConection();\r\n\r\n $consulta_cantidad_conseguida = pg_query($c, \"select count(*) from evaluacion_final where detalle_criterio_criterio_id_criterio = $id_criterio;\");\r\n $f = pg_fetch_object($consulta_cantidad_conseguida);\r\n $cant = $f->count;\r\n if ($cant > 0) {\r\n return TRUE;\r\n } else {\r\n return FALSE;\r\n }\r\n //select count(*) from evaluacion_final where detalle_criterio_criterio_id_criterio = 1\r\n}", "function user_wise_num_checkins($connect, $user_id){\n\t$query = \"\n\tSELECT count(equipment_checkout.empl_id) as 'checks'\n\tFROM equipment_checkout\n\tWHERE empl_id = '\".$user_id.\"' AND returned = 'true'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$count = 0;\n\t$result = $statement->fetchAll();\n\tif(isset($result)){\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$count = $row['checks'];\n\t\t}\n\t}\n\t// return $count;\n\treturn $count;\n}", "function tp_count($x){\n global $conn;\n $sql=\"SELECT COUNT(*) total FROM `db_lostandfound`.`$x` WHERE `draft`=0 \";\n\n $retval = mysqli_query($conn, $sql);\n $row = mysqli_fetch_array($retval);\n return $row['total'];\n\n}", "function count_qualification($link)\n{\n\t$sql='select * from qualification where staff_id=\\''.$_SESSION['login'].'\\'';\n\tif(!$result=mysqli_query($link,$sql)){return 0;}\n\treturn mysqli_num_rows($result);\n}", "function piedata(){\n $this->db->select('status,count(status) as total');\n $this->db->from('smf');\n $this->db->group_by('status');\n $this->db->having('count(\n case \n when status=\"SDN BHD\" then \"SDN BHD\"\n when status=\"ENTERPRISE\" then \"ENTERPRISE\"\n when status=\"NGO\" then \"NGO\"\n when status=\"PLT\" then \"PLT\"\n when status=\"BELUM DAFTAR\" then \"BELUM DAFTAR\" else null end)>0');\n return $this->db->get()->result();\n }", "private function get_count($status)\n {\n }", "function checkouts_by_site_names_count($connect){\n\t$output = '';\n\t$query = \"\n\tSELECT sites.site_name as 'site', count(equipment_checkout.site_id) as 'checks'\n\tFROM sites INNER JOIN equipment_checkout ON sites.site_id = equipment_checkout.site_id\n\tWHERE sites.site_status = 'active'\n\tGROUP BY sites.site_id\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t// return count;\n\treturn $statement->rowCount();\n}", "public function getStudentTotal(){\n\n $db = \\Config\\Database::connect();\n\n $str = 'SELECT COUNT(*) FROM guests WHERE status = \"a\" AND user_type = \"s\" AND status = \"a\"';\n\n $query = $db->query($str);\n\n return $query->getResultArray();\n }", "function count_all()\r\n\t{\r\n\t\t$query = $this->db->get('agenda_details');\r\n\t\treturn $query->num_rows();\r\n\t}", "function total_attendence($staff_id, $course_id, $session){\r\n\tglobal $link;\r\n $sql = \"SELECT * FROM attend_dates WHERE staff_id = '$staff_id' AND course_id = '$course_id' AND session = '$session'\";\r\n $query = mysqli_query($link, $sql);\r\n $num_rows = mysqli_num_rows($query);\r\n\treturn $num_rows;\r\n\r\n}", "public function get_agency_count(){\n $result=0;\n \n $result = $this->db->get('agency');\n \n return $result->num_rows();\n \n }", "public function count_course_list(){\n\t\n\t\t$this->db->select('a.course_id,a.course_name,a.status,b.class_name');\n\t\t$this->db->from('course_add a');\n\t\t$this->db->join('class_add b', 'b.class_id = a.class_id');\n\t\t$this->db->where('b.status',1); \n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->num_rows();\t\n\t\t}\n\t\treturn false;\n\t}", "function num_checkouts($connect){\n\t$query = \"\n\tSELECT count(equipment_checkout.chk_id) as 'checks'\n\tFROM equipment_checkout\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$count = 0;\n\t$result = $statement->fetchAll();\n\tif(isset($result)){\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$count = $row['checks'];\n\t\t}\n\t}\n\t// return $count;\n\treturn $count;\n}", "function totalexamstudent($id){\n include '../../database/config.php';\n $sql = \"select * from tbl_examinations where user_id='$id'\";\n $result = $conn->query($sql);\n $count=0;\n\n while($row = $result->fetch_assoc()){\n $exam_id=$row['exam_id'];\n $sql1= \"select * from tbl_assessment_records where exam_id='$exam_id'\";\n $result1=$conn->query($sql1);\n while($row1 = $result1->fetch_assoc()){\n $count++;\n }\n\n\n }\n return $count;\n \n }", "public function fetchAppointmentRequestCount(){\n try {\n $this->db->where('status','pending');\n $this->db->from(\"appointment\");\n echo $this->db->count_all_results();\n\n\n } catch (Exception $e) {\n echo $e;\n }\n }", "function count_total_user_active($connect)\n{\n\t$query = \"\n\tSELECT * FROM user_details WHERE user_status='active'\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\treturn $statement->rowCount();\n}", "public static function count()\n {\n\t\t$legal_conditions_table = Database::get_main_table(TABLE_MAIN_LEGAL);\n\t\t$sql = \"SELECT count(*) as count_result\n\t\t FROM $legal_conditions_table\n\t\t ORDER BY id DESC \";\n\t\t$result = Database::query($sql);\n\t\t$url = Database::fetch_array($result,'ASSOC');\n\t\t$result = $url['count_result'];\n\n\t\treturn $result;\n\t}", "public function busconcount_dvases(){\r\n $data = date(\"Y-m-d H:i:s\");\r\n $this->db->select(\"(SELECT COUNT(*) FROM postad WHERE category_id = '7' AND sub_cat_id= '69' AND sub_scat_id = 484 AND ad_status = 1 AND expire_data >='$data' AND(ad_type = 'business' || ad_type = 'consumer')) AS allbustype,\r\n (SELECT COUNT(*) FROM postad WHERE category_id = '7' AND sub_cat_id= '69' AND sub_scat_id = 484 AND ad_status = 1 AND expire_data >='$data' AND ad_type = 'business') AS business,\r\n (SELECT COUNT(*) FROM postad WHERE category_id = '7' AND sub_cat_id= '69' AND sub_scat_id = 484 AND ad_status = 1 AND expire_data >='$data' AND ad_type = 'consumer') AS consumer\");\r\n $rs = $this->db->get();\r\n return $rs->result();\r\n }", "function num_returned($connect){\n\t$query = \"\n\tSELECT count(equipment_checkout.chk_id) as 'checks'\n\tFROM equipment_checkout\n\tWHERE returned = 'true'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\t$count = 0;\n\t$result = $statement->fetchAll();\n\tif(isset($result)){\n\t\tforeach($result as $row)\n\t\t{\n\t\t\t$count = $row['checks'];\n\t\t}\n\t}\n\t// return $count;\n\treturn $count;\n}", "public function sample_issuance_count($labref) {\n $this->db->where('lab_ref_no', $labref);\n $this->db->where('done_status', 0);\n return $this->db->count_all_results('sample_issuance');\n }", "function count_all_search()\r\n\t{\r\n\t\t$query = $this->db->get('exam_full_data');\r\n\t\treturn $query->num_rows();\r\n\t}", "public function count_courses()\n {\n $table = $this->return_table();\n return $this->db->count_all($table);\n }", "function module_viewcount_getSimpleCount($courseID)\n{\n $result = django_request(\"analytics/viewed/count/$courseID\");\n return array(\n 'count' => $result[\"count\"]\n );\n}", "public function count(){\n return $this->connection->getValue(\"SELECT COUNT(*) c\n FROM e_qa\n WHERE qa_asm_id=\".$this->asm->getId().\"\n AND qa_task_xl_level=\".$this->currentLevel());\n }", "function act_usercount(){\n\tglobal $w, $tsUser;\n\t$query = mysql_query('SELECT COUNT(usuario_id) AS total FROM usuarios WHERE user_vip =\"1\" AND rango_vip=\"0\" ');\n\t$data = result_array($query);\n\n\t//\n\treturn $data;\n\t}", "public function get_count_trans_staff_annual($staff_id, $year)\r\n {\r\n $this->db->select('COUNT(trans_id) AS trans_count'); \r\n \r\n $this->db->from($this->table);\r\n\r\n $this->db->where('user_id', $staff_id);\r\n\r\n $date_from = $year . '-' . '01' . '-01 00:00:00';\r\n $date_to = $year . '-' . '12' . '-31 23:59:59';\r\n\r\n $this->db->where('datetime >=', $date_from);\r\n $this->db->where('datetime <=', $date_to);\r\n \r\n $query = $this->db->get();\r\n\r\n return $query->row()->trans_count + 0;\r\n }", "public function busconcount_dcurtain(){\r\n $data = date(\"Y-m-d H:i:s\");\r\n $this->db->select(\"(SELECT COUNT(*) FROM postad WHERE category_id = '7' AND sub_cat_id= '69' AND sub_scat_id = 482 AND ad_status = 1 AND expire_data >='$data' AND(ad_type = 'business' || ad_type = 'consumer')) AS allbustype,\r\n (SELECT COUNT(*) FROM postad WHERE category_id = '7' AND sub_cat_id= '69' AND sub_scat_id = 482 AND ad_status = 1 AND expire_data >='$data' AND ad_type = 'business') AS business,\r\n (SELECT COUNT(*) FROM postad WHERE category_id = '7' AND sub_cat_id= '69' AND sub_scat_id = 482 AND ad_status = 1 AND expire_data >='$data' AND ad_type = 'consumer') AS consumer\");\r\n $rs = $this->db->get();\r\n return $rs->result();\r\n }", "public function countTotalStudent(){\n $sql = \"SELECT * FROM students\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->num_rows();\n }", "public function enrollCounts()\n {\n $sql=\"SELECT course_id, COUNT(id) as count FROM edxapp.student_courseenrollment WHERE 1 GROUP BY course_id;\";\n $q=$this->db->query($sql) or die(\"<pre>error:$sql</pre>\");\n $DAT=[];\n while($r=$q->fetch(\\PDO::FETCH_ASSOC)){\n $DAT[$r['course_id']]=$r['count'];\n }\n return $DAT;\n }", "static function count_stats_by_country(){\n $datas = self::$PDO->prepare('SELECT COUNT(ID) as nbConnections, country_viewer as country FROM '.self::$prefix.'stats WHERE country_viewer != \"\" GROUP BY country_viewer');\n $datas->execute(array());\n return $datas->fetchAll();\n }", "public function get_kecamatan_count($year) \n\t{\n\t $dbplanning = env('DB_PLANNING');\n\t $dbcontract = env('DB_CONTRACT');\n\t $dbmain \t= env('DB_PRIME');\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tunitID, \n\t\t\t\t\tUPPER(TRIM(SUBSTRING(nama, POSITION(' ' IN nama), LENGTH(nama)))) AS kecamatan,\n\t\t\t\t\tCONVERT(IFNULL(\n\t\t\t\t\t(SELECT COUNT(*) FROM \".env('DB_CONTRACT').\".tpekerjaan WHERE administrative_area_level_3 = kecamatan AND ta = \".$year.\" GROUP BY administrative_area_level_3)\n\t\t\t\t\t,0), CHAR(50)) AS summary\n\t\t\t\tFROM\n\t\t\t\t\t\".env('DB_PRIME').\".tbl_skpd\n\t\t\t\tWHERE\n\t\t\t\t\tnama LIKE 'Kecamatan%'\";\n\t\t$results = DB::select($sql);\n \treturn response()\n \t\t\t->json($results)\n \t\t\t->header('Access-Control-Allow-Origin', '*');\t\n\t}", "function count_agr($id_agr) {\n return $this->db->select('count(sub_anggaran_wkt) as jml')\n ->from('sub_anggaran_waktu')\n ->where('sub_anggaran_wkt', $id_agr)\n ->get()->row();\n }", "function get_resources_count($u, $aid) {\n global $con;\n $sql = \"SELECT DISTINCT resource.id FROM resource LEFT JOIN 2DregionResource ON 2DregionResource.resource_id=resource.id WHERE resource.deleted_at IS NULL AND 2DregionResource.deleted_at IS NULL AND (resource.owner='$u' OR resource.owner='admin') AND (2DregionResource.owner='$u' OR 2DregionResource.owner='admin') AND 2DregionResource.annotation_id IS NOT NULL AND 2DregionResource.annotation_id=$aid\";\n if (($temp = mysql_query($sql, $con))) {\n return mysql_num_rows($temp);\n } else {\n die_error(-3, json_encode(mysql_error()));\n }\n}", "public function countTotalPassout()\n\t{\n\t\t$sql = \"SELECT * FROM students where status='passout'\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->num_rows();\n\t}", "public function getAmdNewCount(){\n $new=0;\n $create=0;$reg_verify=0;$reg_approve=0;$pub_verify=0;$asst_comm=0;$bim_comm=0;\n $comm_gen=0;$computer=0;$proof_sinhala=0;$computer_sinhala=0;$proof_translate=0;$computer_translate=0;\n $pub_without=0;$press_without=0;\n if($this->getAccessCreate('amendments')=='Yes'){\n $create=AmendmentsHeader::whereIn('prepared_by',User::where('branch_id',Auth::user()->branch_id)->select('id')->where('is_active',1)->get())\n ->where('current_stage','Regional data entry')->where('rejected',0)->count();\n }\n if($this->getAccessRegVerify('amendments')=='Yes'){\n $reg_verify=AmendmentsHeader::whereIn('prepared_by',User::where('branch_id',Auth::user()->branch_id)->select('id')->where('is_active',1)->get())\n ->where('current_stage','Regional officer')->where('rejected',0)->count();\n }\n if($this->getAccessRegApprove('amendments')=='Yes'){\n $reg_approve=AmendmentsHeader::whereIn('prepared_by',User::where('branch_id',Auth::user()->branch_id)->select('id')->where('is_active',1)->get())\n ->where('current_stage','Regional commissioner')->where('rejected',0)->count();\n }\n if($this->getAccessPubVerify('amendments')=='Yes'){\n $pub_verify=AmendmentsHeader::where('current_stage','Publication verify')->where('rejected',0)->count();\n }\n if($this->getAccessAsstComm('amendments')=='Yes'){\n $asst_comm=AmendmentsHeader::where('current_stage','Assistant commisioner')->where('rejected',0)->count();\n }\n if($this->getAccessBimsaviyaComm('amendments')=='Yes'){\n $bim_comm=AmendmentsHeader::where('current_stage','Bimsaviya commisioner')->where('rejected',0)->count();\n }\n if($this->getAccessCommGen('amendments')=='Yes'){\n $comm_gen=AmendmentsHeader::where('current_stage','Commissioner general')->where('rejected',0)->count();\n }\n if($this->getAccessForwardProof('amendments')=='Yes'){\n $computer=AmendmentsHeader::where('current_stage','Computer branch')->orWhere('current_stage','Proof read(Sinhala)-Computer')->where('rejected',0)->count();\n }\n if($this->getAccessProof('amendments')=='Yes'){\n $proof_sinhala=AmendmentsHeader::where('current_stage','Proof read(Sinhala)')->where('rejected',0)->count();\n }\n if($this->getAccessForwardTransProof('amendments')=='Yes'){\n $computer_sinhala=AmendmentsHeader::where('current_stage','Proof read(Sinhala)-Computer')->orWhere('current_stage','Proof read(Translation)-Computer')->where('rejected',0)->count();\n }\n if($this->getAccessTransProof('amendments')=='Yes'){\n $proof_translate=AmendmentsHeader::where('current_stage','Proof read(Translates)')->where('rejected',0)->count();\n }\n if($this->getAccessForwardPublication('amendments')=='Yes'){\n $computer_translate=AmendmentsHeader::where('current_stage','Proof read complete')->orWhere('current_stage','Gazette with G')->where('rejected',0)->count();\n }\n if($this->getAccessForwardPress('amendments')=='Yes'){\n $pub_without=AmendmentsHeader::where('current_stage','Publication without G')->orWhere('current_stage','Publication with G')->where('rejected',0)->count();\n }\n if($this->getAccessGazette('amendments')=='Yes'){\n $press_without=AmendmentsHeader::where('current_stage','Gov Press without G')->where('rejected',0)->count();\n }\n $new=$create+$reg_verify+$reg_approve+$pub_verify+$asst_comm+$bim_comm+$comm_gen+$computer+$proof_sinhala+$computer_sinhala+$proof_translate+$computer_translate+$pub_without+$press_without;\n\n return $new;\n}", "function get_all_vagas_count()\n {\n $this->db->from('vagas');\n return $this->db->count_all_results();\n }", "function count_visit_details_by_sex($Sex)\n {\n $getResults = array();\n $getResults = $this->get_visit_details_by_sex($Sex);\n $countResults = count($getResults);\n $getResults['count'] = $countResults;\n return $getResults;\n }", "function count()\n {\n $query = $this->db->query('SELECT COUNT(*) as StudentCount FROM classlist WHERE classID = 0');\n if ($query->num_rows() > 0)\n {\n //Returns StudentCount\n $result = $query->row();\n return $result->StudentCount;\n }\n else \n {\n return false;\n }\n }", "function numAgentPerfOutBoundManual($dateinfo)\n\t{\n\t\t$sdate = date('Y-m-d H:i:s', $dateinfo->ststamp);\n \t$edate = date('Y-m-d H:i:s', $dateinfo->etstamp);\n \t$date_attributes = new stdClass;\n \t$date_attributes->condition = \"start_time BETWEEN '\".$sdate.\"' AND '\".$edate.\"' \";\n \t$date_attributes->yy = substr(date('Y', $dateinfo->ststamp), 2, 2);\n\n\t\tif (empty($date_attributes->yy)) return 0;\n\t\t$year = '';//$date_attributes->yy == date('y') ? '' : '_' . $date_attributes->yy;\n\t\t$table = 'log_agent_outbound_manual' . $year;\n\t\t$cond = $date_attributes->condition;\n\t\t$sql = \"SELECT COUNT(DISTINCT(agent_id)) AS numrows FROM $table\";\n\t\tif (!empty($cond)) $sql .= \" WHERE $cond\";\n\n\t\t$result = $this->getDB()->query($sql);\n\t\t// echo $sql;\n\t\tif ($this->getDB()->getNumRows() == 1) {\n\t\t\treturn empty($result[0]->numrows) ? 0 : $result[0]->numrows;\n\t\t}\n\t\treturn 0;\n\t}", "public function countHauling()\n\t\t{\n\t\t\t\t$userRol = $this->session->userdata(\"rol\");\n\t\t\t\t$idUser = $this->session->userdata(\"id\");\n\t\t\t\t\n\t\t\t\t$year = date('Y');\n\t\t\t\t$firstDay = date('Y-m-d', mktime(0,0,0, 1, 1, $year));//primer dia del año\n\n\t\t\t\t$sql = \"SELECT count(id_hauling) CONTEO\";\n\t\t\t\t$sql.= \" FROM hauling\";\n\t\t\t\t$sql.= \" WHERE date_issue >= '$firstDay'\";\n\t\t\t\tif($userRol == 7){ //If it is a BASIC USER, just show the records of the user session\n\t\t\t\t\t$sql.= \" AND fk_id_user = $idUser\";\n\t\t\t\t}\t\t\t\n\n\t\t\t\t$query = $this->db->query($sql);\n\t\t\t\t$row = $query->row();\n\t\t\t\treturn $row->CONTEO;\n\t\t}", "private function anuncios_actuales(){\n\t\t$this->where('ussr',$this->user);\n\t\t$salida = $this->get('anuncios');\n \t\treturn count($salida);\n\t}", "function checkYearLevel($academicGradeId)\n\t{\n\t\t// you will return the count of the tables\n\t\t$array['academic_grade_id'] = $academicGradeId;\n\t\t$array['status'] = 1;\n\t\t$schoolGradeTable = $this->multiple_where('school_grade', $array);\n\t\t$academicGradeCount = count($schoolGradeTable->result_array());\n\t\treturn $academicGradeCount;\n\t}", "public function count($status = self::FREE);", "function check($student_id, $subject_id) {\n\t\t$query = \"select count(*) from result where student_id = '{$student_id}'\n\t\t\t\tand subject_id = '{$subject_id}' and pass = true\";\n\t\t//echo 'result.check: '. $query;\n\t\t$result = pg_query(DB, $query);\n\t\t$row = pg_fetch_assoc($result)['count'];\n\t\tif($row != 0) return true;\n\t\telse return false;\n\t}", "public function count(){\r\n if(!empty($this->count))\r\n return $this->count;\r\n $table = self::$tb_name;\r\n $user_id = $this->user_id;\r\n $sql = \"SELECT COUNT(property_id) as num_viewed from $table where user_id = $user_id\";\r\n $stmt = PDOConnector::$db->prepare($sql);\r\n if($stmt->execute()){\r\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\r\n $this->count = $result[\"num_viewed\"];\r\n return $this->count;\r\n }\r\n return 0;\r\n }", "public function supervisor_issuance_count($labref) {\n $this->db->where('labref', $labref);\n $this->db->where('approval_status', 0);\n return $this->db->count_all_results('tests_done');\n }", "public function get_incubations_count() {\r\n $this->db->select('*');\r\n $result = $this->db->get('tbl_incubation')->result();\r\n return $result;\r\n }", "function alladmissionswithindate($hospital,$start_date,$end_date){\r\n\t\trequire $_SERVER['DOCUMENT_ROOT'].'/Connections/dbconnection.php';\r\n\t\t$total=0;\r\n\t\tmysql_select_db($database_dbconnection, $dbconnection);\r\n\t\t\r\n\t\t$sql=\"SELECT count(admissions.patient_id) as admissions,patient_demograph.* FROM admissions,patient_demograph WHERE admissions.patient_id = patient_demograph.patient_ID AND date_admitted BETWEEN '\".$start_date.\"' AND '\".$end_date.\"' ORDER BY date_admitted\";\r\n\t\t$rst = mysql_query($sql,$dbconnection);\r\n\t\t$row = mysql_fetch_assoc($rst);\r\n\t\tif(mysql_num_rows($rst)>0){\r\n\t\t\t$total=mysql_num_rows($rst);\r\n\t\t\t//$returnval .= $title;\r\n\t\t\t $total=$row['admissions'];;\r\n\t\t\t}\r\n\t\treturn $total;\r\n\t}", "function get_all_student_registered($obj,$term,$class)\n{\n $student_performance = $obj -> db-> query('SELECT count(*) as cn FROM register where term = '.$term.' and class = '.$class.'')->result_array();\n #print_r($student_performance);\n return $student_performance;\n}", "function count_check_out_total($connect){\n\t$query = \"\n\tSELECT * \n\tFROM equipment_checkout\n\tWHERE returned = 'false'\n\t\";\n\t$statement = $connect->prepare($query);\n\t$statement->execute();\n\treturn $statement->rowCount();\n}", "function getComplantCount($db){\n $hostel_name = substr($_SESSION['username'], -1);\n $query_complaint_count = \"Select count(*) from complaints cr inner join student s on cr.rollnumber=s.rollnumber where s.hostel='$hostel_name'\";\n $result_complaint_count = mysqli_query($db, $query_complaint_count);\n if (mysqli_num_rows($result_complaint_count) == 1) {\n $countRow = mysqli_fetch_assoc($result_complaint_count);\n }\n return $countRow;\n }", "public function getCounts($status ='0') {\n \n $count=$this->mongo_db->where(array('status' => $status))->count('task_master');\n if($count>0)\n {\n return $count;\n }\n else \n {\n return 0;\n }\n }", "function count_table($table_name, $option = [])\n{\n global $db;\n\n $subject = $option['subject_id'] ?? false;\n\n $sql = \"SELECT COUNT( id ) as 'count' from \" . $table_name . \" \";\n if ($subject) {\n $sql .= \"where subject_id =\" . $db->quote($subject) . \"\";\n }\n // die($sql); \n\n $result = $db->query($sql);\n confirm_result_set($result);\n $table_count = $result->fetchColumn();\n $result->closeCursor();\n return $table_count;\n}", "function countdata($where = \"\"){\n\t\tif($where != \"\")\n\t\t\t$this->where($where);\n\t\t$this->getdata(TBL_THANHVIEN);\n\t\treturn $this->num_rows();\n\t}", "public function count($criterio=\"\");", "public function count($criterio=\"\");", "public function count($criterio=\"\");", "public function count($criterio=\"\");" ]
[ "0.6422154", "0.6302173", "0.6238389", "0.6168983", "0.615595", "0.61435676", "0.60602474", "0.6057242", "0.60399854", "0.6028442", "0.60251844", "0.60178995", "0.6000841", "0.59182537", "0.5908597", "0.5890122", "0.588174", "0.58789194", "0.58591473", "0.5856962", "0.58366406", "0.5835678", "0.5832669", "0.5826896", "0.58010465", "0.5798658", "0.57952046", "0.5791474", "0.5786042", "0.5784792", "0.5782165", "0.57521987", "0.5741174", "0.57319224", "0.5731737", "0.57247424", "0.5723904", "0.5720128", "0.57132703", "0.5707737", "0.5703602", "0.57023335", "0.56875587", "0.5682786", "0.56801695", "0.567455", "0.56722534", "0.5671867", "0.5668802", "0.5667679", "0.56624055", "0.5657644", "0.5654564", "0.56501174", "0.5647052", "0.56463015", "0.56368524", "0.56316036", "0.5628695", "0.5628063", "0.56137735", "0.560196", "0.5599449", "0.55837595", "0.5581608", "0.55780876", "0.55702925", "0.55691195", "0.5567626", "0.556486", "0.5562089", "0.5561691", "0.5561217", "0.5558179", "0.55533355", "0.55472", "0.55450827", "0.554056", "0.55370784", "0.55353254", "0.5532506", "0.5531536", "0.5530584", "0.55284995", "0.5525798", "0.5525017", "0.5524104", "0.5518403", "0.5514143", "0.5513255", "0.55130196", "0.5512435", "0.55071354", "0.55029243", "0.5500642", "0.5496318", "0.5485909", "0.5485909", "0.5485909", "0.5485909" ]
0.71415704
0
// get_list_product_ajax : get list products when search by textbox
// get_list_product_ajax : получение списка продуктов при поиске по полю ввода
public function get_list_product_ajax() { $strQuery = isset($_GET['query']) ? $_GET['query'] : FALSE; $arrResponse = array( 'query' => '', 'suggestions' => array(), 'data' => array(), ); if($strQuery) { $objFound = $this->contact_model->getProductListByKeySearch($strQuery); $arrSuggestions = array(); $arrData = array(); if(is_array($objFound)) { foreach($objFound as $row) { $arrSuggestions[] = $row['name']; $arrData[] = $row['productid']; } $arrResponse = array( 'query' => $strQuery, 'suggestions' => $arrSuggestions, 'data' => $arrData, ); } } echo json_encode($arrResponse); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajaxProcessSearchProducts() {\n\n $array = $this->searchProducts(Tools::getValue('product_search'));\n $this->content = trim(json_encode($array));\n }", "public function ajaxProcessSearchProducts()\n {\n $context = Context::getContext();\n $id_lang = $context->language->id;\n\n $query = Tools::getValue('product_search');\n\n $result = $this->getSqlQuery($query, $id_lang);\n\n if (!$result) {\n return false;\n }\n\n $productList = [];\n\n foreach ($result as $row) {\n if ($this->hasCombinations($row['id_product'])) {\n $row['attribute_name'] = $this->getAttributes($row['id_product_attribute'], $id_lang);\n $row['image_link'] = $this->getProductAttributeImage($row['id_product'], $row['id_product_attribute']);\n } else {\n $row['image_link'] = $this->getProductImage($row['id_product']);\n }\n $productList[] = $row;\n }\n\n $this->ajaxDie(json_encode($productList));\n }", "public function actionAjaxProductSearch()\n {\n if (!Yii::$app->request->isAjax) {\n throw new NotFoundHttpException('invalid input');\n }\n\n // read query and validate params\n $productName = Yii::$app->request->get('name'); // mandatory\n if (empty($productName)) {\n throw new yii\\web\\BadRequestHttpException('the parameter \"name\" is missing');\n }\n\n // preparing the response format\n Yii::$app->response->format = Response::FORMAT_JSON; \n\n // searching product in the DB : name and belong to group 2\n $query = Product::find()\n ->where(['LIKE', 'name', $productName])\n ->asArray();\n\n $courseProducts = ProductSelectionForm::getProductIdsByGroup(ProductSelectionForm::GROUP_COURSE); \n if ( count($courseProducts) > 0) {\n return $query->andWhere(['IN', 'id', $courseProducts ])->all();\n } else {\n return [];\n }\n }", "public function searchAction() {\n\t\n\t if($this->getRequest()->isXmlHttpRequest()){\n\t\n\t $term = $this->getParam('term');\n\t $id = $this->getParam('id');\n\t\n\t if(!empty($term)){\n\t $term = \"%$term%\";\n\t $records = Products::findbyName($term, \"product_id, pd.name as name\", true);\n\t die(json_encode($records));\n\t }\n\t\n\t if(!empty($id)){\n\t $records = Products::find($id);\n\t die(json_encode($records));\n\t }\n\t\n\t $records = Products::getAll('product_id, pd.name as name');\n\t die(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}", "public function searchProductsAction() {\r\n Shopware()->Plugins()->Controller()->ViewRenderer()->setNoRender();\r\n\r\n $params = $this->Request()->getParams();\r\n $pConfig = self::Plugin()->Config();\r\n if ($pConfig->enable_debug) {\r\n __d(\"searchProductsAction\");\r\n __d($params,\"params\");\r\n }\r\n switch ($params[\"get\"]) {\r\n case \"filter\":\r\n $filters = false;\r\n $filter = false;\r\n\r\n $filter->name = \"Produkt\";\r\n $filter->description = \"\";\r\n $filter->required = false;\r\n $filter->query_key = \"product\";\r\n $filter->type = \"input\";\r\n $filters[] = $filter;\r\n\r\n echo json_encode($filters);\r\n\r\n exit(0);\r\n\r\n break;\r\n case 'search':\r\n $items = false;\r\n\r\n $items->settings->type = \"product\";\r\n $items->settings->link_editable = false;\r\n $items->settings->link_text_editable = false;\r\n $items->settings->image_size_editable = false;\r\n\r\n $search = $this->Request()->product;\r\n $shopID = $this->Request()->getParam('shopID');\r\n\r\n $categoryID = Shopware()->Db()->fetchOne(\"SELECT category_id FROM s_core_shops WHERE id=?\", array($shopID));\r\n\r\n $this->shopCategories[] = $categoryID;\r\n $this->getCategories($categoryID);\r\n $this->shopCategories = join(\",\", $this->shopCategories);\r\n $search = \"%$search%\";\r\n $sql = \"\r\n SELECT articles.id\r\n FROM s_articles articles\r\n JOIN s_articles_categories ac ON ac.articleID = articles.id\r\n JOIN s_articles_details ad ON articles.id = ad.articleId\r\n WHERE (articles.name LIKE ? OR articles.description LIKE ? OR articles.description_long LIKE ?)\r\n AND articles.active = 1\r\n AND ad.active = 1\r\n AND ac.categoryID IN (\" . $this->shopCategories . \")\r\n \";\r\n $product_ids = Shopware()->Db()->fetchCol($sql, array($search,$search,$search));\r\n $product_ids = array_unique($product_ids);\r\n\r\n if (count($product_ids) == 0)\r\n exit(0);\r\n\r\n foreach ($product_ids as $product_id) {\r\n $out = false;\r\n\r\n $repository = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop');\r\n $shop = $repository->getActiveById($shopID);\r\n $shop->registerResources(Shopware()->Bootstrap());\r\n\r\n $url = Shopware()->Modules()->System()->sSYSTEM->sPathArticleImg;\r\n $url = str_replace('/media/image', '', $url);\r\n\r\n $product = Shopware()->System()->sMODULES['sArticles']->sGetArticleById($product_id);\r\n if ($product['linkDetailsRewrited'])\r\n //$url .= str_replace('http:///', '', $product['linkDetailsRewrited']);\r\n $url = $product['linkDetailsRewrited'];\r\n else\r\n $url .= $product['linkDetails'];\r\n\r\n $out->title = $product['articleName'];\r\n $out->description = $product['description_long'];\r\n if(self::Plugin()->assertVersionGreaterThenLocal(\"5.0.0\")){\r\n $out->image = $product['image']['thumbnails'][0]['source'];//2 is too large\r\n } else {\r\n $out->image = $product['image']['src'][2];\r\n }\r\n $out->price = $product['price'];\r\n $out->url = $url;\r\n\r\n $items->items[] = $out;\r\n }\r\n echo json_encode($items);\r\n\r\n exit(0);\r\n\r\n break;\r\n }\r\n }", "public function search_products_ajax(){\n ob_start();\n\n check_ajax_referer( 'search-products', 'security' );\n\n $term = (string) wc_clean( stripslashes( $_GET['term'] ) );\n $post_types = array( 'product' );\n\n if ( empty( $term ) ) {\n die();\n }\n\n $args = array(\n 'post_type' => $post_types,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 's' => $term,\n 'fields' => 'ids'\n );\n\n if ( is_numeric( $term ) ) {\n\n $args2 = array(\n 'post_type' => $post_types,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'post__in' => array( 0, $term ),\n 'fields' => 'ids'\n );\n\n $args3 = array(\n 'post_type' => $post_types,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'post_parent' => $term,\n 'fields' => 'ids'\n );\n\n $args4 = array(\n 'post_type' => $post_types,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => '_sku',\n 'value' => $term,\n 'compare' => 'LIKE'\n )\n ),\n 'fields' => 'ids'\n );\n\n $posts = array_unique( array_merge( get_posts( $args ), get_posts( $args2 ), get_posts( $args3 ), get_posts( $args4 ) ) );\n\n } else {\n\n $args2 = array(\n 'post_type' => $post_types,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => '_sku',\n 'value' => $term,\n 'compare' => 'LIKE'\n )\n ),\n 'fields' => 'ids'\n );\n\n $posts = array_unique( array_merge( get_posts( $args ), get_posts( $args2 ) ) );\n\n }\n\n $found_products = array();\n // get excluded products\n $excluded = array_filter( explode( ',', get_option( 'yith-wacp-exclusions-prod-list', '' ) ) );\n\n if ( $posts ) {\n foreach ( $posts as $post ) {\n $product = wc_get_product( $post );\n if( in_array( $post, $excluded ) ) {\n continue;\n }\n $found_products[ $post ] = rawurldecode( $product->get_formatted_name() );\n }\n }\n\n wp_send_json( $found_products );\n }", "public function search_products() {\n $price_range = $this -> input -> post('price_range');\n $category_id = $this -> input -> post('category_id');\n $category_type = $this -> input -> post('category_type');\n\n $search_text = $this -> input -> post('search_text');\n\n $data['top_offers'] = $this -> productmodel -> get_products($category_type, $category_id, $price_range, $last_product_id = 0, $show_offer = 0, $product_ids = array(), $search_text);\n\n $last_product_id = ( (count($data['top_offers']) - 1) > 0 ) ? $data['top_offers'][(count($data['top_offers']) - 1)]['Id'] : 0;\n\n echo json_encode(array('view' => $this -> load -> view('front/top_offer_products', $data, TRUE), 'last_product' => $last_product_id));\n }", "function autocomplete(){\n\t\t\tif (Request::ajax()) {\n\t\t\t\t$products = Product::where('sku', 'like', '%' . Input::get('qry') . '%')\n\t\t\t\t\t\t\t\t\t\t->orWhere('name', 'like', '%' . Input::get('qry') . '%')\n\t\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t\t$result = \"<table width=100%>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>SKU</th>\n\t\t\t\t\t\t\t\t\t<th>Nama</th>\n\t\t\t\t\t\t\t\t</tr>\";\n\n\t\t\t\tforeach ($products as $product) {\n\t\t\t\t\t$result .= \"<tr onclick=autocomplete_select('$product->sku')>\n\t\t\t\t\t\t\t\t\t<td>$product->sku</td>\n\t\t\t\t\t\t\t\t\t<td>$product->name</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t}\n\n\t\t\t\t$result .= \"</table>\";\n\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function ajax_get_products_related(){\n\t\t$news_id = FSInput::get('product_id',0,'int');\n\t\t$category_id = FSInput::get('category_id',0,'int');\n\t\t$keyword = FSInput::get('keyword');\n\t\t$where = ' WHERE published = 1 ';\n\t\tif($category_id){\n\t\t\t$where .= ' AND (category_id_wrapper LIKE \"%,'.$category_id.',%\"\t) ';\n\t\t}\n\t\t$where .= \" AND ( name LIKE '%\".$keyword.\"%' OR alias LIKE '%\".$keyword.\"%' )\";\n\t\t\n\t\t$query_body = ' FROM fs_products '.$where;\n\t\t$ordering = \" ORDER BY created_time DESC , id DESC \";\n\t\t$query = ' SELECT id,category_id,name,category_name '.$query_body.$ordering.' LIMIT 40 ';\n\t\tglobal $db;\n\t\t$sql = $db->query($query);\n\t\t$result = $db->getObjectList();\n\t\treturn $result;\n\t}", "function getProductsByType_AjaxCallback() {\n $typeId = $_POST['typeid'];\n $table = new Product_List_Table();\n $results = $table->getItems($typeId);\n echo json_encode($results);\n wp_die();\n}", "function getProductList() ;", "public function search()\n\t{\n\t\t$search = $this->input->get('search');\n\t\t$limit = $this->input->get('limit');\n\t\t$offset = $this->input->get('offset');\n\t\t$sort = $this->input->get('sort');\n\t\t$order = $this->input->get('order');\n\n\t\t$customers = $this->ProductModel->search($search, $limit, $offset, $sort, $order);\n\t\t$total_rows = $this->ProductModel->get_found_rows($search);\n\n\t\t$data_rows = array();\n\t\tforeach($customers->result() as $person)\n\t\t{\n\t\t\t$data_rows[] = get_product_data_row($person, $this);\n\t\t}\n\n\t\t$data_rows = $this->xss_clean($data_rows);\n\n\t\techo json_encode(array('total' => $total_rows, 'rows' => $data_rows));\n\t}", "function getProducts() ;", "public function ajaxGetProductByGenericListing() {\n $url_replace_char_array = array('!', '@', '#', '$', '%', '^', '&', '*', '(',')',' ',' ',\"'\",'+',',','/');\n \n $arrSubCatIds = array();\n $cat_id = $_POST['cat_id']; \n \n $brand_id= array();\n if(!empty($_POST['brand_id'])){\n $brand_id = explode(',',$_POST['brand_id']);\n \n $cat_list_by_brand = $this->Md_generic_listing->cat_list_by_brand($brand_id);\n \n $array_cat_id = array();\n// foreach($cat_list_by_brand as $row){\n// $array_cat_id[] = $row['cat_id'];\n// }\n $arrSubCatIds = $array_cat_id;\n }\n \n \n \n $soh_id= array();\n if(!empty($_POST['soh_id'])){\n $soh_id = explode(',',$_POST['soh_id']);\n $cat_list_by_soh = $this->Md_generic_listing->cat_list_by_soh($soh_id);\n $array_cat_id = array();\n foreach($cat_list_by_soh as $row){\n $array_cat_id[] = $row['cat_id'];\n }\n \n $arrSubCatIds = $array_cat_id;\n \n }\n \n $cor= array();\n if(!empty($_POST['cor'])){\n $cor = explode(',',$_POST['cor']);\n }\n $offset = $_POST['offset']; \n $limit = 24;\n $incremented_offset = ($offset + $limit);\n $Favoritestring = $_POST['customerFavoriteProduct'];\n $customerFavoriteProduct = explode(',',$Favoritestring);\n $q = $_POST['q'];\n $id = $_POST['id'];\n $page_name = $_POST['page'];\n \n if(!empty($cat_id)){\n \n /*get::subcat id list*/\n $arrSubCatIds = explode(',',$this->getSubCatgList($cat_id).','.$cat_id);\n }\n\n \n /*get::Product list by $subCatIdList */\n $product_list = $this->Md_generic_listing->productList($arrSubCatIds,$offset,$limit,$brand_id,$soh_id,$cor);\n \n echo $incremented_offset.'|*|*|'; \n \n foreach ($product_list as $key => $row) { ?> \n\n <li>\n <div class=\"plp-listimg\">\n <a class=\"likeico\" href=\"javascript:void(0);\" ><i id=\"<?php echo 'marketseller'.$row['product_id'];?>\" class=\"fa fa-heart <?php if(in_array($row['product_id'], $customerFavoriteProduct)){echo ' heartRed';}?>\" aria-hidden=\"true\" onclick=\"saveFavorite('Product','marketseller',<?php echo $row['product_id'];?> );\"></i></a>\n <a class=\"add_url\" href=\"<?php echo base_url().strtolower(urlencode(str_replace($url_replace_char_array, '-', $row['product_name']))).'/pdp/'.$row['product_id']; ?>?q=<?php echo $q; ?>&id=<?php echo $cat_id; ?>&page=<?php echo $page_name; ?>\"> \n <img src=\"<?php echo image_url; ?>media/images/ecom/product/<?php echo $row['product_image'];?>\" alt=\"<?php echo $row['product_name'];?>\">\n </a> \n </div>\n <div class=\"plp-list-name\">\n <?php echo $row['product_name'];?>\n </div>\n \n </li>\n \n <?php }/*end:foreach;*/\n die;\n }", "public function productListAction(){\n //Receive the RAW post data via the php://input IO stream. \n $postData = file_get_contents(\"php://input\");\n if(!empty($postData)){\n $postData = json_decode($postData);\n }\n\n $productName = $productColor = $productSize = $productCategory = \"\";\n $limit = 10; // limit number of product\n $page = 1; // page number for pagination\n\n $keyAuth = trim($postData->auth_key);\n\n // searchable keyword in api\n if(isset($postData->product_name)){\n $productName = trim($postData->product_name);\n }\n if(isset($postData->product_color)){\n $productColor = trim($postData->product_color);\n }\n if(isset($postData->product_size)){\n $productSize = trim($postData->product_size);\n }\n if(isset($postData->category)){\n $productCategory = trim($postData->category);\n }\n if(isset($postData->limit)){\n $limit = trim($postData->limit);\n }\n if(isset($postData->page)){\n $page = trim($postData->page);\n }\n \n\n if (!empty($keyAuth)) {\n\n $customerID = convert_uudecode(base64_decode($keyAuth)); \n\n // get customer details by customer id\n $customerData = Mage::getModel('customer/customer')->load($customerID); \n $email = $customerData->getData('email'); \n\n\n /********************************* Fetch wishlist for customer ID start here **********************************/\n $arrProductIds = array();\n $wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customerID);\n\n $wishListItemCollection = $wishList->getItemCollection();\n\n if (count($wishListItemCollection)) {\n \n foreach ($wishListItemCollection as $item) {\n $product = $item->getProduct();\n $arrProductIds[] = $product->getId();\n }\n }\n /********************************* Fetch wishlist for customer ID end here **********************************/\n\n $productArr = array();\n\n if(!empty($email)){\n\n /********************************** retrieve product data from website start here *********************/\n\n $productCollection = Mage::getModel('catalog/product');\n\n if(!empty($productCategory)){ // category search in product\n\n $productCategory = explode(',',$productCategory);\n $productCategory = array_unique(array_filter($productCategory));\n\n $collection = $productCollection\n ->getCollection()\n ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')\n ->addAttributeToFilter('category_id', array('in' => $productCategory));\n\n }else{\n $collection = $productCollection\n ->getCollection();\n }\n \n $collection->AddAttributeToSelect('name')\n ->addAttributeToSelect('price')\n ->addAttributeToSelect('color')\n ->addAttributeToSelect('size')\n ->addAttributeToSelect('expected_delivery_date')\n ->addFinalPrice()\n ->addAttributeToSelect('small_image')\n ->addAttributeToSelect('image')\n ->addAttributeToSelect('thumbnail')\n ->addAttributeToSelect('short_description')\n ->addAttributeToSelect('pack')\n ->addAttributeToSort('sku', 'ASC')\n ->setPageSize($limit)\n ->setCurPage($page);\n\n \n\n /*********************************** serach filter condition start here *************************************/\n\n if(!empty($productName)){\n $productName = trim($productName);\n $collection->addAttributeToFilter(\n array(\n array('attribute'=>'name', 'like' => '%'.$productName.'%'),\n array('attribute'=>'sku','like' => '%'.$productName.'%')\n )\n );\n\n }\n\n $productIDS = $ids = array();\n $readConnection = Mage::getSingleton('core/resource')->getConnection('core_read');\n $collectionAttr = $productCollection->getCollection();\n \n if(!empty($productColor)){ // product color search in product\n $productColor = explode(',',$productColor);\n $productColor = array_unique(array_filter($productColor));\n $collectionAttr->addAttributeToFilter('color', array(‘in’ => $productColor)); \n }\n\n if(!empty($productSize)){ // product size search in product\n $productSize = explode(',',$productSize);\n $productSize = array_unique(array_filter($productSize));\n $collectionAttr->addAttributeToFilter('size', array(‘in’ => $productSize)); \n }\n\n $stop = 0;\n\n if(!empty($productColor) || !empty($productSize)){\n foreach($collectionAttr as $product) {\n $ids[] = $product->getId();\n }\n\n \n if(!empty($ids)){\n $ids = array_filter(array_unique($ids));\n $ids = implode(',',$ids);\n $results = $readConnection->fetchAll(\"select parent_product_id from catalog_product_bundle_selection where product_id IN ($ids)\");\n if(!empty($results)){\n foreach ($results as $key => $value) {\n $productIDS[] = $value['parent_product_id'];\n }\n }\n if(!empty($productIDS)){\n $productIDS = array_filter(array_unique($productIDS));\n $collection->addAttributeToFilter('entity_id', array('in' => $productIDS));\n }else{\n $stop = 1;\n }\n }else{\n $stop = 1;\n }\n }else{\n /***************************** just to check if product having bundle product or not start here *************/\n $productBundle = array();\n $resultBundle = $readConnection->fetchAll(\"select parent_product_id from catalog_product_bundle_selection\");\n if(!empty($resultBundle)){\n foreach ($resultBundle as $keyBundle => $valueBundle) {\n $productBundle[] = $valueBundle['parent_product_id'];\n }\n }\n if(!empty($productBundle)){\n $productBundleIDS = array_filter(array_unique($productBundle));\n $collection->addAttributeToFilter('entity_id', array('in' => $productBundleIDS));\n }\n /***************************** just to check if product having bundle product or not end here *************/\n }\n $collection->addAttributeToFilter('visibility', 4); \n\n /*********************************** serach filter condition end here *************************************/\n \n // get distint products\n $collection->getSelect()->group('e.entity_id');\n\n // collection count \n $count = $collection->getSize();\n\n if($count>0 && $stop==0){\n\n $i=0;\n\n foreach ($collection as $product) {\n $is_whishlist = 0;\n $delivery_date = $bundleSize = $pack_id = $pack_name = \"\";\n $productCategory = $productImages = $optionArray = $packArr = array();\n $productId = $product->getId(); // product id\n $productType = $product->getTypeId(); // product type\n\n \n // check if product is in whishlist or not\n if(!empty($arrProductIds) && in_array($productId,$arrProductIds)){\n $is_whishlist = 1;\n }\n\n /********************************* get data for product bundle type start here *********************************/\n if($productType==\"bundle\"){ \n $productModel = $productCollection->load($productId);\n /********************************* fetch product option start here ****************************************/\n $selectionCollection = $product->getTypeInstance(true)\n ->getSelectionsCollection(\n $product->getTypeInstance(true)->getOptionsIds($product),\n $product\n );\n\n foreach ($selectionCollection as $proselection) {\n $productLoad=$productCollection->load($proselection->getId());\n $selectionArray = [];\n $selectionArray['option_id'] = $proselection->getOptionId();\n $selectionArray['selection_id'] = $proselection->getSelectionId();\n $selectionArray['product_id'] = $proselection->getProductId();\n $selectionArray['product_name'] = $proselection->getName();\n $selectionArray['product_price'] = number_format($proselection->getPrice(),2);\n $selectionArray['special_price'] = number_format($proselection->getSpecialPrice(),2);\n $selectionArray['product_quantity'] = (int) $proselection->getSelectionQty();\n $selectionArray['color_id'] = $productLoad->getColor(); \n $selectionArray['color_label'] = $productLoad->getAttributeText('color');\n $selectionArray['size_id'] = $productLoad->getSize(); \n $selectionArray['size_label'] = $productLoad->getAttributeText('size');\n $productsArray[$proselection->getOptionId()][] = $selectionArray;\n }\n\n //get all bundle product options of product\n $optionsCollection = $product->getTypeInstance(true)\n ->getOptionsCollection($product);\n\n if(!empty($optionsCollection)){\n $bundleSizeArr = array();\n $optionCount = 0;\n foreach ($optionsCollection as $options) {\n $optionArray[$optionCount]['option_title'] = $options->getDefaultTitle();\n $optionArray[$optionCount]['option_type'] = $options->getType();\n $optionArray[$optionCount]['product_options'] = $productsArray[$options->getOptionId()];\n \n /************************** get price option start here *******************/\n $optionPrices = $finalOptionPrice = 0;\n \n foreach($productsArray[$options->getOptionId()] as $optionprices){\n $bundleSizeArr[] = $optionprices['size_label'];\n if($optionprices['special_price']>0){\n $optionPrices += $optionprices['product_quantity']*$optionprices['special_price'];\n }else{\n $optionPrices += $optionprices['product_quantity']*$optionprices['product_price'];\n }\n }\n $finalOptionPrice = number_format($optionPrices,2);\n /************************** get price option end here *******************/\n\n $optionArray[$optionCount]['option_price'] = $finalOptionPrice;\n $optionCount++; \n }\n if(!empty($bundleSizeArr)){\n $bundleSizeArr = array_unique(array_filter($bundleSizeArr));\n $bundleSize = implode('/',$bundleSizeArr);\n }\n } \n /********************************* fetch product option start here ****************************************/\n\n /***************************************** get pack details start here ***********************************/\n $pack_id = $product->getData('pack');\n if(!empty($pack_id)){\n $attrPack = $productModel->getResource()->getAttribute('pack'); \n if ($attrPack->usesSource()) {\n $pack_name = $attrPack->getSource()->getOptionText($pack_id); \n }\n }\n /***************************************** get pack details start here ***********************************/\n\n /***************** fetch category name and id of respective product start here *************/\n \n $categoryIds = $product->getCategoryIds();\n\n if(!empty($categoryIds)){\n $categoryCollection = Mage::getModel('catalog/category')->getCollection()\n ->setStoreId(Mage::app()->getStore()->getId())\n ->addAttributeToSelect('name')\n ->addIdFilter($categoryIds)\n ->addAttributeToFilter('is_active', 1)//get only active categories\n ->addAttributeToSort('position', 'desc'); //sort by position\n\n $c=0;\n foreach($categoryCollection as $category) {\n $productCategory[$c]['id'] = $category->getId();\n $productCategory[$c]['name'] = $category->getName();\n $c++;\n }\n }\n \n /***************** fetch category name and id of respective product end here *************/\n\n\n /***************** fetch all images for respective product start here *************/\n $images = Mage::getModel('catalog/product')->load($productId)->getMediaGalleryImages();\n $im = 0;\n\n // get image path url\n $productMediaConfig = Mage::getModel('catalog/product_media_config'); \n\n foreach ($images as $image){ //will load all gallery images in loop\n $productImages[$im] = $productMediaConfig->getMediaUrl($image->getFile());\n $im++;\n }\n /***************** fetch all images for respective product end here *************/\n\n }\n\n $productArr[$i] = array(\n 'id' => $product->getId(),\n 'name' => $product->getName(),\n 'code' => $product->getData('sku'),\n 'description' => $product->getShortDescription(),\n 'price' => $product->getPrice(), \n 'thumb' => (string)Mage::helper('catalog/image')->init($product, 'thumbnail'),\n 'category' => $productCategory,\n 'image' => $productImages, \n 'final_price' => number_format($product->getFinalPrice(),2),\n 'is_whislist' => $is_whishlist,\n 'currency_code' => Mage::app()->getLocale()->currency( $currency_code )->getSymbol(),\n 'pack_id' => $pack_id,\n 'pack_name' => $pack_name,\n 'bundle_size' => $bundleSize,\n 'product_options' => $optionArray\n );\n $i++;\n }\n\n $response = array(\"success\"=>1,\"message\"=>\"Product list.\",\"count\"=>$count,\"data\"=>$productArr);\n }else{\n $response = array(\"success\"=>0,\"message\"=>\"No product found.\",\"count\"=>0,\"data\"=>array());\n }\n\n /********************************** retrieve product data from website end here *********************/\n \n }else{\n $response = array(\"success\"=>0,\"message\"=>\"Invalid user.\",\"count\"=>0,\"data\"=>array());\n }\n }else{\n $response = array(\"success\"=>0,\"message\"=>\"Please send auth key.\",\"count\"=>0,\"data\"=>array());\n } \n echo json_encode(array(\"response\"=>$response)); // return response \n\n }", "public function ajaxGetAllProductByGenericListing() {\n $url_replace_char_array = array('!', '@', '#', '$', '%', '^', '&', '*', '(',')',' ',' ',\"'\",'+',',','/');\n \n $cat_id = $_POST['cat_id']; \n \n $brand_id= array();\n if(!empty($_POST['brand_id'])){\n $brand_id = explode(',',$_POST['brand_id']);\n }\n $soh_id= array();\n if(!empty($_POST['soh_id'])){\n $soh_id = explode(',',$_POST['soh_id']);\n }\n $cor= array();\n if(!empty($_POST['cor'])){\n $cor = explode(',',$_POST['cor']);\n }\n $offset = $_POST['offset']; \n $limit = 24;\n $incremented_offset = ($offset + $limit);\n $Favoritestring = $_POST['customerFavoriteProduct'];\n $customerFavoriteProduct = explode(',',$Favoritestring);\n $q = $_POST['q'];\n $id = $_POST['id'];\n $page_name = $_POST['page'];\n \n if(!empty($cat_id)){\n \n /*get::subcat id list*/\n $arrSubCatIds = explode(',',$this->getSubCatgList($cat_id).','.$cat_id);\n \n }else{\n $cat_id='';\n /*get active level one category list.*/\n $data['cat_list'] = $this->Md_generic_listing->getLevelOneCategoriesName();\n // get all active category id string. getAllActiveCategoriesId();\n $arrAllCategoryActiveID = $this->Md_generic_listing->getAllActiveCategoriesId();\n $tempArrAllCategoryActiveID=array();\n foreach ($arrAllCategoryActiveID as $item){\n $tempArrAllCategoryActiveID[]= $item['cat_id'];\n }\n $arrAllCategoryActiveID = $tempArrAllCategoryActiveID;\n $arrSubCatIds = $arrAllCategoryActiveID;\n }\n \n /*get::Product list by $subCatIdList */\n $product_list = $this->Md_generic_listing->productList($arrSubCatIds,$offset,$limit,$brand_id,$soh_id,$cor);\n \n echo $incremented_offset.'|*|*|'; \n \n foreach ($product_list as $key => $row) { ?> \n\n <li>\n <div class=\"plp-listimg\">\n <a class=\"likeico\" href=\"javascript:void(0);\" ><i id=\"<?php echo 'marketseller'.$row['product_id'];?>\" class=\"fa fa-heart <?php if(in_array($row['product_id'], $customerFavoriteProduct)){echo ' heartRed';}?>\" aria-hidden=\"true\" onclick=\"saveFavorite('Product','marketseller',<?php echo $row['product_id'];?> );\"></i></a>\n <!--<a class=\"add_url\" href=\"<?php echo base_url(); ?>product-details/<?php echo $row['product_id']; ?>/<?php echo urlencode($row['product_name']) ;?>?q=<?php echo $q; ?>&id=<?php echo $cat_id; ?>&page=<?php echo $page_name; ?>\">--> \n <a class=\"add_url\" href=\"<?php echo base_url().strtolower(urlencode(str_replace($url_replace_char_array, '-', $row['product_name']))).'/pdp/'.$row['product_id']; ?>?q=<?php echo $q; ?>&id=<?php echo $cat_id; ?>&page=<?php echo $page_name; ?>\"> \n <img src=\"<?php echo image_url; ?>media/images/ecom/product/<?php echo $row['product_image'];?>\">\n </a> \n </div>\n <div class=\"plp-list-name\">\n <?php echo $row['product_name'];?>\n </div>\n \n </li>\n \n <?php }/*end:foreach;*/\n die;\n }", "public function getListarajax(Request $request){\n\n\t\t//Tienda id\n\t\tif(empty(Session::get('store.id'))){\n\t\t\t//algo anda muy mal, no se udo asignar el id de tienda en la funcion Consultarproductos\n\t\t\treturn response()->json(['draw'=>$request->input('draw')+1,'recordsTotal'=>0,'recordsFiltered'=>0,'data'=>[]]);\n\t\t}\n\n\t\t$moduledata['total']=Producto::where('store_id',Session::get('store.id'))->count();\n\n\t\tif(!empty($request->input('search')['value'])){\n\t\t\tSession::flash('search', $request->input('search')['value']);\t\t\t\n\t\t\t\n\t\t\t$moduledata['productos']=\n\t\t\tProducto::\n\t\t\tselect('clu_products.*','clu_category.name as category_name')\n\t\t\t->leftjoin('clu_category', 'clu_products.category', '=', 'clu_category.id')\n\t\t\t->where('clu_products.store_id',Session::get('store.id'))\t\t\n\t\t\t->where(function ($query) {\n\t\t\t\t$query->where('clu_products.name', 'like', '%'.Session::get('search').'%')\n\t\t\t\t->orWhere('clu_products.price', 'like', '%'.Session::get('search').'%')\n\t\t\t\t->orWhere('clu_products.category', 'like', '%'.Session::get('search').'%');\t\t\t\t\t\t\t\t\n\t\t\t})\n\t\t\t->skip($request->input('start'))->take($request->input('length'))\n\t\t\t->orderBy('order', 'asc')\n\t\t\t->get();\t\t\n\t\t\t$moduledata['filtro'] = count($moduledata['productos']);\n\t\t}else{\t\t\t\n\t\t\t$moduledata['productos']=\\DB::table('clu_products')\n\t\t\t->select('clu_products.*','clu_category.name as category_name')\n\t\t\t->leftjoin('clu_category', 'clu_products.category', '=', 'clu_category.id')\n\t\t\t->where('clu_products.store_id',Session::get('store.id'))\n\t\t\t->skip($request->input('start'))->take($request->input('length'))\n\t\t\t->orderBy('order', 'asc')\n\t\t\t->get();\t\t\t\n\t\t\t\t\n\t\t\t$moduledata['filtro'] = $moduledata['total'];\n\t\t}\n\t\t\n\t\treturn response()->json(['draw'=>$request->input('draw')+1,'recordsTotal'=>$moduledata['total'],'recordsFiltered'=>$moduledata['filtro'],'data'=>$moduledata['productos']]);\n\t}", "public function search_product()\n\t{\n\t\t$vendor_id = $this->session->userdata('id');\n\t\t$search_term = $this->input->post('search_query');\n\t\t$vendor_info['search_results'] = $this->vendor->find_product($search_term, $vendor_id);\n\t\t$this->load->view('vendor/partials/search_results', $vendor_info);\n\t}", "function getStoreListSearch($objForm) {\n $objResponse = new xajaxResponse();\n $objAdminStore = &$GLOBALS['objAdminStore'];\n $strParam = serialize($objForm);\n $req['list'] = $objAdminStore->getStoreList(1, $strParam);\n $req['nofull'] = true;\n $objAdminStore->smarty->assign('req', $req);\n $content = $objAdminStore->smarty->fetch('admin_store.tpl');\n $objResponse->assign(\"tabledatalist\", 'innerHTML', $content);\n $objResponse->assign(\"searchparam\", 'value', $strParam);\n $objResponse->assign(\"pageno\", 'value', 1);\n\n return $objResponse;\n}", "function showProductsBySearch(){\n if(isset($_REQUEST['input_minPrice']) && isset($_REQUEST['input_maxPrice'])\n && isset($_REQUEST['input_search'])){ \n $minPrice = $_REQUEST['input_minPrice'];\n $maxPrice = $_REQUEST['input_maxPrice'];\n $search = $_REQUEST['input_search'];\n } \n //mantiene la session en caso de estar loggeado\n AuthHelper::checkLoggedIn();\n $categories = $this->categoryModel->getCategories(); \n $searchedProducts = $this->model->getProductsBySearch($minPrice,$maxPrice,$search);\n //en caso que el arreglo esté vacío cargo la página con mensaje de error\n if (empty($searchedProducts)){\n $error = 'No se encontraron resultados para la búsqueda';\n $this->view->showProducts($searchedProducts, $categories, $error); \n } else {\n $this->view->showProducts($searchedProducts,$categories); \n } \n }", "private function searchProducts()\r\n\t{\r\n\t\tif( isset( $_POST['product_search'] ) && $_POST['product_search'] != '' )\r\n\t\t{\r\n\t\t\t// clean up the search phrase\r\n\t\t\t$searchPhrase = $this->registry->getObject('db')->sanitizeData( $_POST['product_search'] );\r\n\t\t\t$this->registry->getObject('template')->getPage()->addTag( 'query', $_POST['product_search'] );\r\n\t\t\t// perform the search, and cache the results, ready for the results template\r\n\t\t\t$sql = \"SELECT v.name, c.path, IF(v.name LIKE '%{$searchPhrase}%', 0, 1) as priority, IF(v.content LIKE '%{$searchPhrase}%', 0, 1) as priorityb FROM content c, content_versions v, content_types t WHERE v.ID=c.current_revision AND c.type=t.ID AND t.reference='product' AND c.active=1 AND ( v.name LIKE '%{$searchPhrase}%' OR v.content LIKE '%{$searchPhrase}%' ) ORDER BY priority, priorityb \";\r\n\t\t\t$cache = $this->registry->getObject('db')->cacheQuery( $sql );\r\n\t\t\tif( $this->registry->getObject('db')->numRowsFromCache( $cache ) == 0 )\r\n\t\t\t{\r\n\t\t\t\t// no results from the cached query, display the no results template\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// some results were found, display them on the results page\r\n\t\t\t\t// IMPROVEMENT: paginated results\r\n\t\t\t\t$this->registry->getObject('template')->getPage()->addTag( 'results', array( 'SQL', $cache ) );\r\n\t\t\t\t$this->registry->getObject('template')->buildFromTemplates('header.tpl.php', 'products-searchresults.tpl.php', 'footer.tpl.php');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// search form not submitted, so just display the search box page \r\n\t\t\t$this->registry->getObject('template')->buildFromTemplates('header.tpl.php', 'products-searchform.tpl.php', 'footer.tpl.php');\r\n\t\t}\r\n\t}", "public function productsAutocomplete(){\n\t\tif(isset($_REQUEST[\"query\"]) and !empty($_REQUEST[\"query\"])){\n\t\t\t\n\t\t\t$query = trim($_REQUEST[\"query\"]);\n\t\t\t$suggestArr = array();\n\t\t\t$categories = $this->category_model->categories_dropdown(array(\"is_active\"=>BOOL_TRUE,\"is_deleted\"=>BOOL_FALSE,\"name LIKE\"=>\"%\".$query.\"%\"));\n\t\t\tif(!empty($categories)){\n\t\t\t\t\n\t\t\t\tforeach($categories as $row){\n\t\t\t\t\t $suggestArr[] = array(\"data\"=>$row->id,\"value\"=>$row->full_name,\"type\"=>SUGGEST_TYPE_CATEGORY,\"url\"=>site_url(\"/category/\".$row->id.\"/\".$this->utility->cleanText($row->name)));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$products = $this->product_model->products_dropdown(array(\"Product.is_active\"=>BOOL_TRUE,\"Product.is_deleted\"=>BOOL_FALSE,\"Product.name LIKE\"=>\"%\".$query.\"%\"),\"Product.name\",\"ASC\");\n\t\t\tif(!empty($products)){\n\t\t\t\t\n\t\t\t\tforeach($products as $row){\n\t\t\t\t\t $suggestArr[] = array(\"data\"=>$row->id,\"value\"=>$row->name,\"type\"=>SUGGEST_TYPE_PRODUCT,\"url\"=>site_url(\"/products/detail/\".$row->id));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* if(!empty($suggestArr))\t\n\t\t\t\t{\n\t\t\t\t\tasort($suggestArr);\t\t\t\t\n\t\t\t\t} */\n\t\t\t}\n\t\t\t\n\t\t\t$this->output\n\t\t\t->set_status_header(200)\n\t\t\t->set_content_type('application/json', 'utf-8')\n\t\t\t->set_output(json_encode(array('suggestions'=>$suggestArr), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))\n\t\t\t->_display();\t\t\t\t\n\t\t\texit;\n\t\t}\n\t}", "function search(){\n if($this->uri->rsegment('3') == 1){\n // lay du lieu tu auto tim kiem\n $key = $this->input->get('term');\n }\n else\n {\n $key = $this->input->get('key-search');\n }\n $this->data['key'] = trim($key);\n $input = array();\n if($this->input->get('category') > 0)\n {\n $category_id = $this->input->get('category');\n $this->load->model('Category_model');\n $input1['where'] = array('parent' => $category_id);\n $category_list = $this->Category_model->get_list($input1);\n $id_catalog_subs = array();\n foreach ($category_list as $row)\n {\n $id_catalog_subs[] = $row->category_id;\n }\n $this->db->where_in('category_id', $id_catalog_subs);\n }\n $input['like'] = array('name', $key);\n $list = $this->product_model->get_list($input);\n $this->data['list'] = $list;\n if($this->uri->rsegment('3') == 1)\n {\n // auto tim kiem\n $result = array();\n foreach ($list as $row){\n $item = array();\n $item['id'] = $row->product_id;\n $item['label'] = $row->name;\n $item['value'] = $row->name;\n $result[] = $item;\n }\n // du lieu tra ve duoi dang json\n die(json_encode($result));\n }\n else\n {\n // load view\n $this->data['temp'] = 'site/product/search';\n $this->load->view('site/layout', $this->data);\n }\n }", "public function getProductList() {}", "public function getProductList() {}", "public function getProductList() {}", "public function getProductList() {}", "public function getProductList() {}", "public function ajax_filter()\n {\n //captura post\n $post_data = array(); \n if($this->input->post('f_keywords'))\n { \n $post_data['keywords'] = $this->input->post('f_keywords');\n } \n if($this->input->post('f_cat_product'))\n {\n $post_data['cat_product_id'] = $this->input->post('f_cat_product'); \n } \n if($this->input->post('f_cat_feature'))\n {\n $post_data['cat_feature_id'] = $this->input->post('f_cat_feature'); \n } \n //pagination\n $total_rows = $this->products_features_m->search('counts',$post_data);\n //params (URL -for links-, Total records, records per page, segmnet number )\n $pagination = create_pagination('admin/products/features/index', $total_rows, 10, 5);\n $post_data['pagination'] = $pagination; \n //query with limits\n $features = $this->products_features_m->search('results', $post_data);\n //CONVERT ID TO TEXT\n $features = _convertIDtoText($features, $this->dd_arrays);\n //set the layout to false and load the view\n $this->input->is_ajax_request() ? $this->template->set_layout(FALSE) : ''; \n $this->template\n ->title($this->module_details['name'], lang('features:list_title'))\n ->append_js('module::features_index.js')\n ->set('features', $features)\n ->set('pagination', $pagination) \n ->build('admin/features/partials/features');\n }", "function list_items_sales_quote_ajax() {\n $requestData = $_REQUEST;\n $columns = array(\n '',\n \"psq.created_date\",\n \"psq.quote_no\",\n \"pl.id\",\n \"cu.id\",\n \"pl.location\",\n \"pr.id\",\n \"psq.kva\",\n \"psq.quantity\",\n \"psq.quote_age\",\n \"psq.requested_amount\",\n \"psq.quoted_amount\"\n );\n\n $sql = $this->db->select(\"psq.*,concat(cu.fname,' ',cu.lname) as salesperson_name,pl.client_name,pl.location as lead_location,pr.name as product_name\"\n , FALSE)\n ->from(\"pr_sales_quote psq\")\n ->join(\"f_self_mastery cu\", \"cu.id = psq.sales_person_id\", \"left\")\n ->join(\"pr_lead pl\", \"pl.id = psq.lead_id\", \"left\")\n ->join(\"pr_product pr\", \"pr.id = psq.product_id\", \"left\")\n ->where(array(\"psq.is_deleted =\" => \"0\", \"psq.status =\" => \"1\"));\n\n if (!empty($requestData['search']['value'])) {\n $ser = $requestData['search']['value'];\n\n $ser=str_replace(\"'\",\",\",\"$ser\");\n\n $sql->where(\"(concat(cu.fname,' ',cu.lname) LIKE '%$ser%'\");\n $sql->or_where(\"DATE_FORMAT(psq.created_date, '%d-%m-%y %h:%i %p') LIKE '%$ser%'\");\n $sql->or_where(\"psq.quote_no LIKE '%$ser%' \");\n $sql->or_where(\"psq.kva LIKE '%$ser%' \");\n $sql->or_where(\"psq.quantity LIKE '%$ser%' \");\n $sql->or_where(\"psq.quote_age LIKE '%$ser%' \");\n $sql->or_where(\"psq.requested_amount LIKE '%$ser%' \");\n $sql->or_where(\"psq.quoted_amount LIKE '%$ser%' \");\n $sql->or_where(\"pl.location LIKE '%$ser%' \");\n $sql->or_where(\"pl.client_name LIKE '%$ser%' \");\n $sql->or_where(\"pr.name LIKE '%$ser%' )\");\n }\n\n if (isset($_GET['client_id']) && $_GET['client_id'] != \"\") {\n $client_id = $_GET['client_id'];\n $sql->where(array(\"psq.lead_id\" => $client_id));\n }\n if (isset($_GET['salesperson_id']) && $_GET['salesperson_id'] != \"\") {\n $salesperson_id = $_GET['salesperson_id'];\n $sql->where(array(\"psq.sales_person_id\" => $salesperson_id));\n }\n if (isset($_GET['quote_age']) && $_GET['quote_age'] != \"\") {\n $quote_age = $_GET['quote_age'];\n $sql->where(array(\"psq.quote_age\" => $quote_age));\n }\n\n $sql->order_by($columns[$requestData['order'][0]['column']], $requestData['order'][0]['dir']);\n $sql1 = clone $sql;\n if ($requestData['length'] != '-1') { // for showing all records\n $query = $sql->limit($requestData['length'], $requestData['start']);\n }\n\n $query = $sql->get()->result();\n $totalData = $totalFiltered = $sql1->get()->num_rows();\n //echo $this->db->last_query();die;\n $data = array();\n $starts= $requestData['start'];\n foreach ($query as $i => $row) {\n \n $nestedData = array();\n\n //$nestedData[] = ++$i;\n $nestedData[] = ++$starts;\n /* $nestedData[] = '<label class=\"mt-checkbox mt-checkbox-single mt-checkbox-outline\">\n <input type=\"checkbox\" class=\"group-checkable checks_all\" name=\"check_all[]\" value=\"' . $row->id . '\" />\n <span></span>\n </label>'; */\n $newdate = date(\"d-m-y h:i a\", strtotime($row->created_date));\n $nestedData[] = $newdate;\n $nestedData[] = $row->quote_no;\n $nestedData[] = $row->client_name;\n $nestedData[] = $row->salesperson_name;\n $nestedData[] = $row->lead_location;\n $nestedData[] = $row->product_name;\n $nestedData[] = $row->kva;\n $nestedData[] = $row->quantity;\n $nestedData[] = $row->quote_age;\n $nestedData[] = $row->requested_amount;\n $nestedData[] = $row->quoted_amount;\n\n $nestedData[] = ($row->status == '1') ? '<label class=\"label-success label\"> Active</label>' : '<label class=\"label-danger label\"> In Active</label>';\n $nestedData[] = $this->load->view(\"_action1\", array(\"data\" => $row), true);\n $data[] = $nestedData;\n }\n $json_data = array(\n \"draw\" => intval($requestData['draw']),\n \"recordsTotal\" => intval($totalData),\n \"recordsFiltered\" => intval($totalFiltered),\n \"data\" => $data\n );\n return $json_data;\n }", "public function getAllProductAjax(){\n\n\t\t $record_per_page = 9; \n $page = ''; \n $output = ''; \n if(isset($_POST[\"page\"])) \n { \n $page = $_POST[\"page\"]; \n } \n else \n { \n $page = 1; \n } \n $start_from = ($page - 1)*$record_per_page; \n\n\n\t\t $query =\"SELECT * FROM tbl_product ORDER BY product_id DESC LIMIT $start_from, $record_per_page\";\n\n $getProduct = $this->db->select($query);\n $output = '';\n if($getProduct){\n \twhile($result = $getProduct->fetch_assoc()){\n \t\t$output .='\n\n \t\t<div class=\"col-md-4 col-sm-6 col-xs-6\">\n\t\t\t\t\t\t\t\t<div class=\"product product-single\">\n\t\t\t\t\t\t\t\t\t<div class=\"product-thumb\" id=\"display_item\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"product-label\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"sale\">'.$result['product_condition'].'</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<a class=\"main-btn quick-view\" href=\"product-page.php?proid='.$result['product_id'].'\"><i class=\"fa fa-search-plus\"></i><span> Quick view</span></a>\n\t\t\t\t\t\t\t\t\t\t<img src=\"admin/'.$result['image'].'\" alt=\"\">\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"product-body text-center\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"product-price\">$ '.$result['price'].' </h3>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<h2 class=\"product-name\"><a href=\"product-page.php?proid='.$result['product_id'].'\">'.$result['product_name'].'</a></h2>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"product-btns text-center\">\n\t\t\t\t\t\t\t\t\t\t <div style=\"width:30%;display:inline-block;\">\n\t\t\t\t\t\t\t\t\t\t\t <input class=\"input\" type=\"number\" name=\"quantity\" id=\"quantity'.$result['product_id'].'\" value=\"1\" >\n\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t <input type=\"hidden\" name=\"hidden_name\" id=\"name'.$result[\"product_id\"].'\" value=\"'.$result[\"product_name\"].'\" />\n \t <input type=\"hidden\" name=\"hidden_price\" id=\"price'.$result[\"product_id\"].'\" value=\"'.$result[\"price\"].'\" />\n \t <input type=\"hidden\" name=\"hidden_image\" id=\"image'.$result[\"product_id\"].'\" value=\"'.$result[\"image\"].'\" />\n \t <input type=\"hidden\" name=\"hidden_color\" id=\"color'.$result[\"product_id\"].'\" value=\"'.$result[\"color\"].'\" />\n \t <input type=\"hidden\" name=\"hidden_size\" id=\"size'.$result[\"product_id\"].'\" value=\"'.$result[\"size\"].'\" />\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"primary-btn add-to-cart\" id=\"'.$result[\"product_id\"].'\"><i class=\"fa fa-shopping-cart\"></i> Add to Cart</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n \t\t';\n \t}\n \t$output .= '<div align=\"center\">'; \n $page_query = \"SELECT * FROM tbl_product ORDER BY product_id DESC\"; \n $page_result = $this->db->select($page_query); \n $total_records = mysqli_num_rows($page_result); \n $total_pages = ceil($total_records/$record_per_page); \n $output .=\" \n <div class='row'>\n <div class='col-md-12'>\n <div align='center'>\n\t\t\t\t\t\t\t<ul class='store-pages'>\n\t\t\t\t\t\t\t\t<li><span class='text-uppercase' style='color:#F8694A'>Page:</span></li>\"; \n for($i=1; $i<=$total_pages; $i++)\n\n { \n \n $output .= \"<li class='pagination_link' style='cursor:pointer;font-size:20px; padding:6px;margin:2px; border:1px solid #F8694A;' id='\".$i.\"'>\".$i.\"</li>\";\n \n } \n $output .=\"</ul>\n </div>\n </div>\n</div>\";\n \t echo $output;\n }\n\n\t}", "public function search_items_ajax($data)\n {\n $this->db->select('tblinvoiceitemslist.id as itemid,rate,taxrate,tbltaxes.id as taxid,tbltaxes.name as taxname,description');\n $this->db->from(INVOICE_ITEMS_LIST_TABLE);\n $this->db->like('description', $data['q']);\n $this->db->join('tbltaxes', 'tbltaxes.id = tblinvoiceitemslist.tax', 'left');\n return $this->db->get()->result_array();\n }", "function createAjaxResponse($searchResult){\n //echo '<pre>'; print_r($searchResult['Product']); exit;\n $i=1;\n $row=array();\n $formKey = $_GET['key'];\n $row['content'] ='<div class=\"searchautocomplete-container\">\n<div id=\"close\" onclick=\"closeFunction()\" style=\" background:#db5433; border-radius:50%; text-align:center; float:right; color:#FFF; font-size:15px; width:26px; font-weight:bold;height:26px; cursor:pointer;margin-top:5px; \">x</div>\n<div class=\"searchautocomplete-search\" id=\"searchautocomplete-search-1\">\n <div class=\"search-results\">\n <h3 class=\"search-header\">Products</h3>\n <div class=\"search-container\">';\n \n foreach($searchResult['Product'] as $product){\n \n $row['content'].= '<div class=\"s_item\">\n <div class=\"s_icon 2\">\n <a href=\"'.$product['url_path'].'\"> \n <img id=\"image\" src=\"'.$product[\"cart_image\"].'\" alt=\"\" title=\"\" />\n </a>\n </div>\n <div class=\"s_details\">\n <div class=\"pname\">\n <a href=\"'.$product['url_path'].'\">\n <div class=\"s_item_name\">\n <span class=\"s_brand\">'.$product[\"p_brand\"].'</span>\n <span class=\"s_name\">'.$product[\"p_name\"].\" \".$product[\"p_pack\"].'</span>\n </div>\n </a>\n </div>\n <div class=\"s_price\">\n <div class=\"price-box\">\n <span class=\"old-price 2\">\n <span class=\"price\" id=\"old-price-'.$product[\"productid\"].'\">\n ₹ '. $product[\"Price\"].'</span>\n </span>\n <span class=\"special-price 2\">\n <span class=\"special-price\" id=\"product-price-'.$product[\"productid\"].'\">\n <span class=\"price\">₹ '.$product[\"sale_price\"].'</span>\n </span>\n </span>\n \n </div>\n </div>';\n if($product[\"webqty\"]>0){\n $row['content'].='\n <div class=\"s_button\">\n <div class=\"qty-set\">\n <span class=\"quantity-box\">\n <input type=\"text\" name=\"qty\" maxlength=\"12\" value=\"1\" title=\"Qty\" class=\"quantity-input qty pd-'.$i.'\" onclick=\"\">\n <input type=\"button\" value=\"'.$i.'\" onclick=\"\" class=\"quantity-controls quantity-plus btnPlus\">\n <input type=\"button\" value=\"'.$i.'\" onclick=\"\" class=\"quantity-controls quantity-minus\">\n </span>\n </div><button id=\"'.$this->webUrl.'/checkout/cart/add/product/'.$product[\"productid\"].'/form_key/'.$formKey.'/\" onclick=\"\" class=\"button btn-cart btn-cartn s_button_button addc-'.$i.'\" title=\"Add to Cart\" name=\"'.$product[\"Name\"].'\" pid=\"'.$product[\"productid\"].'\" type=\"button\" rel=\"'.$i.'\" >\n <span class=\"s_button_span1\"><span class=\"s_button_span2\">Add to Cart</span></span>\n </button></div>';\n }else{\n $row['content'] .='Sold Out';\n }\n $row['content'] .='</div>\n </div>'; \n $i++;\n \n }\n $keyword = isset($this->GET['q']) ? $this->GET['q'] : '';\n if( $i && $keyword){\n $this->incrementHashData($this->trendingHashKey, $keyword, 1);\n }\n\n $row['content'].='</div>';\n if($i >= 20){\n $row['content'].='<div class=\"resultbox-b\">\n <a href=\"/catalogsearch/result/?q='.$this->GET['q'].'&amp;qty=1&amp;order=name\" class=\"search-more\">More results</a>\n </div>';\n }\n $row['content'].='</div>\n</div>\n</div>\n<script>\n function closeFunction() { document.getElementById(\"search_autocomplete\").style.display = \"none\"; }\n</script>';\n $row['callback']=\"\";\n $this->sendJsonResponse($row);\n exit();\n\n }", "public function searchList()\n {\n $products = Product::with(['images', 'variations'])\n ->inRandomOrder()\n ->take(30)\n ->get();\n\n return response()->json($products);\n }", "public function ajaxList()\n {\n $get = $this->page->request->get;\n list($total_length, $result_length, $result) = $this->model->getAjaxListData($get);\n\n $output = array(\n 'sEcho' => intval($get->sEcho),\n 'iTotalRecords' => $total_length,\n 'iTotalDisplayRecords' => $result_length,\n 'aaData' => $result,\n );\n\n $this->jsonOutput($output);\n }", "public function ajax_search( $search_key ) {\n\t\t$ajax_results = array();\n\t\t$search_key = trim( $search_key );\n\t\tif ( strlen( $search_key ) > module_config::c( 'search_ajax_min_length', 2 ) ) {\n\t\t\t//$sql = \"SELECT * FROM `\"._DB_PREFIX.\"customer` c WHERE \";\n\t\t\t//$sql .= \" c.`customer_name` LIKE %$search_key%\";\n\t\t\t//$results = qa($sql);\n\t\t\t$results = $this->get_products( array( 'general' => $search_key ) );\n\t\t\tif ( count( $results ) ) {\n\t\t\t\tforeach ( $results as $result ) {\n\t\t\t\t\t$match_string = _l( 'Product: ' );\n\t\t\t\t\t$match_string .= _shl( $result['name'], $search_key );\n\t\t\t\t\t$ajax_results [] = '<a href=\"' . $this->link_open( $result['product_id'] ) . '\">' . $match_string . '</a>';\n\t\t\t\t\t//$ajax_results [] = $this->link_open($result['customer_id'],true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $ajax_results;\n\t}", "function buscarproductosall()\n {\n $data['sistema'] = $this->sistema;\n if($this->acceso(104)) {\n $usuario_id = $this->session_data['usuario_id'];\n\n if ($this->input->is_ajax_request()) {\n \n $parametro = $this->input->post('parametro'); \n \n $datos = $this->Producto_model->get_busqueda_productos_all();\n //$datos = $this->Inventario_model->get_inventario_bloque();\n echo json_encode($datos);\n }\n else\n { \n show_404();\n }\n }\n \n }", "public function ajax_search_available_items()\n {\n }", "public function AjaxSearch(Request $request)\n\t\t{\n\n\t\t \t$stringToCheck = $_POST['search'];\n\t\t \t$allProducts = products::getProducts();\n\t\t \t$arr = array();\n\t\t\t foreach ($allProducts as $product) {\n\t\t\t \t// had to figure a way out how to deal with the caps issue\n\t \t\tif(str_contains(strtolower($product->name), strtolower($stringToCheck))){\n\t\t\t\t\t $arr[] = $product;\n\t\t\t\t\t} \n\t\t\t }\n\t\t \t$smallString = $arr[0];\n\t\t \t$response = \"<a href='/singleProduct/\".$smallString->id.\"' style='color: grey; id='\".$smallString->id.\"'>\".$smallString->name.\"</a>\";\n\t\t echo $response;\n\t\t}", "public function ajax_search() {\n\n\t\t$type = (isset($_GET['type'])) ? sanitize_text_field( $_GET['type'] ) : false;\n\n\t\tif($type) {\n\t\t\t$result = $this->get_search_results($type);\n\t\t\techo json_encode($result);\n\t\t}\n\n\t\tdie();\n\t}", "public function ajax_filter()\n\t{\n //captura post\n $post_data = array();\n if($this->input->post('f_account'))\n {\n $post_data['account_id'] = $this->input->post('f_account'); \n } \n if($this->input->post('f_keywords'))\n { \n $post_data['keywords'] = $this->input->post('f_keywords');\n } \n if($this->input->post('f_city'))\n {\n $post_data['CityID'] = $this->input->post('f_city'); \n } \n //pagination\n $total_rows = $this->products_locations_m->search('counts',$post_data);\n //params (URL -for links-, Total records, records per page, segmnet number )\n\t\t$pagination = create_pagination('admin/products/locations/index', $total_rows, 10, 5);\n $post_data['pagination'] = $pagination; \n //query with limits\n $locations = $this->products_locations_m->search('results',$post_data); \n $locations = _convertIDtoText($locations, $this->dd_array);\n _formatValuesForView($locations); \n\t\t//set the layout to false and load the view\n $this->input->is_ajax_request() ? $this->template->set_layout(FALSE) : ''; \n\t\t$this->template\n\t\t\t\t->title($this->module_details['name'], lang('location:list_title'))\n\t\t\t\t->set('locations', $locations)\n\t\t\t\t->set('pagination', $pagination) \n ->set('total_rows', $total_rows) \n\t ->append_js('module::locations_index.js')\n\t ->build('admin/locations/partials/locations');\n\t}", "public function search_product() {\n\n\t\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$keyword = isset($_GET['keyword'])? sanitize_text_field($_GET['keyword']):'';\n\n\t\tif ( empty( $keyword ) ) {\n\t\t\tdie();\n\t\t}\n\t\t$arg = array(\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'product',\n\t\t\t'posts_per_page' => 50,\n\t\t\t's' => $keyword,\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'product_type',\n\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t'terms' => array( 'simple', 'variable', 'external', 'rentable','mix-and-match' ),\n\t\t\t\t\t'operator' => 'IN'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$the_query = new WP_Query( $arg );\n\t\t$found_products = array();\n\t\tif ( $the_query->have_posts() ) {\n\t\t\twhile ( $the_query->have_posts() ) {\n\t\t\t\t$the_query->the_post();\n\t\t\t\t$terms = wp_get_post_terms( get_the_ID(), 'product_type' );\n\t\t\t\tif ( $terms[0]->slug == 'variable' ) {\n\t\t\t\t\t$ex_title = esc_html__( ' (Variable #' . get_the_ID() . ')', 'woocommerce-lookbook' );\n\t\t\t\t} else {\n\t\t\t\t\t$ex_title = '';\n\t\t\t\t}\n\t\t\t\t$product = array( 'id' => get_the_ID(), 'text' => get_the_title() . $ex_title );\n\n\t\t\t\t$found_products[] = $product;\n\t\t\t}\n\t\t}\n\t\twp_send_json( $found_products );\n\t\tdie;\n\t}", "public function getProduct()\n {\n if (!in_array($this->session->userdata('user_level_8'), $this->common->csiUserRole())) {\n redirect('auth');\n }\n\n $projectCode = $this->input->get('code');\n $rows = $this->common->find('csi_product_master', 'project_code', $projectCode, 'product_name');\n echo json_encode($rows);\n }", "public function list_all_data()\n {\n\n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n }\n\n $this->load->library('pagination');\n\n $sort_col = $_GET[\"iSortCol_0\"];\n $sort_dir = $_GET[\"sSortDir_0\"];\n $limit = $_GET[\"iDisplayLength\"];\n $start = $_GET[\"iDisplayStart\"];\n $search = $_GET[\"sSearch\"];\n\n $config[\"total_rows\"] = $this->Producto_model->count_all_rows($search);\n\n $this->pagination->initialize($config);\n\n $data[\"links\"] = $this->pagination->create_links();\n\n $sort_col = $_GET[\"iSortCol_0\"];\n $sort_dir = $_GET[\"sSortDir_0\"];\n $limit = $_GET[\"iDisplayLength\"];\n $start = $_GET[\"iDisplayStart\"];\n $search = $_GET[\"sSearch\"];\n\n $arr = $this->Producto_model->get_data($sort_col, $sort_dir, $limit, $start, $search);\n\n $output = array(\n \"aaData\" => $arr,\n \"sEcho\" => intval($_GET[\"sEcho\"]),\n \"iTotalRecords\" => $config[\"total_rows\"],\n \"iTotalDisplayRecords\" => $config[\"total_rows\"],\n\n );\n echo json_encode($output);\n\n exit;\n }", "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Products::grid () )->search ();\n\t}", "function search()\n {\n $this->EE->load->helper('search');\n\n // Set the return location\n $return = ($this->EE->TMPL->fetch_param('return')) ? ($this->EE->TMPL->fetch_param('return')) : 'catalog/result';\n\n // Get the product search collection\n $term = ($this->EE->TMPL->fetch_param('term')) ? $this->EE->TMPL->fetch_param('term') : $this->EE->input->post('search', TRUE);\n\n $term = sanitize_search_terms($term);\n\n $hits = $this->_search_index($term);\n $hash = sha1(time().$term);\n $i=0;\n $product = array();\n foreach($hits as $hit){\n $tmp = $this->EE->product_model->get_products($hit[\"product_id\"]);\n // Check to make sure that a product is returned\n if(isset($tmp[0])){\n if($tmp[0][\"site_id\"] == $this->site_id){\n $product[$i] = $tmp[0];\n $product[$i][\"score\"] = round(100*$hit[\"score\"],2);\n $product[$i][\"row_count\"] = ($i+1);\n $i++;\n }\n }\n }\n\n // Count the products but set\n // a reasonable search result\n // limit\n $count = count($product);\n\n if($count > $this->_config[\"result_limit\"]){\n $lim = $count - 1;\n for($i=$this->_config[\"result_limit\"];$i<=$count;$i++){\n unset($product[$i]);\n }\n $count = $this->_config[\"result_limit\"];\n }\n $vars[0] = array(\n 'search_hash' => $hash,\n 'search_term' => $term,\n 'total_results' => count($product),\n 'results' => $product,\n 'no_results' => array(),\n 'result_filter_set' => ''\n );\n\n save_to_cache('search_'.$hash,serialize($vars));\n\n $this->EE->product_model->log_search($term,$hash,count($product),$this->EE->session->userdata[\"member_id\"]);\n $this->EE->functions->redirect($this->EE->functions->create_url($return.'/id/'.$hash));\n }", "public function searchProduct(){\n\t\t$limit = $this->mod_setting->getSlidshowNumber();\n\t\t$listSlideshows = self::getSlideShowHomePage($limit->data->setting_value);\n\n\n\t\t$advVerticalRightSmall = $this->mod_advertisment\n\t\t\t->getAdvertisementHomePage(\n\t\t\t\tself::HOMEPAGE,\n\t\t\t\tself::V_RIGHT_SMALL,\n\t\t\t\t3\n\t\t\t);\n\n\t\t$advVerticalLeftSmall = $this->mod_advertisment\n\t\t\t->getAdvertisementHomePage(\n\t\t\t\tself::HOMEPAGE,\n\t\t\t\tself::V_LEFT_SMALL,\n\t\t\t\t3\n\t\t\t);\n\n\t\t$advHorizontalLargeCenter = $this->mod_advertisment\n\t\t\t->getAdvertisementHomePage(\n\t\t\t\tself::HOMEPAGE,\n\t\t\t\tself::H_LARGE_CENTER,\n\t\t\t\t3\n\t\t\t);\n\n\t\t$advTops = $this->mod_advertisment\n\t\t\t->getAdvertisementHomePage(\n\t\t\t\tself::HOMEPAGE,\n\t\t\t\tself::HOME_PAGE_TOP,\n\t\t\t\t1\n\t\t\t);\n\n\t\t$province = Request::input('location');\n\t\t$transferType = Request::input('transferType');\n\t\t$condition = Request::input('condition');\n\t\t$price = Request::input('price');\n\t\t$date = Request::input('date');\n\t\t$displayNumber = Request::input('displayNumber');\n\t\t$categorId = Request::input('categoryId');\n\n\t\t$products = $this->mod_product->searchProductFromCategory(\n\t\t\t$province,\n\t\t\t$transferType,\n\t\t\t$condition,\n\t\t\t$price,\n\t\t\t$date,\n\t\t\t$displayNumber\n\t\t);\n\t\t$category = $this->mod_category->getMainCategories($categorId);\n \t\t$mainCategoryDetail = $this->mod_category->getMainCategoriesForDetail($categorId);\n\t\treturn View::make('frontend.modules.search.index')\n\t\t\t->with('slideshows', $listSlideshows->result)\n\t\t\t->with('advVerticalRightSmalls', $advVerticalRightSmall->result)\n\t\t\t->with('advVerticalLeftSmalls', $advVerticalLeftSmall->result)\n\t\t\t->with('advHorizontalLargeCenters', $advHorizontalLargeCenter->result)\n\t\t\t->with('advTops', $advTops->result)\n\t\t\t->with('products', $products)\n\t\t\t->with('transferTypes', $this->mod_product->listAllTransferType())\n\t\t\t->with('conditions', $this->mod_product->listAllConditions())\n\t\t\t->with('detailCategory', $category->result)\n\t\t\t->with('MaindetailCategory', $mainCategoryDetail->result)\n\t\t\t->with('client_type',$this->mod_category->getClientType())\n\t\t\t->with('pro_transfer_type',$this->mod_category->getProductTransfterType())\n\t\t\t->with('Provinces', $this->mod_setting->listProvinces());\n\t}", "public function search() {\n $product = $this->model('Product');\n\n if (empty($_POST[\"search\"])) {\n $this->view('vwHome', $product->products);\n } else {\n $product->searchProduct($_POST[\"search\"]);\n \n $this->view('vwHome', $product->products);\n }\n }", "public function actionAjaxSearch() {\r\n $media = new Media();\r\n $data = array();\r\n if (isset($_POST['keyword']) && $_POST['keyword']) {\r\n $keyword = $_POST['keyword'];\r\n $data = $media->getMedias(0, 0, array('like', 'f.title', \"%$keyword%\"), false);\r\n }\r\n echo json_encode($data);\r\n }", "public static function json_search_products($term = '', $include_variations = \\false)\n {\n }", "function supplier_search()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Supplier->get_suppliers_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "public function search() {\n $buyitnow = Request::get('buyitnow');\n $auction = Request::get('auction');\n\n //search\n $productsearch = Request::get('search');\n $products = ProductModel::search($productsearch, Request::get('international'), \n\t\t\tRequest::get('country'), Request::get('auction'), Request::get('condition'),\n\t\t\tRequest::get('categories'));\n\n\n $this->View->render('products/search', array(\n 'productsearch' => $productsearch,\n 'products' => $products));\n }", "function property_search(){\t\t\n\t\tif (isset($_GET['term']))\n\t\t{\n\t\t\t$search_value = strtolower($_GET['term']);\n\t\t\t\n\t\t\t$search = $this->Basicmodel->product_name_search($search_value);\n\t\t\t print_r($search ); exit; \n\t\t\techo $search;\n\t\t}\n\t}", "function getProducts_AjaxCallback() {\n $pid = $_POST['pid'];\n global $wpdb;\n $results = $wpdb->get_results($wpdb->prepare(\"SELECT pprod.id, pprod.name, pp.cost_price, pp.sale_price, pp.expiry_date\n FROM wp_erp_acct_products as p \n INNER JOIN wp_fgpt_productproperties pp on p.id = pp.parent_prod_id\n INNER JOIN wp_erp_acct_products pprod on pprod.id = pp.prod_id\n WHERE p.id = %d\", $pid));\n echo json_encode($results);\n wp_die();\n}", "public function getProductsAction()\n {\n $filter = $this->Request()->getParam('filter');\n $offset = $this->Request()->getParam('start', 0);\n $limit = $this->Request()->getParam('limit', 100);\n $sort = $this->Request()->getParam('sort');\n\n $query = $this->getRepository('Product')->getProductsListQuery(\n $filter, $sort, $offset, $limit\n );\n\n // set the paginator and result\n $paginator = new Zend_Paginator_Adapter_DbSelect($query);\n $totalCount = $paginator->count();\n $result = $paginator->getItems($offset, $limit);\n\n $data = array();\n foreach ($result as $key => $product) {\n // initialize blhasdetails\n $product['blhasdetails'] = false;\n\n // get the sps params\n $aData = unserialize($product['ycSpsDetails']);\n\n // set blhasdetails\n $product['blhasdetails'] = ($aData !== false) ? true : false;\n unset($aData['id']); // remove empty-id value\n\n // get response first\n $aRsp = unserialize($product['ycResponse']);\n\n // convert object 2 array\n if (is_object($aRsp)) {\n $aRsp = json_decode(json_encode($aRsp), true);\n }\n\n if (count($aRsp)) {\n $aData['isaccepted'] = $this->isResponseAccepted($aRsp);\n $aData['ycResponse'] = $this->getJsonEncodedData($aRsp);\n }\n\n // merge if data\n if ($aData !== false) {\n // set blhasdetails\n $product['blhasdetails'] = true;\n $product = array_merge($product, $aData);\n }\n\n $data[] = $product;\n }\n\n $this->View()->assign(array('data' => $data, 'success' => true, 'total' => $totalCount));\n }", "public function listProducts() {\n\t\t$type = filter_input(INPUT_POST, \"productType\");\n\t\t$products = ProductDB::getInstance()->getProductsByType($type);\n\t\t$employee = $_SESSION['employee'];\n\t\t$view = new ProductsListView();\n\t\t$view->show($products, $employee);\n\t}", "public function initContent()\n {\n $this->php_self = 'productsearch';\n\n parent::initContent();\n\n if ($this->ajax_search && !$this->isTokenValid()) {\n # validate module\n $this->ajaxDie(Tools::jsonEncode(array('products' => array())));\n }\n \n// if (!$this->isTokenValid()) {\n// # validate module\n// Tools::redirect('index.php');\n// }\n\n if ($this->ajax || $this->ajax_search) {\n $this->ajaxDie(Tools::jsonEncode($this->getAjaxProductSearchVariables()));\n }\n // $products = $this->getProducts();\n $search_products = $this->getProducts();\n // $search_products['products'] = $products;\n $this->context->smarty->assign(array(\n 'search_products' => $search_products,\n 'search_query' => $this->search_string,\n 'nbProducts' => $search_products['pagination']['total_items'],\n ));\n $this->setTemplate('module:leoproductsearch/views/templates/front/search.tpl');\n }", "function wp_ajax_fetch_list()\n{\n}", "public function listAction()\n {\n $img = $this->_getParam('img');\n if (!empty($img))\n {\n $this->downloadAction();\n exit;\n }\n\n $this->view->params['actions'] = $this->_request->getPathInfo();\n /* List products */\n $oProducts = new CatalogCollection($this->view->params);\n $products = $oProducts->getList();\n\n// $searchCount = count($products);\n\n /* Params */\n $blockParams = $oProducts->getBlockParams();\n $categorieId = $oProducts->getCatId();\n $productId = $oProducts->getProdId();\n\n $url = $this->view->absolute_web_root\n . ltrim($this->getRequest()->getPathInfo(), '/');\n Cible_View_Helper_LastVisited::saveThis($url);\n if (!$categorieId && !empty($blockParams[1])){\n $categorieId = $blockParams[1];\n }\n\n if (!$productId)\n {\n// $searchWords = (isset($this->view->params['keywords']) && $this->view->params['keywords'] != $this->view->getCibleText('form_search_catalog_keywords_label')) ? $this->view->params['keywords'] : '';\n\n /* Search form */\n // $searchForm = new FormSearchCatalogue(\n // array(\n // 'categorieId' => $categorieId,\n // 'subCategoryId' => $subCategoryId,\n // 'keywords' => $searchWords)\n // );\n //\n // $this->view->assign('searchForm', $searchForm);\n// $oCategory = new CatalogCategoriesObject();\n if ($categorieId > 0){\n $oCategory = $oProducts->getOCategory();\n\n $category = $oCategory->populate($categorieId, $this->_registry->languageID);\n $oCategory->getDataCatagory($this->_registry->languageID, false, $categorieId);\n $stringUrl = implode('/', $oCategory->setCategoriesLink()->getLink());\n $this->view->assign('stringUrl', $stringUrl);\n $this->view->assign('title', $category['CCI_Name']);\n }\n $lastSearch = array();\n if(!empty ($searchWords))\n $lastSearch['keywords'] = $searchWords;\n\n $this->view->assign('searchUrl', $lastSearch);\n\n $page = 1;\n $paginator = new Zend_Paginator( new Zend_Paginator_Adapter_Array( $products ) );\n $paginator->setItemCountPerPage( $oProducts->getLimit() );\n\n// $filter = $oProducts->getFilter();\n $paramPage = $this->_request->getParam('page');\n $page = (isset($paramPage)) ? $this->_request->getParam('page') : ceil($page/$paginator->getItemCountPerPage());\n\n $paginator->setCurrentPageNumber($page);\n\n $this->view->assign('categoryId', $categorieId);\n\n $this->view->assign('params', $oProducts->getBlockParams());\n $this->view->assign('paginator', $paginator);\n\n// $this->view->assign('keywords', $searchWords);\n// $this->view->assign('searchCount', $searchCount);\n// $this->view->assign('filter', $filter);\n\n if(isset($category['CCI_ValUrl']))\n echo $this->_registry->set('selectedCatalogPage', $category['CCI_ValUrl']);\n\n $this->renderScript('index/' . $oProducts->getType());\n\n }\n else\n {\n $this->view->headScript()->appendFile($this->view->locateFile('jquery.cycle2.min.js', 'jquery'));\n $this->view->headScript()->appendFile($this->view->locateFile('jquery.cycle2.swipe.min.js', 'jquery'));\n// $this->_registry->set('category', $this->_registry->get('catId_'));\n// $this->_registry->set('productCase','1');\n $url = $this->view->absolute_web_root\n . $this->getRequest()->getPathInfo();\n Cible_View_Helper_LastVisited::saveThis($url);\n $this->_registry->set('selectedCatalogPage', $products['data']['CCI_ValUrl']);\n $this->view->imgProductPath = $this->_rootImgPath . 'products/';\n $this->view->assign('productDetails', $products);\n $this->view->assign('nbRelated', $this->_config->catalog->nbRelated);\n $this->renderScript('index/detail-product.phtml');\n }\n }", "public function suggest()\n\t{\n\t\t$suggestions = $this->xss_clean($this->ProductModel->get_search_suggestions($this->input->get('term'), TRUE));\n\n\t\techo json_encode($suggestions);\n\t}", "public function index(){\n $data = array();\n if (!empty($this->input->post())){\n $data = $this->product_model->get_product();\n echo json_encode($data);\n exit();\n }\n $data['js'] = 'admin/product_table.js';\n $this->render('index',$data);\n }", "public function getAllProducts(){\n\t\t// call to model function to get all products from db\n\t\t$result = $this->product_model->getAllProducts();\n\t\techo json_encode($result);\n\t}", "function kuvapankki_ajax_search()\n{\n $kapi = KuvapankkiAPI::get_instance();\n $params = $_POST['params'];\n $data = $kapi->search($params);\n\n if (!$data) {\n return kuvapankki_error(__('Haku epäonnistui'));\n }\n\n // Add thumbnail url to images\n $data['data'] = array_map(function ($product) use ($kapi) {\n // Mapception, eww\n $product['files'] = array_map(function ($file) use ($kapi) {\n $file['url'] = kuvapankki_image_url($file, false);\n $file['thumbnail_url'] = kuvapankki_image_url($file, true);\n\n return $file;\n }, $product['files']);\n\n return $product;\n }, $data['data']);\n \n // Return results\n return kuvapankki_success($data);\n}", "public function searchAction() {\n\t \n\t if($this->getRequest()->isXmlHttpRequest()){\n\t \n \t $term = $this->getParam('term');\n \t $id = $this->getParam('id');\n \t \n \t if(!empty($term)){\n \t $term = \"%$term%\";\n \t $records = Customers::findbyCustomfield(\"(firstname LIKE ?) OR (lastname LIKE ?) OR company LIKE ?\", array($term,$term,$term));\n \t die(json_encode($records));\n \t }\n \t \n \t if(!empty($id)){\n \t $records = Customers::get_by_customerid($id);\n \t die(json_encode($records));\n \t }\n \t \n \t $records = Customers::getAll();\n \t\tdie(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}", "public function ajax_product_info() {\n $this->layout = 'none';\n if (is_ajax_requested() && $this->input->post()) {\n $post = $this->input->post();\n $this->load->model('Cashier_model');\n $json = array();\n if (!isset($post['product_id'])) {\n $json['error'] = alert_box('Mohon pilih Produk.','error');\n }\n $data = $this->Cashier_model->getProductInfo($post['product_id']);\n if (!$data) {\n $json['error'] = alert_box('Produk tidak ada. Mohon pilih Produk yang lain<br/>.');\n }\n if (!$json) {\n $json['value'] = $data;\n }\n echo json_encode($json);\n }\n }", "public function getList()\n {\n $params = $this->params()->fromQuery();\n\n $entityManager = $this->getEntityManager()\n ->getRepository('StockRest\\Entity\\Product');\n \n $product = new Product();\n $paginator = $product->find($entityManager, $params); \n\n $data = array();\n\n foreach ($paginator as $product) {\n $data[] = $product->toArray();\n }\n\n return new JsonModel(array(\n 'data' => $data,\n 'success' => true,\n )); \n }", "public function get_products()\n {\n }", "function item_search()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Item->get_item_search_suggestions($this->input->get('term'),100);\n\t\t$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->get('term'),100));\n\t\techo json_encode($suggestions);\n\t}", "public function getProducts();", "public function getProducts();", "public function do_ajax_product_import()\n {\n }", "public function getProductListHtml()\n {\n $html = parent::getProductListHtml();\n $html = Mage::helper('ajaxify')->wrapProducts($html);\n return $html;\n }", "public function getList($products);", "function master_jual_produk_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$result=$this->m_master_jual_produk->master_jual_produk_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function lists() {\n $query = $this->Md->query(\"SELECT * FROM product\");\n echo json_encode($query);\n }", "public function indexAction(){\r\n\t\t$post = getallheaders();\r\n\t\t\t$data = (array)json_decode(file_get_contents(\"php://input\"));\r\n\t\t\t$result = array('statusCode' => '200','statusDescription' => 'success');\r\n\t\t\tif (Mage::helper('dream_mobile') -> authenticate($post['Sessionid'])) {\r\n\t\t\t\t$searchQuery=$data['search_query'];\r\n\t\t\t\t\r\n\t\t\t\t/// product \r\n\t\t\t\t$collection = Mage::getModel('catalog/product') -> getCollection();\r\n\r\n\t\t\t\t$collection -> addAttributeToFilter('name', array( array('like' => '%' . $searchQuery . '%')// starts with needle and space after\r\n\t\t\t\t)) -> addAttributeToFilter('visibility', 4) -> addAttributeToFilter('status', 1);\r\n\t\t\t\t\r\n\t\t\t\tforeach($collection as $product){\r\n\t\t\t\t\t$result['catalog_info'][]=array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'name'=>$product->getName(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'product_id'=>$product->getId(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'parent_category'=>null,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'category_id'=>null\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t/// category\r\n\t\t\t\t$category_collection = Mage::getSingleton('catalog/category') \r\n\t\t\t\t\t\t-> getCollection() \r\n\t\t\t\t\t\t-> addAttributeToSelect('*') \r\n\t\t\t\t\t\t-> addFieldToFilter('is_active', 1)\r\n\t\t\t\t\t\t-> addFieldToFilter('include_in_menu', '1') \r\n\t\t\t\t\t\t;\r\n\t\t\t\t\t\t\r\n\t\t\t\t$category_collection -> addAttributeToFilter('name', array( array('like' => '%' . $searchQuery . '%')));\r\n\t\t\t\tforeach ($category_collection as $category) {\r\n\t\t\t\t\t$p_name = '';\r\n\t\t\t\t\t$p_cat='';\r\n\t\t\t\t\tforeach ($category->getParentCategories() as $item) {\r\n\t\t\t\t\t\tif($p_cat=='')\r\n\t\t\t\t\t\t\t$p_cat=$item -> getName();\r\n\t\t\t\t\t\telseif($item->getName()!=$category->getName())\r\n\t\t\t\t\t\t\t$p_name = $item -> getName() . ' in ' . $p_name;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$p_name=substr($p_name, 0, -4);\t\r\n\t\t\t\t\t$category_name='';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($p_name)\r\n\t\t\t\t\t\t$category_name= trim($category -> getName() ). \" in \" . $p_name ;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$category_name= trim($category -> getName());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$result['catalog_info'][]=array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'name'=>$category_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'product_id'=>null,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'parent_category'=>\"in \".$p_cat,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'category_id'=>$category->getId()\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$result = array('statusCode' => '400', 'statusDescription' => 'failed', 'error' => 'Session token expired OR Invalid Session id, Please generate a new API session');\r\n\t\t\t}\r\n\t\t\r\n\t\t$this -> getResponse() -> setHeader('Content-Type', 'application/json') -> setHeader('SessionId', $post['Sessionid']) -> appendBody(json_encode($result,JSON_UNESCAPED_SLASHES));\r\n\t}", "public function listing()\n {\n //\n $request = \\Request::only('search');\n $products = Product::filter($request)->get();\n\n return view('admin.products.listing', ['products' => $products, 'request' => $request]);\n }", "public static function getListProductAjax($params, $id, $limit)\n {\n $rs = self::getListProductData($params, $id, $limit);\n return $rs;\n }", "public function findProduct(){\n\t\t\n\t\t$datas['cars'] = $this->m_product->getCarbyName($_POST['typingdata']);\n\t\t$x=0;\n\t\tforeach ($datas['cars'] as $key => $value) {\n\t\t\t# code...\n\t\t\t//print_r($value);\n\t\t\t$datas['image'][$x] = $this->m_product->getAllImage($value['id']);\n\t\t\t//print_r($data['image']);\n\t\t\t$x++;\n\t\t}\n\t\t// $data = array(\n\t\t// \t'13'=> array(\n\t\t// \t\t'nama_mobil'=>'BWM' ,\n\t\t// \t\t'price' => 'Rp. 16M'\n\t\t// \t),\n\t\t// \t'14'=> array(\n\t\t// \t\t'nama_mobil' => 'Kijang' ,\n\t\t// \t\t'price' => 'Rp. 15M'\n\t\t// \t)\n\t\t// );\n\t\techo json_encode($datas);\n\t}", "function ozh_get_ozhands_products_list( ) {\n\tglobal $ozhands_site;\n\t\n\t$url = $ozhands_site.'/wp-json/dokan/get_products_list/v1';\n\treturn ozh_get_contents( $url );\n}", "public function searchProductByMultiQuery(){\n \n $request = Request::createFromGlobals();\n \n $method = $request->getMethod();\n\n $name = NULL;\n \n $query = NULL;\n if($method == 'POST'){\n $query = $request->request;\n }\n else{\n //TODO: Send Error msg\n $query = $request->query;\n }\n\n $name = $request->query->get('name');\n $description = $request->query->get('description');\n\n \n //Access to database for count\n $em = $this->getDoctrine()->getEntityManager();\n $totalItemsLength = $em->getRepository('TecnokeyShopBundle:Shop\\Product')->searchByWordFullCount($name);\n //End access to database for count\n \n //Set Pagination\n $pagination = $this->get('view.pagination')->calcPagination($totalItemsLength); \n $products = null;\n if($pagination != NULL){\n $currentRange = $pagination->getCurrentRange();\n $products = $em->getRepository('TecnokeyShopBundle:Shop\\Product')->searchByWordFull($name, \"OR\", null, $currentRange['offset'], $currentRange['lenght']);\n \n }\n //End Setting Pagination\n \n //set the delete form for every product\n $deleteForms = array();\n foreach ($products as $product) {\n $form = $this->createDeleteForm($product->getId());\n $deleteForms[$product->getId()] = $form->createView();\n }\n //end setting the delete form for every product\n\n return $this->render('TecnokeyShopBundle:Backend/Search:products.html.twig', \n array('products' => $products, \n 'deleteForms' => $deleteForms,\n 'pagination' => $pagination,\n 'search' => array('name' => $name)\n ));\n }", "public function actionIndex()\n {\n\n if (Yii::$app->request->isAjax && Yii::$app->request->post('hasEditable')) {\n $productId = Yii::$app->request->post('editableKey');\n $model = $this->findModel($productId);\n\n $out = ['output'=>'', 'message'=>''];\n $posted = current(Yii::$app->request->post('Product'));\n $post = ['Product' => $posted];\n\n if ($model->load($post) && $model->save()) {\n $out['message'] = '';\n } else {\n $out['message'] = 'Error in request';\n }\n\n echo Json::encode($out);\n return;\n } else {\n\n $categories = Category::find()->orderBy('title')->asArray()->all();\n $stores = Store::find()->orderBy('title')->asArray()->all();\n\n $searchModel = new ProductSearch();\n $searchModel->setFeatured();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'categories' => $categories,\n 'stores' => $stores\n ]);\n }\n }", "function getsearch($tipe=\"\",$indexField=\"\",$formName=\"\",$getdata=\"\"){\n\t\t$this->load->model(\"search_act\");\n\t\t$arrdata = $this->search_act->search($tipe,$indexField,$formName,$getdata);\n\t\t$data = $this->load->view(\"list\", $arrdata, true);\n\t\tif($this->input->post(\"ajax\")){\n\t\t\techo $arrdata;\n\t\t}else{\n\t\t\techo $data;\n\t\t}\n\t}", "public function searchResultAction()\n {\n $rep = new ProductsRepository();\n $products = $rep->findProducts($this->get('query'));\n\n // pass to template\n $this->add(\"products\", $products);\n $this->setTemplate('search_results');\n }", "public function search()\n {\n $search = $this->input->get_post('q');\n $sql = \"SELECT * FROM `product` WHERE `product_title` LIKE '%$search%' OR sku LIKE '$search%' ORDER BY product_id DESC\";\n $data['products'] = get_result($sql);\n\n $this->load->view('website/header', $data);\n $this->load->view('website/search', $data);\n $this->load->view('website/footer', $data);\n }", "function get_home_products(){\n\t\tif ($this->input->is_ajax_request()) {\n\t\t\t$offset = $this->input->post('offset');\n\t\t\t$offset = ($offset > 0)? $offset :0;\n\n\t\t\t$render_data['products'] = $this->welcome_model->get_products($offset);\n\t\t\t$total_products = $this->welcome_model->numrows;\n\t\t\t$data['offset'] = $offset +HOME_PAGE_LIMIT_PRODUCTS;\n\t\t\t$data['next_page'] = false;\n\t\t\tif($total_products > $data['offset']){\n\t\t\t\t$data['next_page'] = true;\n\t\t\t}\n\n\t\t\t$data['html'] = $this->parser->parse('pr_block_new',$render_data,true);\n\t\t\techo json_encode($data);die;\n\t\t}\n\t}", "function getProducts($link){\n\t\t$html=file_get_html($link);\n\t\t$data=[];\n\t\tforeach( $html->find(\".wrapper-main .container + div .em-col-main ul li .product-item\") as $products ) \n\t\t{\n\t\t\t$product=[];\n\t\t $title=$products->find('.product-shop p a',0)->plaintext;\n\t\t $product['Title']=$title;\n\t\t $price=$products->find('.product-shop .price-box .special-price .price',0)->plaintext;\n\t\t $product['Price']=$price;\n\t\t $image=$products->find('.top-product-shop a img',0)->{'src'};\n\t\t $product['Image']=$image;\n\t\t \n\t\t \n\t\t $data[]=$product;\n\t\t \n\t\t\t\n\t\t}\n\t\t$output = json_encode($data);\n\t\techo $output;\n\t}", "public static function json_search_products_and_variations()\n {\n }", "public function stockProductList()\n {\n\n if (isset($_POST[\"post\"])) {\n\n $data = json_decode($_POST[\"post\"],true);\n\n /* limit, offset and sql*/\n $limit = $data[\"itemPerPage\"];\n $offset = ($data[\"pageNumber\"] - 1) * $limit;\n $sql = \"\";\n $params = array();\n /* limit, offset and sql*/\n\n\n /* adding filter */\n if ($data[\"filters\"][\"txtStockProductName\"] != \"\") {\n $sql .= \" AND tbl_stock_products.stock_product_name LIKE :stock_product_name\";\n $params[\"stock_product_name\"] = \"%\".$data[\"filters\"][\"txtStockProductName\"].\"%\";\n }\n if ($data[\"filters\"][\"txtStockProductCategoryId\"] != \"\") {\n $sql .= \" AND tbl_stock_products.stock_product_category_id=:stock_product_category_id\";\n $params[\"stock_product_category_id\"] = $data[\"filters\"][\"txtStockProductCategoryId\"];\n }\n /* adding filter */\n\n\n $model = new Model();\n //\n // print_r($params);\n //\n // echo \"SELECT tbl_stock_products.stock_product_id,tbl_stock_products.stock_product_name,tbl_categories.category_name\n // FROM tbl_stock_products\n // INNER JOIN tbl_categories ON tbl_categories.category_id=tbl_stock_products.stock_product_category_id\n // WHERE tbl_stock_products.stock_product_id IS NOT NULL\n // $sql\n // LIMIT $limit OFFSET $offset\";\n\n /*selecting stockProducts*/\n $stmt = $model->dbh->prepare(\n \"SELECT tbl_stock_products.stock_product_id,tbl_stock_products.stock_product_name,tbl_categories.category_name,tbl_stores.store_name\n FROM tbl_stock_products\n INNER JOIN tbl_categories ON tbl_categories.category_id=tbl_stock_products.stock_product_category_id\n INNER JOIN tbl_stores ON tbl_stores.store_id=tbl_stock_products.stock_product_store_id\n WHERE tbl_stock_products.stock_product_id IS NOT NULL\n $sql\n LIMIT $limit OFFSET $offset\"\n );\n $stmt->execute($params);\n $stockProducts = $stmt->fetchAll(PDO::FETCH_ASSOC);\n /*selecting stockProducts*/\n\n\n /* total stockProduct number */\n $stmt = $model->dbh->prepare(\"SELECT COUNT(stock_product_id) AS total_stock_product_number FROM tbl_stock_products WHERE stock_product_id IS NOT NULL $sql\");\n $stmt->execute($params);\n $totalStockProductNumber = $stmt->fetch()[\"total_stock_product_number\"];\n /* total stockProduct number */\n\n /* total page number */\n $totalPageNumber = $totalStockProductNumber / $limit;\n /* total page number */\n\n $model = null;\n\n echo json_encode(array(\n \"data\"=>$stockProducts,\n \"totalPageNumber\"=>$totalPageNumber,\n \"doesHaveProfile\"=>false\n ));\n\n }else {\n $model = new Model();\n\n /* categories */\n $stmt = $model->dbh->prepare(\"SELECT category_id,category_name FROM tbl_categories\");\n $stmt->execute();\n $categories = $stmt->fetchAll();\n /* categories */\n\n $model = null;\n\n $this->view->categories = $categories;\n $this->view->render('units/stock-product/stock-product-list');\n }\n\n }", "public function Productlisting(Request $request)\n {\n try {\n $returnData = UtilityController::Setreturnvariables();\n if ($request->has('page')) {\n $page = $request->page;\n } else {\n $page = 1;\n }\n $userId = $request->user()->id;\n ## products\n $products = Product::select('*')->isActive()->notMe($userId);\n\n if ($request->has('id') && !empty($request->id)) {\n $categories = [];\n foreach ($request->id as $key => $value) {\n $subAttrib = \\App\\SubAttributes::find($value);\n $subCat = $subAttrib->attribute_id;\n $categories[$subCat][] = $subAttrib->id;\n }\n $collection = $categories;\n } else {\n $collection = [];\n }\n\n ## filter for product attributes\n if (!empty($collection)) {\n $ids = $collection;\n foreach ($ids as $key => $id) {\n $products = $products->whereHas('attributes', function ($query) use ($id, $key) {\n $query->where('sub_attributes.attribute_id', $key)->whereIn('sub_attributes.id', $id);\n });\n }\n }\n ## search string. if user typed anything\n if ($request->has('search_string')) {\n $search = $request->search_string;\n ## all products\n $products = $products->where(function ($query) use ($search) {\n $query->where('title', 'like', '%' . $search . '%')\n ->orWhere('description', 'like', '%' . $search . '%');\n });\n }\n ## get related records\n if ($request->has('sort_by')) {\n if ($request->sort_by == 2) {\n ## price high to low\n $products = $products->orderBy('price', 'desc');\n } elseif ($request->sort_by == 3) {\n ## price low to high\n $products = $products->orderBy('price', 'asc');\n } elseif ($request->sort_by == 4) {\n ## sold out\n $products = $products->where('status', 3);\n } else {\n ## noramal sorting by user products\n $products = $products->orderBy('id', 'desc');\n }\n } else {\n $products = $products->orderBy('id', 'desc');\n }\n\n $products = $products->with('images');\n $products = $products->with('attributes');\n $products = $products->get();\n $pagination = UtilityController::Custompaginate($products, $this->perPage, $page, ['path' => url('/productListings')])->toArray();\n\n $responseData = ['status' => 1, 'status_code' => 200, 'message' => 'Success!'] + $pagination;\n return response()->json($responseData, 200);\n } catch (\\Exception $e) {\n $sendExceptionMail = UtilityController::Sendexceptionmail($e);\n //Code to send mail ends here\n return UtilityController::Setreturnvariables();\n }\n\n }", "function results()\n {\n $ajax = $this->EE->TMPL->fetch_param('ajax','no');\n $form_class = $this->EE->TMPL->fetch_param('form_class','');\n\n $url = $this->EE->uri->uri_to_assoc();\n $hash = $url[\"id\"];\n if($str=read_from_cache('search_'.$hash)){\n $vars = unserialize($str);\n }else{\n $this->EE->functions->redirect($this->EE->functions->fetch_site_index(0,0));\n }\n // If there are no results then we'll return the\n // the no result tag\n\n if($vars[0][\"total_results\"] == 0){\n $no_result = true;\n }else{\n // We have results but lets filter them\n // and make sure we don't end up with no\n // results\n $url = $this->EE->uri->uri_to_assoc();\n $hash = $url[\"id\"];\n $vars = $this->_filter_results($vars,$hash);\n\n if($vars[0][\"total_results\"] == 0){\n $no_result = true;\n }else{\n $no_result = false;\n }\n }\n\n // Do the output\n if($no_result == true){\n $output = $this->EE->TMPL->parse_variables($this->EE->TMPL->no_results(), $vars);\n }else{\n\n $action = $this->EE->functions->fetch_site_index(0,0).QUERY_MARKER.'ACT='.$this->EE->functions->fetch_action_id('Brilliant_retail', 'cart_add');\n if($ajax == 'yes')\n {\n $action .= '&ajax=yes';\n }\n\n $tmp = array();\n $i = 0;\n foreach($vars[0][\"results\"] as $v){\n $p = $this->_get_product($v[\"product_id\"]);\n $tmp[$i] = $p[0];\n\n $tmp[$i][\"product_count\"] = $i+1;\n\n // Setup the form open tag\n $form_details = array(\n 'action' => $action,\n 'name' => 'form_'.$tmp[$i][\"product_id\"],\n 'id' => 'form_'.$tmp[$i][\"product_id\"],\n 'class' => $form_class,\n 'hidden_fields' => array(\n $tmp[$i][\"product_id\"].\"_product_id\" => $tmp[$i][\"product_id\"]\n )\n );\n\n $tmp[$i][\"form_open\"] = $this->EE->functions->form_declaration($form_details);\n $tmp[$i][\"form_close\"] = '</form>';\n $i++;\n }\n unset($vars[0][\"results\"]);\n $vars[0][\"results\"] = $tmp;\n $output = $this->EE->TMPL->parse_variables($this->EE->TMPL->tagdata, $vars);\n }\n\n $this->switch_cnt = 0;\n $output = preg_replace_callback('/'.LD.'product_switch\\s*=\\s*([\\'\\\"])([^\\1]+)\\1'.RD.'/sU', array(&$this, '_parse_switch'), $output);\n return $this->return_data = $output;\n\n return $output;\n }", "public function index() {\n if (\\Input::get('search')) {\n $products = \\Products::orderBy('ProductID', 'desc');\n if (\\Input::has('s_ProductName')) {\n $products = $products->where('ProductName', 'LIKE', '%' . trim(\\Input::get('s_ProductName')) . '%');\n }\n if (\\Input::has('cat1')) {\n $products = $products->where('sub1', trim(\\Input::get('cat1')));\n }\n if (\\Input::has('cat2')) {\n $products = $products->where('sub2', trim(\\Input::get('cat2')));\n }\n if (\\Input::has('s_ProductCode')) {\n $products = $products->where('ProductCode', 'LIKE', '%' . trim(\\Input::get('s_ProductCode')) . '%');\n }\n $rs = $products->where('disabled', 0)->paginate(20);\n } else {\n $rs = \\DB::table('products')\n ->where('disabled', 0)\n ->orderBy('ProductID', 'desc')\n ->paginate(20);\n }\n $categories = \\Categorize::getCategoryProvider()->root()->whereType('product')->get();\n $ct = \\Categorize::tree($categories);\n $arr_cat = array();\n foreach ($ct as $val) {\n $arr_cat[$val->id] = $val->title;\n }\n $data['page'] = array(\n 'title' => 'ตะกร้าสินค้า',\n 'result' => $rs,\n 'category' => $arr_cat,\n 'small_banner' => \\App::make('WidgetController')->widget('small_banner'),\n 'brands_list' => \\App::make('WidgetController')->widget('brands_list')\n );\n return \\View::make('frontend.jshopping.index1', $data);\n }", "public function products(Request $request,$slug = \"\"){\n\n\t\tif($request->ajax()){\n\t\t\t$store = StoreDetail::select('id')\n\t\t\t->where('domain_name', config('custom.host_name'))\n\t\t\t->first();\n\n\t\t\t$limit=$request[\"limit\"];\n\t\t\t$offset=$request['offset'];\n\t\t\t$attributeids=$request[\"attributeids\"];\n\t\t\t$atributeSearch='no';\n\t\t\t$cond=\"products.id != '0' and products.status = '1' and products.store_detail_id = '\".$store->id.\"'\";\n\t\t\tif($attributeids){\n\t\t\t\t$atributeSearch='yes';\n\t\t\t\t$attributeidArray=explode(',',$attributeids);\n\n\t\t\t\tif(!empty($attributeidArray)){\n\n\t\t\t\t\t$attributeCond=\"(\";\n\t\t\t\t\tforeach($attributeidArray as $attribute){\n\n\t\t\t\t\t\t$attributeCond.=\" (product_combination.value_id ='\".$attribute.\"' OR product_combination.value_id LIKE '%,\".$attribute.\"' OR product_combination.value_id LIKE '\".$attribute.\",%' OR product_combination.value_id LIKE '%,\".$attribute.\",%') or\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$cond.=\" and \".rtrim($attributeCond,'or ').\")\";\n\t\t\t\t}\n\n\t\t }\n\n\n\t\t\tif(isset($request->cate_slug)){\n\t\t\t\t$cond.=\" and categories.category_name ='\".$request->cate_slug.\"'\";\n\t\t\t}\n\n\t\t\tif($request->min_price){\n\t\t\t\t$cond.=\" and products.price >='\".$request->min_price.\"'\";\n\t\t\t}\n\t\t\tif($request->max_price){\n\t\t\t\t$cond.=\" and products.price <='\".$request->max_price.\"'\";\n\t\t\t}\n\n\t\t\t$sortOrder=$request[\"sort_order\"];\n\n\t\t\tif($sortOrder == 'a'){\n\t\t\t\t$order = \"ORDER BY products.id DESC\";\n\t\t\t}elseif($sortOrder == 'b'){\n\t\t\t\t$order = \"ORDER BY products.title DESC\";\n\t\t\t}elseif($sortOrder == 'c'){\n\t\t\t\t$order = \"ORDER BY products.price ASC\";\n\t\t\t}elseif($sortOrder == 'd'){\n\t\t\t\t$order = \"ORDER BY products.price DESC\";\n\t\t\t}elseif($sortOrder == 'e'){\n\t\t\t\t$order = \"ORDER BY products.id DESC\";\n\t\t\t}else{\n\t\t\t\t$order = \"ORDER BY products.id DESC\";\n\t\t\t}\n\n\t\t\tif($atributeSearch=='yes'){\n\n\t\t\t\t$products = DB::select('SELECT products.* FROM products INNER JOIN categories ON categories.category_name=products.category INNER JOIN product_combination ON product_combination.product_id=products.id where '.$cond.' '.$order.' LIMIT '.$limit.' OFFSET '.$offset);\n\n\t\t\t}else{\n\n\t\t\t\t$products = DB::select('SELECT products.* FROM products INNER JOIN categories ON categories.category_name=products.category where '.$cond.' '.$order.' LIMIT '.$limit.' OFFSET '.$offset);\n\t\t\t}\n\n\t\t\t if($products){\n\n\t\t\t\t$json['status']=true;\n\t\t\t\t$json['total']=count($products);\n\t\t\t\t$json['html']=view('web-layouts.products_listing_render')->with('products',$products)->render();\n\n\t\t\t}else{\n\n\t\t\t\t$json['status']=false;\n\t\t\t\t$json['total']=0;\n\t\t\t\t$json['html']='<div class=\"col-md-12\" style=\"padding-top: 200px;display: flex;align-items: center;justify-content: center;\"><img style=\"height:150px\" src=\"'.asset('notfound.PNG').'\" /></div>';\n\t\t\t}\n\n\t\t\treturn response($json,200);\n\t\t}\n\n\t\t$category=Category::where('status','1')->get();\n\t\t$product_attributes=DB::table('product_attributes')->get();\n\t\t$products_attribute = DB::table('product_attribute_value_id')\n\t\t\t->join('products', 'products.id', '=', 'product_attribute_value_id.product_id')\n\t\t\t->join('product_attributes', 'product_attributes.id', '=', 'product_attribute_value_id.product_attribute_id')\n\t\t\t->select('product_attribute_value_id.*')\n\t\t\t->where('status','1')\n\t\t\t->get();\n\n\t\treturn view('web-layouts.products')->with(['category'=>$category,'slug'=>$slug,'attributes'=>$products_attribute,'product_attributes'=>$product_attributes]);\n\n\t}", "function getProductsOnSale() {\n $productRepo = new ProductRepository();\n $products = $productRepo->getProductsOnSale();\n echo json_encode($products);\n return;\n }", "public function getList()\n {\n $results = array();\n $this->getDataByName();\n\n $this->_oProducts = new ProductsObject();\n $this->_oCategory = new CatalogCategoriesObject();\n $this->_oCategory->setOrderBy('CC_Seq');\n\n if (isset($this->_blockParams['1']))\n Zend_Registry::set('defaultCategory', $this->_blockParams['1']);\n\n if (!$this->_prodId)\n {\n // If no category selected, set the default one.\n if (!$this->_catId && !$this->_keywords && isset ($this->_blockParams['1'])){\n $categoryId = $this->_blockParams['1'];\n }else{\n $categoryId = $this->_catId;\n }\n Zend_Registry::set('catId_',$categoryId);\n $catQry = $this->_oCategory->getAll($this->_currentLang,false);\n $hasChildren = $this->_oCategory->setQuery($catQry)->hasChildren($categoryId);\n\n if ($hasChildren){\n $select = $this->_oCategory->getQuery();\n }else{\n $qry = $this->_oCategory->getAll(\n $this->_currentLang,\n false,\n $categoryId);\n $select = $this->_oProducts->setQuery($qry)\n ->getProducts($this->_currentLang, false);\n $select->order('P_Seq ASC');\n $this->_type = 'list-products.phtml';\n }\n\n if (count($this->_keywords))\n $this->_setFilterByKeyword($select);\n\n if (count($this->_filter))\n {\n $filterClause = \"\";\n foreach ($this->_filter as $key => $value)\n {\n $select = $this->_addFilterQuery($key, $value, $select);\n }\n }\n\n $results = $this->_db->fetchAll($select);\n }\n else\n {\n $product = $this->_oProducts->getAll($this->_currentLang, true, $this->_prodId);\n $tmpArray = $product[0];\n $dataCategory = $this->_oCategory->getAll($this->_currentLang, true, $tmpArray['P_CategoryId']);\n $category = $dataCategory[0];\n $results['data'] = array_merge($tmpArray, $category);\n\n $oItems = new ItemsObject();\n $items = $oItems->getItemsByProductId($this->_prodId);\n $results['items'] = $items;\n\n $oImages = new ProductsImagesObject();\n $oImages->setProductId($this->_prodId);\n $results['images'] = $oImages->getAll($this->_currentLang);\n\n $oAssocProd = new ProductsAssociationObject();\n $relations = $oAssocProd->getAll($this->_currentLang, true, $this->_prodId );\n $tmp = array();\n $relatedProd = array();\n\n foreach ($relations as $relProd)\n {\n if ($relProd['AP_RelatedProductID'] != -1)\n {\n $tmp = $this->_oProducts->populate($relProd['AP_RelatedProductID'], $this->_currentLang);\n $category = $this->_oCategory->getAll($this->_currentLang, true, $tmp['P_CategoryId']);\n $this->_oCategory->getDataCatagory($this->_currentLang, false, $tmp['P_CategoryId']);\n $stringUrl = '/';\n $stringUrl .= implode('/', $this->_oCategory->setCategoriesLink(true)->getLink());\n $stringUrl .= '/' . $tmp['PI_ValUrl'];\n $tmp['link'] = $stringUrl;\n $tmpCat = $category[0];\n $tmp = array_merge($tmp, $tmpCat);\n\n $relatedProd[] = $tmp;\n }\n }\n\n $results['relatedProducts'] = $relatedProd;\n }\n\n\n return $results;\n }", "public function getAllProducts();", "function get_autocomplete_ingredients()\r\n {\r\n if(isset($_GET['term']))\r\n {\r\n\t\t\t$ingredient = strtolower($_GET['term']);\r\n \t\t\t\r\n $result = $this->Create_model->get_similar_ingredient_name($ingredient);\r\n $result_array = array();\r\n while($row = mysql_fetch_assoc($result))\r\n {\r\n $result_array[] = $row['ingredientName'];\r\n }\r\n echo json_encode($result_array);\r\n } \r\n }", "public function ajaxTagSearch(){\n\t\t$json = [];\n\t\tif(!empty($_SESSION['loggedInUser']) && $_SESSION['loggedInUser']->role == 3){\t\t\t\n\t\t\t$this->load->database();\n\t\t\tif(!empty($this->input->get(\"q\"))){\n\t\t\t\t$this->db->like('name', $this->input->get(\"q\"));\n\t\t\t\t$query = $this->db->select('id,name as text')\n\t\t\t\t\t\t\t->get(\"tags\");\n\t\t\t\t$json = $query->result();\n\t\t\t}\n\t\t}else{\n\t\t\t$dynamicdb = $this->load->database('dynamicdb', TRUE);\t\t\t\t\n\t\t\t$this->load->database();\n\t\t\tif(!empty($this->input->get(\"q\"))){\n\t\t\t\t$dynamicdb->like('name', $this->input->get(\"q\"));\n\t\t\t\t$query = $dynamicdb->select('id,name as text')\n\t\t\t\t\t\t\t->get(\"tags\");\n\t\t\t\t$json = $query->result();\n\t\t\t}\n\t\t}\n\t\techo json_encode($json);\n\t}", "function get_product_search_form($echo = \\true)\n {\n }", "public function Adminproductlist(Request $request)\n {\n try {\n\n $returnData = UtilityController::Setreturnvariables();\n if ($request->has('page')) {\n $page = $request->page;\n } else {\n $page = 1;\n }\n ## products\n\n $products = Product::select('*');\n ## filter for product attributes\n\n if ($request->has('id') && !empty($request->id)) {\n $categories = [];\n foreach ($request->id as $key => $value) {\n $subAttrib = \\App\\SubAttributes::find($value);\n $subCat = $subAttrib->attribute_id;\n $categories[$subCat][] = $subAttrib->id;\n }\n $collection = $categories;\n } else {\n $collection = [];\n }\n\n ## filter for product attributes\n if (!empty($collection)) {\n $ids = $collection;\n foreach ($ids as $key => $id) {\n $products = $products->whereHas('attributes', function ($query) use ($id, $key) {\n $query->where('sub_attributes.attribute_id', $key)->whereIn('sub_attributes.id', $id);\n });\n }\n }\n\n ## search string. if user typed anything\n if ($request->has('search')) {\n $search = $request->search;\n ## all products\n $products = $products->where(function ($query) use ($search) {\n $query->where('title', 'like', '%' . $search . '%')\n ->orWhere('description', 'like', '%' . $search . '%');\n });\n }\n ## get related records\n // \\DB::enableQueryLog();\n\n // print_r(\\DB::getQueryLog());die;\n if ($request->has('sort_by')) {\n if ($request->sort_by == 2) {\n ## price high to low\n $products = $products->orderBy('price', 'desc');\n } elseif ($request->sort_by == 3) {\n ## price low to high\n $products = $products->orderBy('price', 'asc');\n } elseif ($request->sort_by == 4) {\n ## sold out\n $products = $products->where('status', 3);\n } else {\n ## noramal sorting by user products\n $products = $products->orderBy('id', 'desc');\n }\n } else {\n $products = $products->orderBy('id', 'desc');\n }\n\n $products = $products->with(['images', 'attributes.parent', 'user', 'comments.subComments.user', 'comments.user', 'buyers', 'buyer']);\n $products = $products->with('attributes');\n $products = $products->withCount('favourited');\n $products = $products->get();\n if ($request->has('sort_by') && $request->sort_by == 5) {\n $products = $products->sortByDesc(function ($item) {\n return $item->user->rating;\n })->values();\n }\n\n $pagination = UtilityController::Custompaginate($products, $this->perPage, $page, ['path' => url('/admin/productListings')])->toArray();\n\n $responseData = ['status' => 1, 'status_code' => 200, 'message' => 'Success!'] + $pagination;\n return response()->json($responseData, 200);\n } catch (\\Exception $e) {\n $sendExceptionMail = UtilityController::Sendexceptionmail($e);\n //Code to send mail ends here\n return UtilityController::Setreturnvariables();\n }\n\n }" ]
[ "0.7595903", "0.7469975", "0.7267011", "0.7253815", "0.72137004", "0.71609443", "0.7155305", "0.714695", "0.7131165", "0.7117685", "0.69470125", "0.6803618", "0.67543024", "0.6708489", "0.6690731", "0.66840416", "0.6678837", "0.66747177", "0.666151", "0.66340804", "0.6630745", "0.6625718", "0.6607462", "0.6531977", "0.6531977", "0.6531977", "0.6531977", "0.6531977", "0.65299183", "0.6524119", "0.65013885", "0.6491542", "0.64891416", "0.6470566", "0.64528614", "0.6431207", "0.64310724", "0.6420181", "0.64041734", "0.63708264", "0.6361763", "0.6350899", "0.6348109", "0.6347178", "0.6320331", "0.63149303", "0.63050026", "0.62992316", "0.62991995", "0.6278765", "0.6273367", "0.62619406", "0.6242977", "0.62306905", "0.6227334", "0.6211375", "0.62071043", "0.6203963", "0.62021345", "0.6189973", "0.6189307", "0.61881065", "0.61873055", "0.6165571", "0.6164709", "0.6156675", "0.6147607", "0.6143183", "0.6140879", "0.6140879", "0.6136871", "0.61346865", "0.61315995", "0.6120745", "0.6108676", "0.6094934", "0.6083194", "0.607886", "0.60684544", "0.6044026", "0.6041596", "0.603551", "0.6033084", "0.60238767", "0.6019835", "0.6019035", "0.6014906", "0.601055", "0.60087365", "0.6008652", "0.6008555", "0.60075027", "0.60039425", "0.600167", "0.599803", "0.59969795", "0.5996621", "0.59923357", "0.5991209", "0.59892696" ]
0.84728575
0
// function::load_popup_list_mobile_user description: popup display list mobiles of one user
// функция::load_popup_list_mobile_user описание: отображение списка мобильных устройств одного пользователя
public function load_popup_list_mobile_user() { // pd($_REQUEST); $iUserId = $_REQUEST['userid']; $strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null; $strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; $strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null; $strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null; $strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null; $arrUser = array(); $arrOrders = array('; ', ';', '/ ','/'); $arrChildOrders = array('. ', '- ', '.', '-'); if(isset($iUserId)) { $arrUser = $this->contact_model->getUserById($iUserId); if(!empty($arrUser)) { $arrUser['mobile'] = str_replace($arrOrders, ', ', $arrUser['mobile']); $arrUser['mobile'] = str_replace($arrChildOrders, '', $arrUser['mobile']); $arrUser['mobile'] = explode(', ', $arrUser['mobile']); $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId); } else { $this->loadview('error/error_no_found_user', array(), 'layout_popup'); } } else { $iUserId = 0; $this->loadview('error/error_no_found_user', array(), 'layout_popup'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_popup_list_mobile_user_vng_staff_list() {\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getStaffById($iUserId);\n\t\t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['cellphone'] = str_replace($arrOrders, ', ', $arrUser['cellphone']);\n\t \t\t$arrUser['cellphone'] = str_replace($arrChildOrders, '', $arrUser['cellphone']);\t \t\t\n\t \t$arrUser['cellphone'] = explode(', ', $arrUser['cellphone']);\n\t\t $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t\t\t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function load_popup_sms_vng_staff_list() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; \n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n\t\t$arrOneUser = $this->contact_model->getStaffById($noUserId);\n\t\t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(!empty($arrOneUser)) {\n \t\t$arrOneUser['cellphone'] = str_replace($arrOrders, ', ', $arrOneUser['cellphone']);\n\t \t$arrOneUser['cellphone'] = str_replace($arrChildOrders, '', $arrOneUser['cellphone']);\n\t if(strpos($arrOneUser['cellphone'], ',')!==false) {\n\t $arrOneUser['cellphone'] = explode(', ', $arrOneUser['cellphone']);\n\t } else {\n\t $arrOneUser['cellphone'] = array($arrOneUser['cellphone']);\n\t }\n \t} else {\n \t\t$arrOneUser = array();\n \t}\n \t\n\t\t$this->loadview('contact/popup_send_message_VNGHR', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function GetUserMobileList()\n {\n return [];\n }", "public function load_popup_user_information() {\n\t\t$strUserDomain = $_REQUEST['user'];\n\t\t$strIncidentId = $strAlertId = $strAlertMsg = $strTimeAlert = $strIdentifier = $strChangeId = null;\n\t\tif(!empty($_REQUEST['incident_id'])) {\n\t\t\t$strIncidentId = $_REQUEST['incident_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_id'])) {\n\t\t\t$strAlertId = $_REQUEST['alert_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_msg'])) {\n\t\t\t$strAlertMsg = trim($_REQUEST['alert_msg']);\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($_REQUEST['time_alert'])) {\n\t\t\t$strTimeAlert = trim($_REQUEST['time_alert']);\n\t\t}\n\t\tif(!empty($_REQUEST['identifier'])) {\n\t\t\t$strIdentifier = $_REQUEST['identifier'];\n\t\t}\n\t\tif(!empty($_REQUEST['change_id'])) {\n\t\t\t$strChangeId = $_REQUEST['change_id'];\n\t\t}\n\t\t$arrUsersInfo = $this->contact_model->getListUsersInfoByUserDomain($strUserDomain);\n\t\t//$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain('minht');\n\t\t$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain($strUserDomain);\n\t\t$arrEmails = array();\n\t\t$arrSearched = array();\n\t\t$arrVNGStaffListSearched = array();\n\t\t$t = 0;\n\t\tif(!empty($arrUsersInfo)) {\n\t\t\t$noUserIdTemp = $arrUsersInfo[0]['userid']; \n\t\t\t$arrEmails[0] = $arrUsersInfo[0]['email'];\n\t\t\tforeach ($arrUsersInfo as $key => $oneUser) {\n\t\t\t\tif($noUserIdTemp != $oneUser['userid']) {\n\t\t\t\t\t$noUserIdTemp = $oneUser['userid'];\n\t\t\t\t\t$t = 0;\n\t\t\t\t\t$arrEmails[] = strtolower($oneUser['email']);\n\t\t\t\t} \n\t\t\t\t$arrSearched[$noUserIdTemp][$t] = $oneUser;\n\t\t\t\t$t++;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$arrSearched = array();\n\t\t}\n\n\t\tif(!empty($arrVNGStaffList)) {\n\t\t\tforeach ($arrVNGStaffList as $index => $oOneStaff) {\n\t\t\t\tif(!in_array(strtolower($oOneStaff->email), $arrEmails)) {\n\t\t\t\t\t$arrVNGStaffListSearched[] = $oOneStaff;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$arrVNGStaffListSearched = array();\n\t\t}\n\t\t$this->loadview('contact/popup_search_by_user_result', array('arrSearchUsersResult' => $arrSearched, 'arrVNGStaffs' => $arrVNGStaffListSearched, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIdentifier' => $strIdentifier, 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "private function list_by_user()\r\n {\r\n //get_mobile_list_by_user se utiliza el usuario en session\r\n $oActivity = new ModelActivities($this->_session_user_code);\r\n \r\n //Datos para paginación. La primera vez list_page=null. Esto lo controla\r\n //el componente paginate en el modelo\r\n $oActivity->set_list_page($this->_list_page);\r\n //Comprobación de busqueda. Por campos\r\n $arSearchFields = array(\"DateP\",\"User_Description\");\r\n //Si detecta que no se está buscando lo elimina de la sesion\r\n //bug($_POST);bug($arSearchFields); die;\r\n if($this->is_searching($arSearchFields,\"oSchUserActivity\"))\r\n { \r\n //bug(\"is searching\");\r\n $sHydraDate = $this->convert_to_hydra_date($_POST[\"sch_DateP\"]);\r\n $oActivity->set_datep($sHydraDate);\r\n $oActivity->set_user_description($_POST[\"sch_User_Description\"]);\r\n $this->oSite->set_in_session(\"oSchUserActivity\", $oActivity);\r\n }\r\n\r\n //Datos para el listado\r\n $arDataList = $oActivity->get_mobile_list_by_user();\r\n\r\n $this->_list_num_pages = $oActivity->get_list_num_pages();\r\n $this->_list_total_regs = $oActivity->get_total_regs();\r\n //Esto es necesario pq el modelo corrige la página si está fuera de rango\r\n $this->_list_page = $oActivity->get_list_page();\r\n $arPagesForSelect = $oActivity->get_list_pages();\r\n\r\n //Select con páginas\r\n $oSelPage = new HelperSelect($arPagesForSelect, \"selPage\",\"\", $this->_list_page);\r\n $oSelPage->set_js_onchange(\"sel_page_change(this);\");\r\n\r\n //ActionBar\r\n $sLnkSearch = $this->_link_url_list_frg;\r\n $oActionBar = new HelperActionBar(\"Actividades\");\r\n \r\n //Renderizador de listado\r\n //bug($arDataList); die;\r\n\r\n $oHlpList = new HelperList($arDataList,\"Fecha\",array(\"Code\"),array(\"Contacto\",\"Comercial\"),\r\n $this->_list_page, $this->_list_num_pages, $this->_list_total_regs,\r\n \"activities\",\"detail\",array(\"Code\"));\r\n\r\n //Variables a utilizar en la vista \r\n $this->oGParams->set_in_vars(\"sCodeAccount\", $sCodeAccount);\r\n $this->oGParams->set_in_vars(\"oSelPage\", $oSelPage);\r\n $this->oGParams->set_in_vars(\"oOwnerInfoBar\", $oOwnerInfoBar);\r\n $this->oGParams->set_in_vars(\"oFrgLink\", $oFrgLink);\r\n $this->oGParams->set_in_vars(\"oActionBar\", $oActionBar);\r\n $this->oGParams->set_in_vars(\"oHlpList\", $oHlpList);\r\n \r\n $this->oView->add_file(\"user_activities.php\");\r\n $this->oView->display(); \r\n }", "public function load_popup_sms() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = @$_REQUEST['incident_id'];\n\t\t$strAlertId = @$_REQUEST['alert_id'];\n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = isset($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = isset($_REQUEST['change_id']) ? trim($_REQUEST['change_id']) : null;\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n\t\t$arrOneUser = array();\n\t\tif($noUserId != null) {\n\t\t\t$arrOneUser = $this->contact_model->getUserById($noUserId);\n\t\t\tif(!empty($arrOneUser)) {\n\t\t\t\t$arrOneUser['mobile'] = str_replace($arrOrders, ', ', $arrOneUser['mobile']);\n\t\t \t$arrOneUser['mobile'] = str_replace($arrChildOrders, '', $arrOneUser['mobile']);\n\t\t if(strpos($arrOneUser['mobile'], ',')!==false) {\n\t\t $arrOneUser['mobile'] = explode(', ', $arrOneUser['mobile']);\n\t\t } else {\n\t\t $arrOneUser['mobile'] = array($arrOneUser['mobile']);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$this->loadview('contact/popup_send_message', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "function getuser(){\n\tif($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\tif (isset($_POST['submitloadusers']) == 'Load Users') {\n\n\t\t\tif (!empty($_SESSION['token'])) {\n\t\t\t\t\n\t\t\t\t$request_url = url.user.\"?realm=\".realm;\n\t\t\t\t\n\t\t\t\t$gettoken = substr($_SESSION['token'], 0, -1);\n\t\t\t\t\n\t\t\t\t$ch = curl_init();\n\t\t\t\t\n\t\t\t\t$request_headers = array();\n\t\t\t\t$request_headers[] = 'Content-Type: application/json; charset=utf-8';\n\t\t\t\t$request_headers[] = 'x-auth-token: '.$gettoken;\n\t\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $request_url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER,FALSE);\n\t\t\t\t\n\t\t\t\t$response = curl_exec($ch);\n\t\t//\t\techo $response = curl_exec($ch);\n\t\t//\t\tprint_r($response);\n\t\t\n\t\t\t\t$response = json_decode($response, true);\n\n\t\t\t\t\techo \t\"<table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t\t<td>Last Name</td>\n\t\t\t\t\t\t\t<td>Email</td>\t\t\n\t\t\t\t\t\t\t<td>Extension</td>\n\t\t\t\t\t\t\t<td>Numbers</td>\n\t\t\t\t\t\t\t<td>Datum</td>\n\t\t\t\t\t\t\t</tr>\"; \t\n\n\t\t\t\tforeach ($response as $key => $value) {\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\".$value['fname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['lname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['email'].\"</td>\n\t\t\t\t\t\t<td>\".$value['ext'].\"</td>\n\t\t\t\t\t\t<td>\"; \n\t\t\t\t\tforeach ($value['numbers'] as $key2 => $numvalue) {\n\t\t\t\t\techo $numvalue;\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\"; \n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\t\t\techo \"<form action='getlist.php' method='post' id='popupForm'> \n\t\t\t\t\t<input type='text' name='exte' class='exte' value=\".$value['ext'].\"> \n\t\t\t\t\t<input type='submit' name='aanvragen' id='aanvragen' value='aanvragen'></form>\";\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t</table> \";\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//print_r($response);\n\t\t\t\t\n\t\t\t\tcurl_close($ch);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//echo\"Load User\";\n\t\t} \n\t}\n}", "function user_list()\n\t\t{\n\t\t\t$this->view->user_list\t= $this->model->user_list();\n\t\t\tif(is_array($this->view->user_list))\n\t\t\t{\n\t\t\t\t$this->view->js_render('staff/AJAX/staff_list');\n\t\t\t}else\n\t\t\t{// if There Is Error!\n\t\t\t\techo $this->view->user_list;\n\t\t\t}\n\t\t}", "private function _getUserList(){\n\t\t/* variable initialization */\n\t\t$strReturnArr = array();\n\t\t\n\t\t/* Get user list objects */\n\t\t$strReturnArr\t= $this->_objDataOperation->getDirectQueryResult(\"select user_name, id from \".$this->_strPrimaryTableName.\" where deleted = 0 order by user_name\");\n\t\t\n\t\t/* return the user list array */\n\t\treturn $strReturnArr;\n\t}", "public function getAppUserByMobile($mobile) {\r\n $stmt = $this->conn->prepare(\"SELECT mobile, api_key, status, created_at FROM app_user WHERE mobile = ?\");\r\n $stmt->bind_param(\"i\", $mobile);\r\n if ($stmt->execute()) {\r\n // $user = $stmt->get_result()->fetch_assoc();\r\n $stmt->bind_result($mobile, $api_key, $status, $created_at);\r\n $stmt->fetch();\r\n $user = array();\r\n $user[\"mobile\"] = $mobile; \r\n $user[\"api_key\"] = $api_key;\r\n $user[\"status\"] = $status;\r\n $user[\"created_at\"] = $created_at;\r\n $stmt->close();\r\n return $user;\r\n } else {\r\n return NULL;\r\n }\r\n }", "public function loadProfilePopup()\n {\n $this->error(false);\n\n $sM = $this->get('m');\n $sModule = $this->get('module');\n $sName = $this->get('name');\n $sMatchType = $this->get('match_type');\n $sMatchID = $this->get('match_id');\n $sMatchName = $this->get('match_name');\n\n $bIsRight = false;\n $sMatchTypeUserConvertToPages = $sMatchType;\n if ($sMatchType == 'user')\n {\n $bIsRight = true;\n $aUser = Phpfox::getService('user')->getByUserName($sMatchName);\n if (isset($aUser['user_id']) === true)\n {\n // check pages object\n if ((!isset($aUser['user_id'])) || (isset($aUser['user_id']) && $aUser['profile_page_id'] > 0))\n {\n if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n {\n $sMatchTypeUserConvertToPages = 'page';\n }\n } else\n {\n Phpfox::getBlock('profilepopup.user');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n } else\n {\n $bIsRight = false;\n\t\t\t\t\t\t\t\t$sMatchTypeUserConvertToPages = 'page';\n }\n }\n if ($sMatchType == 'page' || $sMatchTypeUserConvertToPages == 'page')\n {\n $bIsRight = true;\n\t\t\t\t\t\tif (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aPage = Phpfox::getService('pages')->getForView($sMatchID);\n if (!$aPage)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.pages');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'event')\n {\n $bIsRight = true;\n $aEvent = Phpfox::getService('event')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.event');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'fevent')\n {\n $bIsRight = true;\n if (Phpfox::isModule('fevent'))\n {\n $aEvent = Phpfox::getService('fevent')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.fevent');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n }\n\n if ($bIsRight === false)\n {\n echo json_encode(array('content' => '', 'msg' => \"failure\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }", "public function immobilesUser(){\n try {\n $id_ = $_POST['id'];\n $user = new User();\n $sql = \"SELECT id_, title_ad from immobile WHERE id_user = $id_\";\n $res = $this->conn->query($sql);\n $username = $user->getName();\n if($res->num_rows > 0){\n $all = [\n 'username' => $username['username'],\n $res->fetch_all(MYSQLI_ASSOC),\n ];\n return $all;\n }else{\n $msg = [\n 'msg' => 'Usuário não possui nenhum imovel cadastrado',\n 'username' => $username['username'],\n ];\n return $msg;\n }\n } catch (\\Throwable $th) {\n return $th->getMessage();\n }\n }", "function m_UserList()\n\t{\n\t\tglobal $attributes,$arAdminDetail;\n\t\t$stMsg = \"\";\n\n\t\t\n\t\tif(isset($attributes['msg']))\n\t\t{\n\t\t\t$stMsg = constant(strtoupper($_GET['msg']));\n\t\t}\n\t\t\n\t\t$stExtraAtt = isset($attributes['page'])?'page='.$attributes['page'].\"&\" : '';\n\t\t$this->smarty->assign('EXTRA_ATT',$stExtraAtt);\n\t\tif(isset($attributes['selAction']))\n\t\t{\n\t\t\tif(isset($attributes['chkPage'])) \n\t\t\t{\n\t\t\t\t$stIds = implode(\",\", $attributes['chkPage']);\n\t\t\t\t$rsResult = $this->dbHandler->m_UserAction($stIds,$attributes['selAction']);\n\t\t\t\tif($rsResult)\n\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\tif(isset($attributes['txtSearch']))\n\t\t\t\t\t{\n\t\t\t\t\t\theader(\"Location:\".SITE_URL.\"user/adminindex.php?action=searchuser&txtSearch=\".$attributes['txtSearch'].\"&msg=RECORD_\".strtoupper($attributes['selAction']).\"&\".$stExtraAtt);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\theader(\"Location:\".SITE_URL.\"user/adminindex.php?action=userlist&msg=RECORD_\".strtoupper($attributes['selAction']).\"&\".$stExtraAtt);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$stMsg = QUERY_ERROR;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$stMsg = SELECT_VALUE;\n\t\t\t}\t\t\t\t\t\n\t\t}\n\n\t\t$inPageNum =0;\n\t\t$inPerPage = PAGE_SIZE;\n\t\tif(isset($attributes['page']))\n\t\t{\n\t\t\t$inPageNum = $attributes['page']-1;\n\t\t}\n\t\t$inStart = $inPageNum*$inPerPage;\n\n\t\t$inRowCount = $this->dbHandler->m_GetUserCount();\t\n\t\t$this->smarty->assign('PAGE_COUNT',$inRowCount);\n\t\t\t\t\n\t\t\t\n\t\t// code for paging\t\t\n\t\t$stPagingParam\t= \"action=\".$attributes['action'];\n\t\t$stPagingParam .= isset($attributes['txtSearch'])?\"&txtSearch=\".$attributes['txtSearch']:\"\";\n\t\t$qry = \"SELECT * FROM tb_user\";\t\t\n\t\tif(isset($attributes['action']) && $attributes['action'] == \"searchuser\")\n\t\t{\n\t\t\t$this->smarty->assign(\"SEARCH_KEYWORD\", $attributes['txtSearch']);\n\t\t\t$qry .= \" WHERE vEmail LIKE ('%\".addslashes($attributes['txtSearch']).\"%') \n\t\t\t\t\tOR vFirstName LIKE ('%\".addslashes($attributes['txtSearch']).\"%') \n\t\t\t\t\tOR vLastName LIKE ('%\".addslashes($attributes['txtSearch']).\"%')\n\t\t\t\t\tOR CONCAT(vFirstName, ' ', vLastName) LIKE ('%\".addslashes($attributes['txtSearch']).\"%')\";\n\t\t}\n\t\t$qry .= \" ORDER BY iId DESC\";\n\n\t\n\t\t$pager = new PrevNext($this->dbHandler->obDbase);\n\t\t$resArr = $pager->create($qry, PAGE_SIZE,$stPagingParam);\t\t\t\n\t\t$this->smarty->assign('PAGING',$resArr['pnContents']);\n\t\t// code for paging\t\t\n\t\t$arData = array();\n\t\tif($resArr['qryRes']->NumRows())\n\t\t{\n\t\t\t$this->smarty->assign(\"IS_RECORD\", true);\n\t\t\twhile(!$resArr['qryRes']->EOF)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\t$arData[]= $resArr['qryRes']->fields;\n\t\t\t\t$resArr['qryRes']->MoveNext();\n\t\t\t}\n\t\t\t$this->smarty->assign(\"IS_RECORD\", true);\n\t\t\t$this->smarty->assign(\"ARR_DATA\",$arData);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->smarty->assign(\"IS_RECORD\", false);\n\t\t}\n\n\n\t\tif($stMsg)\n\t\t{\n\t\t\t$this->smarty->assign('ERROR_MSG',$stMsg);\n\t\t}\n\t\tif(isset($attributes['page']))\n\t\t\t$this->smarty->assign('PAGE', $attributes['page']);\n\t\telse\n\t\t\t$this->smarty->assign('PAGE', 1);\n\t\tif(isset($attributes['txtSearch']))\n\t\t\t$stNavigationText = 'User search result';\n\t\telse\n\t\t\t$stNavigationText = 'Manage Users';\n\n\t\t$this->smarty->assign('TOP_NAVIGATION',$stNavigationText);\n\t\t$innerTemp = $this->smarty->fetch('admin_user_list.tpl.html');\t\t\n\t\treturn $innerTemp;\n\t}", "function load_promotion_popup($is_mobile, $promotions, $service_type = TOUR, $is_show_background = true){\r\n\r\n\tif(empty($promotions)) return '';\r\n\r\n\t$view_data['show_pro_detail'] = !empty($promotions['id']); // if the input promotion is a single promotion => show detail, not show campain\r\n\r\n\tif($view_data['show_pro_detail'] && empty($promotions['offer_note'])) return '';\r\n\r\n\tif(!empty($promotions['id'])) $promotions = array($promotions); // convert to array of promotion\r\n\r\n\r\n\tforeach ($promotions as $k=>$value){\r\n\r\n\t\tif(empty($value['pro_content'])){\r\n\t\t\t$value['pro_content'] = load_promotion_content($is_mobile, $value, $service_type);\r\n\t\t}\r\n\r\n\t\t$promotions[$k] = $value;\r\n\t}\r\n\r\n\t$view_data['promotions'] = $promotions;\r\n\r\n\t$view_data['is_show_background'] = $is_show_background;\r\n\r\n\t$pro_popup = load_view('common/others/promotion_popup', $view_data, $is_mobile);\r\n\r\n\treturn $pro_popup;\r\n}", "function verified_mobiles(){\n\t\tglobal $wpdb;\n\t\t$type_users=\"Verified Mobiles\";\n\t\t$verified_users=$wpdb->get_results(\"select * from IDV_mcv_verification_data where is_verified=1\");\n\t\t\n\t\tinclude(\"verified_mobiles.php\");\n\t}", "static function user_list() {\n\t\t\tglobal $cv_admin_users_list;\n\n\t\t\tif ( !empty( $cv_admin_users_list ) ) {\n\t\t\t\t$result = $cv_admin_users_list;\n\t\t\t} else {\n\t\t\t\t$result\t = array();\n\t\t\t\t$show\t = 'display_name';\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'fields'\t => array( 'ID', $show, 'user_login' ),\n\t\t\t\t\t'orderby'\t => 'display_name',\n\t\t\t\t\t'order'\t\t => 'ASC',\n\t\t\t\t);\n\n\t\t\t\t$users = get_users( apply_filters( PT_CV_PREFIX_ . 'user_list', $args ) );\n\t\t\t\tforeach ( (array) $users as $user ) {\n\t\t\t\t\t$user->ID\t = (int) $user->ID;\n\t\t\t\t\t$display\t = !empty( $user->$show ) ? $user->$show : '(' . $user->user_login . ')';\n\n\t\t\t\t\t$result[ $user->ID ] = esc_html( $display );\n\t\t\t\t}\n\n\t\t\t\t$cv_admin_users_list = $result;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "public function filterByUserMobile($userMobile = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($userMobile)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $userMobile)) {\n $userMobile = str_replace('*', '%', $userMobile);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(UsersPeer::USER_MOBILE, $userMobile, $comparison);\n }", "public function mobileuserinfo($data)\n {\n\n global $_error;\n\t\t\n\t\t$data = Core::SanitizeData($data);\n\t\t$status \t= \t'';\n\t\t$error \t\t= \t'';\n\t\t$usrId \t\t= \t0;\n\t\t$user = new User();\n \n\t\t $result = $user->InfoMobileUser($data);\n if($result > 0)\n\t\t{\n \n\t\t\t$status \t= \t\"success\";\n\t\t\t$error \t\t= \t''; \n \t}\n \n\t\telse if(!$result)\n\t\t{\n\t\t $status \t= \t'failure';\n\t\t\t$error \t\t= \t$_SESSION[\"error\"];\n\t\t\t$_error->ResetError();\n\t\t}\n else \n {\n $status \t= \t\"failure\";\n $error = \"Invalid user ID\";\n $result\t\t= \"\";\n }\n\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\"Userinfo\" => $result\n \n \n\t\t);\n\t\t\n\t\t$rst = self::GenerateMobileOutput($resultArr);\n\t\treturn $rst;\n\n\n }", "public function searchInJprofileContacts($idList,$mobile)\n {\n $sql=\"SELECT PROFILEID FROM newjs.JPROFILE_CONTACT WHERE PROFILEID IN ('$idList') AND ALT_MOBILE IN('0$mobile','$mobile','+91$mobile','91$mobile')\";\n $res=mysql_query_decide($sql) or logError($sql);\n if($row=mysql_fetch_array($res))\n\t\t{\n\t\t\t$this->ignoringId=$row[\"PROFILEID\"];\n\t\t\t$this->ignoringGender=$this->findGender($this->ignoringId);\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n }", "public function getUserList();", "function render_user_mobile($user, $rows=10) {\n $json = apc_fetch(self::$userKey . $user);\n if (!$json) { return \"\"; }\n\n $tweets = json_decode($json);\n $str = \"\";\n if ($tweets) {\n foreach($tweets as $t) {\n if ($rows-- == 0) { break; }\n $time = prettyDate(strtotime($t->created_at));\n $str .= \"<div class=\\\"row\\\">\" . $this->hyperlinkit($t->text) . \" <span class=\\\"when\\\">{$time}<span></div>\";\n }\n }\n \n return $str;\n }", "function show_user_list()\n\t{\n\t\tglobal $db_type;\n\t\tif($db_type == 'mysql')\n\t\t{\n\t\t\t$query = \"SELECT * FROM users LIMIT $this->strt,$this->lim\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"SELECT * FROM users LIMIT $this->strt OFFSET $this->lim\";\n\t\t}\n\t\t$result = db_query($query);\n\t\tdb_error_log();\n\n\t\n\t\t$count = db_num_rows($result);\n\t\t\n\t\tif($count == 0)\n\t\t{\n\t\t\techo '<tr><td colspan=2>Nothing to show</td></tr>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor($i=0 ; $i < $count ; $i++)\n\t\t\t{\n\n\t\t\t\t$row = db_fetch_array($result);\n\t\t\t\t$url =\"userdetails.php?userId=$row[0]&name=\". urlencode($row[2]);\n\t\t\t\tprintf('<tr><td bgcolor=\"#CCCCCC\">\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"userId[]\" value=\"%s\"></td>\n\t\t\t\t\t\t\t<td bgcolor=\"#EFEFEF\"><nobr>\n\t\t\t\t\t\t\t\t<a href=\"%s\" class=\"Category\" target=\"right\">%s</a></nobr></td></tr>',\n\t\t\t\t\t\t$row[0],$url,$row[2]);\n\t\t\t}\n\t\t\tif($count == $this->lim)\n\t\t\t{\n\t\t\t\t$this->more =1;\n\t\t\t}\n\t\t}\n\t}", "protected function retrieveUserList() {\n $model = new aam_View_User;\n\n return $model->retrieveList();\n }", "public function listuserAction() {\n\t $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t //$this->_helper->layout->disableLayout();\n \t $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t\t\n\t if(!isset($sessionutilisateur->login)) { $this->_redirect('/administration/login');}\n if($sessionutilisateur->confirmation != \"\") { $this->_redirect('/administration/confirmation');}\n\t\t $tabela = new Application_Model_DbTable_EuUtilisateur();\n\t\t $select = $tabela->select(Zend_Db_Table::SELECT_WITH_FROM_PART);\n $select->setIntegrityCheck(false);\n\t\t $select->join('eu_user_group', 'eu_user_group.code_groupe = eu_utilisateur.code_groupe');\n $select->where('eu_utilisateur.id_utilisateur_parent = ?',$sessionutilisateur->id_utilisateur);\n\t\t $select->where('eu_user_group.code_groupe = ?','cnp_tegcp');\n\t\t $select->order('id_utilisateur desc');\n\t\t $users = $tabela->fetchAll($select);\n\t\t $this->view->entries = $users;\n\t }", "protected function userList() {\n\n\t\t$oUser = new APP_Model_User();\n\t\t$sFilteredBy = null;\n\t\t$aClauses = array();\n\n\t\tif( ($iRoleFilter = $this->get('rolefilter', '')) !== '') {\n\t\t\t$sFilteredBy = PPI_Helper_User::getRoleNameNice(PPI_Helper_User::getRoleNameFromID($iRoleFilter));\n\t\t\t$aClauses[] = 'role_id = ' . $oUser->quote($iRoleFilter);\n\t\t}\n\n\t\t// Get the users\n\t\t$users = $oUser->getList(!empty($aClauses) ? implode(' AND ', $aClauses) : '')->fetchAll();\n\n\t\t// If there was a filter applied but returned no results, we default the userlist back to normal\n\t\tforeach($users as $key => $user) {\n\t\t\t$users[$key]['role_name'] = PPI_Helper_User::getRoleNameFromID($user['role_id']);\n\t\t}\n\n\t\t$sUsernameField = $this->getConfig()->system->usernameField;\n\t\t$this->adminLoad('admin/user_list', compact('users', 'sFilteredBy', 'sUsernameField'));\n\t}", "function SERVICE_OPEN_PLAYER_wmmobile($list){\n\t\tglobal $include_path, $root_dir;\n\t\t\n\t\t// This playlist type supports the following media types:\n\t\t$supported = \"asf|wma|wmv|wm|asx|wax|wvx|wpl|dvr-ms|wmd|avi|mpg|mpeg|m1v|mp2|mp3|mpa|mpe|mpv2|m3u|ogg|mid|midi|rmi|aif|aifc|aiff|au|snd|wav|ivf|\";\n\t\t\n\t\t// Let's start the list off right\n\t\t$content = '<ASX version=\"3\">'. \"\\n\";\n\t\t$content .= ' <TITLE>Jinzora Playlist</Title>'. \"\\n\";\n\t\t$list->flatten();\n\n\t\t// Now let's loop throught the items to create the list\n\t\tforeach ($list->getList() as $track) {\n\t\t\t// Should we play this?\n\t\t\tif ((stristr($track->getPath(\"String\"),\".lofi.\") \n\t\t\t\tor stristr($track->getPath(\"String\"),\".clip.\"))\n\t\t\t\tand $_SESSION['jz_play_all_tracks'] <> true){continue;}\n\t\t\t\n\t\t\t// Now let's get the extension to be sure it can be played\n\t\t\t$pArr = explode(\"/\",$track->getPath(\"String\"));\n\t\t\t$eArr = explode(\".\",$pArr[count($pArr)-1]);\n\t\t\t$ext = $eArr[count($eArr)-1];\n\t\t\tif (!stristr($supported,$ext. \"|\")){continue;}\n\t\t\t\n\t\t\t$meta = $track->getMeta();\n\t\t\t$content .= \" <ENTRY>\". \"\\n\".\n\t\t\t\t\t\t\" <TITLE>\". $meta['artist'] . \" - \" . $meta['title']. \"</TITLE>\". \"\\n\";\n\t\t\t\n\t\t\t// Now let's figure out the full track name\n\t\t\t$trackn = $track->getFileName(\"user\");\n\t\t\tif (!stristr($trackn,\"mediabroadcast.php\")) {\n\t\t\t $track->increasePlayCount();\n\t\t\t}\n\t\t\t$content .= ' <REF HREF=\"'. $trackn. '\"/>'. \"\\n\".\n\t\t\t ' </ENTRY>'. \"\\n\";\n\t\t}\n\t\t$content .= '</ASX>';\n\t\tunset($_SESSION['jz_play_all_tracks']);\n\t\t\n\t\t// Now that we've got the playlist, let's write it out to the disk\n\t\t$plFile = $include_path. \"temp/windowsmobile.asx\";\n\t\t@unlink($plFile);\n\t\t$handle = fopen ($plFile, \"w\");\n\t\tfwrite($handle,$content);\t\t\t\t\n\t\tfclose($handle);\n\t\t\n\t\tSERVICE_DISPLAY_PLAYER_wmmobile($content);\n\t}", "public function userlist(){\r\n $data = array();\r\n $userModel = $this->load->model(\"UserModel\");\r\n $data['user'] = $userModel->userList();\r\n\r\n $this->load->view('layouts/header');\r\n $this->load->view(\"userlist\", $data);\r\n $this->load->view('layouts/footer');\r\n }", "public static function get_users_in_context(userlist $userlist) {\n $context = $userlist->get_context();\n\n if (!is_a($context, \\context_user::class)) {\n return;\n }\n\n // Add users based on userkey.\n \\core_userkey\\privacy\\provider::get_user_contexts_with_script($userlist, $context, 'tool_mobile');\n }", "public static function AddMobileUserFB($data)\n\t{\n\t\tglobal $_error;\n\t\t$data[\"fb_id\"]\t=\t\"\";\n\t\t$data = Core::SanitizeData($data);\n\t\t$status \t= \t'';\n\t\t$error \t\t= \t'';\n\t\t$usrId \t\t= \t$insId;\n\t\t$user = new User();\n\t\t$result = $user->AddUserSocial($data);\n\t\tif($result > 0)\n\t\t{\n\t\t\t$status \t= \t'success';\n\t\t\t$error \t\t= \t$result['error'];\n\t\t\t$usrId \t\t= \t$result['id'];\t\n\t\t}\n\t\telse if(!$result)\n\t\t{\n\t\t $status \t= \t'failure';\n\t\t\t$error \t\t= \t$_SESSION[\"error\"];\n\t\t\t$_error->ResetError();\n\t\t}\n\t\t\n\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\"user\"\t\t=> $usrId\t\n\t\t);\n\t\t\n\t\t$rst = self::GenerateMobileOutput($resultArr);\n\t\treturn $rst; \t\t\n\t}", "function chat_user_list() {\n?>\n<!-- START CHAT USER LIST -->\n<div class=\"sidebar-widget m-0\">\n\t<div class=\"widget-header\">\n\t\t<h6 class=\"title\">Chat</h6>\n\t\t<span class=\"widget-toggle\">+</span>\n\t</div>\n\t<div class=\"widget-content\">\n\t\t<ul class=\"list-unstyled mailbox-bullets\">\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Amy Doe <span class=\"ball green\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Joey Doe <span class=\"ball green\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Robert Doe <span class=\"ball orange\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">John Doe <span class=\"ball red\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Uncle Doe <span class=\"ball red\"></span></a>\n\t\t\t</li>\n\t\t\t<li class=\"text-center mt-3\">\n\t\t\t\t<em><a href=\"#\">show offline</a></em>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- END CHAT USER LIST -->\n<?php\n}", "public function UserMobile()\n {\n \t$data = $this->input->post();\t\n\t\t\n\t\tif(!empty($data) && $data['Action'] = 'UserCheckMobile'){\t\n\t\t\t\n\t\t\tif(!empty($data['Val_Emailaddress']))\n\t\t\t\t$UserData = $this->Users_model->getByMobile($data['Val_Countrycode'],$data['Val_Mobilenumber'],array('U_Email'=>$data['Val_Emailaddress']));\n\t\t\telse\t\n\t\t\t\t$UserData = $this->Users_model->getByMobile($data['Val_Countrycode'],$data['Val_Mobilenumber']);\n\t\t\t\t\n\t\t\tif(!empty($UserData)){\n\t\t\t\t$UserArray = $UserData;\n\t\t\t\t\n\t\t\t\t$Record = array( \n\t\t\t\t\t\t\t'UserID' => $UserArray->UserID,\n\t\t\t\t\t\t\t'FirstName'=> $UserArray->U_FirstName,\n\t\t\t\t\t\t\t'LastName'=> $UserArray->U_LastName,\n\t\t\t\t\t\t\t'MobileNumber'=> $UserArray->U_Mobile,\n\t\t\t\t\t\t\t'Email'=> $UserArray->U_Email,\n\t\t\t\t\t\t\t'Country'=> $UserArray->U_Country,\n\t\t\t\t\t\t\t'State'=> $UserArray->U_State,\n\t\t\t\t\t\t\t'City'=> $UserArray->U_City,\n\t\t\t\t\t\t\t'ProfileImage'=> UPLOAD_USER_BASE_URL.$UserArray->UserID.'/'.$UserArray->U_ProfileImage,\t\t\t\t\t\t\n\t\t\t\t\t\t\t'Status'=> getStatus($UserArray->U_Status)\n\t\t\t\t\t\t\t);\t\t\n\t\t\t\n\t\t\t\t\t$result = array('status'=>'error','flag'=>'2','message'=>'The mobile number/email address you entered already exists.','data'=>$Record);\t\t\t\t\t\n\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t//$Postdata['Val_OTP'] = $OTP;\n\t\t\t\t//\t$udpate = $this->Users_model->update($Postdata,$UserData->UserID);\n\t\t\t\t\t\n\t\t\t\t\t$UserArray = $UserData;\n\t\n\t\t\t\t\t$OTPResponse = sendOTP($data['Val_Countrycode'],$data['Val_Mobilenumber']);\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($OTPResponse)){\n\t\t\t\t\t\tif(is_array($OTPResponse))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$result = array('status'=>'error','flag'=>'2','message'=>'There is some issue in sending One Time Password to your mobile number. Please try again later.','data'=>(object)$OTPResponse);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$Record = array( \n\t\t\t\t\t\t\t\t\t\t\t'OTP'=> (string)$OTPResponse);\t\t\n\n\t\t\t\t\t\t\t\t$result = array('status'=>'success','flag'=>'1','message'=>'You are good to go for signup.','data'=>$Record);\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result = array('status'=>'error','flag'=>'2','message'=>$data['error'],'data'=>'Confidential');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$result = array('status'=>'error','flag'=>'2','message'=>'Parameters Missing. Please Check Again. Contact your API developer.','data'=>$data);\t\t\n\t\t\t}\n\t \n\t\tdo_action('after_user_login'); \n \t\t\n $this->data = $result;\n echo json_encode($this->data);\n\t\t\n\t}", "public static function handleAddMobile(\\WP_user $user)\n {\n GwapiSecurityTwoFactor::enqueueCssJs();\n\n include gatewayapi__dir() . '/tpl/wp-login-add-phone.php';\n }", "function user_deviceIsMobile() {\n\t\t$profileService = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('BusyNoggin\\\\BnAdaptiveprofiles\\\\Service\\\\ProfileService');\n\t\treturn $profileService->deviceHasPropertyValue('IsMobile', TRUE);\n\t}", "public function getUserMobileNumber()\n\t\t\t\t{\n\t\t\t\t\t\t\t\tif(isset($this->userMobileNumber))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\treturn $this->userMobileNumber;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}", "function getUserLists() {\r\n\t\t$current_user_id=$this->getCurrentUserID ();\t\r\n\t\t$user = new User ();\r\n\t\t$user->id = $current_user_id;\r\n\t\t$lists_array = array ();\r\n\t\tforeach ( $user->getOwnLists () as $list_row ) {\r\n\t\t\t$list = new QList ();\r\n\t\t\t$list->createFromID ( $list_row ['id'] );\r\n\t\t\t$lists_array [] = $list;\r\n\t\t}\r\n\t\techo json_encode ( $lists_array );\r\n\t}", "public function list(){\n\t\t\t$data['userData'] = $this->session->userdata();\n\t\t\t$data['title'] = 'Admin | List of Users';\n\t\t\t$data['userList'] = $this->admin_model->getUsers();\n\t\t\t$this->load->template('admin/users/list', $data);\n\t\t}", "function userlist(){\r\n $query = \"SELECT * FROM ads JOIN user ON ads.user = user.email\";\r\n \r\n $run = (mysql_query($query));\r\n \r\n \r\n while ($row = mysql_fetch_array($run)){\r\n $business = $row['user'];\r\n }\r\n $query = \"select * FROM user order by id DESC\";\r\n $run = (mysql_query($query));\r\n \r\n while ($row = mysql_fetch_array($run)){\r\n $id = $row['id'];\r\n $name = $row['name'];\r\n $email = $row['email'];\r\n $address = $row['address'];\r\n $img = $row['img'];\r\n if(empty($img)) $img = \"default.png\";\r\n echo \"\r\n <tr>\r\n <td><img src='../Img/$img' class='img-fluid' style='width:40px;height:40px;border-radius:50%;'></td>\r\n <td>$id</td>\r\n <td>$name</td>\r\n <td>$email</td>\r\n <td>$address</td>\r\n <td></td>\r\n <td>\r\n <a href='view.php?view=$id' data-toggle='modal' data-target='#User'><i class='fa fa-pencil fa-eye'></i></a>\r\n </td>\r\n </tr>\r\n \";\r\n }\r\n }", "public function loadMobileOSUserAgents()\n {\n return $this->getJSONFiles(\"MobileOS\");\n }", "function ajax_loadLists() {\n $this->mailchimp_init();\n $lists = DeMomentSomTresMailchimp::MailChimpGetLists($this->mcSession, true);\n if ($lists):\n $this->saveListsLastUpdate();\n $this->saveLists($lists);\n wp_send_json_success(__(\"Lists loaded\", 'DeMomentSomTres-MailChimp-Subscribe'));\n else:\n wp_send_json_error(__(\"An error happened\", 'DeMomentSomTres-MailChimp-Subscribe'));\n endif;\n }", "public function getCustomNumberMobile() {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $json = file_get_contents('php://input');\n $data = (object) json_decode($json);\n\n $count = $this->User->isUserExist($data->email);\n if ($count == 1) {\n $row = $this->CustomNumber->getCustomNumberMobile($data->email);\n if (isset($row)) {\n echo json_encode($row);\n }\n } else {\n $status = \"user does not exist\";\n }\n\n //echo \"{ 'status' : '$status' }\";\n }\n }", "function get_user_for_list()\n\t {\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('stream_user');\n\t\t\t\n\t\t\t\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->result_array(); \t\n\t\t}", "public static function get_users_in_context(userlist $userlist) {\r\n global $CFG,$DB;\r\n $context = $userlist->get_context();\r\n if ($context instanceof \\context_user) {\r\n require_once ($CFG->dirroot.\"/local/coursehub/CourseHub.php\");\r\n require_once($CFG->dirroot.'/local/magisterelib/databaseConnection.php');\r\n\r\n $hub = \\CourseHub::instance();\r\n if($hub->isNoConfig()){\r\n return;\r\n }\r\n if($hub->isMaster()){\r\n $aca = $CFG->academie_name;\r\n }else{\r\n $aca = $hub->getMaster();\r\n }\r\n\r\n if(array_key_exists($aca,get_magistere_academy_config())) {\r\n $user = $DB->get_record(\"user\",[\"id\"=> $context->instanceid]);\r\n\r\n $existusers = \\databaseConnection::instance()->get($aca)->execute(\r\n 'SELECT lcc.username FROM {local_coursehub_course} lcc\r\n WHERE lcc.username = :username',\r\n ['username' => $user->username]\r\n );\r\n\r\n if(count($existusers) > 0){\r\n $userlist->add_user($user->id);\r\n }\r\n }\r\n\r\n $sql = \"\r\n SELECT lcp.userid\r\n FROM {local_coursehub_published} lcp\r\n WHERE lcp.userid = :uid\";\r\n\r\n $params = [\r\n 'uid' => $context->instanceid,\r\n ];\r\n\r\n $userlist->add_from_sql('userid', $sql, $params);\r\n\r\n }\r\n }", "public function user_list(){\n\t\t$view = $this->getView('usersearch', 'html');\n\t\t$view->assign('action', 'list');\n\t\t$view->display();\n\t}", "function getUserList()\n\t{\n\t\tglobal $conn;\n\t\ttry {\n\t\t\tif(!($sql_users = $conn->prepare(\"SELECT FirstName, LastName, UID\n\t\t\t FROM traveluserdetails \n\t\t\t\t\t\t\t\t\t\t\t ORDER BY LastName ASC, FirstName ASC\"))) {\n\t\t\t\twrite2Error_Log(\"SELECT FirstName, LastName, UID in function getUserList()\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$sql_users->execute();\n\t\t\t$res_users = $sql_users->get_result();\n\t\t\t\n\t\t\twhile($row_users = $res_users->fetch_assoc()) {\n\t\t\t\t$returned_Data[] = $row_users;\n\t\t\t}\n\t\t\t$sql_users->close();\n\t\t\treturn $returned_Data;\t\t\t\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\twrite2Error_Log(\"getUserList(): \" . $e);\n\t\t}\t\t\n\t}", "public function show_list() {\n\t\t$this->load->model('Medicines_model');\n\t\t$data['medicines']=$this->Medicines_model->getList($this->session->userdata('userId'));\n\t\tif (!empty($_SESSION)) {\n\t\t\t$data['loggedUser']=$this->Medicines_model->getUserData($this->session->userdata('userId'));\n\t\t}\n\t\t$data['page']='medicines/list';\n\t\t$this->load->view('menu/content',$data);\n\t}", "public function all_user_list() {\r\n\t\t$data['page_data'] = $this->load->view('web_user/all_user', array(), TRUE);\r\n\t\techo modules::run(AUTH_DEFAULT_TEMPLATE, $data);\r\n\t}", "function get_user_list() {\n\n\tglobal $alias;\n\n\t$ret_users = \"\";\n\n\tif(isset($_GET['p'])) {\n\t\t$pattern = plain_escape($_GET['p']);\n\t} else {\n\t\theader(\"Location: users.php?p=\");\n\t\tsession_write_close();\n\t\texit;\n\t}\n\n\t$res = M_Login::get_users($pattern);\n\t$users = $res->value;\n\n\t$len = count($users);\n\tif($len > 0) {\n\t\tfor($i = 0; $i < $len; $i++) {\n\t\t\t\n\t\t\t$name = $users[$i]->name;\n\t\t\t$email = $users[$i]->email;\n\t\t\t$adminval = $users[$i]->admin;\n\t\t\tif($adminval) {\n\t\t\t\t$admin = \"Admin\";\n\t\t\t} else {\n\t\t\t\t$admin = \"User\";\n\t\t\t}\n\t\t\t$dob = $users[$i]->dob;\n\t\t\t$id = $users[$i]->id;\n\t\t\tif($users[$i]->verified) {\n\t\t\t\t$verified = \"Y\";\n\t\t\t} else {\n\t\t\t\t$verified = \"N\";\n\t\t\t}\n\n\t\t\t$ret_users .= <<<EOT\n\n\t\t\t<tr>\n\t\t\t\t<td><p><a class=\"friends\" href=\"$alias/profile/profile_look.php?user=$name\">$name</a></p></td>\n\t\t\t\t<td><p>$email</p></td>\n\t\t\t\t<td><form class=\"centerv\" method=\"POST\">\n\t\t\t\t\t<input class=\"centerv\" type=\"submit\" name=\"toggle\" value=\"$admin\" />\n\t\t\t\t\t<input class=\"centerv \"type=\"hidden\" name=\"adminval\" value=\"$adminval\" />\n\t\t\t\t\t<input class=\"centerv\" type=\"hidden\" name=\"name\" value=\"$name\" />\n\t\t\t\t</form></td>\n\t\t\t\t<td><p>$dob</p></td>\n\t\t\t\t<td><p>$id</p></td>\n\t\t\t\t<td><p>$verified</p></td>\n\t\t\t\t<td><form class=\"centerv\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"name\" value=\"$name\" />\n\t\t\t\t\t<input class=\"centerv\" type=\"submit\" name=\"delete\" value=\"Delete\" />\n\t\t\t\t</form></td>\n\t\t\t</tr>\n\nEOT;\n\n\t\t}\n\n\t} else {\n\t\t$ret_users .= \"<tr><p style=\\\"color: red;\\\">No usernames found matching \\\"$pattern\\\".</p></tr>\";\n\t}\n\n\treturn $ret_users;\n}", "public function getMyMobileRow()\n\t{\n\t\t$dbAuth = $this->getMyModel();\n\t\tif ( !empty($this->getDirector()[$dbAuth::KEY_MobileInfo]) ) {\n\t\t\treturn $this->getDirector()[$dbAuth::KEY_MobileInfo];\n\t\t}\n\t}", "public static function getList()\n\t{\n\t\tstatic $list = null;\n\t\tif (is_array($list))\n\t\t{\n\t\t\treturn $list;\n\t\t}\n\n\t\t$user = UserTable::getList(array(\n\t\t\t'select' => array('EMAIL'),\n\t\t\t'filter' => array(\n\t\t\t\t'=ID' => array_slice(\\CGroup::getGroupUser(1), 0, 200),\n\t\t\t\t'=ACTIVE' => 'Y'\n\t\t\t),\n\t\t\t'limit' => 1\n\t\t))->fetch();\n\n\t\tif ($user && $user['EMAIL'])\n\t\t{\n\t\t\t$email = $user['EMAIL'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$email = Option::get('main', 'email_from', '');\n\t\t}\n\n\t\t$list = array();\n\t\t$intl = array(\n\t\t\t'ru' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'ua' => array(\n\t\t\t\t'PHRASES' => array(),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'kz' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'by' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$messageMap = array(\n\t\t\t'AGREEMENT_TEXT' => 'MAIN_USER_CONSENT_INTL_TEXT',\n\t\t\t'LABEL_TEXT' => 'MAIN_USER_CONSENT_INTL_LABEL',\n\t\t\t'FIELDS_HINT' => 'MAIN_USER_CONSENT_INTL_FIELDS_HINT',\n\t\t\t'DESCRIPTION' => 'MAIN_USER_CONSENT_INTL_DESCRIPTION',\n\t\t\t'NOTIFY_TEXT' => 'MAIN_USER_CONSENT_INTL_NOTIFY_TEXT',\n\t\t);\n\t\t$languages = self::getLanguages();\n\t\tforeach ($languages as $languageId => $languageName)\n\t\t{\n\t\t\t$item = self::getLanguageMessages($languageId, $messageMap);\n\t\t\tif (!$item['AGREEMENT_TEXT'])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item['NAME'] = Loc::getMessage('MAIN_USER_CONSENT_INTL_NAME', array('%language_name%' => $languageName));\n\t\t\t$item['BASE_LANGUAGE_ID'] = isset(self::$virtualLanguageMap[$languageId]) ? self::$virtualLanguageMap[$languageId] : $languageId;\n\t\t\t$item['LANGUAGE_ID'] = $languageId;\n\t\t\t$item['LANGUAGE_NAME'] = $languageName;\n\n\t\t\t$item['PHRASES'] = array();\n\t\t\tif (isset($intl[$languageId]['PHRASES']))\n\t\t\t{\n\t\t\t\t$phraseMap = array();\n\t\t\t\tforeach ($intl[$languageId]['PHRASES'] as $phraseCode)\n\t\t\t\t{\n\t\t\t\t\t$phraseMap[$phraseCode] = \"MAIN_USER_CONSENT_INTL_PHRASE_{$phraseCode}\";\n\t\t\t\t}\n\t\t\t\t$item['PHRASES'] = self::getLanguageMessages($languageId, $phraseMap);\n\t\t\t}\n\n\t\t\t$item['FIELDS'] = array();\n\t\t\tif (isset($intl[$languageId]['FIELDS']))\n\t\t\t{\n\t\t\t\tforeach ($intl[$languageId]['FIELDS'] as $field)\n\t\t\t\t{\n\t\t\t\t\t$messageFieldsMap = array(\n\t\t\t\t\t\t'CAPTION' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}\",\n\t\t\t\t\t\t'PLACEHOLDER' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}_HINT\",\n\t\t\t\t\t\t'DEFAULT_VALUE' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}_DEFAULT\",\n\t\t\t\t\t);\n\n\t\t\t\t\t$field = $field + self::getLanguageMessages($languageId, $messageFieldsMap);\n\t\t\t\t\tif ($field['TYPE'] == 'text' && $field['DEFAULT_VALUE'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$field['PLACEHOLDER'] .= \"\\n\" . Loc::getMessage('MAIN_USER_CONSENT_INTL_HINT_FIELD_DEFAULT');\n\t\t\t\t\t\t$field['PLACEHOLDER'] .= \"\\n\" . $field['DEFAULT_VALUE'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$item['FIELDS'][] = $field;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$list[] = $item;\n\t\t}\n\n\t\treturn $list;\n\t}", "public function searchInJprofile($idList,$mobile)\n {\n $sql=\"SELECT PROFILEID,GENDER FROM newjs.JPROFILE WHERE PROFILEID IN ('$idList') AND PHONE_MOB IN('0$mobile','$mobile','+91$mobile','91$mobile')\"; \n $res=mysql_query_decide($sql) or logError($sql);\n if($row=mysql_fetch_array($res))\n\t\t{\n\t\t \t$this->ignoringId=$row[\"PROFILEID\"];\n\t\t\t$this->ignoringGender=$row[\"GENDER\"];\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n }", "function lists()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$instructions['action'] = array('report'=>'view_users');\n\t\tcheck_access($this, get_access_code($data, $instructions));\n\t\t\n\t\t$data['list'] = $this->_user->get_list(array('action'=>'report'));\n\t\t$this->load->view('user/list_users', $data); \n\t}", "function listu_open() {\n }", "public static function AddMobileFBUser($data)\n\t{\n\t\tglobal $_error;\n\t\t$data[\"password\"]\t= \t\"\";\n\t\t$data = Core::SanitizeData($data);\n\t\t$status \t= \t'';\n\t\t$error \t\t= \t'';\n\t\t$usrId \t\t= \t0;\n\t\t$user = new User();\n\t\t$user_id = $user->CheckFacebookId($data['fb_id']);\n\t\t$first_time = \"false\";\n\t\tif(!empty($user_id))\n\t\t{\n\t\t\t$result = $user_id;\n\t\t\t$first_time = \"false\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$user_id = $user->GetUserIdwithEmail($data['email']);\n\t\t\tif(!empty($user_id))\n\t\t\t{\n\t\t\t\t$rst = $user->InsertFBId($data['fb_id'],$user_id);\n\t\t\t\tif($rst)\n\t\t\t\t\t$result = $user_id;\n\t\t\t\t$first_time = \"true\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = $user->AddFBUser($data);\n\t\t\t\t$first_time = \"true\";\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif($result > 0)\n\t\t{\n\t\t\t$status \t= \t'success';\n\t\t\t$error \t\t= \t'';\n\t\t\t$usrId \t\t= \t$result;\t\n\t\t}\n\t\telse if(!$result)\n\t\t{\n\t\t $status \t= \t'failure';\n\t\t\t$error \t\t= \t$_SESSION[\"error\"];\n\t\t\t$_error->ResetError();\n\t\t}\n\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\"user\"\t\t=> $usrId,\n\t\t\t\"firsttime\" => $first_time\n\t\t);\n\t\t\n\t\t$rst = self::GenerateMobileOutput($resultArr);\n\t\treturn $rst;\n\t\t\n\t}", "public function getUserByMobile($mobile)\n {\n return $this->user->where('mobile', $mobile)->first();\n }", "public function getListOfUsersDetails($user_ids, $start = 0, $limit = 0);", "public function getGroupWithMobileNumber($arg = array()){\n\t\t$user_array = array();\n\t\t$query = array(\n\t\t\t'role__in' => isset($arg['sending_to']) ? $arg['sending_to'] : array('All'),\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'mobile',\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'compare' => '!='\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$user_query = new WP_User_Query($query);\n\t\t\n\t\tif ( ! empty( $user_query->results ) ) {\n\t\t\tforeach ( $user_query->results as $user ) {\n\t\t\t\t$user_array[] = array(\n\t\t\t\t\t'id' => $user->ID,\n\t\t\t\t\t'name' => $user->display_name, \n\t\t\t\t\t'mobile' => $user->mobile \n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $user_array;\n\t}", "public function show(Mobile $mobile)\n {\n //\n }", "function load_promotion_list() {\n\t\tSpaCMS_Promotion_Model::load_promotion_list();\n\t}", "function user_message_list($start, $limit, $direction = 0) {\n\t global $database;\n\n\t // SET VARIABLE\n\t $message_array = Array();\n\n\t // MAKE SURE MESSAGES ARE ALLOWED\n\t if($this->level_info[level_message_allow] != 0) {\n\n\t // BEGIN MESSAGE QUERY\n\t $message_query = \"SELECT se_pms.*, se_users.user_id, se_users.user_username, se_users.user_photo FROM se_pms LEFT JOIN se_users ON\";\n\n\t // MAKE SURE TO JOIN ON THE CORRECT FIELD (DEPENDENT ON DIRECTION)\n\t if($direction == 1) { $message_query .= \" se_pms.pm_user_id=se_users.user_id WHERE pm_authoruser_id='\".$this->user_info[user_id].\"' AND pm_outbox<>'0'\"; } else { $message_query .= \" se_pms.pm_authoruser_id=se_users.user_id WHERE pm_user_id='\".$this->user_info[user_id].\"' AND pm_status<>'2'\"; }\n\n\t // CONTINUE QUERY\n\t $message_query .= \" ORDER BY pm_date DESC LIMIT $start, $limit\";\n\n\t // LOOP OVER MESSAGES\n\t $messages = $database->database_query($message_query);\n\t while($message_info = $database->database_fetch_assoc($messages)) {\n\n\t // CREATE AN OBJECT FOR MESSAGE AUTHOR/RECIPIENT\n\t $pm_user = new se_user();\n\t $pm_user->user_info[user_id] = $message_info[user_id];\n\t $pm_user->user_info[user_username] = $message_info[user_username];\n\t $pm_user->user_info[user_photo] = $message_info[user_photo];\n\n\t // REMOVE LINE BREAKS FOR LIST\n\t $pm_body = str_replace(\"<br>\", \"\", $message_info[pm_body]);\n\n\t // SET MESSAGE ARRAY\n\t $message_array[] = Array('pm_id' => $message_info[pm_id],\n\t\t\t\t'pm_subject' => $message_info[pm_subject],\n\t\t\t\t'pm_date' => $message_info[pm_date],\n\t\t\t\t'pm_status' => $message_info[pm_status],\n\t\t\t\t'pm_outbox' => $message_info[pm_outbox],\n\t\t\t\t'pm_body' => $pm_body,\n\t\t\t\t'pm_user' => $pm_user);\n\t }\n\t }\n\n\t // RETURN MESSAGE ARRAY\n\t return $message_array;\n\n\t}", "function execute_list(){\n\tinclude_once(\"view/user.php\");\n\t$users = array();\n\t$users[\"user\"] = getUsers();\n\tviewUser($users);\n}", "public function memberList()\n {\n $map = array('user_id'=>$_SESSION['uid']);\n $fields = array('id','name','mobile','date_login');\n $page = page(D('Member')->getCount($map));\n\n $member_list = D('Member')->field($fields)->where($map)->order('date_login desc')->limit($page->firstRow,$page->listRows)->select();\n\n $fields_all = D('Member')->field_list();\n $data = array(\n 'title' => '会员列表',\n 'field_list' => $this->get_field_list($fields_all,$fields),\n 'field_info' => $member_list,\n 'page_list' => $page->show(),\n );\n $this->assign($data);\n $this->display('Public:list');\n }", "function non_verified_mobiles(){\n\t\tglobal $wpdb;\n\t\t$type_users=\"Non-Verified Mobiles\";\n\t\t$verified_users=$wpdb->get_results(\"select * from IDV_mcv_verification_data where is_verified=0\");\n\t\tinclude(\"verified_mobiles.php\");\n\t}", "public function load_popup_call_user($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n \t// pd(count($arrUser['mobile']));\n \t$iUserActionId = $_SESSION['userId'];\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\tif(!empty($strAlertMsg)) {\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($strTimeAlert)) {\n\t\t\t$strTimeAlert = date(FORMAT_MYSQL_DATETIME, $strTimeAlert);\n\t\t}\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n 'ref_id' => $arrUser['userid'],\n\t\t\t'incident_id' => $strIncidentId,\n\t\t\t'alert_id' => $strAlertId,\n\t\t\t'alert_message' => $strAlertMsg, \n\t\t\t'time_alert' => $strTimeAlert,\n\t\t\t'change_id' => $strChangeId,\n\t\t\t'ip_action' => $this->strIpAddress\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strTimeAlert' => $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId), 'layout_popup');\n\t}", "public function setMobile($var)\n {\n GPBUtil::checkString($var, True);\n $this->mobile = $var;\n\n return $this;\n }", "public function actionUserList() {\n if (!Yii::app()->request->isAjaxRequest)\n return false;\n\n echo json_encode(Message::getUserList(\n Yii::app()->request->getPost('roles'),\n Yii::app()->request->getPost('languages'),\n Yii::app()->request->getPost('paymentRegions'),\n Yii::app()->request->getPost('usersStatus'),\n Yii::app()->request->getPost('allowUsersWithUnConfirmedEmails'),\n Yii::app()->request->getPost('userSearchData'),\n true,\n false,\n Yii::app()->request->getPost('startDate'),\n Yii::app()->request->getPost('endDate'),\n Yii::app()->request->getPost('adminRoles')\n ));\n\n }", "function userList(){\n\t$errors = array();\n\t$aNull = null;\n\n\t// $ret holds return values for this function.\n\t// Returns:\n\t//\tmessage - applicable message(s)\n\t//\tsuccess - true|false success of operation. If false, error messages expected in 'message'.\n\t$ret = array();\n\t\n\t// precheck function parameters here. Add failures to $errors.\n\t\n\tif(!empty($errors)){\n\t\t$ret['message'] = $errors;\n\t\t$ret['success'] = false;\n\t}else{\n\t\ttry {\n\t\t\t$pdo \t= new PDO(DSN,DBUSER,DBPASS,array(PDO::ATTR_PERSISTENT => true));\t\t\t\t\n\t\t\t// set up stored procedure here. OUT params should be last, prefixed by @.\n\t\t\t$sql\t= 'call users_list()';\n\t\t\t$stmt\t= $pdo->prepare($sql);\t\t\t\t\t\t\n\t\t\t$stmt -> execute();\n\t\t\t$errs = $stmt->errorInfo();\t\t\t\t\t\t\n\t\t\tif (empty($errs[1])) {\n\t\t\t\t// On success, perform any post-operation activity here, e.g. set message.\n\t\t\t\t$ret['success'] = true;\n\t\t\t\t// loop through any result rows as necessary.\n\t\t\t\t// $results holds returned rows from database call (use if necessary).\n\t\t\t\t//$results = array();\n\t\t\t\t//while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t// add to array of results.\n\t\t\t\t//\t$results[]=$row;\n\t\t\t\t//}\n\n\t\t\t\t//For-Each loop on result rows.\t\t\t\t\n\t\t\t\t$users = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t$stmt -> closeCursor();\n\t\t\t\t\n\t\t\t\tforeach ($users as $user)\n\t\t\t\t{\t\t\n\t\t\t\t\t//\n\t\t\t\t\techo '<tr><td scope=\"row\">'.$user['USER_ID'].'</td><td>';\n\t\t\t\t\t// add admin role\n\t\t\t\t\t//echo '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Administrators\\');\"><span class=\"glyphicon glyphicon-user\" aria-hidden=\"true\"></span>Add Admin Role</a><br/>';\n\t\t\t\t\t// add voter role\n\t\t\t\t\t//echo '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span>Add Voter Role</a><br/>';\n\t\t\t\t\t// delete action\n\t\t\t\t\techo '<a href=\"#\" onclick=\"deleteUser('.$user['USER_ID'].');\"><span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span>Delete</a>';\n\t\t\t\t\t\n\t\t\t\t\techo '</td><td>'.$user['USER_NAME'].'</td><td>'.$user['EMAIL'].'</td>';\n\t\t\t\t\t\n\t\t\t\t\t// get user roles.\n\t\t\t\t\t$stmt = $pdo->prepare('call user_roles(?,?)');\n\t\t\t\t\t$stmt -> bindParam(1,$user['USER_ID']);\n\t\t\t\t\t$stmt -> bindParam(2,$aNull);\n\t\t\t\t\t$stmt -> execute();\n\t\t\t\t\t$errs = $stmt->errorInfo();\t\t\t\t\t\n\t\t\t\t\tif (empty($errs[1])){\n\t\t\t\t\t\t$roles = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t$stmt -> closeCursor();\n\t\t\t\t\t\t$hasAdmin = false;\n\t\t\t\t\t\t$hasVoter = false;\n\t\t\t\t\t\t$adminString = '';\n\t\t\t\t\t\t$voterString = '';\n\t\t\t\t\t\t$defString = '';\n\t\t\t\t\t\tforeach($roles as $role){\n\t\t\t\t\t\t\tswitch ($role['ROLE']){\n\t\t\t\t\t\t\t\tcase 'Administrators':\n\t\t\t\t\t\t\t\t\t$hasAdmin = true;\n\t\t\t\t\t\t\t\t\t$adminString = '<a href=\"#\" onclick=\"revokeUserRole('.$user['USER_ID'].',\\'Administrators\\');\"><span class=\"label label-info\">Admins</span></a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Voters':\n\t\t\t\t\t\t\t\t\t$hasVoter = true;\n\t\t\t\t\t\t\t\t\t$voterString = '<a href=\"#\" onclick=\"revokeUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"label label-success\">Voters</span></a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t$defString = '<a href=\"#\" onclick=\"revokeUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"label label-primary\">'.$role['ROLE'].'</span></a>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$hasAdmin){\n\t\t\t\t\t\t\t$adminString = '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Administrators\\');\"><span class=\"label label-default\">Add Admin Role</span></a>';\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$hasVoter){\n\t\t\t\t\t\t\t$voterString = '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"label label-default\">Add Voter Role</span></a>';\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '<td>'.$adminString.'&nbsp;'.$voterString.'&nbsp;'.$defString.'</td>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<td>Unable to obtain roles.</td>';\n\t\t\t\t\t\terror_log(print_r('Error '.$errs[1].': '.$errs[2], TRUE)); \t\n\t\t\t\t\t}\n\t\t\t\t\techo '</tr>';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// Use this to obtain OUT parameter values and do something with them.\n\t\t\t\t#$res = $pdo->query('SELECT @newid AS USER_ID')->fetch(PDO::FETCH_ASSOC);\t\t\t\n\t\t\t\t#$ret['message'] = 'User created ' . $res['USER_ID'];\n\t\t\t}else{\n\t\t\t\t// On failure, perform any post-operation activity here, e.g. determine error(s).\n\t\t\t\t$ret['success'] = false;\n\t\t\t\t// Use this switch to capture database error conditions.\n\t\t\t\tswitch ($errs[1]){\n\t\t\t\t\t//case \"1062\":\n\t\t\t\t\t//\t$ret['message'] = 'Duplicate record exists.';\n\t\t\t\t\t//\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$ret['message'] = 'There seems to be a problem. System administrators have been notified.';\n\t\t\t\t\t\t// Log error to PHP console. Could also return this message to caller, in case\n\t\t\t\t\t\t// it needs to be handled.\n\t\t\t\t\t\terror_log(print_r('Error '.$errs[1].': '.$errs[2], TRUE)); \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$ret['errors'] = 'Error '.$errs[1].': '.$errs[2];\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}catch (PDOException $e){\n\t\t\t// Catch-all error trap.\n\t\t\t$ret['success'] = false;\n\t\t\t$ret['message'] = $e->getMessage();\t\t\t\t\n\t\t}\t\n\t}\t\t\n}", "public static function get_by_mobile($_mobile)\n\t{\n\t\t$args =\n\t\t[\n\t\t\t'mobile' => $_mobile,\n\t\t\t'limit' => 1\n\t\t];\n\t\t$result = self::get($args);\n\t\treturn $result;\n\t}", "function updateMobile($action) {\n\n\t\t// Get posted values to make them available for models\n\t\t$this->getPostedEntities();\n\t\t$user_id = session()->value(\"user_id\");\n\n\t\t// does action match expected\n\t\tif(count($action) == 1 && $user_id) {\n\n\t\t\t$query = new Query();\n\n\t\t\t// make sure type tables exist\n\t\t\t$query->checkDbExistence($this->db_usernames);\n\n\t\t\t$mobile = $this->getProperty(\"mobile\", \"value\");\n\n\t\t\t// check if mobile exists\n\t\t\tif($this->userExists(array(\"mobile\" => $mobile, \"user_id\" => $user_id))) {\n\t\t\t\treturn array(\"status\" => \"USER_EXISTS\");\n\t\t\t\t// message()->addMessage(\"Mobile already exists\", array(\"type\" => \"error\"));\n\t\t\t\t// return false;\n\t\t\t}\n\n\n\t\t\t$current_user = $this->getUser();\n\t\t\t$current_mobile = $current_user[\"mobile\"];\n\n\t\t\t// mobile is sent\n\t\t\tif($mobile) {\n\n\t\t\t\t$verification_code = randomKey(8);\n\n\t\t\t\t// mobile has not been set before\n\t\t\t\tif(!$current_mobile) {\n\n\t\t\t\t\t$sql = \"INSERT INTO $this->db_usernames SET username = '$mobile', verified = 0, verification_code = '$verification_code', type = 'mobile', user_id = $user_id\";\n\t//\t\t\t\tprint $sql.\"<br>\";\n\t\t\t\t\tif($query->sql($sql)) {\n//\t\t\t\t\t\tmessage()->addMessage(\"Mobile added\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// mobile is changed\n\t\t\t\telse if($mobile != $current_mobile) {\n\n\t\t\t\t\t$sql = \"UPDATE $this->db_usernames SET username = '$mobile', verified = 0, verification_code = '$verification_code' WHERE type = 'mobile' AND user_id = $user_id\";\n\t//\t\t\t\tprint $sql.\"<br>\";\n\t\t\t\t\tif($query->sql($sql)) {\n//\t\t\t\t\t\tmessage()->addMessage(\"Mobile updated\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// mobile is NOT changed\n\t\t\t\telse if($mobile == $current_mobile) {\n\n//\t\t\t\t\tmessage()->addMessage(\"Mobile unchanged\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// mobile is not sent\n\t\t\telse if(!$mobile && $current_mobile !== false) {\n\n\t\t\t\t$sql = \"DELETE FROM $this->db_usernames WHERE type = 'mobile' AND user_id = $user_id\";\n//\t\t\t\tprint $sql.\"<br>\";\n\t\t\t\tif($query->sql($sql)) {\n//\t\t\t\t\tmessage()->addMessage(\"Mobile deleted\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n//\t\tmessage()->addMessage(\"Could not update mobile\", array(\"type\" => \"error\"));\n\t\treturn false;\n\n\t}", "function getUserMALList($database, $userID=Null, $onlyScored=False, $malID=False) {\n // if no userID is provided, fetches the global \n if ($userID === Null) {\n $userIDFilter = \"\";\n } else {\n $userIDFilter = \"WHERE `mal_userid` = \".intval($userID);\n }\n if ($onlyScored === False) {\n $scoreFilter = \"\";\n } else {\n $scoreFilter = \" && `p`.`score` != 0\";\n }\n return $database->toArray(\"SELECT `p`.`mal_userid`, `sat_users`.`ll_userid`, `users`.`username`, `p`.`animeid`, `mal_anime_info`.`title`, `p`.`score`, `p`.`status` FROM (\n SELECT v.* FROM (\n SELECT `animeid`, MAX(`list_id`) `list_id` FROM `seinma_llanimu`.`mal_animelist_changes`\n \".$userIDFilter.\"\n GROUP BY `animeid`\n ) `m`\n INNER JOIN `seinma_llanimu`.`mal_animelist_changes` `v` ON `m`.`animeid` = `v`.`animeid` AND `m`.`list_id` = `v`.`list_id`\n ) `p` LEFT OUTER JOIN `mal_anime_info` ON `mal_anime_info`.`animeid` = `p`.`animeid`\n LEFT OUTER JOIN `sat_users` ON `sat_users`.`mal_userid` = `p`.`mal_userid`\n LEFT OUTER JOIN `seinma_llusers`.`users` ON `users`.`id` = `sat_users`.`ll_userid`\n WHERE `p`.`status` != 0\".$scoreFilter.\" && `sat_users`.`visible` = 1\n ORDER BY `sat_users`.`ll_userid` ASC, `p`.`score` DESC, `mal_anime_info`.`title` ASC\");\n}", "public function masterlist()\n\t{\n\t\tif($this->checkLogin())\n\t\t{\n\t\t\t$user = $this->model('User');\n\n\t\t\t$pagenum = 1;\n\n\t\t\tif(isset($_GET['pn'])){\n\t\t\t\t$pagenum = $_GET['pn'];\n\t\t\t} \n\n\t\t\t$page_rows = 100;\n\t\t\t$limit = 'LIMIT ' .($pagenum - 1) * $page_rows .',' .$page_rows;\n\t\t\t// Grab the container information with the limit.\n\t\t\t$userList = $user->fetchUsers('',$limit);\n\n\t\t\t$row = $user->countUsers();\n\n\t\t\t$this->view('users/masterlist', ['userList'=>$userList, 'row'=>$row]);\n\t\t}\n\t}", "public function do_list()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/list' );\n\n }", "public function userSideBarList(Request $request) {\n \n $input = $request->all();\n \n $mobileNumber = $input['mobile_number'];\n \n if( isset( $mobileNumber ) && !empty( $mobileNumber ) ) {\n \n $userDetail = new UserDetail();\n $mobileNoExists = $userDetail->checkUserMobileNoExists( $mobileNumber );\n \n if( isset( $mobileNoExists ) && !empty( $mobileNoExists ) ) {\n\n $getUserDetail = new UserDetail();\n $sideBarLists = $getUserDetail->getSidebarProfileDetails( $input );\n\n /* echo \"<pre>\";\n print_r($sideBarLists);\n exit; */ \n if( isset( $sideBarLists ) && !empty( $sideBarLists ) ) {\n \n $response = array(); \n foreach( $sideBarLists as $i => $sideBarList ) { \n \n $response['user_id'] = $sideBarLists->user_id;\n $response['full_name'] = CustomHelper::getCamelCase($sideBarLists->full_name);\n $response['first_letter'] = CustomHelper::getFirstLetterReturn($sideBarLists->full_name);\n $response['user_level'] = \"Level : \".$sideBarLists->user_level;\n $response['user_type'] = Config::get('constant.USER');\n \n } \n\n if( isset( $response ) && !empty( $response ) ) { \n \n return response()->json(['success' => $this->successStatus, 'message' => $response], $this->successStatusCode );\n \n } else {\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printProfileNotCreated() ], $this->failureStatusCode );\n }\n \n } else { // if sideBarLists\n\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printProfileNotCreated() ], $this->failureStatusCode );\n }\n \n } else { \n\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printCorrectMobileNumber() ], $this->failureStatusCode );\n } \n\n } else {\n \n return response()->json(['success' => $this->failureStatus, 'message' => $this->printMobileNoMissing() ], $this->failureStatusCode );\n } \n\n }", "public function CardUserList($data)\n {\n\n global $_error;\n\t\t\n\t\t$data = Core::SanitizeData($data);\n\t\t$status \t= \t'';\n\t\t$error \t\t= \t'No Users';\n\t\t$usrId \t\t= \t0;\n\t\t$user = new User();\n // $qwerty=array();\n \n\t\t $result = $user->ListCardUser($data);\n if($result > 0)\n\t\t{\n \n \n\t\t\t$status \t= \t\"success\";\n\t\t\t$error \t\t= \t''; \n\t\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\n\t\t\t\t\t );\n foreach($result as $key=>$value)\n {\n $append=$key;\n $index=\"CardUser\".$key;\n $resultArr[$index]=$value;\n\t\t\t \n \n }\n\t\t\t\n \t\n\t\t}\n\t\telse if(!$result)\n\t\t{\n\t\t $status \t= \t'failure';\n\t\t\t$error \t\t= \t$_SESSION[\"error\"];\n\t\t\t$_error->ResetError();\n\t\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\"Users\" => $result\n \n \n\t\t);\n\t\t\n\t\t}\n else\n {\n $status \t= \t'failure';\n $resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\"Users\" => $result\n \n \n\t\t);\n\t\t\n }\n\t\t\n\t\t$rst = self::GenerateMobileOutput($resultArr);\n\t\t//echo \"<pre>\";print_r($rst);exit(0);\n\t\treturn $rst;\n\n\n }", "public static function get_users_in_context(\\core_privacy\\local\\request\\userlist $userlist) {\n $context = $userlist->get_context();\n\n if (!$context instanceof \\context_user) {\n return;\n }\n\n $params = [\n 'contextuser' => CONTEXT_USER,\n 'contextid' => $context->id,\n ];\n\n // Table local_intellicart.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart} ic\n JOIN {context} ctx\n ON ctx.instanceid = ic.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_checkout.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_checkout} ch\n JOIN {context} ctx\n ON ctx.instanceid = ch.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_logs.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_logs} l\n JOIN {context} ctx\n ON ctx.instanceid = l.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_waitlist.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_waitlist} w\n JOIN {context} ctx\n ON ctx.instanceid = w.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_users.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_users} iu\n JOIN {context} ctx\n ON ctx.instanceid = iu.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_history.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_history} h\n JOIN {context} ctx\n ON ctx.instanceid = h.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_seats.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_seats} s\n JOIN {context} ctx\n ON ctx.instanceid = s.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_subscr.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_subscr} sub\n JOIN {context} ctx\n ON ctx.instanceid = sub.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_shipping.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_shipping} sh\n JOIN {context} ctx\n ON ctx.instanceid = sh.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_wishlist.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_wishlist} wsh\n JOIN {context} ctx\n ON ctx.instanceid = wsh.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_reviews.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_reviews} rw\n JOIN {context} ctx\n ON ctx.instanceid = rw.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_reviews.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_comments} com\n JOIN {context} ctx\n ON ctx.instanceid = com.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_likes.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_likes} lk\n JOIN {context} ctx\n ON ctx.instanceid = lk.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_catsubscru.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_catsubscru} csub\n JOIN {context} ctx\n ON ctx.instanceid = csub.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_icheckout.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_icheckout} ich\n JOIN {context} ctx\n ON ctx.instanceid = ich.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_erequests.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_erequests} er\n JOIN {context} ctx\n ON ctx.instanceid = er.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_cissues.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_cissues} cis\n JOIN {context} ctx\n ON ctx.instanceid = cis.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_cpages.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_cpages} cpg\n JOIN {context} ctx\n ON ctx.instanceid = cpg.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_requests.\n $sql = \"SELECT ctx.instanceid AS userid\n FROM {local_intellicart_requests} urq\n JOIN {context} ctx\n ON ctx.instanceid = urq.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_ch_details.\n $sql = \"SELECT ctx.instanceid AS userid\n FROM {local_intellicart_ch_details} chd\n JOIN {context} ctx\n ON ctx.instanceid = chd.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n }", "public function loginUserMobile() {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $json = file_get_contents('php://input');\n $user = (object) json_decode($json);\n\n $count = $this->User->isUserExist($user->email);\n if ($count == 1) {\n $row = $this->User->loginUserMobile($user->email, md5($user->password));\n $this->output\n ->set_status_header(200)\n ->set_content_type('application/json', 'utf-8')\n ->set_output(json_encode($row))\n ->_display();\n exit();\n } else {\n $this->output\n ->set_status_header(401)\n ->set_content_type('application/json', 'utf-8')\n ->set_output(\" { \" . '\"status\"' . \" : \" . '\"user does not exist\"' . \" } \")\n ->_display();\n exit();\n }\n }\n }", "function getAllUsers(){\r\r\n\t$PView = new PView;\r\r\n\t$Appl = $PView -> getAppl();\r\r\n\t$u_SQL =& new db;\r\r\n\t$userArray = array();\r\r\n\t$u_SQL -> db_Select(\"user\", \"user_id\",\"\", \"nowhere\");\r\r\n\twhile($userTmp = $u_SQL -> db_Fetch()) {\r\r\n\t\tif ($userImagesCount = $PView->getUserImageCount($userTmp['user_id'])){\r\r\n\t\t\t$userArray[$userTmp['user_id']] = $userImagesCount;\r\r\n\t\t}\r\r\n\t}\r\r\n\tarsort($userArray);\r\r\n\t\r\r\n\t$userList = $this -> getGalleriffic_start();\r\r\n\t$userList.= \"<table width='100%'>\";\r\r\n\tforeach ($userArray as $key=>$dataset) {\r\r\n\t\t$userData = $PView->getUserData($key);\r\r\n\t\tif ($pv_galName = $PView -> getGalleryName($key)) {\r\r\n\t\t\t$pv_galInfo = \"<a href='pviewgallery.php?gallery=\".$key.\"'>\".LAN_PVIEW_SC_3.\" \".$pv_galName.\"</a>\";\r\r\n\t\t} else {\r\r\n\t\t\t$pv_galInfo = LAN_PVIEW_SC_2;\r\r\n\t\t}\r\r\n\t\t$userList.= \"<tr><td colspan = '2' style='border: 0px; padding-bottom:8px; padding-left:5px; padding-top: 15px;'><div class='image-title'>\".$userData['user_name'].\"</div>\";\r\r\n\t\t$userList.= \"<span class='smalltext'>(\".$dataset.\"&nbsp;\".LAN_ALBUM_1.\" , \".$pv_galInfo.\")</span></td></tr>\";\r\r\n\t\t$userList.= \"<tr><td width='25%' class='forumheader'>\".LAN_TMP_GALL_04.\"</td>\";\r\r\n\t\t$userList.= \"<td width='75%' class='forumheader'>\".LAN_MENU_1.\"</td></tr>\";\r\r\n\t\t$userList.= \"<tr><td width='25%' style='vertical-align:middle;'>\";\r\r\n\t\t$userList.= \"<a href='\".e_BASE.\"user.php?id.\".$key.\"'>\";\r\r\n\t\tif ($userimage = $userData['user_image']){\r\r\n\t\t\t$userList.= \"<img src='\".avatar($userimage).\"' style='padding:5px;' />\";\r\r\n\t\t} else {\r\r\n\t\t\t$userList.= \"<img src='\";\r\r\n\t\t\t$userList.= SITEURLBASE.e_PLUGIN_ABS.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/profile.png\";\r\r\n\t\t\t$userList.= \"' alt='\".LAN_IMAGE_53.\"' title='\".LAN_IMAGE_53.\"' style='padding:5px;' />\";\r\r\n\t\t}\r\r\n\t\t$userList.= \"</a>\";\r\r\n\t\t$userList.= \"</td><td width='75%'>\";\r\r\n\t\t$userList.= $this -> getLatestuserImages($key);\r\r\n\t\t$userList.= \"<p style='padding-top:10px;'><a href='pviewgallery.php?user=\".$key.\"'>\".LAN_TMP_GALL_05.\"</a></p>\";\r\r\n\t\t$userList.= \"<p class='smalltext' style='padding-top:10px;'>\".$userData['user_signature'].\"</p>\";\r\r\n\t\t$userList.= \"</td></tr>\";\r\r\n\t}\r\r\n\t$userList.= \"</table>\";\t\r\r\n\t\r\r\n\treturn $userList;\r\r\n}", "public function getListUserfullname() {\n\t\t\t$users= User::model()->findAll();\t\t\t\n\t\t\t$list[]= \"--- select all ---\";\t\n\t\t\tforeach($users as $row)\n\t\t\t{\t\t\t\t\t\n\t\t\t\t$list[$row['user_id']]= $row['user_full_name'];\t\n\t\t\t}\n\t\t\treturn $list;\n\t\t}", "public function getUserPhones() {\n $result = $this->db->select(\n \"SELECT * FROM `phone_numbers` WHERE `user_id_fk` = :id ORDER BY `best_order` ASC\",\n array (\"id\" => $this->user_id)\n );\n\n if (count($result) > 0) {\n return $result;\n } else {\n return false;\n }\n }", "public function AuthenticateMobileUser($data)\n\t{\n\t\tglobal $_error;\n\t\t$data = Core::SanitizeData($data);\n\t\t$status \t= \t'';\n\t\t$error \t\t= \t'';\n\t\t$usrId \t\t= \t0;\n\t\t$user = new User();\n\t\t$result = $user->Authenticate($data);\n\t\tif($result > 0)\n\t\t{\n\t\t\t$status \t= \t'success';\n\t\t\t$error \t\t= \t'';\n\t\t\t$usrId \t\t= \t$result['id'];\t\n\t\t}\n\t\telse if(!$result)\n\t\t{\n\t\t $status \t= \t'failure';\n\t\t\t$error \t\t= \t$_SESSION[\"error\"];\n\t\t\t$_error->ResetError();\n\t\t}\n\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n\t\t\t\"user\"\t\t=> $usrId\t\n\t\t);\n\t\t\n\t\t$rst = self::GenerateMobileOutput($resultArr);\n\t\treturn $rst; \n\t}", "function getUserListContent(){\n\tglobal $view_role;\n\n\tif(\n\t\t($view_role == 'admins' AND !is_admin()) OR \n\t\t($view_role == 'customers' AND !is_admin())\n\t){\n\t\treturn noAccess();\n\t}\n\n\t$tpl = '\n<div class=\"content-wrapper\">\n\n<div class=\"content-top-nav\">';\n\n\tif($view_role == 'admins')\n\t\t$tpl .= '<a href=\"/add-admin/\" class=\"graybtn\">Add Admin</a>';\n\n\tif($view_role == 'customers' OR (is_admin() AND !$view_role))\n\t\t$tpl .= '<a href=\"/add-customer/\" class=\"graybtn\">Add New Customer</a><div class=\"graybtn\" style=\"margin-left: 20px;padding: 0;\"><div id=\"add-users-spreadsheet-button-data-res\" style=\"padding: 0 15px;\" onclick=\"addUsersSpreadsheet();\" data-name=\"Add Customers from Spreadsheet\">Add Customers from Spreadsheet</div><input type=\"file\" id=\"spreadsheet-users-file\" data-role=\"customers\" style=\"display: none;position: relative;overflow: hidden;width: 1px;height: 1px;opacity: 0;\" /></div>';\n\n\tif($view_role == 'users' OR (is_customer() AND !$view_role))\n\t\t$tpl .= '<a href=\"/add-user/\" class=\"graybtn\">Add User</a><div class=\"graybtn\" style=\"margin-left: 20px;padding: 0;\"><div id=\"add-users-spreadsheet-button-data-res\" style=\"padding: 0 15px;\" onclick=\"addUsersSpreadsheet();\" data-name=\"Add Users from Spreadsheet\">Add Users from Spreadsheetqweqweqwe</div><input type=\"file\" id=\"spreadsheet-users-file\" data-role=\"users\" style=\"display: none;position: relative;overflow: hidden;width: 1px;height: 1px;opacity: 0;\" /></div>';\n\n$tpl .= '\n</div>\n\n<div class=\"content-inner-wrapper\">\n'.printTablePreParams().'\n'.printTableContent(true).'\n'.printTableContentJS().'\n'.printTableAfterParams(true).'\n</div>\n\n</div>\n';\n\treturn $tpl;\n}", "public function fetchList(User $user, $list, $input)\r\n { \r\n $query = $user->title()->where($list, 1);\r\n\r\n if (isset($input['genre']))\r\n {\r\n $query = $query->where('genre', 'like', '%'. $input['genre'].'%');\r\n }\r\n\r\n if (isset($input['min_rating']))\r\n {\r\n $query = $query->where('mc_critic_score', '>', (int) $input['min_rating'] * 10);\r\n }\r\n\r\n if (isset($input['max_rating']))\r\n {\r\n $query = $query->where('mc_critic_score', '<', (int) $input['max_rating'] * 10);\r\n }\r\n\r\n if (isset($input['min_year']))\r\n {\r\n $query = $query->where('year', '>', (int) $input['min_year']);\r\n }\r\n\r\n if (isset($input['max_year']))\r\n {\r\n $query = $query->where('year', '<', (int) $input['max_year']);\r\n }\r\n\r\n return $query->orderBy(Helpers::getOrdering(), 'desc')->paginate(18);\r\n }", "function userlist($id=null)\n\t\t\t{\n\t\t\t\t$this->layout\t= 'admin';\n\t\t\t\t$this->paginate = array('conditions' => array('Help.qus_id' => $id),'limit'=>'10',\"order\"=>'Help.qus_id');\n\t\t\t\t$userlist = $this->paginate('Help');\n\t\t\t\t//pr($userlist);die;\n\t\t\t\t$this->set('userlists',$userlist);\n\t\t\t\t$this->set('userid',$id);\n\t\t\t}", "public function getUserList(GetUserList $parameters) {\n return $this->__soapCall('getUserList', array($parameters), array(\n 'uri' => 'http://service.ws.um.carbon.wso2.org',\n 'soapaction' => ''\n ));\n }", "function load_form()\n\t{\n\t\t# Get the passed details into the form data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(4, array('user_id'));\n\t\t\n\t\t# User is editing\n\t\tif($urldata['user_id'] !== FALSE){\n\t\t//echo $urldata['user_id'];\n\t\t $data['user_id'] = $urldata['user_id'];\n\t\t\n\t\t\t$data['companyuserdetails'] = $this->Query_reader->get_row_as_array('pick_user_by_id', array('user_id'=>$urldata['user_id']));\n\t\t}\n\n\t\t$data['userdetails'] = $this->session->userdata('alluserdata');\n\t\t$id=$data['userdetails']['companyid'];\n\t\t$query = $this->Query_reader->get_query_by_code('pick_all_users', array('company_id'=>$id));\n\t\t$result = $this->db->query($query);\n\t\t$data['returned']= $result->num_rows();\n\t\t$data['user_array'] = $result->result_array();\n\t\t$data['curPage']='company';\n \t\t$data['service'] = $this->reminder->get_reminders();\n \t$data['insurance'] = $this->reminder->insurance_reminder();\n \t$data['license'] = $this->reminder->license_reminder();\n\n\t // notices\n\t\t$this->db->where( 'to_employee' ,$data['userdetails']['userid']);\t\t\n\t\t$this->db->where( 'has_read', '0');\t\t\n\t\t$notices = $this->db->get('notice_details');\n\t\t$data['count_notices'] = $notices->num_rows();\n\t\t$data['notice_details'] = $notices->result_array();\n\n\t\t$this->load->view('companyprofile/manageusers', $data);\n\t}", "public function load_all_users()\n {\n\n //validate the $_POST variable\n $_POST = filter_var_array($_POST,FILTER_SANITIZE_STRING);\n\n //store the final output\n $output=\"\";\n\n //store the user's model objec from $this->model_objs\n $user_obj=$this->model_objs[\"user_obj\"];\n\n //store the `load_type` index from $_POST variable\n $load_type=isset($_POST[\"load_type\"]) ? $_POST[\"load_type\"] : null;\n\n $all_users=array();\n\n \n\n //default value for total user is `0`\n $total_users = 0;\n\n //fetch total number of users\n $fetch_total_user_no=$user_obj->select();\n\n if($fetch_total_user_no[\"status\"] == 1 && $fetch_total_user_no[\"num_rows\"] > 0){\n\n //override the $total_users value \n $total_users = $fetch_total_user_no[\"num_rows\"];\n }\n \n\n //store the `page_no` index from $_POST variable\n $page_no= $_POST[\"page_no\"];\n \n //limit to show user per page\n $limit=20;\n \n //calculate the offset using $page_no and $limit\n $offset= ($page_no - 1) * $limit;\n \n //calculate total number of pages\n $total_pages=ceil($total_users / $limit);\n \n if($page_no > $total_pages || $page_no == 0){\n \n //throw the error message if user tried to set $page_no variable from URL\n $output .= \"\n <div>\n <h5>Page doesn't exist</h5>\n </div>\n \";\n\n }else{\n\n //fetch all users from users table\n $fetch_all_users=$user_obj->select(array(\n \"column_name\"=>\"\n users.user_id,\n users.user_name,\n users.user_email,\n users.user_role,\n users.user_joining_date\n \",\n \"order\"=>array(\n \"column\"=>\"users.user_id\",\n \"type\"=>\"DESC\"\n ),\n \"limit\"=>\"{$offset}, {$limit}\"\n ));\n \n if($fetch_all_users[\"status\"] == 1 && $fetch_all_users[\"num_rows\"] > 0){\n\n $text = ($offset + 1).\"-\".($offset + $fetch_all_users[\"num_rows\"]).\" out of {$total_users}\";\n \n $output .= \"\n <div class='user-list__result'>\n <p class='user-list__result-txt'>\n {$text}\n </p>\n </div>\n \";\n\n //set $all_user value to fetched information\n $all_users=$fetch_all_users[\"fetch_all\"];\n\n //Run a lop for fetching total posts and user_files\n foreach($all_users as $index=>$single_user){ \n\n //fetch total posts using a private functions `fetch_total_posts`\n $all_users[$index]['total_posts']=$this->fetch_total_posts($single_user[\"user_id\"]);\n \n //fetch user files using a private functions `fetch_user_file`\n $all_users[$index]['ufile_info'][\"profile_img\"]=$this->fetch_user_files($single_user[\"user_id\"], \"profile_img\");\n }\n }\n\n $output .= $this->print_all_user_table($all_users);\n\n if($total_users > $limit){\n\n $output .= \"\n <div class='user-list__pagination'>\n <ul class='user-list__page-list'>\n \n \";\n\n if($page_no > 1){\n\n $prev_page_no=($page_no - 1);\n\n $output .= \"\n <li class='user-list__page-item'>\n <a class='user-list__page-link' href='{$this->config->domain(\"users/{$this->user_info['user_name']}/dashboard?admin_options=users&page_no={$prev_page_no}\")}'>\n <i class='fa fa-angle-left'></i>\n </a>\n </li>\n \";\n }\n\n for($i=1; $i <= $total_pages; $i++){\n\n $link_active = ($page_no == $i) ? \"user-list__page-link--active\" : \"\";\n \n $output .= \"\n <li class='user-list__page-item'>\n <a class='user-list__page-link {$link_active}' href='{$this->config->domain(\"users/{$this->user_info['user_name']}/dashboard?admin_options=users&page_no={$i}\")}'>\n {$i}\n </a>\n </li>\n \";\n }\n \n\n if($page_no < $total_pages){\n\n $next_page_no=($page_no + 1);\n\n $output .= \"\n <li class='user-list__page-item'>\n <a class='user-list__page-link' href='{$this->config->domain(\"users/{$this->user_info['user_name']}/dashboard?admin_options=users&page_no={$next_page_no}\")}'>\n <i class='fa fa-angle-right'></i>\n </a>\n </li>\n \";\n }\n\n $output .= \"\n \n </ul>\n </div> \n \";\n }\n }\n\n echo $output;\n\n }", "protected function get_list_member( $list_id, $user_email ) {\n\t\tglobal $mc4wp;\n\n\t\treturn ( $mc4wp['api']->get_list_member( $list_id, $user_email ) );\n\t}", "public function getByMobile($mobile) {\r\n\t\tif (!$mobile) return false;\r\n\t\treturn self::getBy(array('mobile'=>$mobile));\r\n\t}", "public function getMobileDevices()\n {\n return $this->get(self::API_BASE_URL . '/users/' . $this->subscription->uid . '/mobileDevices');\n }", "public function AddMobileUser($data)\n\t{\n\t\tglobal $_error;\n\t\t$data[\"fb_id\"]\t=\t\"\";\n\t\t$data = Core::SanitizeData($data);\n\t\t$status \t= \t'';\n\t\t$error \t\t= \t'';\n\t\t$usrId \t\t= \t0;\n\t\t$user = new User();\n\t\t$result = $user->AddUser($data);\n \n\t\tif($result > 0)\n\t\t{\n $from =\"admin@weraiseit.com\"; // sender\n $subject = \"Account Registered\";\n $message = \"Your account has been registered \";\n // message lines should not exceed 70 characters (PHP rule), so wrap it\n $message = wordwrap($message, 70);\n // send mail\n mail($data['email'],$subject,$message,\"From: $from\\n\");\n\n $merchantId = $user->getMerchants($data['email']);\n \n\t\t\t$status \t= \t'success';\n\t\t\t$error \t\t= \t'';\n\t\t\t$usrId \t\t= \t$result;\n \t\n\t\t}\n\t\telse if(!$result)\n\t\t{\n\t\t $status \t= \t'failure';\n\t\t\t$error \t\t= \t$_SESSION[\"error\"];\n\t\t\t$_error->ResetError();\n\t\t}\n \n\t\t$resultArr = array(\n\t\t\t\"status\" \t=> $status,\n\t\t\t\"error\"\t\t=> $error,\n \"userId\" => $usrId,\n \"merchantId\" => $merchantId\n\t\t\t\n \n \n\t\t);\n\t\t\n\t\t$rst = self::GenerateMobileOutput($resultArr);\n\t\treturn $rst; \t\t\n\t}", "public function load_phone_numbers() {\n\n // Loads phone numbers\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Phone_numbers)->load_phone_numbers();\n\n }", "function getUsersDetailDB() {\n include 'connect.php';\n $sql = \"SELECT *\n FROM user, line\n WHERE line.user_id = user.id\n ORDER BY fullname \n \";\n $result = mysql_query($sql);\n \n $last_name = '';\n $y = 0;\n $i = 0;\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n \n if($row['fullname'] != $last_name){\n $y = 0;\n $userList['userList'][$i]['FULL_NAME'] = $row['fullname'];\n $userList['userList'][$i]['EXTENSIONS'][$y]['TEL_NUM'] = $row['number'];\n $y++;\n }else{\n $i--;\n $userList['userList'][$i]['EXTENSIONS'][$y]['TEL_NUM'] = $row['number'];\n $y++;\n }\n\n\n $last_name = $row['fullname'];\n $i++;\n \n }\n $userList['totalItems']= $i;\n \n \n return $userList;\n }", "public function getUserlistadmin() {\n \n // get userlist.\n $data = DB::table('users')\n ->select('first_name', 'email_address', 'last_name', 'id');\n return Datatables::of($data)->add_column('detail', '<a href=\"{{ URL::to( \\'user/updateuser\\', array( $id )) }}\" class=\"btn btn-sm default\">View</a>')\n ->remove_column('id')->make(true);\n }", "public function isMobile();", "public function isMobile();", "public function isMobile();", "function GetUserList($pageSize, $currentPage, $user_search_keywords) {\n //Check the parameters\n if (empty($pageSize) || empty($currentPage) || $pageSize == 0) {\n $data['status'] = 0;\n $data['message'] = 'Failed to get the user list, the parameters are incomplete or wrong';\n return $data;\n }\n //Keyword processing\n $user_search_keywords = \"%$user_search_keywords%\";\n //Paging processing\n $begin = $pageSize * ($currentPage - 1);\n //All user lists\n $list = $this->database_medoo->select('User', [\n \"[>]Role\" => [\"User_roleid\" => \"Role_id\"]\n ], [\n \"User.User_id\",\n \"User.User_username\",\n \"User.User_password\",\n \"User.User_name\",\n \"Role.Role_name\",\n \"Role.Role_id\"\n ], [\n \"AND\" => [\n \"OR\" => [\n \"User.User_username[~]\" => $user_search_keywords,\n \"User.User_password[~]\" => $user_search_keywords,\n \"User.User_name[~]\" => $user_search_keywords,\n \"Role.Role_name[~]\" => $user_search_keywords\n ],\n ],\n \"LIMIT\" => [$begin, $pageSize]\n ]);\n //count\n $total = $this->database_medoo->count('User', [\n \"[>]Role\" => [\"User_roleid\" => \"Role_id\"]\n ], \"*\", [\n \"OR\" => [\n \"User.User_username[~]\" => $user_search_keywords,\n \"User.User_password[~]\" => $user_search_keywords,\n \"User.User_name[~]\" => $user_search_keywords,\n \"Role.Role_name[~]\" => $user_search_keywords\n ],\n ]);\n //Deal with self-incrementing id\n $i = 0;\n foreach ($list as $key => $value) {\n $list[$key][\"id\"] = $i + $begin;\n $i++;\n }\n //return\n $data['status'] = 1;\n $data['message'] = 'Get the user list successfully';\n $data['data'] = $list;\n $data['total'] = $total;\n return $data;\n }", "function displayAllUsers() {\n\n\t\t// get list of users\n\t\t$usersQuery = mysql_query(\"select * from user where privacy = 'public' order by displayName\") or die (\"could grab users: \".mysql_error());\n\n\t\tif($this->privacy == 'private') {\n\t\t\t// customer's privacy is set to private, display notice\n\t\t\t$content = 'Don\\'t see yourself here? You are currently set as <b>private</b> user<br><a href=\"account_info.php\">Change that here</a>';\n\t\t} else {\n\t\t\t$content = 'Do you like dark, empty rooms? Don\\'t want others to see you here?<br><a href=\"account_info.php\">Change your privacy here</a>';\n\t\t}\n\n\t\techo '<div id=\"privacy_notice\">\n\t\t\t'.$content.'\n\t\t</div>';\n\n\t\twhile($row = mysql_fetch_array($usersQuery) ) {\n\n\t\t\t$row['NumDownloads'] = $this->getDownloads($row['id']);\n\t\t\t$row['conversions'] = $this->getConversions($row['id']);\n\n\t\t\tif($this->id == $row['id']) {\n\t\t\t\techo '<div class=\"its_you\">';\n\t\t\t} else {\n\t\t\t\techo '<div class=\"other_user\" style=\"border: 1px solid '.$row['navbarBG'].';\">';\n\t\t\t}\n\n\t\t\t// resize image if necessary\n\t\t\tif($row['user_photo'] != '') {\n\t\t\t\tlist($oldW,$oldH)=getimagesize('/var/www/'.$row['user_photo']);\n\t\t\t\tif($oldW > 40) {\n\t\t\t\t\t$newW=40;\n\t\t\t\t\t$newH=($oldH/$oldW)*$newW;\n\t\t\t\t} else {\n\t\t\t\t\t$newW=$oldW;\n\t\t\t\t\t$newH=$oldH;\n\t\t\t\t}\n\n\t\t\t\techo '<img align=\"absmiddle\" width=\"'.$newW.'\" height=\"'.$newH.'\" src=\"'.$row['user_photo'].'\" onClick=\"showPopup(\\''.$row['user_photo'].'\\',\\''.$row['id'].'\\');\">\n\t\t\t\t<div class=\"popover_div\" id=\"popover_div_'.$row['id'].'\" style=\"display: none; border: 2px dashed '.$row['navbarBG'].';\">\n\t\t\t\t<div style=\"text-align: right\"><span onClick=\"showPopup(this,\\''.$row['id'].'\\');\" style=\"cursor: pointer;\"><b>[x] Close</b></span></div>\n\t\t\t\t<div class=\"popover_div_content\" id=\"popover_div_content_'.$row['id'].'\" style=\"display: none;\"></div>\n\t\t\t\t</div>\n\t\t\t\t&nbsp;';\n\t\t\t}\n\t\t\techo '<span class=\"user_fullname\">'.$row['displayName'].' </span>&nbsp; <span id=\"expand_closeuser'.$row['id'].'\" onClick=\"switcharoo(\\'user'.$row['id'].'\\');\" class=\"expander\">[+] expand</span><br>';\n\n\t\t\techo '<div id=\"user'.$row['id'].'\" style=\"display:none;\" class=\"user_details\">';\n\n\t\t\techo '<div class=\"user_personal_info\">';\n\t\t\tif(($row['firstname'].' '.$row['lastname']) != $row['displayName']) {\n\t\t\t\techo '<span class=\"user_personal\"><span class=\"user_personal_title\">name:</span> '.$row['firstname'].' '.$row['lastname'].'</span><br>';\n\t\t\t}\n\t\t\tif($row['email'] != '') {\n\t\t\t\techo '<span class=\"user_personal\"><span class=\"user_personal_title\">email:</span> <a href=\"mailto:'.$row['email'].'\">'.$row['email'].'</a></span><br>';\n\t\t\t}\n\t\t\tif(trim($row['blog']) != '') {\n\t\t\t\techo '<span class=\"user_personal\"><span class=\"user_personal_title\">blog:</span> <a href=\"'.$row['blog'].'\" target=\"_blank\">'.$row['blog'].'</a></span><br>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t\techo '<div class=\"user_data_section\">';\n\t\t\t$debris=explode(' ',$row['added']);\n\t\t\t$added = $debris[0];\n\t\t\techo '<span class=\"user_data\">member since: '.$this->prettyDate($added).'</span><br>';\n\n\t\t\tif($row['modified'] != $row['added'] and $row['modified'] != '0000-00-00 00:00:00') {\n\t\t\t\t$debris=explode(' ',$row['modified']);\n\t\t\t\t$moded = $debris[0];\n\t\t\t\techo '<span class=\"user_data\">info last updated: '.$this->prettyDate($moded).'</a></span><br>';\n\t\t\t}\n\n\n\t\t\tif($row['NumDownloads'] == 0) {\n\t\t\t\t$UDratio = $row['uploads'];\n\t\t\t} else {\n\t\t\t\t$UDratio = ($row['uploads']/$row['NumDownloads']) * 100;\n\t\t\t}\n\t\t\tif($row['uploads'] == 0) {\n\t\t\t\t$CUratio = $row['conversions'];\n\t\t\t} else {\n\t\t\t\t$CUratio = ($row['conversions']/$row['uploads']) * 100;\n\t\t\t}\n\t\t\techo '<span class=\"user_data\">usage ratio: '.$row['uploads'].'/'.$row['NumDownloads'].' <span class=\"ratio_val\">'.number_format($UDratio, 2).' %</span> (uploads/downloads) </span><br>';\n\t\t\techo '<span class=\"user_data\">conversion ratio: '.$row['conversions'].'/'.$row['uploads'].' <span class=\"ratio_val\">'.number_format($CUratio, 2).' %</span> (conversions/uploads) </span><br>';\n\n\t\t\t// display total thumbsup\n\t\t\t$thumbsUpTotal = mysql_fetch_array(mysql_query(\"select count(*) as thumbs from thumbsup where user_id = \".$row['id'])) or error_log(\"could not get total thumbs for user: \".mysql_error());\n\n\t\t\techo '<span class=\"user_data\">thumbsup\\'d: '.$thumbsUpTotal['thumbs'].'</span>';\n\n\t\t\t// find suggestions (if any)\n\t\t\t$suggestionsQuery = mysql_query(\"select id, type, user_id, similar, suggestion_id from suggestions where user_id = \".$row['id']) or error_log(\"can't get suggestion: \".mysql_error());\n\t\t\t$suggestionString = '';\n\t\t\tif(mysql_num_rows($suggestionsQuery) > 0) {\n\t\t\t\twhile($sugg = mysql_fetch_array($suggestionsQuery) ) {\n\t\t\t\t\t// lookup artist/album\n\t\t\t\t\tmysql_query(\"select name from \".$sugg['type'].\" where id = \".$sugg['suggestion_id']) or error_log(\"can't get name: \".mysql_error());\n\t\t\t\t\t$nameLookup = mysql_fetch_array(mysql_query(\"select name from \".$sugg['type'].\" where id = \".$sugg['suggestion_id']));\n\n\t\t\t\t\t$text = '<tr id=\"sugg_row'.$sugg['id'].'\"><td width=\"15\" height=\"10\"></td><td class=\"suggestion_list\"><b>'.$nameLookup['name'].'</b> ('.$sugg['type'].')';\n\t\t\t\t\tif($sugg['similar'] != '') {\n\t\t\t\t\t\t$text .= ' -- similar to: <i>'.$sugg['similar'].'</i>';\n\t\t\t\t\t}\n\t\t\t\t\tif($sugg['user_id'] == $this->id) {\n\t\t\t\t\t\t$text .= '&nbsp; <span class=\"delete_suggestion\" onClick=\"deleteSuggestion('.$sugg['id'].');\">delete</span>';\n\t\t\t\t\t}\n\t\t\t\t\t$text .= '</td></tr>\n\t\t\t\t\t';\n\t\t\t\t\t$suggestionString .= $text;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($suggestionString != '') {\n\t\t\t\techo '<br><span class=\"user_data\">Suggestions:</span><table cellpadding=\"0\" cellspacing=\"0\">'.$suggestionString.'</table>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t\techo '</div></div>';\n\n\t\t}\n\n\t}", "public function list(){\n try {\n $sql = \"SELECT * FROM immobile\";\n $res = $this->conn->query($sql);\n if($res->num_rows > 0 ){\n $all = $res->fetch_all(MYSQLI_ASSOC);\n return $all;\n }\n } catch (\\Throwable $th) {\n return $th->getMessage();\n } \n }", "public function actionRefreshList() {\n\n if ($this->getVar('user') != NULL) {\n $user = User::model()->findByPK($this->getVar('user'));\n $this->createList();\n\n $this->render('threeGroups', array(\n 'user' => $user,\n 'friends_list' => $this->getVar('friends_list'),\n 'classes_num' => $this->getVar('classes_num'),\n 'names' => $this->getVar('names'),\n 'seen_final' => $this->getVar('seen_final'),\n 'not_seen_final' => $this->getVar('not_seen_final'),\n ));\n } else {\n // echo 'The user is not set <br>';\n return;\n }\n }", "public function actionListUser()\n {\n $users = [];\n $objectUser = Users::getInstancia();\n $users = $objectUser->getAllUsers();\n\n $this->renderHtml('../views/listUsers_view.php', $users);\n }" ]
[ "0.7389057", "0.59958255", "0.597863", "0.59509087", "0.5880628", "0.5835865", "0.5531006", "0.53775644", "0.52668685", "0.5249553", "0.5211918", "0.52056134", "0.5205135", "0.5178242", "0.5148441", "0.51392317", "0.51273984", "0.51169246", "0.5114876", "0.5110442", "0.51041013", "0.5093389", "0.5071596", "0.5061865", "0.5060676", "0.50597274", "0.50579304", "0.5051411", "0.5038834", "0.5030725", "0.5024364", "0.5015372", "0.50010234", "0.49966556", "0.49826744", "0.49818507", "0.4962283", "0.49611005", "0.4942483", "0.49368173", "0.49312812", "0.49066967", "0.4901243", "0.4899053", "0.48947966", "0.48926196", "0.48877802", "0.48756394", "0.48582196", "0.48454306", "0.48432428", "0.4831116", "0.48309752", "0.4829747", "0.48135236", "0.48106787", "0.480826", "0.4801033", "0.47996667", "0.47950172", "0.47942123", "0.4792782", "0.47915626", "0.47886854", "0.47874424", "0.4781595", "0.4779603", "0.47545648", "0.47530264", "0.47490695", "0.4746924", "0.4741277", "0.4740359", "0.47379693", "0.47348464", "0.47312865", "0.47292927", "0.47187442", "0.47165906", "0.4705684", "0.47026452", "0.47024244", "0.46941227", "0.46917164", "0.4690104", "0.4687757", "0.46713024", "0.46686816", "0.46686107", "0.46643472", "0.46632984", "0.46626234", "0.46624732", "0.46624732", "0.46624732", "0.46610534", "0.46597433", "0.46460912", "0.46342742", "0.4624845" ]
0.8253963
0
// function::load_popup_call_user_by_id description: popup execute action call user
// function::load_popup_call_user_by_id описание: попап выполнить действие вызвать пользователя
public function load_popup_call_user_by_id($iUserId, $strZbxHostName, $strIncidentId) { $iUserActionId = $_SESSION['userId']; $arrUser = $this->contact_model->getUserById($iUserId); //write log for user calling $strContent = 'Called to '.$arrUser['full_name']; $oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM)); $arrInsertData = array( 'content' => $strContent, 'action_type' => NOTIFY_ACTION_TYPE_CALL, 'user_action_id' => intval($iUserActionId), 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'), 'host_name' => $strZbxHostName ); $this->contact_model->insert_action_history($arrInsertData); $this->loadview('contact/popup_call_user', array('arrUser' => $arrUser, 'strZbxHostName' => $strZbxHostName, 'strIncidentId' => $strIncidentId), 'layout_popup'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_popup_call_user($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n \t// pd(count($arrUser['mobile']));\n \t$iUserActionId = $_SESSION['userId'];\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\tif(!empty($strAlertMsg)) {\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($strTimeAlert)) {\n\t\t\t$strTimeAlert = date(FORMAT_MYSQL_DATETIME, $strTimeAlert);\n\t\t}\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n 'ref_id' => $arrUser['userid'],\n\t\t\t'incident_id' => $strIncidentId,\n\t\t\t'alert_id' => $strAlertId,\n\t\t\t'alert_message' => $strAlertMsg, \n\t\t\t'time_alert' => $strTimeAlert,\n\t\t\t'change_id' => $strChangeId,\n\t\t\t'ip_action' => $this->strIpAddress\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strTimeAlert' => $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId), 'layout_popup');\n\t}", "public function load_popup_call_staff_VNGHR($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n\t\t//write log for user calling\n\t\t$this->insert_call_action_history($arrUser['id'], $arrUser['fullname'], $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId, NOTIFY_ACTION_TYPE_CALL);\n\t\t$this->loadview('contact/popup_call_vng_staff_list', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t'strIncidentId'\t\t=> $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t'strAlertId'\t\t=> $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' \t\t=> $strAlertMsg, \n\t\t\t\t\t\t\t\t\t\t\t\t'strTimeAlert' \t\t=> $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId'\t\t=> $strChangeId)\n\t\t\t\t\t\t\t\t\t\t\t\t, 'layout_popup');\n\t}", "public function load_popup_user_information() {\n\t\t$strUserDomain = $_REQUEST['user'];\n\t\t$strIncidentId = $strAlertId = $strAlertMsg = $strTimeAlert = $strIdentifier = $strChangeId = null;\n\t\tif(!empty($_REQUEST['incident_id'])) {\n\t\t\t$strIncidentId = $_REQUEST['incident_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_id'])) {\n\t\t\t$strAlertId = $_REQUEST['alert_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_msg'])) {\n\t\t\t$strAlertMsg = trim($_REQUEST['alert_msg']);\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($_REQUEST['time_alert'])) {\n\t\t\t$strTimeAlert = trim($_REQUEST['time_alert']);\n\t\t}\n\t\tif(!empty($_REQUEST['identifier'])) {\n\t\t\t$strIdentifier = $_REQUEST['identifier'];\n\t\t}\n\t\tif(!empty($_REQUEST['change_id'])) {\n\t\t\t$strChangeId = $_REQUEST['change_id'];\n\t\t}\n\t\t$arrUsersInfo = $this->contact_model->getListUsersInfoByUserDomain($strUserDomain);\n\t\t//$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain('minht');\n\t\t$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain($strUserDomain);\n\t\t$arrEmails = array();\n\t\t$arrSearched = array();\n\t\t$arrVNGStaffListSearched = array();\n\t\t$t = 0;\n\t\tif(!empty($arrUsersInfo)) {\n\t\t\t$noUserIdTemp = $arrUsersInfo[0]['userid']; \n\t\t\t$arrEmails[0] = $arrUsersInfo[0]['email'];\n\t\t\tforeach ($arrUsersInfo as $key => $oneUser) {\n\t\t\t\tif($noUserIdTemp != $oneUser['userid']) {\n\t\t\t\t\t$noUserIdTemp = $oneUser['userid'];\n\t\t\t\t\t$t = 0;\n\t\t\t\t\t$arrEmails[] = strtolower($oneUser['email']);\n\t\t\t\t} \n\t\t\t\t$arrSearched[$noUserIdTemp][$t] = $oneUser;\n\t\t\t\t$t++;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$arrSearched = array();\n\t\t}\n\n\t\tif(!empty($arrVNGStaffList)) {\n\t\t\tforeach ($arrVNGStaffList as $index => $oOneStaff) {\n\t\t\t\tif(!in_array(strtolower($oOneStaff->email), $arrEmails)) {\n\t\t\t\t\t$arrVNGStaffListSearched[] = $oOneStaff;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$arrVNGStaffListSearched = array();\n\t\t}\n\t\t$this->loadview('contact/popup_search_by_user_result', array('arrSearchUsersResult' => $arrSearched, 'arrVNGStaffs' => $arrVNGStaffListSearched, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIdentifier' => $strIdentifier, 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_list_mobile_user() {\n \t// pd($_REQUEST);\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getUserById($iUserId);\n \t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['mobile'] = str_replace($arrOrders, ', ', $arrUser['mobile']);\n\t \t\t$arrUser['mobile'] = str_replace($arrChildOrders, '', $arrUser['mobile']);\n\t \t$arrUser['mobile'] = explode(', ', $arrUser['mobile']);\n\t\t\t\t$this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t \t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function loadUser($id);", "public function lookup_user($id);", "public function loadProfilePopup()\n {\n $this->error(false);\n\n $sM = $this->get('m');\n $sModule = $this->get('module');\n $sName = $this->get('name');\n $sMatchType = $this->get('match_type');\n $sMatchID = $this->get('match_id');\n $sMatchName = $this->get('match_name');\n\n $bIsRight = false;\n $sMatchTypeUserConvertToPages = $sMatchType;\n if ($sMatchType == 'user')\n {\n $bIsRight = true;\n $aUser = Phpfox::getService('user')->getByUserName($sMatchName);\n if (isset($aUser['user_id']) === true)\n {\n // check pages object\n if ((!isset($aUser['user_id'])) || (isset($aUser['user_id']) && $aUser['profile_page_id'] > 0))\n {\n if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n {\n $sMatchTypeUserConvertToPages = 'page';\n }\n } else\n {\n Phpfox::getBlock('profilepopup.user');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n } else\n {\n $bIsRight = false;\n\t\t\t\t\t\t\t\t$sMatchTypeUserConvertToPages = 'page';\n }\n }\n if ($sMatchType == 'page' || $sMatchTypeUserConvertToPages == 'page')\n {\n $bIsRight = true;\n\t\t\t\t\t\tif (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aPage = Phpfox::getService('pages')->getForView($sMatchID);\n if (!$aPage)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.pages');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'event')\n {\n $bIsRight = true;\n $aEvent = Phpfox::getService('event')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.event');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'fevent')\n {\n $bIsRight = true;\n if (Phpfox::isModule('fevent'))\n {\n $aEvent = Phpfox::getService('fevent')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.fevent');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n }\n\n if ($bIsRight === false)\n {\n echo json_encode(array('content' => '', 'msg' => \"failure\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }", "public function load_popup_sms() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = @$_REQUEST['incident_id'];\n\t\t$strAlertId = @$_REQUEST['alert_id'];\n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = isset($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = isset($_REQUEST['change_id']) ? trim($_REQUEST['change_id']) : null;\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n\t\t$arrOneUser = array();\n\t\tif($noUserId != null) {\n\t\t\t$arrOneUser = $this->contact_model->getUserById($noUserId);\n\t\t\tif(!empty($arrOneUser)) {\n\t\t\t\t$arrOneUser['mobile'] = str_replace($arrOrders, ', ', $arrOneUser['mobile']);\n\t\t \t$arrOneUser['mobile'] = str_replace($arrChildOrders, '', $arrOneUser['mobile']);\n\t\t if(strpos($arrOneUser['mobile'], ',')!==false) {\n\t\t $arrOneUser['mobile'] = explode(', ', $arrOneUser['mobile']);\n\t\t } else {\n\t\t $arrOneUser['mobile'] = array($arrOneUser['mobile']);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$this->loadview('contact/popup_send_message', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_list_mobile_user_vng_staff_list() {\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getStaffById($iUserId);\n\t\t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['cellphone'] = str_replace($arrOrders, ', ', $arrUser['cellphone']);\n\t \t\t$arrUser['cellphone'] = str_replace($arrChildOrders, '', $arrUser['cellphone']);\t \t\t\n\t \t$arrUser['cellphone'] = explode(', ', $arrUser['cellphone']);\n\t\t $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t\t\t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "function get_params_user_by_id($id, $user_id) {\n $this->db->where('pluginsext_id', $this->security->xss_clean($id));\n $this->db->where('pluginsext_user_id', $this->security->xss_clean($user_id));\n $r = $this->db->get($this->table_name_user);\n return $r;\n }", "function addAssignedUserID($displayname, $varname) {\n global $app_strings;\n\n $json = getJSONobj();\n\n $popup_request_data = array(\n 'call_back_function' => 'set_return',\n 'form_name' => 'MassUpdate',\n 'field_to_name_array' => array(\n 'id' => 'assigned_user_id',\n 'user_name' => 'assigned_user_name',\n ),\n );\n $encoded_popup_request_data = $json->encode($popup_request_data);\n $qsUser = array('method' => 'get_user_array', // special method\n 'field_list' => array('user_name', 'id'),\n 'populate_list' => array('assigned_user_name', 'assigned_user_id'),\n 'conditions' => array(array('name' => 'user_name', 'op' => 'like_custom', 'end' => '%', 'value' => '')),\n 'limit' => '30', 'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']);\n\n $qsUser['populate_list'] = array('mass_assigned_user_name', 'mass_assigned_user_id');\n $html = <<<EOQ\n\t\t<td width=\"15%\" class=\"dataLabel\">$displayname</td>\n\t\t<td class=\"dataField\"><input class=\"sqsEnabled\" autocomplete=\"off\" id=\"mass_assigned_user_name\" name='assigned_user_name' type=\"text\" value=\"\"><input id='mass_assigned_user_id' name='assigned_user_id' type=\"hidden\" value=\"\" />\n\t\t<input title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1\n\t\t\t\tonclick='open_popup(\"Users\", 600, 400, \"\", true, false, $encoded_popup_request_data);' />\n\t\t</td>\nEOQ;\n $html .= '<script type=\"text/javascript\" language=\"javascript\">if(typeof sqs_objects == \\'undefined\\'){var sqs_objects = new Array;}sqs_objects[\\'mass_assigned_user_name\\'] = ' .\n $json->encode($qsUser) . '; registerSingleSmartInputListener(document.getElementById(\\'mass_assigned_user_name\\'));\n\t\t\t\taddToValidateBinaryDependency(\\'MassUpdate\\', \\'assigned_user_name\\', \\'alpha\\', false, \\'' . $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'] . '\\',\\'assigned_user_id\\');\n\t\t\t\t</script>';\n\n return $html;\n }", "function &LoadUserByID($id)\n\t{\n\t\t$result = false;\n\n\t\t$gCms = cmsms();\n\t\t$db = $gCms->GetDb();\n\n\t\t$query = \"SELECT username, password, active, first_name, last_name, admin_access, email FROM \".cms_db_prefix().\"users WHERE user_id = ?\";\n\t\t$dbresult = $db->Execute($query, array($id));\n\n\t\twhile ($dbresult && $row = $dbresult->FetchRow())\n\t\t{\n\t\t\t$oneuser = new User();\n\t\t\t$oneuser->id = $id;\n\t\t\t$oneuser->username = $row['username'];\n\t\t\t$oneuser->password = $row['password'];\n\t\t\t$oneuser->firstname = $row['first_name'];\n\t\t\t$oneuser->lastname = $row['last_name'];\n\t\t\t$oneuser->email = $row['email'];\n\t\t\t$oneuser->adminaccess = $row['admin_access'];\n\t\t\t$oneuser->active = $row['active'];\n\t\t\t$result = $oneuser;\n\t\t}\n\n\t\treturn $result;\n\t}", "function popup($id, $options = array())\n\t{\n\t\t$options = am(\n\t\t\tarray(\n\t\t\t\t'type' => 'notice',\n\t\t\t\t'title' => '',\n\t\t\t\t'content' => '',\n\t\t\t\t'actions' => array('ok' => 'Ok'),\n\t\t\t\t'callback' => ''\n\t\t\t),\n\t\t\t$options\n\t\t);\n\t\t$options['id'] = $id;\n\t\t$options['plugin'] = 'popup';\n\t\t\n\t\t$method = '_'.$options['type'];\n\t\tif (method_exists($this, $method))\n\t\t\treturn call_user_func(array($this, $method), $options);\n\t\t\n\t\treturn $this->_popup($options);\n\t}", "function refresh_user_details($id)\n{\n}", "public function load($id){\r\n\t\t$sql = 'SELECT * FROM teamroom_push_forms.user_forms WHERE id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id);\r\n\t\treturn $this->getRow($sqlQuery);\r\n\t}", "function admin_view_user($id) {\n\t\t//\n\t}", "function display_profile($userid = 0)\n{\n global $ilance, $myapi;\n \n return fetch_user('displayprofile', intval($userid));\n}", "public function LoadEvalAcctoIdUser($id_user)\n {\n $table_name = \"evaluation\";\n $columns = \"*\";\n $where[] = array(\"column\" => \"id_user\", \"value\" => $id_user, \"symbol\" => \"=\");\n\n $h_info = $this->DBSelectAll($table_name, $columns, $where);\n \n return $h_info;\n \n \n }", "static function lookup($id) {\n return self::_lookup_user_by_field(\"id\", $id);\n }", "public function get_user_for_show($id)\n {\n $sql = \"SELECT * FROM $this->table\n WHERE $this->table.id = :id\";\n $this->db->query($sql);\n $this->db->bind(':id', $id);\n if($this->db->execute()) {\n return $this->db->fetch_first();\n } else {\n return false;\n }\n }", "function load(user_id)\n{\n\t// use the user_id to search for and load any records that it matches\n}", "public function load($id){\n\t\t$sql = new SqlManager();\n\t\t$sql->setQuery(\"SELECT * FROM user WHERE id = {{id}}\");\n\t\t$sql->bindParam(\"{{id}}\", $id);\n\t\t$user = $sql->result();\n\t\tif(isset($user['id']) && $user['id'] == $id){\n\t\t\t$this->id = $id;\n\t\t\t$this->data = $user;\n\t\t\t$this->meta = Meta::load(\"user\", $this->id);\n\t\t\t$this->config = new Config($this->id);\n\t\t\tif(isset($this->meta[\"usergroup\"])){\n\t\t\t\t$this->groups = $this->meta[\"usergroup\"];\n\t\t\t}\n\t\t}\n\t}", "function leadership_user_login_link_popup($user, $js = NULL) {\n $uli = _leadership_user_login_link($user);\n $popup_content = t('<p>One-time login link for @username.</p>', array('@username' => format_username($user)));\n $popup_content .= '<p>' . $uli . '</p>';\n\n // Checking JavaScript is enabled.\n if (!$js) {\n // If JavaScript is disabled, add return link and output\n // content without the popup.\n $popup_content .= '<p>' . l(t('Return'), 'admin/leadership/user');\n return $popup_content;\n }\n\n // If everything is ok and JavaScript is enabled, add the necessary\n // libraries and JS to work with modal windows.\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n\n // Forming a modal window.\n return (ctools_modal_render('User Login Link', $popup_content));\n}", "public function user_profile($id = null) {\r\n\t\t$data['page_title'] = \"User profile\";\r\n\t\t$view_data['user_id'] = $id;\r\n\t\t$data['page_data'] = $this->load->view('web_user/user_profile', $view_data, TRUE);\r\n\t\techo modules::run(AUTH_DEFAULT_TEMPLATE, $data);\r\n\t}", "function loadUser ($id, $log=true){\r\r\n if (list($row) = $GLOBALS['core']->sqlSelect('mod_users', 'user_id', $id)){\r\r\n extract($row);\r\r\n\r\r\n $this->user_id = $id;\r\r\n $this->username = $username;\r\r\n $this->password = $password;\r\r\n $this->email = $email;\r\r\n\r\r\n $this->realname = $realname;\r\r\n $this->address = $address;\r\r\n $this->city = $city;\r\r\n $this->state = $state;\r\r\n $this->zip = $zip;\r\n $this->org = $org;\r\n\t $this->rootOrg = $rootOrg;\r\n $this->phone = $phone;\r\r\n\t $this->realname = $realname;\r\n\t $this->head = $head;\r\n $this->zip = $zip;\r\n $this->appuid = $appuid;\r\n $this->Longitude = $Longitude;\r\n $this->Latitude = $Latitude;\r\n $this->locationtime = $locationtime;\r\n\r\n\t if ($admin_switch) $this->admin_switch = TRUE;\r\r\n else $this->admin_switch = FALSE;\r\r\n\r\r\n if ($deity) $this->deity = TRUE;\r\r\n else $this->deity = FALSE;\r\r\n\r\r\n $this->last_on = $last_on;\r\r\n\r\r\n $this->loadModSettings('user');\r\r\n $this->setPermissions();\r\r\n\r\r\n if ($groups) $this->groups = $this->listGroups();\r\r\n\r\r\n $this->groupPermissions = $this->getMemberRights();\r\r\n $this->groupModSettings = $this->loadUserGroupVars();\r\r\n if ($log) PHPWS_User::updateLogged($id);\r\r\n return TRUE;\r\r\n } else \r\r\n return FALSE;\r\r\n }", "public function fetch_userid($id){\n return $id;\n }", "static function activate_user($id_user){\n if(!is_int($id_user))\n return false;\n return self::$PDO->prepare('CALL '.self::$prefix.'activate_user(:id_user)')->execute(array(':id_user'=>$id_user));\n }", "public function getUser($id) {\n $user = $this->UserModel->getRow($id);\n \n include('views/user/show.php');\n }", "function get_user_to_edit($user_id)\n{\n}", "public function loadUser($user);", "public function getSpecificUser($user_id = 0);", "public function onLoadCallback()\n {\n if (!\\Input::get('dcawizard') || 'edit' !== \\Input::get('act')) {\n return;\n }\n\n if (version_compare(VERSION, '4.0', '>')) {\n $session = \\System::getContainer()->get('session')->getBag('contao_backend')->get('popupReferer');\n } else {\n $session = \\Session::getInstance()->get('popupReferer');\n }\n\n if (!is_array($session)) {\n return;\n }\n\n list($table, $id) = explode(':', \\Input::get('dcawizard'));\n\n // Use the current URL without (act and id parameters) as referefer\n $url = \\Haste\\Util\\Url::removeQueryString(['act', 'id'], \\Environment::get('request'));\n $url = \\Haste\\Util\\Url::addQueryString('id=' . $id, $url);\n\n // Replace the last referer value with the correct link\n end($session);\n $session[key($session)]['current'] = $url;\n\n \\Session::getInstance()->set('popupReferer', $session);\n }", "function pubf_LoadUser($idUser)\n\t{\n\t\t$strSQLoadUser= $this->selectQuery(\"select * from users where idUserWordpress={$idUser}\");\n\t\t\tif($strSQLoadUser && $strSQLoadUser->idUser){\n\t\t\t\t$this->idUsers = $strSQLoadUser->idUser;\n\t\t\t\t$this->birthday = $strSQLoadUser->birthday;\n\t\t\t\t$this->address = $strSQLoadUser->address;\n\t\t\t\t$this->idUserWordpress = $strSQLoadUser->idUserWordpress;\n\t\t\t\t$this->urlProfileImage = $strSQLoadUser->urlProfileImage;\n\t\t\t\t$this->phone = $strSQLoadUser->phone;\n\t\t\t}\n\n\t}", "public function show($idUser, $id)\n\t{\n\t\t//\n\t}", "public function User_load($user) {\n\n $key = $user->getResourceLink()->getKey();\n $id = $user->getResourceLink()->getId();\n $userId = $user->getId(LTI_Tool_Provider::ID_SCOPE_ID_ONLY);\n $sql = 'SELECT lti_result_sourcedid, created, updated ' .\n 'FROM ' . $this->dbTableNamePrefix . LTI_Data_Connector::USER_TABLE_NAME . ' ' .\n 'WHERE (consumer_key = :key) AND (context_id = :id) AND (user_id = :user_id)';\n $query = $this->db->prepare($sql);\n $query->bindValue('key', $key, PDO::PARAM_STR);\n $query->bindValue('id', $id, PDO::PARAM_STR);\n $query->bindValue('user_id', $userId, PDO::PARAM_STR);\n $ok = $query->execute();\n if ($ok) {\n $row = $query->fetch(PDO::FETCH_ASSOC);\n $ok = ($row !== FALSE);\n }\n\n if ($ok) {\n $row = array_change_key_case($row);\n $user->lti_result_sourcedid = $row['lti_result_sourcedid'];\n $user->created = strtotime($row['created']);\n $user->updated = strtotime($row['updated']);\n }\n\n return $ok;\n\n }", "public function caller($user_id)\n\t{\n\t\tif (!correct_user($user_id)) return;\n\n\t\t$experiments = $this->callerModel->get_experiments_by_caller($user_id);\n\n\t\t$data['page_title'] = lang('experiments');\n\t\t$data['table'] = create_experiment_table($experiments);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/list_view', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "function getUser ($id) {\n $user = R::load( 'user', $id );\n return $user;\n }", "public function id($id) {\n\t\t\t$left['row'] = $this->left_menu_model->get_user_condtions(); \n\t\t\t$this->load->model('messages_model');\n\t\t\t$mess['count'] = $this->messages_model->unread_mess(); \n\t\t\t$prof = $this->Profile_model->get_profile($id);\n\t\t\t$username = $prof[0]['username'];\n\t\t\t$array['title'] = \"Профил на $username - Bomba+ \"; // Title of the page\n\t\t\t\n\t\t\t$arr = array(\n\t\t\t\t'user' => $prof,\n\t\t\t\t'conv' => $this->Profile_model->get_profile_conv($id)\n\t\t\t);\n\t\t\t\n\t\t\t$this->load->vars($array);\n\t\t\t$this->load->vars($mess);\n\t\t\t$this->load->vars($left);\n\t\t\t$this->load->vars($arr);\n\t\t\t\n\t\t\t$this->load->template('profile_view'); \n\t\t}", "public function loadUserPayPalUser()\n {\n }", "public function getId($id){\n $data['id'] = $id;\n\n return $this->view->load(\"users/get_id\", $data);\n }", "public function retrieveWebhookCall(string $id): WebhookCall;", "function bp_core_get_displayed_userid( $user_login ) {\r\n\treturn apply_filters( 'bp_core_get_displayed_userid', bp_core_get_userid( $user_login ) );\r\n}", "function get_by_id($id, $user_id=0) {\n $this->db->where('pluginsext_id', $this->security->xss_clean($id));\n $r = $this->db->get($this->table_name);\n return $r;\n }", "public function actionCheck($id)\n {\n $hm = UserHeadManager::findHeadManagerByUser();\n\n /** @var ApiCredentials $credentials */\n $credentials = ApiCredentials::find()->where(['user_id' => $hm->id])->one();\n\n if ($credentials && $credentials->auth()) {\n /** @var Call $call */\n $call = Call::findOne($id);\n\n if (!$call) {\n return null;\n }\n\n $user_settings = UserSettings::settings($call->user_id);\n\n $search = [\n 'date_from' => gmdate('d M Y H:i:s T', $call->started_at - 120),\n 'date_to' => gmdate('d M Y H:i:s T', $call->ended_at + 120),\n ];\n\n if ($user_settings) {\n $search['number'] = $user_settings->number;\n }\n\n $result = $credentials->api->request('history/search.json', $search);\n\n if (isset($result['data']) && count($result['data']) && !empty($result['data'][count($result['data']) - 1]['uuid'])) {\n $call->record_url = '/integration/onlinepbx/call/listen?uid=' . $result['data'][count($result['data']) - 1]['uuid'];\n $call->update(false, ['record_url']);\n\n return $this->redirect($call->record_url);\n }\n\n return null;\n }\n\n return null;\n }", "public function fetchUserInfo($id)\n {\n $this->user->getByID($id);\n $_SESSION['userForChange'] = $this->user->getId();\n include APP_ROOT . '/views/menu.php';\n include APP_ROOT . '/views/userInfo.php';\n }", "public function getUserByID($id);", "function get_user_by_id($id) \n\t{\n\t\treturn parent::get_by_id($this->tbl, $id);\n\t}", "function learn_press_get_user( $user_id, $force = false ) {\n\treturn LP_User_Factory::get_user( $user_id, $force );\n}", "public function processInvite($id)\n {\n\t\t// header and module properties\n\t\t$this->data['page_module'] = USER_MODULE;\n\t\t$this->data['page_title'] = USER_TITLE;\n\t\t\n // to preserve previous url, check if the validation failed\n if (!Session::has('danger')) {\n $this->setPreviousListURL(strtolower(USER_TITLE)); \n \n // also remove the user_photo session\n Session::forget('user_photo');\n }\n \n // get the selected record\n $user = User::userKey($id)->first();\n \n // check if the record really exist\n if (is_null($user)) {\n // redirect to list page\n Session::flash('danger', SOMETHING_WENT_WRONG);\n return Redirect::to(strtolower(USER_TITLE));\n }\n\t\t\n // get record\n $this->data[\"user\"] = $user;\n \n // get record\n $this->data[\"user_contact\"] = UserContact::userId($user->id)->get();\n\n // get countries\n $this->data[\"countries\"] = Country::countryStatus(ACTIVE)->countrySort('country_name', ASCENDING)->get();\n \n // get gender\n $this->data[\"gender\"] = getOptionGender();\n \n // get civil status\n $this->data[\"civil_status\"] = getOptionCivilStatus();\n \n // get civil status\n $this->data[\"relationship\"] = getOptionRelationship();\n \n // get page access\n $this->data[\"access\"] = Access::with(array('user' => function($query) use ($user)\n {\n $query->where('user_id', $user->id);\n }))\n ->accessStatus(ACTIVE)\n ->accessSort('access_sort', ASCENDING)->get();\n \n // get status\n $this->data[\"status\"] = getOptionStatus(USER_TITLE);\n \n // get previously selected picture\n if (Session::has('user_photo')) {\n $this->data['user_photo'] = Session::get('user_photo');\n } else {\n $this->data['user_photo'] = \"\";\n }\n\n // load the show form\n return View::make('setup.user.confirm_invite')->with('data', $this->data);\n }", "public function pageUser($user_id){\r\n $target_user = UserLoader::fetch($user_id); \r\n\r\n //get dummy week\r\n $target_week = GameWeekLoader::fetch(1);\r\n\r\n //get current week\r\n $currentweek = $target_week->getGameCurrentWeek();\r\n\r\n //get players of the user\r\n $target_players = $target_user->getPlayers(); \r\n\r\n //$past_player_picks = PlayerPickLoader::fetchCurrentPlayerPicksPerUser($currentweek,$target_players);\r\n\t\t\t\t\t\r\n /*if(empty($past_player_picks))\r\n {\r\n $players = $target_players;\t\t\t\r\n }\r\n else\r\n {\r\n $players = $past_player_picks;\r\n\t\t\t\r\n }*/\r\n\t\t\r\n\t\t//Get weeks\r\n $game_weeks = $target_week->getGameWeeks($currentweek);\r\n\t\t\r\n\t\t//get dummy player pick \r\n $data['picked_time_stamp'] = date(\"Y-m-d H:i:s\");\r\n $past_picks = new PlayerPick($data); \r\n\r\n //get the user pick changes for all players\r\n $target_pick_history = $target_user->getPlayerPickHistory($user_id);\r\n\t\t\r\n\t\t//get the user pick history for all players\r\n //$target_player_pick_history = $target_user->getPastPlayerPicksPerUser($currentweek,$user_id);\r\n\t\t$target_player_pick_history = $past_picks->getPastPlayerPicks($currentweek,$target_players); \t\t\r\n \r\n //get payment info\r\n $target_payment_info = PaymentLoader::fetch($user_id,\"user_id\");\r\n \r\n //get the user payment history\r\n $target_payment_history = PaymentHistoryLoader::fetchAll($user_id,\"user_id\");\r\n \r\n // Access-controlled resource\r\n if (!$this->_app->user->checkAccess('uri_users') && !$this->_app->user->checkAccess('uri_group_users', ['primary_group_id' => $target_user->primary_group_id])){\r\n $this->_app->notFound();\r\n }\r\n \r\n // Get a list of all groups\r\n $groups = GroupLoader::fetchAll();\r\n \r\n // Get a list of all locales\r\n $locale_list = $this->_app->site->getLocales();\r\n \r\n // Determine which groups this user is a member of\r\n $user_groups = $target_user->getGroups();\r\n foreach ($groups as $group_id => $group){\r\n $group_list[$group_id] = $group->export();\r\n if (isset($user_groups[$group_id]))\r\n $group_list[$group_id]['member'] = true;\r\n else\r\n $group_list[$group_id]['member'] = false;\r\n } \r\n \r\n // Determine authorized fields\r\n $fields = ['display_name', 'email', 'title', 'locale', 'groups', 'primary_group_id'];\r\n $show_fields = [];\r\n $disabled_fields = [];\r\n $hidden_fields = [];\r\n foreach ($fields as $field){\r\n if ($this->_app->user->checkAccess(\"view_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\r\n $disabled_fields[] = $field;\r\n else\r\n $hidden_fields[] = $field;\r\n } \r\n \r\n // Always disallow editing username\r\n $disabled_fields[] = \"user_name\";\r\n \r\n // Hide password fields for editing user\r\n $hidden_fields[] = \"password\"; \r\n \r\n $this->_app->render('user_info.html', [\r\n 'page' => [\r\n 'author' => $this->_app->site->author,\r\n 'title' => \"Users | \" . $target_user->user_name,\r\n 'description' => \"User information page for \" . $target_user->user_name,\r\n 'alerts' => $this->_app->alerts->getAndClearMessages()\r\n ],\r\n \"box_id\" => 'view-user',\r\n \"box_title\" => $target_user->user_name,\r\n \"target_user\" => $target_user,\r\n \"target_players\" => $target_players,\r\n \"target_pick_history\" => $target_pick_history,\r\n\t\t\t\"target_player_pick_history\" => $target_player_pick_history,\r\n \"target_payment_history\" => $target_payment_history,\r\n \"target_payment_info\" => $target_payment_info,\r\n\t\t\t\"game_weeks\" => $game_weeks,\r\n \"groups\" => $group_list,\r\n \"locales\" => $locale_list,\r\n \"fields\" => [\r\n \"disabled\" => $disabled_fields,\r\n \"hidden\" => $hidden_fields\r\n ],\r\n \"buttons\" => [\r\n \"hidden\" => [\r\n \"submit\", \"cancel\"\r\n ]\r\n ],\r\n \"validators\" => \"{ none: ''}\" \r\n ]); \r\n }", "public function load_popup_sms_vng_staff_list() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; \n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n\t\t$arrOneUser = $this->contact_model->getStaffById($noUserId);\n\t\t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(!empty($arrOneUser)) {\n \t\t$arrOneUser['cellphone'] = str_replace($arrOrders, ', ', $arrOneUser['cellphone']);\n\t \t$arrOneUser['cellphone'] = str_replace($arrChildOrders, '', $arrOneUser['cellphone']);\n\t if(strpos($arrOneUser['cellphone'], ',')!==false) {\n\t $arrOneUser['cellphone'] = explode(', ', $arrOneUser['cellphone']);\n\t } else {\n\t $arrOneUser['cellphone'] = array($arrOneUser['cellphone']);\n\t }\n \t} else {\n \t\t$arrOneUser = array();\n \t}\n \t\n\t\t$this->loadview('contact/popup_send_message_VNGHR', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function getShowUser($id)\n { \n $user = $this->user();\n $user = $user->withLoad(new Role(),'role','id,name')->withLoad(new CompanyPosition(),'companyPosition','id,name');\n return $user->findOrFail($id);\n }", "public function tplUCUserEdit($id) {\n \t$user = $this->getUserInfo($id);\n \tif($this->checkRight('edit_user', $user->getId()) || $this->checkRight('administer_group', $user->getGroupId())){\n \t\t\n \t\t$tpl = new ViewDescriptor($this->config['tpl']['Usercenter']['edit_user']);\n \t\t\n \t\tif($user->getId() != null) {\n\t \t\t$user->loadData($this->sp);\n\t\n\t \t\t$tpl->addValue('id', $user->getId());\n\t \t\t$tpl->addValue('nick', $user->getNick());\n\t \t\t$tpl->addValue('email', $user->getEMail());\n\t \t\t$tpl->addValue('pwd', '********');\n\t \t\t$tpl->addValue('group', $this->tplGetGroupDropdown($user->getGroupId()));\n\t \t\t$tpl->addValue('groupId', $user->getGroupId());\n\t \t\t$tpl->addValue('maxFileSize', $this->config['max_file_size']);\n\t \t\t\n\t \t\tif($this->sp->ref('Rights')->c($_SESSION['User']['id'], 'User', 'administer_group', $user->getGroup())){\n\t \t\t\t$s = new SubViewDescriptor('status');\n\t \t\t\t$s->addValue('status', $this->tplGetStatusDropdown($user->getStatus()));\n\t \t\t\t$tpl->addSubView($s);\n\t \t\t\tunset($s);\n\t \t\t}\n\t \t\t$tpl->addValue('statusId', $user->getStatus());\n\t \t\t\n\t \t\tforeach($user->getUserData() as $group){\n\t \t\t\tif($group->getName() == 'Userimage'){\n\t \t\t\t\tforeach($group->getData() as $data){\n\t \t\t\t\t\t$path = ($data->getValue() != -1) ? $this->sp->ref('Gallery')->getImagePathById($data->getValue()) : $this->sp->ref('Gallery')->getImagePathById($this->config['user_image_default_id']);\n\t \t\t\t\t\t\n\t \t\t\t\t\t$tpl->addValue('ui_path', ($path=='') ? $this->sp->ref('Gallery')->getImagePathById($this->config['user_image_default_id']) : $path);\n\t \t\t\t\t}\n\t \t\t\t} else {\n\t\t \t\t\t$g = new SubViewDescriptor('datagroup');\n\t\t \t\t\t\n\t\t \t\t\t$g->addValue('id', $group->getId());\n\t\t \t\t\t$g->addValue('name', $group->getName());\n\t\t \t\t\t$g->addValue('desc', $group->getDesc());\n\t\t \t\t\t\n\t\t \t\t\tforeach($group->getData() as $data){\n\t\t \t\t\t\t$d = new SubViewDescriptor('data');\n\n\t\t \t\t\t\tswitch($data->getType()){\n\t\t \t\t\t\t\tcase self::GROUP_TYPE_TEXT:\n\t\t \t\t\t\t\t\t$t = new SubViewDescriptor('text');\n\t\t \t\t\t\t\t\tbreak;\n\t\t \t\t\t\t\tcase self::GROUP_TYPE_INT:\n\t\t \t\t\t\t\t\t$t = new SubViewDescriptor('int');\n\t\t \t\t\t\t\t\tbreak;\n\t\t \t\t\t\t\tcase self::GROUP_TYPE_CHECKBOX:\n\t\t \t\t\t\t\t\t$t = new SubViewDescriptor('checkbox');\n\t\t \t\t\t\t\t\t$t->addValue('checked', ($t->getValue()==1) ? 'checked=\"checked\"' : '');\n\t\t \t\t\t\t\t\tbreak;\n\t\t \t\t\t\t\tcase self::GROUP_TYPE_IMAGE:\n\t\t \t\t\t\t\t\t$t = new SubViewDescriptor('image');\n\t\t \t\t\t\t\t\t\n\t\t \t\t\t\t\t\t$path = ($data->getValue() != -1) ? $this->sp->ref('Gallery')->getImagePathById($data->getValue()) : $this->sp->ref('Gallery')->getImagePathById($this->config['user_image_default_id']);\n\t\t \t\t\t\t\t\t\n\t\t \t\t\t\t\t\t$t->addValue('path', ($path=='') ? $this->sp->ref('Gallery')->getImagePathById($this->config['user_image_default_id']) : $path);\n\t\t \t\t\t\t\t\tbreak;\n\t\t \t\t\t\t}\n\t\t \t\t\t\t\n\t\t \t\t\t\t\n\t\t \t\t\t\t$t->addValue('id', $data->getId());\n\t\t \t\t\t\t$t->addValue('g_id', $group->getId());\n\t\t \t\t\t\t$t->addValue('name', $data->getName());\n\t\t \t\t\t\t$t->addValue('desc', $data->getDesc());\n\t\t \t\t\t\t$t->addValue('help', $data->getHelp());\n\t\t \t\t\t\t$t->addValue('value', $data->getValue());\n\t\t \t\t\t\t\n\t\t \t\t\t\t$d->addSubView($t);\n\t\t \t\t\t\t$g->addSubView($d);\n\t\t \t\t\t\tunset($d);\n\t\t \t\t\t\tunset($t);\n\t\t \t\t\t}\n\t \t\t\t\n\t\t \t\t\t$tpl->addSubView($g);\n\t\t \t\t\tunset($g);\n\t \t\t\t}\n\t \t\t}\n\t \t\t\n\t \t\treturn $tpl->render();\n \t\t} else return 'wrong_id';\n \t} else {\n \t\t$this->_msg($this->_('You are not authorized', 'core'), Messages::ERROR);\n \t\treturn $this->_('You are not authorized', 'core');\n \t} \n }", "public function edit($id)\n {\n // Check Access\n has_access(generate_method(__METHOD__), Auth::user()->role);\n\n // Data pop-up\n $popup = Popup::findOrFail($id);\n\n // View\n return view('faturcms::admin.pop-up.edit', [\n 'popup' => $popup,\n ]);\n }", "public function actionUpdate($id)\n {\n $user = Yii::$app->user->getIdentity();\n \n $model = $this->findModel($id);\n \n $call_user = PcallUser::getByUserId($user->id);\n\n if ($call_user->load(Yii::$app->request->post()) && $call_user->save() && \n $model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'call_user'=>$call_user,\n 'model' => $model,\n ]);\n }\n }", "function hrb_before_user( $user_id ) {\n\tdo_action( 'hrb_before_user', $user_id );\n}", "private function getUser($id)\r\n {\r\n // Passes query to DB after being processed to prevent SQL injection\r\n $stmt = $this->conn->prepare(\"SELECT * FROM users WHERE id=?\");\r\n $stmt->execute([$id]);\r\n $data = $stmt->fetch();\r\n\r\n if (!$data) {\r\n $this->outputError(\"400\", \"Error\", \"Query failed\", \"Get user failed: No user with id $id.\");\r\n }\r\n\r\n $this->outputSuccess(\"200\", \"ok\", \"success\", $data);\r\n\r\n }", "protected function loadActingUser($acting_phid) {\n // try to act as that user when affecting other objects, like tasks marked\n // with \"Fixes Txxx\".\n\n // This helps to prevent mistakes where a user accidentally writes the\n // wrong task IDs and affects tasks they can't see (and thus can't undo the\n // status changes for).\n\n // This is just a guard rail, not a security measure. An attacker can still\n // forge another user's identity trivially by forging author or committer\n // email addresses.\n\n // We also let commits with unrecognized authors act on any task to make\n // behavior less confusing for new installs, and any user can craft a\n // commit with an unrecognized author and committer.\n\n $viewer = $this->getViewer();\n\n $user_type = PhabricatorPeopleUserPHIDType::TYPECONST;\n if (phid_get_type($acting_phid) === $user_type) {\n $acting_user = id(new PhabricatorPeopleQuery())\n ->setViewer($viewer)\n ->withPHIDs(array($acting_phid))\n ->executeOne();\n if ($acting_user) {\n return $acting_user;\n }\n }\n\n return $viewer;\n }", "public function actionLoad() {\n $user_id = Yii::$app->request->post('user_id');\n $user = User::find()->where(['user_id' => $user_id])->asArray()->one();\n if($user){\n echo json_encode(['load_success' => 1, 'user' => $user]);\n } else {\n echo json_encode(['load_success' => 0, 'user' => $user]);\n }\n }", "function getUserprofileForUserId($id){\r\n \t$sql = \"SELECT * FROM user where id = '\" .$id .\"' \";\r\n\t$res = $_SESSION['config']->DBCONNECT->executeQuery($sql);\r\n\t$retRow = mysql_fetch_array($res);\r\n\r\n $ft = new FontType();\r\n $ft->setBold(true);\r\n $ft->setFontsize(3);\r\n \r\n\t$picLnk = new Link(\"includes/user/show_userprofil.php?showUserId=\" .$id ,getUserImageSourceByPicname($retRow['pic'], 80));\r\n $picLnk->setPopup(true);\r\n\r\n $status = new Text(\"<b>Status:</b> \".$retRow['Status']);\r\n $status->setFilter(false);\r\n \r\n $posts = new Text(\"<b>Posts:</b> \".$retRow['Posts']);\r\n $posts->setFilter(false);\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n $tbl = new Table(array(\"\"));\r\n\r\n $r1 = $tbl->createRow();\r\n $r1->setFonttype($ft);\r\n\t$r1->setAttribute(0, $retRow['Vorname'] .\" \" .$retRow['Nachname']);\r\n $tbl->addRow($r1);\r\n\r\n\r\n $r2 = $tbl->createRow();\r\n\t$r2->setAttribute(0, $picLnk);\r\n $tbl->addRow($r2);\r\n\r\n $r3 = $tbl->createRow();\r\n\t$r3->setAttribute(0, $status);\r\n $tbl->addRow($r3);\r\n\r\n $r4 = $tbl->createRow();\r\n\t$r4->setAttribute(0, $posts);\r\n $tbl->addRow($r4);\r\n\r\n\r\n\r\n return $tbl; \r\n \r\n }", "private function user($id) {\n\t\t$user = User::where('id',$id)->orWhere('username',$id)->orWhere('email',$id)->first();\n\t\tif(!$user) {\n\t\t\t$this->error('User not found, try another \"key\"');\n\t\t\treturn;\n\t\t}\n\n\t\t$this->info(\"User #\".$user->id.\" found: \".$user->email.\", username: \".$user->username);\n\t\t$this->info(\"\");\n\n\t\t$data = EmailCampaignData::user_campaigns($user);\n\n\t\t$this->info(\"Summary campaigns data\");\n\t\t$this->info(\"Legend: [s]ent, [d]elivered, [o]pened, [cl]icked, [co]mplained, [u]nsubscribed\");\n\t\t$this->info(\"\");\n\n\t\tforeach($data as $campaign_code=>$campaign_data) {\n\t\t\t$this->info(\n\t\t\t\t$campaign_code .\"\\n\"\n\t\t\t\t.\" s:\".$campaign_data['sent']\n\t\t\t\t.\" / d:\".$campaign_data['delivered'] .\" \".$campaign_data['delivered_percent'].\"%\"\n\t\t\t\t.\" / o:\".$campaign_data['opened'] .\" \".$campaign_data['opened_percent'].\"%\"\n\t\t\t\t.\" / cl:\".$campaign_data['clicked'] .\" \".$campaign_data['clicked_percent'].\"%\"\n\t\t\t\t.\" / co:\".$campaign_data['complained'] .\" \".$campaign_data['complained_percent'].\"%\"\n\t\t\t\t.\" / u:\".$campaign_data['unsubscribed'] .\" \".$campaign_data['unsubscribed_percent'].\"%\"\n\t\t\t\t.\"\\n\"\n\t\t\t);\n\t\t}\n\n\t}", "function smfapi_getUserById($id='')\n{\n global $smcFunc;\n\n if ('' == $id || !is_numeric($id)) {\n return false;\n } else{\n $id = intval($id);\n if (0 == $id) {\n return false;\n }\n }\n\n $request = $smcFunc['db_query']('', '\n\t\t\tSELECT *\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_member = {int:id_member}\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'id_member' => $id,\n\t\t\t)\n\t\t);\n\t$results = $smcFunc['db_fetch_assoc']($request);\n\t$smcFunc['db_free_result']($request);\n\n if (empty($results)) {\n return false;\n\t} else {\n\t // return all the results.\n\t return $results;\n }\n}", "public function getUserById($id) {\n\n\t\t}", "public static function addedBy($user_id)\n\t{\n\t\tif(PermissionsController::checkAdmin(false))\n\t\t{\n\t\t\t$user_details = array();\n\t\t\t$user_mouse_over = \"\";\n\t\t\t\n\t\t\t$user_details = UserController::get_user_details($user_id);\n\t\t\tif(!empty($user_details)){\n\t\t\t\t$user_mouse_over .= \" Id : \".$user_details->id.\" \\n\";\n\t\t\t\t$user_mouse_over .= \" Name : \".$user_details->name.\" \\n\";\n\t\t\t\t$user_mouse_over .= \" Email : \".$user_details->email.\" \\n \";\n\t\t\t\t$user_mouse_over .= \" Mobile : \".$user_details->mobile.\" \\n \";\n\t\t\t\t?>\n\t\t\t\t\t<span title=\"<?=$user_mouse_over?>\" onclick=\"javascript:return alert(this.title);\"><?=$user_details->name?></span>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo $user_id;\n\t\t\t}\n\t\t}\n\t}", "function user($id, $data) {\n\t\tif ($data == 'id') return $id;\n\t\t\n\t\t/*\n\t\t\tThis is the user query method, some pages will return data\n\t\t\ton selfuser using the user function, but the me function\n\t\t\tis smarter in that case. Let's pass selfuserdata requests\n\t\t\tto the right function\n\t\t*/\n\t\tif ($id == me('id')) return me($data);\n\t\t\n\n\t\t/*\n\t\t\tIf we got the requested data in memory, we will send it \n\t\t\tto the caller without querying ...\n\t\t*/\n\t\tif (isset($GLOBALS[\"DATA_BY_USER\"][$id][$data])) return $GLOBALS[\"DATA_BY_USER\"][$id][$data];\n\n\t\t/*\n\t\t\tIf we're still alive past that point, it means that\n\t\t\twe don't have anything to pass to the caller, let's\n\t\t\tquery the database and find some results\n\t\t*/\n\t\t$GLOBALS[\"DATA_BY_USER\"][$id] = myF(myQ(\"SELECT `{$data}` FROM `[x]users` WHERE `id`='{$id}'\"));\n\t\tif (isset($GLOBALS[\"DATA_BY_USER\"][$id][$data])) return $GLOBALS[\"DATA_BY_USER\"][$id][$data];\n\n\t\t/*\n\t\t\tAhem ... well something went wrong! Send ... nothing!\n\t\t*/\n\t\treturn '';\n\t}", "public function edit_profile($id = null) {\r\n\t\t$view_data['user_id'] = $id;\r\n\t\t$data['page_data'] = \"This page is currently not available\"; //$this->load->view('web_user/edit_profile',$view_data,TRUE);\r\n\t\techo modules::run(AUTH_DEFAULT_TEMPLATE, $data);\r\n\t}", "function editUser($id) {\n\t\tglobal $TEXT;\n\n\t\t// Select user\n\t\t$username = $this->db->query(sprintf(\"SELECT * FROM `users` WHERE `users`.`idu` = '%s' \", $this->db->real_escape_string($id)));\t\n\t\t\n\t\tif($username->num_rows) {\n\t\t\t// Fetch user if exists\n\t\t\t$user = $username->fetch_assoc();\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t// If user exists\n\t\tif(!empty($user['idu'])) {\n\t\t\t\n\t\t\t// Check user state\n\t\t\t$suspended = ($user['state'] == 4 || $user['state'] == 3) ? '1' : '0';\n\t\t\t\n\t\t\t// Check IP address\n\t\t\t$ip = ($user['ip'] !== '') ? protectXSS($user['ip']) : '<i class=\"fa fa-exclamation-circle brz-text-red\"></i>';\n\t\t\t\n\t\t\t// generate content\n\t\t\treturn '<div class=\"brz-white brz-new-container\">\n\t\t\t\t\t\t<div class=\"brz-opacity brz-tiny-2 brz-border-bottom brz-text-black brz-super-grey brz-padding-16 brz-padding brz-text-bold\">'.$TEXT['_uni-EDIT_PROFILE'].'</div>\t\t\t\t\n\t\t\t\t\t\t<div class=\"settings-content-class brz-clear brz-tiny-4 brz-container-widel\">\n\t \t\t\t\t\t<div class=\"brz-no-overflow brz-full\">\n\t\t \t\t\t\t\t<div class=\"brz-center brz-clear brz-full\">\n\t\t\t \t\t\t\t\t<div class=\"brz-clear brz-padding-16\">\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t'.$this->getSelected($TEXT['_uni-Suspend'],'uUSAA-v7',getSelect($suspended,$TEXT['_uni-Yes'],$TEXT['_uni-No']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-Username'],'uUSAA-vv1',protectXSS($user['username']),protectXSS($user['username']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-First_name'],'uUSAA-vv2',protectXSS($user['first_name']),protectXSS($user['first_name']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-Last_name'],'uUSAA-vv3',protectXSS($user['last_name']),protectXSS($user['last_name']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-Email'],'uUSAA-vv4',protectXSS($user['email']),protectXSS($user['email']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-From'],'uUSAA-vv5',protectXSS($user['from']),protectXSS($user['from']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-Current_location'],'uUSAA-vv6',protectXSS($user['living']),protectXSS($user['living']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-EDU'],'uUSAA-ss1',protectXSS($user['study']),protectXSS($user['study']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-Profession'],'uUSAA-ss3',protectXSS($user['profession']),protectXSS($user['profession']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->enrollInput($TEXT['_uni-Website'],'uUSAA-ss2',protectXSS($user['website']),protectXSS($user['website']),'<hr class=\"brz-margin\">').'\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->getSelected($TEXT['_uni-Verified'],'uUSAA-v2',getSelect($user['verified'],$TEXT['_uni-Yes'],$TEXT['_uni-No']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->getSelected($TEXT['_uni-Email_verified'],'uUSAA-v3',getSelect($user['state'],$TEXT['_uni-Yes'],$TEXT['_uni-No']),'').'\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<br><div class=\"brz-padding brz-super-grey brz-border brz-small brz-text-bold brz-text-black brz-opacity brz-border-super-grey brz-border-blue\">\n\t\t\t\t \t\t\t\t'.$TEXT['_uni-Block_reporting'].'\n\t\t\t\t \t\t\t\t</div><br>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->getSelected($TEXT['_uni-Users'],'uUSAA-v4',getSelect($user['b_users'],$TEXT['_uni-Yes'],$TEXT['_uni-No']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->getSelected($TEXT['_uni-Posts'],'uUSAA-v5',getSelect($user['b_posts'],$TEXT['_uni-Yes'],$TEXT['_uni-No']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$this->getSelected($TEXT['_uni-Comments'],'uUSAA-v6',getSelect($user['b_comments'],$TEXT['_uni-Yes'],$TEXT['_uni-No']),'<hr class=\"brz-margin\">').'\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t <div class=\"brz-padding-8 brz-container\">\n\t\t\t\t\t\t\t\t\t\t <div class=\"brz-col s4 brz-padding-medium\">\n\t\t\t\t\t\t\t\t\t\t\t <span class=\"brz-right brz-text-bold brz-text-grey\">'.$TEXT['_uni-User_ip'].':</span>\n\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t <div class=\"brz-col s6 brz-padding-medium\">\n\t\t\t\t\t\t\t\t\t\t\t <span class=\"brz-left\">\n\t\t\t\t\t\t\t\t\t\t\t\t '.$ip.'\n\t\t\t\t\t\t\t\t\t\t\t </span>\n\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t<div id=\"errors-eb\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"brz-right brz-small brz-margin\">\n\t\t\t\t\t\t\t\t\t\t\t<span></span>\n\t\t\t\t \t\t\t\t\t\t<div onclick=\"uUSAA('.$user['idu'].')\"id=\"update-status-form-submit\" name=\"update-status-form-submit\" class=\"brz-round brz-padding-neo2 brz-tag brz-blue brz-small brz-hover-blue-hd brz-cursor-pointer brz-text-white brz-text-bold\" >'.$TEXT['_uni-Save_changes'].'</div>\n\t\t\t\t \t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t<br><br>\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<br><br><br><br>\n\t\t\t\t ';\n\t\t}\n\t}", "private function loadUserInfo($user_id){\n global $db;\n\n $query = \"SELECT *\n FROM members\n WHERE user_id = $user_id\";\n $result = $db->query($query);\n while($obj = $result->fetch_object()){\n $results[] = $obj;\n }\n return $results[0];\n }", "public function view_user($id) {\n $data[\"get_user\"] = $this->user_model->get_user($id);\n $this->load->view('system/user_management/manage_users/view_user', $data);\n }", "function get_user_by_id($id){\n\t\tglobal $db, $prefix, $querydb;\n\t\t\n\t\tif(!isset($querydb['get_user_by_id_1'])){\n\t\t\t$query = $db->DoQuery(\"SELECT id,username FROM {$prefix}users\");\n\t\t\twhile($row = $db->Do_Fetch_Row($query)){\n\t\t\t\t$querydb['get_user_by_id_1'][$row[0]] = $row[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn @$querydb['get_user_by_id_1'][$id];\n\t}", "public function obtainByUserID(string $user_id);", "function user_show($id=false, $params = array()) {\n $url = \"http://twitter.com/users/show\";\n if($id != false) {\n $url .= \"/{$id}.xml\";\n } else {\n $url .= \".xml\";\n }\n \n return $this->__process($this->Http->get($url, $params, $this->__getAuthHeader()));\n }", "abstract public function getUserId($id);", "public static function loadUser(int $idUser) {\n \n $Db = Database::init();\n $req = \"SELECT\n *\n FROM user\n WHERE\n user.id = :idUser\n AND user.mailConfirm = 1\n AND user.actif = true\";\n $data = array(\n ':idUser' => array(\n 'type' => 'int',\n 'value' => $idUser,\n )\n );\n $res = $Db->execStatement($req, $data);\n if(empty($res) === false) {\n $User = new User($res[0]);\n }\n else {\n $User = new User(array(\n 'id' => -1,\n 'nom' => '',\n 'prenom' => '',\n 'pseudo' => '',\n 'avatar' => '',\n 'mail' => '',\n 'mailConfirm' => false,\n 'actif' => true\n ));\n }\n \n return $User->getArray();\n }", "function getUserProfileInfo($user_id)\n\t\t{\n\t\t\t//get user personal info details\n\t\t\t$user = $this->manage_content->getValue_where(\"user_info\",\"*\",\"user_id\",$user_id);\n\t\t\tif(!empty($user[0]))\n\t\t\t{\n\t\t\t\t//checking the values of skills selected\n\t\t\t\tif(!empty($user[0]['skills']))\n\t\t\t\t{\n\t\t\t\t\t$skill = explode(',',$user[0]['skills']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$skill = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Skills<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <div class=\"myskills_details ep_skills_list col-md-12\" id=\"skills_list_value\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($skill))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($skill as $key=>$value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<div class=\"myskills_box pull-left\">'.$this->getSkillNameFromSkillId($value).'</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\techo \t'</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<div class=\"col-md-offset-3 col-md-8\">\n\t\t\t\t\t\t\t<div class=\"form-control pp_form_textbox scrollable-content\">';\n\t\t\t\t\t\t//get skill list\n\t\t\t\t\t\t//getting skill list\n\t\t\t\t\t\t$this->getEditProjectselectedSkillList($skill);\t\n\t\t\t\t\t\t\t\n\t\t\t\techo\t '</div>\n\t\t\t\t\t\t\t<div class=\"signup-form-error\" id=\"err_pro_skill\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Hourly Rate<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t <input type=\"text\" class=\"form-control pp_form_textbox\" name=\"hourly_rate\" id=\"pro_hour\" value=\"'.$user[0]['hourly_rate'].'\">\n\t\t\t\t\t\t <div class=\"signup-form-error\" id=\"err_pro_hour\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<label class=\"col-md-3\">in $/hr</label>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Your Terms</label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <textarea rows=\"3\" class=\"form-control pp_form_textarea\" name=\"terms\">'.$user[0]['terms'].'</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Availability<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <select class=\"form-control pp_form_selectbox\" name=\"availability\">\n\t\t\t\t\t\t\t<option value=\"Full Time\"'; if($user[0]['availability'] == 'Full Time') { echo 'selected=\"selected\"'; } echo '>Full Time</option>\n\t\t\t\t\t\t\t<option value=\"Part Time\"'; if($user[0]['availability'] == 'Part Time') { echo 'selected=\"selected\"'; } echo '>Part Time</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Certifications</label>\n\t\t\t\t\t\t<div class=\"col-md-5\">\n\t\t\t\t\t\t <input type=\"text\" class=\"form-control pp_form_textbox\" name=\"certi\" value=\"'.$user[0]['no_certificates'].'\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Interested Topics</label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <input type=\"text\" class=\"form-control pp_form_textbox\" name=\"int_topic\" value=\"'.$user[0]['interested_topic'].'\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Profile Description<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <textarea rows=\"6\" class=\"form-control pp_form_textarea\" name=\"description\" id=\"pro_des\">'.$user[0]['description'].'</textarea>\n\t\t\t\t\t\t <div class=\"signup-form-error\" id=\"err_pro_des\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>';\n\t\t\t}\n\t\t}", "function get_user_by_id($user_id)\n{\n $CI =& get_instance();\n $CI->load->model('Users_model', 'user');\n\n return $CI->user->getUser($user_id);\n}", "public function load($id){\n\t\t$sql = 'SELECT * FROM django_comment_client_role_users WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "public function load($id){\n\t\t$sql = 'SELECT * FROM adm_usr WHERE ID = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "function popup($page_name = '',$param = '')\r\n\t{\r\n\t\t$this->load->model('Crud_model');\r\n\r\n\t\tif($page_name == 'add_user_model')\r\n\t\t{\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view('admin_models/add_models/add_user_model.php');\r\n\t\t}\r\n\t\telse if($page_name == 'edit_user_model')\r\n\t\t{\r\n\t\t\t$data['single_user'] = $this->Crud_model->fetch_record_by_id('mp_users',$param);\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view( 'admin_models/edit_models/edit_user_model.php',$data);\r\n\t\t}\r\n\t\t\r\n\t}", "public function getUserById($id) {\n $this->records = DB::queryFirstRow(\"SELECT * FROM \" . CFG::$tblPrefix . \"user where active='1' and id=%d limit 1\", $id);\n }", "public function CallBackFunctionBlock($id, $row)\n {\n $sReturnValue = parent::CallBackFunctionBlock($id, $row);\n\n $sReturnValue = substr($sReturnValue, 0, strrpos($sReturnValue, '<div id=\"functionTitle_'.$row['cmsident'].'\" class=\"functionTitle\">'));\n\n $aParameter = TGlobal::instance()->GetUserData(null, array('module_fnc', 'id', '_noModuleFunction', 'pagedef'));\n $aParameter['module_fnc'] = array(TGlobal::instance()->GetExecutingModulePointer()->sModuleSpotName => 'LoginAsExtranetUser');\n $aParameter['_noModuleFunction'] = 'true';\n $aParameter['id'] = $id;\n $aParameter['pagedef'] = 'tableeditor';\n $aParameter['tableid'] = $this->oTableConf->id;\n\n $sURL = PATH_CMS_CONTROLLER.'?'.$this->getUrlUtil()->getArrayAsUrl($aParameter);\n\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (true === $securityHelper->isGranted('CMS_RIGHT_ALLOW-LOGIN-AS-EXTRANET-USER')) {\n $sReturnValue .= \"<a href=\\\"{$sURL}\\\" target=\\\"_blank\\\"><i class=\\\"fas fa-user-check\\\" onMouseOver=\\\"$('#functionTitle_'+\".$row['cmsident'].\").html('\".TGlobal::Translate('chameleon_system_extranet.action.login_as_extranet_user').\"');\\\" onMouseOut=\\\"$('#functionTitle_'+\".$row['cmsident'].\").html('');\\\"></i></a>\";\n }\n\n $sReturnValue .= '<div id=\"functionTitle_'.$row['cmsident'].'\" class=\"functionTitle\"></div>';\n $sReturnValue .= '</div>';\n\n return $sReturnValue;\n }", "public function popover($id, $type) {\n global $db;\n $profile = array();\n /* check the type to get */\n if($type == \"user\") {\n /* get user info */\n $get_profile = $db->query(sprintf(\"SELECT * FROM users WHERE user_id = %s\", secure($id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($get_profile->num_rows > 0) {\n $profile = $get_profile->fetch_assoc();\n /* get profile picture */\n $profile['user_picture'] = $this->get_picture($profile['user_picture'], $profile['user_gender']);\n /* get followers count */\n $profile['followers_count'] = count($this->get_followers_ids($profile['user_id']));\n /* get mutual friends count between the viewer and the target */\n if($this->_logged_in && $this->_data['user_id'] != $profile['user_id']) {\n $profile['mutual_friends_count'] = $this->get_mutual_friends_count($profile['user_id']);\n }\n /* get the connection between the viewer & the target */\n if($profile['user_id'] != $this->_data['user_id']) {\n $profile['we_friends'] = (in_array($profile['user_id'], $this->_data['friends_ids']))? true: false;\n $profile['he_request'] = (in_array($profile['user_id'], $this->_data['friend_requests_ids']))? true: false;\n $profile['i_request'] = (in_array($profile['user_id'], $this->_data['friend_requests_sent_ids']))? true: false;\n $profile['i_follow'] = (in_array($profile['user_id'], $this->_data['followings_ids']))? true: false;\n }\n }\n } else {\n /* get page info */\n $get_profile = $db->query(sprintf(\"SELECT * FROM pages WHERE page_id = %s\", secure($id, 'int') )) or _error(SQL_ERROR_THROWEN);\n if($get_profile->num_rows > 0) {\n $profile = $get_profile->fetch_assoc();\n $profile['page_picture'] = User::get_picture($profile['page_picture'], \"page\");\n /* get the connection between the viewer & the target */\n $get_likes = $db->query(sprintf(\"SELECT * FROM pages_likes WHERE page_id = %s AND user_id = %s\", secure($id, 'int'), secure($this->_data['user_id'], 'int') )) or _error(SQL_ERROR_THROWEN);\n if($get_likes->num_rows > 0) {\n $profile['i_like'] = true;\n } else {\n $profile['i_like'] = false;\n }\n }\n }\n return $profile;\n }", "function MyProfile_user_display()\r\n{\r\n $myprofile_dom = ZLanguage::getModuleDomain('MyProfile');\r\n // Security check\r\n if (!SecurityUtil::checkPermission('MyProfile::', '::', ACCESS_OVERVIEW)) return LogUtil::registerPermissionError();\r\n\r\n\t// Add js\t\t\r\n\tPageUtil::addVar('javascript','modules/MyProfile/pnjavascript/myprofile.js');\r\n\t\r\n\t// Create output and assign data\r\n\t$render \t= pnRender::getInstance('MyProfile');\r\n\t$uid\t\t= (int) FormUtil::getPassedValue('uid');\r\n\t$viewer_uid\t= pnUserGetVar('uid');\r\n\t$uname\t\t= FormUtil::getPassedValue('uname');\r\n\r\n\t// check for parameters and redirect to own profiel if there is no parameter\r\n\tif (!isset($uname) && ($uid < 2) && pnUserLoggedIn()) {\r\n\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => $viewer_uid)));\r\n\t}\r\n\r\n\t// get Plugin\r\n\t$pluginname = FormUtil::getPassedValue('pluginname');\r\n\tif (!isset($pluginname)) $pluginname=\"MyProfile\";\r\n\r\n\t// Caching settings\r\n \t$render->cache_id = (int)pnUserLoggedIn().'-'.$uid.'-'.$pluginname;\r\n\r\n\t// redirect to the MyProfile display page with user id as parameter to acoid trouble with any mis-spelled usernames or special characters\r\n\t// but only if uid is not submitted.\r\n\tif (isset($uname)) {\r\n\t\tif (pnUserGetIDFromName($uname) > 1) {\r\n\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t}\r\n\t\telse {\r\n\t\t \t// maybe the username has to be decoded due to some special characters...\r\n\t\t \t$last = FormUtil::getPassedValue('last');\r\n\t\t \tif (isset($last) && ($last == 1)) {\r\n\t\t \t \t// is the username utf8 encoded?\r\n\t\t \t \t$uname = utf8_decode($uname);\r\n\t\t \t \tif (pnUserGetIDFromName($uname) > 1) return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t\t\telse return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => -1)));\r\n\t\t\t}\r\n\t\t \telse {\r\n\t\t \t \t// perhaps there are some special html characters?\r\n\t\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uname' => html_entity_decode($uname), 'last' => 1)));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// We only reach this point if there is no uname parameter. Now we have to get the username for the profile\r\n\t// Guests are not allowed to have a profile page ;-)\r\n\t\r\n\t// get and assign online state of user\r\n\t$online = pnModAPIFunc('MyProfile','user','getOnline',array('uid' => $uid));\r\n\tif (is_array($online) && ($online[0]['id'] == $uid)) $render->assign('onlinestatus', 1);\r\n\telse $render->assign('onlinestatus', 0);\r\n\r\n\t// get profile\r\n\t$uname = pnUserGetVar('uname', $uid);\r\n\tif ($uid > 1) $profile = pnModAPIFunc('MyProfile','user','getProfile',array('uid'=>$uid, 'uname'=>$uname));\r\n\tif (\t!isset($uname) \t\t\t||\r\n\t\t\t!(strlen($uname) > 0) \t||\r\n\t\t\t!($uid > 1) )\t{\r\n\t\t// assign invalid user or user not found template\r\n\t\t$render = pnRender::getInstance('MyProfile');\r\n\t\treturn $render->fetch('myprofile_user_display_invalid.htm');\r\n\t}\r\n\t$render->assign('profile',$profile);\r\n\t\r\n\t// assign user name and uid\r\n\tif (isset($uid) && ($uid > 1)) $uname = pnUserGetVar('uname',$uid);\r\n\telse $name = pnUserGetIDFromName($uid);\r\n\t$render->assign('uname',\t\t\t\t$uname);\r\n\t$render->assign('encuname',\t\t\t\trawurlencode($uname));\r\n\t$render->assign('uid',\t\t\t\t\t$uid);\r\n\t$render->assign('viewer_uid',\t\t\t$viewer_uid);\r\n\t$render->assign('plugin_noajax',\t\tpnModGetVar('MyProfile','plugin_noajax'));\r\n\t$render->assign('homelink',\t\t\t\tpnGetBaseURL().pnModURL('MyProfile','user','tab',array('uid'=>$uid,'ajax'=>1,'modname'=>'MyProfile')));\r\n\r\n\t// Set Standard page title\r\n\tPageUtil::setVar('title', __('Profile of user', $myprofile_dom).' '.$uname);\r\n\r\n\t// ContactList plugin\r\n\t$render->assign('contactlistavailable',\tpnModAvailable('ContactList'));\r\n\tif (pnModAvailable('ContactList')) $render->assign('contactlist_nopublicbuddylist',\tpnModGetVar('ContactList','nopublicbuddylist'));\r\n\t\r\n\t$render->assign('pluginname',$pluginname);\r\n\tif (($pluginname != \"MyProfile\") && pnModAvailable($pluginname)) pnModLangLoad($pluginname);\r\n\r\n // get the plugins\r\n $plugins = pnModAPIFunc('MyProfile','admin','getPlugins',array('uid' => $uid));\r\n\r\n $render->assign('plugins',$plugins);\r\n // execute all \"onLoad\"-Funktions and sort out the invisible plugins\r\n pnModAPIFunc('MyMap','myprofile','onLoad');\r\n foreach ($plugins as $plugin) {\r\n\t \tpnModAPIFunc($plugin['loadname'],'myprofile','onLoad');\r\n\t}\r\n\t\r\n\t// and all necessary stylesheets\r\n\tpnModAPIFunc('MyProfile','user','addStyleSheets',array('plugins' => $plugins));\t\r\n\r\n\t// let's combine myprofile with clickedme and call clickedme whenever \r\n\t// anything (even a plugin) of a user was called\r\n\tif (($uid != $viewer_uid) && (pnModAvailable('ClickedMe'))) pnModAPIFunc('ClickedMe','user','addClick',array('clicked_uid' => $uid));\r\n\r\n\t// get the plugin output\r\n\t$output = pnModAPIFunc($pluginname,'myprofile','tab',array('uid' => $uid, 'uname' => $uname));\r\n\t$render->assign('content',$output);\r\n\t\r\n\t// Return the output\r\n return $render->fetch('myprofile_user_display.htm');\r\n}", "function getUserById($user_id, $get_settings = false) {\r\n\t\treturn $this->getUser($user_id, 'user_id', $get_settings);\r\n\t}", "public function loadUserById($id)\n {\n return $this->findOneBy(['id' => $id]);\n }", "public function find_user($id);", "public function idAction($id = null)\n {\n if (!isset($id)) {\n die('Missing id');\n }\n // Use the model to retrieve the specified user\n $user = $this->userModel->find($id);\n\n // Display user information in view\n $this->views->add('user/user', [\n 'userValues' => $user->getProperties()\n ]);\n }", "public function view_contact_by_id($id,$msg)\n\t{\n\t\t$db = $this->model->db_open();\n\t\t$array_user = $this->employee->ViewUser($db,$id,$msg);\n\t\t$db = $this->model->db_close($db);\n\t\tif(!empty($msg))\n\t\t{\n\t\t\t?>\n\t\t\t<div class=\"alert alert-warning\t alert-dismissable\">\n\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>\n\t\t\t<b><?php echo $msg; ?></b>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t\tinclude('/../../../views/pages/view.php');\n\t}", "public function load($id){\r\n\t\t$sql = 'SELECT * FROM user_collaborative_role WHERE id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id);\r\n\t\treturn $this->getRow($sqlQuery);\r\n\t}", "public function url_user($user_id)\n\t{\n\t\treturn (sid(FSB_PATH . 'index.' . PHPEXT . '?p=userprofile&amp;id=' . $user_id));\n\t}", "function get_user($id)\n\t{\n\t\t$this->CI->load->module_model(COURSE_FOLDER, 'blog_users_model');\n\t\t$this->CI->blog_users_model->readonly = TRUE;\n\t\t$where['active'] = 'yes';\n\t\t$where['fuel_user_id'] = $id;\n\t\t$user = $this->CI->blog_users_model->find_one($where);\n\t\treturn $user;\n\t}", "public function getUser(int $user_id);", "public function getUser($id);", "public function getUser($id);", "function show_userpic( $user_id, $size = 'thumb' ){\n\t//get the userpic from the DB\n\tglobal $db;\n\t$query = \"SELECT userpic FROM users\n\t\t\t\tWHERE user_id = $user_id\n\t\t\t\tLIMIT 1\";\n\t$result = $db->query($query);\n\tif(! $result){\n\t\techo $db->error;\n\t}\n\tif($result->num_rows == 1){\n\t\t//display the userpic if they have one, otherwise show the default userpic\n\t\t$row = $result->fetch_assoc();\n\t\tif($row['userpic'] == ''){\n\t\t\techo '<img class=\"default-userpic userpic\" src=\"' . ROOT_URL . '/images/default_user.jpeg\" \n\t\t\t\t\t\talt=\"default userpic\">';\n\t\t}else{\n\t\t\techo '<img class=\"userpic\" src=\"' . ROOT_URL . '/uploads/'. $row['userpic'] . '_' . $size . '.jpg\" alt=\"userpic\">';\n\t\t}\n\n\t}\n}", "function get_user_by_id($id)\n\t{\n\t\t$this->db->where('id', $id);\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() == 1) return $query->row();\n\t\treturn NULL;\n\t}", "public function actionLoad()\n\t{\n\t\t$user = $this->get_current_user($_GET);\n if(!$user){\n $return_data = array('success'=>false, 'error_id'=>2, 'error_msg'=>'user is not logged in');\n $this->renderJSON($return_data);\n return;\n }\n\n\n $messages = Message::model()->findAllBySql('SELECT * FROM `message` WHERE user_id = ' . $user->user_id . ' OR target_type = \"user\" AND target_id = ' . $user->user_id . ' ORDER BY id');\n\n\n $return_data = array('success'=>true, 'messages'=>$messages, 'last_update'=>date('Y-m-d H:i:s'));\n $this->renderJSON($return_data);\n return;\n\n\t}", "public function userInfoByID($id)\n {\n $params = [\n 'id' => $id,\n ];\n $get = $this->getData(self::userShow, $params);\n\n return $get ? $get->user : $get;\n }" ]
[ "0.7222576", "0.63039213", "0.6278553", "0.619835", "0.5971505", "0.5882891", "0.5878816", "0.5559325", "0.5541314", "0.53865814", "0.5320677", "0.53088343", "0.53068644", "0.5301212", "0.52984035", "0.5294703", "0.52903855", "0.5260099", "0.5259418", "0.52333885", "0.5185931", "0.51678425", "0.51650244", "0.51616037", "0.5143437", "0.5105468", "0.50769573", "0.50566405", "0.5046421", "0.50464106", "0.50360703", "0.5018648", "0.5012387", "0.50052077", "0.5005077", "0.500235", "0.4999762", "0.49971217", "0.4993788", "0.4978996", "0.4971895", "0.49708277", "0.49621576", "0.49571186", "0.49431744", "0.4925229", "0.4924681", "0.49235868", "0.49090466", "0.4900179", "0.48930222", "0.48907068", "0.4878972", "0.48718622", "0.48669353", "0.48630148", "0.48551828", "0.48547685", "0.48503518", "0.4845651", "0.4844627", "0.4827137", "0.48256695", "0.48193532", "0.48181692", "0.4815349", "0.4815148", "0.48148596", "0.4790141", "0.47869456", "0.4782031", "0.4781875", "0.47699687", "0.4769614", "0.4766011", "0.47654185", "0.47622278", "0.4755475", "0.4755475", "0.47550583", "0.4754816", "0.47531694", "0.47499657", "0.4747638", "0.47453108", "0.4743519", "0.4741197", "0.47405222", "0.4735564", "0.47344667", "0.47330886", "0.47264874", "0.47180498", "0.47152567", "0.47098514", "0.47098514", "0.4708825", "0.4708796", "0.46905172", "0.46837607" ]
0.7159825
1
// function::load_popup_call_user description: popup execute action call user
// function::load_popup_call_user описание: вызов действия попапа пользователю
public function load_popup_call_user($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) { // pd(count($arrUser['mobile'])); $iUserActionId = $_SESSION['userId']; //write log for user calling $strContent = 'Called to '.$arrUser['full_name']; if(!empty($strAlertMsg)) { $strAlertMsg = urldecode($strAlertMsg); } if(!empty($strTimeAlert)) { $strTimeAlert = date(FORMAT_MYSQL_DATETIME, $strTimeAlert); } $oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM)); $arrInsertData = array( 'content' => $strContent, 'action_type' => NOTIFY_ACTION_TYPE_CALL, 'user_action_id' => intval($iUserActionId), 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'), 'ref_id' => $arrUser['userid'], 'incident_id' => $strIncidentId, 'alert_id' => $strAlertId, 'alert_message' => $strAlertMsg, 'time_alert' => $strTimeAlert, 'change_id' => $strChangeId, 'ip_action' => $this->strIpAddress ); $this->contact_model->insert_action_history($arrInsertData); $this->loadview('contact/popup_call_user', array('arrUser' => $arrUser, 'strAlertId' => $strAlertId, 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIncidentId' => $strIncidentId, 'strChangeId' => $strChangeId), 'layout_popup'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_popup_call_staff_VNGHR($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n\t\t//write log for user calling\n\t\t$this->insert_call_action_history($arrUser['id'], $arrUser['fullname'], $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId, NOTIFY_ACTION_TYPE_CALL);\n\t\t$this->loadview('contact/popup_call_vng_staff_list', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t'strIncidentId'\t\t=> $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t'strAlertId'\t\t=> $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' \t\t=> $strAlertMsg, \n\t\t\t\t\t\t\t\t\t\t\t\t'strTimeAlert' \t\t=> $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId'\t\t=> $strChangeId)\n\t\t\t\t\t\t\t\t\t\t\t\t, 'layout_popup');\n\t}", "public function load_popup_list_mobile_user() {\n \t// pd($_REQUEST);\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getUserById($iUserId);\n \t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['mobile'] = str_replace($arrOrders, ', ', $arrUser['mobile']);\n\t \t\t$arrUser['mobile'] = str_replace($arrChildOrders, '', $arrUser['mobile']);\n\t \t$arrUser['mobile'] = explode(', ', $arrUser['mobile']);\n\t\t\t\t$this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t \t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function load_popup_user_information() {\n\t\t$strUserDomain = $_REQUEST['user'];\n\t\t$strIncidentId = $strAlertId = $strAlertMsg = $strTimeAlert = $strIdentifier = $strChangeId = null;\n\t\tif(!empty($_REQUEST['incident_id'])) {\n\t\t\t$strIncidentId = $_REQUEST['incident_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_id'])) {\n\t\t\t$strAlertId = $_REQUEST['alert_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_msg'])) {\n\t\t\t$strAlertMsg = trim($_REQUEST['alert_msg']);\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($_REQUEST['time_alert'])) {\n\t\t\t$strTimeAlert = trim($_REQUEST['time_alert']);\n\t\t}\n\t\tif(!empty($_REQUEST['identifier'])) {\n\t\t\t$strIdentifier = $_REQUEST['identifier'];\n\t\t}\n\t\tif(!empty($_REQUEST['change_id'])) {\n\t\t\t$strChangeId = $_REQUEST['change_id'];\n\t\t}\n\t\t$arrUsersInfo = $this->contact_model->getListUsersInfoByUserDomain($strUserDomain);\n\t\t//$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain('minht');\n\t\t$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain($strUserDomain);\n\t\t$arrEmails = array();\n\t\t$arrSearched = array();\n\t\t$arrVNGStaffListSearched = array();\n\t\t$t = 0;\n\t\tif(!empty($arrUsersInfo)) {\n\t\t\t$noUserIdTemp = $arrUsersInfo[0]['userid']; \n\t\t\t$arrEmails[0] = $arrUsersInfo[0]['email'];\n\t\t\tforeach ($arrUsersInfo as $key => $oneUser) {\n\t\t\t\tif($noUserIdTemp != $oneUser['userid']) {\n\t\t\t\t\t$noUserIdTemp = $oneUser['userid'];\n\t\t\t\t\t$t = 0;\n\t\t\t\t\t$arrEmails[] = strtolower($oneUser['email']);\n\t\t\t\t} \n\t\t\t\t$arrSearched[$noUserIdTemp][$t] = $oneUser;\n\t\t\t\t$t++;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$arrSearched = array();\n\t\t}\n\n\t\tif(!empty($arrVNGStaffList)) {\n\t\t\tforeach ($arrVNGStaffList as $index => $oOneStaff) {\n\t\t\t\tif(!in_array(strtolower($oOneStaff->email), $arrEmails)) {\n\t\t\t\t\t$arrVNGStaffListSearched[] = $oOneStaff;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$arrVNGStaffListSearched = array();\n\t\t}\n\t\t$this->loadview('contact/popup_search_by_user_result', array('arrSearchUsersResult' => $arrSearched, 'arrVNGStaffs' => $arrVNGStaffListSearched, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIdentifier' => $strIdentifier, 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_call_user_by_id($iUserId, $strZbxHostName, $strIncidentId) {\n \t$iUserActionId = $_SESSION['userId'];\n\t\t$arrUser = $this->contact_model->getUserById($iUserId);\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n\t\t\t'host_name'\t=> $strZbxHostName\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strZbxHostName'\t=> $strZbxHostName,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId), 'layout_popup');\n\t}", "public function loadProfilePopup()\n {\n $this->error(false);\n\n $sM = $this->get('m');\n $sModule = $this->get('module');\n $sName = $this->get('name');\n $sMatchType = $this->get('match_type');\n $sMatchID = $this->get('match_id');\n $sMatchName = $this->get('match_name');\n\n $bIsRight = false;\n $sMatchTypeUserConvertToPages = $sMatchType;\n if ($sMatchType == 'user')\n {\n $bIsRight = true;\n $aUser = Phpfox::getService('user')->getByUserName($sMatchName);\n if (isset($aUser['user_id']) === true)\n {\n // check pages object\n if ((!isset($aUser['user_id'])) || (isset($aUser['user_id']) && $aUser['profile_page_id'] > 0))\n {\n if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n {\n $sMatchTypeUserConvertToPages = 'page';\n }\n } else\n {\n Phpfox::getBlock('profilepopup.user');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n } else\n {\n $bIsRight = false;\n\t\t\t\t\t\t\t\t$sMatchTypeUserConvertToPages = 'page';\n }\n }\n if ($sMatchType == 'page' || $sMatchTypeUserConvertToPages == 'page')\n {\n $bIsRight = true;\n\t\t\t\t\t\tif (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aPage = Phpfox::getService('pages')->getForView($sMatchID);\n if (!$aPage)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.pages');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'event')\n {\n $bIsRight = true;\n $aEvent = Phpfox::getService('event')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.event');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'fevent')\n {\n $bIsRight = true;\n if (Phpfox::isModule('fevent'))\n {\n $aEvent = Phpfox::getService('fevent')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.fevent');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n }\n\n if ($bIsRight === false)\n {\n echo json_encode(array('content' => '', 'msg' => \"failure\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }", "public function loadUserPayPalUser()\n {\n }", "function leadership_user_login_link_popup($user, $js = NULL) {\n $uli = _leadership_user_login_link($user);\n $popup_content = t('<p>One-time login link for @username.</p>', array('@username' => format_username($user)));\n $popup_content .= '<p>' . $uli . '</p>';\n\n // Checking JavaScript is enabled.\n if (!$js) {\n // If JavaScript is disabled, add return link and output\n // content without the popup.\n $popup_content .= '<p>' . l(t('Return'), 'admin/leadership/user');\n return $popup_content;\n }\n\n // If everything is ok and JavaScript is enabled, add the necessary\n // libraries and JS to work with modal windows.\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n\n // Forming a modal window.\n return (ctools_modal_render('User Login Link', $popup_content));\n}", "public function load_popup_sms() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = @$_REQUEST['incident_id'];\n\t\t$strAlertId = @$_REQUEST['alert_id'];\n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = isset($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = isset($_REQUEST['change_id']) ? trim($_REQUEST['change_id']) : null;\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n\t\t$arrOneUser = array();\n\t\tif($noUserId != null) {\n\t\t\t$arrOneUser = $this->contact_model->getUserById($noUserId);\n\t\t\tif(!empty($arrOneUser)) {\n\t\t\t\t$arrOneUser['mobile'] = str_replace($arrOrders, ', ', $arrOneUser['mobile']);\n\t\t \t$arrOneUser['mobile'] = str_replace($arrChildOrders, '', $arrOneUser['mobile']);\n\t\t if(strpos($arrOneUser['mobile'], ',')!==false) {\n\t\t $arrOneUser['mobile'] = explode(', ', $arrOneUser['mobile']);\n\t\t } else {\n\t\t $arrOneUser['mobile'] = array($arrOneUser['mobile']);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$this->loadview('contact/popup_send_message', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_list_mobile_user_vng_staff_list() {\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getStaffById($iUserId);\n\t\t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['cellphone'] = str_replace($arrOrders, ', ', $arrUser['cellphone']);\n\t \t\t$arrUser['cellphone'] = str_replace($arrChildOrders, '', $arrUser['cellphone']);\t \t\t\n\t \t$arrUser['cellphone'] = explode(', ', $arrUser['cellphone']);\n\t\t $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t\t\t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "function load_login_popup()\n\t{\n\t\t$data['gpAuthUrl'] = $this->input->post('gpAuthUrl');\n\t\t$data['fbLoginUrl'] = $this->input->post('fbLoginUrl');\n\n\t\t$load_login_view = $this->load->view('login_view', $data, TRUE);\n\t\techo $load_login_view;\n\t}", "public function loadUser($user);", "public function onLoadCallback()\n {\n if (!\\Input::get('dcawizard') || 'edit' !== \\Input::get('act')) {\n return;\n }\n\n if (version_compare(VERSION, '4.0', '>')) {\n $session = \\System::getContainer()->get('session')->getBag('contao_backend')->get('popupReferer');\n } else {\n $session = \\Session::getInstance()->get('popupReferer');\n }\n\n if (!is_array($session)) {\n return;\n }\n\n list($table, $id) = explode(':', \\Input::get('dcawizard'));\n\n // Use the current URL without (act and id parameters) as referefer\n $url = \\Haste\\Util\\Url::removeQueryString(['act', 'id'], \\Environment::get('request'));\n $url = \\Haste\\Util\\Url::addQueryString('id=' . $id, $url);\n\n // Replace the last referer value with the correct link\n end($session);\n $session[key($session)]['current'] = $url;\n\n \\Session::getInstance()->set('popupReferer', $session);\n }", "public function User_load($user) {\n\n $key = $user->getResourceLink()->getKey();\n $id = $user->getResourceLink()->getId();\n $userId = $user->getId(LTI_Tool_Provider::ID_SCOPE_ID_ONLY);\n $sql = 'SELECT lti_result_sourcedid, created, updated ' .\n 'FROM ' . $this->dbTableNamePrefix . LTI_Data_Connector::USER_TABLE_NAME . ' ' .\n 'WHERE (consumer_key = :key) AND (context_id = :id) AND (user_id = :user_id)';\n $query = $this->db->prepare($sql);\n $query->bindValue('key', $key, PDO::PARAM_STR);\n $query->bindValue('id', $id, PDO::PARAM_STR);\n $query->bindValue('user_id', $userId, PDO::PARAM_STR);\n $ok = $query->execute();\n if ($ok) {\n $row = $query->fetch(PDO::FETCH_ASSOC);\n $ok = ($row !== FALSE);\n }\n\n if ($ok) {\n $row = array_change_key_case($row);\n $user->lti_result_sourcedid = $row['lti_result_sourcedid'];\n $user->created = strtotime($row['created']);\n $user->updated = strtotime($row['updated']);\n }\n\n return $ok;\n\n }", "public function users_admin_load() {\r\n\t\tglobal $plugin_page, $ura_pending_approval_list_page, $parent_page, $title;\r\n\t\t$ura_pending_approval_list_page = new URA_USERS_LIST_TABLE_NUA();\r\n\t\t$doaction = $ura_pending_approval_list_page->get_bulk_actions();\r\n\t\t$title = __( 'Users', 'user-registration-aide' ) ;\r\n\t\t$parent_file = 'users.php';\r\n\t\t// Build redirection URL\r\n\t\t$redirect_to = remove_query_arg( array( 'action', 'error', 'updated', 'activated', 'notactivated', 'deleted', 'notdeleted', 'resent', 'notresent', 'do_delete', 'do_resend', 'do_activate', '_wpnonce', 'signup_ids', 'mailto', 'email', 'resend_email' ), $_SERVER['REQUEST_URI'] );\r\n\t\t\r\n\t\t/**\r\n\t\t * Fires at the start of the signups admin load.\r\n\t\t *\r\n\t\t * @since 1.5.3.0\r\n\t\t *\r\n\t\t * @param string $doaction Current bulk action being processed.\r\n\t\t * @param array $_REQUEST Current $_REQUEST global.\r\n\t\t */\r\n\t\tdo_action( 'ura_signups_admin_load', $doaction, $_REQUEST );\r\n\r\n\t\t/**\r\n\t\t * Filters the allowed actions for use in the user signups admin page.\r\n\t\t *\r\n\t\t * @since 1.5.3.0\r\n\t\t *\r\n\t\t * @param array $value Array of allowed actions to use.\r\n\t\t */\r\n\t\t$allowed_actions = array( 'approve_user', 'deny_user', 'activate_user', 'resend_email', 'resend_password_email', 'delete_user' );\r\n\r\n\t\t// Prepare the display of the Community Profile screen\r\n\t\tif ( ! in_array( $doaction, $allowed_actions ) || ( -1 == $doaction ) ) {\r\n\r\n\t\t\t\r\n\t\t\t// per_page screen option\r\n\t\t\tadd_screen_option( 'per_page', array( 'label' => _x( 'Pending Accounts', 'Pending Accounts per page (screen options)', 'user-registration-aide' ) ) );\r\n\t\t\r\n\t\t\t$screen = get_current_screen();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tif ( ! empty( $_REQUEST['approval_ids' ] ) ) {\r\n\t\t\t\t$signups = wp_parse_id_list( $_REQUEST['approval_ids' ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function actionLoad() {\n $user_id = Yii::$app->request->post('user_id');\n $user = User::find()->where(['user_id' => $user_id])->asArray()->one();\n if($user){\n echo json_encode(['load_success' => 1, 'user' => $user]);\n } else {\n echo json_encode(['load_success' => 0, 'user' => $user]);\n }\n }", "function popup($page_name = '',$param = '')\r\n\t{\r\n\t\t$this->load->model('Crud_model');\r\n\r\n\t\tif($page_name == 'add_user_model')\r\n\t\t{\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view('admin_models/add_models/add_user_model.php');\r\n\t\t}\r\n\t\telse if($page_name == 'edit_user_model')\r\n\t\t{\r\n\t\t\t$data['single_user'] = $this->Crud_model->fetch_record_by_id('mp_users',$param);\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view( 'admin_models/edit_models/edit_user_model.php',$data);\r\n\t\t}\r\n\t\t\r\n\t}", "public function callUserFunctionCanCallFunction() {}", "public function showUserChanger(array $data);", "function MyProfile_user_display()\r\n{\r\n $myprofile_dom = ZLanguage::getModuleDomain('MyProfile');\r\n // Security check\r\n if (!SecurityUtil::checkPermission('MyProfile::', '::', ACCESS_OVERVIEW)) return LogUtil::registerPermissionError();\r\n\r\n\t// Add js\t\t\r\n\tPageUtil::addVar('javascript','modules/MyProfile/pnjavascript/myprofile.js');\r\n\t\r\n\t// Create output and assign data\r\n\t$render \t= pnRender::getInstance('MyProfile');\r\n\t$uid\t\t= (int) FormUtil::getPassedValue('uid');\r\n\t$viewer_uid\t= pnUserGetVar('uid');\r\n\t$uname\t\t= FormUtil::getPassedValue('uname');\r\n\r\n\t// check for parameters and redirect to own profiel if there is no parameter\r\n\tif (!isset($uname) && ($uid < 2) && pnUserLoggedIn()) {\r\n\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => $viewer_uid)));\r\n\t}\r\n\r\n\t// get Plugin\r\n\t$pluginname = FormUtil::getPassedValue('pluginname');\r\n\tif (!isset($pluginname)) $pluginname=\"MyProfile\";\r\n\r\n\t// Caching settings\r\n \t$render->cache_id = (int)pnUserLoggedIn().'-'.$uid.'-'.$pluginname;\r\n\r\n\t// redirect to the MyProfile display page with user id as parameter to acoid trouble with any mis-spelled usernames or special characters\r\n\t// but only if uid is not submitted.\r\n\tif (isset($uname)) {\r\n\t\tif (pnUserGetIDFromName($uname) > 1) {\r\n\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t}\r\n\t\telse {\r\n\t\t \t// maybe the username has to be decoded due to some special characters...\r\n\t\t \t$last = FormUtil::getPassedValue('last');\r\n\t\t \tif (isset($last) && ($last == 1)) {\r\n\t\t \t \t// is the username utf8 encoded?\r\n\t\t \t \t$uname = utf8_decode($uname);\r\n\t\t \t \tif (pnUserGetIDFromName($uname) > 1) return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t\t\telse return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => -1)));\r\n\t\t\t}\r\n\t\t \telse {\r\n\t\t \t \t// perhaps there are some special html characters?\r\n\t\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uname' => html_entity_decode($uname), 'last' => 1)));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// We only reach this point if there is no uname parameter. Now we have to get the username for the profile\r\n\t// Guests are not allowed to have a profile page ;-)\r\n\t\r\n\t// get and assign online state of user\r\n\t$online = pnModAPIFunc('MyProfile','user','getOnline',array('uid' => $uid));\r\n\tif (is_array($online) && ($online[0]['id'] == $uid)) $render->assign('onlinestatus', 1);\r\n\telse $render->assign('onlinestatus', 0);\r\n\r\n\t// get profile\r\n\t$uname = pnUserGetVar('uname', $uid);\r\n\tif ($uid > 1) $profile = pnModAPIFunc('MyProfile','user','getProfile',array('uid'=>$uid, 'uname'=>$uname));\r\n\tif (\t!isset($uname) \t\t\t||\r\n\t\t\t!(strlen($uname) > 0) \t||\r\n\t\t\t!($uid > 1) )\t{\r\n\t\t// assign invalid user or user not found template\r\n\t\t$render = pnRender::getInstance('MyProfile');\r\n\t\treturn $render->fetch('myprofile_user_display_invalid.htm');\r\n\t}\r\n\t$render->assign('profile',$profile);\r\n\t\r\n\t// assign user name and uid\r\n\tif (isset($uid) && ($uid > 1)) $uname = pnUserGetVar('uname',$uid);\r\n\telse $name = pnUserGetIDFromName($uid);\r\n\t$render->assign('uname',\t\t\t\t$uname);\r\n\t$render->assign('encuname',\t\t\t\trawurlencode($uname));\r\n\t$render->assign('uid',\t\t\t\t\t$uid);\r\n\t$render->assign('viewer_uid',\t\t\t$viewer_uid);\r\n\t$render->assign('plugin_noajax',\t\tpnModGetVar('MyProfile','plugin_noajax'));\r\n\t$render->assign('homelink',\t\t\t\tpnGetBaseURL().pnModURL('MyProfile','user','tab',array('uid'=>$uid,'ajax'=>1,'modname'=>'MyProfile')));\r\n\r\n\t// Set Standard page title\r\n\tPageUtil::setVar('title', __('Profile of user', $myprofile_dom).' '.$uname);\r\n\r\n\t// ContactList plugin\r\n\t$render->assign('contactlistavailable',\tpnModAvailable('ContactList'));\r\n\tif (pnModAvailable('ContactList')) $render->assign('contactlist_nopublicbuddylist',\tpnModGetVar('ContactList','nopublicbuddylist'));\r\n\t\r\n\t$render->assign('pluginname',$pluginname);\r\n\tif (($pluginname != \"MyProfile\") && pnModAvailable($pluginname)) pnModLangLoad($pluginname);\r\n\r\n // get the plugins\r\n $plugins = pnModAPIFunc('MyProfile','admin','getPlugins',array('uid' => $uid));\r\n\r\n $render->assign('plugins',$plugins);\r\n // execute all \"onLoad\"-Funktions and sort out the invisible plugins\r\n pnModAPIFunc('MyMap','myprofile','onLoad');\r\n foreach ($plugins as $plugin) {\r\n\t \tpnModAPIFunc($plugin['loadname'],'myprofile','onLoad');\r\n\t}\r\n\t\r\n\t// and all necessary stylesheets\r\n\tpnModAPIFunc('MyProfile','user','addStyleSheets',array('plugins' => $plugins));\t\r\n\r\n\t// let's combine myprofile with clickedme and call clickedme whenever \r\n\t// anything (even a plugin) of a user was called\r\n\tif (($uid != $viewer_uid) && (pnModAvailable('ClickedMe'))) pnModAPIFunc('ClickedMe','user','addClick',array('clicked_uid' => $uid));\r\n\r\n\t// get the plugin output\r\n\t$output = pnModAPIFunc($pluginname,'myprofile','tab',array('uid' => $uid, 'uname' => $uname));\r\n\t$render->assign('content',$output);\r\n\t\r\n\t// Return the output\r\n return $render->fetch('myprofile_user_display.htm');\r\n}", "function popmake_alm_load() {\n if( ! class_exists( 'Popup_Maker' ) ) {\n if( ! class_exists( 'PopMake_Extension_Activation' ) ) {\n require_once 'includes/class.extension-activation.php';\n }\n\n $activation = new PopMake_Extension_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );\n $activation = $activation->run();\n } else {\n PopMake_Ajax_Login_Modals::instance();\n }\n}", "public function urlUser() {\r\n $this->loadView('user');\r\n }", "public function actionLoad()\n\t{\n\t\t$user = $this->get_current_user($_GET);\n if(!$user){\n $return_data = array('success'=>false, 'error_id'=>2, 'error_msg'=>'user is not logged in');\n $this->renderJSON($return_data);\n return;\n }\n\n\n $messages = Message::model()->findAllBySql('SELECT * FROM `message` WHERE user_id = ' . $user->user_id . ' OR target_type = \"user\" AND target_id = ' . $user->user_id . ' ORDER BY id');\n\n\n $return_data = array('success'=>true, 'messages'=>$messages, 'last_update'=>date('Y-m-d H:i:s'));\n $this->renderJSON($return_data);\n return;\n\n\t}", "function addAssignedUserID($displayname, $varname) {\n global $app_strings;\n\n $json = getJSONobj();\n\n $popup_request_data = array(\n 'call_back_function' => 'set_return',\n 'form_name' => 'MassUpdate',\n 'field_to_name_array' => array(\n 'id' => 'assigned_user_id',\n 'user_name' => 'assigned_user_name',\n ),\n );\n $encoded_popup_request_data = $json->encode($popup_request_data);\n $qsUser = array('method' => 'get_user_array', // special method\n 'field_list' => array('user_name', 'id'),\n 'populate_list' => array('assigned_user_name', 'assigned_user_id'),\n 'conditions' => array(array('name' => 'user_name', 'op' => 'like_custom', 'end' => '%', 'value' => '')),\n 'limit' => '30', 'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']);\n\n $qsUser['populate_list'] = array('mass_assigned_user_name', 'mass_assigned_user_id');\n $html = <<<EOQ\n\t\t<td width=\"15%\" class=\"dataLabel\">$displayname</td>\n\t\t<td class=\"dataField\"><input class=\"sqsEnabled\" autocomplete=\"off\" id=\"mass_assigned_user_name\" name='assigned_user_name' type=\"text\" value=\"\"><input id='mass_assigned_user_id' name='assigned_user_id' type=\"hidden\" value=\"\" />\n\t\t<input title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1\n\t\t\t\tonclick='open_popup(\"Users\", 600, 400, \"\", true, false, $encoded_popup_request_data);' />\n\t\t</td>\nEOQ;\n $html .= '<script type=\"text/javascript\" language=\"javascript\">if(typeof sqs_objects == \\'undefined\\'){var sqs_objects = new Array;}sqs_objects[\\'mass_assigned_user_name\\'] = ' .\n $json->encode($qsUser) . '; registerSingleSmartInputListener(document.getElementById(\\'mass_assigned_user_name\\'));\n\t\t\t\taddToValidateBinaryDependency(\\'MassUpdate\\', \\'assigned_user_name\\', \\'alpha\\', false, \\'' . $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'] . '\\',\\'assigned_user_id\\');\n\t\t\t\t</script>';\n\n return $html;\n }", "public function loadUser()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(Yii::app()->user->id)\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\n\t\t\tif($this->_model===null)\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function loadUser()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(Yii::app()->user->id)\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\n\t\t\tif($this->_model===null)\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\n\t\t}\n\t\treturn $this->_model;\n\t}", "function MyProfile_user_tab() {\r\n\t// get variables\r\n \t$uid \t\t\t= (int)FormUtil::getPassedValue('uid');\r\n \t$viewer_uid \t= pnUserGetVar('uid');\r\n \t$modname \t\t= FormUtil::getPassedValue('modname');\r\n \t// create output\r\n \t$render = pnRender::getInstance('MyProfile');\r\n\t// go on now..\r\n \tif (isset($modname) && pnModAvailable($modname)) {\r\n\t \tpnModLangLoad($modname);\r\n\t \t$output = pnModAPIFunc($modname,'myprofile','tab',array('uid'=>$uid));\r\n\t \t$ajax = (int)FormUtil::getPassedValue('ajax');\r\n\t\tif ($ajax == 1) {\r\n\t\t\tif (pnModGetVar('MyProfile','convertToUTF8') == 1) $output = DataUtil::convertToUTF8($output);\r\n\t\t\techo $output;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $output;\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\telse return false;\r\n}", "public function userLoaded(PrivMsg $privMsg, array $data)\n {\n if (!isset($this->users[$this->idents[$privMsg->getIdent()]])) {\n $row = $this->db->fetchOne(sprintf(\"\n SELECT user_acl\n FROM users\n WHERE user_name = %s\n \", $this->db->quote($this->idents[$privMsg->getIdent()])));\n \n $this->users[$this->idents[$privMsg->getIdent()]] = new Acl($row['user_acl']);\n }\n \n $acl = $this->users[$this->idents[$privMsg->getIdent()]];\n \n if ($acl->isAllowed($data['restrict'])) {\n call_user_func($data['callback'], $privMsg);\n } else {\n $this->manager->getClient()->reply($privMsg, 'You are not allowed to use this command.', Client::REPLY_NOTICE);\n }\n }", "function MyProfile_user_view()\r\n{\r\n \treturn MyProfile_user_display();\r\n}", "function popmake_tcp_load() {\n if( ! class_exists( 'Popup_Maker' ) ) {\n if( ! class_exists( 'PopMake_Extension_Activation' ) ) {\n require_once 'includes/class.extension-activation.php';\n }\n\n $activation = new PopMake_Extension_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );\n $activation = $activation->run();\n } else {\n PopMake_Terms_Conditions_Popups::instance();\n }\n}", "function load_form()\n\t{\n\t\t# Get the passed details into the form data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(4, array('user_id'));\n\t\t\n\t\t# User is editing\n\t\tif($urldata['user_id'] !== FALSE){\n\t\t//echo $urldata['user_id'];\n\t\t $data['user_id'] = $urldata['user_id'];\n\t\t\n\t\t\t$data['companyuserdetails'] = $this->Query_reader->get_row_as_array('pick_user_by_id', array('user_id'=>$urldata['user_id']));\n\t\t}\n\n\t\t$data['userdetails'] = $this->session->userdata('alluserdata');\n\t\t$id=$data['userdetails']['companyid'];\n\t\t$query = $this->Query_reader->get_query_by_code('pick_all_users', array('company_id'=>$id));\n\t\t$result = $this->db->query($query);\n\t\t$data['returned']= $result->num_rows();\n\t\t$data['user_array'] = $result->result_array();\n\t\t$data['curPage']='company';\n \t\t$data['service'] = $this->reminder->get_reminders();\n \t$data['insurance'] = $this->reminder->insurance_reminder();\n \t$data['license'] = $this->reminder->license_reminder();\n\n\t // notices\n\t\t$this->db->where( 'to_employee' ,$data['userdetails']['userid']);\t\t\n\t\t$this->db->where( 'has_read', '0');\t\t\n\t\t$notices = $this->db->get('notice_details');\n\t\t$data['count_notices'] = $notices->num_rows();\n\t\t$data['notice_details'] = $notices->result_array();\n\n\t\t$this->load->view('companyprofile/manageusers', $data);\n\t}", "private function loadUser() {\r\n $dbLayer = DBLayer::getInstance();\r\n\r\n $this->userData = null;\r\n\r\n // Load the user details\r\n $data = $dbLayer->executeQuery('users.select_user_by_id', array(':user_id' => $this->userId));\r\n\r\n if ($data) {\r\n $this->userData = $data[0];\r\n }\r\n }", "private function Load_User_Functions()\r\n{\r\n\tif($this->users_model->user) {\r\n\t\t$user_functions = $this->users_model->user->get_data('user_functions');\r\n\t\tif($user_functions) $this->user_keywords = $user_functions;\r\n\t}\r\n\t\r\n\t\r\n}", "function popover($uid, $username, $name) {\n global $system;\n $popover = '<span class=\"js_user-popover\" data-uid=\"'.$uid.'\"><a href=\"'.$system['system_url'].'/'.$username.'\">'.$name.'</a></span>';\n return $popover;\n}", "public function isUserLoaded();", "function popup($page_name = '',$param = '')\r\n\t{\r\n\t\t$this->load->model('Crud_model');\r\n\r\n\t\tif($page_name == 'add_multipleroles_model')\r\n\t\t{\r\n\t\t\t$result_roles = $this->Crud_model->fetch_record('mp_menu', NULL);\r\n\t\t\t$data['result_roles'] = $result_roles;\r\n\r\n\t\t\t$data['user_list'] = $this->Crud_model->fetch_record('mp_users','status');\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view('admin_models/add_models/add_multipleroles_model.php',$data);\r\n\t\t}\r\n\t}", "public function load()\n {\n if (isset($_SESSION[SESSION_USER_PROFILE])) {\n $this->loadProfile($_SESSION[SESSION_USER_PROFILE]);\n }\n }", "public static function integrate_load_theme()\n\t{\n\t\tif (User::$info->is_guest)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$notification = new UserNotification(database(), User::$info);\n\t\t$notification->present();\n\t}", "function func_loadModule($user_id, $module_data_dictionary, $show_output)\n\t{\t\n\t\t$module_name = $module_data_dictionary['module_name'];\n\t\t$module_alias = $module_data_dictionary['module_alias'];\n\t\t$module_exist = $module_data_dictionary['module_source_exist'];\n\t\t$module_role = intval( $module_data_dictionary['module_role'] );\n\t\t\n\t\t$module_prefix = \"module_\";\n\t\tif ($module_role == MODULE_ROLE_TRIGGER)\t\t$module_prefix = \"trigger_\";\n\t\telse if ($module_role == MODULE_ROLE_FILTER)\t$module_prefix = \"filter_\";\n\t\telse if ($module_role == MODULE_ROLE_ACTION)\t$module_prefix = \"action_\";\n\t\t\t\t\n\t\t//check whether module source file exists\n\t\t$module_class_name = $module_prefix . $module_alias;\n\t\t$module_source_file = $module_prefix . $module_alias . \".php\";\n\t\t$module_exist = file_exists(\"./modules/\" . $module_source_file);\n\t\t$module_loaded = false;\n\n\t\tif ($show_output) {\n\t\t\techo \"\t\t\t<strong>$module_name</strong><br/>\\n\";\n\t\t\techo \"\t\t\tmodule source file: $module_source_file - exists: \" . ($module_exist ? \"yes\" : \"no\") . \"<br/>\\n\";\n\t\t\techo \"\t\t\tmodule class name: $module_class_name<br/>\\n\";\n\t\t}\n\t\t\n\t\t//class file doesn't exist\n\t\tif ($module_exist == false)\n\t\t{\n\t\t\tif ($show_output)\n\t\t\t\techo \"\t\t\tdoes not exist. Skipping...<br/>\\n\";\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//load the class file and verify it\n\t\tinclude_once( \"./modules/\" . $module_source_file );\n\t\t$module_loaded = class_exists( $module_class_name, false );\t\n\t\tif ($module_loaded == false)\n\t\t{\n\t\t\tif ($show_output)\n\t\t\t\techo \"\t\t\tfailed to load module class. Skipping...<br/>\\n\";\n\t\t\treturn null;\n\t\t}\n\t\tif ($show_output)\n\t\t\techo \"\t\t\tmodule class loaded<br/>\\n\";\n\t\t\t\t\t\n\t\t//try to create module class instance\n\t\t$module_object = null;\n\t\ttry {\n\t\t\t$module_object = new $module_class_name( $user_id, $module_data_dictionary );\n\t\t} catch (Exception $e) {\n\t\t\t$module_object = null;\n\t\t}\n\t\t\n\t\t//failed to create class instance\n\t\tif ($module_object == null)\n\t\t{\n\t\t\tif ($show_output)\n\t\t\t\techo \"\t\t\tfailed to create module class instance. Skipping...<br/>\\n\";\n\t\t\treturn null;\n\t\t}\n\t\t$module_version = $module_object->getModuleVersion();\n\t\tif ($show_output)\n\t\t\techo \"\t\t\tmodule class instance created (module version = $module_version)<br/>\\n\";\n\t\t\n\t\t//Get user configuration for this module (eg. account configs, access token, app id, etc)\n\t\t$hasConfig = isset($configs_array) && $configs_array != null && count($configs_array) > 0;\n\t\tif (!$hasConfig)\n\t\t{\n\t\t\tif ($show_output)\n\t\t\t\techo \"\t\t\tmodule has no user-config data <br/>\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($show_output)\n\t\t\t\techo \"\t\t\tmodule has \" . count($configs_array[$module_id]) . \" user-config(s)<br/>\\n\";\n\t\t\t$module_object->setConfig( $configs_array[$module_id] );\n\t\t}\n\t\t\n\t\t//Inject more data to module_data_dictionary\n\t\t$module_data_dictionary['module_loaded'] = $module_loaded;\n\t\t$module_data_dictionary['module_object'] = $module_object;\n\t\t$module_data_dictionary['module_version'] = $module_version;\n\t\t$module_data_dictionary['hasConfig'] = $hasConfig;\n\t\treturn $module_object;\n\t}", "public function load_popup_sms_vng_staff_list() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; \n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n\t\t$arrOneUser = $this->contact_model->getStaffById($noUserId);\n\t\t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(!empty($arrOneUser)) {\n \t\t$arrOneUser['cellphone'] = str_replace($arrOrders, ', ', $arrOneUser['cellphone']);\n\t \t$arrOneUser['cellphone'] = str_replace($arrChildOrders, '', $arrOneUser['cellphone']);\n\t if(strpos($arrOneUser['cellphone'], ',')!==false) {\n\t $arrOneUser['cellphone'] = explode(', ', $arrOneUser['cellphone']);\n\t } else {\n\t $arrOneUser['cellphone'] = array($arrOneUser['cellphone']);\n\t }\n \t} else {\n \t\t$arrOneUser = array();\n \t}\n \t\n\t\t$this->loadview('contact/popup_send_message_VNGHR', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public static function exeUserAction($vals=null,$user=null) {\n\t\t$user = $user===null ? User::curUser() : $user;\n\t\t$vals = $vals===null ? $_POST : $vals;\n\n\t\tif (Acid::sessGet('useraction:waitlogin')) {\n\t\t\tif (Acid::sessExist('useraction:function:name') && is_callable(Acid::sessGet('useraction:function:name'))) {\n\t\t\t\t$name = Acid::sessGet('useraction:function:name');\n\t\t\t\t$args = Acid::sessGet('useraction:function:args') ? Acid::sessGet('useraction:function:args') : array();\n\t\t\t\tforeach ($args as $karg => $arg) {\n\t\t\t\t\tif ($arg == '__USER__') {\n\t\t\t\t\t\t$args[$karg] = $user;\n\t\t\t\t\t}elseif($arg == '__VALS__') {\n\t\t\t\t\t\t$args[$karg] = $vals;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$res_action = call_user_func_array($name,$args);\n\t\t\t\tAcid::sessKill('useraction');\n\n\t\t\t\treturn $res_action;\n\t\t\t}\n\t\t}\n\t}", "function bp_core_get_displayed_userid( $user_login ) {\r\n\treturn apply_filters( 'bp_core_get_displayed_userid', bp_core_get_userid( $user_login ) );\r\n}", "public function pageUser($user_id){\r\n $target_user = UserLoader::fetch($user_id); \r\n\r\n //get dummy week\r\n $target_week = GameWeekLoader::fetch(1);\r\n\r\n //get current week\r\n $currentweek = $target_week->getGameCurrentWeek();\r\n\r\n //get players of the user\r\n $target_players = $target_user->getPlayers(); \r\n\r\n //$past_player_picks = PlayerPickLoader::fetchCurrentPlayerPicksPerUser($currentweek,$target_players);\r\n\t\t\t\t\t\r\n /*if(empty($past_player_picks))\r\n {\r\n $players = $target_players;\t\t\t\r\n }\r\n else\r\n {\r\n $players = $past_player_picks;\r\n\t\t\t\r\n }*/\r\n\t\t\r\n\t\t//Get weeks\r\n $game_weeks = $target_week->getGameWeeks($currentweek);\r\n\t\t\r\n\t\t//get dummy player pick \r\n $data['picked_time_stamp'] = date(\"Y-m-d H:i:s\");\r\n $past_picks = new PlayerPick($data); \r\n\r\n //get the user pick changes for all players\r\n $target_pick_history = $target_user->getPlayerPickHistory($user_id);\r\n\t\t\r\n\t\t//get the user pick history for all players\r\n //$target_player_pick_history = $target_user->getPastPlayerPicksPerUser($currentweek,$user_id);\r\n\t\t$target_player_pick_history = $past_picks->getPastPlayerPicks($currentweek,$target_players); \t\t\r\n \r\n //get payment info\r\n $target_payment_info = PaymentLoader::fetch($user_id,\"user_id\");\r\n \r\n //get the user payment history\r\n $target_payment_history = PaymentHistoryLoader::fetchAll($user_id,\"user_id\");\r\n \r\n // Access-controlled resource\r\n if (!$this->_app->user->checkAccess('uri_users') && !$this->_app->user->checkAccess('uri_group_users', ['primary_group_id' => $target_user->primary_group_id])){\r\n $this->_app->notFound();\r\n }\r\n \r\n // Get a list of all groups\r\n $groups = GroupLoader::fetchAll();\r\n \r\n // Get a list of all locales\r\n $locale_list = $this->_app->site->getLocales();\r\n \r\n // Determine which groups this user is a member of\r\n $user_groups = $target_user->getGroups();\r\n foreach ($groups as $group_id => $group){\r\n $group_list[$group_id] = $group->export();\r\n if (isset($user_groups[$group_id]))\r\n $group_list[$group_id]['member'] = true;\r\n else\r\n $group_list[$group_id]['member'] = false;\r\n } \r\n \r\n // Determine authorized fields\r\n $fields = ['display_name', 'email', 'title', 'locale', 'groups', 'primary_group_id'];\r\n $show_fields = [];\r\n $disabled_fields = [];\r\n $hidden_fields = [];\r\n foreach ($fields as $field){\r\n if ($this->_app->user->checkAccess(\"view_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\r\n $disabled_fields[] = $field;\r\n else\r\n $hidden_fields[] = $field;\r\n } \r\n \r\n // Always disallow editing username\r\n $disabled_fields[] = \"user_name\";\r\n \r\n // Hide password fields for editing user\r\n $hidden_fields[] = \"password\"; \r\n \r\n $this->_app->render('user_info.html', [\r\n 'page' => [\r\n 'author' => $this->_app->site->author,\r\n 'title' => \"Users | \" . $target_user->user_name,\r\n 'description' => \"User information page for \" . $target_user->user_name,\r\n 'alerts' => $this->_app->alerts->getAndClearMessages()\r\n ],\r\n \"box_id\" => 'view-user',\r\n \"box_title\" => $target_user->user_name,\r\n \"target_user\" => $target_user,\r\n \"target_players\" => $target_players,\r\n \"target_pick_history\" => $target_pick_history,\r\n\t\t\t\"target_player_pick_history\" => $target_player_pick_history,\r\n \"target_payment_history\" => $target_payment_history,\r\n \"target_payment_info\" => $target_payment_info,\r\n\t\t\t\"game_weeks\" => $game_weeks,\r\n \"groups\" => $group_list,\r\n \"locales\" => $locale_list,\r\n \"fields\" => [\r\n \"disabled\" => $disabled_fields,\r\n \"hidden\" => $hidden_fields\r\n ],\r\n \"buttons\" => [\r\n \"hidden\" => [\r\n \"submit\", \"cancel\"\r\n ]\r\n ],\r\n \"validators\" => \"{ none: ''}\" \r\n ]); \r\n }", "function LoadRow() {\n\t\tglobal $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\n\t\t// Call Row Selecting event\n\t\t$this->Row_Selecting($sFilter);\n\n\t\t// Load SQL based on filter\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$res = FALSE;\n\t\t$rs = ew_LoadRecordset($sSql, $conn);\n\t\tif ($rs && !$rs->EOF) {\n\t\t\t$res = TRUE;\n\t\t\t$this->LoadRowValues($rs); // Load row values\n\t\t\t$rs->Close();\n\t\t}\n\n\t\t// Check if valid user id\n\t\tif ($res) {\n\t\t\t$res = $this->ShowOptionLink('edit');\n\t\t\tif (!$res) {\n\t\t\t\t$sUserIdMsg = $Language->Phrase(\"NoPermission\");\n\t\t\t\t$this->setFailureMessage($sUserIdMsg);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "public static function userOwnerBlock($hook, $type, $return_value, $params) {\n\t\t\n\t\tif (empty($params) || !is_array($params)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$entity = elgg_extract('entity', $params);\n\t\tif (!($entity instanceof \\ElggUser)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$return_value[] = \\ElggMenuItem::factory([\n\t\t\t'name' => 'poll',\n\t\t\t'text' => elgg_echo('poll:menu:site'),\n\t\t\t'href' => \"poll/owner/{$entity->username}\",\n\t\t]);\n\t\t\n\t\treturn $return_value;\n\t}", "public function loadUser()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(Yii::app()->user->id)\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\n\t\t\tif($this->_model===null)\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\n\t\t\t\t\n\t\t}else{\n\t\t\t//$this->debug( \"Model Nonulll\");\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function on_show_originate($template, $tab_path, $action)\n {\n\n if (!(check_permission(PERM_ORIGINATE_CALL)))\n throw new Exception(\"You do not have the required permissions to originate a call!\");\n\n try {\n\n $ext = (isset($_POST[\"ext\"])) ? $_POST[\"ext\"] : $_SESSION[\"extension\"];\n $number = (isset($_POST[\"number\"])) ? $_POST[\"number\"] : \"\";\n $caller_num = (isset($_POST[\"caller_num\"])) ? $_POST[\"caller_num\"] : \"\";\n $caller_name = (isset($_POST[\"caller_name\"])) ? $_POST[\"caller_name\"] : \"\";\n $timeout = intval(get_global_config_item(\"click2dial\", \"timeout\", 30));\n\n if (isset($_GET[\"number\"]) && empty($number))\n $number = $_GET[\"number\"];\n\n if (isset($_POST[\"call\"])) {\n\n $this->do_originate_call($ext, $number, $caller_num, $caller_name, $timeout);\n\n $date = date(DATE_RFC2822);\n\n $this->show_messagebox(\n MESSAGEBOX_INFO,\n \"Originate call succeded.\\n\\\"$ext\\\" -> \\\"$number\\\" on $date\",\n false\n );\n\n }\n } catch (Exception $e) {\n\n $this->show_messagebox(MESSAGEBOX_ERROR, $e->getmessage(), false);\n }\n\n require($template->load(\"originate.tpl\"));\n\n $template->include_script(\"originate.js\");\n }", "function _tpl_userpage($userNS='user:',$link=0) {\n global $conf;\n if ($link)\n tpl_link(wl($userNS.$_SERVER['REMOTE_USER'].':'.$conf['start']),tpl_getLang('btn_userpage'));\n else\n echo html_btn('userpage',$userNS.$_SERVER['REMOTE_USER'].':'.$conf['start'],'',array());\n}", "public function loadUser()\r\n {\r\n if ($this->_model === null) {\r\n if (Yii::app()->user->id)\r\n $this->_model = Yii::app()->controller->module->user();\r\n if ($this->_model === null)\r\n $this->redirect(Yii::app()->controller->module->loginUrl);\r\n }\r\n return $this->_model;\r\n }", "function display_profile($userid = 0)\n{\n global $ilance, $myapi;\n \n return fetch_user('displayprofile', intval($userid));\n}", "private function logUserAnnouncedLoad(Load $load)\n {\n if (!Yii::$app->user->isGuest) {\n Log::user(Create::ACTION, Create::PLACEHOLDER_USER_ANNOUNCED_LOAD, [$load]);\n }\n }", "function squirrelmail_plugin_init_retrieveuserdata() {\n global $squirrelmail_plugin_hooks;\n\n $squirrelmail_plugin_hooks[\"loading_prefs\"][\"retrieveuserdata\"] = \"check_userdata\";\n $squirrelmail_plugin_hooks[\"options_personal_save\"][\"retrieveuserdata\"] = \"force_userdata\";\n }", "public function loadUser($id);", "function getuser(){\n\tif($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\tif (isset($_POST['submitloadusers']) == 'Load Users') {\n\n\t\t\tif (!empty($_SESSION['token'])) {\n\t\t\t\t\n\t\t\t\t$request_url = url.user.\"?realm=\".realm;\n\t\t\t\t\n\t\t\t\t$gettoken = substr($_SESSION['token'], 0, -1);\n\t\t\t\t\n\t\t\t\t$ch = curl_init();\n\t\t\t\t\n\t\t\t\t$request_headers = array();\n\t\t\t\t$request_headers[] = 'Content-Type: application/json; charset=utf-8';\n\t\t\t\t$request_headers[] = 'x-auth-token: '.$gettoken;\n\t\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $request_url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER,FALSE);\n\t\t\t\t\n\t\t\t\t$response = curl_exec($ch);\n\t\t//\t\techo $response = curl_exec($ch);\n\t\t//\t\tprint_r($response);\n\t\t\n\t\t\t\t$response = json_decode($response, true);\n\n\t\t\t\t\techo \t\"<table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t\t<td>Last Name</td>\n\t\t\t\t\t\t\t<td>Email</td>\t\t\n\t\t\t\t\t\t\t<td>Extension</td>\n\t\t\t\t\t\t\t<td>Numbers</td>\n\t\t\t\t\t\t\t<td>Datum</td>\n\t\t\t\t\t\t\t</tr>\"; \t\n\n\t\t\t\tforeach ($response as $key => $value) {\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\".$value['fname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['lname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['email'].\"</td>\n\t\t\t\t\t\t<td>\".$value['ext'].\"</td>\n\t\t\t\t\t\t<td>\"; \n\t\t\t\t\tforeach ($value['numbers'] as $key2 => $numvalue) {\n\t\t\t\t\techo $numvalue;\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\"; \n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\t\t\techo \"<form action='getlist.php' method='post' id='popupForm'> \n\t\t\t\t\t<input type='text' name='exte' class='exte' value=\".$value['ext'].\"> \n\t\t\t\t\t<input type='submit' name='aanvragen' id='aanvragen' value='aanvragen'></form>\";\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t</table> \";\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//print_r($response);\n\t\t\t\t\n\t\t\t\tcurl_close($ch);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//echo\"Load User\";\n\t\t} \n\t}\n}", "function load_data(&$preferences, $userid) {\n global $USER;\n return true;\n }", "function hrb_before_user( $user_id ) {\n\tdo_action( 'hrb_before_user', $user_id );\n}", "public function actionShow () {\n\t\t$url = Yii::$app->request->get('userurl');\n\t\treturn $this->render('userpage', ['user' => (new Users ())->getUsersData($url)]);\n\t}", "function loadUser ($id, $log=true){\r\r\n if (list($row) = $GLOBALS['core']->sqlSelect('mod_users', 'user_id', $id)){\r\r\n extract($row);\r\r\n\r\r\n $this->user_id = $id;\r\r\n $this->username = $username;\r\r\n $this->password = $password;\r\r\n $this->email = $email;\r\r\n\r\r\n $this->realname = $realname;\r\r\n $this->address = $address;\r\r\n $this->city = $city;\r\r\n $this->state = $state;\r\r\n $this->zip = $zip;\r\n $this->org = $org;\r\n\t $this->rootOrg = $rootOrg;\r\n $this->phone = $phone;\r\r\n\t $this->realname = $realname;\r\n\t $this->head = $head;\r\n $this->zip = $zip;\r\n $this->appuid = $appuid;\r\n $this->Longitude = $Longitude;\r\n $this->Latitude = $Latitude;\r\n $this->locationtime = $locationtime;\r\n\r\n\t if ($admin_switch) $this->admin_switch = TRUE;\r\r\n else $this->admin_switch = FALSE;\r\r\n\r\r\n if ($deity) $this->deity = TRUE;\r\r\n else $this->deity = FALSE;\r\r\n\r\r\n $this->last_on = $last_on;\r\r\n\r\r\n $this->loadModSettings('user');\r\r\n $this->setPermissions();\r\r\n\r\r\n if ($groups) $this->groups = $this->listGroups();\r\r\n\r\r\n $this->groupPermissions = $this->getMemberRights();\r\r\n $this->groupModSettings = $this->loadUserGroupVars();\r\r\n if ($log) PHPWS_User::updateLogged($id);\r\r\n return TRUE;\r\r\n } else \r\r\n return FALSE;\r\r\n }", "function gs_callwaiting_activate( $user, $active )\n{\n\tif (! preg_match( '/^[a-z0-9\\-_.]+$/', $user ))\n\t\treturn new GsError( 'User must be alphanumeric.' );\n\t$active = !! $active;\n\t\n\t# connect to db\n\t#\n\t$db = gs_db_master_connect();\n\tif (! $db)\n\t\treturn new GsError( 'Could not connect to database.' );\n\t\n\t# get user_id\n\t#\n\t$user_id = $db->executeGetOne( 'SELECT `id` FROM `users` WHERE `user`=\\''. $db->escape($user) .'\\'' );\n\tif (! $user_id)\n\t\treturn new GsError( 'Unknown user.' );\n\t\n\t# get user_ext\n\t$user_ext = $db->executeGetOne('SELECT `s`.`name` `ext`\nFROM\n\t`users` `u` JOIN\n\t`ast_sipfriends` `s` ON (`s`.`_user_id`=`u`.`id`)\nWHERE `u`.`user`=\\''. $db->escape($user) .'\\''\n\t);\n\tif (! $user_ext)\n\t\treturn new GsError( 'Unknown user.' );\n\t\n\t# (de)activate\n\t#\n\t$num = $db->executeGetOne( 'SELECT COUNT(*) FROM `callwaiting` WHERE `user_id`='. $user_id );\n\tif ($num < 1) {\n\t\t$ok = $db->execute( 'INSERT INTO `callwaiting` (`user_id`, `active`) VALUES ('. $user_id .', 0)');\n\t} else\n\t\t$ok = true;\n\t$ok = $ok && $db->execute( 'UPDATE `callwaiting` SET `active`='. (int)$active .' WHERE `user_id`='. $user_id );\n\tif (! $ok)\n\t\treturn new GsError( 'Failed to set call waiting.' );\n\t\n\t$call //= \"Channel: Local/\". $from_num_dial .\"\\n\"\n\t\t= \"Channel: local/toggle@toggle-cwait-hint\\n\"\n\t\t. \"MaxRetries: 0\\n\"\n\t\t. \"WaitTime: 15\\n\"\n\t\t. \"Context: toggle-cwait-hint\\n\"\n\t\t. \"Extension: toggle\\n\"\n\t\t. \"Callerid: $user <Toggle>\\n\"\n\t\t. \"Setvar: __user_id=\". $user_id .\"\\n\"\n\t\t. \"Setvar: __user_name=\". $user_ext .\"\\n\"\n\t\t. \"Setvar: CHANNEL(language)=\". gs_get_conf('GS_INTL_ASTERISK_LANG','de') .\"\\n\"\n\t\t. \"Setvar: __is_callfile_origin=1\\n\" # no forwards and no mailbox on origin side\n\t\t. \"Setvar: __callfile_from_user=\". $user_ext .\"\\n\"\n\t\t. \"Setvar: __record_file=\". $filename .\"\\n\"\n\t\t;\n\t\n\t$filename = '/tmp/gs-'. $user_id .'-'. time() .'-'. rand(10000,99999) .'.call';\n\t\n\t$cf = @fOpen( $filename, 'wb' );\n\tif (! $cf) {\n\t\tgs_log( GS_LOG_WARNING, 'Failed to write call file \"'. $filename .'\"' );\n\t\treturn new GsError( 'Failed to write call file.' );\n\t}\n\t@fWrite( $cf, $call, strLen($call) );\n\t@fClose( $cf );\n\t@chmod( $filename, 00666 );\n\t\n\t$spoolfile = '/var/spool/asterisk/outgoing/'. baseName($filename);\n\t\n\t\n\tif (! gs_get_conf('GS_INSTALLATION_TYPE_SINGLE')) {\n\t\t$our_host_ids = @gs_get_listen_to_ids();\n\t\tif (! is_array($our_host_ids)) $our_host_ids = array();\n\t\t$user_is_on_this_host = in_array( $_SESSION['sudo_user']['info']['host_id'], $our_host_ids );\n\t} else {\n\t\t$user_is_on_this_host = true;\n\t}\n\t\n\tif ($user_is_on_this_host) {\n\t\t# the Asterisk of this user and the web server both run on this host\n\t\t$err=0; $out=array();\n\t\t@exec( 'sudo mv '. qsa($filename) .' '. qsa($spoolfile) .' 1>>/dev/null 2>>/dev/null', $out, $err );\n\t\tif ($err != 0) {\n\t\t\t@unlink( $filename );\n\t\t\tgs_log( GS_LOG_WARNING, 'Failed to move call file \"'. $filename .'\" to \"'. $spoolfile .'\"' );\n\t\t\treturn new GsError( 'Failed to move call file.' );\n\t\t}\n\t} else {\n\t\t$cmd = 'sudo scp -o StrictHostKeyChecking=no -o BatchMode=yes '. qsa( $filename ) .' '. qsa( 'root@'. $user['host'] .':'. $filename );\n\t\t//echo $cmd, \"\\n\";\n\t\t@exec( $cmd .' 1>>/dev/null 2>>/dev/null', $out, $err );\n\t\t@unlink( $filename );\n\t\tif ($err != 0) {\n\t\t\tgs_log( GS_LOG_WARNING, 'Failed to scp call file \"'. $filename .'\" to '. $user['host'] );\n\t\t\treturn new GsError( 'Failed to scp call file.' );\n\t\t}\n\t\t//remote_exec( $user['host'], $cmd, 10, $out, $err ); // <-- does not use sudo!\n\t\t$cmd = 'sudo ssh -o StrictHostKeyChecking=no -o BatchMode=yes -l root '. qsa( $user['host'] ) .' '. qsa( 'mv '. qsa( $filename ) .' '. qsa( $spoolfile ) );\n\t\t//echo $cmd, \"\\n\";\n\t\t@exec( $cmd .' 1>>/dev/null 2>>/dev/null', $out, $err );\n\t\tif ($err != 0) {\n\t\t\tgs_log( GS_LOG_WARNING, 'Failed to mv call file \"'. $filename .'\" on '. $user['host'] .' to \"'. $spoolfile .'\"' );\n\t\t\treturn new GsError( 'Failed to mv call file on remote host.' );\n\t\t}\n\t}\n\t\n\t\n\t# reload phone config\n\t#\n\t//$user_name = $db->executeGetOne( 'SELECT `name` FROM `ast_sipfriends` WHERE `_user_id`='. $user_id );\n\t//@ exec( 'asterisk -rx \\'sip notify snom-reboot '. $user_name .'\\'' );\n\t//@ gs_prov_phone_checkcfg_by_user( $user, false ); //FIXME\n\t\n\treturn true;\n}", "protected function loadCommandLineBackendUser() {}", "function loadAction($action) {\n\t\t\n\t\tif ($this->session->get('loged_right_now') > 0) {\n\t\t\t$this->OnRightAfterLogin();\n\t\t\t$this->session->set('loged_right_now',0);\n\t\t}\n\t\t\n\t\t$redirect = false;\n\t\tif (!empty($action)) {\n\t\t\t\n\t\t\tswitch ($action) {\n\t\t\t\t\n\t\t\t\tcase 'ajax_login':\n\t\t\t\t\t\n\t\t\t\t\tif (!$this->login($this->login, $this->password)) {\n\t\t\t\t\t\t$this->user['rights'] = $this->_loadUserGroupRights('__anonymous');\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t$this->OnLogin();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->session->set('loged_right_now',1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'login':\n\n\t\t\t\t\t$redirect = true;\n\t\t\t\t\t\n\t\t\t\t\tif (!$this->login($this->login, $this->password)) {\n\t\t\t\t\t\t$this->user['rights'] = $this->_loadUserGroupRights('__anonymous');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->OnLogin();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->session->set('loged_right_now',1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($this->session->get('last_call')) {\n\t\t\t\t\t\t\t$this->redirect_params = $this->session->get('last_call');\n\t\t\t\t\t\t\t$this->session->unset_var('last_call');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'logout':\n\t\t\t\t\t\n\t\t\t\t\t$redirect = true;\n\t\t\t\t\t\n\t\t\t\t\t$this->logout();\n\t\t\t\t\t\n\t\t\t\t\t$this->OnLogout();\n\t\t\t\t\t\n\t\t\t\t\t//$this->rv->set('page','login');\n\t\t\t\t\t//$this->rv->set('subpage','index');\n\t\t\t\t\t$this->user['rights'] = $this->_loadUserGroupRights('__anonymous');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t} else if ( $this->isLoged() ) {\n\n\t\t\tif ( ! $this->login(\n\t\t\t\t$this->session->get('user_login'),\n\t\t\t\t$this->session->get('user_password'),\n\t\t\t\t$this->session->get('user_id')) ) {\n\t\t\t\t\t\n\t\t\t\t$this->logout();\n\t\t\t\t\n\t\t\t\t$this->OnLogout();\n\t\t\t\t\n\t\t\t\t$this->rv->set('page','login');\n\t\t\t\t$this->rv->set('subpage','index');\n\t\t\t\t\n\t\t\t\t$redirect = true;\n\t\t\t} else {\n\t\t\t\t$this->OnIsStillLoged();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->user['rights'] = $this->_loadUserGroupRights('__anonymous');\n\t\t}\n\t\tif ($redirect) {\n\t\t\t$this->session->set('msg', $this->msg);\n\t\t\t//session_regenerate_id(true);\n\t\t}\n\t\t\n\t\t$this->OnCompleted();\n\t\t\n\t\treturn $redirect;\n\t}", "protected function invoke()\n {\n //patched by jixian for fix ajax post data\n if (isset($_POST['__url']))\n {\n $getUrl = parse_url($_POST['__url']);\n $query = $getUrl['query'];\n $parameter = explode('&', $query);\n foreach ($parameter as $param)\n {\n $data = explode('=', $param);\n $name = $data[0];\n $value = $data[1];\n $_GET[$name] = $value;\n }\n }\n\n // get invocation type\n $invocationType = (isset($_REQUEST['F']) ? $_REQUEST['F'] : \"\");\n\n if ($invocationType == '') // is invocation?\n return;\n\n // check is valid invocation?\n if ($invocationType != \"RPCInvoke\" && $invocationType != \"Invoke\")\n {\n trigger_error(\"$invocationType is not a valid invocation\", E_USER_ERROR);\n return;\n }\n\n // read parameters\n $arg_list = array();\n $i = 0;\n\n eval(\"\\$P$i = (isset(\\$_REQUEST['P$i']) ? \\$_REQUEST['P$i']:'');\");\n $Ptmp = \"P\" . $i;\n \n eval(\"\\$P$i = (isset(\\$_REQUEST['P$i']) ? \\$_REQUEST['P$i']:'');\");\n \n\n\n if (strstr($P0, Popup_Suffix)) // _popupx_?\n {\n $name_len = strlen($P0);\n $suffix_len = strlen(Popup_Suffix);\n $P0 = substr($P0, 0, $name_len - $suffix_len - 1) . \"]\";\n }\n\n while ($$Ptmp != \"\")\n {\n $parm = $$Ptmp;\n $parm = substr($parm, 1, strlen($parm) - 2);\n $arg_list[] = $parm;\n $i++;\n eval(\"\\$P$i = (isset(\\$_REQUEST['P$i']) ? \\$_REQUEST['P$i']:'');\");\n $Ptmp = \"P\" . $i;\n }\n\n if ($invocationType == \"RPCInvoke\")\n BizSystem::clientProxy()->setRPCFlag(true);\n\n // invoke the function\n $num_arg = count($arg_list);\n if ($num_arg < 2)\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_RPCARG\", array($class));\n trigger_error($errmsg, E_USER_ERROR);\n } else\n {\n $objName = array_shift($arg_list);\n $methodName = array_shift($arg_list);\n\n $obj = BizSystem::getObject($objName);\n\n if ($obj)\n {\n if (method_exists($obj, $methodName))\n {\n if (!$this->validateRequest($obj, $methodName))\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_REQUEST_REJECT\", array($obj->m_Name, $methodName));\n trigger_error($errmsg, E_USER_ERROR);\n }\n switch (count($arg_list))\n {\n case 0: $rt_val = $obj->$methodName();\n break;\n case 1: $rt_val = $obj->$methodName($arg_list[0]);\n break;\n case 2: $rt_val = $obj->$methodName($arg_list[0], $arg_list[1]);\n break;\n case 3: $rt_val = $obj->$methodName($arg_list[0], $arg_list[1], $arg_list[2]);\n break;\n default: $rt_val = call_user_func_array(array($obj, $methodName), $arg_list);\n }\n } else\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_METHODNOTFOUND\", array($objName, $methodName));\n trigger_error($errmsg, E_USER_ERROR);\n }\n } else\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_CLASSNOTFOUND\", array($objName));\n trigger_error($errmsg, E_USER_ERROR);\n }\n\n if ($invocationType == \"Invoke\") // no RPC invoke, page reloaded -> rerender view\n {\n if (BizSystem::clientProxy()->hasOutput())\n BizSystem::clientProxy()->printOutput();\n }\n else if ($invocationType == \"RPCInvoke\") // RPC invoke\n {\n if (BizSystem::clientProxy()->hasOutput())\n {\n if ($_REQUEST['jsrs'] == 1)\n echo \"<html><body><form name=\\\"jsrs_Form\\\"><textarea name=\\\"jsrs_Payload\\\" id=\\\"jsrs_Payload\\\">\";\n BizSystem::clientProxy()->printOutput();\n if ($_REQUEST['jsrs'] == 1)\n echo \"</textarea></form></body></html>\";\n }\n else\n return $rt_val;\n }\n }\n }", "public function callFirstView(){\n\t\t// goi ham lay thong tin tat ca user ra - bat thang model xu ly\n\t\t$user = new UserModel();\n\t\t$listUsers = $user->getListUser();\n\n\t\tinclude 'view/user/list_user.php';\n\t}", "public function setUserDisplay(){\r\n\t\t$this->notifications = $this->controller->getNotificacionesUser();\r\n\t}", "function wpcf_admin_user_profile_load_hook( $user )\n{\n if ( !current_user_can( 'edit_user', $user->ID ) ) {\n return false;\n }\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';\n require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php';\n wpcf_admin_userprofile_init( $user );\n}", "public function qry_single_user_permit_on_application($user_id, $appication_id)\n {\n $stmt = 'Select C_FUNCTION_CODE\n From t_cores_user_function\n Where FK_USER=? And FK_APPLICATION=?';\n $params = array($user_id, $appication_id);\n\n $this->db->debug=0;\n return $this->db->getCol($stmt, $params);\n }", "function logedin_user_display( )\n{\n global $LANG_CROWDTRANSLATOR_1, $_USER;\n $display = \"<div class='translator'>\";\n //plugin info\n $display .= COM_startBlock( \"Plugin info <a id='info' href='javascript:void(0)' onclick='show(this.id)'> (show) </a>\" );\n $display .= \"<div id='info_content' class='hidden'>\" . get_info_text( $LANG_CROWDTRANSLATOR_1[ 'plugin_name' ] ) . \"</div>\";\n $display .= COM_endBlock();\n //stats\n $display .= COM_startBlock( \"Quick Stats\" );\n $display .= \"<table><tbody>\";\n $display .= \"<tr><td>Translated by you: </td> <td>\" . get_translated_count( 0 ) . \"</td> <td>Translations submited: </td> <td>\" . get_translated_count( 1 ) . \"</td> <td> </tr>\";\n $display .= \"<tr><td>Total approvals: </td> <td>\" . get_total_approval_for_user() . \"</td> <td>Total votes: </td> <td>\" . get_votes_count() . \"</td> </tr>\";\n $display .= \"<tr><td>Most upvotes for you: </td> <td> \" . get_most_upvotes( 0 ) . \" </td> <td>Most upvotes: </td> <td> \" . get_most_upvotes( 1 ) . \" </td></tr>\";\n $display .= \"<tr><td>You voted: </td> <td> \" . get_user_votes() . \" </td> </td> <td>Users translating: </td> <td> \" . get_users_translating() . \" </td> </tr>\";\n $display .= \"</table></tbody>\";\n $display .= \"<div id='user_languages_translated' style='clear:both;'>\";\n $display .= get_user_translated_languages( $_USER[ 'uid' ] );\n $display .= \"</div>\";\n $display .= COM_endBlock();\n $display .= COM_startBlock( \"My Badges <a id='info' href='javascript:void(0)' onclick='show(this.id)'> (show all) </a>\" );\n $display .= get_user_badges( 4 );\n $display .= COM_endBlock();\n //translations table\n $translations = get_user_translations_table( 5 );\n $display .= COM_startBlock( \"Your translations\" );\n $display .= \" <div id='user_translations'> {$translations} </div>\";\n $display .= COM_endBlock();\n $display .= \"</div>\";\n return $display;\n}", "abstract function loadUserData();", "protected function _action_user($action)\n {\n // Neu chua dang nhap\n if (!user_is_login()) {\n redirect_login_return();\n }\n\n // Lay thong tin cua thanh vien\n $user = user_get_account_info();\n\n // Chuyen den ham duoc yeu cau\n $this->{'_' . $action}($user);\n }", "function initialUsersLoad ()\n\t{\n\t\t$this->loadNewUsers( true );\n\t}", "function showLoad($tabledefid,$userid,$securitywhere){\r\n\r\n $uuid = getUuid($this->db, \"tbld:5c9d645f-26ab-5003-b98e-89e9049f8ac3\", $tabledefid);\r\n\r\n $querystatement = \"\r\n SELECT\r\n id,\r\n name,\r\n userid\r\n FROM\r\n usersearches\r\n WHERE\r\n tabledefid = '\".$uuid.\"'\r\n AND type='SCH'\r\n AND (\r\n (userid = '' \".$securitywhere.\")\r\n OR userid = '\".$userid.\"')\r\n ORDER BY\r\n userid,\r\n name\";\r\n\r\n $queryresult = $this->db->query($querystatement);\r\n\r\n if(!$queryresult)\r\n $error = new appError(500,\"Cannot retrieve saved search information\");\r\n\r\n $querystatement=\"\r\n SELECT\r\n advsearchroleid\r\n FROM\r\n tabledefs\r\n WHERE id= '\".$tabledefid.\"'\";\r\n\r\n $tabledefresult = $this->db->query($querystatement);\r\n\r\n if(!$tabledefresult)\r\n $error = new appError(500,\"Cannot retrieve table definition information.\");\r\n\r\n $tableinfo=$this->db->fetchArray($tabledefresult);\r\n\r\n ?>\r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr>\r\n <td valign=\"top\">\r\n <p>\r\n <label for=\"LSList\">saved searches</label><br />\r\n <?php $this->showSavedSearchList($queryresult)?>\r\n </p>\r\n </td>\r\n <td valign=\"top\" width=\"100%\">\r\n <p>\r\n <label for=\"LSSelectedSearch\">name</label><br />\r\n <input type=\"text\" id=\"LSSelectedSearch\" size=\"10\" readonly=\"readonly\" class=\"uneditable\" />\r\n </p>\r\n <p>\r\n <textarea id=\"LSSQL\" name=\"LSSQL\" rows=\"8\" cols=\"10\" <?php if(!hasRights($tableinfo[\"advsearchroleid\"])) echo ' readonly=\"readonly\"'?>></textarea>\r\n </p>\r\n </td>\r\n <td valign=\"top\">\r\n <p><br/><input id=\"LSLoad\" type=\"submit\" name=\"command\" class=\"Buttons\" disabled=\"disabled\" value=\"run search\"/></p>\r\n <p><input id=\"LSDelete\" type=\"button\" onclick=\"LSDeleteSearch('<?php echo APP_PATH ?>')\" class=\"Buttons\" disabled=\"disabled\" value=\"delete\"/></p>\r\n <div id=\"LSResults\">&nbsp;</div>\r\n </td>\r\n </tr>\r\n </table>\r\n <?php\r\n\r\n }", "function load($ui_file, $append = true)\r\n {\r\n $UI_file_name = $this->UI_Folder.$this->UI_prefix.'-'.$this->UI_Language.'-'.$ui_file.'.htm';\r\n\r\n #Generate a random ID number in case that's needed...\r\n //include_once('pitchfork-functions-core.php');\r\n $this->random = pitchfork_action_generateString(TRUE, TRUE, TRUE, $length = 4);\r\n\r\n # Decide whether the UI file exists...\r\n if (file_exists($UI_file_name))\r\n {\r\n $UI_file_contents = file_get_contents($UI_file_name);\r\n }\r\n else # If file hasn't been found \r\n {\r\n $this->message_custom(\"Pitchfork cannot find the requested user interface file at <strong>$UI_file_name</strong>\", \"[Pitchfork.Class.UI]\"); //Hardcoded for now\r\n trigger_error(\"Pitchfork: REQUIRED_INTERFACE_FILE_404 [$UI_file_name]\");\r\n $UI_file_contents = \"[pitchfork-class-interface] 404\";\r\n }\r\n\r\n if ($append === true)\r\n {\r\n $this->parse_UI($UI_file_contents, true, $UI_file_name);\r\n }\r\n else\r\n {\r\n return $this->parse_UI($UI_file_contents, false);\r\n }\r\n }", "private function _user($user = null)\n\t{\n\t\t\n\t\t$profile = $this->rest->get('user', array('id' => $user), 'json');\n\t\t\n\t\tif ($this->rest->status() == '404') {\n\t\t\tredirect ('employee/dashboard');\n\t\t}\n\n\t\tadd_js('modules/feeds.js');\t\t\n\t\tadd_js('libs/jquery.timeago.js');\n\t\tadd_js('modules/profile/contact.js');\n\t\t\n\t\tif ($profile->own_profile = ($this->session->userdata('user_id') == $profile->user_id)) {\n\t\t\tadd_js('modules/profile/about.js');\n\t\t\tadd_js('libs/load-image.min.js');\n\t\t\tadd_js('libs/jquery.ui.widget.js');\n\t\t\tadd_js('libs/tmpl.min.js');\n\t\t\tadd_js('libs/jquery.fileupload.js');\n\t\t\tadd_js('libs/jquery.fileupload-fp.js');\n\t\t\t//add_js('libs/jquery.fileupload-ui.js');\n\t\t\tadd_js('libs/jquery.iframe-transport.js');\n\t\t\tadd_js('modules/profile/upload_photo.js');\n\t\t\tadd_js('modules/profile.js');\n\t\t\t\n\t\t\tadd_css('jquery.fileupload-ui.css');\n\t\t}\n\n\n\t\t$this->layout->view('profile', $profile);\t\t\n\t}", "public function loadUser() {\n if ($this->_model === null) {\n if (Yii::app()->user->id) {\n $this->_model = Yii::app()->controller->module->user();\n //\n if ($this->_model->superuser == 0) {\n $this->redirect(Yii::app()->controller->module->logoutUrl);\n }\n }\n if ($this->_model === null)\n $this->redirect(Yii::app()->controller->module->loginUrl);\n }\n return $this->_model;\n }", "function MyProfile_user_main()\r\n{\r\n \t// load handler class\r\n\tLoader::requireOnce('modules/MyProfile/includes/classes/user/main.php');\r\n // Security check\r\n if (!SecurityUtil::checkPermission('MyProfile::', '::', ACCESS_COMMENT)) return LogUtil::registerPermissionError();\r\n\t// Create output and call handler class\r\n\t$render = FormUtil::newpnForm('MyProfile');\r\n\t// Caching settings\r\n $render->caching = false;\r\n // Return the output\r\n return $render->pnFormExecute('myprofile_user_main.htm', new MyProfile_user_ProfileHandler());\r\n}", "protected function userView() {\n if(($iUserID = $this->get('view')) != '') {\n $oUser = new APP_Model_User();\n $user = $oUser->find($iUserID);\n $user['role_name'] = PPI_Helper_User::getRoleNameFromID($user['role_id']);\n $this->adminLoad('admin/user_view', array(\n 'user' => $user,\n 'leftMenu' => true,\n 'pageTitle' => 'View User'\n ));\n }\n }", "function user ($user = \"\")\n {\n\n if(empty($user))\n {\n $this->ERROR = \"POP3 user: no user id submitted\";\n return false;\n }\n if(!isset($this->FP))\n {\n $this->ERROR = \"POP3 user: connection not established\";\n return false;\n }\n $reply = $this->send_cmd(\"USER $user\");\n\n if(!$this->is_ok($reply))\n {\n $this->ERROR = \"POP3 user: Error [$reply]\";\n return false;\n }\n return true;\n }", "function refresh_user_details($id)\n{\n}", "function CB_onBeforeUserUpdate($row, $param2)\r\n\t{\t\r\n\t\tif($row->_cmsUser['id']){\r\n\t\t\t// load the table\r\n\t\t\t$this->old_user =& JTable::getInstance('user');\r\n\t\t\t$this->old_user->load( $row->_cmsUser['id'] );\r\n\t\t}\r\n\t}", "static function activate_user($id_user){\n if(!is_int($id_user))\n return false;\n return self::$PDO->prepare('CALL '.self::$prefix.'activate_user(:id_user)')->execute(array(':id_user'=>$id_user));\n }", "function load(user_id)\n{\n\t// use the user_id to search for and load any records that it matches\n}", "public function ajax_loadAction()\n {\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\n echo json_encode([\n 'status' => 'error',\n 'code' => 'not_logged_in'\n ]);\n exit();\n }\n\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $notifications = Mage::getModel('webspeaks_notifycustomer/notification')\n ->getCustomerNotifications($customer->getData('entity_id'), $count=10, ['title', 'status']);\n\n $notif_html = $this->getLayout()\n ->createBlock('webspeaks_notifycustomer/notification_link')\n ->setData('notifications', $notifications)\n ->setTemplate('webspeaks_notifycustomer/notification/pop-message-item.phtml')\n ->toHtml();\n\n echo json_encode([\n 'status' => 'success',\n 'notif_html' => $notif_html\n ]);\n }", "public function actionAjaxLoadUser($keyword){\n $usersAttributes = User::model()->searchUsersToAssign($keyword);\n $this->renderJSON(array($usersAttributes));\n }", "public function dispatchCall ($params)\r\n {\r\n $req = new GetUserProfileRequestType();\r\n $req->setUserID($params['UserID']);\r\n\t\t\r\n $res = $this->proxy->GetUserProfile($req);\r\n if ($this->testValid($res))\r\n {\r\n $this->dumpObject($res);\r\n return (true);\r\n }\r\n else \r\n {\r\n return (false);\r\n }\r\n }", "public function hookTop(){\n\tglobal $cookie;\n\tif (Context:: getContext()->customer->isLogged()){\n\t include_once(\"LoginRadius.php\");\n\t $secret = trim(Configuration::get('API_SECRET'));\n\t $lr_obj=new LoginRadius();\n\t $userprofile=$lr_obj->loginradius_get_data($secret);\n\t if(isset($_REQUEST['token']) && !empty($userprofile)){\n\t include_once(\"sociallogin_user_data.php\");\n\t LrUser::linking($cookie,$userprofile);\n\t }\n\t if(isset($_REQUEST['id_provider'])) {\n\t $getdata = Db::getInstance()->ExecuteS('SELECT * FROM '.pSQL(_DB_PREFIX_.'customer').' as c WHERE c.email='.\" '$cookie->email' \".' LIMIT 0,1');\n\t $num=(!empty($getdata['0']['id_customer'])? $getdata['0']['id_customer']:\"\");\n\t $deletequery=\"delete from \".pSQL(_DB_PREFIX_.'sociallogin').\" where provider_id ='\".$_REQUEST['id_provider'].\"'\";\n\t Db::getInstance()->Execute($deletequery);\n\t\t$cookie->lrmessage = 'Your Social identity has been removed successfully';\n\t Tools::redirect($_SERVER['HTTP_REFERER']);\n\t }\n\t}\n\tinclude_once(dirname(__FILE__).\"/sociallogin_functions.php\");\n\tif(isset($_REQUEST['token'])){\n\t include_once(\"sociallogin_user_data.php\");\n\t $obj=new LrUser();\n\t}elseif(isset($_REQUEST['SL_VERIFY_EMAIL'])){\n\t verifyEmail();\n\t}elseif(isset($_REQUEST['hidden_val'])){\n\t global $cookie;\n\tif(isset($_POST['LoginRadius']) && $_POST['LoginRadius']==\"Submit\" && ($_REQUEST['hidden_val']==$cookie->SL_hidden) ){\n\t $data=new stdClass;\n\tif(isset($_POST['LoginRadius'])) {\n\t if(isset($_POST['SL_EMAIL'])){ $data->Email=$_POST['SL_EMAIL'];}\n\t if(isset($_POST['SL_CITY'])){ $data->CITY=$_POST['SL_CITY'];}\n\t if(isset($_POST['location-state'])){ $data->STATE=$_POST['location-state'];}\n\t if(isset($_POST['SL_PHONE'])){ $data->PhoneNumbers=$_POST['SL_PHONE'];}\n\t if(isset($_POST['SL_ADDRESS'])){ $data->ADDRESS=$_POST['SL_ADDRESS'];}\n \t if(isset($_POST['SL_ZIP_CODE'])){ $data->ZIPCODE=$_POST['SL_ZIP_CODE'];}\n\t if(isset($_POST['SL_ADDRESS_ALIAS'])){ $data->ADDRESS_ALIAS=$_POST['SL_ADDRESS_ALIAS'];}\n\t if(isset($_POST['location_country'])){ $data->Country=$_POST['location_country'];}\n\t}\n\t$ERROR_MESSAGE=Configuration::get('ERROR_MESSAGE');\n\tif(Configuration::get('user_require_field')==\"1\") {\t\t\n\t if(empty($data->CITY) || empty($data->STATE) || empty($data->PhoneNumbers) || empty($data->ADDRESS) || empty($data->ZIPCODE)|| empty($data->Country) || empty($data->ADDRESS_ALIAS)) {\n\t popUpWindow('<p style=\"color:red; padding:0px;\">'.$ERROR_MESSAGE.'</p>');\n\t return;\n\t }\n\t}\n\tif(isset($data->Email) && !empty($data->Email)){\n\t $email=$data->Email;\n\t} else {\n\t $email= $cookie->Email;\n\t}\n\tif(empty($email) && Configuration::get('EMAIL_REQ')==\"0\" ) {\n\t popUpWindow('<p style=\"color:red; padding:0px;\">'.$ERROR_MESSAGE.'</p>');\n\t return;\n\t}\n\telse if (!Validate::isEmail($email) && Configuration::get('EMAIL_REQ')==\"0\"){\n\t $check=new stdClass;\n\t $check->Email= '';\n\tpopUpWindow('<p style=\"color:red; padding:0px;\">'.$ERROR_MESSAGE.'</p>',$check);\n\t return;\n\t}\n\tif(Configuration::get('user_require_field')==\"1\") {\t\n\t $check=new stdClass;\n\t if(!empty($data->Country) && !empty($data->ZIPCODE)) {\n\t if(isset($data->Email) && !empty($data->Email)){\n\t $check->Email= '';\n\t }\n\t else \n\t $check->Email= $email;\n\t $postcode=trim($data->ZIPCODE);\n\t $zip_code = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'country c WHERE c.iso_code = \"'.$data->Country.'\"');\n \t $zip_code_format=$zip_code['0']['zip_code_format'];\n\t if(!empty($zip_code_format)) {\n\t $zip_regexp = '/^'.$zip_code_format.'$/ui';\n\t $zip_regexp = str_replace(' ', '( |)', $zip_regexp);\n\t $zip_regexp = str_replace('-', '(-|)', $zip_regexp);\n\t $zip_regexp = str_replace('N', '[0-9]', $zip_regexp);\n\t $zip_regexp = str_replace('L', '[a-zA-Z]', $zip_regexp);\n\t $zip_regexp = str_replace('C', $data->Country, $zip_regexp);\n\t if (!preg_match($zip_regexp, $postcode)) {\n\t popUpWindow('<p style=\"color:red; padding:0px;margin-bottom: 3px;\">'.$ERROR_MESSAGE.'</p><p \n\tstyle=\"color: red;margin-bottom: -20px; font-size: 10px;\">Your zip/postal code is incorrect.'.'<br />'.'Must be typed as follows:'.' '.str_replace('C', $data->Country, str_replace('N', '0', str_replace('L', 'A', $zip_code_format))).'</p>',$check);\n\t return;\n\t }\n\t }\n\t }\n\t}\n\tSL_data_save($data);\n\t}else{\n\t $home = getHome();\n\t $msgg=\"Cookie has been deleted, please try again.\";\n\t popup_verify($msgg,$home);\n\t }\n\t}\n }", "public function userLoginDisplay(){\r\n \t \t$this->display();\r\n \t }", "public function getUserPage($f3, $params) {\n $this->tpl = 'profile.php';\n $this->userLike = $this->model->userLikes($params['id']);\n $f3->set('boardsLiked', $this->userLike);\n $this->usersBoard = $this->model->usersBoards($params['id']);\n $f3->set('boardsAdded', $this->usersBoard);\n $f3->set('allCategories', $this->boardsModel->getAllCategories());\n $f3->set('id', $params['id']);\n $f3->set('profilUser', $this->model->userProfil($params['id']));\n if(!null == $f3->get('SESSION')){\n $f3->set('session_id', $f3->get('SESSION')['id']);\n } else {\n $f3->set('session_id', null);\n }\n }", "function loadUserOnLogin($name, $password) {\n \n global $login_error;\n \n $GLOBALS['log']->debug(\"Starting user load for \". $name);\n if(empty($name) || empty($password)) return false;\n \n if(empty($_SESSION['lastUserId'])){\n $user_hash = SugarAuthenticate::encodePassword($password);\n $user_id = $this->authenticateUser($name, $user_hash);\n if(empty($user_id)) {\n $GLOBALS['log']->fatal('SECURITY: User authentication for '.$name.' failed');\n return false;\n }\n }\n \n if(empty($_SESSION['emailAuthToken'])){\n $_SESSION['lastUserId'] = $user_id;\n $_SESSION['lastUserName'] = $name;\n $_SESSION['emailAuthToken'] = '';\n for($i = 0; $i < $this->passwordLength; $i++){\n $_SESSION['emailAuthToken'] .= chr(mt_rand(48,90));\n }\n $_SESSION['emailAuthToken'] = str_replace(array('<', '>'), array('#', '@'), $_SESSION['emailAuthToken']);\n $_SESSION['login_error'] = 'Please Enter Your User Name and Emailed Session Token';\n $this->sendEmailPassword($user_id, $_SESSION['emailAuthToken']);\n return false;\n }else{\n if(strcmp($name, $_SESSION['lastUserName']) == 0 && strcmp($password, $_SESSION['emailAuthToken']) == 0){\n $this->loadUserOnSession($_SESSION['lastUserId']);\n session_unregister('lastUserId');\n session_unregister('lastUserName');\n session_unregister('emailAuthToken');\n return true;\n }\n \n }\n \n $_SESSION['login_error'] = 'Please Enter Your User Name and Emailed Session Token';\n return false;\n }", "protected function loadUserEnvironment()\n {\n global $current_user, $current_language;\n $current_language = $GLOBALS['sugar_config']['default_language'];\n\n // If the session has a language set, use that\n if(!empty($_SESSION['authenticated_user_language'])) {\n $current_language = $_SESSION['authenticated_user_language'];\n }\n\n // get the currrent person object of interest\n $apiPerson = $GLOBALS['current_user'];\n if (isset($_SESSION['type']) && $_SESSION['type'] == 'support_portal') {\n $apiPerson = BeanFactory::getBean('Contacts', $_SESSION['contact_id']);\n }\n // If they have their own language set, use that instead\n if (isset($apiPerson->preferred_language) && !empty($apiPerson->preferred_language)) {\n $current_language = $apiPerson->preferred_language;\n }\n\n $GLOBALS['app_strings'] = return_application_language($current_language);\n $GLOBALS['app_list_strings'] = return_app_list_strings_language($current_language);\n }", "public function initializeUserForCallBackPayPalUser($aPayPalData)\n {\n }", "public function acceptPopup() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('acceptPopup', func_get_args()));\n }", "public function load_data(&$preferences, $userid) {\n return true;\n }", "function execute (&$controller, &$request, &$user)\n\t{\n\t\tglobal $facebook;\n\n\t\t// Standard setup code for every application \"canvas\" page\r\n\t\t$facebook->require_frame();\r\n\t\t$facebook->require_add();\r\n\t\t//$facebook->require_login(); // Redundant with require_add()\r\n\n\t\t// make sure not to use '$user' as the variable!\n\t\t$facebookUser = $facebook->get_loggedin_user();\n\t\t$facebookUserName = GetUserInfo($facebookUser, 'name');\n\t\t\n\t\t// fetching facebook information\n\t\t$userid = (int)Param('user');\r\n\t\tif (!$userid)\r\n\t\t\t$userid = (int)Param('id', $facebookUser); // From the profile-action link\r\n\r\n\t\t$aid = Param('aid');\r\n\t\t$bAdded = ParamIsSet('added');\r\n\t\tif ($bAdded)\n\t\t\tLogLine($facebookUser . ' added ' . FACEBOOK_APPNAME . ' (' . $facebookUserName . ')');\r\n\r\n\t\t$fbmlActionLink = (!FACEBOOK_FISHTANK // Only add a profile action link for the production app \r\n\t\t\t? '<fb:profile-action url=\"' . FACEBOOK_CANVAS_URL . 'Mobilize\">' . FACEBOOK_APPNAME . '</fb:profile-action>'\r\n\t\t\t: '');\r\n\t\t$profileboxurl = FACEBOOK_CALLBACK_URL . 'ProfileBox?user=' . $facebookUser;\r\n\t\t$facebook->api_client->fbml_refreshRefUrl($profileboxurl);\r\n\t\t$fbmlRefUrl = '<fb:ref url=\"' . $profileboxurl . '\" />';\r\n\t\t$facebook->api_client->profile_setFBML($fbmlActionLink . $fbmlRefUrl);\r\n//j\t\t$facebook->api_client->profile_setFBML(null);\r\n\r\n\t\t$userinfo = GetUserInfoEx($userid, 'name, first_name, pic_big, is_app_user, sex');\r\n\t\t$name = $userinfo['name'];\r\n\t\t$firstName = $userinfo['first_name'];\r\n\t\t$picUrl = $userinfo['pic_big'];\r\n\t\tif (!$picUrl) $picUrl = FACEBOOK_DEFAULT_PIC_URL;\r\n\t\t$picUrl .= '?pid=' . $userid;\n\t\t$bIsAppUser = $userinfo['is_app_user'];\r\n\t\t$sex = $userinfo['sex'];\r\n\t\t$hisHerTheir = ''; //j'their';\r\n\t\tif ($sex == 'male') $hisHerTheir = 'his';\r\n\t\tif ($sex == 'female') $hisHerTheir = 'her';\r\n\t\t$himHerThem = ''; //j 'them';\r\n\t\tif ($sex == 'male') $himHerThem = 'him';\r\n\t\tif ($sex == 'female') $himHerThem = 'her';\r\n\t\t$numAlbums = 0;\r\n\t\t$numPhotos = GetNumPhotos($userid, $numAlbums);\r\n\t\t$albumsForDropDown = GetAlbumsForDropDown($userid, $firstName, $aid);\r\n\t\t$arrUsers = GetViewUsersForMobilize(array($userid), false/*$bAddPhotoCount*/, $userid);\r\n\r\n\t\t$facebookSessionKey = (isset($facebook->fb_params['session_key']) ? $facebook->fb_params['session_key'] : '');\n\t\t$openlockerMobilizeUrl = FACEBOOK_OPENLOCKER_URL . 'Mobilize' .\r\n\t\t\t'?FacebookData=' . $facebookUser . ',' . $facebookSessionKey . \r\n\t\t\t'&fromName=' . $facebookUserName .\r\n\t\t\t'&Url=';\r\n\r\n\t\t$usersAjaxUrl = FACEBOOK_CALLBACK_URL . 'UsersAjax' .\r\n\t\t\t'?fb_user=' . $facebookUser . \r\n\t\t\t'&fb_session_key=' . $facebookSessionKey . \r\n\t\t\t'&user=' . $userid .\r\n\t\t\t'&counts=';\r\n\r\n\t\t$thumbsAjaxUrl = FACEBOOK_CALLBACK_URL . 'ThumbsAjax' .\r\n\t\t\t'?fb_user=' . $facebookUser . \r\n\t\t\t'&fb_session_key=' . $facebookSessionKey . \r\n\t\t\t'&user=' . $userid .\r\n\t\t\t'&aid=';\r\n\r\n\t\t// set the request attributes for presenting by the view\n\t\t$request->setAttribute('userid', $userid);\n\t\t$request->setAttribute('name', $name);\n\t\t$request->setAttribute('firstName', $firstName);\n\t\t$request->setAttribute('aid', $aid);\n\t\t$request->setAttribute('picUrl', $picUrl);\n\t\t$request->setAttribute('bAdded', $bAdded);\n\t\t$request->setAttribute('bIsAppUser', $bIsAppUser);\n\t\t$request->setAttribute('hisHerTheir', $hisHerTheir);\n\t\t$request->setAttribute('himHerThem', $himHerThem);\n\t\t$request->setAttribute('openlockerMobilizeUrl', $openlockerMobilizeUrl);\n\t\t$request->setAttribute('usersAjaxUrl', $usersAjaxUrl);\n\t\t$request->setAttribute('thumbsAjaxUrl', $thumbsAjaxUrl);\n\t\t$request->setAttribute('albumsForDropDown', $albumsForDropDown);\n\t\t$request->setAttribute('arrUsers', $arrUsers);\n\n\t\t// returning index view because this is the only view for the Mobilize page\n\t\treturn VIEW_INDEX;\n\t}", "public function action_user()\n\t{\n\t\t$this->g->user('shadowhand');\n\t}", "public function load(array $user = [])\n {\n if (!is_array($user)) {\n throw new \\RuntimeException(\"UserManager::load() expects \\\"$user\\\" to be an array.\");\n }\n\n if (isset($user['u']['u']) && isset($this->_users[User::parseId($user['u']['u'])])) {\n //Return the message AlreadyLoaded.\n return 'AL';\n }\n\n $newUser = $this->_createUser($user);\n\n $this->_users[$newUser['id']] = $newUser;\n\n //Return the message Loaded.\n return 'L';\n }", "function load_promotion_popup($is_mobile, $promotions, $service_type = TOUR, $is_show_background = true){\r\n\r\n\tif(empty($promotions)) return '';\r\n\r\n\t$view_data['show_pro_detail'] = !empty($promotions['id']); // if the input promotion is a single promotion => show detail, not show campain\r\n\r\n\tif($view_data['show_pro_detail'] && empty($promotions['offer_note'])) return '';\r\n\r\n\tif(!empty($promotions['id'])) $promotions = array($promotions); // convert to array of promotion\r\n\r\n\r\n\tforeach ($promotions as $k=>$value){\r\n\r\n\t\tif(empty($value['pro_content'])){\r\n\t\t\t$value['pro_content'] = load_promotion_content($is_mobile, $value, $service_type);\r\n\t\t}\r\n\r\n\t\t$promotions[$k] = $value;\r\n\t}\r\n\r\n\t$view_data['promotions'] = $promotions;\r\n\r\n\t$view_data['is_show_background'] = $is_show_background;\r\n\r\n\t$pro_popup = load_view('common/others/promotion_popup', $view_data, $is_mobile);\r\n\r\n\treturn $pro_popup;\r\n}", "public function on_show_profile($template, $tab_path, $action)\n {\n global $DB;\n\n try {\n $user = $_SESSION[\"user\"];\n\n $list_themes = array(\"default\" => \"Default\");\n $list_date_formats = get_dateformat_list();\n\n $user_data = array(\n \"user\" => $_SESSION[\"user\"],\n \"fullname\" => isset($_POST[\"fullname\"]) ? $_POST[\"fullname\"] : $_SESSION[\"fullname\"],\n );\n\n if (isset($_POST[\"user\"])) {\n\n if ((!empty($_POST[\"old_pwd\"])) || (!empty($_POST[\"pwd\"])) || (!empty($_POST[\"pwd_check\"]))) {\n\n $old_pwhash = hash(\"sha256\", $_POST[\"old_pwd\"]);\n $pwhash = hash(\"sha256\", $_POST[\"pwd\"]);\n\n /* Validate new password */\n if (empty($_POST[\"pwd\"]))\n throw new Exception(\"The new password cannot be empty\");\n\n if (strlen($_POST[\"pwd\"]) < 6)\n throw new Exception(\"The new password must have at least 6 characters\");\n\n if ($_POST[\"pwd\"] != $_POST[\"pwd_check\"])\n throw new Exception(\"The new password do not match\");\n\n /* Validate old password */\n $old_pwhash_db = $DB->exec_query_simple(\n \"SELECT pwhash FROM users WHERE user=?\",\n \"pwhash\", array($user));\n\n if ($old_pwhash_db != $old_pwhash)\n throw new Exception(\"The old password is incorrect.\");\n\n /* Add the password to the fields to update. */\n $user_data[\"pwhash\"] = $pwhash;\n }\n\n $query = $DB->create_query(\"users\");\n $query->where(\"user\", \"=\", $user);\n $query->limit(1);\n\n $query->run_query_update($user_data);\n\n $_SESSION[\"fullname\"] = $user_data[\"fullname\"];\n\n /* Save user config */\n $_SESSION[\"date_format\"] = $_POST[\"date_format\"];\n $_SESSION[\"ui_theme\"] = empty($_POST[\"ui_theme\"]) ? \"default\" : $_POST[\"ui_theme\"];\n save_user_config();\n\n $this->show_messagebox(MESSAGEBOX_INFO, \"Your profile was updated\", false);\n }\n } catch (Exception $e) {\n\n $this->show_messagebox(MESSAGEBOX_ERROR, $e->getmessage(), false);\n }\n\n /* Load template */\n require($template->load(\"profile.tpl\"));\n }", "function pubf_LoadUser($idUser)\n\t{\n\t\t$strSQLoadUser= $this->selectQuery(\"select * from users where idUserWordpress={$idUser}\");\n\t\t\tif($strSQLoadUser && $strSQLoadUser->idUser){\n\t\t\t\t$this->idUsers = $strSQLoadUser->idUser;\n\t\t\t\t$this->birthday = $strSQLoadUser->birthday;\n\t\t\t\t$this->address = $strSQLoadUser->address;\n\t\t\t\t$this->idUserWordpress = $strSQLoadUser->idUserWordpress;\n\t\t\t\t$this->urlProfileImage = $strSQLoadUser->urlProfileImage;\n\t\t\t\t$this->phone = $strSQLoadUser->phone;\n\t\t\t}\n\n\t}", "public function initUser( &$user, $autocreate = false ) {\n\t\t# Override this to do something.\n\t}", "function followlive(){\n\t$cid=$this->input->get('cid');\n\t\n$f_sel=\"SELECT * FROM `userfollowing` uf\n\t\tLEFT JOIN `customermaster` cm ON(cm.`custID`=uf.`cID`)\n\t\tLEFT JOIN `personalphoto` pp ON(pp.`custID` = cm.`custID`)\nWHERE uf.`custID`='$cid' AND uf.`ufNew`='1' ORDER BY uf.`ufid` DESC \";\n$follow_notification = $this->db->query($f_sel);\nif($follow_notification->num_rows() >= 1){\n\t\t\t\t\t\t\t\t$follo_notification=$follow_notification->result_array();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\techo \"<a onclick=popupCenter('\".base_url().\"basicprofile?uid=\".$follo_notification['0']['custID'].\"&f=n','myPop1',450,450); href='javascript:void(0);'><div class='col-md-12 odd' id='first0'><span><img src='../uploads/\";\n\t\t\t\t\tif(ISSET($follo_notification['0']['photo'])){ echo $follo_notification['0']['photo']; } else{ echo \"profile.png\"; }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo \"' alt='User Profile' style='width: 10%;float: left;'/></span>\n\t\t\t\t\t\t\t\t<h4 id='recents'>\".$follo_notification['0']['custName'].\"Follows You</h4>\n\t\t\t\t\t\t\t</div></a>\n\t\t\t\t\t\t\t\t<div class='icon_section'>\n\t\t\t\t\t\t\t\t\t<a class='fa fa-user-plus icon-3x '></a>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\";\n\t\t\t\t\t }else{ \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo \"You Have No Follow Notifications Recently.\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\n}", "public function load() {\r\n\t\treturn 'alert(\"Cannot load into input.\");';\r\n\t}" ]
[ "0.6286082", "0.61060566", "0.6089301", "0.6027647", "0.5904545", "0.54589564", "0.53752124", "0.53517175", "0.533417", "0.5298489", "0.52074975", "0.51855475", "0.51475376", "0.51372045", "0.51038253", "0.50035274", "0.4930683", "0.48815554", "0.4863001", "0.48230842", "0.48197255", "0.47837868", "0.4769985", "0.4725067", "0.4725067", "0.47239074", "0.47146535", "0.47112936", "0.4697493", "0.46809384", "0.46657315", "0.46475634", "0.46462205", "0.46450248", "0.46254563", "0.46245548", "0.461722", "0.46128428", "0.4607832", "0.46070397", "0.46065202", "0.46048018", "0.4596272", "0.45949367", "0.4586435", "0.45824733", "0.45751843", "0.45664227", "0.45661005", "0.45441642", "0.45428064", "0.45360634", "0.45331717", "0.45250052", "0.45149258", "0.45123035", "0.45068634", "0.45038843", "0.44941416", "0.44888324", "0.448226", "0.44820437", "0.44545317", "0.4447188", "0.44422567", "0.44402838", "0.44345105", "0.4430832", "0.44293734", "0.4420817", "0.44105417", "0.44043994", "0.43915746", "0.438602", "0.4376388", "0.43673825", "0.4361096", "0.43524846", "0.4348651", "0.4332098", "0.43320924", "0.4329917", "0.43296075", "0.43295124", "0.4326603", "0.43100917", "0.4307646", "0.43044066", "0.43027583", "0.430196", "0.4301695", "0.42975736", "0.42964843", "0.4293981", "0.42939273", "0.42929476", "0.42920804", "0.42729676", "0.42727134", "0.427122" ]
0.7194398
0
// get_list_email_ajax : get list email when search by textbox
// get_list_email_ajax : получение списка email при поиске по полю ввода
public function get_list_email_ajax() { $strQuery = isset($_GET['query']) ? $_GET['query'] : FALSE; $arrResponse = array( 'query' => '', 'suggestions' => array(), 'data' => array(), ); if($strQuery) { $objFound = $this->contact_model->getEmailListByKeySearch($strQuery); $arrVNGStaffsFound = $this->contact_model->getUserEmailFromVNGStaffList($strQuery); $arrSuggestions = array(); $arrData = array(); if(is_array($objFound)) { foreach($objFound as $row) { $arrSuggestions[] = $row['strfound']; $arrData[] = $row['userid']; } } if(is_array($arrVNGStaffsFound)) { foreach($arrVNGStaffsFound as $row) { if(!in_array($row['strfound'], $arrSuggestions)) { $arrSuggestions[] = $row['strfound']; $arrData[] = $row['id']; } } } //sort($arrSuggestions); $arrResponse = array( 'query' => $strQuery, 'suggestions' => $arrSuggestions, 'data' => $arrData, ); } echo json_encode($arrResponse); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_email(){\n $mailboxes_list = $this->email_listing();\n $email_list = array();\n if(count($mailboxes_list)>0){\n foreach($mailboxes_list as $mailbox){\n array_push($email_list, $mailbox->email);\n }\n }\n //$email_list = get_option($this->option_name);\n $show_list = array();\n if($email_list){\n foreach($email_list as $email){\n $email_split = explode('@', $email);\n $new_email = array('username' => $email_split[0], 'email' => $email);\n array_push($show_list, $new_email);\n }\n }\n return $show_list;\n }", "function emailSearch(Request $request)\n {\n\n $data =\n [\n \"query\" => $request->get('query'),\n \"column\" => 'email',\n \"ajax\" => $request->ajax(),\n ];\n\n $this->ajaxRequestHandler( $data );\n\n }", "public static function getEmailSearchList()\n\t{\n\t\t$cacheKey = 'Mail';\n\t\t$cacheValue = 'EmailSearchList';\n\t\tif (\\App\\Cache::staticHas($cacheKey, $cacheValue)) {\n\t\t\treturn \\App\\Cache::staticGet($cacheKey, $cacheValue);\n\t\t}\n\t\t$return = [];\n\t\t$value = (new \\App\\Db\\Query())->select(['value'])->from('vtiger_ossmailscanner_config')\n\t\t\t->where(['conf_type' => 'emailsearch', 'parameter' => 'fields'])\n\t\t\t->scalar();\n\t\tif (!empty($value)) {\n\t\t\t$return = explode(',', $value);\n\t\t}\n\t\t\\App\\Cache::staticSave($cacheKey, $cacheValue, $return);\n\t\treturn $return;\n\t}", "public function emaillists()\n {\n // DB table to use\n $table = 'emails';\n \n // Table's primary key\n $primaryKey = 'id';\n \n // Array of database columns which should be read and sent back to DataTables.\n // The `db` parameter represents the column name in the database, while the `dt`\n // parameter represents the DataTables column identifier. In this case simple\n // indexes\n $columns = array(\n array( 'db' => 'id', 'dt' => 0 ),\n array( 'db' => 'email', 'dt' => 1 ),\n array( 'db' => 'subject', 'dt' => 2 ),\n array( 'db' => 'messageid', 'dt' => 3 ),\n array( 'db' => 'threadID', 'dt' => 4 ),\n array(\n 'db' => 'created_at',\n 'dt' => 5,\n 'formatter' => function( $d, $row ) {\n return date( 'jS M y', strtotime($d));\n }\n ),\n array(\n 'db' => 'updated_at',\n 'dt' => 6,\n 'formatter' => function( $d, $row ) {\n return ( !empty( $d ) ? date( 'jS M y', strtotime($d)) : '' );\n }\n ),\n );\n\n $this->load->model(\"SSP_model\");\n \n echo json_encode(\n $this->SSP_model::complex( $_GET, $table, $primaryKey, $columns, null, \"reply_of is null\" )\n );\n }", "public function autocompleteAction ()\n {\n $this->_helper->viewRenderer->setNoRender();\n\n $modelUri = $this->_privateConfig->modeluri;\n $accountMail = $this->_owApp->user->getEmail();\n\n $mails = InvitationDB::getInvitationMails($modelUri, $accountMail, $this->_request->q);\n\n foreach($mails as $mail) echo $mail . \"\\n\";\n }", "public function listsForEmail($email) {\n $_params = array(\"email\" => $email);\n return $this->master->call('helper/lists-for-email', $_params);\n }", "public function emailSearch($email_string){\r\n $url = $this->url;\r\n $session_id = $this->session_id;\r\n $search_by_module_parameters = array(\r\n \"session\" => $session_id,\r\n 'search_string' => $email_string,\r\n 'modules' => array(\r\n 'Accounts',\r\n 'Contacts',\r\n 'Leads',\r\n ),\r\n 'offset' => 0,\r\n 'max_results' => 1,\r\n 'assigned_user_id' => '',\r\n 'select_fields' => array('id'),\r\n 'unified_search_only' => false,\r\n 'favorites' => false\r\n );\r\n $search_by_module_results = $this->myCall('search_by_module', $search_by_module_parameters, $url);\r\n $record_ids = array();\r\n\r\n foreach ($search_by_module_results->entry_list as $results){\r\n $module = $results->name;\r\n foreach ($results->records as $records){\r\n foreach($records as $record){\r\n if ($record->name = 'id'){\r\n $record_ids[$module][] = $record->value;\r\n //skip any additional fields\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $get_entries_results = array();\r\n $modules = array_keys($record_ids);\r\n\r\n foreach($modules as $module){\r\n $get_entries_parameters = array(\r\n 'session' => $session_id,\r\n 'module_name' => $module,\r\n 'ids' => $record_ids[$module],\r\n 'select_fields' => array(\r\n 'id',\r\n\t\t\t 'first_name',\r\n 'name',\r\n 'case_number',\r\n 'status',\r\n\t\t\t 'custnum_c',\r\n\t\t\t 'phone_home',\r\n\t\t\t 'email1',\r\n ),\r\n //A list of link names and the fields to be returned for each link name\r\n 'link_name_to_fields_array' => array(\r\n array(\r\n 'name' => 'home_phone',\r\n 'value' => array(\r\n 'email_address',\r\n 'opt_out',\r\n 'primary_address'\r\n ),\r\n ),\r\n ),\r\n //Flag the record as a recently viewed item\r\n 'track_view' => false);\r\n $get_entries_results[$module] = $this->myCall('get_entries', $get_entries_parameters, $url);\r\n\t\t $get_entries_results=$get_entries_results[$module];\r\n\r\n\t if (!count($get_entries_results)){\r\n\t\t\t return 0;\r\n\t\t }else{\r\n\t\t return $get_entries_results;\r\n\t }\r\n }\r\n }", "public function searchByEmail(Request $request)\n {\n $email = $request->input('searchByEmail');\n \n $contacts = Contact::orderBy('created_at', 'desc')->where([['email', $email]])->paginate(15); \n\n JavaScript::put([ \n 'contacts' => $contacts, \n ]);\n \n return view('pages.admin.contacts.list_contact_messages')->with(['contacts'=>$contacts]);\n }", "public function send_email_list(){\n \tif(Request::ajax()){\n $items_array = Input::get('user_emails');\n $data = $this->getSendMailInfo();\n\n foreach($items_array as $item) {\n $this->send_email($item, $data);\n }\n\n return Response::json('success');\n }\n }", "public function customizer_fetch_email_list()\n {\n check_ajax_referer('customizer-fetch-email-list', 'security');\n\n if ( ! current_user_has_privilege()) {\n exit;\n }\n\n $connect = sanitize_text_field($_REQUEST['connect_service']);\n\n $email_list = ConnectionsRepository::connection_email_list($connect);\n\n wp_send_json_success($email_list);\n\n wp_die();\n }", "public function email_listing(){\n return $this->mailbox->list_mail();\n }", "private function ajax_dowhitelist($email) {\n\t\tglobal $wpdb;\n\t\t$current_user_id = get_current_user_id();\n\t\t$cmpMailAcc=$wpdb->prefix . 'mgremailwhitelist_companymailaccounts';\n\t\t$cmpAdmins =$wpdb->prefix . 'mgremailwhitelist_companyadmins';\n\t\t$check=$wpdb->get_var(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\t\tSELECT email_id\n\t\t\t\t\tFROM $cmpMailAcc, $cmpAdmins\n\t\t\t\t\tWHERE $cmpMailAcc.company_id = $cmpAdmins.company_id\n\t\t\t\t\tAND $cmpAdmins.wp_userid = $current_user_id\n\t\t\t\t\tAND email_id = %s\n\t\t\t\t\",array($email)\n\t\t\t)\n\t\t);\n\n\t\tif ($check!=$email) return \"Unknown Error\";\n\n\t\t$folder='/home/fungusat/tmp/emailWhitelist';\n\t\t$fname=tempnam($folder,'emailWhitelist');\n\t\tfile_put_contents($fname,$email);\n\t\treturn 'In one minute: EMail '.$email.' whitelisted!';\n\t}", "function listsForEmail($email_address) {\n $params = array();\n $params[\"email_address\"] = $email_address;\n return $this->callServer(\"listsForEmail\", $params);\n }", "public function contactEmailAction()\n {\n $searchText = $this->get('request')->query->get('query');\n $organizationId = $this->get('request')->query->get('organizationId');\n //$phoneType = $this->get('request')->query->get('phoneType');\n\n /** @var \\SD\\UserBundle\\Entity\\UserRepository $repository */\n $repository = $this->getDoctrine()->getRepository('ListsContactBundle:ModelContact');\n\n $objects = $repository->getSearchEmailQuery(trim($searchText), $organizationId)\n ->getQuery()\n ->getResult();\n\n $result = array();\n\n $result[] = array(\n 'id' => $searchText,\n 'value' => $searchText,\n 'name' => $searchText,\n 'text' => $searchText\n );\n\n foreach ($objects as $object) {\n $this->processModelContactForJson($object, array('email'));\n\n $result[] = $this->serializeArray($object);\n }\n\n return new Response(json_encode($result));\n }", "public function StudentCheckEmail()\n\t{\n\t\tif ($this->input->is_ajax_request())\n\t\t{\n\t\t\t$emailid = $this->input->post('emailid');\n\n\t\t\t$Result = $this->frontend->check_if_email_exists($emailid);\t\n\t\t\t\n\t\t\techo $Result;\n \t}\n\t}", "public function getemail()\n {\n $emails= Todo::paginate(5);\n $html = view('email.listado', compact('emails'))->render();\n return response()->json(compact('html'));\n }", "public function getSerialisedUserEmailsAction(){\n \n $searchString = $this->_request->getParam('q');\n $fromDate = $this->_request->getParam('fromDate');\n $toDate = $this->_request->getParam('toDate');\n $userFilter = $this->_request->getParam('chkUserFilter');\n \n $chapId = Zend_Auth::getInstance()->getIdentity()->id;\n \n $modelUser = new Pbo_Model_User();\n $userMobile = $modelUser->getRegUserMobile($chapId, $searchString, strtoupper($userFilter), $fromDate, $toDate);\n \n echo json_encode($userMobile);\n die();\n }", "public function userEmailAction()\n {\n $searchText = $this->get('request')->query->get('query');\n\n /** @var \\SD\\UserBundle\\Entity\\UserRepository $repository */\n $repository = $this->container->get('sd_user.repository');\n\n $objects = $repository->getOnlyStuff()\n ->andWhere('lower(u.email) LIKE :q')\n ->setParameter(':q', mb_strtolower($searchText, 'UTF-8') . '%')\n ->getQuery()\n ->getResult();\n\n $result = array();\n\n foreach ($objects as $object) {\n $result[] = $this->serializeObject($object, false, 'getEmail');\n }\n\n return new Response(json_encode($result));\n }", "public function get_from_email();", "public function getUserContactsEmail($params)\r\n {\r\n $ret = array();\r\n \r\n $dbh = $this->ant->dbh;\r\n $objList = new CAntObjectList($dbh, \"contact_personal\", $this->user);\r\n $objList->pullMinFields = array(\"first_name\", \"last_name\", \"company\", \"email\", \"email2\", \"email_spouse\");\r\n $objList->addCondition(\"and\", \"user_id\", \"is_equal\", $this->user->id);\r\n\t\tif ($params['search'])\r\n\t\t{\r\n\t\t\t$objList->addCondition(\"and\", \"email\", \"contains\", $params['search']);\r\n\t\t\t$objList->addCondition(\"or\", \"email2\", \"contains\", $params['search']);\r\n\t\t\t$objList->addCondition(\"or\", \"first_name\", \"contains\", $params['search']);\r\n\t\t\t$objList->addCondition(\"or\", \"last_name\", \"contains\", $params['search']);\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($params['search'])\r\n \t$objList->addConditionText($params['search']);\r\n\t\t */\r\n\t\t$objList->forceFullTextOnly = true;\r\n $objList->getObjects();\r\n $num = $objList->getNumObjects();\r\n for ($i = 0; $i < $num; $i++)\r\n {\r\n $obj = $objList->getObjectMin($i);\r\n \r\n\t\t\t$name = \"\";\r\n\r\n\t\t\tif ($obj['first_name'] || $obj['last_name'])\r\n\t\t\t{\r\n\t\t\t\t$name = \"\\\"\" . $obj['first_name'] .\" \". $obj['last_name'].\"\\\" \";\r\n\t\t\t}\r\n\t\t\telse if ($obj['company'])\r\n\t\t\t{\r\n\t\t\t\t$name = \"\\\"\" . $obj['company'] .\"\\\" \";\r\n\t\t\t}\r\n\r\n if ($obj['email'])\r\n $ret[] = $name.\"<\".$obj['email'].\">\";\r\n \r\n if ($obj['email2']) \r\n $ret[] = $name.\"<\".$obj['email2'].\">\";\r\n \r\n if ($obj['email_spouse'])\r\n $ret[] = $name.\"<\".$obj['email_spouse'].\">\";\r\n }\r\n\r\n\t\t// Add users\r\n $objList = new CAntObjectList($dbh, \"user\", $this->user);\r\n $objList->pullMinFields = array(\"full_name\", \"email\");\r\n $objList->addCondition(\"and\", \"active\", \"is_equal\", \"t\");\r\n $objList->addCondition(\"and\", \"id\", \"is_greater\", 0);\r\n\t\tif ($params['search'])\r\n\t\t{\r\n\t\t\t$objList->addCondition(\"and\", \"email\", \"contains\", $params['search']);\r\n\t\t\t$objList->addCondition(\"or\", \"email2\", \"contains\", $params['search']);\r\n\t\t\t$objList->addCondition(\"or\", \"full_name\", \"contains\", $params['search']);\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($params['search'])\r\n \t$objList->addConditionText($params['search']);\r\n\t\t*/\r\n\t\t$objList->forceFullTextOnly = true;\r\n $objList->getObjects();\r\n $num = $objList->getNumObjects();\r\n for ($i = 0; $i < $num; $i++)\r\n {\r\n\t\t\t$obj = $objList->getObjectMin($i);\r\n\r\n\t\t\tif ($obj['email'])\r\n $ret[] = '\"' . $obj['full_name'] . '\"' . \" <\".$obj['email'].\">\";\r\n\r\n\t\t}\r\n \r\n $ret = array_unique($ret);\r\n \r\n $this->sendOutputJson($ret);\r\n return $ret;\r\n }", "function get_mymail_data(){\n\t\t\n\t\t\t$connected = false;\n\t\t\tob_start();\n\n\t\t\t$lists = mymail('lists')->get();\n ?>\n <div class=\"bsf-cnlist-form-row <?php echo $this->slug; ?>-list\">\n\t\t \t<?php\n\t\t\tif( !empty( $lists ) ) {\n\t\t\t?>\n\t\t\t\t<label for=\"<?php echo $this->slug; ?>-list\"><?php echo __( \"Select List\", \"smile\" ); ?></label>\n\t\t\t\t<select id=\"<?php echo $this->slug; ?>-list\" class=\"bsf-cnlist-select\" name=\"<?php echo $this->slug; ?>-list\">\n\t\t\t<?php\n\t\t\t\tforeach( $lists as $l ) {\n\t\t\t?>\n\t\t\t\t\t<option value=\"<?php echo $l->ID; ?>\"><?php echo $l->name; ?></option>\n\t\t\t<?php\n\t\t\t\t}\n\t\t\t?>\n\t\t\t\t</select>\n\t\t\t<?php\n\t\t\t} else {\n\t\t\t?>\n\t\t\t\t<label for=\"<?php echo $this->slug; ?>-list\"><?php echo __( \"You need at least one list added in \" . $this->setting['name'] . \" before proceeding.\", \"smile\" ); ?></label>\n\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t </div>\n\t\t <div class=\"bsf-cnlist-form-row\"> </div>\n\n <?php\n $content = ob_get_clean();\n $result['data'] = $content;\n $result['helplink'] = $this->setting['where_to_find_url'];\n $result['isconnected'] = $connected;\n echo json_encode($result);\n exit();\n }", "function getEmail() {\n\tif(isset($_POST['email']) && $_POST['email'] != \"\") {\n\t\t$email_array = $_POST['email'];\n\t\t$count = count($email_array);\n\t\tif(isset($_POST['liz'])) {\n\t\t\t$liz = $_POST['liz'];\n\t\t\t\n\t\t\tfor($e = 0; $e < $count; $e++) {\n\t\t\t\tprint $email_array[$e];\n\t\t\t\tif(isset($liz) && $liz != \"\") {\n\t\t\t\t\tprint $liz;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public function get_emails()\n {\n }", "function _get_paypal_emails()\n {\n $this->load->helper('email');\n\n // Lay input\n $value = $this->input->post('paypal_emails');\n $value = explode(\"\\n\", $value);\n\n // Lay gia tri\n $list = array();\n foreach ($value as $v) {\n $v = trim($v);\n if (valid_email($v)) {\n $list[] = $v;\n }\n }\n $list = array_unique($list);\n\n return $list;\n }", "public function get_verified_email_list(){\r\n \t$response = $this->ses->listVerifiedEmailAddresses();\r\n \techo json_encode($response);\t\r\n }", "function getMails()\n\t\t{\n\t\t\t$result = $this->mysql->query(\"select * from mail\");\n\t\t\t\n\t\t}", "function church_admin_email_list()\n{\n\tglobal $wpdb;\n\t$items=$wpdb->get_var('SELECT COUNT(*) FROM '.CA_EBU_TBL.' WHERE recipients!=\"\"' );\n\trequire_once(plugin_dir_path(dirname(__FILE__)).'includes/pagination.class.php');\n if($items > 0)\n {\n\t\n\t$p = new pagination;\n\t$p->items($items);\n\t$p->limit(get_option('church_admin_page_limit')); // Limit entries per page\n\t$p->target(\"admin.php?page=church_admin/index.php&tab=communications&action=email_list\");\n\tif(!isset($p->paging))$p->paging=1; \n\tif(!isset($_GET[$p->paging]))$_GET[$p->paging]=1;\n\t$p->currentPage((int)$_GET[$p->paging]); // Gets and validates the current page\n\t$p->calculate(); // Calculates what to show\n\t$p->parameterName('paging');\n\t$p->adjacents(1); //No. of page away from the current page\n\tif(!isset($_GET['paging']))\n\t{\n\t $p->page = 1;\n\t}\n\telse\n\t{\n\t $p->page = intval($_GET['paging']);\n\t}\n //Query for limit paging\n\t$limit = esc_sql(\"LIMIT \" . ($p->page - 1) * $p->limit . \", \" . $p->limit);\n $result=$wpdb->get_results('SELECT * FROM '.CA_EBU_TBL.' WHERE recipients!=\"\" ORDER BY send_date DESC '.$limit );\n\tif(!empty($result))\n\t{\n\t\techo'<h2>'.__('Sent Emails','church-admin').'</h2><table class=\"widefat striped\"><thead><tr><th>'.__('Delete','church-admin').'</th><th>'.__('Date','church-admin').'</th><th>'.__('Number of recipients','church-admin').'</th><th>'.__('Subject','church-admin').'</th><th>'.__('Excerpt','church-admin').'</th><th>'.__('Resend','church-admin').'?</th><th>'.__('Resend to new recipients','church-admin').'</th><th>'.__('Edit and resend','church-admin').'</th></tr></thead><tfoot><tr><th>'.__('Delete','church-admin').'</th><th>'.__('Date','church-admin').'</th><th>'.__('Number of recipients','church-admin').'</th><th>'.__('Subject','church-admin').'</th><th>'.__('Excerpt','church-admin').'</th><th>'.__('Resend','church-admin').'?</th><th>'.__('Resend to new recipients','church-admin').'</th><th>'.__('Edit and resend','church-admin').'</th></tr></tfoot><tbody>';\n\t\tforeach($result AS $row)\n\t\t{\n\t\t\t$startsAt = strpos($row->message, \"<!--salutation-->\") + strlen(\"{FINDME}\");\n\t\t\t$endsAt = strpos($row->message, \"<!--News,events-->\", $startsAt);\n\t\t\t$message = strip_tags(substr($row->message, $startsAt+17, $endsAt - $startsAt));\n\t\t\t$message=substr($message,0,500);\n\t\t\t$delete='<a onclick=\"return confirm(\\''.__('Are you sure?','church-admin').'\\');\" href=\"'.wp_nonce_url('admin.php?page=church_admin/index.php&tab=communications&action=delete_email&email_id='.intval($row->email_id),'delete_email').'\">Delete</a>';\n\t\t\t$resend='<a onclick=\"return confirm(\\''.__('Are you sure?','church-admin').'\\');\" href=\"'.wp_nonce_url('admin.php?page=church_admin/index.php&tab=communications&action=resend_email&email_id='.intval($row->email_id),'resend_email').'\">Resend to previous recipients</a>';\n\t\t\t$new='<a href=\"'.wp_nonce_url('admin.php?page=church_admin/index.php&tab=communications&action=resend_new&email_id='.intval($row->email_id),'resend_new').'\">'.__('Resend to new recipients','church-admin').'</a>';\n\t\t\t$reedit='<a href=\"'.wp_nonce_url('admin.php?page=church_admin/index.php&tab=communications&action=edit_resend&email_id='.intval($row->email_id),'resend_new').'\">'.__('Edit and send','church-admin').'</a>';\n\t\t\t\n\t\t\techo'<tr><td>'.$delete.'</td><td>'.mysql2date(get_option('date_format'),$row->send_date).'</td><td>'.count(maybe_unserialize($row->recipients)).'</td><td>'.$row->subject.'</td><td>'.$message.'</td><td>'.$resend.'</td><td>'.$new.'</td><td>'.$reedit.'</td></tr>';\n\t\t}\n\t}\n\t}\n}", "public function actionAjaxVideoGetUsers() {\r\n\r\n $this->layout = null;\r\n $email = trim($_GET['term']);\r\n $criteria = new CDbCriteria();\r\n $criteria->addSearchCondition('username', $email, true);\r\n $users = eUser::model()->findAll($criteria);\r\n $rows = array();\r\n\r\n if ($users) {\r\n foreach ($users as $u) {\r\n $rows[] = array('label' => $u->username,\r\n 'id' => $u->id);\r\n }\r\n }\r\n\r\n echo json_encode($rows);\r\n }", "public function emailFetch() {\n\t\t$json = array();\n\n\t\t$this->language->load('ticketsystem/emails');\n\n\t\tif ($this->request->server['REQUEST_METHOD'] == 'POST' AND isset($this->request->post['id'])) {\n\t\t\ttry{\n\t\t\t\t$json = $this->TsLoader->TsFetchEmail->emailFetch($this->request->post['id']);\n\t\t\t}catch(\\Exception $e){\n\t\t\t\t$json['error'] = $e->getMessage();\n\t\t\t}\n\t\t}\n\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "public function searchEmailInBanlist($email)\n {\n $data = [\n 'user_email' => $email,\n ];\n\n // send request to guardian service api\n $result = $this->callAPI('search_in_ban', $data);\n\n return $result;\n }", "public function Ajax_checkMailExist(){\n $data = $this->Zeanni->checkMailExist();\n echo json_encode($data);\n }", "public function actionListInvitesByUser()\n {\n $email = Yii::$app->request->get('email');\n return $this->renderPartial('listInvitesByUser', [\n 'email' => $email\n ]);\n }", "protected function emailList() {\n $user = $this->getLoggedInUser();\n if($user == null) {\n $emailCallbackURL = urlencode(WEB_DOMAIN.\"api/web/emailList?\".$_SERVER['QUERY_STRING']);\n $githubCallbackURL = urlencode(WEB_DOMAIN.\"api/web/user?githubCallback=1&redirectURL={$emailCallbackURL}\");\n header(\"Location: https://github.com/login/oauth/authorize?scope=user:email&client_id=2b713362b2f331e1dde3&redirect_uri={$githubCallbackURL}\");\n }\n\n if(isset($_GET['unsubscribe'])) {\n $this->insert(\"UPDATE User SET onEmailList=0 WHERE userID = {$user['userID']}\");\n header(\"Location: ../../index.php?unsubscribeEmails=1\");\n } else if(isset($_GET['subscribe'])) {\n $this->insert(\"UPDATE User SET onEmailList=1 WHERE userID = {$user['userID']}\");\n header(\"Location: ../../index.php?subscribeEmails=1\");\n } \n\n die();\n }", "function getRecipientList() {\n\t//return array('jithinkr@gmail.com','mradul88@gmail.com');\n\treturn file('mailinglisthexa');\n}", "public function get_to_email();", "public function ajaxList()\n {\n $get = $this->page->request->get;\n list($total_length, $result_length, $result) = $this->model->getAjaxListData($get);\n\n $output = array(\n 'sEcho' => intval($get->sEcho),\n 'iTotalRecords' => $total_length,\n 'iTotalDisplayRecords' => $result_length,\n 'aaData' => $result,\n );\n\n $this->jsonOutput($output);\n }", "public function actionSuggestEmail()\n\t{\n\t\tif(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')\n\t\t{\n\t\t\t$titles=Order::model()->suggestEmail($keyword);\n\t\t\tif($titles!==array())\n\t\t\t\techo implode(\"\\n\",$titles);\n\t\t}\n\t}", "public function checkEmailCredit()\n {\n $userSuggest = array();\n $Sentence = 'select * from userinfo where Name like \"%'.$_GET['email'].'%\" OR Email like \"%'.$_GET['email'].'%\"';\n $users = DB::select(DB::raw($Sentence));\n foreach($users as $user){\n $imshi = array();\n $imshi = array($user->Name,$user->Email,$user->userPK,$user->ProfilePhotoURL);\n array_push($userSuggest,$imshi);\n }\n\n die(json_encode($userSuggest));\n }", "public function find( $email, $listID ) {\n\t\t$response = $this->query( 'listGetContacts', $this->token, $listID, $email, 1, 100, 'name', 'asc' );\n\t\treturn $response;\n\t}", "public function autocomplete(){\n\n\n $term = Str::lower(Input::get('term'));\n $data = User::where('email', 'LIKE', '%'.$term.'%')\n ->take(5)->get();\n\n foreach ($data as $k => $v) {\n\n $return_array[] = array( 'id' => $v->id, 'value' => $v->email );\n\n }\n return Response::json($return_array);\n }", "public static function getList()\n\t{\n\t\tstatic $list = null;\n\t\tif (is_array($list))\n\t\t{\n\t\t\treturn $list;\n\t\t}\n\n\t\t$user = UserTable::getList(array(\n\t\t\t'select' => array('EMAIL'),\n\t\t\t'filter' => array(\n\t\t\t\t'=ID' => array_slice(\\CGroup::getGroupUser(1), 0, 200),\n\t\t\t\t'=ACTIVE' => 'Y'\n\t\t\t),\n\t\t\t'limit' => 1\n\t\t))->fetch();\n\n\t\tif ($user && $user['EMAIL'])\n\t\t{\n\t\t\t$email = $user['EMAIL'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$email = Option::get('main', 'email_from', '');\n\t\t}\n\n\t\t$list = array();\n\t\t$intl = array(\n\t\t\t'ru' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'ua' => array(\n\t\t\t\t'PHRASES' => array(),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'kz' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'by' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$messageMap = array(\n\t\t\t'AGREEMENT_TEXT' => 'MAIN_USER_CONSENT_INTL_TEXT',\n\t\t\t'LABEL_TEXT' => 'MAIN_USER_CONSENT_INTL_LABEL',\n\t\t\t'FIELDS_HINT' => 'MAIN_USER_CONSENT_INTL_FIELDS_HINT',\n\t\t\t'DESCRIPTION' => 'MAIN_USER_CONSENT_INTL_DESCRIPTION',\n\t\t\t'NOTIFY_TEXT' => 'MAIN_USER_CONSENT_INTL_NOTIFY_TEXT',\n\t\t);\n\t\t$languages = self::getLanguages();\n\t\tforeach ($languages as $languageId => $languageName)\n\t\t{\n\t\t\t$item = self::getLanguageMessages($languageId, $messageMap);\n\t\t\tif (!$item['AGREEMENT_TEXT'])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item['NAME'] = Loc::getMessage('MAIN_USER_CONSENT_INTL_NAME', array('%language_name%' => $languageName));\n\t\t\t$item['BASE_LANGUAGE_ID'] = isset(self::$virtualLanguageMap[$languageId]) ? self::$virtualLanguageMap[$languageId] : $languageId;\n\t\t\t$item['LANGUAGE_ID'] = $languageId;\n\t\t\t$item['LANGUAGE_NAME'] = $languageName;\n\n\t\t\t$item['PHRASES'] = array();\n\t\t\tif (isset($intl[$languageId]['PHRASES']))\n\t\t\t{\n\t\t\t\t$phraseMap = array();\n\t\t\t\tforeach ($intl[$languageId]['PHRASES'] as $phraseCode)\n\t\t\t\t{\n\t\t\t\t\t$phraseMap[$phraseCode] = \"MAIN_USER_CONSENT_INTL_PHRASE_{$phraseCode}\";\n\t\t\t\t}\n\t\t\t\t$item['PHRASES'] = self::getLanguageMessages($languageId, $phraseMap);\n\t\t\t}\n\n\t\t\t$item['FIELDS'] = array();\n\t\t\tif (isset($intl[$languageId]['FIELDS']))\n\t\t\t{\n\t\t\t\tforeach ($intl[$languageId]['FIELDS'] as $field)\n\t\t\t\t{\n\t\t\t\t\t$messageFieldsMap = array(\n\t\t\t\t\t\t'CAPTION' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}\",\n\t\t\t\t\t\t'PLACEHOLDER' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}_HINT\",\n\t\t\t\t\t\t'DEFAULT_VALUE' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}_DEFAULT\",\n\t\t\t\t\t);\n\n\t\t\t\t\t$field = $field + self::getLanguageMessages($languageId, $messageFieldsMap);\n\t\t\t\t\tif ($field['TYPE'] == 'text' && $field['DEFAULT_VALUE'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$field['PLACEHOLDER'] .= \"\\n\" . Loc::getMessage('MAIN_USER_CONSENT_INTL_HINT_FIELD_DEFAULT');\n\t\t\t\t\t\t$field['PLACEHOLDER'] .= \"\\n\" . $field['DEFAULT_VALUE'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$item['FIELDS'][] = $field;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$list[] = $item;\n\t\t}\n\n\t\treturn $list;\n\t}", "public static function ach_ajax_callback_email()\n {\n if (wp_verify_nonce($_REQUEST['security'], 'ach_email')) {\n if ($_REQUEST['email']) {\n $success = self::ach_store_email($_REQUEST['email']);\n if ($success) {\n return wp_send_json(array( 'success' => true, 'email' => $_REQUEST['email']));\n }\n return wp_send_json_error('Invalid email provided');\n }\n }\n wp_send_json_error('Invalid nonce');\n }", "function contact()\n{\n\tglobal $option, $mainframe;\n\t$db =& JFactory::getDBO();\n\t$context\t\t\t= 'com_wnewsletter.showcontact';\t\n\t$search\t\t\t\t= $mainframe->getUserStateFromRequest( $context.'search',\t\t\t'search',\t\t\t'',\t'string' );\n\t$search\t\t\t\t= JString::strtolower($search);\n\n\tif ($search) {\t\t\n\t\t$where = ' WHERE (LOWER( s.name ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) .\n\t\t\t' OR LOWER( c.company ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) . ')';\n\t}\n\t\n\t$limit = JRequest::getVar('limit',$mainframe->getCfg('list_limit'));\n\t$limitstart = JRequest::getVar('limitstart', 0);\n\t$db =& JFactory::getDBO();\n\t$query = \"SELECT count(*) FROM #__w_newsletter_contacts \". $where;\n\t$db->setQuery( $query );\n\t$total = $db->loadResult();\n\t$query = \"SELECT c.*, s.name FROM #__w_newsletter_contacts as c\n\tINNER JOIN #__w_newsletter_subscribers as s \n\tON c.subscriber_id = s.id\n\t \". $where;\n\t$db->setQuery( $query, $limitstart, $limit );\n\t$rows = $db->loadObjectList();\n\tif ($db->getErrorNum()) {\n\techo $db->stderr();\n\treturn false;\n}\njimport('joomla.html.pagination');\n$pageNav = new JPagination($total, $limitstart, $limit);\nHTML_newsletter::showContact( $option, $rows, $pageNav );\n}", "function rechercheAnciensEmail($T, $cnx)\n{\n\tif ( trim($T[\"email1\"]) == \"\" ) {\n\t\treturn 0 ;\n\t}\n\t$req = \"SELECT id_ancien FROM anciens WHERE courriel LIKE '%\"\n\t\t. mysqli_real_escape_string($cnx, trim($T[\"email1\"]))\n\t\t.\"%'\" ;\n\t$res = mysqli_query($cnx, $req) ;\n\n\t$ids_ancien = array() ;\n\twhile ( $enr = mysqli_fetch_assoc($res) ) {\n\t\t$ids_ancien[] = $enr[\"id_ancien\"] ;\n\t}\n\treturn $ids_ancien ;\n}", "function ajaxList() {\r\n $this->rdAuth->noStudentsAllowed();\r\n // Set up the list\r\n $this->setUpAjaxList();\r\n // Process the request for data\r\n $this->AjaxList->asyncGet();\r\n }", "function get_user_info_by_email() {\n $UriArray = $this->uri->uri_to_assoc(3);\n $post_array = $this->input->post();\n $email = $this->common_lib->getParameter($this, $UriArray, $post_array, 'email');\n $client_id = $this->common_lib->getParameter($this, $UriArray, $post_array, 'client_id');\n if ( empty($email) ) {\n $this->output->set_content_type('application/json')->set_output(json_encode(array('ErrorMessage' => 'Invalid parameters !', 'ErrorCode' => 1, 'ret' => 0 )));\n return;\n }\n $user = $this->users_mdl->getSimilarUserByEmail( $email );\n $groupsList = $this->users_mdl->getGroupsSelectionList(array(), 'id', 'asc', ['sys-admin']);\n if ( !empty($user) ) {\n $userGroupsList = $this->users_mdl->getUsersClientsList( false, 0, array('user_id'=>$user->id, 'client_id'=>$client_id) );\n foreach( $groupsList as $next_key=>$nextGroup) {\n foreach( $userGroupsList as $nextUserGroup) {\n if ( $nextGroup['key'] == $nextUserGroup->uc_group_id ) {\n unset($groupsList[$next_key]);\n break;\n }\n }\n }\n }\n $this->output->set_content_type('application/json')->set_output(json_encode(array('ErrorMessage' => '', 'ErrorCode' => (empty($user) ? 1 : 0), 'user' => $user, 'groupsList'=> $groupsList , 'groups_length'=> count($groupsList) )));\n }", "function getEmailListing($options, $current_row = 0, $max = 5)\n {\n $prj_id = Auth::getCurrentProject();\n $usr_id = Auth::getUserID();\n if ($max == \"ALL\") {\n $max = 9999999;\n }\n $start = $current_row * $max;\n\n $stmt = \"SELECT\n sup_id,\n sup_ema_id,\n sup_iss_id,\n sup_customer_id,\n sup_from,\n sup_date,\n sup_to,\n sup_subject,\n sup_has_attachment\n FROM\n (\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"support_email,\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"email_account\";\n if (!empty($options['keywords'])) {\n $stmt .= \",\" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"support_email_body\";\n }\n $stmt .= \"\n )\n LEFT JOIN\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue\n ON\n sup_iss_id = iss_id\";\n $stmt .= self::buildWhereClause($options);\n $stmt .= \"\n ORDER BY\n \" . Misc::escapeString($options[\"sort_by\"]) . \" \" . Misc::escapeString($options[\"sort_order\"]);\n $total_rows = Pager::getTotalRows($stmt);\n $stmt .= \"\n LIMIT\n \" . Misc::escapeInteger($start) . \", \" . Misc::escapeInteger($max);\n $res = DB_Helper::getInstance()->getAll($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return array(\n \"list\" => \"\",\n \"info\" => \"\"\n );\n }\n\n if (count($res) < 1 && $current_row > 0) {\n // if there are no results, and the page is not the first page reset page to one and reload results\n Auth::redirect(\"emails.php?pagerRow=0&rows=$max\");\n }\n\n if (Customer::hasCustomerIntegration($prj_id)) {\n $customer_ids = array();\n for ($i = 0; $i < count($res); $i++) {\n if ((!empty($res[$i]['sup_customer_id'])) && (!in_array($res[$i]['sup_customer_id'], $customer_ids))) {\n $customer_ids[] = $res[$i]['sup_customer_id'];\n }\n }\n if (count($customer_ids) > 0) {\n $company_titles = Customer::getTitles($prj_id, $customer_ids);\n }\n }\n\n for ($i = 0; $i < count($res); $i++) {\n $res[$i][\"sup_date\"] = Date_Helper::getFormattedDate($res[$i][\"sup_date\"]);\n $res[$i][\"sup_subject\"] = Mime_Helper::fixEncoding($res[$i][\"sup_subject\"]);\n $res[$i][\"sup_from\"] = join(', ', Mail_Helper::getName($res[$i][\"sup_from\"], true));\n if ((empty($res[$i][\"sup_to\"])) && (!empty($res[$i][\"sup_iss_id\"]))) {\n $res[$i][\"sup_to\"] = \"Notification List\";\n } else {\n $to = Mail_Helper::getName($res[$i][\"sup_to\"]);\n // Ignore unformattable headers\n if (!PEAR::isError($to)) {\n $res[$i]['sup_to'] = Mime_Helper::fixEncoding($to);\n }\n }\n if (Customer::hasCustomerIntegration($prj_id)) {\n @$res[$i]['customer_title'] = $company_titles[$res[$i]['sup_customer_id']];\n }\n }\n\n $total_pages = ceil($total_rows / $max);\n $last_page = $total_pages - 1;\n return array(\n \"list\" => $res,\n \"info\" => array(\n \"current_page\" => $current_row,\n \"start_offset\" => $start,\n \"end_offset\" => $start + count($res),\n \"total_rows\" => $total_rows,\n \"total_pages\" => $total_pages,\n \"previous_page\" => ($current_row == 0) ? \"-1\" : ($current_row - 1),\n \"next_page\" => ($current_row == $last_page) ? \"-1\" : ($current_row + 1),\n \"last_page\" => $last_page\n )\n );\n }", "function subscribedUserList($start, $limit)\n {\n if(array_key_exists('search',$_GET) && $_GET['search']!=''){\n $search_word = str_replace('\"','',$_GET['search']);\n $search_word = str_replace(\"'\",\"\",$search_word);\n $sql = \"SELECT * FROM subscribe as su WHERE su.isactive = 1 AND su.emailid like '%\".$search_word.\"%' \";\n }\n else\n {\n $sql =\"SELECT * FROM subscribe as su WHERE su.isactive = 1 order by su.subscribe_id desc limit $limit, $start\";\n }\n \n $result = $this->db->query($sql);\n return $result->result_array();\n }", "function selectEmails() {\r\n\t\t$query = \"SELECT * FROM emails\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$value = mysql_fetch_assoc($result);\r\n\t\t\r\n\t\treturn $value;\r\n\t}", "function getStoreListSearch($objForm) {\n $objResponse = new xajaxResponse();\n $objAdminStore = &$GLOBALS['objAdminStore'];\n $strParam = serialize($objForm);\n $req['list'] = $objAdminStore->getStoreList(1, $strParam);\n $req['nofull'] = true;\n $objAdminStore->smarty->assign('req', $req);\n $content = $objAdminStore->smarty->fetch('admin_store.tpl');\n $objResponse->assign(\"tabledatalist\", 'innerHTML', $content);\n $objResponse->assign(\"searchparam\", 'value', $strParam);\n $objResponse->assign(\"pageno\", 'value', 1);\n\n return $objResponse;\n}", "public function search() {\n $mailboxes = null;\n $q = null;\n\n if (Input::has('q')) {\n $q = Input::get('q');\n $mailboxes = Mailbox::where('email', 'LIKE', \"%{$q}%\")->get();\n }\n\n return View::make('search', compact('mailboxes', 'q'));\n }", "public function get(string $email)\n\t{\n\t\t$request = $this->getRequest();\n $request->set('baseurl', 'https://'.$this->dc.'.api.mailchimp.com')\n ->set('path', '/3.0/lists/'.$this->list_id.'/members/'.md5($email));\n\n\t\treturn $this->parseResult(Connector::execute($request));\n\t}", "public function find($email)\n {\n $subscriber = $this->request('GET', 'lists/' . $this->list_id . '/subscribers', [\n 'ws.op' => 'find',\n 'email' => $email,\n ]);\n // dd($subscriber['entries']);\n if (!empty($subscriber['entries'])) {\n $this->subscriber = (object) $subscriber['entries'][0];\n }\n return $this->subscriber;\n }", "function getEmailList(){\n \n GLOBAL $approvedEmail;\n GLOBAL $pendingEmail;\n \n $approve = 1;\n $pending = 0;\n \n $approvedEmail = EmailDB::getEmailsByStatus($approve);\n $pendingEmail = EmailDB::getEmailsByStatus($pending);\n \n}", "function list_current()\n\t{\n\t\t$this->ipsclass->html .= \"\"; // removed js popwin\n\t\t\n\t\t$form_array = array();\n\t\t\n\t\t$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;\n\t\n\t\t$this->ipsclass->admin->page_detail = \"Stored email error logs\";\n\t\t$this->ipsclass->admin->page_title = \"Email Error Logs Manager\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check URL parameters\n\t\t//-----------------------------------------\n\t\t\n\t\t$url_query = array();\n\t\t$db_query = array();\n\t\t\n\t\tif ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != \"\" )\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title .= \" (Search Results)\";\n\t\t\n\t\t\tswitch( $this->ipsclass->input['type'] )\n\t\t\t{\n\t\t\t\tcase 'subject':\n\t\t\t\t\t$string = urldecode($this->ipsclass->input['string']);\n\t\t\t\t\tif ( $string == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->admin->error(\"You must enter something to search by\");\n\t\t\t\t\t}\n\t\t\t\t\t$url_query[] = 'type='.$this->ipsclass->input['type'];\n\t\t\t\t\t$url_query[] = 'string='.urlencode($string);\n\t\t\t\t\t$db_query[] = $this->ipsclass->input['match'] == 'loose' ? \"mlog_subject LIKE '%\". preg_replace_callback( '/([=_\\?\\x00-\\x1F\\x80-\\xFF])/', create_function( '$match', 'return \"=\" . strtoupper( dechex( ord( \"$match[1]\" ) ) );' ), $string ) .\"%'\" : \"mlog_subject='{$string}'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'email_from':\n\t\t\t\t\t$string = urldecode($this->ipsclass->input['string']);\n\t\t\t\t\tif ( $string == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->admin->error(\"You must enter something to search by\");\n\t\t\t\t\t}\n\t\t\t\t\t$url_query[] = 'type='.$this->ipsclass->input['type'];\n\t\t\t\t\t$url_query[] = 'string='.urlencode($string);\n\t\t\t\t\t$db_query[] = $this->ipsclass->input['match'] == 'loose' ? \"mlog_from LIKE '%{$string}%'\" : \"mlog_from='{$string}'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'email_to':\n\t\t\t\t\t$string = urldecode($this->ipsclass->input['string']);\n\t\t\t\t\tif ( $string == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->admin->error(\"You must enter something to search by\");\n\t\t\t\t\t}\n\t\t\t\t\t$url_query[] = 'type='.$this->ipsclass->input['type'];\n\t\t\t\t\t$url_query[] = 'string='.urlencode($string);\n\t\t\t\t\t$db_query[] = $this->ipsclass->input['match'] == 'loose' ? \"mlog_to LIKE '%{$string}%'\" : \"mlog_to='{$string}'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'error':\n\t\t\t\t\t$string = urldecode($this->ipsclass->input['string']);\n\t\t\t\t\tif ( $string == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ipsclass->admin->error(\"You must enter something to search by\");\n\t\t\t\t\t}\n\t\t\t\t\t$url_query[] = 'type='.$this->ipsclass->input['type'];\n\t\t\t\t\t$url_query[] = 'string='.urlencode($string);\n\t\t\t\t\t$db_query[] = $this->ipsclass->input['match'] == 'loose' ? \"mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'\" : \"mlog_msg='{$string} or mlog_smtp_msg='{$string}'\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t//\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// LIST 'EM\n\t\t//-----------------------------------------\n\t\t\n\t\t$dbe = \"\";\n\t\t$url = \"\";\n\t\t\n\t\tif ( count($db_query) > 0 )\n\t\t{\n\t\t\t$dbe = implode(' AND ', $db_query );\n\t\t}\n\t\t\n\t\tif ( count($url_query) > 0 )\n\t\t{\n\t\t\t$url = '&'.implode( '&', $url_query);\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t$count = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],\n\t\t\t\t\t\t\t\t\t\t\t 'PER_PAGE' => 25,\n\t\t\t\t\t\t\t\t\t\t\t 'CUR_ST_VAL' => $start,\n\t\t\t\t\t\t\t\t\t\t\t 'L_SINGLE' => \"Single Page\",\n\t\t\t\t\t\t\t\t\t\t\t 'L_MULTI' => \"Pages: \",\n\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url.\"&{$this->ipsclass->form_code}\".$url,\n\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t );\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t$this->ipsclass->html .= \"<script type='text/javascript'>\n\t\t\t\t\t\t\t\t\tfunction checkall( )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvar formobj = document.getElementById('theAdminForm');\n\t\t\t\t\t\t\t\t\t\tvar checkboxes = formobj.getElementsByTagName('input');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfor ( var i = 0 ; i <= checkboxes.length ; i++ )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tvar e = checkboxes[i];\n\t\t\t\t\t\t\t\t\t\t\tvar docheck = formobj.checkme.checked;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif ( e && (e.type == 'checkbox') && (! e.disabled) && (e.id != 'checkme') && (e.name != 'type') )\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif( docheck == false )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\te.checked = false;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\te.checked = true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t </script>\";\t\t\n\t\t\t\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'emailerror' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"<input type='checkbox' onclick='checkall();' id='checkme' />\" , \"1%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"To\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Subject\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Error MSG\" , \"30%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Date\" , \"20%\" );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Logged Emails Errors\" );\n\t\t\n\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'SHORT' );\n\t\t\t\t\n\t\t\t\t$row['mlog_subject'] = ( strpos( $row['mlog_subject'], \"=?{$this->ipsclass->vars['gb_char_set']}?Q?\" ) !== FALSE ) ? \n\t\t\t\t\t\t\t\t\t\tstr_replace( \"=?{$this->ipsclass->vars['gb_char_set']}?Q?\", \"\", str_replace( \"?=\", \"\", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( \"$match[1]\" ) );' ), $row['mlog_subject'] ) ) )\n\t\t\t\t\t\t\t\t\t\t//base64_decode( str_replace( \"=?utf-8?B?\", \"\", str_replace( \"=?=\", \"\", str_replace( \"=20\", \"\", $row['mlog_subject'] ) ) ) )\n\t\t\t\t\t\t\t\t\t\t: $row['mlog_subject'];\n\t\t\t\t\n\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<center><input type='checkbox' class='checkbox' name='id_{$row['mlog_id']}' value='1' /></center>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'<b>'.$row['mlog_to'].'</b>',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<a href='javascript:pop_win(\\\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['mlog_id']}\\\", \\\"{$row['mlog_id']}\\\",400,350)' title='Read email'>\".$row['mlog_subject'].\"</a>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row['mlog_msg'].'<br />'.$row['mlog_code']. '&nbsp;'.$row['mlog_smtp_msg'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row['mlog_date'],\n\t\t\t\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}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic(\"<center>No results</center>\");\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style=\"float:left;width:auto\"><input type=\"submit\" value=\"Remove Checked\" class=\"realbutton\" />&nbsp;<input type=\"checkbox\" id=\"checkbox\" name=\"type\" value=\"all\" />&nbsp;Remove all?</div><div align=\"right\">'.$links.'</div></form>', 'left', 'tablesubheader');\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//-----------------------------------------\n\t\t//-------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'emailerror' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Search Email Error Logs\" );\n\t\t\n\t\t$form_array = array(\n\t\t\t\t\t\t\t 0 => array( 'subject' , 'Email Subject' ),\n\t\t\t\t\t\t\t 2 => array( 'email_from' , 'From Email Address' ),\n\t\t\t\t\t\t\t 3 => array( 'email_to' , 'To Email Address' ),\n\t\t\t\t\t\t\t 4 => array( 'error' , 'Error Message' ),\n\t\t\t\t\t\t );\n\t\t\t\t\t\t \n\t\t$type_array = array(\n\t\t\t\t\t\t\t 0 => array( 'exact' , 'is exactly' ),\n\t\t\t\t\t\t\t 1 => array( 'loose' , 'contains' ),\n\t\t\t\t\t\t );\n\t\t\t\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Search where</b> &nbsp;\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t . $this->ipsclass->adskin->form_dropdown( \"type\" , $form_array, isset($_POST['type']) ? $_POST['type'] : '' ) .\" \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t . $this->ipsclass->adskin->form_dropdown( \"match\", $type_array, isset($_POST['match']) ? $_POST['match'] : '') .\" \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t . $this->ipsclass->adskin->form_input( \"string\", isset($_POST['string']) ? $_POST['string'] : '' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Search\");\n\t\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t//-------------------------------\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t\n\t}", "public function search_result(){\r\n\t\t$this->GetEblastRecipients();\r\n\r\n\t}", "public function autocomplete(){\n\t\tif(!$value = $this->input->post('value')) return _404();\n\t\t$users = $this->db->select('name')->like('name',$value,'after')->or_like('url_name',$value,'after')->get('users',10)->result_array();\n\t\tforeach($users as $user){\n\t\t\t$output[] = $user['name'];\n\t\t}\n\t\tajax(json_encode($output),TRUE);\n\t\texit();\n\t}", "function wp_ajax_fetch_list()\n{\n}", "public function get_ajax_data(){\n \n $sql = \"SELECT * FROM franquicias WHERE email_usuario='\" . $this->session->userdata('email') . \"'\";\n \n $data = array();\n \n foreach ($this->db->query($sql)->result() as $value) {\n \n // Obtengo datos del usuario por su email.\n $userdata = $this->get_userdata($value->email_franquicia);\n // Valido que el email exista.\n if($userdata){\n // Agrego elementos al listado.\n $data[] = array(\n $userdata['nombre'],\n $value->email_franquicia,\n $userdata['nombre_empresa'],\n $userdata['telefono_empresa'],\n $userdata['nit'],\n $value->id\n );\n }\n }\n \n return array('aaData' => $data);\n }", "function we_rest_get_contact_by_email( $email ) {\n global $wpdb;\n\n return $wpdb->get_row(\n $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}wcfn_contact WHERE email = %s\", $email )\n );\n}", "private function getByEmail($email=''){\n if($email!=''){\n $this->getByField('Email',$email);\n if(count($this->List)>0){\n $this->IDutente = $this->List[0]['IDutente'];\n }\n }\n }", "public function findCustomerListSignupsByEmailAddress($email)\n {\n return '{\n \"status\": \"A\",\n\"referenceNumber\": \"\",\n\"customerNumber\": \"000012345678\",\n\"emailAddress\": \"GCOSTANZA@VANDELAYINSTRUSTRIES.COM\", \"addressCode\": \"\",\n\"listCode\": \"5MIN\",\n\"emailId\": \"000001700000\",\n\"confirmationDate\": null,\n\"dateAdded\": 1177387200000,\n\"demographicData\": \"XUU55003 0\",\n\"isDoubleOptIn\": false,\n\"listCategory\": \"400\",\n\"listDescription\": \"5 minute forecast\", \"originalSourceCode\": \"XUU55003\",\n\"profileId\": \"000000000000\",\n\"sourceCode\": \"XMISSING\",\n\"reasonCode\": \"11\",\n\"dateAdded\": \"2014-06-06\",\n\"lastEnrollment\": \"2014-06-30\"\n }';\n }", "function getEmails($emailID)\n\t{\n\t$response = array(); \n\t$contextIO = new ContextIO('qd8cq03s','SogN0NW6RPJPkStv');\t\n\t$messageListResponse = $contextIO->listMessages($emailID,array('label' => '0', 'folder' => 'Inbox', 'limit' => '50'));\n\tforeach($messageListResponse->getData() as $message)\n\t{\n\t\tarray_push($response,array($message['subject'],$message['message_id'])); \n\t} \n\treturn $response; \n\t}", "public function checkEmail(){\n $VRegistration= USingleton::getInstance('VRegistration');\n $FRegistration= USingleton::getInstance('FRegistration');\n \n $mail=$VRegistration->get('mail');\n $result=$FRegistration->checkEmail($mail);\n echo json_encode($result);\n exit;\n }", "function select_email_entry($email='')\n {\n $this->db->select('*');\n $this->db->where('active', '1');\n\t\t$query = $this->db->get('utilisateur');\n\n\t\tforeach ($query->result() as $row) {\n\t\t\tif($row->email==$email)\n\t\t\t{\n\t\t\t return $row->login;\n\t\t\t exit();\n\t\t\t}\n\t\t }\n\n\t\treturn false;\n }", "function searchUserByEmail($email)\n{\n return getByCondition(\"users\", [\"email\" => $email], \"email =:email\", false);\n}", "function getUserEmailList() {\n\t\t$list = '';\n\t\tforeach(hypha_getUserList() as $user) if ($user->getAttribute('rights')=='user' || $user->getAttribute('rights')=='admin') $list.= ($list ? ',' : '').$user->getAttribute('email');\n\t\treturn $list;\n\t}", "public function ajax_verified_user_list() {\r\n\t\t$requestData = $_REQUEST;\r\n\r\n\t\t$columns = array(\r\n\t\t\t// datatable column index => database column name\r\n\t\t\t0 => 'username',\r\n\t\t\t1 => 'email',\r\n\t\t\t2 => 'creation_time'\r\n\t\t);\r\n\r\n\t\t//$query = \"SELECT uu.userId as user_id , CONCAT( uu.firstName ,' ', uu.lastName ) AS username, uu.email\r\n\t\t$query = \"SELECT count(uu.userId) as total\r\n\t\t\t\t\t\t\tFROM urend_users AS uu\r\n\t\t\t\t\t\t\tJOIN urend_user_license_data ON urend_user_license_data.user_id = uu.userId\r\n\t\t\t\t\t\t\tWHERE urend_user_license_data.state =1\r\n\t\t\t\t\t\t\t\";\r\n\t\t$query = $this->db->query($query);\r\n\t\t$query = $query->row_array();\r\n\t\t$totalData = (count($query) > 0) ? $query['total'] : 0;\r\n\t\t$totalFiltered = $totalData;\r\n\r\n\t\t$sql = \"SELECT uu.userId as user_id , CONCAT( uu.firstName ,' ', uu.lastName ) AS username, uu.email as email , uu.createdAt as creation_time\r\n\t\t\t\t\t\t\tFROM urend_users AS uu\r\n\t\t\t\t\t\t\tJOIN urend_user_license_data ON urend_user_license_data.user_id = uu.userId\r\n\t\t\t\t\t\t\tWHERE urend_user_license_data.state =1\";\r\n\r\n\t\t// getting records as per search parameters\r\n\t\tif (!empty($requestData['columns'][0]['search']['value'])) { //name\r\n\t\t\t$sql.=\" AND CONCAT( uu.firstName ,' ', uu.lastName ) LIKE '\" . $requestData['columns'][0]['search']['value'] . \"%' \";\r\n\t\t}\r\n\t\tif (!empty($requestData['columns'][1]['search']['value'])) { //salary\r\n\t\t\t$sql.=\" AND email LIKE '\" . $requestData['columns'][1]['search']['value'] . \"%' \";\r\n\t\t}\r\n\t\tif (!empty($requestData['columns'][2]['search']['value'])) { //salary\r\n\t\t\t$sql.=\" AND creation_time LIKE '\" . $requestData['columns'][2]['search']['value'] . \"%' \";\r\n\t\t}\r\n\r\n\t\t$query = $this->db->query($sql)->result();\r\n\r\n\t\t$totalFiltered = count($query); // when there is a search parameter then we have to modify total number filtered rows as per search result.\r\n\r\n\t\t$sql.=\" ORDER BY \" . $columns[$requestData['order'][0]['column']] . \" \" . $requestData['order'][0]['dir'] . \" LIMIT \" . $requestData['start'] . \" ,\" . $requestData['length'] . \" \"; // adding length\r\n\r\n\t\t$result = $this->db->query($sql)->result();\r\n\r\n\t\t$data = array();\r\n\r\n\t\tforeach ($result as $r) { // preparing an array\r\n\t\t\t$nestedData = array();\r\n\r\n\t\t\t$nestedData[] = $r->username;\r\n\t\t\t$nestedData[] = $r->email;\r\n\t\t\t$nestedData[] = $r->creation_time;\r\n\t\t\t$nestedData[] = \"<a class='btn-sm btn btn-info' href='\" . AUTH_PANEL_URL . \"web_user/user_profile/\" . $r->user_id . \"'>View</a>\";\r\n\t\t\t$data[] = $nestedData;\r\n\t\t}\r\n\r\n\t\t$json_data = array(\r\n\t\t\t\"draw\" => intval($requestData['draw']), // for every request/draw by clientside , they send a number as a parameter, when they recieve a response/data they first check the draw number, so we are sending same number in draw.\r\n\t\t\t\"recordsTotal\" => intval($totalData), // total number of records\r\n\t\t\t\"recordsFiltered\" => intval($totalFiltered), // total number of records after searching, if there is no searching then totalFiltered = totalData\r\n\t\t\t\"data\" => $data // total data array\r\n\t\t);\r\n\r\n\t\techo json_encode($json_data); // send data as json format\r\n\t}", "public function actionList() {\n $listId = $_POST['id'];\n $list = X2List::model()->findByPk($listId);\n if (isset($list)) {\n //$list=X2List::load($listId);\n } else {\n $list = X2List::model()->findByAttributes(array('name' => $listId));\n if (isset($list)) {\n $listId = $list->id;\n //$list=X2List::load($listId);\n } else {\n $this->_sendResponse(404, 'No list found with id: ' . $_POST['id']);\n }\n }\n $model = new Contacts('search');\n $dataProvider = $model->searchList($listId, 10);\n $data = $dataProvider->getData();\n $this->_sendResponse(200, json_encode($data), true);\n }", "function getEmails()\r\n\t{\r\n\t\t$sql = \r\n\t\t\"SELECT Email\r\n\t\tFROM verteiler\";\r\n\t\t$ergebnis = $this->cn->query($sql);\r\n\t\tif(!$ergebnis) {\r\n\t\t\t$this->error = \"SQL-Fehler: \" . $this->cn->error;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\twhile($row = $ergebnis->fetch_assoc()){\r\n\t\t $emails[] = $row['Email'];\r\n\t\t}\r\n\t\treturn $emails;\r\n\t}", "public function search_items_ajax($data)\n {\n $this->db->select('tblinvoiceitemslist.id as itemid,rate,taxrate,tbltaxes.id as taxid,tbltaxes.name as taxname,description');\n $this->db->from(INVOICE_ITEMS_LIST_TABLE);\n $this->db->like('description', $data['q']);\n $this->db->join('tbltaxes', 'tbltaxes.id = tblinvoiceitemslist.tax', 'left');\n return $this->db->get()->result_array();\n }", "function contactDetailList($start, $limit)\n {\n if(array_key_exists('search',$_GET) && $_GET['search']!=''){\n $search_word = str_replace('\"','',$_GET['search']);\n $search_word = str_replace(\"'\",\"\",$search_word);\n $sql = \"SELECT * FROM contact_data as cd WHERE cd.name like '%\".$search_word.\"%' or cd.email like '%\".$search_word.\"%' \";\n }\n else\n {\n $sql =\"SELECT * FROM contact_data as cd order by cd.contact_data_id desc limit $limit, $start\";\n }\n \n $result = $this->db->query($sql);\n return $result->result_array(); \n }", "public function get_emails()\n {\n //query for get email other than user's current username\n $query = $this->db->select('emailid')\n ->where('id !=', $_SESSION['user_id'])\n ->get('user');\n \n //return array of result\n return $query->result_array();\n }", "protected function getEmailList()\n {\n $this->outputLine('Checking mailbox...');\n return $this->getMailbox()->getMessages();\n }", "public static function showMyFoundItems( $email ) {\n $sql = \"SELECT * FROM foundItem, login\n WHERE foundItem.email = login.email AND foundItem.email = ?\";\n try {\n $database = Database::getInstance();\n $statement = $database->pdo->prepare( $sql );\n\n $statement->bindValue( 1, $email, PDO::PARAM_STR );\n $statement->execute();\n $results = $statement->fetchAll( PDO::FETCH_OBJ );\n\n } catch ( PDOException $e ) {\n echo $e->getMessage();\n exit;\n }\n return $results;\n }", "public function getUsernamesForEmail($email)\n\t{\n\t\t$ldap_filter = \"(&(objectClass=inetOrgPerson)(mail=$email))\";\n\t\t$attrs = array('uid');\n\t\t$results = $this->search('ou=users,o=sr', $ldap_filter, $attrs);\n\t\t$user_ids = $this->extractSingleAttr($results, 'uid');\n\t\treturn $user_ids;\n\t}", "function smfapi_getUserByEmail($email='')\n{\n global $smcFunc;\n\n if ('' == $email || !is_string($email) || 2 > count(explode('@', $email))) {\n return false;\n }\n\n $request = $smcFunc['db_query']('', '\n\t\t\tSELECT *\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE email_address = {string:email_address}\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'email_address' => $email,\n\t\t\t)\n\t\t);\n\t$results = $smcFunc['db_fetch_assoc']($request);\n\t$smcFunc['db_free_result']($request);\n\n if (empty($results)) {\n return false;\n\t} else {\n\t // return all the results.\n\t return $results;\n }\n}", "public static function get_emails( $input_email ) {\n\t\t$emails_arr = array();\n\t\t$input_email = trim( $input_email );\n\t\t$email_or_username = explode( ',', $input_email );\n\n\t\tforeach ( $email_or_username as $token ) {\n\t\t\t$token = htmlspecialchars( stripslashes( trim( $token ) ) );\n\n\t\t\t// Check if e-mail address is well-formed.\n\t\t\tif ( ! is_email( $token ) ) {\n\t\t\t\t$user = get_user_by( 'login', $token );\n\t\t\t\tif ( $user && $user instanceof WP_User ) {\n\t\t\t\t\tarray_push( $emails_arr, $user->user_email );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tarray_push( $emails_arr, $token );\n\t\t\t}\n\t\t}\n\t\treturn implode( ',', $emails_arr );\n\t}", "function getMailList($contentid='', $exclude='')\n\t{ /* exclude must be an array of values\n\t\t * OR not quoted list separated by ,\n\t\t *\n\t\t * contentid should be an array of values\n\t\t * OR not quoted list separated by ,\n\t\t */\n\n\t\t$database =& JFactory::getDBO();\n\n\t if (is_array($contentid)) {\n\t $contentid = implode(',', $contentid);\n\t }\n\t if (is_array($exclude)) {\n\t $exclude = implode(',', $exclude);\n\t }\n\n\t if ($this->_notify_users && $contentid) {\n\t /* Unregistered users */\n\t\t\t$query \t= \"SELECT DISTINCT email \"\n\t\t\t\t\t. \"\\n FROM `#__comment` \"\n\t\t\t\t\t. \"\\n WHERE contentid IN ($contentid) AND component='$this->_component'\"\n\t\t\t\t\t. \"\\n AND ( userid = NULL OR userid = 0 )\"\n\t\t\t\t\t. \"\\n AND email <> ''\"\n\t\t\t\t\t. \"\\n AND notify = '1'\"\n\t\t\t\t\t;\n\t\t\tif ($exclude) {\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\n\t\t\t\t$query .= \"\\n AND email NOT IN ('$quoted')\";\n\t\t\t}\n\t\t\t$database->setQuery( $query );\n\t\t\t$unregistered_maillist = $database->loadResultArray(); //tableau\n\n\t\t\tif ($unregistered_maillist) {\n\t\t\t $exclude = ($exclude ? $exclude.',' : '') . implode(',', $unregistered_maillist);\n\t\t\t}\n\n \t \t/* Registered users*/\n \t \t$registered_maillist = array();\n\t\t\t$query \t= \"SELECT DISTINCT u.email \"\n\t\t\t\t\t. \"\\n FROM `#__comment` AS c \"\n\t\t\t\t\t. \"\\n INNER JOIN `#__users` AS u ON u.id = c.userid \"\n\t\t\t\t\t. \"\\n WHERE c.contentid IN ($contentid) AND component='$this->_component'\"\n\t\t\t\t\t. \"\\n AND u.email <> ''\"\n\t\t\t\t\t. \"\\n AND c.notify = '1'\"\n\t\t\t\t\t;\n\t\t\tif ($exclude) {\n\t\t\t\t$quoted = str_replace( ',', \"','\", $exclude); /* add quotes */\n\t\t\t\t$query .= \"\\n AND u.email NOT IN ('$quoted')\";\n\t\t\t}\n\t\t\t$database->setQuery( $query );\n\t\t\t$registered_maillist = $database->loadResultArray(); //tableau\n//\t\t\t$debugemail = implode(';' , $maillist); // liste s�par� par des ;\n\n\t\t\tif ($registered_maillist) {\n\t\t \t$exclude = ($exclude ? $exclude.',' : '') . implode(',', $registered_maillist);\n\t\t\t}\n\t }\n\n\t\t$moderator_maillist = $this->getMailList_moderator($exclude);\n\n\t\t$maillist = array();\n\t\tif (isset($unregistered_maillist) && is_array($unregistered_maillist))\n\t\t\t$maillist = array_merge( $maillist, $unregistered_maillist);\n\t\tif (isset($registered_maillist) && is_array($registered_maillist))\n\t\t\t$maillist = array_merge( $maillist, $registered_maillist);\n\t\tif (isset($moderator_maillist) && is_array($moderator_maillist))\n\t\t\t$maillist = array_merge( $maillist, $moderator_maillist);\n\n\t\treturn ($maillist);\n\t}", "public function get_email_and_name_all()\n\t{\n\t\t$email_nombre = $this->_db->query('\n\n\t\tselect p.nombre AS nombre,\n\t \t\t\t\t u.email AS email\n\n\t FROM qtelecom.perfiles p\n\n\t\t\t join qtelecom.users u on p.user_id = u.id\n\t\t\t join qtelecom.departamentos d on p.id_departamento = d.id\n\n\n\t\t');\n\n\t\tif ($email_nombre->count()) {\n\t\t\t# si hay resultados ...\n\t\t\treturn $email_nombre->result();\n\t\t}\n\t\treturn false;\n\t}", "function showRecipientList()\r\n{\r\n\tglobal $dbConnection, $dta;\r\n\r\n\t$items = array();\r\n\r\n\t$sql = \"SELECT id, name FROM maillists\";\r\n\t$result = mysqli_query($dbConnection, $sql)\r\n\t\tor die (\"Error : $sql\");\r\n\twhile ($line = mysqli_fetch_array($result)) {\r\n\t\tarray_push($items, $line);\r\n\t}\r\n\t$dta['items'] = $items;\r\n}", "public function ajax_non_verified_user_list() {\r\n\t\t$requestData = $_REQUEST;\r\n\r\n\t\t$columns = array(\r\n\t\t\t// datatable column index => database column name\r\n\t\t\t0 => 'username',\r\n\t\t\t1 => 'email',\r\n\t\t\t2 => 'creation_time'\r\n\t\t);\r\n\r\n\t\t$query = \"SELECT count(uu.userId) as total\r\n\t\t\t\t\t\t\t\tFROM urend_users AS uu\r\n\t\t\t\t\t\t\t\tLEFT JOIN urend_user_license_data ON urend_user_license_data.user_id = uu.userId\r\n\t\t\t\t\t\t\t\tWHERE urend_user_license_data.state = 0\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t$query = $this->db->query($query);\r\n\t\t$query = $query->row_array();\r\n\t\t$totalData = (count($query) > 0) ? $query['total'] : 0;\r\n\t\t$totalFiltered = $totalData;\r\n\r\n\t\t$sql = \"SELECT uu.userId as user_id , CONCAT( uu.firstName ,' ', uu.lastName ) AS username, uu.email as email , uu.createdAt as creation_time\r\n\t\t\t\t\t\t\t\tFROM urend_users AS uu\r\n\t\t\t\t\t\t\t\tLEFT JOIN urend_user_license_data ON urend_user_license_data.user_id = uu.userId\r\n\t\t\t\t\t\t\t\tWHERE urend_user_license_data.state = 0\";\r\n\r\n\t\t// getting records as per search parameters\r\n\t\tif (!empty($requestData['columns'][0]['search']['value'])) { //name\r\n\t\t\t$sql.=\" AND CONCAT( uu.firstName ,' ', uu.lastName ) LIKE '\" . $requestData['columns'][0]['search']['value'] . \"%' \";\r\n\t\t}\r\n\t\tif (!empty($requestData['columns'][1]['search']['value'])) { //salary\r\n\t\t\t$sql.=\" AND email LIKE '\" . $requestData['columns'][1]['search']['value'] . \"%' \";\r\n\t\t}\r\n\t\tif (!empty($requestData['columns'][2]['search']['value'])) { //salary\r\n\t\t\t$sql.=\" AND creation_time LIKE '\" . $requestData['columns'][2]['search']['value'] . \"%' \";\r\n\t\t}\r\n\r\n\t\t$query = $this->db->query($sql)->result();\r\n\r\n\t\t$totalFiltered = count($query); // when there is a search parameter then we have to modify total number filtered rows as per search result.\r\n\r\n\t\t$sql.=\" ORDER BY \" . $columns[$requestData['order'][0]['column']] . \" \" . $requestData['order'][0]['dir'] . \" LIMIT \" . $requestData['start'] . \" ,\" . $requestData['length'] . \" \"; // adding length\r\n\r\n\t\t$result = $this->db->query($sql)->result();\r\n\r\n\t\t$data = array();\r\n\r\n\t\tforeach ($result as $r) { // preparing an array\r\n\t\t\t$nestedData = array();\r\n\r\n\t\t\t$nestedData[] = $r->username;\r\n\t\t\t$nestedData[] = $r->email;\r\n\t\t\t$nestedData[] = $r->creation_time;\r\n\t\t\t$nestedData[] = \"<a class='btn-sm btn btn-info' href='\" . AUTH_PANEL_URL . \"web_user/user_document_data/\" . $r->user_id . \"'>View</a>\";\r\n\t\t\t$data[] = $nestedData;\r\n\t\t}\r\n\r\n\t\t$json_data = array(\r\n\t\t\t\"draw\" => intval($requestData['draw']), // for every request/draw by clientside , they send a number as a parameter, when they recieve a response/data they first check the draw number, so we are sending same number in draw.\r\n\t\t\t\"recordsTotal\" => intval($totalData), // total number of records\r\n\t\t\t\"recordsFiltered\" => intval($totalFiltered), // total number of records after searching, if there is no searching then totalFiltered = totalData\r\n\t\t\t\"data\" => $data // total data array\r\n\t\t);\r\n\r\n\t\techo json_encode($json_data); // send data as json format\r\n\t}", "function get_subscriber_list() {\n\t\t$subscribers = $this->Customer_model->get_subscribers ();\n\t\t\n\t\t$sub_list = '';\n\t\tforeach ( $subscribers as $subscriber ) {\n\t\t\t$sub_list .= $subscriber ['email'] . \",\\n\";\n\t\t}\n\t\t\n\t\t$this->data ['sub_list'] = $sub_list;\n\t\t\n\t\t$this->load->view ( $this->config->item ( 'admin_folder' ) . '/customer_subscriber_list', $this->data );\n\t}", "function get_autocomplete_emp()\n {\n\t\t\n\t\t $this->load->model(\"Mydb\");\n\t\t\t$this->Mydb->checkLoginBranch();\n\t\t\n\t\t\n if (isset($_GET['term'])) {\n \n $username =$this->session->userdata['user_email'];\n $where=array('emailaddress'=>$username);\n $listing=$this->Mydb->get_record('selectbranch', 'create_employee', $where);\n $data['branch']= $listing; \n $branch=implode($listing);\n \n \n $where=array('selectbranch'=>$branch,'select'=>'Sales');\n \n $result = $this->Mydb->search_emp($_GET['term'], $where);\n \n if (count($result) > 0) {\n foreach ($result as $row)\n $arr_result[] = array(\n 'label' => $row->firstname, \n 'branchname'\t => $row->selectbranch,\n 'employeeid'\t => $row->employeeid,\n );\n echo json_encode($arr_result);\n }\n }\n }", "function emailtouser(){\n\n \t $this->autoRender=false;\n if($this->RequestHandler->isAjax()){\n Configure::write('debug', 0);\n $this->checkuserlogin();\n\t\t$id = $this->Session->read('User.id');\n\t\t$name = $this->UserFirstName($id);\n\t\t$email=explode(',' , $_REQUEST['email']);\n for($i=0;$i<count($email);$i++){\n \tif($this->isValidEmail($email[$i])){\n\n\t\t\t\t$this->referuseremail($email[$i],$name,base64_encode($id));\n \t}\n }\n echo 'Email send to your Colleigue';\n }\n\n}", "public function getEmails(Request $request, $id = null)\n {\n $partenaire = Partenaire::find($request->id);\n if ($request->ajax()){\n return $partenaire->emails;\n }\n }", "public function getSubscriberByEmail($email) {\n\t\t$ListSimpleXMLObject = $this->selectSubscriber(null, null, null, $email);\n\t\t$ListaSubscribers = $this->traduzSimpleXMLObjectToSubscriber($ListSimpleXMLObject);\n\t\treturn $ListaSubscribers;\n\t}", "public function select_email_jquery() {\n try {\n $user_id = Input::get(\"user_id\");\n $user = UserHelper::get_particular_user($user_id);\n if ($user_id == 'all') {\n return View::make(\"jqueryviews.select_country_region\");\n }\n return View::make(\"jqueryviews.select_email\", compact(\"user\"));\n } catch (Exception $ex) {\n echo 'Caught exception: ', $ex->getMessage(), \"\\n\";\n } catch (Illuminate\\Database\\QueryException $ex) {\n echo 'Caught exception: ', $ex->getMessage(), \"\\n\";\n }\n }", "function getEmail($data){\n $emails=array();\n for ($i = 0; $i <= 10; $i++) {\n if(isset($data[$i]['items'][0]['href'])){\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $data[$i]['items'][0]['href']);\n curl_setopt($ch, CURLOPT_USERPWD, 'ICXCandidate:Welcome2021');\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($ch);\n $emails[$i]=json_decode($response,true);\n curl_close($ch);\n }\n else{\n $emails[$i]=NULL;\n }\n }\n return($emails);\n}", "protected function findEmail()\n {\n $db = Tools::getDatabaseConnection();\n $this->email = null;\n $this->recipientList = null;\n\n $authCode = $this->emailParser->getAuthCode();\n if ($authCode) {\n // Find the recipientList and email UIDs according to authcode\n $rs = $db->sql_query(\"\n\t\t\tSELECT tx_newsletter_domain_model_newsletter.recipient_list, tx_newsletter_domain_model_email.uid\n\t\t\tFROM tx_newsletter_domain_model_email\n\t\t\tINNER JOIN tx_newsletter_domain_model_newsletter ON (tx_newsletter_domain_model_email.newsletter = tx_newsletter_domain_model_newsletter.uid)\n\t\t\tINNER JOIN tx_newsletter_domain_model_recipientlist ON (tx_newsletter_domain_model_newsletter.recipient_list = tx_newsletter_domain_model_recipientlist.uid)\n\t\t\tWHERE tx_newsletter_domain_model_email.auth_code = '$authCode' AND recipient_list IS NOT NULL\n\t\t\tLIMIT 1\");\n\n if (list($recipientListUid, $emailUid) = $db->sql_fetch_row($rs)) {\n $emailRepository = $this->objectManager->get(EmailRepository::class);\n $this->email = $emailRepository->findByUid($emailUid);\n\n $recipientListRepository = $this->objectManager->get(RecipientListRepository::class);\n $this->recipientList = $recipientListRepository->findByUid($recipientListUid);\n }\n }\n }", "function subscriber()\n{\n\tglobal $option, $mainframe;\n\t$db =& JFactory::getDBO();\n\t$context\t\t\t= 'com_wnewsletter.showsubscriber';\n\t$search\t\t\t\t= $mainframe->getUserStateFromRequest( $context.'search',\t\t\t'search',\t\t\t'',\t'string' );\n\t$search\t\t\t\t= JString::strtolower($search);\n\n\t// Keyword filter\n\tif ($search) {\t\t\n\t\t$where = 'WHERE (LOWER( name ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) .\n\t\t\t' OR LOWER( email ) LIKE ' . $db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) . ')';\n\t}\n\n\t$limit = JRequest::getVar('limit',$mainframe->getCfg('list_limit'));\n\t$limitstart = JRequest::getVar('limitstart', 0);\n\t$db =& JFactory::getDBO();\n\t$query = \"SELECT count(*) FROM #__w_newsletter_subscribers \". $where;\n\t$db->setQuery( $query );\n\t$total = $db->loadResult();\n\t$query = \"SELECT * FROM #__w_newsletter_subscribers \".$where;\n\t$db->setQuery( $query, $limitstart, $limit );\n\t$rows = $db->loadObjectList();\n\tif ($db->getErrorNum()) {\n\techo $db->stderr();\n\treturn false;\n}\njimport('joomla.html.pagination');\n$pageNav = new JPagination($total, $limitstart, $limit);\nHTML_newsletter::showSubscriber( $option, $rows, $pageNav );\n}", "function get_user_contacts($email) {\r\n\r\n\t$sql = \"SELECT contact_email,contact_firstname,contact_lastname FROM contacts WHERE user_email = '$email'\";\r\n\t$result = mysql_query($sql);\r\n\t$contacts = array();\r\n\twhile ($contact = mysql_fetch_assoc($result)){\r\n\t\tarray_push($contacts,$contact);\r\n\t}\r\n\r\n\treturn $contacts;\r\n}", "private function check_usermail($login_mail, $provider) {\n if (!defined(\"USERS_REQUIRE_MAIL\") OR USERS_REQUIRE_MAIL == false)\n return false;\n $_SESSION[\"datacheck\"] = kernel::uni_session_name();\n $this->db->aArrayedResults = false;\n $table = str_replace(PREFIX, \"\", self::tbl);\n $bool = $this->db->Select($table, array(self::tbl_eml => $login_mail));\n // var_dump( $this->db->ArrayResult());\n if (((bool) $this->db->aArrayedResults[0][self::tbl_eml]) OR ($this->check_email_nosql($login_mail) == false)) {\n $this->html_output = null;\n $postRequest = kernel::base_tag(\"{host}{module_dir}datacheck?socnet\");\n $images_fld = kernel::base_tag(\"{host}{module_dir}images/\");\n global $language;\n $html = <<<eol\n <!--//[form for additional information]\n * This is not a template\n //-->\n<script type=\"text/javascript\">\n$(document).ready(function(){\n $('#tick_usermail').hide();$('#submit_usermail').hide();\n$('#usermail').keyup(usermail_check);\n});\nfunction usermail_check(){\nvar usermail = $('#usermail').val();\nif(usermail == \"\" || usermail.length < 4){\n$('#usermail').css('border', '3px #CCC solid');\n$('#tick_usermail').hide();\n}else{\njQuery.ajax({\n type: \"POST\",\n url: \"{$postRequest}\",\n data: 'check_usermail='+ usermail,\n cache: false,\n success: function(response){\nif(response == 1){\n $('#username').css('border', '3px #C33 solid');\n $('#tick_usermail').stop().hide();\n $('#submit_usermail').stop().hide();\n $('#submit_usermail').attr('disabled', 'disabled');\n }else{\n $('#usermail').css('border', '3px #090 solid');\n $('#cross_usermail').hide();\n $('#tick_usermail').fadeIn();\n $('#submit_usermail').removeAttr(\"disabled\");\n $('#submit_usermail').fadeIn(1000);\n }\n}\n});\n}\n}\n</script>\n <form name=\"usermail\" method=\"post\" enctype=\"multipart/form-data\">\n <table border='0' width=\"80%\" align=\"center\">\n <tr>\n <td class=\"fld-title\">{$language['users.lan.email']}:</td>\n </tr>\n <tr>\n <td class=\"fld-content\" >\n <input type=\"text\" name=\"usermail\" id=\"usermail\" value=\"{$login_mail}\" maxlength=\"120\" autocomplete=\"off\" style=\"max-width:90% !important; float:left; display:inline-block;\" />\n <img id=\"tick_usermail\" src=\"{$images_fld}tick.png\" width=\"16\" height=\"16\"/>\n <img id=\"cross_usermail\" src=\"{$images_fld}cross.png\" width=\"16\" height=\"16\"/>\n </td>\n </tr>\n <tr> <td class=\"fld-space\">&nbsp; </td> </tr>\n </table>\n <p> <input type=\"submit\" name=\"submit\" value=\"{$language['lan.submit']}\" id=\"submit_usermail\"> </p>\n </form>\neol;\n $this->html_output.= $html;\n $this->db->aArrayedResults = null;\n return true;\n } else\n return false;\n }", "protected function loadPayerMailList()\n\t{\n\t\t$data = $this->data;\n\t\t$mailList = array();\n\n\t\tif (is_array($data['CLIENT_SECONDARY_ENTITY_IDS']) && !empty($data['CLIENT_SECONDARY_ENTITY_IDS']))\n\t\t{\n\t\t\t$clientData = CCrmFieldMulti::GetList(\n\t\t\t\tarray('ID' => 'asc'),\n\t\t\t\tarray(\n\t\t\t\t\t'ENTITY_ID' => 'CONTACT',\n\t\t\t\t\t'ELEMENT_ID' => $data['CLIENT_SECONDARY_ENTITY_IDS'],\n\t\t\t\t\t'TYPE_ID' => 'EMAIL'\n\t\t\t\t)\n\t\t\t);\n\t\t\twhile ($client = $clientData->Fetch())\n\t\t\t{\n\t\t\t\t$clientMail = array(\n\t\t\t\t\t'value' => $client['ID'],\n\t\t\t\t\t'text' => $client['VALUE']\n\t\t\t\t);\n\t\t\t\tif ($data['RECURRING_EMAIL_ID'] == $client['ID'])\n\t\t\t\t{\n\t\t\t\t\tarray_unshift($mailList, $clientMail);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$mailList[] = $clientMail;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ((int)$data['CLIENT_PRIMARY_ENTITY_ID'] > 0)\n\t\t{\n\t\t\t$companyData = CCrmFieldMulti::GetList(\n\t\t\t\tarray('ID' => 'asc'),\n\t\t\t\tarray(\n\t\t\t\t\t'ENTITY_ID' => $data['CLIENT_PRIMARY_ENTITY_TYPE_NAME'],\n\t\t\t\t\t'ELEMENT_ID' => (int)$data['CLIENT_PRIMARY_ENTITY_ID'],\n\t\t\t\t\t'TYPE_ID' => 'EMAIL'\n\t\t\t\t)\n\t\t\t);\n\t\t\twhile ($company = $companyData->Fetch())\n\t\t\t{\n\t\t\t\t$companyMail = array(\n\t\t\t\t\t'value' => $company['ID'],\n\t\t\t\t\t'text' => $company['VALUE']\n\t\t\t\t);\n\n\t\t\t\tif ($data['RECURRING_EMAIL_ID'] == $company['ID'])\n\t\t\t\t{\n\t\t\t\t\tarray_unshift($mailList, $companyMail);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$mailList[] = $companyMail;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$mailFilter = array();\n\t\t$result = array();\n\t\tforeach ($mailList as $key => $mail)\n\t\t{\n\t\t\tif (!in_array($mail['text'], $mailFilter))\n\t\t\t{\n\t\t\t\t$mailFilter[] = $mail['text'];\n\t\t\t\t$result[] = $mail;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function ajax_search_available_items()\n {\n }", "function get_all_email()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('email')->result_array();\n }", "public function sentmaillist(){\n\t\treturn $this->db->from('sendwebmail')->get();\n\t}", "public function getClaimStreetForAutoComplete(){\n\t\t$_SESSION ['logger']->debug ( __METHOD__ . ' begin' );\n\t\t$streets = array();\n\t\ttry {\n\t\t\t$fieldValue = $_REQUEST['fieldValue'];\n\t\t\t$filters = array();\n\t\t\t$filter = $this->getTextFilter('map_city.street', '', 100, 'map_city.street', '');\n\t\t\t$filter->setSelectedValue($fieldValue);\n\t\t\t$filters[]=$filter;\n\t\t\t$results= $this->manager->getAllClaimStreet($filters);\n\t\t\t$counter = 1;\n\t\t\tforeach ($results as $result) {\n\t\t\t\tif($counter <= 10) {\n\t\t\t\t\t$streets [] = array(\n\t\t\t\t\t\t\t\"value\" => $result['street']\n\t\t\t\t\t);\n\t\t\t\t\t$counter ++;\n\t\t\t\t} else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$_SESSION ['logger']->debug ( $e->getMessage());\n\t\t}\n\t\treturn new AjaxRender(json_encode($streets));\n\t}", "public function api_autocomplete() {\n\t\t$this->layout = 'ajax';\n\n\t\t$data = array('users' => array());\n\n\t\tif (isset($this->request->query['query'])\n\t\t\t&& $this->request->query['query'] != null\n\t\t\t&& strlen($this->request->query['query']) > 2\n\t\t\t&& isset($this->request['named']['project'])) {\n\n\t\t\t$query = $this->request->query['query'];\n\t\t\t$users = $this->Collaborator->find(\n\t\t\t\t\"all\",\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\t\t'User.name\tLIKE' => $query . '%',\n\t\t\t\t\t\t\t'User.email LIKE' => $query . '%'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'Project.id' => $this->request['named']['project']\n\t\t\t\t\t),\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'User.name',\n\t\t\t\t\t\t'User.email'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\tforeach ($users as $user) {\n\t\t\t\t$data['users'][] = $user['User']['name'] . \" [\" . $user['User']['email'] . \"]\";\n\t\t\t}\n\n\t\t}\n\t\t$this->set('data',$data);\n\t\t$this->render('/Elements/json');\n\t}", "public function getEmail(Request $request)\n {\n $email = PartenaireEmail::find($request->id);\n if ($request->ajax()){\n return $email;\n }\n }" ]
[ "0.66073936", "0.6439824", "0.64282167", "0.64208156", "0.6396709", "0.6344597", "0.6315514", "0.6262703", "0.6243132", "0.6159879", "0.6140631", "0.6138967", "0.6131449", "0.6078444", "0.59522367", "0.59412056", "0.59217995", "0.59149694", "0.5911882", "0.5893602", "0.5867416", "0.5860484", "0.58519924", "0.5844914", "0.584346", "0.5843107", "0.583088", "0.5825188", "0.58150154", "0.58080673", "0.5805494", "0.58049023", "0.57978576", "0.57694995", "0.57550293", "0.5754366", "0.57363695", "0.572733", "0.5726911", "0.57160956", "0.5710946", "0.5705719", "0.56928724", "0.5664542", "0.56615984", "0.56575584", "0.5636821", "0.56309825", "0.5623656", "0.5600694", "0.5588056", "0.55802935", "0.55792606", "0.5579084", "0.55723244", "0.55699736", "0.5560837", "0.55486614", "0.55414855", "0.55403", "0.5538403", "0.55316013", "0.5527815", "0.5527167", "0.5523675", "0.5521566", "0.55185527", "0.5514065", "0.5501643", "0.5498109", "0.54950505", "0.5493158", "0.5488675", "0.5488343", "0.54812294", "0.54720783", "0.5470876", "0.54661083", "0.5463672", "0.54614484", "0.54593825", "0.5456983", "0.5454406", "0.54537284", "0.54360694", "0.5435267", "0.5434869", "0.5433969", "0.54235065", "0.5423445", "0.54184633", "0.54160905", "0.5409709", "0.5396434", "0.5394433", "0.5388283", "0.5381771", "0.53748435", "0.5366787", "0.5365621" ]
0.8242982
0
// load_popup_user_information : launch popup contained users data result when searching
// load_popup_user_information : выводит всплывающее окно с результатами поиска данных пользователей
public function load_popup_user_information() { $strUserDomain = $_REQUEST['user']; $strIncidentId = $strAlertId = $strAlertMsg = $strTimeAlert = $strIdentifier = $strChangeId = null; if(!empty($_REQUEST['incident_id'])) { $strIncidentId = $_REQUEST['incident_id']; } if(!empty($_REQUEST['alert_id'])) { $strAlertId = $_REQUEST['alert_id']; } if(!empty($_REQUEST['alert_msg'])) { $strAlertMsg = trim($_REQUEST['alert_msg']); $strAlertMsg = urldecode($strAlertMsg); } if(!empty($_REQUEST['time_alert'])) { $strTimeAlert = trim($_REQUEST['time_alert']); } if(!empty($_REQUEST['identifier'])) { $strIdentifier = $_REQUEST['identifier']; } if(!empty($_REQUEST['change_id'])) { $strChangeId = $_REQUEST['change_id']; } $arrUsersInfo = $this->contact_model->getListUsersInfoByUserDomain($strUserDomain); //$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain('minht'); $arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain($strUserDomain); $arrEmails = array(); $arrSearched = array(); $arrVNGStaffListSearched = array(); $t = 0; if(!empty($arrUsersInfo)) { $noUserIdTemp = $arrUsersInfo[0]['userid']; $arrEmails[0] = $arrUsersInfo[0]['email']; foreach ($arrUsersInfo as $key => $oneUser) { if($noUserIdTemp != $oneUser['userid']) { $noUserIdTemp = $oneUser['userid']; $t = 0; $arrEmails[] = strtolower($oneUser['email']); } $arrSearched[$noUserIdTemp][$t] = $oneUser; $t++; } } else { $arrSearched = array(); } if(!empty($arrVNGStaffList)) { foreach ($arrVNGStaffList as $index => $oOneStaff) { if(!in_array(strtolower($oOneStaff->email), $arrEmails)) { $arrVNGStaffListSearched[] = $oOneStaff; } } } else { $arrVNGStaffListSearched = array(); } $this->loadview('contact/popup_search_by_user_result', array('arrSearchUsersResult' => $arrSearched, 'arrVNGStaffs' => $arrVNGStaffListSearched, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId, 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIdentifier' => $strIdentifier, 'strChangeId' => $strChangeId ), 'layout_popup'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadProfilePopup()\n {\n $this->error(false);\n\n $sM = $this->get('m');\n $sModule = $this->get('module');\n $sName = $this->get('name');\n $sMatchType = $this->get('match_type');\n $sMatchID = $this->get('match_id');\n $sMatchName = $this->get('match_name');\n\n $bIsRight = false;\n $sMatchTypeUserConvertToPages = $sMatchType;\n if ($sMatchType == 'user')\n {\n $bIsRight = true;\n $aUser = Phpfox::getService('user')->getByUserName($sMatchName);\n if (isset($aUser['user_id']) === true)\n {\n // check pages object\n if ((!isset($aUser['user_id'])) || (isset($aUser['user_id']) && $aUser['profile_page_id'] > 0))\n {\n if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n {\n $sMatchTypeUserConvertToPages = 'page';\n }\n } else\n {\n Phpfox::getBlock('profilepopup.user');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n } else\n {\n $bIsRight = false;\n\t\t\t\t\t\t\t\t$sMatchTypeUserConvertToPages = 'page';\n }\n }\n if ($sMatchType == 'page' || $sMatchTypeUserConvertToPages == 'page')\n {\n $bIsRight = true;\n\t\t\t\t\t\tif (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aPage = Phpfox::getService('pages')->getForView($sMatchID);\n if (!$aPage)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.pages');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'event')\n {\n $bIsRight = true;\n $aEvent = Phpfox::getService('event')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.event');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'fevent')\n {\n $bIsRight = true;\n if (Phpfox::isModule('fevent'))\n {\n $aEvent = Phpfox::getService('fevent')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.fevent');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n }\n\n if ($bIsRight === false)\n {\n echo json_encode(array('content' => '', 'msg' => \"failure\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }", "public function load_popup_list_mobile_user() {\n \t// pd($_REQUEST);\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getUserById($iUserId);\n \t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['mobile'] = str_replace($arrOrders, ', ', $arrUser['mobile']);\n\t \t\t$arrUser['mobile'] = str_replace($arrChildOrders, '', $arrUser['mobile']);\n\t \t$arrUser['mobile'] = explode(', ', $arrUser['mobile']);\n\t\t\t\t$this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t \t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function load_popup_list_mobile_user_vng_staff_list() {\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getStaffById($iUserId);\n\t\t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['cellphone'] = str_replace($arrOrders, ', ', $arrUser['cellphone']);\n\t \t\t$arrUser['cellphone'] = str_replace($arrChildOrders, '', $arrUser['cellphone']);\t \t\t\n\t \t$arrUser['cellphone'] = explode(', ', $arrUser['cellphone']);\n\t\t $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t\t\t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "function load_info($username) {\r\n\t}", "public function showUserChanger(array $data);", "public function getUserProfileModal() {\n \t\t$name \t\t= $_SESSION['user']['user_fname']. ' '.$_SESSION['user']['user_lname'];\n \t\t$username \t= $_SESSION['user']['user_name'];\n \t\t$email \t\t= $_SESSION['user']['user_email'];\n \t\t$user_type \t= $_SESSION['user']['user_type_name'];\n \t\t$user_team \t= $_SESSION['user']['user_team_name'];\n\n \t\t// If user type is SOS or Manuf, there is no dealer affiliation. Show 'N/A' if so.\n \t\t$dealer_info = ($user_type == 'SOS' || $user_type == 'Manuf') ? 'N/A' : $_SESSION['dealer_name'].' ('.$_SESSION['dealer_code'].')';\n\n \t\t// Set admin text display based on admin value\n \t\t$admin = ($_SESSION['user']['user_admin'] == 1) ? 'Yes' : 'No';\n\n \t\t// Build modal structure, filling in dynamic user data\n \t\t$html =\n \t\t'<div id=\"user-profile-modal\" class=\"reveal-modal\" style=\"background: #f5f5f5;\" data-reveal aria-labelledby=\"modalTitle\" aria-hidden=\"true\" role=\"dialog\">\n\t\t \t<h2 class=\"blue\" id=\"modalTitle\">User Profile</h2>\n\t\t \t<form>\n\t\t \t\t<div class=\"row\">\n\t\t \t\t\t<div class=\"large-12 columns\">\n\t\t \t\t\t\t<h4> General Information </h4>\n\t\t \t\t\t\t<fieldset>\n\t\t \t\t\t\t\t<p> Name: <span> '.$name.' </span> </p>\n\t\t\t\t\t\t\t<p> User Name: <span> '.$username.' </span> </p>\n\t\t\t\t\t\t\t<p> Email Address: <span> '.$email.' </span> </p>\n\t\t\t\t\t\t</fieldset>\n\t\t \t\t\t</div>\n\t\t \t\t\t<div class=\"large-12 columns\">\n\t\t\t\t\t\t<h4> System Information </h4>\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t<p> User Type: <span> '.$user_type.' </span> </p>\n\t\t\t\t\t\t\t<p> User Team: <span> '.$user_team.' </span> </p>\n\t\t\t\t\t\t\t<p> Dealer Affiliation: <span> '.$dealer_info.' </span> </p>\n\t\t\t\t\t\t\t<p> Admin Status: <span> '.$admin.' </span> </p>\n\t\t\t\t\t\t</fieldset>\n\t\t \t\t\t</div>\n\t\t\t\t</div> <!-- end div row -->\n\t\t\t</form>\n\t\t\t<a class=\"close-reveal-modal\" aria-label=\"Close\">×</a>\n\t\t</div> <!-- .user-profile-modal -->';\n\n\t\treturn $html;\n }", "public static function get_user_popup_info( $req ) {\t\t\n\t\t// is following logged in user?\n\t\t\n\t\t// profile link\n\t\t\n\t\t// profile picture link\n\t\t\n\t\t// number of updates? / shows?\n\t\t$_user_id = $req[\"uid\"];\n\t\t$_your_id = User::$user_id;\n\t\t\n\t\tif ( $_your_id ) {\n\t\t\n\t\t\t$sql = \"\n\t\t\t\tSELECT count(uf.user_id) as count\n\t\t\t\tFROM user_followers uf\n\t\t\t\tWHERE uf.user_id = '{$_user_id}' and uf.follower_id = '{$_your_id}'\n\t\t\t\tLIMIT 1\n\t\t\t\";\n\t\t\t$res = DB::query($sql);\n\t\t\t$_youre_following = $res[0][\"count\"];\n\t\t\t\n\t\t\t$sql = \"\n\t\t\t\tSELECT count(uf.user_id) as count\n\t\t\t\tFROM user_followers uf\n\t\t\t\tWHERE uf.user_id = '{$_your_id}' and uf.follower_id = '{$_user_id}'\n\t\t\t\tLIMIT 1\n\t\t\t\";\n\t\t\t\n\t\t\t$res2 = DB::query($sql);\t\n\t\t\t$_following_you = $res2[0][\"count\"];\n\t\t\t\n\t\t}\n\t\t\n\t\t$_user_info = self::find( array(\"user_ids\" => $req[\"uid\"] ) );\n\t\t\n\t\t$data = array(\"following_you\" => $_following_you , \"youre_following\" => $_youre_following , \"user_info\" => $_user_info[0] );\n\t\t\n\t\t\n\t\techo json_encode($data); die();\n\t\t\n\t\t\n\t}", "function fetch_user_information()\n {\n $searchUser = isset($_POST['user']) ? $_POST['user'] : '';\n\n if (!empty($searchUser)) {\n\n if (!wp_verify_nonce($_POST['nonce'], 'b?le*;K7.T2jk_*(+3&[G[xAc8O~Fv)2T/Zk9N')) {\n die ('Hey, Stop!!!!');\n } else {\n $request = wp_remote_get(\"https://api.github.com/users/\" . $searchUser);\n if (is_wp_error($request)) {\n return false;\n }\n $userData = json_decode(wp_remote_retrieve_body($request));\n wp_send_json_success($userData, 200);\n\n die();\n }\n }\n\n }", "private function loadUserData() {\n $sql = $this->db->q(\n 'SELECT userID, userFirstName, userLastName, userLogin, admin\n FROM %pusers\n WHERE userID = %i\n LIMIT 1',\n $this->id\n );\n if ($sql->hasData()) {\n $this->name = $sql->getFirst()->userLastName;\n $this->firstname = $sql->getFirst()->userFirstName;\n $this->loginName = $sql->getFirst()->userLogin;\n $this->admin = ($sql->getFirst()->admin == '1') ? true : false;\n }\n }", "function squirrelmail_plugin_init_retrieveuserdata() {\n global $squirrelmail_plugin_hooks;\n\n $squirrelmail_plugin_hooks[\"loading_prefs\"][\"retrieveuserdata\"] = \"check_userdata\";\n $squirrelmail_plugin_hooks[\"options_personal_save\"][\"retrieveuserdata\"] = \"force_userdata\";\n }", "function getuser(){\n\tif($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\tif (isset($_POST['submitloadusers']) == 'Load Users') {\n\n\t\t\tif (!empty($_SESSION['token'])) {\n\t\t\t\t\n\t\t\t\t$request_url = url.user.\"?realm=\".realm;\n\t\t\t\t\n\t\t\t\t$gettoken = substr($_SESSION['token'], 0, -1);\n\t\t\t\t\n\t\t\t\t$ch = curl_init();\n\t\t\t\t\n\t\t\t\t$request_headers = array();\n\t\t\t\t$request_headers[] = 'Content-Type: application/json; charset=utf-8';\n\t\t\t\t$request_headers[] = 'x-auth-token: '.$gettoken;\n\t\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $request_url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER,FALSE);\n\t\t\t\t\n\t\t\t\t$response = curl_exec($ch);\n\t\t//\t\techo $response = curl_exec($ch);\n\t\t//\t\tprint_r($response);\n\t\t\n\t\t\t\t$response = json_decode($response, true);\n\n\t\t\t\t\techo \t\"<table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t\t<td>Last Name</td>\n\t\t\t\t\t\t\t<td>Email</td>\t\t\n\t\t\t\t\t\t\t<td>Extension</td>\n\t\t\t\t\t\t\t<td>Numbers</td>\n\t\t\t\t\t\t\t<td>Datum</td>\n\t\t\t\t\t\t\t</tr>\"; \t\n\n\t\t\t\tforeach ($response as $key => $value) {\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\".$value['fname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['lname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['email'].\"</td>\n\t\t\t\t\t\t<td>\".$value['ext'].\"</td>\n\t\t\t\t\t\t<td>\"; \n\t\t\t\t\tforeach ($value['numbers'] as $key2 => $numvalue) {\n\t\t\t\t\techo $numvalue;\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\"; \n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\t\t\techo \"<form action='getlist.php' method='post' id='popupForm'> \n\t\t\t\t\t<input type='text' name='exte' class='exte' value=\".$value['ext'].\"> \n\t\t\t\t\t<input type='submit' name='aanvragen' id='aanvragen' value='aanvragen'></form>\";\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t</table> \";\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//print_r($response);\n\t\t\t\t\n\t\t\t\tcurl_close($ch);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//echo\"Load User\";\n\t\t} \n\t}\n}", "function displayAllUsers() {\n\n\t\t// get list of users\n\t\t$usersQuery = mysql_query(\"select * from user where privacy = 'public' order by displayName\") or die (\"could grab users: \".mysql_error());\n\n\t\tif($this->privacy == 'private') {\n\t\t\t// customer's privacy is set to private, display notice\n\t\t\t$content = 'Don\\'t see yourself here? You are currently set as <b>private</b> user<br><a href=\"account_info.php\">Change that here</a>';\n\t\t} else {\n\t\t\t$content = 'Do you like dark, empty rooms? Don\\'t want others to see you here?<br><a href=\"account_info.php\">Change your privacy here</a>';\n\t\t}\n\n\t\techo '<div id=\"privacy_notice\">\n\t\t\t'.$content.'\n\t\t</div>';\n\n\t\twhile($row = mysql_fetch_array($usersQuery) ) {\n\n\t\t\t$row['NumDownloads'] = $this->getDownloads($row['id']);\n\t\t\t$row['conversions'] = $this->getConversions($row['id']);\n\n\t\t\tif($this->id == $row['id']) {\n\t\t\t\techo '<div class=\"its_you\">';\n\t\t\t} else {\n\t\t\t\techo '<div class=\"other_user\" style=\"border: 1px solid '.$row['navbarBG'].';\">';\n\t\t\t}\n\n\t\t\t// resize image if necessary\n\t\t\tif($row['user_photo'] != '') {\n\t\t\t\tlist($oldW,$oldH)=getimagesize('/var/www/'.$row['user_photo']);\n\t\t\t\tif($oldW > 40) {\n\t\t\t\t\t$newW=40;\n\t\t\t\t\t$newH=($oldH/$oldW)*$newW;\n\t\t\t\t} else {\n\t\t\t\t\t$newW=$oldW;\n\t\t\t\t\t$newH=$oldH;\n\t\t\t\t}\n\n\t\t\t\techo '<img align=\"absmiddle\" width=\"'.$newW.'\" height=\"'.$newH.'\" src=\"'.$row['user_photo'].'\" onClick=\"showPopup(\\''.$row['user_photo'].'\\',\\''.$row['id'].'\\');\">\n\t\t\t\t<div class=\"popover_div\" id=\"popover_div_'.$row['id'].'\" style=\"display: none; border: 2px dashed '.$row['navbarBG'].';\">\n\t\t\t\t<div style=\"text-align: right\"><span onClick=\"showPopup(this,\\''.$row['id'].'\\');\" style=\"cursor: pointer;\"><b>[x] Close</b></span></div>\n\t\t\t\t<div class=\"popover_div_content\" id=\"popover_div_content_'.$row['id'].'\" style=\"display: none;\"></div>\n\t\t\t\t</div>\n\t\t\t\t&nbsp;';\n\t\t\t}\n\t\t\techo '<span class=\"user_fullname\">'.$row['displayName'].' </span>&nbsp; <span id=\"expand_closeuser'.$row['id'].'\" onClick=\"switcharoo(\\'user'.$row['id'].'\\');\" class=\"expander\">[+] expand</span><br>';\n\n\t\t\techo '<div id=\"user'.$row['id'].'\" style=\"display:none;\" class=\"user_details\">';\n\n\t\t\techo '<div class=\"user_personal_info\">';\n\t\t\tif(($row['firstname'].' '.$row['lastname']) != $row['displayName']) {\n\t\t\t\techo '<span class=\"user_personal\"><span class=\"user_personal_title\">name:</span> '.$row['firstname'].' '.$row['lastname'].'</span><br>';\n\t\t\t}\n\t\t\tif($row['email'] != '') {\n\t\t\t\techo '<span class=\"user_personal\"><span class=\"user_personal_title\">email:</span> <a href=\"mailto:'.$row['email'].'\">'.$row['email'].'</a></span><br>';\n\t\t\t}\n\t\t\tif(trim($row['blog']) != '') {\n\t\t\t\techo '<span class=\"user_personal\"><span class=\"user_personal_title\">blog:</span> <a href=\"'.$row['blog'].'\" target=\"_blank\">'.$row['blog'].'</a></span><br>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t\techo '<div class=\"user_data_section\">';\n\t\t\t$debris=explode(' ',$row['added']);\n\t\t\t$added = $debris[0];\n\t\t\techo '<span class=\"user_data\">member since: '.$this->prettyDate($added).'</span><br>';\n\n\t\t\tif($row['modified'] != $row['added'] and $row['modified'] != '0000-00-00 00:00:00') {\n\t\t\t\t$debris=explode(' ',$row['modified']);\n\t\t\t\t$moded = $debris[0];\n\t\t\t\techo '<span class=\"user_data\">info last updated: '.$this->prettyDate($moded).'</a></span><br>';\n\t\t\t}\n\n\n\t\t\tif($row['NumDownloads'] == 0) {\n\t\t\t\t$UDratio = $row['uploads'];\n\t\t\t} else {\n\t\t\t\t$UDratio = ($row['uploads']/$row['NumDownloads']) * 100;\n\t\t\t}\n\t\t\tif($row['uploads'] == 0) {\n\t\t\t\t$CUratio = $row['conversions'];\n\t\t\t} else {\n\t\t\t\t$CUratio = ($row['conversions']/$row['uploads']) * 100;\n\t\t\t}\n\t\t\techo '<span class=\"user_data\">usage ratio: '.$row['uploads'].'/'.$row['NumDownloads'].' <span class=\"ratio_val\">'.number_format($UDratio, 2).' %</span> (uploads/downloads) </span><br>';\n\t\t\techo '<span class=\"user_data\">conversion ratio: '.$row['conversions'].'/'.$row['uploads'].' <span class=\"ratio_val\">'.number_format($CUratio, 2).' %</span> (conversions/uploads) </span><br>';\n\n\t\t\t// display total thumbsup\n\t\t\t$thumbsUpTotal = mysql_fetch_array(mysql_query(\"select count(*) as thumbs from thumbsup where user_id = \".$row['id'])) or error_log(\"could not get total thumbs for user: \".mysql_error());\n\n\t\t\techo '<span class=\"user_data\">thumbsup\\'d: '.$thumbsUpTotal['thumbs'].'</span>';\n\n\t\t\t// find suggestions (if any)\n\t\t\t$suggestionsQuery = mysql_query(\"select id, type, user_id, similar, suggestion_id from suggestions where user_id = \".$row['id']) or error_log(\"can't get suggestion: \".mysql_error());\n\t\t\t$suggestionString = '';\n\t\t\tif(mysql_num_rows($suggestionsQuery) > 0) {\n\t\t\t\twhile($sugg = mysql_fetch_array($suggestionsQuery) ) {\n\t\t\t\t\t// lookup artist/album\n\t\t\t\t\tmysql_query(\"select name from \".$sugg['type'].\" where id = \".$sugg['suggestion_id']) or error_log(\"can't get name: \".mysql_error());\n\t\t\t\t\t$nameLookup = mysql_fetch_array(mysql_query(\"select name from \".$sugg['type'].\" where id = \".$sugg['suggestion_id']));\n\n\t\t\t\t\t$text = '<tr id=\"sugg_row'.$sugg['id'].'\"><td width=\"15\" height=\"10\"></td><td class=\"suggestion_list\"><b>'.$nameLookup['name'].'</b> ('.$sugg['type'].')';\n\t\t\t\t\tif($sugg['similar'] != '') {\n\t\t\t\t\t\t$text .= ' -- similar to: <i>'.$sugg['similar'].'</i>';\n\t\t\t\t\t}\n\t\t\t\t\tif($sugg['user_id'] == $this->id) {\n\t\t\t\t\t\t$text .= '&nbsp; <span class=\"delete_suggestion\" onClick=\"deleteSuggestion('.$sugg['id'].');\">delete</span>';\n\t\t\t\t\t}\n\t\t\t\t\t$text .= '</td></tr>\n\t\t\t\t\t';\n\t\t\t\t\t$suggestionString .= $text;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($suggestionString != '') {\n\t\t\t\techo '<br><span class=\"user_data\">Suggestions:</span><table cellpadding=\"0\" cellspacing=\"0\">'.$suggestionString.'</table>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t\techo '</div></div>';\n\n\t\t}\n\n\t}", "function load_info() {\n\tif ($_SESSION['dive_trainer']['userId'] == NULL || $_SESSION['dive_trainer']['userId'] == '') {\n\t\treturn;\n\t}\n\t\t\n\t$conn = getConnection();\n\t\n\t// Check if diver exists\n\t$query = sprintf('SELECT fname, lname, coachId FROM %s WHERE diverId = %s',\n\t\tmysql_real_escape_string(DIVERS_TABLE),\n\t\tmysql_real_escape_string($_SESSION['dive_trainer']['userId']));\n\t\t\n\t$result = mysql_fetch_array(mysql_query($query, $conn));\n\t\n\t$_SESSION['dive_trainer']['fname'] = $result['fname'];\n\t$_SESSION['dive_trainer']['lname'] = $result['lname'];\n\t$_SESSION['dive_trainer']['coachId'] = $result['coachId'];\n}", "function gigya_get_user($account) {\n $title = isset($account->title) ? $account->title : $account->name;\n drupal_set_title(check_plain($title));\n\n // Add the onload functions.\n $behavior_js = 'Drupal.behaviors.gigyaGetUserInfo = { attach: function(context, settings) { gigya.services.socialize.getUserInfo(Drupal.settings.gigya.conf, {callback:Drupal.gigya.getUserInfoCallback}); }}';\n drupal_add_js($behavior_js, array('type' => 'inline', 'scope' => JS_DEFAULT));\n\n $userinfo = '<div id=\"userinfo\"></div>';\n return $userinfo;\n}", "public function load_popup_call_user($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n \t// pd(count($arrUser['mobile']));\n \t$iUserActionId = $_SESSION['userId'];\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\tif(!empty($strAlertMsg)) {\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($strTimeAlert)) {\n\t\t\t$strTimeAlert = date(FORMAT_MYSQL_DATETIME, $strTimeAlert);\n\t\t}\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n 'ref_id' => $arrUser['userid'],\n\t\t\t'incident_id' => $strIncidentId,\n\t\t\t'alert_id' => $strAlertId,\n\t\t\t'alert_message' => $strAlertMsg, \n\t\t\t'time_alert' => $strTimeAlert,\n\t\t\t'change_id' => $strChangeId,\n\t\t\t'ip_action' => $this->strIpAddress\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strTimeAlert' => $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId), 'layout_popup');\n\t}", "function displayNots($username)\n{\n\t$sql = 'select * from notifications where username1 = \"' . $username . '\" and done = 0;';\n\t$result = mysql_query($sql);\n\tif( $this->hasNots($result) )\n\t{\n\n\techo('<div \n\t id=\"uniquename\" \n\t style=\"display:true;\"\n\t class=\"popup\">\n\t \n\t <div class=\"green_contentbox\">\n\t\t\t<div class=\"green_content_top\">\n\t\t\t\t<h3 class=\"content_box_header\">User Notification System</h3>\n\t\t\t</div>\n\t\t\t<div class=\"green_content\">');\n\t \n\t\twhile( $row = mysql_fetch_array($result) )\n\t\t{\n\t\t\t$this->setInfo($row);\n\t\t\techo('\n\t\t\t\t<h3 class=\"content_box_header\">' . $this->title . '</h3>\n\t\t\t\t<p>' . $this->text . '</p>\n\t\t\t\t\t<br />\n\t\t\t\t\t<br />\n\t\t\t\t\ton ' . dateFromTimestamp_Long($this->time) . '');\n\t\t\t$this->setDone($row['id']);\n\t\t}\n\techo('\n\t<br />\n\t<br />\n\t<br />\n\t<a onclick=\"HideContent(\\'uniquename\\'); return true;\"\n\t href=\"javascript:HideContent(\\'uniquename\\')\">\n\t[Close this window]\n\t</a>\n\t</div>\n\t\t\t<div class=\"green_content_bottom\">\n\t\t\t</div>\n\t\t</div>\n\t</div>');\n}\n}", "public function load_popup_sms_vng_staff_list() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; \n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n\t\t$arrOneUser = $this->contact_model->getStaffById($noUserId);\n\t\t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(!empty($arrOneUser)) {\n \t\t$arrOneUser['cellphone'] = str_replace($arrOrders, ', ', $arrOneUser['cellphone']);\n\t \t$arrOneUser['cellphone'] = str_replace($arrChildOrders, '', $arrOneUser['cellphone']);\n\t if(strpos($arrOneUser['cellphone'], ',')!==false) {\n\t $arrOneUser['cellphone'] = explode(', ', $arrOneUser['cellphone']);\n\t } else {\n\t $arrOneUser['cellphone'] = array($arrOneUser['cellphone']);\n\t }\n \t} else {\n \t\t$arrOneUser = array();\n \t}\n \t\n\t\t$this->loadview('contact/popup_send_message_VNGHR', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "private function _loadInfos($user) {\n\n\t\t$this->_firstname = $user['firstname'];\n\t\t$this->_lastname = $user['lastname'];\n\t\t$this->_group = $user['group'];\n\t\t$this->_properties = $user['app_properties'];\n\t\t$this->_level = $user['group']['level'];\n\t\t$this->_data = is_array($user['user_info']) ? $user['user_info'] : array();\n\n\t\tApp::$session->set('User.properties', $this->_properties);\n\t\tApp::$session->set('User.firstname', $user['firstname']);\n\t\tApp::$session->set('User.lastname', $user['lastname']);\n\t\tApp::$session->set('User.data', $user['user_info']);\n\t}", "static function show_user_profile($data) {\n\n // Make sure the user can view maps before displaying one.\n if ((module::get_var(\"exif_gps\", \"restrict_maps\") == true) && (identity::active_user()->guest)) {\n return;\n }\n\n // If there's nothing to map, hide the map.\n $items_count = ORM::factory(\"item\")\n ->join(\"exif_coordinates\", \"items.id\", \"exif_coordinates.item_id\")\n ->where(\"items.owner_id\", \"=\", $data->user->id)\n ->viewable()\n ->count_all();\n if ($items_count == 0) {\n return;\n }\n\n $map_provider_id = module::get_var(\"exif_gps\", \"provider\");\n\n // Display the map block.\n $v = new View(\"$map_provider_id/user_profile_exif_gps.html\");\n $int_map_type = module::get_var(\"exif_gps\", \"largemap_maptype\");\n if ($int_map_type == 0) $map_type = \"ROADMAP\";\n if ($int_map_type == 1) $map_type = \"SATELLITE\";\n if ($int_map_type == 2) $map_type = \"HYBRID\";\n if ($int_map_type == 3) $map_type = \"TERRAIN\";\n $v->map_type = $map_type;\n $v->user_id = $data->user->id;\n $v->items_count = $items_count;\n $v->google_map_key = module::get_var(\"exif_gps\", \"googlemap_api_key\");\n $data->content[] = (object) array(\"title\" => t(\"Photo Map\"), \"view\" => $v);\n }", "public function fetchAdditionalData()\n {\n ?>\n <script>\n jQuery(document).ready(function($) {\n\n $( '#result' ).on('click','.show-data',function(event) {\n \n var modal = document.getElementById(\"myModal\");\n var span = document.getElementsByClassName(\"close\")[0];\n var id = $(this).data('user_id');\n\n modal.style.display = \"block\";\n span.onclick = function() {\n modal.style.display = \"none\";\n }\n \n fetch(`https://jsonplaceholder.typicode.com/users/${id}`)\n .then(function(response) {\n if(!response.ok)\n {\n throw new Error(response.statusText);\n }\n return response;\n })\n .then((response) => response.json())\n .then( json => {\n const email = json.email;\n const phone = json.phone;\n const website = json.website;\n document.getElementById(\"email\").innerHTML = email;\n document.getElementById(\"phone\").innerHTML = phone;\n document.getElementById(\"website\").innerHTML = website;\n })\n })\n });\n </script>\n <?php \n }", "function popup($page_name = '',$param = '')\r\n\t{\r\n\t\t$this->load->model('Crud_model');\r\n\r\n\t\tif($page_name == 'add_user_model')\r\n\t\t{\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view('admin_models/add_models/add_user_model.php');\r\n\t\t}\r\n\t\telse if($page_name == 'edit_user_model')\r\n\t\t{\r\n\t\t\t$data['single_user'] = $this->Crud_model->fetch_record_by_id('mp_users',$param);\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view( 'admin_models/edit_models/edit_user_model.php',$data);\r\n\t\t}\r\n\t\t\r\n\t}", "public function loadUserData($username);", "function search_user(){\r\n\r\n\tglobal $con;\r\n\r\n\t// get the name ( the person the user is searching for ) the user inputed from the website \r\n\tif(isset($_GET['search_user_btn'])){\r\n\t\t\r\n\t\t$search_query = htmlentities($_GET['search_user']);\r\n\t\t// use that name and search through the whole users table for anything similar to that name ( first name, last name, or user name)\r\n\t\t$get_user = \"SELECT * from users where f_name like '%$search_query%' OR l_name like '%$search_query%' OR user_name like '%$search_query%'\";\r\n\t}\r\n\r\n\telse{ // if the person is not found, we will show all the other users in the database \r\n\r\n\t\t$get_user = \"SELECT * from users\";\r\n\t}\r\n\r\n\t$run_user = mysqli_query($con,$get_user);\r\n\r\n\twhile($row_user=mysqli_fetch_array($run_user)){\r\n\r\n\t\t$user_id = $row_user['user_id'];\r\n\t\t$f_name = $row_user['f_name'];\r\n\t\t$l_name = $row_user['l_name'];\r\n\t\t$username = $row_user['user_name'];\r\n\t\t$user_image = $row_user['user_image'];\r\n\r\n\t\t// if the user hovers the mouse over the image, it will show the user's username ( this is the first <a> tag )\r\n\t\t// near the 2nd <a> tag, we will show the user's first name and last name \r\n\t\techo \"\r\n\t\t\t<div class='row'>\r\n\t\t\t\t<div class='col-sm-3'>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class='col-sm-6'>\r\n\t\t\t\t\t<div class='row' id='find_people'>\r\n\t\t\t\t\t\t<div class='col-sm-4'>\r\n\t\t\t\t\t\t\t<a style='text-decoration: none;cursor: pointer;color: #3897f0;' href='user_profile.php?u_id=$user_id'>\r\n\t\t\t\t\t\t\t<img class='img-circle' src='users/$user_image' width='150px' height='140px' title='$username' style='float:left; margin:1px;'/>\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t</div><br><br>\r\n\t\t\t\t\t\t<div class='col-sm-6'>\r\n\t\t\t\t\t\t\t<a style='text-decoration: none;cursor: pointer;color: #3897f0;' href='user_profile.php?u_id=$user_id'>\r\n\t\t\t\t\t\t\t<strong><h2>$f_name $l_name</h2></strong>\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class='col-sm-3'>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class='col-sm-4'>\r\n\t\t\t\t</div>\r\n\t\t\t</div><br>\r\n\t\t\";\r\n\r\n\t}\r\n\r\n}", "function get_hotel_user_markup_details() {\r\n\t\t$ci = &get_instance ();\r\n\t\t\r\n\t\t$group_fk = $ci->entity_group_fk;\r\n\t\t$user_id = intval ( @$ci->entity_user_id );\r\n\t\t$level = 'level_4'; // agent setting the markup\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM markup_list ML WHERE user_oid IN (\" . $user_id . \") \r\n\t\t\t\tAND group_fk = \" . $group_fk . \" AND markup_level = '\" . $level . \"' AND \r\n\t\t\t\tmodule_type = 'Hotel' ORDER BY ML.user_oid DESC\";\r\n\t\t$output = $ci->db->query ( $sql )->result_array ();\r\n\t\treturn array (\r\n\t\t\t\t'status' => SUCCESS_STATUS,\r\n\t\t\t\t'markup' => $output\r\n\t\t);\r\n\t}", "protected function getUserInfo(){\n $this->userinfo = $this->users->GetUserInfoFromUsername($_SESSION['username']);\n $this->TPL['user'] = $this->userinfo;\n $this->TPL['user']['bio'] = $this->users->GetUserBio($this->userinfo['userId']);\n $this->TPL['user']['location'] = $this->location->GetLocationById($this->users->GetUserLocation($this->userinfo['userId']));\n $this->TPL['user']['age'] = $this->getAge($this->userinfo['dateOfBirth']);\n }", "function getDataUser() {\n checkIfNotAjax();\n $this->libauth->check(__METHOD__);\n $this->BeOnemdl->table = 'v_users';\n $select = 'id,username,fullname,jobtitle,usergroupname,departmentname,branchofficename';\n $searchfield = array('username','fullname','jobtitle','usergroupname','departmentname','branchofficename');\n $where = array('status' => '1');\n $addwhere = array();\n $result['results'] = $this->BeOnemdl->getSelect2bit($select, $searchfield, $where, $addwhere);\n $result['more'] = true;\n echo json_encode($result);\n }", "function MyProfile_user_display()\r\n{\r\n $myprofile_dom = ZLanguage::getModuleDomain('MyProfile');\r\n // Security check\r\n if (!SecurityUtil::checkPermission('MyProfile::', '::', ACCESS_OVERVIEW)) return LogUtil::registerPermissionError();\r\n\r\n\t// Add js\t\t\r\n\tPageUtil::addVar('javascript','modules/MyProfile/pnjavascript/myprofile.js');\r\n\t\r\n\t// Create output and assign data\r\n\t$render \t= pnRender::getInstance('MyProfile');\r\n\t$uid\t\t= (int) FormUtil::getPassedValue('uid');\r\n\t$viewer_uid\t= pnUserGetVar('uid');\r\n\t$uname\t\t= FormUtil::getPassedValue('uname');\r\n\r\n\t// check for parameters and redirect to own profiel if there is no parameter\r\n\tif (!isset($uname) && ($uid < 2) && pnUserLoggedIn()) {\r\n\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => $viewer_uid)));\r\n\t}\r\n\r\n\t// get Plugin\r\n\t$pluginname = FormUtil::getPassedValue('pluginname');\r\n\tif (!isset($pluginname)) $pluginname=\"MyProfile\";\r\n\r\n\t// Caching settings\r\n \t$render->cache_id = (int)pnUserLoggedIn().'-'.$uid.'-'.$pluginname;\r\n\r\n\t// redirect to the MyProfile display page with user id as parameter to acoid trouble with any mis-spelled usernames or special characters\r\n\t// but only if uid is not submitted.\r\n\tif (isset($uname)) {\r\n\t\tif (pnUserGetIDFromName($uname) > 1) {\r\n\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t}\r\n\t\telse {\r\n\t\t \t// maybe the username has to be decoded due to some special characters...\r\n\t\t \t$last = FormUtil::getPassedValue('last');\r\n\t\t \tif (isset($last) && ($last == 1)) {\r\n\t\t \t \t// is the username utf8 encoded?\r\n\t\t \t \t$uname = utf8_decode($uname);\r\n\t\t \t \tif (pnUserGetIDFromName($uname) > 1) return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t\t\telse return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => -1)));\r\n\t\t\t}\r\n\t\t \telse {\r\n\t\t \t \t// perhaps there are some special html characters?\r\n\t\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uname' => html_entity_decode($uname), 'last' => 1)));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// We only reach this point if there is no uname parameter. Now we have to get the username for the profile\r\n\t// Guests are not allowed to have a profile page ;-)\r\n\t\r\n\t// get and assign online state of user\r\n\t$online = pnModAPIFunc('MyProfile','user','getOnline',array('uid' => $uid));\r\n\tif (is_array($online) && ($online[0]['id'] == $uid)) $render->assign('onlinestatus', 1);\r\n\telse $render->assign('onlinestatus', 0);\r\n\r\n\t// get profile\r\n\t$uname = pnUserGetVar('uname', $uid);\r\n\tif ($uid > 1) $profile = pnModAPIFunc('MyProfile','user','getProfile',array('uid'=>$uid, 'uname'=>$uname));\r\n\tif (\t!isset($uname) \t\t\t||\r\n\t\t\t!(strlen($uname) > 0) \t||\r\n\t\t\t!($uid > 1) )\t{\r\n\t\t// assign invalid user or user not found template\r\n\t\t$render = pnRender::getInstance('MyProfile');\r\n\t\treturn $render->fetch('myprofile_user_display_invalid.htm');\r\n\t}\r\n\t$render->assign('profile',$profile);\r\n\t\r\n\t// assign user name and uid\r\n\tif (isset($uid) && ($uid > 1)) $uname = pnUserGetVar('uname',$uid);\r\n\telse $name = pnUserGetIDFromName($uid);\r\n\t$render->assign('uname',\t\t\t\t$uname);\r\n\t$render->assign('encuname',\t\t\t\trawurlencode($uname));\r\n\t$render->assign('uid',\t\t\t\t\t$uid);\r\n\t$render->assign('viewer_uid',\t\t\t$viewer_uid);\r\n\t$render->assign('plugin_noajax',\t\tpnModGetVar('MyProfile','plugin_noajax'));\r\n\t$render->assign('homelink',\t\t\t\tpnGetBaseURL().pnModURL('MyProfile','user','tab',array('uid'=>$uid,'ajax'=>1,'modname'=>'MyProfile')));\r\n\r\n\t// Set Standard page title\r\n\tPageUtil::setVar('title', __('Profile of user', $myprofile_dom).' '.$uname);\r\n\r\n\t// ContactList plugin\r\n\t$render->assign('contactlistavailable',\tpnModAvailable('ContactList'));\r\n\tif (pnModAvailable('ContactList')) $render->assign('contactlist_nopublicbuddylist',\tpnModGetVar('ContactList','nopublicbuddylist'));\r\n\t\r\n\t$render->assign('pluginname',$pluginname);\r\n\tif (($pluginname != \"MyProfile\") && pnModAvailable($pluginname)) pnModLangLoad($pluginname);\r\n\r\n // get the plugins\r\n $plugins = pnModAPIFunc('MyProfile','admin','getPlugins',array('uid' => $uid));\r\n\r\n $render->assign('plugins',$plugins);\r\n // execute all \"onLoad\"-Funktions and sort out the invisible plugins\r\n pnModAPIFunc('MyMap','myprofile','onLoad');\r\n foreach ($plugins as $plugin) {\r\n\t \tpnModAPIFunc($plugin['loadname'],'myprofile','onLoad');\r\n\t}\r\n\t\r\n\t// and all necessary stylesheets\r\n\tpnModAPIFunc('MyProfile','user','addStyleSheets',array('plugins' => $plugins));\t\r\n\r\n\t// let's combine myprofile with clickedme and call clickedme whenever \r\n\t// anything (even a plugin) of a user was called\r\n\tif (($uid != $viewer_uid) && (pnModAvailable('ClickedMe'))) pnModAPIFunc('ClickedMe','user','addClick',array('clicked_uid' => $uid));\r\n\r\n\t// get the plugin output\r\n\t$output = pnModAPIFunc($pluginname,'myprofile','tab',array('uid' => $uid, 'uname' => $uname));\r\n\t$render->assign('content',$output);\r\n\t\r\n\t// Return the output\r\n return $render->fetch('myprofile_user_display.htm');\r\n}", "function leadership_user_login_link_popup($user, $js = NULL) {\n $uli = _leadership_user_login_link($user);\n $popup_content = t('<p>One-time login link for @username.</p>', array('@username' => format_username($user)));\n $popup_content .= '<p>' . $uli . '</p>';\n\n // Checking JavaScript is enabled.\n if (!$js) {\n // If JavaScript is disabled, add return link and output\n // content without the popup.\n $popup_content .= '<p>' . l(t('Return'), 'admin/leadership/user');\n return $popup_content;\n }\n\n // If everything is ok and JavaScript is enabled, add the necessary\n // libraries and JS to work with modal windows.\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n\n // Forming a modal window.\n return (ctools_modal_render('User Login Link', $popup_content));\n}", "function popover($uid, $username, $name) {\n global $system;\n $popover = '<span class=\"js_user-popover\" data-uid=\"'.$uid.'\"><a href=\"'.$system['system_url'].'/'.$username.'\">'.$name.'</a></span>';\n return $popover;\n}", "public function onLoadPopup()\n {\n $model = $this->controller->widget->list->model;\n\n $records = $model::make()->getAllRoot();\n if ($this->index) {\n $records->sortBy($this->index);\n }\n\n return $this->makePartial('popup', [\n 'records' => $records,\n 'header' => $this->header,\n 'empty' => $this->empty,\n ]);\n }", "public function getPopUpInfo(){\n \n $output = \"\";\n\n $qualification = $this->getQualification();\n $unit = $this->getUnit();\n $values = $this->getPossibleValues();\n\n $output .= \"<div class='gt_criterion_popup_info'>\";\n\n if ($this->student){\n $output .= \"<br><span class='gt-popup-studname'>{$this->student->getDisplayName()}</span><br>\";\n } \n\n if ($qualification){\n $output .= \"<span class='gt-popup-qualname'>{$qualification->getDisplayName()}</span><br>\";\n }\n\n if ($unit){\n $output .= \"<span class='gt-popup-unitname'>{$unit->getDisplayName()}</span><br>\";\n }\n\n $output .= \"<span class='gt-popup-critname'>{$this->getName()}</span><br>\";\n\n $output .= \"<p><i>{$this->getDescription()}</i></p>\";\n \n $output .= \"<div class='gt_criterion_info_popup_heading'>\".get_string('value', 'block_gradetracker').\"</div>\";\n \n $output .= \"<div class='gt_c'>\";\n \n if ($values)\n {\n \n $output .= \"<img class='gt_award_icon' src='{$this->getUserAward()->getImageURL()}' alt='{$this->getUserAward()->getShortName()}' /><br>\";\n $output .= \"<span class='gt-popup-unitname'>{$this->getUserAward()->getName()}</span>\";\n $output .= \"<br><br>\";\n $output .= get_string('lastupdatedby', 'block_gradetracker') . ' <b>'. ( ($this->getUserLastUpdateByUserID() > 0) ? $this->getUserLastUpdateBy()->getName() : '-') . '</b>';\n $output .= \"&nbsp;&nbsp;&nbsp;\";\n $output .= get_string('updatetime', 'block_gradetracker') . ' <b>'.( ($this->getUserAwardDateOrUpdateDate()) ? $this->getUserAwardDateOrUpdateDate('D jS M Y, H:i') : '-' ) . '</b>';\n \n }\n else\n {\n $output .= \"<b>\".get_string('readonly', 'block_gradetracker').\"</b>\";\n }\n \n $output .= \"</div>\";\n \n if ($this->hasUserComments())\n {\n $output .= \"<div class='gt_criterion_info_popup_heading'>\".get_string('comments', 'block_gradetracker').\"</div>\";\n $output .= \"<div class='gt_criterion_info_comments'>\";\n $output .= gt_html($this->userComments, true);\n $output .= \"</div>\";\n } \n \n // Sub Criteria\n if ($this->getChildren())\n {\n $output .= \"<div class='gt_criterion_info_popup_heading'>\".get_string('subcriteria', 'block_gradetracker').\"</div>\";\n $output .= \"<div class=''>\";\n $output .= \"<table class='gt_unit_popup_criteria_table'>\";\n $output .= \"<tr><th>\".get_string('name').\"</th><th>\".get_string('details', 'block_gradetracker').\"</th><th>\".get_string('value', 'block_gradetracker').\"</th><th>\".get_string('comments', 'block_gradetracker').\"</th></tr>\";\n foreach($this->getChildren() as $child)\n {\n $output .= \"<tr>\";\n $output .= \"<td>{$child->getName()}</td>\";\n $output .= \"<td>{$child->getDescription()}</td>\";\n $output .= \"<td>\";\n $output .= $child->getUserAward()->getShortName();\n // If we are using DATE grading type, display that date awarded\n if ($child->getAttribute('gradingtype') == 'DATE' && $child->getUserAwardDate() > 0)\n {\n $output .= \" <small>({$child->getUserAwardDate('d-m-Y')})</small>\";\n }\n $output .= \"</td>\";\n $output .= \"<td>\".\\gt_html($child->getUserComments()).\"</td>\";\n $output .= \"</tr>\";\n }\n $output .= \"</div>\";\n }\n \n $output .= \"</div>\";\n \n return $output;\n \n }", "public function getuserinfo($data){\n\t// responds JSON data of reading to ajax poll.\n\t\n\t\n\t$this->model->getuserinfo($data);\n\t\n}", "function logedin_user_display( )\n{\n global $LANG_CROWDTRANSLATOR_1, $_USER;\n $display = \"<div class='translator'>\";\n //plugin info\n $display .= COM_startBlock( \"Plugin info <a id='info' href='javascript:void(0)' onclick='show(this.id)'> (show) </a>\" );\n $display .= \"<div id='info_content' class='hidden'>\" . get_info_text( $LANG_CROWDTRANSLATOR_1[ 'plugin_name' ] ) . \"</div>\";\n $display .= COM_endBlock();\n //stats\n $display .= COM_startBlock( \"Quick Stats\" );\n $display .= \"<table><tbody>\";\n $display .= \"<tr><td>Translated by you: </td> <td>\" . get_translated_count( 0 ) . \"</td> <td>Translations submited: </td> <td>\" . get_translated_count( 1 ) . \"</td> <td> </tr>\";\n $display .= \"<tr><td>Total approvals: </td> <td>\" . get_total_approval_for_user() . \"</td> <td>Total votes: </td> <td>\" . get_votes_count() . \"</td> </tr>\";\n $display .= \"<tr><td>Most upvotes for you: </td> <td> \" . get_most_upvotes( 0 ) . \" </td> <td>Most upvotes: </td> <td> \" . get_most_upvotes( 1 ) . \" </td></tr>\";\n $display .= \"<tr><td>You voted: </td> <td> \" . get_user_votes() . \" </td> </td> <td>Users translating: </td> <td> \" . get_users_translating() . \" </td> </tr>\";\n $display .= \"</table></tbody>\";\n $display .= \"<div id='user_languages_translated' style='clear:both;'>\";\n $display .= get_user_translated_languages( $_USER[ 'uid' ] );\n $display .= \"</div>\";\n $display .= COM_endBlock();\n $display .= COM_startBlock( \"My Badges <a id='info' href='javascript:void(0)' onclick='show(this.id)'> (show all) </a>\" );\n $display .= get_user_badges( 4 );\n $display .= COM_endBlock();\n //translations table\n $translations = get_user_translations_table( 5 );\n $display .= COM_startBlock( \"Your translations\" );\n $display .= \" <div id='user_translations'> {$translations} </div>\";\n $display .= COM_endBlock();\n $display .= \"</div>\";\n return $display;\n}", "public function user_details_get() {\n\n\t\t$result = $this->_plugin->user_details(\n\t\t\t$this->get('publicButtonId'),\n\t\t\t$this->get('publicUserId')\n\t\t);\n\t\t\n\t\t$this->response($result);\n\t}", "function display_users_list()\r\n\t{\r\n\t\t$this->body .= geoAdmin::m();\n\t\t\n\t\tif ($_REQUEST[\"b\"] && is_array($_REQUEST[\"b\"]) && !isset($_REQUEST['b']['password'])) {\r\n\t\t\t//search users\r\n\t\t\t$this->list_users(0,$_REQUEST[\"b\"]);\r\n\t\t} else {\r\n\t\t\t//display the simple and advanced search box\r\n\t\t\t$this->list_users();\r\n\t\t}\n\t\t$this->display_page();\r\n\t}", "function load(user_id)\n{\n\t// use the user_id to search for and load any records that it matches\n}", "function user_info($db)\n{\n $r = $db->get_byid($db, $_SESSION['user_id_loggedin']); //$r = get_ byid($_ SESSION['user_ id']);\n //echo __FILE__ .' SAYS: <pre>$r='; if (isset($r)) print_r($r); else echo 'NOT SET'; echo '</pre><br />';\n\n //if(!isset($r->bio)){\n $_SESSION['user_name_loggedin'] = $r->user_name;\n $name = ucwords($r->user_name);\n\n if(empty($r->address)){\n $address = \"<a href='index.php?address'>Add Address</a>\";\n } else {\n $address = $r->address;\n }\n if(empty($r->bio)){\n $bio = \"<a href='#' data-target='#bio' data-toggle='modal'>Add Bio <i class='fa fa-plus-circle'></i></a>\";\n } else {\n $bio = $r->bio;\n }\n if(empty($r->facebook)){\n $facebook = \"<a href='#' data-target='#facebook' data-toggle='modal'>Add Facebook <i class='fa fa-plus-circle'></i></a>\";\n } else {\n $facebook = \"<a href='$r->facebook' target='_blank'><i class='fa fa-facebook'></i> Connected</a>\";\n }\n if(empty($r->linkedin)) {\n $linkedin = \"<a href='#' data-target='#linkedin' data-toggle='modal'>Add Linkedin <i class='fa fa-plus-circle'></i></a>\";\n } else {\n $linkedin = \"<a href='$r->linkedin' target='_blank'><i class='fa fa-linkedin'></i> Connected</a>\";\n }\n?>\n\n\n <div class='row user-info'>\n <div class='col-md-3'><span>Logged in user</span></div>\n <div class='col-md-9'><?=$name . ', id=' . $_SESSION['user_id_loggedin']?></div>\n </div>\n <div class='row user-info'>\n <div class='col-md-3'><span>Address</span></div>\n <div class='col-md-9'><?=$address?></div>\n </div>\n <div class='row user-info'>\n <div class='col-md-3'><span>Biography</span></div>\n <div class='col-md-9'><?=$bio?></div>\n </div>\n <div class='row user-info'>\n <div class='col-md-3'><span>Facebook</span></div>\n <div class='col-md-9'><?=$facebook?></div>\n </div>\n <div class='row user-info'>\n <div class='col-md-3'><span>Linkedin</span></div>\n <div class='col-md-9'><?=$linkedin?></div>\n </div>\n<?php\n}", "function _load_user_print_info() {\n // get all user object\n $users = entity_load('user');\n $field_names = _user_method_collections();\n\n foreach ($users as $user) {\n if ($user->uid > 1 && $user->uid < 230000000000) {\n $output[$user->uid] = array(\n \"name\" => $user->name,\n \"email\" => $user->mail,\n \"roles\" => $user->roles,\n );\n\n foreach ($field_names as $field_name => $row) {\n $field_value = NULL;\n $field_info = field_info_field($row['d7_field_name']);\n\n if ($field_info['type'] == 'entityreference') {\n // check is user or term\n if ($field_info['settings']['target_type'] == 'user') {\n if (isset($user->{$row['d7_field_name']}['und'][0]['target_id'])) {\n $user = user_load($user->{$row['d7_field_name']}['und'][0]['target_id']);\n if (isset($user->name)) {\n $field_value = $user->name;\n }\n }\n }\n else {\n if (isset($user->{$row['d7_field_name']}['und'][0]['target_id'])) {\n foreach ($user->{$row['d7_field_name']}['und'] as $value) {\n $field_term = \\Drupal\\taxonomy\\Entity\\Term::load($value['target_id']);\n if (isset($field_term->name)) {\n $field_value[] = $field_term->name;\n }\n }\n }\n }\n }\n else { // text, date\n if (isset($user->{$row['d7_field_name']}['und'][0]['value'])) {\n $field_value = $user->{$row['d7_field_name']}['und'][0]['value'];\n }\n }\n\n $output[$user->uid]['field'][$row['d8_field_name']] = $field_value;\n }\n }\n }\n\n $json_data = json_encode($output, JSON_UNESCAPED_UNICODE);\n}", "function specialusersObject()\n\t{\n\t\tglobal $ilAccess, $ilTabs;\n\t\t\n\t\t// #7927: special users are deprecated\n\t\texit();\n\n\t\t/*\n\t\t$ilTabs->activateTab(\"specialusers\");\n\t\t\n\t\t$a_write_access = ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())) ? true : false;\n\t\t$this->tpl->addBlockFile(\"ADM_CONTENT\", \"adm_content\", \"tpl.il_svy_adm_specialusers.html\", \"Modules/Survey\");\n\t\t$found_users = \"\";\n\t\tif (array_key_exists(\"survey_adm_found_users\", $_SESSION))\n\t\t{\n\t\t\tif (count($_SESSION[\"survey_adm_found_users\"]))\n\t\t\t{\n\t\t\t\t$data = $_SESSION[\"survey_adm_found_users\"];\n\t\t\t\tinclude_once(\"./Modules/Survey/classes/tables/class.ilFoundUsersTableGUI.php\");\n\t\t\t\t$table_gui = new ilFoundUsersTableGUI($this, \"specialusers\");\n\t\t\t\t$table_gui->setPrefix(\"fu\");\n\t\t\t\t\n\t\t\t\t$table_gui->setTitle($this->lng->txt(\"found_users\"));\n\t\t\t\t$table_gui->setData($data);\n\t\t\t\t\n\t\t\t\tif ($a_write_access)\n\t\t\t\t{\n\t\t\t\t\t$table_gui->addCommandButton(\"addSpecialUser\", $this->lng->txt(\"add\"));\n\t\t\t\t\t$table_gui->setSelectAllCheckbox(\"user_id\");\n\t\t\t\t}\n\t\t\t\t$found_users = $table_gui->getHTML();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (strlen($found_users))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"search_results\");\n\t\t\t$this->tpl->setVariable(\"SEARCH_RESULTS\", $found_users);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t}\n\t\t$this->tpl->setCurrentBlock(\"adm_content\");\n\t\t$this->tpl->setVariable(\"TXT_SEARCH_USER\", $this->lng->txt(\"search_users\"));\n\t\t$this->tpl->setVariable(\"TXT_SEARCH\", $this->lng->txt(\"search\"));\n\t\t$this->tpl->setVariable(\"FORMACTION\", $this->ctrl->getFormAction($this, \"search\"));\n\n\t\t$special_users = $this->object->getSpecialUsers();\n\t\tif (count($special_users))\n\t\t{\n\t\t\tinclude_once(\"./Modules/Survey/classes/tables/class.ilSpecialUsersTableGUI.php\");\n\t\t\t$table_gui = new ilSpecialUsersTableGUI($this, \"specialusers\", $a_write_access);\n\t\t\t$table_gui->setPrefix(\"su\");\n\t\t\t\t\t\n\t\t\t$table_gui->setTitle($this->lng->txt(\"adm_special_users\"));\n\t\t\t$table_gui->setData($special_users);\n\t\t\t\n\t\t\tif ($a_write_access)\n\t\t\t{\n\t\t\t\t$table_gui->addCommandButton(\"removeSpecialUser\", $this->lng->txt(\"remove\"));\n\t\t\t\t$table_gui->setSelectAllCheckbox(\"special_user_id\");\n\t\t\t}\n\t\t\t$this->tpl->setVariable(\"SPECIAL_USERS\", $table_gui->getHTML());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->tpl->setVariable(\"SPECIAL_USERS\", $this->lng->txt(\"adm_no_special_users\"));\n\t\t}\n\t\t$this->tpl->parseCurrentBlock();\t\t \n\t\t*/\n\t}", "function load_form()\n\t{\n\t\t# Get the passed details into the form data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(4, array('user_id'));\n\t\t\n\t\t# User is editing\n\t\tif($urldata['user_id'] !== FALSE){\n\t\t//echo $urldata['user_id'];\n\t\t $data['user_id'] = $urldata['user_id'];\n\t\t\n\t\t\t$data['companyuserdetails'] = $this->Query_reader->get_row_as_array('pick_user_by_id', array('user_id'=>$urldata['user_id']));\n\t\t}\n\n\t\t$data['userdetails'] = $this->session->userdata('alluserdata');\n\t\t$id=$data['userdetails']['companyid'];\n\t\t$query = $this->Query_reader->get_query_by_code('pick_all_users', array('company_id'=>$id));\n\t\t$result = $this->db->query($query);\n\t\t$data['returned']= $result->num_rows();\n\t\t$data['user_array'] = $result->result_array();\n\t\t$data['curPage']='company';\n \t\t$data['service'] = $this->reminder->get_reminders();\n \t$data['insurance'] = $this->reminder->insurance_reminder();\n \t$data['license'] = $this->reminder->license_reminder();\n\n\t // notices\n\t\t$this->db->where( 'to_employee' ,$data['userdetails']['userid']);\t\t\n\t\t$this->db->where( 'has_read', '0');\t\t\n\t\t$notices = $this->db->get('notice_details');\n\t\t$data['count_notices'] = $notices->num_rows();\n\t\t$data['notice_details'] = $notices->result_array();\n\n\t\t$this->load->view('companyprofile/manageusers', $data);\n\t}", "public static function User_management_information_display_user_data()\n {\n $userId = geoSession::getInstance()->getUserId();\n $util = geoAddon::getUtil('storefront');\n if ($util && $util->userHasCurrentSubscription($userId)) {\n $db = DataAccess::getInstance();\n //show link to edit the html placed on affiliate site\n $msgs = geoAddon::getText('geo_addons', 'storefront');\n $label = $msgs['mal_storefront_link'];\n\n $link = $db->get_site_setting('classifieds_url') . \"?a=ap&amp;addon=storefront&amp;page=home&amp;store={$userId}\";\n\n //let SEO (or any other addon) rewrite this link\n $link = geoAddon::triggerDisplay('rewrite_single_url', array('url' => $link, 'forceNoSSL' => true), geoAddon::FILTER);\n if (is_array($link)) {\n //addon call returned the input array instead of a url string (meaning no addon chose to rewrite the url)\n //make sure to only keep the important part\n $link = $link['url'];\n }\n\n $text_link = $link;\n $val = \"<a href='{$link}' id='storeLink' class='data_values'>$text_link</a>\";\n\n\n return array('label' => $label, 'value' => $val);\n }\n }", "function search_users() \r\n\t{\r\n\t\t$merchant=0;\r\n\t\t$store=0;\r\n\t\t\r\n\t\t$access_level=$_SESSION['access_level'];\r\n\t\t$view_level=$_SESSION['view_access_level'];\r\n\t\tif(isset($_SESSION['merchant_id']))\t\t$merchant=$_SESSION['merchant_id'];\r\n\t\tif(isset($_SESSION['store_id']))\t\t\t$store=$_SESSION['store_id'];\r\n\t\t\r\n\t\t$filter=\"\";\r\n\t\tif($store > 0 && $access_level <= 40)\t\t$filter.=\" and store_id='\".sql_friendly($store).\"'\";\r\n\t\tif($merchant > 0 && $access_level <= 80)\t$filter.=\" and merchant_id='\".sql_friendly($merchant).\"'\";\r\n\t\tif($view_level < 100)\t\t\t\t\t$filter.=\" and access_level < '\".sql_friendly($view_level).\"'\";\r\n\t\t\t\t\r\n\t\t$sql = \"\r\n\t\t\tselect *\r\n\t\t\t\r\n\t\t\tfrom users\r\n\t\t\twhere (username like '%\".sql_friendly($_GET['q']).\"%')\r\n\t\t\t\tand deleted = 0\r\n\t\t\t\t\".$filter.\"\r\n\t\t\torder by username\r\n\t\t\tlimit 100\r\n\t\t\";\r\n\t\t$data = simple_query($sql);\r\n\t\t\r\n\t\twhile($row = mysqli_fetch_array($data)) {\r\n\t\t\techo \"$row[username]|$row[first_name] $row[last_name]\\n\";\r\n\t\t}\r\n\t}", "private function Load_User_Functions()\r\n{\r\n\tif($this->users_model->user) {\r\n\t\t$user_functions = $this->users_model->user->get_data('user_functions');\r\n\t\tif($user_functions) $this->user_keywords = $user_functions;\r\n\t}\r\n\t\r\n\t\r\n}", "function ft_display_userpage($username) {\n ft_is_logged();\n $username = $_SESSION['username'];\n $title = 'CAMAGRU: Page personnelle';\n\n // Getting user information\n $userManager = new UserManager();\n $query = $userManager->ft_user_info(array('username' => $username));\n $userInfo = $query->fetch();\n $query->closeCursor();\n\n ob_start();\n require_once('./view/ownprofile.php');\n $content = ob_get_clean();\n require_once('./view/standard.php');\n}", "public function processFrontendPopup($data) {\n $sql = $this->wpdb->prepare('SELECT popup FROM ' . CubePortfolioMain::$table_cbp . ' WHERE id = %d', $data['id']);\n $popup = json_decode($this->wpdb->get_var($sql));\n if (!$popup) return;\n\n $element = null;\n\n foreach ($popup as $item) {\n if ($item->link == $data['link'] && $item->type == $data['type']) {\n $element = $item;\n }\n }\n\n if ($element) {\n\n if ($element->html) {\n echo $element->html;\n die();\n }\n\n if ($data['selector'] == 'automatically') {\n add_filter('the_content', array(&$this, 'cbpw_ajax_content_filter'));\n }\n }\n }", "abstract function loadUserData();", "public function load_popup_call_staff_VNGHR($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n\t\t//write log for user calling\n\t\t$this->insert_call_action_history($arrUser['id'], $arrUser['fullname'], $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId, NOTIFY_ACTION_TYPE_CALL);\n\t\t$this->loadview('contact/popup_call_vng_staff_list', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t'strIncidentId'\t\t=> $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t'strAlertId'\t\t=> $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' \t\t=> $strAlertMsg, \n\t\t\t\t\t\t\t\t\t\t\t\t'strTimeAlert' \t\t=> $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId'\t\t=> $strChangeId)\n\t\t\t\t\t\t\t\t\t\t\t\t, 'layout_popup');\n\t}", "public function get_users_for_ajax_search() {\n\t\t$search_query = isset( $_REQUEST['q'] ) ? $_REQUEST['q'] : '';\n\t\t$user_level = isset( $_REQUEST['level'] ) && is_numeric( $_REQUEST['level'] )\n\t\t\t? absint( $_REQUEST['level'] )\n\t\t\t: '2';\n\n\t\tif ( empty( $search_query ) ) {\n\t\t\twp_send_json_error( 'No search query' );\n\t\t}\n\n\n\t\t$users = $this->users_search_by_level( $search_query, $user_level );\n\t\twp_send_json_success( $users );\n\t}", "function culturefeed_bootstrap_preprocess_culturefeed_pages_user_search_result(&$variables) {\n\n $variables['total'] = $variables['result']->total;\n $accounts = culturefeed_get_uids_for_users($variables['result']->objects);\n\n $members = array();\n foreach ($variables['user_list']->memberships as $membership) {\n $members[] = $membership->user->id;\n }\n\n $add_options = array(\n 'attributes' => array(\n 'role' => 'button',\n 'data-toggle' => 'modal',\n 'data-target' => '#page_confirm',\n ),\n 'query' => drupal_get_query_parameters(),\n );\n\n $variables['results'] = array();\n foreach ($variables['result']->objects as $object) {\n\n if (!isset($accounts[$object->id])) {\n continue;\n }\n\n $result = array();\n $result['nick'] = check_plain($object->nick);\n $result['profile_link'] = l(t('View profile'), 'user/' . $accounts[$object->id]);\n $result['profile_url'] = url('user/' . $accounts[$object->id]);\n $add_options['attributes']['data-remote'] = url('pages/' . $variables['page']->getId() . '/membership/add/' . $object->id . '/ajax', array('query' => $add_options['query']));\n $result['add_link'] = in_array($object->id, $members) ? '<small class=\"text-muted\">' . t('Member of') . ' ' . $variables['page']->getName() . '</small>' : '<a class=\"btn btn-default btn-xs\" href=\"' . url('pages/' . $variables['page']->getId() . '/membership/add/' . $object->id . '/nojs', $add_options) . '\"><i class=\"fa fa-user fa-fw\"></i>' . ' ' . t('Add as member') . '</a>';\n $variables['results'][] = $result;\n\n }\n\n}", "function call_center_admin_system_user_autocomplete($callcenter_id, $json=TRUE) {\n\t$matches = array();\n\t$result = db_select('users')->fields('users', array('uid', 'name'))->condition('uid', 1, '>')->range(0, 50)->execute();\n\t//$subquery_string = 'SELECT gu.uid FROM {call_center_user_privilege} gu WHERE gu.id = :id';\n\t//$query_string = 'SELECT u.uid, u.name FROM {users} u WHERE u.uid > 1 AND u.uid NOT IN ('.$subquery_string.') ORDER BY u.name';\n\t//$result = db_query($query_string, array(':id' => $callcenter_id));\n\tforeach ($result as $user) {\n\t\t$matches[$user->uid] = check_plain($user->name);\n\t}\n\tif($json) drupal_json_output($matches);\n\telse return $matches;\n}", "public function setUserDisplay(){\r\n\t\t$this->notifications = $this->controller->getNotificacionesUser();\r\n\t}", "function initialUsersLoad ()\n\t{\n\t\t$this->loadNewUsers( true );\n\t}", "function view_details($choice,$flag,$user){\r\n\t$query = \"SELECT * FROM users WHERE userName = '{$user}' \";\r\n\t$result = mysql_query($query);\r\n\tconfirm_query($result);\r\n\t$users = mysql_fetch_assoc($result);\r\n\t$user_since =date(\"d.m.Y H:i:s\",$users['creationDate']);\r\n\t$last_login = date(\"d.m.Y H:i:s\",$users['lastLogin']);\r\n\tif($users['status'] == 1){ $userStatus = \"active\"; }\r\n\telse{ $userStatus == \"inactive\"; }\r\nif($user == $_SESSION['USERNAME'] || $_SESSION['ACCESSCODE']==\"green\"){\r\necho\"\r\n\t<div id='myform' class='cols'>\r\n\t\t<div class='alpha'>\r\n\t\t\t\t<label> user id <input type='text' name='userid' required='required' readonly='readonly' autocomplete='on' value='\".$users['id'].\"'/> </label>\r\n\t\t\t\t<label> full name <input type='text' name='fullName' maxlength='30' required='required' readonly='readonly' autocomplete='on' value='\".$users['fullName'].\"'/> </label>\r\n\t\t\t\t<label> address <input type='text' name='address' required='required' readonly='readonly' autocomplete='on' value='\".$users['address'].\"'/> </label>\r\n\t\t\t\t<label> email <input type='email' required='required' minlength='9' name='eMail' readonly='readonly' autocomplete='on' value='\".$users['eMail'].\"'/> </label> \r\n\t\t\t\t<label> display name <input type='text' name='displayName' maxlength='16' required='required' readonly='readonly' autocomplete='on' value='\".$users['displayName'].\"'/> </label>\r\n\t\t\t\t<label> cell no <input type='number' name='cellNo' maxlength='16' required='required' readonly='readonly' autocomplete='on' value='\".$users['cellNo'].\"'/> </label>\r\n\t\t</div>\r\n\t\t<div class='beta'>\r\n\t\t\t\t<label> username <input type='text' name='userName' minlength='6' required='required' autocomplete='on' readonly='readonly' value='\".$users['userName'].\"'/> </label>\r\n\t\t\t\t<label> access code <input type='text' name='accessCode' required='required' autocomplete='on' readonly='readonly' value='\".$users['accessCode'].\"'/> </label>\r\n\t\t\t\t<label> user since <input type='text' name='creationDate' required='required' readonly='readonly' autocomplete='on' value='\".$user_since.\"'/> </label>\r\n\t\t\t\t<label> last login <input type='text' name='creationDate' required='required' readonly='readonly' autocomplete='on' value='\".$last_login.\"'/> </label>\r\n\t\t\t\t<label> total sale <input type='text' name='accessCode' required='required' autocomplete='on' readonly='readonly' value='\".$users['totalSale'].\"'/> </label>\r\n\t\t\t\t<label> user status <input type='text' name='creationDate' required='required' readonly='readonly' autocomplete='on' value='\".$userStatus.\"'/> </label>\r\n\t\t</div>\r\n\r\n\t\t<div class='clear'></div>\r\n\t\t\r\n\t</div>\r\n\";\r\n}\r\nelse{\r\naccess_denied();\r\n}\r\n}", "public function getUserQuickInfos()\n {\n $model = new QuickInfosModel();\n $quickinfosObj = $model->getQuickInfosFromIdUser($this->userToDisplay->pk_iduser); //#todo, encore une requette de plus qui aurai peux etre été résolue par un joi nde l'user sur ses quickinfos, a voir a ce niveau la pour optimiser\n $display = new displayQuickinfos($quickinfosObj, $this->profilePart);\n return $display->show();\n }", "function getMapUserObj()\n{\n global $usr; // $usr is set in common.inc.php\n\n // check if map is for logged user or user want to preview someone else\n if (isset($_REQUEST['userid'])) {\n $previewUserId = intval($_REQUEST['userid']);\n\n // load User data from DB\n $userObj = new User(array(\n 'userId' => $previewUserId,\n 'fieldsStr' => 'user_id,latitude,longitude,username'\n ));\n\n if ($userObj->isDataLoaded()) {\n //user found\n tpl_set_var('extrauserid', $previewUserId);\n return $userObj;\n }\n\n // preview user not found - wrong userId?\n // ...let's continue for currently logged user\n }\n\n // this is map for currently logged user\n\n // load User data from DB\n $userObj = new User(array(\n 'userId' => $usr['userid'],\n 'fieldsStr' => 'user_id,latitude,longitude,username'\n ));\n\n if ($userObj->isDataLoaded()) {\n // user found\n tpl_set_var('extrauserid', \"\");\n return $userObj;\n } else {\n // currently logged user not found - It should never happen\n\n // user not logged - redirect to login page...\n $usr = null;\n $target = urlencode(tpl_get_current_page());\n tpl_redirect('login.php?target=' . $target);\n exit();\n }\n}", "public function actionAjaxLoadUser($keyword){\n $usersAttributes = User::model()->searchUsersToAssign($keyword);\n $this->renderJSON(array($usersAttributes));\n }", "function uinfo_display($id, $align, $name, $email, $url, $all){\n\t\n\t$atts = array(\"id\" => $id, \"align\" => $align ,\"name\" => $name, \"email\" => $email, \"url\" => $url, \"all\" => $all);\n\t\n\t\n\t\n\t\n\treturn jm_user_info($atts);\n\t\n}", "public function load_popup_sms() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = @$_REQUEST['incident_id'];\n\t\t$strAlertId = @$_REQUEST['alert_id'];\n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = isset($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = isset($_REQUEST['change_id']) ? trim($_REQUEST['change_id']) : null;\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n\t\t$arrOneUser = array();\n\t\tif($noUserId != null) {\n\t\t\t$arrOneUser = $this->contact_model->getUserById($noUserId);\n\t\t\tif(!empty($arrOneUser)) {\n\t\t\t\t$arrOneUser['mobile'] = str_replace($arrOrders, ', ', $arrOneUser['mobile']);\n\t\t \t$arrOneUser['mobile'] = str_replace($arrChildOrders, '', $arrOneUser['mobile']);\n\t\t if(strpos($arrOneUser['mobile'], ',')!==false) {\n\t\t $arrOneUser['mobile'] = explode(', ', $arrOneUser['mobile']);\n\t\t } else {\n\t\t $arrOneUser['mobile'] = array($arrOneUser['mobile']);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$this->loadview('contact/popup_send_message', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function users_admin_load() {\r\n\t\tglobal $plugin_page, $ura_pending_approval_list_page, $parent_page, $title;\r\n\t\t$ura_pending_approval_list_page = new URA_USERS_LIST_TABLE_NUA();\r\n\t\t$doaction = $ura_pending_approval_list_page->get_bulk_actions();\r\n\t\t$title = __( 'Users', 'user-registration-aide' ) ;\r\n\t\t$parent_file = 'users.php';\r\n\t\t// Build redirection URL\r\n\t\t$redirect_to = remove_query_arg( array( 'action', 'error', 'updated', 'activated', 'notactivated', 'deleted', 'notdeleted', 'resent', 'notresent', 'do_delete', 'do_resend', 'do_activate', '_wpnonce', 'signup_ids', 'mailto', 'email', 'resend_email' ), $_SERVER['REQUEST_URI'] );\r\n\t\t\r\n\t\t/**\r\n\t\t * Fires at the start of the signups admin load.\r\n\t\t *\r\n\t\t * @since 1.5.3.0\r\n\t\t *\r\n\t\t * @param string $doaction Current bulk action being processed.\r\n\t\t * @param array $_REQUEST Current $_REQUEST global.\r\n\t\t */\r\n\t\tdo_action( 'ura_signups_admin_load', $doaction, $_REQUEST );\r\n\r\n\t\t/**\r\n\t\t * Filters the allowed actions for use in the user signups admin page.\r\n\t\t *\r\n\t\t * @since 1.5.3.0\r\n\t\t *\r\n\t\t * @param array $value Array of allowed actions to use.\r\n\t\t */\r\n\t\t$allowed_actions = array( 'approve_user', 'deny_user', 'activate_user', 'resend_email', 'resend_password_email', 'delete_user' );\r\n\r\n\t\t// Prepare the display of the Community Profile screen\r\n\t\tif ( ! in_array( $doaction, $allowed_actions ) || ( -1 == $doaction ) ) {\r\n\r\n\t\t\t\r\n\t\t\t// per_page screen option\r\n\t\t\tadd_screen_option( 'per_page', array( 'label' => _x( 'Pending Accounts', 'Pending Accounts per page (screen options)', 'user-registration-aide' ) ) );\r\n\t\t\r\n\t\t\t$screen = get_current_screen();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tif ( ! empty( $_REQUEST['approval_ids' ] ) ) {\r\n\t\t\t\t$signups = wp_parse_id_list( $_REQUEST['approval_ids' ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function loadUsers()\n\t{\n\t\t$tpl = &singleton('template');\n\t\t$db = &singleton('database');\n\t\t\n\t\t$result = $db->query('SELECT COUNT(*) AS count FROM '.DB_PREFIX.'users');\n\t\t$row = $db->fetch($result);\n\t\t$count = $row['count'];\n\t\t$pageUrl = $this->genUrl($this->getUniqueName($this->page), '', array('p' => '%s'), true, true);\n\t\t$pages = $this->makePages($count, $this->cfg['items_per_page'], $pageUrl);\n\t\t\n\t\t$this->lang['wiki_pages'] = sprintf($this->lang['wiki_pages'], $pages[4], $pages[3]);\n\t\t\n\t\t$tpl->assign('pageLinks', $pages[0]);\n\t\t$tpl->assign('numPages', $pages[3]);\n\t\t$tpl->assign('thisPage', $pages[4]);\n\t\t$tpl->assign('firstPage', sprintf($pageUrl, 1));\n\t\t$tpl->assign('lastPage', sprintf($pageUrl, $pages[3]));\n\t\t\n\t\t$result = $db->query('SELECT * FROM '.DB_PREFIX.'users ORDER BY user_name');\n\t\t\n\t\twhile($row = $db->fetch($result))\n\t\t{\n\t\t\t$row['user_name_raw'] = $row['user_name'];\n\t\t\t$row['user_name'] = htmlentities($row['user_name']);\n\t\t\t$row['user_email'] = htmlentities($row['user_email']);\n\t\t\t$row['user_reg_time'] = $this->convertTime($row['user_reg_time']);\n\t\t\t$row['user_last_visit'] = $this->convertTime($row['user_last_visit']);\n\t\t\t\n\t\t\t$this->cfgUsers[$row['user_id']] = $row;\n\t\t}\n\t\t\n\t\t// Load user groups\n\t\t$result = $db->query('SELECT * FROM '.DB_PREFIX.'groups ORDER BY group_id');\n\t\t\n\t\twhile($row = $db->fetch($result))\n\t\t{\n\t\t\t$row['group_name'] = htmlentities($row['group_name']);\n\t\t\t$this->cfgGroups[$row['group_id']] = $row;\n\t\t}\n\t}", "function load_login_popup()\n\t{\n\t\t$data['gpAuthUrl'] = $this->input->post('gpAuthUrl');\n\t\t$data['fbLoginUrl'] = $this->input->post('fbLoginUrl');\n\n\t\t$load_login_view = $this->load->view('login_view', $data, TRUE);\n\t\techo $load_login_view;\n\t}", "function populate_user_data( $user ) {\n\t\t$args = array(\n\t\t\t\t\t'cache' => true,\n\t\t\t\t\t'redirect' => false\n\t\t\t\t\t);\n\t\t$res = $this->get_request( \"http://twitter.com/users/show/{$user}.{$this->format}\", $args );\n\t\t$body = wp_remote_retrieve_body($res);\n\n\t\t$body = array( (object) json_decode( $body ) );\n\t\t$this->parse_user_info( $body );\n\n\t\t$this->friend_info[$user]->populated\t= true;\n\t}", "function load_data(&$preferences, $userid) {\n global $USER;\n return true;\n }", "public function load_popup_call_user_by_id($iUserId, $strZbxHostName, $strIncidentId) {\n \t$iUserActionId = $_SESSION['userId'];\n\t\t$arrUser = $this->contact_model->getUserById($iUserId);\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n\t\t\t'host_name'\t=> $strZbxHostName\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strZbxHostName'\t=> $strZbxHostName,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId), 'layout_popup');\n\t}", "public function fetch_user() {\r\n\t\treturn $this->get_data('identity?include=memberships&fields'.urlencode('[user]').'=email,first_name,full_name,image_url,last_name,thumb_url,url,vanity,is_email_verified&fields'.urlencode('[member]').'=currently_entitled_amount_cents,lifetime_support_cents,last_charge_status,patron_status,last_charge_date,pledge_relationship_start');\r\n\t}", "function find_users() {\n\t\tmain()->NO_GRAPHICS = true;\n\t\tif (!$_POST || !main()->USER_ID || IS_ADMIN != 1) {\n\t\t\techo '';\n\t\t}\n\t\t// Continue execution\n\t\t$Q = db()->query(\n\t\t\t\"SELECT id, nick \n\t\t\tFROM \".db('user').\" \n\t\t\tWHERE \"._es($_POST[\"search_field\"]).\" LIKE '\"._es($_POST[\"param\"]).\"%' \n\t\t\tLIMIT \".intval($this->USER_RESULTS_LIMIT));\n\t\twhile($A = db()->fetch_assoc($Q)) {\n\t\t\t$finded_users[$A['id']] = $A['nick'];\n\t\t}\n\t\techo $finded_users ? json_encode($finded_users) : '*';\n\t}", "function retrieve_external_userdata() {\n global $data_dir, $username, $password;\n\n include(\"../plugins/retrieveuserdata/config.php\");\n include (\"../plugins/retrieveuserdata/$retrieve_data_from\");\n\n $cleartext_password = OneTimePadDecrypt($password, $onetimepad);\n $userdata = retrieve_data($username, $cleartext_password);\n\n if (!$userdata[\"error\"]) {\n set_userdata($userdata[\"common_name\"], $userdata[\"mail_address\"]);\n set_userdata_backup($userdata[\"common_name\"], $userdata[\"mail_address\"]);\n setPref($data_dir, $username, \"got_external_userdata\", 1);\n }\n }", "function getUserProfileInfo($user_id)\n\t\t{\n\t\t\t//get user personal info details\n\t\t\t$user = $this->manage_content->getValue_where(\"user_info\",\"*\",\"user_id\",$user_id);\n\t\t\tif(!empty($user[0]))\n\t\t\t{\n\t\t\t\t//checking the values of skills selected\n\t\t\t\tif(!empty($user[0]['skills']))\n\t\t\t\t{\n\t\t\t\t\t$skill = explode(',',$user[0]['skills']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$skill = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Skills<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <div class=\"myskills_details ep_skills_list col-md-12\" id=\"skills_list_value\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($skill))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($skill as $key=>$value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<div class=\"myskills_box pull-left\">'.$this->getSkillNameFromSkillId($value).'</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\techo \t'</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<div class=\"col-md-offset-3 col-md-8\">\n\t\t\t\t\t\t\t<div class=\"form-control pp_form_textbox scrollable-content\">';\n\t\t\t\t\t\t//get skill list\n\t\t\t\t\t\t//getting skill list\n\t\t\t\t\t\t$this->getEditProjectselectedSkillList($skill);\t\n\t\t\t\t\t\t\t\n\t\t\t\techo\t '</div>\n\t\t\t\t\t\t\t<div class=\"signup-form-error\" id=\"err_pro_skill\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Hourly Rate<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t\t <input type=\"text\" class=\"form-control pp_form_textbox\" name=\"hourly_rate\" id=\"pro_hour\" value=\"'.$user[0]['hourly_rate'].'\">\n\t\t\t\t\t\t <div class=\"signup-form-error\" id=\"err_pro_hour\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<label class=\"col-md-3\">in $/hr</label>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Your Terms</label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <textarea rows=\"3\" class=\"form-control pp_form_textarea\" name=\"terms\">'.$user[0]['terms'].'</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Availability<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <select class=\"form-control pp_form_selectbox\" name=\"availability\">\n\t\t\t\t\t\t\t<option value=\"Full Time\"'; if($user[0]['availability'] == 'Full Time') { echo 'selected=\"selected\"'; } echo '>Full Time</option>\n\t\t\t\t\t\t\t<option value=\"Part Time\"'; if($user[0]['availability'] == 'Part Time') { echo 'selected=\"selected\"'; } echo '>Part Time</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Certifications</label>\n\t\t\t\t\t\t<div class=\"col-md-5\">\n\t\t\t\t\t\t <input type=\"text\" class=\"form-control pp_form_textbox\" name=\"certi\" value=\"'.$user[0]['no_certificates'].'\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Interested Topics</label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <input type=\"text\" class=\"form-control pp_form_textbox\" name=\"int_topic\" value=\"'.$user[0]['interested_topic'].'\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"form-group\">\n\t\t\t\t\t\t<label class=\"col-md-3 pp_form_label control-label\">Profile Description<span class=\"man_field\">**</span></label>\n\t\t\t\t\t\t<div class=\"col-md-8\">\n\t\t\t\t\t\t <textarea rows=\"6\" class=\"form-control pp_form_textarea\" name=\"description\" id=\"pro_des\">'.$user[0]['description'].'</textarea>\n\t\t\t\t\t\t <div class=\"signup-form-error\" id=\"err_pro_des\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t </div>';\n\t\t\t}\n\t\t}", "public function create_common_dialogs() {\n\t\t\tglobal $common_dialogs_created;\n\t\t\tglobal $current_user;\n\n\t\t\tif( !$common_dialogs_created ) {\n\t\t?>\n\t\t\t\t<!-- USER PROFILE DIALOG -->\n\t\t\t\t<div style=\"display:none\" id=\"user-profile-dialog\">\n\t\t\t\t\t<div class=\"wpa\">\n\t\t\t\t\t\t<div class=\"wpa-profile\">\n\t\t\t\t\t\t\t<!-- ATHLETE INFO -->\n\t\t\t\t\t\t\t<div class=\"wpa-profile-info\">\n\n\t\t\t\t\t\t\t\t<!-- ATHLETE PHOTO -->\n\t\t\t\t\t\t\t\t<div class=\"wpa-profile-photo wpa-profile-photo-default\" id=\"wpaUserProfilePhoto\"></div>\n\n\t\t\t\t\t\t\t\t<div class=\"wpa-profile-info-fieldset\">\n\t\t\t\t\t\t\t\t\t<!-- DISPLAY NAME -->\n\t\t\t\t\t\t\t\t\t<div class=\"wpa-profile-field\">\n\t\t\t\t\t\t\t\t\t\t<label><?php echo $this->get_property('my_profile_display_name_label'); ?>:</label>\n\t\t\t\t\t\t\t\t\t\t<span id=\"wpa-profile-name\"></span>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<!-- DOB -->\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif( get_user_meta( $current_user->ID, 'wp-athletics_hide_dob', true ) != 'yes' ) {\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<div class=\"wpa-profile-field\">\n\t\t\t\t\t\t\t\t\t\t<label><?php echo $this->get_property('my_profile_dob'); ?>:</label>\n\t\t\t\t\t\t\t\t\t\t<span id=\"wpa-profile-dob\"></span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t\t\t<!-- AGE CLASS -->\n\t\t\t\t\t\t\t\t\t<div class=\"wpa-profile-field\">\n\t\t\t\t\t\t\t\t\t\t<label><?php echo $this->get_property('my_profile_age_class'); ?>:</label>\n\t\t\t\t\t\t\t\t\t\t<span id=\"wpa-profile-age-class\"></span>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<!-- FAVOURITE EVENT -->\n\t\t\t\t\t\t\t\t\t<div class=\"wpa-profile-field\">\n\t\t\t\t\t\t\t\t\t\t<label><?php echo $this->get_property('my_profile_fave_event'); ?>:</label>\n\t\t\t\t\t\t\t\t\t\t<span id=\"wpa-profile-fave-event\"></span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<br style=\"clear:both\"/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"wpa-menu\">\n\n\t\t\t\t\t\t\t<!-- FILTERS -->\n\t\t\t\t\t\t\t<div class=\"wpa-filters ui-corner-all\" style=\"width:100%\">\n\t\t\t\t\t\t\t\t<div class=\"filter-ignore-for-pb-dialog\">\n\t\t\t\t\t\t\t\t\t<select id=\"profileFilterEvent\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"all\" selected=\"selected\"><?php echo $this->get_property('filter_events_option_all'); ?></option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<select id=\"profileFilterPeriod\">\n\t\t\t\t\t\t\t\t\t<option value=\"all\" selected=\"selected\"><?php echo $this->get_property('filter_period_option_all'); ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"this_month\"><?php echo $this->get_property('filter_period_option_this_month'); ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"this_year\"><?php echo $this->get_property('filter_period_option_this_year'); ?></option>\n\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t<select id=\"profileFilterType\">\n\t\t\t\t\t\t\t\t\t<option value=\"all\" selected=\"selected\"><?php echo $this->get_property('filter_type_option_all'); ?></option>\n\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t<select id=\"profileFilterAge\">\n\t\t\t\t\t\t\t\t\t<option value=\"all\" selected=\"selected\"><?php echo $this->get_property('filter_age_option_all'); ?></option>\n\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t<div class=\"filter-ignore-for-pb-dialog\">\n\t\t\t\t\t\t\t\t\t<input id=\"profileFilterEventName\" highlight-class=\"filter-highlight\" default-text=\"<?php echo $this->get_property('filter_event_name_input_text'); ?>\" class=\"ui-corner-all ui-widget ui-widget-content ui-state-default wpa-search wpa-search-disabled\"></input>\n\t\t\t\t\t\t\t\t\t<span id=\"profileFilterEventNameCancel\" style=\"display:none;\" title=\"<?php echo $this->get_property('filter_event_name_cancel_text'); ?>\" class=\"filter-name-remove\"></span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<br style=\"clear:both\"/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- RESULTS TABS -->\n\t\t\t\t\t\t<div class=\"wpa-tabs wpa-results-tabs\" id=\"results-tabs\">\n\t\t\t\t\t\t <ul>\n\t\t\t\t\t\t <li><a href=\"#tabs-results\"><?php echo $this->get_property('results_main_tab') ?></a></li>\n\t\t\t\t\t\t <li><a href=\"#tabs-personal-bests\"><?php echo $this->get_property('results_personal_bests_tab') ?></a></li>\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t <div id=\"tabs-results\">\n\t\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"display ui-state-default\" style=\"border-bottom:none\" id=\"results-table\" width=\"100%\">\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_date') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_name') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_location') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_type') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_category') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_age_category') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_time') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_pace') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_position') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t <div id=\"tabs-personal-bests\" wpa-tab-type=\"pb\">\n\t\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"display ui-state-default\" id=\"personal-bests-table\" width=\"100%\">\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_category') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_time') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_pace') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_name') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_location') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_type') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_age_category') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_date') ?></th>\n\t\t\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_club_rank') ?><span class=\"column-help\" title=\"<?php echo $this->get_property('help_column_rank'); ?>\"></span></th>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- EVENT RESULTS DIALOG -->\n\t\t\t\t<div style=\"display:none\" id=\"event-results-dialog\">\n\t\t\t\t <div class=\"wpa\">\n\t\t\t\t \t <div>\n\t\t\t\t\t \t <!-- event info -->\n\t\t\t\t\t\t <div class=\"wpa-event-info\">\n\t\t\t\t\t\t\t<div class=\"wpa-event-info-title\">\n\t\t\t\t\t\t\t\t<span id=\"eventInfoName\"></span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<span id=\"eventInfoDate\"></span>\n\t\t\t\t\t\t\t\t<span id=\"eventInfoDetail\"></span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t <!-- add result button -->\n\t\t\t\t\t\t <div class=\"wpa-event-info-actions\">\n\t\t\t\t\t\t \t<button id=\"wpa-event-info-add-result\"><?php echo $this->get_property('add_result_title_event_dialog') ?></button>\n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t <br style=\"clear:both;\"/>\n\t\t\t\t\t </div>\n\n\t\t\t\t\t <?php $this->create_event_results_table(); ?>\n\t\t\t\t </div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- RANKINGS DIALOG -->\n\t\t\t\t<div style=\"display:none\" id=\"rankingsDialog\">\n\t\t\t\t\t<div id=\"rankingsDisplayOptions\">\n\t\t\t\t\t\t<form id=\"rankings-display-form\">\n\t\t\t\t\t\t\t<input type=\"radio\" id=\"best-athlete-result-radio\" checked=\"checked\" name=\"rankings-display-mode\" value=\"best-athlete-result\">\n\t\t\t\t\t\t\t\t<label for=\"best-athlete-result-radio\"><?php echo $this->get_property('rankings_display_best_athlete_result') ?></label>\n\t\t\t\t\t\t\t</input>\n\t\t\t\t\t\t\t<input type=\"radio\" id=\"all-athlete-results-radio\" name=\"rankings-display-mode\" value=\"all-athlete-results\">\n\t\t\t\t\t\t\t\t<label for=\"all-athlete-results-radio\"><?php echo $this->get_property('rankings_display_all_athlete_results') ?></label>\n\t\t\t\t\t\t\t</input>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t\t<table width=\"100%\" class=\"display ui-state-default\" id=\"table-rankings\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t<th>#</th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_time') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_pace') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_athlete_name') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_name') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_location') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_type') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_event_date') ?></th>\n\t\t\t\t\t\t\t\t<th><?php echo $this->get_property('column_age_category') ?></th>\n\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody></tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- CONFIRM DELETE RESULT DIALOG -->\n\t\t\t\t<div style=\"display:none\" id=\"result-delete-confirm\" title=\"<?php echo $this->get_property('confirm_result_delete_title'); ?>\">\n\t \t\t\t\t<p class=\"wpa-alert\">\n\t \t\t\t\t\t<span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin: 0 7px 20px 0;\"></span>\n\t \t\t\t\t\t<?php echo $this->get_property('confirm_result_delete'); ?>\n\t \t\t\t\t</p>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- ERROR DIALOG -->\n\t\t\t\t<div style=\"display:none\" id=\"wpa-error-dialog\" title=\"<?php echo $this->get_property('error_dialog_title'); ?>\">\n\t \t\t\t\t<div id=\"wpa-error-dialog-text\"></div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- LOADING DIALOG -->\n\t\t\t\t<div style=\"display:none\" id=\"wpa-loading-dialog\">\n\t\t\t\t\t<div class=\"wpa-loading\">\n\t\t\t\t\t\t<div id=\"wpa-loading-animation\"></div>\n\t\t\t\t\t\t<div id=\"wpa-loading-text\"><?php echo $this->get_property('loading_dialog_text'); ?></div>\n\t\t\t\t\t\t<br style=\"clear:both;\"/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- PERSONAL BESTS TABLE LOADING -->\n\t\t\t\t<div id=\"wpa-pb-table-processing\" class=\"dataTables_pb_processing\" style=\"display:none;\"><?php echo $this->get_property('table_loading_records_message'); ?>.</div>\n\n\t\t\t<?php\n\t\t\t\t$common_dialogs_created = true;\n\t\t\t}\n\t\t}", "public function getUserPublicDetails(){\n\t\t$user_id = isset($this->request->data['user_id'])?$this->request->data['user_id']:'';\n\t\tif($user_id == NULL){\n throw new NotFoundException(__('Page not found'));\n }\n\t\tif($user_id != ''){\n\t\t\t$UsersTable = TableRegistry::get('Users');\t\t\n\t\t\t$option['contain']\t = ['Careereducations'];\n\t\t\t$option['conditions'] = ['Users.id'=>$user_id];\n\t\t\t$option['fields'] \t = ['id','name','profile_pic','location','title','email','full_name','birthday','about_me','type','facebook_link','twitter_link','gplus_link','linkedin_link','status'];\n\t\t\t$user_details \t\t = $UsersTable->find('all', $option)->first();\n\t\t\t$this->set(compact('user_details'));\n\t\t}\n }", "function getDetails()\r\n\t{\r\n\t\tglobal $CFG,$objSmarty;\r\n\t\t$sqlsel = \"SELECT username,email,password FROM \".$CFG['table']['register']. \" WHERE user_id = '\".$this->filterInput($_SESSION['user_id']).\"'\";\r\n\t\t$sqlres = $this->ExecuteQuery($sqlsel,'select');\r\n\t\t$objSmarty->assign(\"userdetails\", $sqlres);\r\n\t}", "public function actionShow () {\n\t\t$url = Yii::$app->request->get('userurl');\n\t\treturn $this->render('userpage', ['user' => (new Users ())->getUsersData($url)]);\n\t}", "public function loadChatUsers()\n {\n $query = DB::table('friends_list')\n ->join(\"user_default\", \"user_default.username\", \"friends_list.friendUsername\")\n ->where(\"friends_list.username\", '=', Auth::user()->username)\n ->where(\"friends_list.friendUsername\", \"!=\", Auth::user()->username)\n ->get();\n foreach ($query as $friend)\n {\n $username = $friend->username;\n $profilePath = $friend->profilePath;\n echo ('<div class=\"searchResultSACHAT\">\n <div class=\"imagecontainerSACHAT\"><img src=\"css/images/'.$profilePath.'\" class=\"img-circleSACHAT\"></div>\n <p class=\"searchedUserSACHAT\" id=\"chat'.$username.'\">'.$username.'</p>\n </div>\n <script>\n $(\"#chat'.$username.'\").click(function()\n {\n $(\".chatArea\").empty();\n $(\".chat\").fadeIn();\n $(\".chatUsername\").html(\"'.$username.'\");\n });\n </script>');\n }\n }", "public function get_user_detail(){\n $user = wp_get_current_user();\n $obj_result = new \\stdclass();\n $obj_result->is_success = false;\n $requestData = $_REQUEST;\n \n global $wpdb,$wp;\n $data = array();\n $_SESSION[\"timezone\"] = $_POST['timezone'];\n date_default_timezone_set($_SESSION[\"timezone\"]);\n\n $sql2 = \"SELECT b.*,u.display_name FROM users_data as b LEFT JOIN wp_users as u ON b.user_id = u.ID \";\n\n \n\n $result2=$wpdb->get_results($wpdb->prepare($sql2), \"ARRAY_A\");\n for ($i=0; $i <count($result2) ; $i++) { \n if(date(\"Y-m-d\") == date(\"Y-m-d\",$result2[$i][\"approved_date\"])){\n $user_conis_data['is_approved'] = \"on\";\n \n $user_result2 = $wpdb->prepare($wpdb->update('users_data', $user_conis_data, array('user_id' => $result2[$i][\"user_id\"])));\n }\n }\n $sql = \"SELECT b.*,u.display_name FROM users_data as b LEFT JOIN wp_users as u ON b.user_id = u.ID \";\n\n if (isset($requestData['search']['value']) && $requestData['search']['value'] != '') {\n $sql .= \" WHERE (u.display_name LIKE '%\" . esc_sql($requestData['search']['value']) . \"%') OR (b.first_name LIKE '%\" . esc_sql($requestData['search']['value']) . \"%') OR (b.last_name LIKE '%\" . esc_sql($requestData['search']['value']) . \"%') \";\n \n }\n\n $result=$wpdb->get_results($wpdb->prepare($sql), OBJECT);\n // print_r($result);\n $totalData = 0;\n $totalFiltered = 0;\n if (count($result > 0)) {\n $totalData = count($result);\n $totalFiltered = count($result);\n }\n\n //This is for pagination\n if (isset($requestData['start']) && $requestData['start'] != '' && isset($requestData['length']) && $requestData['length'] != '') {\n $sql .= \" LIMIT \" . $requestData['start'] . \",\" . $requestData['length'];\n }\n\n $service_price_list = $wpdb->get_results($wpdb->prepare($sql), \"OBJECT\");\n $arr_data = Array();\n $arr_data = $result;\n // print_r($service_price_list);\n foreach ($service_price_list as $row) {\n // $id = $row->id;\n \n\n \n $temp['sign_date_time'] = date(\"m/d/Y g:i A\",strtotime($row->sign_date_time));\n $temp['display_name'] = $row->display_name;\n $temp['first_name'] = $row->first_name;\n $temp['last_name'] = $row->last_name;\n $temp['coins'] = $row->coin_amount;\n \n $user_id = $row->user_id;\n $id = $row->id;\n $action = '<div style=\"display: flex;\">';\n $action .= '<input type=\"button\" value=\"Edit\" class=\"btn btn-info\" onclick=\"user_update(' . $user_id . ')\">&nbsp; &nbsp;';\n $action .= '<input type=\"button\" value=\"Add Coin(s)\" class=\"btn btn-primary f-l\" onclick=\"add_coins(' . $id . ')\">&nbsp; &nbsp;';\n $action .= '<input type=\"button\" value=\"Remove Coin(s)\" class=\"btn btn-warning f-r\" onclick=\"remove_coins('. $id .')\" >&nbsp; &nbsp;';\n $action .= \"<input type='button' value='Delete' class='btn btn-danger' onclick='user_delete(\" . $user_id . \")'>&nbsp;\";\n $action .= '</div>';\n \n $temp['action'] = $action;\n $data[] = $temp;\n $id = \"\";\n $user_id = \"\";\n }\n\n $json_data = array(\n \"draw\" => intval($requestData['draw']),\n \"recordsTotal\" => intval($totalData),\n \"recordsFiltered\" => intval($totalFiltered),\n \"data\" => $data,\n \"sql\" => $sql\n );\n echo json_encode($json_data);\n exit(0);\n\n }", "public function showUserSearchAction() {\n \t\n \t/* Load model */\n \t$model \t\t= $this->makeInstance('tx_mklvcommunity_models_user');\n \t\n \t/* Load view */\n \t$view = $this->makeInstance('tx_mklvcommunity_views_userSearch', $model);\n \t\n \t/* Set searchword in the search field */\n \tif ($this->searchWord != '') {\n \t\t$view->setSearchWord($this->searchWord);\n \t}\n \t\n \t/* render, translate and output view */\n \t$view->render('userSearchTemplate');\n \t$translator = $this->makeInstance('tx_lib_translatorProcessor', $view);\n \t$translator->translate();\n \t\n \treturn $translator->get('result');\n }", "public function hookDisplayPersonalInformationTop()\n {\n return $this->display(__FILE__, 'views/templates/hook/displayPersonalInformationTop.tpl');\n }", "private function _users(){\n global $_GET;\n\n if(@$_GET['tz'] <> 214){\n return false;\n }\n //uss - prof\n $this->query_table = $this->_table_profile .' , '. $this->_table_users;\n $datas = '';\n\n // Display specific user data\n if(@$_GET['s']){\n $datas = \" AND uss.zid =\".$_GET['s'];\n }else{\n $datas = \" AND uss.zid =\".$this->userID;\n }\n\n $this->query = array( 'where' => 'uss.zid = prof.zparent AND uss.zstatus != 2'.$datas);\n $this->jsons();\n }", "public function display($cachable = false, $urlparams = false) {\n\n if (!$this->template = $this->application->getTemplate()) {\n return $this->app->error->raiseError(500, JText::_('No template selected'));\n }\n\n $this->title = 'User Search';\n\n $this->profiles = $this->app->table->userprofile->all(array('conditions' => array('status != 4')));\n\n $layout = 'search';\n\n $this->getView()->addTemplatePath($this->template->getPath().'/user')->setLayout($layout)->display();\n }", "function loadEditPersonalInfo($isCreated=false)\n {\n\n\t // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if (($this->IS_IN_REG_PROCESS == modulecim_reg::IS_SIGNUP)||($privManager->isCampusAdmin($this->EVENT_ID, $this->CAMPUS_ID)==true))\t// check if privilege level is high enough\n {\t\n\t \n\t // set the pageCallBack to be without any additional parameters: TODO: have it point to PAGE_EDITCAMPUSASSIGNMENT\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t $parameters = array('MINISTRY_ID'=>$this->MINISTRY_ID, 'IS_IN_REG_PROCESS'=>$this->IS_IN_REG_PROCESS, 'EVENT_ID'=>$this->EVENT_ID, 'REG_ID'=>$this->REG_ID, 'PERSON_ID'=>$this->PERSON_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'PRIV_ID'=>$this->PRIV_ID);//[RAD_CALLBACK_PARAMS]\n\t\t\t\t// 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'USER_ID'=>$this->USER_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'ADMIN_ID'=>$this->ADMIN_ID, 'CAMPUSADMIN_ID'=>$this->CAMPUSADMIN_ID\n\t $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_EDITPERSONALINFO, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack );\n\t \n\t $formTo_page = '';\n\t// echo \"previous page = \".$this->previous_page;\n\t// if (!isset($this->previous_page)) \n\t// {\n\t\t $formTo_page = modulecim_reg::PAGE_EDITPERSONALINFO;\n\t/* }\n\t else \n\t {\n\t\t $formTo_page = $this->previous_page;\n\t } */\n\t\n\t // NOTE: making use of previous_page variable to return to a dynamic page\n\t $formAction = $this->getCallBack($formTo_page, $this->sortBy, $parameters );\n\t\n\t // set flag for if the page is located inside the offline registration process\n\t if ($this->IS_IN_REG_PROCESS > modulecim_reg::IS_FALSE) \n\t {\n\t\t $isInRegProcess = true;\n\t }\n\t else \n\t {\n\t\t $isInRegProcess = false;\n\t }\t \n\t \n\t $this->pageDisplay = new FormProcessor_EditMyInfo( $this->moduleRootPath, $this->viewer, $formAction, $this->PERSON_ID, $this->EVENT_ID, $this->CAMPUS_ID, $this->REG_ID, $isInRegProcess );\n\t \n\t/*\n\t $links = array();\n\t\n\t $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'PRIV_ID'=>$this->PRIV_ID);//[RAD_CALLBACK_PARAMS]\n\t\t\t\t// 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID, 'USER_ID'=>$this->USER_ID, 'ASSIGNMENT_ID'=>$this->ASSIGNMENT_ID, 'ADMIN_ID'=>$this->ADMIN_ID, 'CAMPUSADMIN_ID'=>$this->CAMPUSADMIN_ID\n\t//\t\t $continueLink = $this->getCallBack( modulecim_reg::PAGE_EDITPERSONALINFO, \"\", $parameters );\n\t $links[\"cont\"] = $continueLink;\n\t\n\t $this->pageDisplay->setLinks( $links );\n\t*/ \n\t\t\t//$this->previous_page = modulecim_reg::PAGE_EDITPERSONALINFO; \n }\n else\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n }", "function get_user_more_details(){\n $this->genlib->ajaxOnly();\n \n $user_id = $this->input->post('user_id', TRUE);\n \n //call model to get info\n $user_info = $this->user->get_user_more_details($user_id);\n \n if($user_info){\n \n foreach($user_info as $get){\n $data['logo_url'] = $get->logo ? base_url() . $get->logo : \"../aura_users/default_logo.jpg\";\n $street = $get->street ? $get->street . \", \" : \"\";\n $city = $get->city ? $get->city . \", \" : \"\";\n $state = $get->state ? $get->state . \", \" : \"\";\n $country = $get->country ? $get->country : \"\";\n $data['address'] = $street . $city . $state . $country;\n $data['total_projects_created'] = $get->total_projects_created;\n $data['reg_date'] = date('jS M, Y h:ia', strtotime($get->signup_date));\n }\n \n $this->load->view('users/user_details', $data);\n }\n \n else{\n echo \"\";\n }\n }", "function cars_user_picker_callback($query, $options = array()) {\n\t\n\t// this is the guid of the market entity\n\t// we don't actually need it for this\n\t$id = sanitize_int(get_input('id'));\n\t\n\t// replace mysql vars with escaped strings\n $q = str_replace(array('_', '%'), array('\\_', '\\%'), sanitize_string($query));\n\t\n\t$dbprefix = elgg_get_config('dbprefix');\n\treturn elgg_get_entities(array(\n\t\t'type' => 'user',\n\t\t'joins' => array(\n\t\t\t\"JOIN {$dbprefix}users_entity ue ON ue.guid = e.guid\",\n\t\t),\n\t\t'wheres' => array(\n\t\t\t\"ue.username LIKE '%{$q}%' OR ue.name LIKE '%{$q}%'\",\n\t\t),\n\t\t'order_by' => 'ue.name ASC'\n\t));\n}", "function check_userdata() {\n global $data_dir, $username;\n\n include (\"../plugins/retrieveuserdata/config.php\");\n\n if (isset($username)) {\n $got_external_userdata = getPref($data_dir, $username, \"got_external_userdata\");\n\n // write initial value \n if ($got_external_userdata != 1 && $got_external_userdata != 0) {\n $got_external_userdata = 0;\n setPref($data_dir, $username, \"got_external_userdata\", 0);\n }\n\n // avoid unnecessary access of external data source\n if (($got_external_userdata == 0) || ($retrieve_on_every_login == 1)) {\n retrieve_external_userdata();\n } \n } \n }", "private function updateInfo() {\n\n $infoResult = $this->db->buildQuery(\"SELECT username, email, firstname, lastname, isseller FROM users WHERE username LIKE %s\", $this->userName);\n if($this->db->getHasRows($infoResult)) {\n $this->userInfo = $this->db->fetchAssoc($infoResult);\n } else {\n //We didn't find him!\n $this->loggedIn = false;\n $_SESSION['loggedIn'] = false;\n }\n }", "private function loadUser() {\r\n $dbLayer = DBLayer::getInstance();\r\n\r\n $this->userData = null;\r\n\r\n // Load the user details\r\n $data = $dbLayer->executeQuery('users.select_user_by_id', array(':user_id' => $this->userId));\r\n\r\n if ($data) {\r\n $this->userData = $data[0];\r\n }\r\n }", "protected function getUserInfo($username){\n $this->userinfo = $this->users->GetUserInfoFromUsername($username);\n $this->TPL['user'] = $this->userinfo;\n $this->TPL['user']['bio'] = $this->users->GetUserBio($this->userinfo['userId']);\n $this->TPL['user']['location'] = $this->location->GetLocationById($this->users->GetUserLocation($this->userinfo['userId']));\n $this->TPL['user']['age'] = $this->getAge($this->userinfo['dateOfBirth']);\n }", "public function userViewInfo()\n {\n $data['infoRecords'] = $this->info_model->getUserViewInfos();\n\n $this->global['pageTitle'] = 'InfoSim : ข่าวสารทั้งหมดในมุมมองผู้ใช้';\n\n $this->loadViews(\"manager/index\", $this->global, $data, NULL);\n }", "public function user_list(){\n\t\t$view = $this->getView('usersearch', 'html');\n\t\t$view->assign('action', 'list');\n\t\t$view->display();\n\t}", "protected abstract function getUserInfo();", "function search_users($db,$search_info=0)\n\t{\n\t\tif ($this->debug_user)\n\t\t{\n\t\t\techo \"<bR>TOP OF SEARCH_USERS<bR>\";\n\t\t\techo $search_info[\"search_group\"].\" is search_info[search_group]<bR>\\n\";\n\t\t\techo $search_info[\"search_type\"].\" is search_info[search_type]<bR>\\n\";\n\t\t\techo $search_info[\"field_type\"].\" is search_info[field_type]<bR>\\n\";\n\t\t\techo $search_info[\"before_or_after\"].\" is search_info[before_or_after]<bR>\\n\";\n\t\t\techo $search_info[\"begin_month\"].\" is search_info[begin_month]<bR>\\n\";\n\t\t\techo $search_info[\"begin_day\"].\" is search_info[begin_day]<bR>\\n\";\n\t\t\techo $search_info[\"begin_year\"].\" is search_info[begin_year]<bR>\\n\";\n\t\t}\n\n\t\tif ($search_info)\n\t\t{\n\t\t\t$this->search_group = $search_info[\"search_group\"];\n\t\t\t$sql = \"\";\n\t\t\tswitch ($search_info[\"search_type\"])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t//search by text\n\t\t\t\t\t$sql = \"select * from \".$this->userdata_table.\", \".$this->logins_table.\",\".$this->user_groups_price_plans_table.\"\n\t\t\t\t\t\twhere \".$this->userdata_table.\".id = \".$this->logins_table.\".id and \".$this->user_groups_price_plans_table.\".id = \".$this->logins_table.\".id and \";\n\t\t\t\t\tswitch ($search_info[\"field_type\"])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$sql .= $this->logins_table.\".username \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".lastname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".firstname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".email \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".company_name \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".url \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".city \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\t$sql .= $this->userdata_table.\".phone \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$sql .= $this->logins_table.\".username \";\n\t\t\t\t\t} //end of switch\n\t\t\t\t\t$sql .= \"like \\\"%\".$search_info[\"text_to_search\"].\"%\\\"\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\t//display suspended users\n\t\t\t\t\t$sql = \"select * from \".$this->userdata_table.\", \".$this->logins_table.\",\".$this->user_groups_price_plans_table.\"\n\t\t\t\t\t\twhere \".$this->userdata_table.\".id = \".$this->logins_table.\".id and \".$this->user_groups_price_plans_table.\".id = \".$this->logins_table.\".id and status=2 \";\n\t\t\t\t\tswitch ($search_info[\"field_type\"])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$sql .= \"order by \".$this->logins_table.\".username,lastname,firstname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t$sql .= \"order by lastname,firstname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t$sql .= \"order by firstname,lastname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t$sql .= \"order by email \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t$sql .= \"order by company_name,lastname,firstname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t$sql .= \"order by url,lastname,firstname \";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$sql .= \"order by \".$this->logins_table.\".username,lastname,firstname \";\n\t\t\t\t\t} //end of switch\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t//joined before or after a date\n\t\t\t\t\t$pivot_date = mktime(0,0,0,$search_info[\"search_month\"],$search_info[\"search_day\"],$search_info[\"search_year\"]);\n\t\t\t\t\t$sql = \"select * from \".$this->userdata_table.\", \".$this->logins_table.\",\".$this->user_groups_price_plans_table.\"\n\t\t\t\t\t\twhere \".$this->userdata_table.\".id = \".$this->logins_table.\".id and \".$this->user_groups_price_plans_table.\".id = \".$this->logins_table.\".id\n\t\t\t\t\t\tand date_joined \";\n\t\t\t\t\t//$sql = \"select * from \".$this->userdata_table.\" left join \".$this->user_groups_price_plans_table.\" using (id) where date_joined \";\n\t\t\t\t\tif ($search_info[\"before_or_after\"] == 1)\n\t\t\t\t\t\t$sql .= \" < \";\n\t\t\t\t\telse\n\t\t\t\t\t\t$sql .= \" > \";\n\t\t\t\t\t$sql .= $pivot_date;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\t//joined between dates\n\t\t\t\t\t//check if first date is less than second date\n\t\t\t\t\t$begin_date = mktime(0,0,0,$search_info[\"begin_month\"],$search_info[\"begin_day\"],$search_info[\"begin_year\"]);\n\t\t\t\t\t$end_date = mktime(0,0,0,$search_info[\"end_month\"],$search_info[\"end_day\"],$search_info[\"end_year\"]);\n\t\t\t\t\tif ($begin_date < $end_date)\n\t\t\t\t\t{\n\t\t\t\t\t\t//do the search\n\t\t\t\t\t\t$sql = \"select * from \".$this->userdata_table.\", \".$this->logins_table.\",\".$this->user_groups_price_plans_table.\"\n\t\t\t\t\t\t\twhere \".$this->userdata_table.\".id = \".$this->logins_table.\".id and \".$this->user_groups_price_plans_table.\".id = \".$this->logins_table.\".id and\n\t\t\t\t\t\t\tdate_joined < \".$end_date.\" and date_joined > \".$begin_date;\n\t\t\t\t\t\t//$sql = \"select * from \".$this->userdata_table.\" left join \".$this->user_groups_price_plans_table.\" using (id) where date_joined > \".$begin_date.\" and date_joined < \".$end_date;\n\t\t\t\t\t}\n\t\t\t\t\telseif (($begin_date == $end_date) || ($begin_date > $end_date))\n\t\t\t\t\t{\n\t\t\t\t\t\t//wrong search data\n\t\t\t\t\t\t$this->body .= \"<table width=100% cellpadding=5 cellspacing=1><tr>\\n\\t<td class=medium_font align=center>\\n\\t\n\t\t\t\t\t\t\t<b>Please enter your dates again...</b></td></tr></table>\";\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\t//users that have at least one listing expiring in the date range\n\t\t\t\t\t//check if first date is less than second date\n\t\t\t\t\t$begin_date = mktime(0,0,0,$search_info[\"begin_month\"],$search_info[\"begin_day\"],$search_info[\"begin_year\"]);\n\t\t\t\t\t$end_date = mktime(0,0,0,$search_info[\"end_month\"],$search_info[\"end_day\"],$search_info[\"end_year\"]);\n\t\t\t\t\tif ($begin_date < $end_date)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get seller of valid listings\n\t\t\t\t\t\t$listingSql = \"SELECT seller FROM \".geoTables::classifieds_table.\" WHERE ends >= '\".$begin_date.\"' AND ends <= '\".$end_date.\"' GROUP BY seller\";\n\t\t\t\t\t\t$listingResult = $db->Execute($listingSql);\n\t\t\t\t\t\t$sellers = array();\n\t\t\t\t\t\twhile($s = $listingResult->FetchRow()) {\n\t\t\t\t\t\t\t$sellers[] = $s['seller'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(count($sellers) > 0) {\n\t\t\t\t\t\t\t$sellers_in = implode(',' , $sellers);\n\t\t\t\t\t\t\t//do the search\n\t\t\t\t\t\t\t$sql = \"select * from \".$this->userdata_table.\" as ud, \".$this->logins_table.\" as l,\".$this->user_groups_price_plans_table.\" as pp\n\t\t\t\t\t\t\t\twhere ud.id = l.id and pp.id = l.id and ud.id IN (\".$sellers_in.\")\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//no results to show -- bogus query so it uses the common error thingy\n\t\t\t\t\t\t\t$sql = \"select * from \".geoTables::userdata_table.\" where false\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif (($begin_date == $end_date) || ($begin_date > $end_date))\n\t\t\t\t\t{\n\t\t\t\t\t\t//wrong search data\n\t\t\t\t\t\t$this->body .= \"<table width=100% cellpadding=5 cellspacing=1><tr>\\n\\t<td class=medium_font align=center>\\n\\t\n\t\t\t\t\t\t\t<b>Please enter your dates again...</b></td></tr></table>\";\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'id_in':\n\t\t\t\t\t$list_raw = explode(',',$search_info['id_in']);\n\t\t\t\t\t\n\t\t\t\t\t$list = array();\n\t\t\t\t\tforeach ($list_raw as $id) {\n\t\t\t\t\t\t$id = (int)trim($id);\n\t\t\t\t\t\t$list[$id] = $id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"SELECT * FROM \".geoTables::userdata_table.\" as ud, \".geoTables::logins_table.\" as l, \".geoTables::user_groups_price_plans_table.\" as pp\n\t\t\t\t\t\tWHERE ud.id=l.id AND pp.id=l.id AND ud.id IN (\".implode(', ',$list).\")\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'id_not_in':\n\t\t\t\t\t$list_raw = explode(',',$search_info['id_not_in']);\n\t\t\t\t\t//never include admin user...\n\t\t\t\t\t$list_raw[] = 1;\n\t\t\t\t\t\n\t\t\t\t\t$list = array();\n\t\t\t\t\tforeach ($list_raw as $id) {\n\t\t\t\t\t\t$id = (int)trim($id);\n\t\t\t\t\t\t$list[$id] = $id;\n\t\t\t\t\t}\n\t\t\t\t\t$group = '';\n\t\t\t\t\tif (isset($search_info['group_in'])) {\n\t\t\t\t\t\t$groups_raw = explode(',',$search_info['group_in']);\n\t\t\t\t\t\t$groups = array();\n\t\t\t\t\t\tforeach ($groups_raw as $group) {\n\t\t\t\t\t\t\t$group = (int)trim($group);\n\t\t\t\t\t\t\t$groups[$group] = $group;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$group = \" AND pp.group_id IN (\".implode(',',$groups).\")\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"SELECT * FROM \".geoTables::userdata_table.\" as ud, \".geoTables::logins_table.\" as l, \".geoTables::user_groups_price_plans_table.\" as pp\n\t\t\t\t\t\tWHERE ud.id=l.id AND pp.id=l.id AND ud.id NOT IN (\".implode(', ',$list).\") $group\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t} //end of switch\n\n\t\t\tif ($this->search_group)\n\t\t\t{\n\t\t\t\t$sql .= \" and group_id = \".$this->search_group;\n\t\t\t}\n\n\t\t\tif ($this->debug_user)\n\t\t\t{\n\t\t\t\techo $sql.\" is the search user query<bR>\\n\";\n\t\t\t}\n\n\t\t\tif (strlen(trim($sql)) == 0)\n\t\t\t{\n\t\t\t\t//no query to search with\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//echo $sql.'<br>';\n\t\t\t\t$this->display_search_results($db,urlencode($sql));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//no search info to search by\n\t\t\treturn false;\n\t\t}\n\t}", "function show_extra_user_meta_data() {\n\tglobal $userMeta, $pagenow;\n\n\t//Enqueue Scripts for dashboard profile, this needs to be placed here as this is the hook required to activate the code\n\tif( $pagenow == 'profile.php' ) {\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script( 'profile-user-meta', constant( 'EVERSION_PLUGIN_URL' ). '/js/profile-user-meta.js', array( 'jquery' ), '1.0', true );\n\t\twp_enqueue_style( 'admin-profile', constant( 'EVERSION_PLUGIN_URL' ) . '/style-profile.css' );\n\t}\n\t\n\t$userID = get_user_id_for_viewed_profile();\n\t\n\t//Check what groups user belongs to\n\t$user_array = array(\n\t\t\t'user_id' => $userID,\n\t\t\t'user_login' => null,\n\t\t\t'user_email' => null,\n\t\t\t'format' => '',\n\t\t\t'list_class' => 'groups',\n\t\t\t'item_class' => 'name',\n\t\t\t'order_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t\t);\n\t\n\t//Get groups of user profile being editted\n\t$user_groups_string = '';\n\t$user_groups_string .= do_shortcode_func( 'groups_user_groups', $user_array );\n\t\n\t//Check what group user has and display the appropriate user fields\n\tif (strpos($user_groups_string, 'Individual')) {\n\t\t$form = $userMeta->getFormData( 'Individual Member' );\n\t\techo '<h3>Individual Australian</h3>';\n\t}\n\telse if (strpos($user_groups_string, 'Service')) {\n\t\techo '<h3>Service Australian</h3>';\n\t\t$form = $userMeta->getFormData( 'Service Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Organisation')) {\n\t\techo '<h3>Organisation Australian</h3>';\n\t\t$form = $userMeta->getFormData( 'Organisation Member' );\n\t}\n\telse if (strpos($user_groups_string, 'Concession')) {\n\t\techo '<h3>Concession Australian</h3>';\n\t\t$form = $userMeta->getFormData( 'Concession Member' );\n\t}\n\t\n\tif(isset($form)) {\n\n\t\t$fields = $form[\"fields\"]; \n\t\t\n\t\t$user = new WP_User( $userID );\n\t\t\n\t\t$formKey = 'um_backend_profile';\n\n\t\t$i = 0;\n\t\t\n\t\tforeach( $fields as $fieldID ){\n\t\t\tif( empty($fieldID) )\n\t\t\tcontinue;\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\t// if first rows is not section heading then initiate html table\n\t\t\tif( ( $i == 1 ) || ( @$fields[ $fieldID ]['field_type'] <> 'section_heading' ) ){\n\t\t\t\techo \"<table class=\\\"form-table\\\"><tbody>\"; \n\t\t\t\t$inTable = true;\n\t\t\t}\n\t\t\t\n\t\t\tif( $fieldID['field_type'] == 'section_heading' ){\n\t\t\t\tif( @$inTable ){\n\t\t\t\t\techo \"</tbody></table>\";\n\t\t\t\t\t$inTable = false;\n\t\t\t\t} \n\t\t\t\techo \"<h3>\" . $fieldID['field_title'] . \"</h3> <table class='form-table'><tbody>\";\n\t\t\t\t$inTable = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(isset($fieldID['meta_key'])) {\n\t\t\t\t$fieldName = $fieldID['meta_key']; \n\t\t\t\t\n\t\t\t\tif( !$fieldName )\n\t\t\t\t\t$fieldName = $fieldID['field_type'];\n\t\t\t\t\n\t\t\t\t$fieldID['field_name'] = $fieldName;\n\t\t\t\t$fieldID['field_value'] = @$user->$fieldName;\n\t\t\t\t$fieldID['title_position'] = 'hidden';\n\t\t\t\t\n\t\t\t\t//$field = $fields[ $fieldID ];\n\t\t\t\t\n\t\t\t\t//user_meta_field_config (since 1.1.3rc2)\n\t\t\t\t//Can be modify fields data by calling this filter hook.\n\t\t\t\t//Function arguments: Form Data (array), Field ID (int), Form Name (string)\n\t\t\t\t\n\t\t\t\t$fields = apply_filters( 'user_meta_field_config', $fields, $fieldID, $formKey );\n\n\t\t\t\t$fieldDisplay = $userMeta->renderPro( 'generateField', array( \n\t\t\t\t\t'field' => $fieldID,\n\t\t\t\t\t'form' => null,\n\t\t\t\t\t'actionType' => null,\n\t\t\t\t\t'userID' => $userID,\n\t\t\t\t\t'inPage' => null,\n\t\t\t\t\t'inSection' => null,\n\t\t\t\t\t'isNext' => null,\n\t\t\t\t\t'isPrevious' => null,\n\t\t\t\t\t'currentPage' => null,\n\t\t\t\t\t'uniqueID' => 'profile',\n\t\t\t\t) );\n\t\t \n\t\t\t\t//Filter Hook: user_meta_field_display (since 1.1.3rc2)\n\t\t\t\t//Applied to field html before browser output.\n\t\t\t\t//Function arguments: HTML (string), Field ID (int), Form Name (string), Field Data (array)\n\t\t\t\t$html = apply_filters( 'user_meta_field_display', $fieldDisplay, $fieldID, $formKey, $fields );\n\t\t\t\t\n\t\t\t\t$field_id = $fieldID['field_id'];\n\t\t\t\t\n\t\t\t\tif( $fieldID ['field_type'] == 'hidden' )\n\t\t\t\t\techo $html;\n\t\t\t\telse\n\t\t\t\t\techo \"<tr><th><label for=\\\"um_field_$field_id\\\">{$fieldID['field_title']}</label></th><td>$html</td></tr>\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( @$inTable )\n\t\t\techo \"</tbody></table>\";\n\n\t\t ?> \n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tjQuery(\"#your-profile\").validationEngine();\n\t\t\t\tjQuery(\".um_rich_text\").wysiwyg({initialContent:\" \"}); \n\n\t\t\t\tumFileUploader( '<?php echo $userMeta->pluginUrl . '/framework/helper/uploader.php' ?>' ); \n\n\t\t\t\tvar form = document.getElementById( 'your-profile' );\n\t\t\t\tform.encoding = 'multipart/form-data';\n\t\t\t\tform.setAttribute('enctype', 'multipart/form-data'); \n\t\t\t});\n\t\t</script>\n\t\t<?php \n\n\t}\n}", "public function popupFriendRelationShip() {\n$i = $this->USER['id'];\n$relation = isset($_POST['relation']) ? $this->test_input($_POST['relation']) : '';\n\n\n$query = $this->query_select(\"select u.gender,u.id,u.fullname,u.profile_photo as photo,u.gender,f.relationship from \".tbl_users.\" u,\".tbl_friends.\" f\n where f.userid='{$i}' and u.id=f.friendid order by f.added\");\n\n$this->template->assign([ \"this\" => $this, \"query\" => $query, \"getRelation\" => $relation ]);\necho $this->getPage($this->template->fetch($this->theme_dir.\"/friends/friends_popup.html\"));\n}", "function userSearchResults(){\r\n global $DB, $Controller;\r\n if($_REQUEST['keyword'])\r\n {\r\n $results = array_merge(\r\n $DB->asList($DB->userinfo->search($_REQUEST['keyword'], 'val', 'id')),\r\n $DB->asList($DB->users->like($_REQUEST['keyword'], 'username', 'id'))\r\n );\r\n if(count($results) == 0) {\r\n return __('No results');\r\n }\r\n else {\r\n $results = $Controller->get(array_unique($results));\r\n propsort($results, 'Name');\r\n $r = '';\r\n $r .= '<h4>'.__('Search results').'</h4>';\r\n $r .= '<ul class=\"flul\">';\r\n $i=0;\r\n foreach($results as $user) {\r\n if($user) {\r\n $r .= '<li class=\"'.($i%2?'even':'odd').'\">'.icon('small/add', __('Add privileges for this user'), url(array('nP' => $user->ID), array('with', 'edit', 'referrer', 'filter', 'popup', 'keyword'))).$user.'</li>';\r\n $i++;\r\n }\r\n }\r\n $r .= '</ul>';\r\n return $r;\r\n }\r\n } else return \"\";\r\n }", "function _user_details (){\n $this->userid = $this->session->userdata('USERID');\n $this->gen_contents[\"userdetails\"] = $this->admin_user_model->select_single_userdetails($this->userid);\n $this->gen_contents[\"state\"] = $this->admin_user_model->select_state_name($this->gen_contents[\"userdetails\"]->state);\n $this->gen_contents[\"s_state\"] = $this->admin_user_model->select_state_name($this->gen_contents[\"userdetails\"]->s_state);\n $this->gen_contents[\"b_state\"] = $this->admin_user_model->select_state_name($this->gen_contents[\"userdetails\"]->b_state);\n $this->gen_contents[\"course_user_type\"] = $this->admin_user_model->select_user_course_types($this->gen_contents[\"userdetails\"]->course_user_type);\n\t\t}", "public function lookup_user($id);", "public static function manage_user_info(){\n\t\t// self::get_user_info();\n\t\t// insert data into db or another actions\n\t}", "function getUserInfo() {\n\n\t\t// Include necessary functions\n\t\tinclude 'connectToDatabase.php';\n\t\tinclude 'redirectToLastPage.php';\n\t\tinclude 'getUserIdFromEmail.php';\n\n\t\tif (isset($_SESSION['username'])) {\n\t\t\t// Connect to database\n\t\t\t$conn = connectToDatabase();\n\n\t\t\t$username = $_SESSION['username'];\n\n\t\t\t// Get userId\n\t\t\t$userId = getUserId($username);\n\n\t\t\t// Prepare query\n\t\t\t$stmt = $conn->prepare(\"SELECT userId, \n\t\t\t\t\t\t\tfirstName,\n\t\t\t\t\t\t\tlastName,\n\t\t\t\t\t\t\temailAddress,\n\t\t\t\t\t\t\tstreetAddress, \n\t\t\t\t\t\t\tcityAddress,\n\t\t\t\t\t\t\tstateAddress,\n\t\t\t\t\t\t\tphoneNumber \n\t\t\t\t\t\t\tFROM user WHERE userId=?\");\n\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while preparing the get user data query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\t\t\t// Bind query\n\t\t\t$stmt->bind_param('s', $userId);\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while binding parameters to the get user data query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\t// Execute query\n\t\t\t$stmt->execute();\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while executing the get user data query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\t// Get results\n\t\t\t$result = $stmt->get_result();\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while getting the results of the get user data query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\t// Get results as an assoc array\n\t\t\t$user = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t\t\t\n\t\t\t// Get list of joined events\n\t\t\t// Prepare query\n\t\t\t$stmt->prepare(\"SELECT * FROM userJoinEvent INNER JOIN event USING (eventId) WHERE userJoinEvent.userId=?\");\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while preparing the get joined events query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\t\t\t\n\t\t\t// Bind paramters\n\t\t\t$stmt->bind_param('s', $userId);\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while binding parameters to the get joined events query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\t\t\t\n\t\t\t// Execute query\n\t\t\t$stmt->execute();\n\t\t\tif ($stmt == false) {\n\t\t\t\techo \"Something went wrong while executing the get joined events query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\t// Get results\n\t\t\t$result = $stmt->get_result();\n\t\t\t\n\t\t\tif ($result == false) {\n\t\t\t\techo \"Something went wrong while getting the results of the get joined events query.\";\n\t\t\t\tdisplayRedirect();\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\t$events = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n\t\t\t$userAndEvents = array($user, $events);\n\n\t\t\treturn $userAndEvents;\n\t\t} else {\n\t\t\techo \"Please sign in before viewing your account.\";\n\t\t\tdisplayRedirect();\n\t\t\tdie;\n\t\t}\n\t}", "public function showusers()\n\t{\n\t\tif (!$this->tank_auth->is_admin_login() )\n\t\t\tredirect('/admin/auth/login');\n\t\n\t\t$this->addCSSSource('humanity/jquery-ui-1.8.16.custom.css');\n\t\t\n\t\t$this->addJavaScriptSource('jquery-ui-1.8.16.custom.min.js');\n\t\t\n\t\t$this->addCSSSource('ui.jqgrid.css');\n\t\t\n\t\t$this->addJavaScriptSource('jquery-ui-1.8.16.custom.min.js');\n\t\t$this->addJavaScriptSource('jqgrid/js/i18n/grid.locale-en.js');\n\t\t$this->addJavaScriptSource('jqgrid/js/jquery.jqGrid.min.js');\n\t\n\t\t$this->data['mb_data'] = $this->load->view('admin/showusers', null, true);\n\t\t$this->addMainBodyData($this->data['mb_data']);\n\t\t$this->displayView();\n\t}", "public function getShortcutPopup()\n\t\t\t{\n\t\t\t \t$show_shortcuts_arr = array();\n\t\t\t \t$show_shortcuts_arr[0]['Link']=getUrl('myprofile');\n\t\t\t \t$show_shortcuts_arr[0]['Link_Name']=$this->LANG['header_myprofilelinks_profilelayout'];\n\n\t\t\t\t$show_shortcuts_arr[1]['Link']=getUrl('viewprofile', '?user='.$this->CFG['user']['user_name'], $this->CFG['user']['user_name'].'/');\n\t\t\t \t$show_shortcuts_arr[1]['Link_Name']=$this->LANG['header_myprofilelinks_profilequickedit'];\n\n\t\t\t \t$show_shortcuts_arr[2]['Link']=getUrl('profilebasic', '', '', 'members');\n\t\t\t \t$show_shortcuts_arr[2]['Link_Name']=$this->LANG['header_myprofilelinks_profile_basic'];\n\t\t\t \t$inc = 3;\n\t \tforeach ($this->CFG['site']['modules_arr'] as $key=>$value)\n\t \t{\n\t \t \tif(chkAllowedModule(array(strtolower($value))))\n\t \t\t\t\t\t{\n\t \t\t\t\t\t\tif(isset($CFG['page_url'][$value.'list']['normal']))\n\t \t\t\t\t\t\t\t{\n\t\t\t\t \t \t \t\t \t\t$show_shortcuts_arr[$inc]['Link']=getUrl($value.'list', '?pg=my'.$value.'s', 'my'.$value.'s/', '', $value);\n\t\t\t\t\t\t \t$show_shortcuts_arr[$inc]['Link_Name']=$this->LANG['header_my_shortcuts_popup_'.$value];\n\t\t\t\t\t\t \t$inc++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t \t}\n\t \t}\n\t \treturn $show_shortcuts_arr;\n\t\t\t}", "function fetch_info() {\n \n // Check if a fetch is necessary\n if($this->fetched_info_from_directory == true) return $this->search_status; \n \n // Perform error checking on directory and sunetid\n $this->check_before_query();\n \n // Get user info\n $user_info = $this->directory->get_user_info($this->sunetid);\n \n // Check the result\n if(sizeof($user_info) == 0) {\n // Set search status and return false\n $this->search_status = false;\n return false;\n }\n \n // Store user information\n if(is_array($user_info)) { \n \n // Set search status\n $this->search_status = true;\n \n // Parse the resultset\n $this->sunetid = $user_info[uid][0];\n $this->first_name = $user_info[sudisplaynamefirst][0];\n $this->last_name = $user_info[sudisplaynamelast][0];\n $this->middle_name = $user_info[sudisplaynamemiddle][0];\n $this->full_name = $user_info[displayname][0];\n $this->email = $user_info[mail][0];\n \n $this->home_phone = $user_info[homephone][0];\n $this->mobile_phone = $user_info[mobile][0];\n $this->pager_number = $user_info[pager][0];\n $this->work_phone = $user_info[telephonenumber][0];\n $this->pager_email = $user_info[suemailpager][0];\n \n $this->home_postal_address = $user_info[homepostaladdress][0];\n $this->work_postal_address = $user_info[postaladdress][0];\n $this->permanent_postal_address = $user_info[supermanentaddress][0];\n \n $this->job_title = $user_info[title][0];\n \n // Get affiliations\n if(isset($user_info[suaffiliation])) {\n $this->affiliations = $user_info[suaffiliation];\n unset($this->affiliations['count']);\n \n // Primary affiliation\n $primary_affiliation = $user_info[sugwaffilcode1][0];\n \n foreach($this->affiliations as $affiliation) {\n if(strpos($affiliation, \"nonactive\") !== false) continue;\n \n if(strpos($affiliation, \"stanford:staff\") !== false) {\n $this->is_staff = true;\n if($affiliation == $primary_affiliation) {$this->primary_affiliation = StanfordPerson::STAFF; }\n }\n \n if(strpos($affiliation, \"stanford:student\") !== false) {\n $this->is_student = true;\n if($affiliation == $primary_affiliation) {$this->primary_affiliation = StanfordPerson::STUDENT; }\n }\n \n if(strpos($affiliation, \"stanford:faculty\") !== false) {\n $this->is_faculty = true;\n if($affiliation == $primary_affiliation) {$this->primary_affiliation = StanfordPerson::FACULTY; }\n }\n \n if(strpos($affiliation, \"stanford:affiliate\") !== false) {\n $this->is_affiliate = true;\n if($affiliation == $primary_affiliation) {$this->primary_affiliation = StanfordPerson::AFFILIATE; }\n }\n }\n }\n }\n \n // Set flag to not search the directory again\n $this->fetched_info_from_directory = true;\n \n // Close the connection if necessary\n if($this->close_ldap_after_search == true) {\n $this->directory->disconnect();\n }\n \n return $this->search_status;\n }", "function view_profile_info($id){\r\n $username = \"\";\r\n $profile_name = \"\";\r\n $password = \"**********\";\r\n $user_type = \"\";\r\n $user_email = \"\";\r\n $registered_date = \"\";\r\n $profile_picture = \"\";\r\n\r\n $user_rs = getResultSet(\"SELECT user_name, level_id, user_profile_name, user_email, user_registered_date, user_profile_picture FROM tbl_users WHERE user_id = \" . $id);\r\n if(mysql_num_rows($user_rs) != 0){\r\n while($user_info = mysql_fetch_array($user_rs)){\r\n $username = $user_info[0];\r\n $user_type = getValue(\"SELECT level_name FROM tbl_user_level WHERE level_id = \" . $user_info[1]);\r\n $profile_name = $user_info[2];\r\n $user_email = $user_info[3];\r\n $registered_date = $user_info[4];\r\n $profile_picture = $user_info[5];\r\n }\r\n }\r\n $img_style = \"\";\r\n if($profile_picture == \"\"){\r\n $profile_picture = \"app_images/image_not_found.jpg\";\r\n $img_style = \"style='border:1px solid #e3e3e3;' \";\r\n }\r\n echo '<table class=\"user_profile\">\r\n <tr><td class=\"profile_left\" valign=\"top\">\r\n <img class=\"user_profile_picture\" src =\"' . $profile_picture . '\" ' . $img_style . '/>\r\n </td>';//end of first left side-start second side\r\n\r\n\r\n echo '<td valign=\"top\">';\r\n echo '<span class=\"profile_name\">' . $profile_name . '</span><br />';\r\n\r\n echo '<table>';\r\n echo '<tr><td width=\"100\"><span class=\"profile_label\">Username</span></td><td><span class=\"profile_info\">' . $username . '</span></td></tr>';\r\n echo '<tr><td><span class=\"profile_label\">User Type</span></td><td><span class=\"profile_info\">' . $user_type . '</span></td></tr>';\r\n echo '<tr><td><span class=\"profile_label\">Email</span></td><td><span class=\"profile_info\"><a href=\"mailto:' . $user_email . '\">' . $user_email . '</a></span></td></tr>';\r\n echo '<tr><td><span class=\"profile_label\">Registered On</span></td><td><span class=\"profile_info\">' . $registered_date . '</span></td></tr>';\r\n echo '</table>';\r\n\r\n echo '</td>\r\n </tr></table>';\r\n}" ]
[ "0.65871745", "0.62799877", "0.62113804", "0.5741333", "0.5700467", "0.5655772", "0.5591941", "0.55554247", "0.5515804", "0.55042523", "0.54829365", "0.5454467", "0.5453171", "0.5447385", "0.5444987", "0.5421256", "0.5419404", "0.5367143", "0.53412956", "0.5337654", "0.53157747", "0.53098583", "0.52933365", "0.52767456", "0.52766", "0.5272864", "0.5269106", "0.5265194", "0.5254074", "0.52491945", "0.52394414", "0.52386063", "0.52374005", "0.5224143", "0.5215047", "0.5214421", "0.52138966", "0.5209384", "0.5203417", "0.5180883", "0.5180047", "0.5175561", "0.51729774", "0.5172264", "0.51717114", "0.5171395", "0.5163752", "0.51525515", "0.51523864", "0.51504457", "0.51343846", "0.5129737", "0.512707", "0.51211697", "0.5111608", "0.5109403", "0.5101206", "0.50902057", "0.5081269", "0.50687814", "0.50641465", "0.5061857", "0.5057061", "0.50530267", "0.50496703", "0.5047117", "0.50423014", "0.50353295", "0.50303227", "0.5025655", "0.5021247", "0.5008892", "0.49998215", "0.49983037", "0.4992447", "0.49919882", "0.49858913", "0.49856147", "0.49796882", "0.49765792", "0.49754128", "0.4970963", "0.49697697", "0.49665934", "0.49649662", "0.49635258", "0.49555606", "0.49548432", "0.49538568", "0.49531937", "0.4948761", "0.49373442", "0.49338263", "0.49333084", "0.49306068", "0.49283853", "0.4926706", "0.49254936", "0.49200135", "0.49159998" ]
0.78488106
0
// function::load_popup_list_mobile_user_vng_staff_list description: popup display list mobiles of one user
// function::load_popup_list_mobile_user_vng_staff_list описание: отображение попапа со списком мобильных устройств одного пользователя
public function load_popup_list_mobile_user_vng_staff_list() { $iUserId = $_REQUEST['userid']; $strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null; $strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; $strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null; $strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null; $strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null; $arrUser = array(); $arrOrders = array('; ', ';', '/ ','/'); $arrChildOrders = array('. ', '- ', '.', '-'); if(isset($iUserId)) { $arrUser = $this->contact_model->getStaffById($iUserId); if(!empty($arrUser)) { $arrUser['cellphone'] = str_replace($arrOrders, ', ', $arrUser['cellphone']); $arrUser['cellphone'] = str_replace($arrChildOrders, '', $arrUser['cellphone']); $arrUser['cellphone'] = explode(', ', $arrUser['cellphone']); $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId); } else { $this->loadview('error/error_no_found_user', array(), 'layout_popup'); } } else { $iUserId = 0; $this->loadview('error/error_no_found_user', array(), 'layout_popup'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_popup_list_mobile_user() {\n \t// pd($_REQUEST);\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getUserById($iUserId);\n \t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['mobile'] = str_replace($arrOrders, ', ', $arrUser['mobile']);\n\t \t\t$arrUser['mobile'] = str_replace($arrChildOrders, '', $arrUser['mobile']);\n\t \t$arrUser['mobile'] = explode(', ', $arrUser['mobile']);\n\t\t\t\t$this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t \t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function load_popup_sms_vng_staff_list() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; \n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n\t\t$arrOneUser = $this->contact_model->getStaffById($noUserId);\n\t\t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(!empty($arrOneUser)) {\n \t\t$arrOneUser['cellphone'] = str_replace($arrOrders, ', ', $arrOneUser['cellphone']);\n\t \t$arrOneUser['cellphone'] = str_replace($arrChildOrders, '', $arrOneUser['cellphone']);\n\t if(strpos($arrOneUser['cellphone'], ',')!==false) {\n\t $arrOneUser['cellphone'] = explode(', ', $arrOneUser['cellphone']);\n\t } else {\n\t $arrOneUser['cellphone'] = array($arrOneUser['cellphone']);\n\t }\n \t} else {\n \t\t$arrOneUser = array();\n \t}\n \t\n\t\t$this->loadview('contact/popup_send_message_VNGHR', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_user_information() {\n\t\t$strUserDomain = $_REQUEST['user'];\n\t\t$strIncidentId = $strAlertId = $strAlertMsg = $strTimeAlert = $strIdentifier = $strChangeId = null;\n\t\tif(!empty($_REQUEST['incident_id'])) {\n\t\t\t$strIncidentId = $_REQUEST['incident_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_id'])) {\n\t\t\t$strAlertId = $_REQUEST['alert_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_msg'])) {\n\t\t\t$strAlertMsg = trim($_REQUEST['alert_msg']);\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($_REQUEST['time_alert'])) {\n\t\t\t$strTimeAlert = trim($_REQUEST['time_alert']);\n\t\t}\n\t\tif(!empty($_REQUEST['identifier'])) {\n\t\t\t$strIdentifier = $_REQUEST['identifier'];\n\t\t}\n\t\tif(!empty($_REQUEST['change_id'])) {\n\t\t\t$strChangeId = $_REQUEST['change_id'];\n\t\t}\n\t\t$arrUsersInfo = $this->contact_model->getListUsersInfoByUserDomain($strUserDomain);\n\t\t//$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain('minht');\n\t\t$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain($strUserDomain);\n\t\t$arrEmails = array();\n\t\t$arrSearched = array();\n\t\t$arrVNGStaffListSearched = array();\n\t\t$t = 0;\n\t\tif(!empty($arrUsersInfo)) {\n\t\t\t$noUserIdTemp = $arrUsersInfo[0]['userid']; \n\t\t\t$arrEmails[0] = $arrUsersInfo[0]['email'];\n\t\t\tforeach ($arrUsersInfo as $key => $oneUser) {\n\t\t\t\tif($noUserIdTemp != $oneUser['userid']) {\n\t\t\t\t\t$noUserIdTemp = $oneUser['userid'];\n\t\t\t\t\t$t = 0;\n\t\t\t\t\t$arrEmails[] = strtolower($oneUser['email']);\n\t\t\t\t} \n\t\t\t\t$arrSearched[$noUserIdTemp][$t] = $oneUser;\n\t\t\t\t$t++;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$arrSearched = array();\n\t\t}\n\n\t\tif(!empty($arrVNGStaffList)) {\n\t\t\tforeach ($arrVNGStaffList as $index => $oOneStaff) {\n\t\t\t\tif(!in_array(strtolower($oOneStaff->email), $arrEmails)) {\n\t\t\t\t\t$arrVNGStaffListSearched[] = $oOneStaff;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$arrVNGStaffListSearched = array();\n\t\t}\n\t\t$this->loadview('contact/popup_search_by_user_result', array('arrSearchUsersResult' => $arrSearched, 'arrVNGStaffs' => $arrVNGStaffListSearched, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIdentifier' => $strIdentifier, 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "function user_list()\n\t\t{\n\t\t\t$this->view->user_list\t= $this->model->user_list();\n\t\t\tif(is_array($this->view->user_list))\n\t\t\t{\n\t\t\t\t$this->view->js_render('staff/AJAX/staff_list');\n\t\t\t}else\n\t\t\t{// if There Is Error!\n\t\t\t\techo $this->view->user_list;\n\t\t\t}\n\t\t}", "private function list_by_user()\r\n {\r\n //get_mobile_list_by_user se utiliza el usuario en session\r\n $oActivity = new ModelActivities($this->_session_user_code);\r\n \r\n //Datos para paginación. La primera vez list_page=null. Esto lo controla\r\n //el componente paginate en el modelo\r\n $oActivity->set_list_page($this->_list_page);\r\n //Comprobación de busqueda. Por campos\r\n $arSearchFields = array(\"DateP\",\"User_Description\");\r\n //Si detecta que no se está buscando lo elimina de la sesion\r\n //bug($_POST);bug($arSearchFields); die;\r\n if($this->is_searching($arSearchFields,\"oSchUserActivity\"))\r\n { \r\n //bug(\"is searching\");\r\n $sHydraDate = $this->convert_to_hydra_date($_POST[\"sch_DateP\"]);\r\n $oActivity->set_datep($sHydraDate);\r\n $oActivity->set_user_description($_POST[\"sch_User_Description\"]);\r\n $this->oSite->set_in_session(\"oSchUserActivity\", $oActivity);\r\n }\r\n\r\n //Datos para el listado\r\n $arDataList = $oActivity->get_mobile_list_by_user();\r\n\r\n $this->_list_num_pages = $oActivity->get_list_num_pages();\r\n $this->_list_total_regs = $oActivity->get_total_regs();\r\n //Esto es necesario pq el modelo corrige la página si está fuera de rango\r\n $this->_list_page = $oActivity->get_list_page();\r\n $arPagesForSelect = $oActivity->get_list_pages();\r\n\r\n //Select con páginas\r\n $oSelPage = new HelperSelect($arPagesForSelect, \"selPage\",\"\", $this->_list_page);\r\n $oSelPage->set_js_onchange(\"sel_page_change(this);\");\r\n\r\n //ActionBar\r\n $sLnkSearch = $this->_link_url_list_frg;\r\n $oActionBar = new HelperActionBar(\"Actividades\");\r\n \r\n //Renderizador de listado\r\n //bug($arDataList); die;\r\n\r\n $oHlpList = new HelperList($arDataList,\"Fecha\",array(\"Code\"),array(\"Contacto\",\"Comercial\"),\r\n $this->_list_page, $this->_list_num_pages, $this->_list_total_regs,\r\n \"activities\",\"detail\",array(\"Code\"));\r\n\r\n //Variables a utilizar en la vista \r\n $this->oGParams->set_in_vars(\"sCodeAccount\", $sCodeAccount);\r\n $this->oGParams->set_in_vars(\"oSelPage\", $oSelPage);\r\n $this->oGParams->set_in_vars(\"oOwnerInfoBar\", $oOwnerInfoBar);\r\n $this->oGParams->set_in_vars(\"oFrgLink\", $oFrgLink);\r\n $this->oGParams->set_in_vars(\"oActionBar\", $oActionBar);\r\n $this->oGParams->set_in_vars(\"oHlpList\", $oHlpList);\r\n \r\n $this->oView->add_file(\"user_activities.php\");\r\n $this->oView->display(); \r\n }", "public function GetUserMobileList()\n {\n return [];\n }", "public function list(){\n\t\t\t$data['userData'] = $this->session->userdata();\n\t\t\t$data['title'] = 'Admin | List of Users';\n\t\t\t$data['userList'] = $this->admin_model->getUsers();\n\t\t\t$this->load->template('admin/users/list', $data);\n\t\t}", "function lists()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$instructions['action'] = array('report'=>'view_users');\n\t\tcheck_access($this, get_access_code($data, $instructions));\n\t\t\n\t\t$data['list'] = $this->_user->get_list(array('action'=>'report'));\n\t\t$this->load->view('user/list_users', $data); \n\t}", "function getuser(){\n\tif($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\tif (isset($_POST['submitloadusers']) == 'Load Users') {\n\n\t\t\tif (!empty($_SESSION['token'])) {\n\t\t\t\t\n\t\t\t\t$request_url = url.user.\"?realm=\".realm;\n\t\t\t\t\n\t\t\t\t$gettoken = substr($_SESSION['token'], 0, -1);\n\t\t\t\t\n\t\t\t\t$ch = curl_init();\n\t\t\t\t\n\t\t\t\t$request_headers = array();\n\t\t\t\t$request_headers[] = 'Content-Type: application/json; charset=utf-8';\n\t\t\t\t$request_headers[] = 'x-auth-token: '.$gettoken;\n\t\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $request_url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER,FALSE);\n\t\t\t\t\n\t\t\t\t$response = curl_exec($ch);\n\t\t//\t\techo $response = curl_exec($ch);\n\t\t//\t\tprint_r($response);\n\t\t\n\t\t\t\t$response = json_decode($response, true);\n\n\t\t\t\t\techo \t\"<table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t\t<td>Last Name</td>\n\t\t\t\t\t\t\t<td>Email</td>\t\t\n\t\t\t\t\t\t\t<td>Extension</td>\n\t\t\t\t\t\t\t<td>Numbers</td>\n\t\t\t\t\t\t\t<td>Datum</td>\n\t\t\t\t\t\t\t</tr>\"; \t\n\n\t\t\t\tforeach ($response as $key => $value) {\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\".$value['fname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['lname'].\"</td>\n\t\t\t\t\t\t<td>\".$value['email'].\"</td>\n\t\t\t\t\t\t<td>\".$value['ext'].\"</td>\n\t\t\t\t\t\t<td>\"; \n\t\t\t\t\tforeach ($value['numbers'] as $key2 => $numvalue) {\n\t\t\t\t\techo $numvalue;\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\"; \n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\t\t\techo \"<form action='getlist.php' method='post' id='popupForm'> \n\t\t\t\t\t<input type='text' name='exte' class='exte' value=\".$value['ext'].\"> \n\t\t\t\t\t<input type='submit' name='aanvragen' id='aanvragen' value='aanvragen'></form>\";\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\techo \"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t</table> \";\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//print_r($response);\n\t\t\t\t\n\t\t\t\tcurl_close($ch);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//echo\"Load User\";\n\t\t} \n\t}\n}", "public function load_popup_sms() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = @$_REQUEST['incident_id'];\n\t\t$strAlertId = @$_REQUEST['alert_id'];\n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = isset($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = isset($_REQUEST['change_id']) ? trim($_REQUEST['change_id']) : null;\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n\t\t$arrOneUser = array();\n\t\tif($noUserId != null) {\n\t\t\t$arrOneUser = $this->contact_model->getUserById($noUserId);\n\t\t\tif(!empty($arrOneUser)) {\n\t\t\t\t$arrOneUser['mobile'] = str_replace($arrOrders, ', ', $arrOneUser['mobile']);\n\t\t \t$arrOneUser['mobile'] = str_replace($arrChildOrders, '', $arrOneUser['mobile']);\n\t\t if(strpos($arrOneUser['mobile'], ',')!==false) {\n\t\t $arrOneUser['mobile'] = explode(', ', $arrOneUser['mobile']);\n\t\t } else {\n\t\t $arrOneUser['mobile'] = array($arrOneUser['mobile']);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$this->loadview('contact/popup_send_message', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "function getUserLists() {\r\n\t\t$current_user_id=$this->getCurrentUserID ();\t\r\n\t\t$user = new User ();\r\n\t\t$user->id = $current_user_id;\r\n\t\t$lists_array = array ();\r\n\t\tforeach ( $user->getOwnLists () as $list_row ) {\r\n\t\t\t$list = new QList ();\r\n\t\t\t$list->createFromID ( $list_row ['id'] );\r\n\t\t\t$lists_array [] = $list;\r\n\t\t}\r\n\t\techo json_encode ( $lists_array );\r\n\t}", "function m_UserList()\n\t{\n\t\tglobal $attributes,$arAdminDetail;\n\t\t$stMsg = \"\";\n\n\t\t\n\t\tif(isset($attributes['msg']))\n\t\t{\n\t\t\t$stMsg = constant(strtoupper($_GET['msg']));\n\t\t}\n\t\t\n\t\t$stExtraAtt = isset($attributes['page'])?'page='.$attributes['page'].\"&\" : '';\n\t\t$this->smarty->assign('EXTRA_ATT',$stExtraAtt);\n\t\tif(isset($attributes['selAction']))\n\t\t{\n\t\t\tif(isset($attributes['chkPage'])) \n\t\t\t{\n\t\t\t\t$stIds = implode(\",\", $attributes['chkPage']);\n\t\t\t\t$rsResult = $this->dbHandler->m_UserAction($stIds,$attributes['selAction']);\n\t\t\t\tif($rsResult)\n\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\tif(isset($attributes['txtSearch']))\n\t\t\t\t\t{\n\t\t\t\t\t\theader(\"Location:\".SITE_URL.\"user/adminindex.php?action=searchuser&txtSearch=\".$attributes['txtSearch'].\"&msg=RECORD_\".strtoupper($attributes['selAction']).\"&\".$stExtraAtt);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\theader(\"Location:\".SITE_URL.\"user/adminindex.php?action=userlist&msg=RECORD_\".strtoupper($attributes['selAction']).\"&\".$stExtraAtt);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$stMsg = QUERY_ERROR;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$stMsg = SELECT_VALUE;\n\t\t\t}\t\t\t\t\t\n\t\t}\n\n\t\t$inPageNum =0;\n\t\t$inPerPage = PAGE_SIZE;\n\t\tif(isset($attributes['page']))\n\t\t{\n\t\t\t$inPageNum = $attributes['page']-1;\n\t\t}\n\t\t$inStart = $inPageNum*$inPerPage;\n\n\t\t$inRowCount = $this->dbHandler->m_GetUserCount();\t\n\t\t$this->smarty->assign('PAGE_COUNT',$inRowCount);\n\t\t\t\t\n\t\t\t\n\t\t// code for paging\t\t\n\t\t$stPagingParam\t= \"action=\".$attributes['action'];\n\t\t$stPagingParam .= isset($attributes['txtSearch'])?\"&txtSearch=\".$attributes['txtSearch']:\"\";\n\t\t$qry = \"SELECT * FROM tb_user\";\t\t\n\t\tif(isset($attributes['action']) && $attributes['action'] == \"searchuser\")\n\t\t{\n\t\t\t$this->smarty->assign(\"SEARCH_KEYWORD\", $attributes['txtSearch']);\n\t\t\t$qry .= \" WHERE vEmail LIKE ('%\".addslashes($attributes['txtSearch']).\"%') \n\t\t\t\t\tOR vFirstName LIKE ('%\".addslashes($attributes['txtSearch']).\"%') \n\t\t\t\t\tOR vLastName LIKE ('%\".addslashes($attributes['txtSearch']).\"%')\n\t\t\t\t\tOR CONCAT(vFirstName, ' ', vLastName) LIKE ('%\".addslashes($attributes['txtSearch']).\"%')\";\n\t\t}\n\t\t$qry .= \" ORDER BY iId DESC\";\n\n\t\n\t\t$pager = new PrevNext($this->dbHandler->obDbase);\n\t\t$resArr = $pager->create($qry, PAGE_SIZE,$stPagingParam);\t\t\t\n\t\t$this->smarty->assign('PAGING',$resArr['pnContents']);\n\t\t// code for paging\t\t\n\t\t$arData = array();\n\t\tif($resArr['qryRes']->NumRows())\n\t\t{\n\t\t\t$this->smarty->assign(\"IS_RECORD\", true);\n\t\t\twhile(!$resArr['qryRes']->EOF)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\t$arData[]= $resArr['qryRes']->fields;\n\t\t\t\t$resArr['qryRes']->MoveNext();\n\t\t\t}\n\t\t\t$this->smarty->assign(\"IS_RECORD\", true);\n\t\t\t$this->smarty->assign(\"ARR_DATA\",$arData);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->smarty->assign(\"IS_RECORD\", false);\n\t\t}\n\n\n\t\tif($stMsg)\n\t\t{\n\t\t\t$this->smarty->assign('ERROR_MSG',$stMsg);\n\t\t}\n\t\tif(isset($attributes['page']))\n\t\t\t$this->smarty->assign('PAGE', $attributes['page']);\n\t\telse\n\t\t\t$this->smarty->assign('PAGE', 1);\n\t\tif(isset($attributes['txtSearch']))\n\t\t\t$stNavigationText = 'User search result';\n\t\telse\n\t\t\t$stNavigationText = 'Manage Users';\n\n\t\t$this->smarty->assign('TOP_NAVIGATION',$stNavigationText);\n\t\t$innerTemp = $this->smarty->fetch('admin_user_list.tpl.html');\t\t\n\t\treturn $innerTemp;\n\t}", "public function searchInJprofileContacts($idList,$mobile)\n {\n $sql=\"SELECT PROFILEID FROM newjs.JPROFILE_CONTACT WHERE PROFILEID IN ('$idList') AND ALT_MOBILE IN('0$mobile','$mobile','+91$mobile','91$mobile')\";\n $res=mysql_query_decide($sql) or logError($sql);\n if($row=mysql_fetch_array($res))\n\t\t{\n\t\t\t$this->ignoringId=$row[\"PROFILEID\"];\n\t\t\t$this->ignoringGender=$this->findGender($this->ignoringId);\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n }", "public function memberList()\n {\n $map = array('user_id'=>$_SESSION['uid']);\n $fields = array('id','name','mobile','date_login');\n $page = page(D('Member')->getCount($map));\n\n $member_list = D('Member')->field($fields)->where($map)->order('date_login desc')->limit($page->firstRow,$page->listRows)->select();\n\n $fields_all = D('Member')->field_list();\n $data = array(\n 'title' => '会员列表',\n 'field_list' => $this->get_field_list($fields_all,$fields),\n 'field_info' => $member_list,\n 'page_list' => $page->show(),\n );\n $this->assign($data);\n $this->display('Public:list');\n }", "static function user_list() {\n\t\t\tglobal $cv_admin_users_list;\n\n\t\t\tif ( !empty( $cv_admin_users_list ) ) {\n\t\t\t\t$result = $cv_admin_users_list;\n\t\t\t} else {\n\t\t\t\t$result\t = array();\n\t\t\t\t$show\t = 'display_name';\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'fields'\t => array( 'ID', $show, 'user_login' ),\n\t\t\t\t\t'orderby'\t => 'display_name',\n\t\t\t\t\t'order'\t\t => 'ASC',\n\t\t\t\t);\n\n\t\t\t\t$users = get_users( apply_filters( PT_CV_PREFIX_ . 'user_list', $args ) );\n\t\t\t\tforeach ( (array) $users as $user ) {\n\t\t\t\t\t$user->ID\t = (int) $user->ID;\n\t\t\t\t\t$display\t = !empty( $user->$show ) ? $user->$show : '(' . $user->user_login . ')';\n\n\t\t\t\t\t$result[ $user->ID ] = esc_html( $display );\n\t\t\t\t}\n\n\t\t\t\t$cv_admin_users_list = $result;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "public function getUserList();", "public function user_list(){\n\t\t$view = $this->getView('usersearch', 'html');\n\t\t$view->assign('action', 'list');\n\t\t$view->display();\n\t}", "function list_data() {\n $custom_fields = $this->Custom_fields_model->get_available_fields_for_table(\"team_members\", $this->login_user->is_admin, $this->login_user->user_type);\n // $options = array(\n // \"status\" => $this->input->post(\"status\"),\n // \"user_type\" => \"staff\",\n // \"custom_fields\" => $custom_fields\n // );\n\n\n $list_data = $this->Vendor_model->get_details()->result();\n $result = array();\n foreach ($list_data as $data) {\n $result[] = $this->_make_row($data, $custom_fields);\n }\n echo json_encode(array(\"data\" => $result));\n }", "function get_user_list() {\n\n\tglobal $alias;\n\n\t$ret_users = \"\";\n\n\tif(isset($_GET['p'])) {\n\t\t$pattern = plain_escape($_GET['p']);\n\t} else {\n\t\theader(\"Location: users.php?p=\");\n\t\tsession_write_close();\n\t\texit;\n\t}\n\n\t$res = M_Login::get_users($pattern);\n\t$users = $res->value;\n\n\t$len = count($users);\n\tif($len > 0) {\n\t\tfor($i = 0; $i < $len; $i++) {\n\t\t\t\n\t\t\t$name = $users[$i]->name;\n\t\t\t$email = $users[$i]->email;\n\t\t\t$adminval = $users[$i]->admin;\n\t\t\tif($adminval) {\n\t\t\t\t$admin = \"Admin\";\n\t\t\t} else {\n\t\t\t\t$admin = \"User\";\n\t\t\t}\n\t\t\t$dob = $users[$i]->dob;\n\t\t\t$id = $users[$i]->id;\n\t\t\tif($users[$i]->verified) {\n\t\t\t\t$verified = \"Y\";\n\t\t\t} else {\n\t\t\t\t$verified = \"N\";\n\t\t\t}\n\n\t\t\t$ret_users .= <<<EOT\n\n\t\t\t<tr>\n\t\t\t\t<td><p><a class=\"friends\" href=\"$alias/profile/profile_look.php?user=$name\">$name</a></p></td>\n\t\t\t\t<td><p>$email</p></td>\n\t\t\t\t<td><form class=\"centerv\" method=\"POST\">\n\t\t\t\t\t<input class=\"centerv\" type=\"submit\" name=\"toggle\" value=\"$admin\" />\n\t\t\t\t\t<input class=\"centerv \"type=\"hidden\" name=\"adminval\" value=\"$adminval\" />\n\t\t\t\t\t<input class=\"centerv\" type=\"hidden\" name=\"name\" value=\"$name\" />\n\t\t\t\t</form></td>\n\t\t\t\t<td><p>$dob</p></td>\n\t\t\t\t<td><p>$id</p></td>\n\t\t\t\t<td><p>$verified</p></td>\n\t\t\t\t<td><form class=\"centerv\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"name\" value=\"$name\" />\n\t\t\t\t\t<input class=\"centerv\" type=\"submit\" name=\"delete\" value=\"Delete\" />\n\t\t\t\t</form></td>\n\t\t\t</tr>\n\nEOT;\n\n\t\t}\n\n\t} else {\n\t\t$ret_users .= \"<tr><p style=\\\"color: red;\\\">No usernames found matching \\\"$pattern\\\".</p></tr>\";\n\t}\n\n\treturn $ret_users;\n}", "public function getVolMentStaffMemList()\n { \n global $session;\n $result=$session->getVolMentStaffMemList($_POST['cid'],$_POST['assignedto']);\n echo $result;\n }", "function list_data() {\n\n $this->access_only_allowed_members();\n $custom_fields = $this->Custom_fields_model->get_available_fields_for_table(\"patients\", $this->login_user->is_admin, $this->login_user->user_type);\n $options = array(\n \"custom_fields\" => $custom_fields,\n \"group_id\" => $this->input->post(\"group_id\"),\n \"show_own_patients_only_user_id\" => $this->show_own_patients_only_user_id(),\n \"quick_filter\" => $this->input->post(\"quick_filter\"),\n \"created_by\" => $this->input->post(\"created_by\")\n );\n $list_data = $this->Patients_model->get_details($options)->result();\n $result = array();\n foreach ($list_data as $data) {\n $result[] = $this->_make_row($data, $custom_fields);\n }\n echo json_encode(array(\"data\" => $result));\n }", "public function show_list() {\n\t\t$this->load->model('Medicines_model');\n\t\t$data['medicines']=$this->Medicines_model->getList($this->session->userdata('userId'));\n\t\tif (!empty($_SESSION)) {\n\t\t\t$data['loggedUser']=$this->Medicines_model->getUserData($this->session->userdata('userId'));\n\t\t}\n\t\t$data['page']='medicines/list';\n\t\t$this->load->view('menu/content',$data);\n\t}", "function show_user_list()\n\t{\n\t\tglobal $db_type;\n\t\tif($db_type == 'mysql')\n\t\t{\n\t\t\t$query = \"SELECT * FROM users LIMIT $this->strt,$this->lim\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"SELECT * FROM users LIMIT $this->strt OFFSET $this->lim\";\n\t\t}\n\t\t$result = db_query($query);\n\t\tdb_error_log();\n\n\t\n\t\t$count = db_num_rows($result);\n\t\t\n\t\tif($count == 0)\n\t\t{\n\t\t\techo '<tr><td colspan=2>Nothing to show</td></tr>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor($i=0 ; $i < $count ; $i++)\n\t\t\t{\n\n\t\t\t\t$row = db_fetch_array($result);\n\t\t\t\t$url =\"userdetails.php?userId=$row[0]&name=\". urlencode($row[2]);\n\t\t\t\tprintf('<tr><td bgcolor=\"#CCCCCC\">\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"userId[]\" value=\"%s\"></td>\n\t\t\t\t\t\t\t<td bgcolor=\"#EFEFEF\"><nobr>\n\t\t\t\t\t\t\t\t<a href=\"%s\" class=\"Category\" target=\"right\">%s</a></nobr></td></tr>',\n\t\t\t\t\t\t$row[0],$url,$row[2]);\n\t\t\t}\n\t\t\tif($count == $this->lim)\n\t\t\t{\n\t\t\t\t$this->more =1;\n\t\t\t}\n\t\t}\n\t}", "public static function get_users_in_context(userlist $userlist) {\n $context = $userlist->get_context();\n\n if (!is_a($context, \\context_user::class)) {\n return;\n }\n\n // Add users based on userkey.\n \\core_userkey\\privacy\\provider::get_user_contexts_with_script($userlist, $context, 'tool_mobile');\n }", "function SERVICE_OPEN_PLAYER_wmmobile($list){\n\t\tglobal $include_path, $root_dir;\n\t\t\n\t\t// This playlist type supports the following media types:\n\t\t$supported = \"asf|wma|wmv|wm|asx|wax|wvx|wpl|dvr-ms|wmd|avi|mpg|mpeg|m1v|mp2|mp3|mpa|mpe|mpv2|m3u|ogg|mid|midi|rmi|aif|aifc|aiff|au|snd|wav|ivf|\";\n\t\t\n\t\t// Let's start the list off right\n\t\t$content = '<ASX version=\"3\">'. \"\\n\";\n\t\t$content .= ' <TITLE>Jinzora Playlist</Title>'. \"\\n\";\n\t\t$list->flatten();\n\n\t\t// Now let's loop throught the items to create the list\n\t\tforeach ($list->getList() as $track) {\n\t\t\t// Should we play this?\n\t\t\tif ((stristr($track->getPath(\"String\"),\".lofi.\") \n\t\t\t\tor stristr($track->getPath(\"String\"),\".clip.\"))\n\t\t\t\tand $_SESSION['jz_play_all_tracks'] <> true){continue;}\n\t\t\t\n\t\t\t// Now let's get the extension to be sure it can be played\n\t\t\t$pArr = explode(\"/\",$track->getPath(\"String\"));\n\t\t\t$eArr = explode(\".\",$pArr[count($pArr)-1]);\n\t\t\t$ext = $eArr[count($eArr)-1];\n\t\t\tif (!stristr($supported,$ext. \"|\")){continue;}\n\t\t\t\n\t\t\t$meta = $track->getMeta();\n\t\t\t$content .= \" <ENTRY>\". \"\\n\".\n\t\t\t\t\t\t\" <TITLE>\". $meta['artist'] . \" - \" . $meta['title']. \"</TITLE>\". \"\\n\";\n\t\t\t\n\t\t\t// Now let's figure out the full track name\n\t\t\t$trackn = $track->getFileName(\"user\");\n\t\t\tif (!stristr($trackn,\"mediabroadcast.php\")) {\n\t\t\t $track->increasePlayCount();\n\t\t\t}\n\t\t\t$content .= ' <REF HREF=\"'. $trackn. '\"/>'. \"\\n\".\n\t\t\t ' </ENTRY>'. \"\\n\";\n\t\t}\n\t\t$content .= '</ASX>';\n\t\tunset($_SESSION['jz_play_all_tracks']);\n\t\t\n\t\t// Now that we've got the playlist, let's write it out to the disk\n\t\t$plFile = $include_path. \"temp/windowsmobile.asx\";\n\t\t@unlink($plFile);\n\t\t$handle = fopen ($plFile, \"w\");\n\t\tfwrite($handle,$content);\t\t\t\t\n\t\tfclose($handle);\n\t\t\n\t\tSERVICE_DISPLAY_PLAYER_wmmobile($content);\n\t}", "protected function userList() {\n\n\t\t$oUser = new APP_Model_User();\n\t\t$sFilteredBy = null;\n\t\t$aClauses = array();\n\n\t\tif( ($iRoleFilter = $this->get('rolefilter', '')) !== '') {\n\t\t\t$sFilteredBy = PPI_Helper_User::getRoleNameNice(PPI_Helper_User::getRoleNameFromID($iRoleFilter));\n\t\t\t$aClauses[] = 'role_id = ' . $oUser->quote($iRoleFilter);\n\t\t}\n\n\t\t// Get the users\n\t\t$users = $oUser->getList(!empty($aClauses) ? implode(' AND ', $aClauses) : '')->fetchAll();\n\n\t\t// If there was a filter applied but returned no results, we default the userlist back to normal\n\t\tforeach($users as $key => $user) {\n\t\t\t$users[$key]['role_name'] = PPI_Helper_User::getRoleNameFromID($user['role_id']);\n\t\t}\n\n\t\t$sUsernameField = $this->getConfig()->system->usernameField;\n\t\t$this->adminLoad('admin/user_list', compact('users', 'sFilteredBy', 'sUsernameField'));\n\t}", "public function listuserAction() {\n\t $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t //$this->_helper->layout->disableLayout();\n \t $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t\t\n\t if(!isset($sessionutilisateur->login)) { $this->_redirect('/administration/login');}\n if($sessionutilisateur->confirmation != \"\") { $this->_redirect('/administration/confirmation');}\n\t\t $tabela = new Application_Model_DbTable_EuUtilisateur();\n\t\t $select = $tabela->select(Zend_Db_Table::SELECT_WITH_FROM_PART);\n $select->setIntegrityCheck(false);\n\t\t $select->join('eu_user_group', 'eu_user_group.code_groupe = eu_utilisateur.code_groupe');\n $select->where('eu_utilisateur.id_utilisateur_parent = ?',$sessionutilisateur->id_utilisateur);\n\t\t $select->where('eu_user_group.code_groupe = ?','cnp_tegcp');\n\t\t $select->order('id_utilisateur desc');\n\t\t $users = $tabela->fetchAll($select);\n\t\t $this->view->entries = $users;\n\t }", "public function get_list_email_ajax() {\n\t\t$strQuery = isset($_GET['query']) ? $_GET['query'] : FALSE;\n\t\t$arrResponse = array(\n 'query' => '',\n 'suggestions' => array(),\n 'data' => array(),\n );\n if($strQuery) {\n $objFound = $this->contact_model->getEmailListByKeySearch($strQuery);\n $arrVNGStaffsFound = $this->contact_model->getUserEmailFromVNGStaffList($strQuery);\n $arrSuggestions = array();\n $arrData = array();\n if(is_array($objFound)) {\n foreach($objFound as $row) {\n $arrSuggestions[] = $row['strfound'];\n $arrData[] = $row['userid'];\n }\n \n }\n if(is_array($arrVNGStaffsFound)) {\n \tforeach($arrVNGStaffsFound as $row) {\n \t\tif(!in_array($row['strfound'], $arrSuggestions)) {\n \t\t\t$arrSuggestions[] = $row['strfound'];\n \t\t\t$arrData[] = $row['id'];\n \t\t}\n \t}\n }\n //sort($arrSuggestions);\n $arrResponse = array(\n 'query' => $strQuery,\n 'suggestions' => $arrSuggestions,\n 'data' => $arrData,\n );\n } \n echo json_encode($arrResponse);\n exit;\n\t}", "protected function retrieveUserList() {\n $model = new aam_View_User;\n\n return $model->retrieveList();\n }", "public static function getList()\n\t{\n\t\tstatic $list = null;\n\t\tif (is_array($list))\n\t\t{\n\t\t\treturn $list;\n\t\t}\n\n\t\t$user = UserTable::getList(array(\n\t\t\t'select' => array('EMAIL'),\n\t\t\t'filter' => array(\n\t\t\t\t'=ID' => array_slice(\\CGroup::getGroupUser(1), 0, 200),\n\t\t\t\t'=ACTIVE' => 'Y'\n\t\t\t),\n\t\t\t'limit' => 1\n\t\t))->fetch();\n\n\t\tif ($user && $user['EMAIL'])\n\t\t{\n\t\t\t$email = $user['EMAIL'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$email = Option::get('main', 'email_from', '');\n\t\t}\n\n\t\t$list = array();\n\t\t$intl = array(\n\t\t\t'ru' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'ua' => array(\n\t\t\t\t'PHRASES' => array(),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'kz' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'by' => array(\n\t\t\t\t'PHRASES' => array('COMPANY_NAME', 'IP_NAME'),\n\t\t\t\t'FIELDS' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_NAME',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'COMPANY_ADDRESS',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'TAB' => 'text',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'PURPOSES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'THIRD_PARTIES',\n\t\t\t\t\t\t'TYPE' => 'text',\n\t\t\t\t\t\t'SHOW_BY_CHECKBOX' => true,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'CODE' => 'EMAIL',\n\t\t\t\t\t\t'TYPE' => 'string',\n\t\t\t\t\t\t'PLACEHOLDER' => $email,\n\t\t\t\t\t\t'DEFAULT_VALUE' => $email,\n\t\t\t\t\t\t'TAB' => 'settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$messageMap = array(\n\t\t\t'AGREEMENT_TEXT' => 'MAIN_USER_CONSENT_INTL_TEXT',\n\t\t\t'LABEL_TEXT' => 'MAIN_USER_CONSENT_INTL_LABEL',\n\t\t\t'FIELDS_HINT' => 'MAIN_USER_CONSENT_INTL_FIELDS_HINT',\n\t\t\t'DESCRIPTION' => 'MAIN_USER_CONSENT_INTL_DESCRIPTION',\n\t\t\t'NOTIFY_TEXT' => 'MAIN_USER_CONSENT_INTL_NOTIFY_TEXT',\n\t\t);\n\t\t$languages = self::getLanguages();\n\t\tforeach ($languages as $languageId => $languageName)\n\t\t{\n\t\t\t$item = self::getLanguageMessages($languageId, $messageMap);\n\t\t\tif (!$item['AGREEMENT_TEXT'])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item['NAME'] = Loc::getMessage('MAIN_USER_CONSENT_INTL_NAME', array('%language_name%' => $languageName));\n\t\t\t$item['BASE_LANGUAGE_ID'] = isset(self::$virtualLanguageMap[$languageId]) ? self::$virtualLanguageMap[$languageId] : $languageId;\n\t\t\t$item['LANGUAGE_ID'] = $languageId;\n\t\t\t$item['LANGUAGE_NAME'] = $languageName;\n\n\t\t\t$item['PHRASES'] = array();\n\t\t\tif (isset($intl[$languageId]['PHRASES']))\n\t\t\t{\n\t\t\t\t$phraseMap = array();\n\t\t\t\tforeach ($intl[$languageId]['PHRASES'] as $phraseCode)\n\t\t\t\t{\n\t\t\t\t\t$phraseMap[$phraseCode] = \"MAIN_USER_CONSENT_INTL_PHRASE_{$phraseCode}\";\n\t\t\t\t}\n\t\t\t\t$item['PHRASES'] = self::getLanguageMessages($languageId, $phraseMap);\n\t\t\t}\n\n\t\t\t$item['FIELDS'] = array();\n\t\t\tif (isset($intl[$languageId]['FIELDS']))\n\t\t\t{\n\t\t\t\tforeach ($intl[$languageId]['FIELDS'] as $field)\n\t\t\t\t{\n\t\t\t\t\t$messageFieldsMap = array(\n\t\t\t\t\t\t'CAPTION' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}\",\n\t\t\t\t\t\t'PLACEHOLDER' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}_HINT\",\n\t\t\t\t\t\t'DEFAULT_VALUE' => \"MAIN_USER_CONSENT_INTL_FIELD_{$field['CODE']}_DEFAULT\",\n\t\t\t\t\t);\n\n\t\t\t\t\t$field = $field + self::getLanguageMessages($languageId, $messageFieldsMap);\n\t\t\t\t\tif ($field['TYPE'] == 'text' && $field['DEFAULT_VALUE'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$field['PLACEHOLDER'] .= \"\\n\" . Loc::getMessage('MAIN_USER_CONSENT_INTL_HINT_FIELD_DEFAULT');\n\t\t\t\t\t\t$field['PLACEHOLDER'] .= \"\\n\" . $field['DEFAULT_VALUE'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$item['FIELDS'][] = $field;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$list[] = $item;\n\t\t}\n\n\t\treturn $list;\n\t}", "private function _getUserList(){\n\t\t/* variable initialization */\n\t\t$strReturnArr = array();\n\t\t\n\t\t/* Get user list objects */\n\t\t$strReturnArr\t= $this->_objDataOperation->getDirectQueryResult(\"select user_name, id from \".$this->_strPrimaryTableName.\" where deleted = 0 order by user_name\");\n\t\t\n\t\t/* return the user list array */\n\t\treturn $strReturnArr;\n\t}", "public function getUserlistadmin() {\n \n // get userlist.\n $data = DB::table('users')\n ->select('first_name', 'email_address', 'last_name', 'id');\n return Datatables::of($data)->add_column('detail', '<a href=\"{{ URL::to( \\'user/updateuser\\', array( $id )) }}\" class=\"btn btn-sm default\">View</a>')\n ->remove_column('id')->make(true);\n }", "public function membersList() {\n $this->restrictToRoleId(1);\n \n // Je veux tous les users\n $usersList = UserModel::findAll();\n \n // J'affiche la template\n $this->show('admin/members_list', [\n 'usersList' => $usersList // => $usersList dans la view\n ]);\n }", "public function actionUserList()\n {\n\n $query = \\humhub\\modules\\user\\models\\User::find();\n $query->leftJoin('bookmark', 'bookmark.created_by=user.id');\n $query->where([\n 'bookmark.object_id' => $this->contentId,\n 'bookmark.object_model' => $this->contentModel,\n ]);\n $query->orderBy('bookmark.created_at DESC');\n\n $title = Yii::t('BookmarkModule.controllers_BookmarkController', '<strong>Users</strong> who bookmarked this');\n\n return $this->renderAjaxContent(UserListBox::widget(['query' => $query, 'title' => $title]));\n }", "public static function get_users_in_context(userlist $userlist) {\r\n global $CFG,$DB;\r\n $context = $userlist->get_context();\r\n if ($context instanceof \\context_user) {\r\n require_once ($CFG->dirroot.\"/local/coursehub/CourseHub.php\");\r\n require_once($CFG->dirroot.'/local/magisterelib/databaseConnection.php');\r\n\r\n $hub = \\CourseHub::instance();\r\n if($hub->isNoConfig()){\r\n return;\r\n }\r\n if($hub->isMaster()){\r\n $aca = $CFG->academie_name;\r\n }else{\r\n $aca = $hub->getMaster();\r\n }\r\n\r\n if(array_key_exists($aca,get_magistere_academy_config())) {\r\n $user = $DB->get_record(\"user\",[\"id\"=> $context->instanceid]);\r\n\r\n $existusers = \\databaseConnection::instance()->get($aca)->execute(\r\n 'SELECT lcc.username FROM {local_coursehub_course} lcc\r\n WHERE lcc.username = :username',\r\n ['username' => $user->username]\r\n );\r\n\r\n if(count($existusers) > 0){\r\n $userlist->add_user($user->id);\r\n }\r\n }\r\n\r\n $sql = \"\r\n SELECT lcp.userid\r\n FROM {local_coursehub_published} lcp\r\n WHERE lcp.userid = :uid\";\r\n\r\n $params = [\r\n 'uid' => $context->instanceid,\r\n ];\r\n\r\n $userlist->add_from_sql('userid', $sql, $params);\r\n\r\n }\r\n }", "public function masterlist()\n\t{\n\t\tif($this->checkLogin())\n\t\t{\n\t\t\t$user = $this->model('User');\n\n\t\t\t$pagenum = 1;\n\n\t\t\tif(isset($_GET['pn'])){\n\t\t\t\t$pagenum = $_GET['pn'];\n\t\t\t} \n\n\t\t\t$page_rows = 100;\n\t\t\t$limit = 'LIMIT ' .($pagenum - 1) * $page_rows .',' .$page_rows;\n\t\t\t// Grab the container information with the limit.\n\t\t\t$userList = $user->fetchUsers('',$limit);\n\n\t\t\t$row = $user->countUsers();\n\n\t\t\t$this->view('users/masterlist', ['userList'=>$userList, 'row'=>$row]);\n\t\t}\n\t}", "public function actionView($list_uid)\n {\n if (!($list = $this->loadListByUid($list_uid))) {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api', 'The list does not exist.')\n ), 404);\n }\n\n $general = $defaults = $notifications = $company = array();\n $general = $list->getAttributes(array('list_uid', 'name', 'display_name', 'description'));\n if (!empty($list->default)) {\n $defaults = $list->default->getAttributes(array('from_name', 'reply_to', 'subject'));\n }\n if (!empty($list->customerNotification)) {\n $notifications = $list->customerNotification->getAttributes(array('subscribe', 'unsubscribe', 'subscribe_to', 'unsubscribe_to'));\n }\n if (!empty($list->company)) {\n $company = $list->company->getAttributes(array('name', 'address_1', 'address_2', 'zone_name', 'city', 'zip_code', 'phone', 'address_format'));\n if (!empty($list->company->country)) {\n $company['country'] = $list->company->country->getAttributes(array('country_id', 'name', 'code'));\n }\n if (!empty($list->company->zone)) {\n $company['zone'] = $list->company->zone->getAttributes(array('zone_id', 'name', 'code'));\n }\n }\n\n $record = array(\n 'general' => $general,\n 'defaults' => $defaults,\n 'notifications' => $notifications,\n 'company' => $company,\n );\n\n $data = array('record' => $record);\n\n return $this->renderJson(array(\n 'status' => 'success',\n 'data' => $data,\n ), 200);\n }", "function listu_open() {\n }", "public function userlist(){\r\n $data = array();\r\n $userModel = $this->load->model(\"UserModel\");\r\n $data['user'] = $userModel->userList();\r\n\r\n $this->load->view('layouts/header');\r\n $this->load->view(\"userlist\", $data);\r\n $this->load->view('layouts/footer');\r\n }", "public function display_list(){\r\n\t\t\r\n\t\t$collection = new User_Collection();\r\n\t\t$variables = array(\r\n\t\t\t'collection' => $collection->getPaginated(),\r\n\t\t\t'pagination' => $collection->getPagination(),\r\n\t\t\t'sorters' => $collection->getSortableLinks(),\r\n\t\t);\r\n\t\t\r\n\t\tBackendLayout::get()\r\n\t\t\t->prependTitle('Список пользователей')\r\n\t\t\t->setLinkTags($collection->getLinkTags())\r\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\r\n\t\t\t->render();\r\n\t}", "function getUserListContent(){\n\tglobal $view_role;\n\n\tif(\n\t\t($view_role == 'admins' AND !is_admin()) OR \n\t\t($view_role == 'customers' AND !is_admin())\n\t){\n\t\treturn noAccess();\n\t}\n\n\t$tpl = '\n<div class=\"content-wrapper\">\n\n<div class=\"content-top-nav\">';\n\n\tif($view_role == 'admins')\n\t\t$tpl .= '<a href=\"/add-admin/\" class=\"graybtn\">Add Admin</a>';\n\n\tif($view_role == 'customers' OR (is_admin() AND !$view_role))\n\t\t$tpl .= '<a href=\"/add-customer/\" class=\"graybtn\">Add New Customer</a><div class=\"graybtn\" style=\"margin-left: 20px;padding: 0;\"><div id=\"add-users-spreadsheet-button-data-res\" style=\"padding: 0 15px;\" onclick=\"addUsersSpreadsheet();\" data-name=\"Add Customers from Spreadsheet\">Add Customers from Spreadsheet</div><input type=\"file\" id=\"spreadsheet-users-file\" data-role=\"customers\" style=\"display: none;position: relative;overflow: hidden;width: 1px;height: 1px;opacity: 0;\" /></div>';\n\n\tif($view_role == 'users' OR (is_customer() AND !$view_role))\n\t\t$tpl .= '<a href=\"/add-user/\" class=\"graybtn\">Add User</a><div class=\"graybtn\" style=\"margin-left: 20px;padding: 0;\"><div id=\"add-users-spreadsheet-button-data-res\" style=\"padding: 0 15px;\" onclick=\"addUsersSpreadsheet();\" data-name=\"Add Users from Spreadsheet\">Add Users from Spreadsheetqweqweqwe</div><input type=\"file\" id=\"spreadsheet-users-file\" data-role=\"users\" style=\"display: none;position: relative;overflow: hidden;width: 1px;height: 1px;opacity: 0;\" /></div>';\n\n$tpl .= '\n</div>\n\n<div class=\"content-inner-wrapper\">\n'.printTablePreParams().'\n'.printTableContent(true).'\n'.printTableContentJS().'\n'.printTableAfterParams(true).'\n</div>\n\n</div>\n';\n\treturn $tpl;\n}", "protected function get_list_member( $list_id, $user_email ) {\n\t\tglobal $mc4wp;\n\n\t\treturn ( $mc4wp['api']->get_list_member( $list_id, $user_email ) );\n\t}", "public function searchInJprofile($idList,$mobile)\n {\n $sql=\"SELECT PROFILEID,GENDER FROM newjs.JPROFILE WHERE PROFILEID IN ('$idList') AND PHONE_MOB IN('0$mobile','$mobile','+91$mobile','91$mobile')\"; \n $res=mysql_query_decide($sql) or logError($sql);\n if($row=mysql_fetch_array($res))\n\t\t{\n\t\t \t$this->ignoringId=$row[\"PROFILEID\"];\n\t\t\t$this->ignoringGender=$row[\"GENDER\"];\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t\treturn 0;\n }", "public function index()\n\t{\n\t\t\n\t\t$data['site_title'] = STAFF_M_PAGE.\" - \".STAFF_M_LIST;\n\t\t$data['user_list']=$this->user_model->user_list();\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('user/list', $data);\n\t\t$this->load->view('footer');\n\t}", "public function actionUserList() {\n if (!Yii::app()->request->isAjaxRequest)\n return false;\n\n echo json_encode(Message::getUserList(\n Yii::app()->request->getPost('roles'),\n Yii::app()->request->getPost('languages'),\n Yii::app()->request->getPost('paymentRegions'),\n Yii::app()->request->getPost('usersStatus'),\n Yii::app()->request->getPost('allowUsersWithUnConfirmedEmails'),\n Yii::app()->request->getPost('userSearchData'),\n true,\n false,\n Yii::app()->request->getPost('startDate'),\n Yii::app()->request->getPost('endDate'),\n Yii::app()->request->getPost('adminRoles')\n ));\n\n }", "public function listStaff(){\n $allusers = User::all();\n return view('staff.liststaff', ['staffs' => $allusers]);\n }", "function verified_mobiles(){\n\t\tglobal $wpdb;\n\t\t$type_users=\"Verified Mobiles\";\n\t\t$verified_users=$wpdb->get_results(\"select * from IDV_mcv_verification_data where is_verified=1\");\n\t\t\n\t\tinclude(\"verified_mobiles.php\");\n\t}", "function ajax_loadLists() {\n $this->mailchimp_init();\n $lists = DeMomentSomTresMailchimp::MailChimpGetLists($this->mcSession, true);\n if ($lists):\n $this->saveListsLastUpdate();\n $this->saveLists($lists);\n wp_send_json_success(__(\"Lists loaded\", 'DeMomentSomTres-MailChimp-Subscribe'));\n else:\n wp_send_json_error(__(\"An error happened\", 'DeMomentSomTres-MailChimp-Subscribe'));\n endif;\n }", "public function do_list()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/list' );\n\n }", "public function large_list(){\r\n $this->initDb();\r\n $ut = getUserType();\r\n $ui = getCurrentUser();\r\n if($ut != ADMINISTRATOR && $ut != RESEARCHER && $ui != $this->getUserId()){\r\n if($this->getReportStatus() != \"3\") return;\r\n }\r\n\r\n if($this->getIsShared() == \"0\" && $ut == CUSTOMER && $ui != $this->getUserId()){\r\n return;\r\n }\r\n\r\n echo '\r\n <div class=\"list\">\r\n <table style=\"width: 99%; height: 100%; margin-bottom: 5px;\" cellspacing=0 cellpadding=0>\r\n <tr>\r\n <td valign=\"top\">\r\n <div class=\"title\"><a href=\"#subject&' . $this->id . '\">' . $this->getTitle() . '</a>\r\n <div style=\"display: inline-block;margin: 5px 0 1px 2px;\">' . $this->getOwnerShip() . '</div>\r\n </div>\r\n <div class=\"description\">\r\n ' . $this->getSummary() . '\r\n </div>\r\n </td>\r\n <td style=\"width: 120px;\" valign=\"top\" align=\"right\">\r\n <div class=\"company\">\r\n ' . $this->getUserCompany() . '\r\n </div>\r\n <div class=\"status\">\r\n <span class=\"_language status_value\">' . $this->getReportStatusText() . '</span>\r\n </div>\r\n <div class=\"totaltopics\">\r\n ' . $this->getTotalTopics() . ' <span class=\"_language\">Topics</span>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n }", "function _setUpAjaxList ()\n {\n // The columns to be shown in the table\n $columns = array(\n // Model, Columns, (Display Title), (Type Description)\n array(\n \"User.id\",\n \"\",\n \"\",\n \"hidden\"\n ),\n array(\n \"User.username\",\n __(\"Username\", true),\n \"10em\",\n \"action\",\n \"View User\"\n ),\n array(\n \"User.full_name\",\n __(\"Full Name\", true),\n \"15em\",\n \"string\"\n ),\n );\n\n if (User::hasPermission('functions/viewemailaddresses')) {\n $email = array(\n \"User.email\",\n __(\"Email\", true),\n \"auto\",\n \"action\",\n \"Send Email\"\n );\n\n array_push($columns, $email);\n }\n\n // define action warnings\n $deleteUserWarning = __(\"Delete this user. Irreversible. Are you sure?\", true);\n $resetPassWarning = __(\"Resets user's password. Are you sure?\", true);\n $resetPassWOEmail = __(\"Resets user's password without sending a email. The user will lose access to the system. Are you sure?\", true);\n\n $actionRestrictions = \"\";\n\n $viewableRoles = $this->AccessControl->getViewableRoles();\n $joinTables = array(\n array (\n // GUI aspects\n \"id\" => \"Role.id\",\n \"description\" => __(\"Show role:\", true),\n // The choise and default values\n \"list\" => $viewableRoles,\n \"default\" => 0,\n ),\n );\n\n $extraFilters = array('User.record_status' => 'A');\n if (User::hasPermission('controllers/departments') && !User::hasPermission('functions/superadmin')) {\n // faculty admins, filter out the admins and instructors from other department/faculty\n // stupid cakephp doesn't support double habtm query. So using raw query\n $conditions = array();\n $faculties = $this->UserFaculty->find('all', array(\n 'conditions' => array('user_id' => User::get('id')),\n 'fields' => array('faculty_id'),\n ));\n $facultyIds = Set::extract($faculties, '/UserFaculty/faculty_id');\n $query = \"SELECT User.id FROM `users` AS `User` LEFT JOIN `user_faculties` AS `UserFaculty` ON (`UserFaculty`.`user_id` = `User`.`id`) LEFT JOIN `faculties` AS `Faculty` ON (`Faculty`.`id` = `UserFaculty`.`faculty_id`) INNER JOIN `roles_users` AS `RolesUser` ON (`RolesUser`.`user_id` = `User`.`id`) INNER JOIN `roles` AS `Role` ON (`Role`.`id` = `RolesUser`.`role_id`) WHERE \";\n foreach ($viewableRoles as $id => $role) {\n if ($role == 'admin' || $role == 'instructor') {\n \t// in the case of admins that are not in any faculties\n \t// empty facultyIds array will cause sql error\n \tif (empty($facultyIds)) {\n \t\tcontinue;\n \t}\n $conditions[] = 'Role.id = '.$id.' AND Faculty.id IN ('.join(',', $facultyIds).')';\n } else {\n $conditions[] = 'Role.id = '.$id;\n }\n }\n// $result = $this->User->query($query.join(' OR ', $conditions));\n// $userIds = Set::extract($result, '/User/id');\n\t\t\t// Use subquery instead of query the results. Too many user.ids will cause OOM\n $extraFilters[] = 'User.id IN (' . $query.implode(' OR ', $conditions) . ')';\n }\n\n // define right click menu actions\n $actions = array(\n // display name, (warning shown), fixed parameters or Column ids\n array(__(\"View User\", true), \"\", \"\", \"\", \"view\", \"User.id\"),\n array(__(\"Send Email\", true), \"\", \"\", \"emailer\", \"write\", 'U', \"User.id\"),\n array(__(\"Edit User\", true), \"\", $actionRestrictions, \"\", \"edit\", \"User.id\"),\n array(__(\"Delete User\", true), $deleteUserWarning, $actionRestrictions, \"\", \"delete\", \"User.id\"),\n array(__(\"Reset Password\", true), $resetPassWarning, $actionRestrictions, \"\", \"resetPassword\", \"User.id\")\n );\n\n // add the functionality of resetting a user's password without sending the user a email\n if(User::hasPermission('controllers/users/resetpasswordwithoutemail')) {\n $actions[] = array(__(\"Reset Password Without Email\", true), $resetPassWOEmail, \"\", \"\", \"resetPasswordWithoutEmail\", \"User.id\");\n }\n\n $this->AjaxList->setUp($this->User, $columns, $actions,\n \"User.id\", \"User.username\", $joinTables, $extraFilters);\n }", "function chat_user_list() {\n?>\n<!-- START CHAT USER LIST -->\n<div class=\"sidebar-widget m-0\">\n\t<div class=\"widget-header\">\n\t\t<h6 class=\"title\">Chat</h6>\n\t\t<span class=\"widget-toggle\">+</span>\n\t</div>\n\t<div class=\"widget-content\">\n\t\t<ul class=\"list-unstyled mailbox-bullets\">\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Amy Doe <span class=\"ball green\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Joey Doe <span class=\"ball green\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Robert Doe <span class=\"ball orange\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">John Doe <span class=\"ball red\"></span></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#\" class=\"menu-item\">Uncle Doe <span class=\"ball red\"></span></a>\n\t\t\t</li>\n\t\t\t<li class=\"text-center mt-3\">\n\t\t\t\t<em><a href=\"#\">show offline</a></em>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- END CHAT USER LIST -->\n<?php\n}", "public function actionRefreshList() {\n\n if ($this->getVar('user') != NULL) {\n $user = User::model()->findByPK($this->getVar('user'));\n $this->createList();\n\n $this->render('threeGroups', array(\n 'user' => $user,\n 'friends_list' => $this->getVar('friends_list'),\n 'classes_num' => $this->getVar('classes_num'),\n 'names' => $this->getVar('names'),\n 'seen_final' => $this->getVar('seen_final'),\n 'not_seen_final' => $this->getVar('not_seen_final'),\n ));\n } else {\n // echo 'The user is not set <br>';\n return;\n }\n }", "function getUserList()\n\t{\n\t\tglobal $conn;\n\t\ttry {\n\t\t\tif(!($sql_users = $conn->prepare(\"SELECT FirstName, LastName, UID\n\t\t\t FROM traveluserdetails \n\t\t\t\t\t\t\t\t\t\t\t ORDER BY LastName ASC, FirstName ASC\"))) {\n\t\t\t\twrite2Error_Log(\"SELECT FirstName, LastName, UID in function getUserList()\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$sql_users->execute();\n\t\t\t$res_users = $sql_users->get_result();\n\t\t\t\n\t\t\twhile($row_users = $res_users->fetch_assoc()) {\n\t\t\t\t$returned_Data[] = $row_users;\n\t\t\t}\n\t\t\t$sql_users->close();\n\t\t\treturn $returned_Data;\t\t\t\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\twrite2Error_Log(\"getUserList(): \" . $e);\n\t\t}\t\t\n\t}", "function showList($listControl)\r\n{\r\n\tglobal $dbConnection;\r\n\t\t\t\t\t\t\t\t\t// Pick up the fields we need to show\r\n\t\t\t\t\t\t\t\t\t// For an external file, the columns may not be\r\n\t\t\t\t\t\t\t\t\t// the same as internals\r\n\t$rtable = $listControl['rtable'];\r\n\t$filter = $listControl['filter'];\r\n\t$top = $listControl['page'] *20;\r\n\r\n\t$ky = $listControl['ky'];\r\n\t$em = $listControl['email'];\r\n\t$forename = $listControl['forename'];\r\n\t$surname = $listControl['surname'];\r\n\t$bus = $listControl['business'];\r\n\t$sql = \"SELECT $ky, $em, $forename, $surname, $bus\"\r\n\t\t. \" FROM $rtable $filter LIMIT 20 OFFSET $top\";\r\n//\techo \"$sql<br>\";\r\n\t$result = mysqli_query($dbConnection, $sql)\r\n\t\tor die (mysqli_error($dbConnection) . \": \" . $sql);\r\n\r\n\twhile ($record = mysqli_fetch_array($result))\r\n\t{\r\n\t\t$kval = $record[$ky];\r\n\t\techo \"<div style='line-height:1.5'>\";\r\n\t\techo \"<span class='mll0' id='mle$kval'>\" . $record[$em] . \"</span>\";\r\n\t\techo \"<span class='mll1' id='mlf$kval'>\" . $record[$forename] . \"</span>\";\r\n\t\techo \"<span class='mll2' id='mls$kval'>\" . $record[$surname] . \"</span>\";\r\n\t\techo \"<span class='mll3' id='mlb$kval'>\" . $record[$bus] . \"</span>\";\r\n\t\t\r\n\t\techo \"<span class='mll4'>\";\r\n\t\techo \"<button onClick='mbvEdit($kval)'>Edit</button>&nbsp;&nbsp;\";\r\n\t\techo \"<button onClick='mbvDelete(\\\"$rtable\\\", $kval)'>Delete</button>&nbsp;&nbsp;</span>\";\r\n\t\techo \"<br><br></div>\\n\";\r\n\r\n\t}\r\n\tmysqli_free_result($result);\r\n}", "public static function get_users_in_context(userlist $userlist) {\n $context = $userlist->get_context();\n\n if (!is_a($context, \\context_module::class)) {\n return;\n }\n\n $params = [\n 'instanceid' => $context->instanceid,\n 'modulename' => 'reactforum',\n ];\n\n // Discussion authors.\n $sql = \"SELECT d.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_discussions} d ON d.reactforum = f.id\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // ReactForum authors.\n $sql = \"SELECT p.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_discussions} d ON d.reactforum = f.id\n JOIN {reactforum_posts} p ON d.id = p.discussion\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // ReactForum post ratings.\n $sql = \"SELECT p.id\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_discussions} d ON d.reactforum = f.id\n JOIN {reactforum_posts} p ON d.id = p.discussion\n WHERE cm.id = :instanceid\";\n \\core_rating\\privacy\\provider::get_users_in_context_from_sql($userlist, 'rat', 'mod_reactforum', 'post', $sql, $params);\n\n // ReactForum Digest settings.\n $sql = \"SELECT dig.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_digests} dig ON dig.reactforum = f.id\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // ReactForum Subscriptions.\n $sql = \"SELECT sub.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_subscriptions} sub ON sub.reactforum = f.id\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Discussion subscriptions.\n $sql = \"SELECT dsub.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_discussion_subs} dsub ON dsub.reactforum = f.id\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Read Posts.\n $sql = \"SELECT hasread.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_read} hasread ON hasread.reactforumid = f.id\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Tracking Preferences.\n $sql = \"SELECT pref.userid\n FROM {course_modules} cm\n JOIN {modules} m ON m.id = cm.module AND m.name = :modulename\n JOIN {reactforum} f ON f.id = cm.instance\n JOIN {reactforum_track_prefs} pref ON pref.reactforumid = f.id\n WHERE cm.id = :instanceid\";\n $userlist->add_from_sql('userid', $sql, $params);\n }", "function display_users_list()\r\n\t{\r\n\t\t$this->body .= geoAdmin::m();\n\t\t\n\t\tif ($_REQUEST[\"b\"] && is_array($_REQUEST[\"b\"]) && !isset($_REQUEST['b']['password'])) {\r\n\t\t\t//search users\r\n\t\t\t$this->list_users(0,$_REQUEST[\"b\"]);\r\n\t\t} else {\r\n\t\t\t//display the simple and advanced search box\r\n\t\t\t$this->list_users();\r\n\t\t}\n\t\t$this->display_page();\r\n\t}", "public function setUserList($userList) {\n\t\t$this->userList = $userList;\n\t}", "public function list(){\n if(!$this->isUserLoggedIn()) \n $this->redirect('user/login');\n $this->data['user'] = $this->userModel->getAllUsers();\n $this->view = 'users';\n }", "public function superadmin_getUsersList() {\n $this->autoRender = false;\n $users_filter = $this->request->data['search_filter'];\n $search_keyword = $this->request->data['search_ind_user'];\n $this->loadModel('User');\n $conds = \"\";\n if ($users_filter == \"all_company_admins\") {\n $cond = array('User.type' => 'company_admin');\n } elseif ($users_filter == \"all_licensed_users\") {\n $conds = array('User.type' => 'abc');\n } else {\n $cond['AND'] = array('User.type' => 'xyz');\n }\n $conds = array(\n 'conditions' => array('AND' => $cond, 'OR' => array('User.first_name LIKE ' => \"%\" . $search_keyword . \"%\", 'User.last_name LIKE ' => \"%\" . $search_keyword . \"%\")), 'fields' => array('User.email', 'User.id', 'User.first_name', 'User.last_name', 'User.type'), 'recursive' => 0);\n $mailClient = $this->User->find('all', $conds);\n if (!empty($mailClient)) {\n $htmlData = '<select class=\"selectpicker\" name=\"data[SystemMessage][mail_users][]\" multiple>';\n foreach ($mailClient as $key => $value) {\n $htmlData .='<option selected value=\"' . $value['User']['id'] . '\">' . $value['User']['first_name'] . \" \" . $value['User']['last_name'] . '</option>';\n }\n $htmlData .='</select>';\n $response = array('status' => true, 'message' => 'success', 'htmlResponse' => $htmlData);\n echo json_encode($response);\n die;\n } else {\n $response['status'] = 'error';\n $response['message'] = 'Please select atleast one state for region';\n echo json_encode($response);\n die;\n }\n }", "public function loadListModel($list_uid)\n {\n $model = Lists::model()->findByAttributes(array(\n 'list_uid' => $list_uid,\n 'customer_id' => (int)Yii::app()->customer->getId(),\n ));\n\n if ($model === null) {\n throw new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n }\n\n return $model;\n }", "protected function initializeList()\n\t{\n\t\tglobal $debug, $message, $Dbc;\n\t\ttry{\n\t\t\t//Get the basic info of the list and the user's relationship to it.\n\t\t\t$initializeListStmt = $Dbc->prepare(\"SELECT\n\t\tuserSiteSettings.listId AS 'listId',\n\t\tlists.listName AS 'listName',\n\t\tlists.frId AS 'frId',\n\t\tlists.locked AS 'locked',\n\t\tlists.cId AS 'cId',\n\t\tlists.created AS 'created',\n\t\tlists.mId AS 'mId',\n\t\tlists.modified AS 'modified',\n\t\tlists.dId AS 'dId',\n\t\tlists.deleted AS 'deleted',\n\t\tfolders.folderName AS 'folderName',\n\t\tframerates.framerate AS 'framerate',\n\t\tframerates.fps AS 'fps',\n\t\tuserFolderSettings.folderRoleId AS 'folderRoleId',\n\t\tuserListSettings.listRoleId AS 'listRoleId',\n\t\tuserListSettings.listOffset AS 'offset',\n\t\tuserListSettings.limitCount AS 'limitCount',\n\t\tuserListSettings.orderBy AS 'orderBy',\n\t\tuserListSettings.orderDirection AS 'orderDirection',\n\t\tuserListSettings.viewReels AS 'viewReels',\n\t\tuserListSettings.viewCharacters AS 'viewCharacters',\n\t\tuserListSettings.showRecordedLines AS 'showRecordedLines',\n\t\tuserListSettings.showDeletedLines AS 'showDeletedLines',\n\t\tuserListSettings.showCharacterColors AS 'showCharacterColors'\n\tFROM\n\t\tlists\n\tJOIN\n\t\tuserSiteSettings ON userSiteSettings.listId = lists.listId AND\n\t\tuserSiteSettings.userId = ?\n\tJOIN\n\t\tuserListSettings ON userListSettings.listId = userSiteSettings.listId AND\n\t\tuserListSettings.listRoleId <> '0' AND\n\t\tuserListSettings.userId = userSiteSettings.userId\n\tJOIN\n\t\tframerates on framerates.frId = lists.frId\n\tLEFT JOIN\n\t\tfolders ON folders.folderId = lists.folderId\n\tLEFT JOIN\n\t\tuserFolderSettings ON userFolderSettings.folderId = folders.folderId AND\n\t\tuserFolderSettings.folderRoleId <> '0' AND\n\t\tuserFolderSettings.userId = userSiteSettings.userId\");\n\t\t\t$initializeListStmt->execute(array($this->_listInfo['userId']));\n\t\t\t$initializeListRow = $initializeListStmt->fetch(PDO::FETCH_ASSOC);\n\t\t\tif(empty($initializeListRow)){\n\t\t\t\t$message .= \"Your role doesn't allow you to access that list.\";\n\t\t\t\theader('Location:' . LINKADRLISTS . '?message=' . $message);\n\t\t\t}elseif($initializeListRow['locked']){\n\t\t\t\t$message .= \"That list is locked. It must be unlocked before it can be viewed or edited. \" . faqLink(45);\n\t\t\t\theader('Location:' . LINKADRLISTS . '?message=' . $message);\n\t\t\t}else{\n\t\t\t\tforeach($initializeListRow as $key => $value){\n\t\t\t\t\t$this->_listInfo[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(PDOException $e){\n\t\t\terror(__LINE__, '', '<pre>' . $e . '</pre>');\n\t\t}\n\t}", "public function get_user_list()\n\t{\n\t\t\t/* $sql1=\"SELECT a.id ,\n\t\t\t concat(a.firstname, ' ' , a.lastname) 'tenant',\n\t\t\t a.firstname,\n\t\t\t a.lastname,a.dob,a.phone1,a.email,a.created_at,\n\t\t\t a.status,\n\t\t\t a.device_token,\n\t\t b.name 'usertype',\n\t\t c.name 'property_name',\n\t\t c.address 'property_address',\n c.zip,\n\t\t d.name 'country_name',\n\t\t e.name 'city_name',\n\t\t f.name 'state_name'\n\t\t from \n\t\t `tent_userdata` a\n\t\t left join ten_user_type b\n\t\t\ton a.user_type=b.id \n\t\t\tleft join ten_propert_list c\n\t\t\ton a.property_id=c.id \n\t\t\tleft join countries d\n\t\t\ton c.country=d.id \n\t\t\tleft join cities e\n\t\t\ton c.state=e.id\n\t\t\tleft join states f\n\t\t\ton c.city=f.id\n\t\t\t\"; */ \n\t\t\t$sql1=\"SELECT a.id ,\n\t\t\t concat(a.firstname, ' ' , a.lastname) 'tenant',\n\t\t\t a.firstname,\n\t\t\t a.lastname,a.dob,a.phone1,a.email,a.created_at,\n\t\t\t a.status,\n\t\t\t a.device_token,\n\t\t b.name 'usertype',\n\t\t c.name 'property_name',\n\t\t g.address 'property_address',\n g.zip,\n\t\t d.name 'country_name',\n\t\t e.name 'city_name',\n\t\t f.name 'state_name'\n\t\t from \n\t\t `tent_userdata` a\n\t\t left join ten_user_type b\n\t\t\ton a.user_type=b.id \n\t\t\tleft join ten_propert_list c\n\t\t\ton a.property_id=c.id \n\t\t\tleft join ten_property_type g\n\t\t\ton g.id=c.property_type\n\t\t\tleft join countries d\n\t\t\ton g.country=d.id \n\t\t\tleft join cities e\n\t\t\ton g.state=e.id\n\t\t\tleft join states f\n\t\t\ton g.city=f.id\n\t\t\torder by a.id desc\n\t\t\t\n\t\t\t\";\n\t\t $query1= $this->db->query($sql1);\n\t return $query_res1=$query1->result();\n\t}", "function members_list_handler($params) {\n $cnf =& ServiceConfig::Instance();\n $db =& ServiceDb::Instance('phonebook_api');\n\n $status_query = '`status` != \"undefined\"';\n if (isset($params['status']) && !empty($params['status'])) {\n $params['status'] = strtolower($params['status']);\n switch($params['status']) {\n case 'all':\n $status_query = '`status` != \"undefined\"';\n break;\n case 'active':\n $status_query = '`status` = \"active\"';\n break;\n case 'onhold':\n $status_query = '`status` = \"onhold\"';\n break;\n case 'inactive':\n $status_query = '`status` = \"inactive\"';\n break;\n default:\n $status_query = '`status` != \"undefined\"';\n break;\n }\n }\n\n if (isset($params['institution']) && !empty($params['institution'])) {\n\t$institution_id = intval($params['institution']);\n }\n\n $details = 'name';\n if (isset($params['details']) && !empty($params['details'])) {\n\t$details = trim($params['details']);\n }\n\n $query = 'SELECT * FROM `phonebook_api`.`members` WHERE '.$status_query;\n $mem = $db->Query($query);\n\n $members = array();\n foreach($mem as $k => $v) {\n $members[$v['id']]['status'] = $v['status'];\n $members[$v['id']]['status_change_date'] = $v['status_change_date'];\n $members[$v['id']]['status_change_reason'] = $v['status_change_reason'];\n $members[$v['id']]['last_update'] = $v['last_update'];\n $members[$v['id']]['join_date'] = $v['join_date'];\n }\n\n $query = 'SELECT * FROM `phonebook_api`.`members_fields`';\n $fields_res = $db->Query($query);\n $fields = array();\n $fields_fn = array();\n $inst_field_id = 0;\n foreach($fields_res as $k => $v) {\n\t$fields[$v['id']] = $v;\n\t$fields_fn[$v['name_fixed']] = $v;\n\tif ($v['name_fixed'] == 'institution_id') { $inst_field_id = intval($v['id']); }\n }\n\n $members_fields = array();\n foreach(array('string','int','date') as $k => $v) {\n \t$query = 'SELECT * FROM `phonebook_api`.`members_data_'.$v.'s`';\n\t$res = $db->Query($query);\n\tif (empty($res)) continue;\n\tforeach($res as $k2 => $v2) {\n if ($v == 'int') { $v2['value'] = intval($v2['value']); }\n $members_fields[$v2['members_id']][$v2['members_fields_id']] = $v2['value'];\n\t}\n }\n \n foreach($members_fields as $k => $v) {\n\tif (!isset($members[$k])) { continue; }\n\tif ($institution_id != 0 && $v[$inst_field_id] != $institution_id) { \n\t\tunset($members[$k]);\n\t\tcontinue;\n\t}\n\tswitch ($details) {\n\t\tcase 'name':\n\t\t\t$members[$k]['fields'][$fields_fn['institution_id']['id']] = $v[$fields_fn['institution_id']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_first']['id']] = $v[$fields_fn['name_first']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_initials']['id']] = $v[$fields_fn['name_initials']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_last']['id']] = $v[$fields_fn['name_last']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_unicode']['id']] = $v[$fields_fn['name_unicode']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_latex']['id']] = $v[$fields_fn['name_latex']['id']];\n\t\t\tbreak;\n\t\tcase 'compact':\n\t\t\t$members[$k]['fields'][$fields_fn['institution_id']['id']] = $v[$fields_fn['institution_id']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['extra_institution_id']['id']] = $v[$fields_fn['extra_institution_id']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_first']['id']] = $v[$fields_fn['name_first']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_initials']['id']] = $v[$fields_fn['name_initials']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_last']['id']] = $v[$fields_fn['name_last']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_unicode']['id']] = $v[$fields_fn['name_unicode']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['name_latex']['id']] = $v[$fields_fn['name_latex']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['email']['id']] = $v[$fields_fn['email']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['phone_work']['id']] = $v[$fields_fn['phone_work']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['phone_cell']['id']] = $v[$fields_fn['phone_cell']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['url']['id']] = $v[$fields_fn['url']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['is_author']['id']] = $v[$fields_fn['is_author']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['is_expert']['id']] = $v[$fields_fn['is_expert']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['is_shifter']['id']] = $v[$fields_fn['is_shifter']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['is_emeritus']['id']] = $v[$fields_fn['is_emeritus']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['expertise']['id']] = $v[$fields_fn['expertise']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['date_leave']['id']] = $v[$fields_fn['date_leave']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['inspire_id']['id']] = $v[$fields_fn['inspire_id']['id']];\n\t\t\t$members[$k]['fields'][$fields_fn['orcid_id']['id']] = $v[$fields_fn['orcid_id']['id']];\n\t\t\tbreak;\n\t\tcase 'full':\n\t\t\t$members[$k]['fields'] = $v;\n\t\t\tbreak;\n\t}\n }\n return json_encode($members);\n}", "public static function afficherListeMembres($liste){\r\n\r\n\t\t\techo '<ul class=\"liste_all_membres\">';\r\n\t\t\tforeach($liste as $value){\r\n\t\t\t\t$user = Utilisateur::getUserById($value);\r\n\t\t\t\techo ('<li>'.$user->getPrenom().' '.$user->getNom().'</li>');\r\n\t\t\t}\r\n\t\t\techo '</ul>';\r\n\t}", "function getAllUsers(){\r\r\n\t$PView = new PView;\r\r\n\t$Appl = $PView -> getAppl();\r\r\n\t$u_SQL =& new db;\r\r\n\t$userArray = array();\r\r\n\t$u_SQL -> db_Select(\"user\", \"user_id\",\"\", \"nowhere\");\r\r\n\twhile($userTmp = $u_SQL -> db_Fetch()) {\r\r\n\t\tif ($userImagesCount = $PView->getUserImageCount($userTmp['user_id'])){\r\r\n\t\t\t$userArray[$userTmp['user_id']] = $userImagesCount;\r\r\n\t\t}\r\r\n\t}\r\r\n\tarsort($userArray);\r\r\n\t\r\r\n\t$userList = $this -> getGalleriffic_start();\r\r\n\t$userList.= \"<table width='100%'>\";\r\r\n\tforeach ($userArray as $key=>$dataset) {\r\r\n\t\t$userData = $PView->getUserData($key);\r\r\n\t\tif ($pv_galName = $PView -> getGalleryName($key)) {\r\r\n\t\t\t$pv_galInfo = \"<a href='pviewgallery.php?gallery=\".$key.\"'>\".LAN_PVIEW_SC_3.\" \".$pv_galName.\"</a>\";\r\r\n\t\t} else {\r\r\n\t\t\t$pv_galInfo = LAN_PVIEW_SC_2;\r\r\n\t\t}\r\r\n\t\t$userList.= \"<tr><td colspan = '2' style='border: 0px; padding-bottom:8px; padding-left:5px; padding-top: 15px;'><div class='image-title'>\".$userData['user_name'].\"</div>\";\r\r\n\t\t$userList.= \"<span class='smalltext'>(\".$dataset.\"&nbsp;\".LAN_ALBUM_1.\" , \".$pv_galInfo.\")</span></td></tr>\";\r\r\n\t\t$userList.= \"<tr><td width='25%' class='forumheader'>\".LAN_TMP_GALL_04.\"</td>\";\r\r\n\t\t$userList.= \"<td width='75%' class='forumheader'>\".LAN_MENU_1.\"</td></tr>\";\r\r\n\t\t$userList.= \"<tr><td width='25%' style='vertical-align:middle;'>\";\r\r\n\t\t$userList.= \"<a href='\".e_BASE.\"user.php?id.\".$key.\"'>\";\r\r\n\t\tif ($userimage = $userData['user_image']){\r\r\n\t\t\t$userList.= \"<img src='\".avatar($userimage).\"' style='padding:5px;' />\";\r\r\n\t\t} else {\r\r\n\t\t\t$userList.= \"<img src='\";\r\r\n\t\t\t$userList.= SITEURLBASE.e_PLUGIN_ABS.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/profile.png\";\r\r\n\t\t\t$userList.= \"' alt='\".LAN_IMAGE_53.\"' title='\".LAN_IMAGE_53.\"' style='padding:5px;' />\";\r\r\n\t\t}\r\r\n\t\t$userList.= \"</a>\";\r\r\n\t\t$userList.= \"</td><td width='75%'>\";\r\r\n\t\t$userList.= $this -> getLatestuserImages($key);\r\r\n\t\t$userList.= \"<p style='padding-top:10px;'><a href='pviewgallery.php?user=\".$key.\"'>\".LAN_TMP_GALL_05.\"</a></p>\";\r\r\n\t\t$userList.= \"<p class='smalltext' style='padding-top:10px;'>\".$userData['user_signature'].\"</p>\";\r\r\n\t\t$userList.= \"</td></tr>\";\r\r\n\t}\r\r\n\t$userList.= \"</table>\";\t\r\r\n\t\r\r\n\treturn $userList;\r\r\n}", "public static function get_users_in_context(\\core_privacy\\local\\request\\userlist $userlist) {\n $context = $userlist->get_context();\n\n if (!$context instanceof \\context_user) {\n return;\n }\n\n $params = [\n 'contextuser' => CONTEXT_USER,\n 'contextid' => $context->id,\n ];\n\n // Table local_intellicart.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart} ic\n JOIN {context} ctx\n ON ctx.instanceid = ic.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_checkout.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_checkout} ch\n JOIN {context} ctx\n ON ctx.instanceid = ch.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_logs.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_logs} l\n JOIN {context} ctx\n ON ctx.instanceid = l.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_waitlist.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_waitlist} w\n JOIN {context} ctx\n ON ctx.instanceid = w.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_users.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_users} iu\n JOIN {context} ctx\n ON ctx.instanceid = iu.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_history.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_history} h\n JOIN {context} ctx\n ON ctx.instanceid = h.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_seats.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_seats} s\n JOIN {context} ctx\n ON ctx.instanceid = s.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_subscr.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_subscr} sub\n JOIN {context} ctx\n ON ctx.instanceid = sub.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_shipping.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_shipping} sh\n JOIN {context} ctx\n ON ctx.instanceid = sh.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_wishlist.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_wishlist} wsh\n JOIN {context} ctx\n ON ctx.instanceid = wsh.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_reviews.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_reviews} rw\n JOIN {context} ctx\n ON ctx.instanceid = rw.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_reviews.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_comments} com\n JOIN {context} ctx\n ON ctx.instanceid = com.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_likes.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_likes} lk\n JOIN {context} ctx\n ON ctx.instanceid = lk.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_catsubscru.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_catsubscru} csub\n JOIN {context} ctx\n ON ctx.instanceid = csub.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_icheckout.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_icheckout} ich\n JOIN {context} ctx\n ON ctx.instanceid = ich.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_erequests.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_erequests} er\n JOIN {context} ctx\n ON ctx.instanceid = er.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_cissues.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_cissues} cis\n JOIN {context} ctx\n ON ctx.instanceid = cis.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_cpages.\n $sql = \"SELECT ctx.instanceid as userid\n FROM {local_intellicart_cpages} cpg\n JOIN {context} ctx\n ON ctx.instanceid = cpg.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_requests.\n $sql = \"SELECT ctx.instanceid AS userid\n FROM {local_intellicart_requests} urq\n JOIN {context} ctx\n ON ctx.instanceid = urq.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n\n // Table local_intellicart_ch_details.\n $sql = \"SELECT ctx.instanceid AS userid\n FROM {local_intellicart_ch_details} chd\n JOIN {context} ctx\n ON ctx.instanceid = chd.userid\n AND ctx.contextlevel = :contextuser\n WHERE ctx.id = :contextid\";\n $userlist->add_from_sql('userid', $sql, $params);\n }", "function userList(){\n\t$errors = array();\n\t$aNull = null;\n\n\t// $ret holds return values for this function.\n\t// Returns:\n\t//\tmessage - applicable message(s)\n\t//\tsuccess - true|false success of operation. If false, error messages expected in 'message'.\n\t$ret = array();\n\t\n\t// precheck function parameters here. Add failures to $errors.\n\t\n\tif(!empty($errors)){\n\t\t$ret['message'] = $errors;\n\t\t$ret['success'] = false;\n\t}else{\n\t\ttry {\n\t\t\t$pdo \t= new PDO(DSN,DBUSER,DBPASS,array(PDO::ATTR_PERSISTENT => true));\t\t\t\t\n\t\t\t// set up stored procedure here. OUT params should be last, prefixed by @.\n\t\t\t$sql\t= 'call users_list()';\n\t\t\t$stmt\t= $pdo->prepare($sql);\t\t\t\t\t\t\n\t\t\t$stmt -> execute();\n\t\t\t$errs = $stmt->errorInfo();\t\t\t\t\t\t\n\t\t\tif (empty($errs[1])) {\n\t\t\t\t// On success, perform any post-operation activity here, e.g. set message.\n\t\t\t\t$ret['success'] = true;\n\t\t\t\t// loop through any result rows as necessary.\n\t\t\t\t// $results holds returned rows from database call (use if necessary).\n\t\t\t\t//$results = array();\n\t\t\t\t//while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t// add to array of results.\n\t\t\t\t//\t$results[]=$row;\n\t\t\t\t//}\n\n\t\t\t\t//For-Each loop on result rows.\t\t\t\t\n\t\t\t\t$users = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t$stmt -> closeCursor();\n\t\t\t\t\n\t\t\t\tforeach ($users as $user)\n\t\t\t\t{\t\t\n\t\t\t\t\t//\n\t\t\t\t\techo '<tr><td scope=\"row\">'.$user['USER_ID'].'</td><td>';\n\t\t\t\t\t// add admin role\n\t\t\t\t\t//echo '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Administrators\\');\"><span class=\"glyphicon glyphicon-user\" aria-hidden=\"true\"></span>Add Admin Role</a><br/>';\n\t\t\t\t\t// add voter role\n\t\t\t\t\t//echo '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span>Add Voter Role</a><br/>';\n\t\t\t\t\t// delete action\n\t\t\t\t\techo '<a href=\"#\" onclick=\"deleteUser('.$user['USER_ID'].');\"><span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span>Delete</a>';\n\t\t\t\t\t\n\t\t\t\t\techo '</td><td>'.$user['USER_NAME'].'</td><td>'.$user['EMAIL'].'</td>';\n\t\t\t\t\t\n\t\t\t\t\t// get user roles.\n\t\t\t\t\t$stmt = $pdo->prepare('call user_roles(?,?)');\n\t\t\t\t\t$stmt -> bindParam(1,$user['USER_ID']);\n\t\t\t\t\t$stmt -> bindParam(2,$aNull);\n\t\t\t\t\t$stmt -> execute();\n\t\t\t\t\t$errs = $stmt->errorInfo();\t\t\t\t\t\n\t\t\t\t\tif (empty($errs[1])){\n\t\t\t\t\t\t$roles = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t$stmt -> closeCursor();\n\t\t\t\t\t\t$hasAdmin = false;\n\t\t\t\t\t\t$hasVoter = false;\n\t\t\t\t\t\t$adminString = '';\n\t\t\t\t\t\t$voterString = '';\n\t\t\t\t\t\t$defString = '';\n\t\t\t\t\t\tforeach($roles as $role){\n\t\t\t\t\t\t\tswitch ($role['ROLE']){\n\t\t\t\t\t\t\t\tcase 'Administrators':\n\t\t\t\t\t\t\t\t\t$hasAdmin = true;\n\t\t\t\t\t\t\t\t\t$adminString = '<a href=\"#\" onclick=\"revokeUserRole('.$user['USER_ID'].',\\'Administrators\\');\"><span class=\"label label-info\">Admins</span></a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Voters':\n\t\t\t\t\t\t\t\t\t$hasVoter = true;\n\t\t\t\t\t\t\t\t\t$voterString = '<a href=\"#\" onclick=\"revokeUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"label label-success\">Voters</span></a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t$defString = '<a href=\"#\" onclick=\"revokeUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"label label-primary\">'.$role['ROLE'].'</span></a>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$hasAdmin){\n\t\t\t\t\t\t\t$adminString = '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Administrators\\');\"><span class=\"label label-default\">Add Admin Role</span></a>';\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$hasVoter){\n\t\t\t\t\t\t\t$voterString = '<a href=\"#\" onclick=\"addUserRole('.$user['USER_ID'].',\\'Voters\\');\"><span class=\"label label-default\">Add Voter Role</span></a>';\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '<td>'.$adminString.'&nbsp;'.$voterString.'&nbsp;'.$defString.'</td>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<td>Unable to obtain roles.</td>';\n\t\t\t\t\t\terror_log(print_r('Error '.$errs[1].': '.$errs[2], TRUE)); \t\n\t\t\t\t\t}\n\t\t\t\t\techo '</tr>';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// Use this to obtain OUT parameter values and do something with them.\n\t\t\t\t#$res = $pdo->query('SELECT @newid AS USER_ID')->fetch(PDO::FETCH_ASSOC);\t\t\t\n\t\t\t\t#$ret['message'] = 'User created ' . $res['USER_ID'];\n\t\t\t}else{\n\t\t\t\t// On failure, perform any post-operation activity here, e.g. determine error(s).\n\t\t\t\t$ret['success'] = false;\n\t\t\t\t// Use this switch to capture database error conditions.\n\t\t\t\tswitch ($errs[1]){\n\t\t\t\t\t//case \"1062\":\n\t\t\t\t\t//\t$ret['message'] = 'Duplicate record exists.';\n\t\t\t\t\t//\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$ret['message'] = 'There seems to be a problem. System administrators have been notified.';\n\t\t\t\t\t\t// Log error to PHP console. Could also return this message to caller, in case\n\t\t\t\t\t\t// it needs to be handled.\n\t\t\t\t\t\terror_log(print_r('Error '.$errs[1].': '.$errs[2], TRUE)); \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$ret['errors'] = 'Error '.$errs[1].': '.$errs[2];\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}catch (PDOException $e){\n\t\t\t// Catch-all error trap.\n\t\t\t$ret['success'] = false;\n\t\t\t$ret['message'] = $e->getMessage();\t\t\t\t\n\t\t}\t\n\t}\t\t\n}", "function listUsers()\n{\n $userManager = new UserManager();\n $users = $userManager->getUsers();\n\n require(ADMINVIEW.'/listUsersView.php');\n}", "public function loadProfilePopup()\n {\n $this->error(false);\n\n $sM = $this->get('m');\n $sModule = $this->get('module');\n $sName = $this->get('name');\n $sMatchType = $this->get('match_type');\n $sMatchID = $this->get('match_id');\n $sMatchName = $this->get('match_name');\n\n $bIsRight = false;\n $sMatchTypeUserConvertToPages = $sMatchType;\n if ($sMatchType == 'user')\n {\n $bIsRight = true;\n $aUser = Phpfox::getService('user')->getByUserName($sMatchName);\n if (isset($aUser['user_id']) === true)\n {\n // check pages object\n if ((!isset($aUser['user_id'])) || (isset($aUser['user_id']) && $aUser['profile_page_id'] > 0))\n {\n if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n {\n $sMatchTypeUserConvertToPages = 'page';\n }\n } else\n {\n Phpfox::getBlock('profilepopup.user');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n } else\n {\n $bIsRight = false;\n\t\t\t\t\t\t\t\t$sMatchTypeUserConvertToPages = 'page';\n }\n }\n if ($sMatchType == 'page' || $sMatchTypeUserConvertToPages == 'page')\n {\n $bIsRight = true;\n\t\t\t\t\t\tif (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aPage = Phpfox::getService('pages')->getForView($sMatchID);\n if (!$aPage)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.pages');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'event')\n {\n $bIsRight = true;\n $aEvent = Phpfox::getService('event')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.event');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'fevent')\n {\n $bIsRight = true;\n if (Phpfox::isModule('fevent'))\n {\n $aEvent = Phpfox::getService('fevent')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.fevent');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n }\n\n if ($bIsRight === false)\n {\n echo json_encode(array('content' => '', 'msg' => \"failure\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }", "public function watchlist()\n {\n // This is a user only module - redirect everyone else\n // Check this before Security check - maybe after login user has enough rights\n if (!UserUtil::isLoggedIn()) {\n return System::redirect(ModUtil::url('ContactList', 'user', 'loginscreen', array('page' => 'main')));\n }\n // Security check\n if (!SecurityUtil::checkPermission('ContactList::', '::', ACCESS_COMMENT)) {\n return LogUtil::registerPermissionError(System::getVar('entrypoint', 'index.php'));\n }\n\n // check for action\n $action = FormUtil::getPassedValue('action', '');\n if (!empty($action) && !(SecurityUtil::confirmAuthKey())) return Logutil::registerAuthIDError();\n if ($action == \"suspend\") {\n if (ModUtil::apiFunc('ContactList','user','suspendWatchList',array('id'=>(int)FormUtil::getPassedValue('id')))) {\n LogUtil::registerStatus($this->__('User was removed from your watchlist.'));\n } else {\n LogUtil::registerError($this->__('An error occurred while trying to suspend the buddy'));\n }\n }\n\n // redirect after any action to avoid auth-id problems\n if (!empty($action)) {\n return System::redirect(ModUtil::url('ContactList','user','watchlist'));\n }\n \n // assign data\n $uid = UserUtil::getVar('uid');\n $data['contactinfo'] = ModUtil::apiFunc('ContactList','user','getContactsInfo',array('uid' => $uid));\n $data['dateformat'] = ModUtil::getVar('ContactList','dateformat');\n // pagination\n $cl_limit = ModUtil::getVar('ContactList','itemsperpage');\n $cl_startnum = (int)FormUtil::getPassedValue('cl_startnum',1);\n $data['cl_limit'] = $cl_limit;\n $data['cl_startnum'] = $cl_startnum;\n \n // Get watchlist\n $buddies_count = ModUtil::apiFunc('ContactList','user','getWatchList',\n array( 'bid' => $uid,\n 'countonly' => true \n ));\n $buddies = ModUtil::apiFunc('ContactList','user','getWatchList',\n array( 'uid' => UserUtil::getVar('uid') \n ));\n \n $data['buddies'] = $buddies;\n $data['contacts_all'] = $buddies_count;\n $data['authid'] = SecurityUtil::generateAuthKey();\n \n // Assign Data and return output\n return $this->view->assign($data)\n ->fetch('user/watchlist.htm');\n }", "function execute_list(){\n\tinclude_once(\"view/user.php\");\n\t$users = array();\n\t$users[\"user\"] = getUsers();\n\tviewUser($users);\n}", "public function list_profile($msg='',$msg_class='')\n{\n\t$user_id = $this->session->userdata('user_details');\n\t$user_id = $user_id[0]['id'];\n\tif(!empty($msg))\n\t{\n\t\t$listdata['msg'] = $msg;\n\t\t$listdata['msg_class'] = $msg_class;\n\t}\n\t$field_name = 'members_id_FK';\n\t$listdata['all_data'] = $this->urs->getFullDetails(EVENT,$field_name,$user_id);\n\tredirect('UserDashboard','refresh');\n}", "private function _addToProspectListButton()\n {\n global $app_strings, $sugar_version, $sugar_config, $current_user;\n\n $query = \"SELECT distinct prospects.id, prospects.assigned_user_id, prospects.first_name, prospects.last_name, prospects.phone_work, prospects.title,\n\t\t\t\temail_addresses.email_address email1, users.user_name as assigned_user_name\n\t\t\t\tFROM users_last_import,prospects\n LEFT JOIN users ON prospects.assigned_user_id=users.id\n\t\t\t\tLEFT JOIN email_addr_bean_rel on prospects.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Prospect' and email_addr_bean_rel.primary_address=1 and email_addr_bean_rel.deleted=0\n\t\t\t\tLEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id\n\t\t\t\tWHERE users_last_import.assigned_user_id = '{$current_user->id}' AND users_last_import.bean_type='Prospect' AND users_last_import.bean_id=prospects.id\n\t\t\t\tAND users_last_import.deleted=0 AND prospects.deleted=0\";\n\n $prospect_id=[];\n if(!empty($query)){\n $res=$GLOBALS['db']->query($query);\n while($row = $GLOBALS['db']->fetchByAssoc($res))\n {\n $prospect_id[]=$row['id'];\n }\n }\n $popup_request_data = array(\n 'call_back_function' => 'set_return_and_save_background',\n 'form_name' => 'DetailView',\n 'field_to_name_array' => array(\n 'id' => 'prospect_list_id',\n ),\n 'passthru_data' => array(\n 'child_field' => 'notused',\n 'return_url' => 'notused',\n 'link_field_name' => 'notused',\n 'module_name' => 'notused',\n 'refresh_page'=>'1',\n 'return_type'=>'addtoprospectlist',\n 'parent_module'=>'ProspectLists',\n 'parent_type'=>'ProspectList',\n 'child_id'=>'id',\n 'link_attribute'=>'prospects',\n 'link_type'=>'default',\t //polymorphic or default\n 'prospect_ids'=>$prospect_id,\n )\n );\n\n $json = getJSONobj();\n $encoded_popup_request_data = $json->encode($popup_request_data);\n\n return <<<EOHTML\n<script type=\"text/javascript\" src=\"include/SubPanel/SubPanelTiles.js?s={$sugar_version}&c={$sugar_config['js_custom_version']}\"></script>\n<input align=right\" type=\"button\" name=\"select_button\" id=\"select_button\" class=\"button\"\n title=\"{$app_strings['LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL']}\"\n value=\"{$app_strings['LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL']}\"\n onclick='open_popup(\"ProspectLists\",600,400,\"\",true,true,$encoded_popup_request_data,\"Single\",\"true\");' />\nEOHTML;\n\n }", "public function userList() {\n if (!Gate::allows('users_list')) {\n return abort(403);\n }\n\n $users = DB::table('users')->paginate(30);\n\n $data = [\n 'users' => $users,\n ];\n\n return view('admin.users.list')->with($data);\n }", "public function action_list()\n {\n if(($data = $this->check_user($this->request->param('id'))))\n {\n $data['end_year'] = Model::factory('academicyear')->get_end_year();\n $data['year'] = isset($data['year']) ? $data['year'] : $data['end_year'];\n $action = 'get_'.$this->user_role.'_'.$this->user_record;\n $data['records'] = Model::factory($this->user_model)\n ->$action($data['year'], $data[$this->user_role]);\n $data['table'] = View::factory($this->user_record.'records/'.$this->user_role.'/table', $data);\n $user_id = $this->user_id;\n $data['sidebar']\n ->set('id', $data[$this->user_role]->$user_id)\n ->set('sidebar_index', 'list');\n $this->setTitle(Text::ucfirst($this->user_record).' Records')\n ->view($this->user_record.'records/'.$this->user_role.'/list', $data)\n ->render();\n }\n else\n throw new HTTP_Exception_404;\n }", "public function listuseradminAction() {\n\t $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t //$this->_helper->layout->disableLayout();\n \t $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t\t\n\t if(!isset($sessionutilisateur->login)) { $this->_redirect('/administration/login');}\n \n\t\t $tabela = new Application_Model_DbTable_EuUtilisateur();\n\t\t $select = $tabela->select(Zend_Db_Table::SELECT_WITH_FROM_PART);\n $select->setIntegrityCheck(false);\n\t\t $select->join('eu_user_group', 'eu_user_group.code_groupe = eu_utilisateur.code_groupe');\n $select->where('eu_utilisateur.id_utilisateur_parent = ?',$sessionutilisateur->id_utilisateur);\n\t\t $select->order('id_utilisateur desc');\n\t\t $users = $tabela->fetchAll($select);\n\t\t $this->view->entries = $users;\n\t }", "function userlist($id=null)\n\t\t\t{\n\t\t\t\t$this->layout\t= 'admin';\n\t\t\t\t$this->paginate = array('conditions' => array('Help.qus_id' => $id),'limit'=>'10',\"order\"=>'Help.qus_id');\n\t\t\t\t$userlist = $this->paginate('Help');\n\t\t\t\t//pr($userlist);die;\n\t\t\t\t$this->set('userlists',$userlist);\n\t\t\t\t$this->set('userid',$id);\n\t\t\t}", "function ViewUsersList(){ \n\t\t#call defaul users view \n\t\t include(\"../includes/tpl/ViewUsers.tpl\");\n\t}", "function userlist(){\r\n $query = \"SELECT * FROM ads JOIN user ON ads.user = user.email\";\r\n \r\n $run = (mysql_query($query));\r\n \r\n \r\n while ($row = mysql_fetch_array($run)){\r\n $business = $row['user'];\r\n }\r\n $query = \"select * FROM user order by id DESC\";\r\n $run = (mysql_query($query));\r\n \r\n while ($row = mysql_fetch_array($run)){\r\n $id = $row['id'];\r\n $name = $row['name'];\r\n $email = $row['email'];\r\n $address = $row['address'];\r\n $img = $row['img'];\r\n if(empty($img)) $img = \"default.png\";\r\n echo \"\r\n <tr>\r\n <td><img src='../Img/$img' class='img-fluid' style='width:40px;height:40px;border-radius:50%;'></td>\r\n <td>$id</td>\r\n <td>$name</td>\r\n <td>$email</td>\r\n <td>$address</td>\r\n <td></td>\r\n <td>\r\n <a href='view.php?view=$id' data-toggle='modal' data-target='#User'><i class='fa fa-pencil fa-eye'></i></a>\r\n </td>\r\n </tr>\r\n \";\r\n }\r\n }", "public function getUserList(GetUserList $parameters) {\n return $this->__soapCall('getUserList', array($parameters), array(\n 'uri' => 'http://service.ws.um.carbon.wso2.org',\n 'soapaction' => ''\n ));\n }", "public function actionList() {\n $listId = $_POST['id'];\n $list = X2List::model()->findByPk($listId);\n if (isset($list)) {\n //$list=X2List::load($listId);\n } else {\n $list = X2List::model()->findByAttributes(array('name' => $listId));\n if (isset($list)) {\n $listId = $list->id;\n //$list=X2List::load($listId);\n } else {\n $this->_sendResponse(404, 'No list found with id: ' . $_POST['id']);\n }\n }\n $model = new Contacts('search');\n $dataProvider = $model->searchList($listId, 10);\n $data = $dataProvider->getData();\n $this->_sendResponse(200, json_encode($data), true);\n }", "Public function getStaffCrByLand(){\n\t\t$userId=$this->checklogin();\n\t\t\t\t\n\t\t\t\tif($userId){\n\t\t\t\t\t\n\t\t\t\t\t$data=$this->ApiModel->getDateFormTable('land_staff','landlord_id='.$userId);\n\t\t\t\t\t$res=array('msg'=>'success','staffList'=>$data);\n\t\t\t\t\techo json_encode($res);\n\t\t\t\t\thttp_response_code(200); \n\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function action_list()\n {\n $page = $this->get_query('page', 1);\n $leader = $this->get_current_user();\n $filter = array(\n 'group_id' => $leader['group_id'],\n );\n $user_list = Model_User::find($filter, $page);\n $total = $this->template_data['total'] = Model_User::count();\n $this->template_data['total_page'] = ceil($total / OJ::per_page);\n $this->template_data['user_list'] = $user_list;\n $this->template_data['title'] = __('admin.user.list.user_list');\n }", "function get_user_for_list()\n\t {\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('stream_user');\n\t\t\t\n\t\t\t\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->result_array(); \t\n\t\t}", "public function listing()\n {\n // solo permite mostrar listado de usuarios al administrador\n if (!$this->isAdmin())\n $this->redirect();\n\n $users = \\models\\User::findBy(null);\n\n $this->view->assign(\"list\", $users);\n $this->view->render(\"user_list\");\n }", "public function populate(WebblerListing $w, $start, $limit)\n {\n /*\n * Populate the webbler list with users who have opened the message\n */\n $w->setElementHeading($this->i18n->get('subscriber'));\n $rows = $this->model->fetchMessageOpens($start, $limit);\n\n foreach ($rows as $row) {\n $key = $row['email'];\n $w->addElement($key, new CommonPlugin_PageURL('user', array('id' => $row['userid'])));\n\n foreach ($this->model->selectedAttrs as $attr) {\n $w->addColumn($key, $this->model->attributes[$attr]['name'], $row[\"attr{$attr}\"]);\n }\n if ($row['blacklisted']) {\n $status = new ImageTag('user.png', $this->i18n->get('blacklisted'));\n } elseif (!$row['confirmed']) {\n $status = new ImageTag('no.png', $this->i18n->get('unconfirmed'));\n } else {\n $status = '';\n }\n $w->addColumnHtml($key, $this->i18n->get('status'), $status);\n $w->addColumn($key, $this->i18n->get('latest view'), $row['latest_view'] ? formatDateTime($row['latest_view']) : '');\n $w->addColumn($key, $this->i18n->get('first view'), formatDateTime($row['viewed']));\n $url = new CommonPlugin_PageURL(\n null, ['type' => 'userviews', 'userid' => $row['userid'], 'msgid' => $this->model->msgid]\n );\n $w->addColumn($key, $this->i18n->get('total views'), $row['total_views'], $url);\n $url = new CommonPlugin_PageURL(\n 'userclicks', ['userid' => $row['userid'], 'msgid' => $this->model->msgid]\n );\n $w->addColumn($key, $this->i18n->get('links clicked'), $row['links_clicked'] ?: '', $url);\n $w->addColumn($key, $this->i18n->get('clicks_total'), $row['total_clicks']);\n }\n }", "public function actionIndex($list_uid)\n {\n $list = $this->loadListModel($list_uid);\n $options = Yii::app()->options;\n $request = Yii::app()->request;\n $importCsv = new ListCsvImport('upload');\n $importText = new ListTextImport('upload');\n $importDb = new ListDatabaseImport();\n\n $importUrl = ListUrlImport::model()->findByAttributes(array(\n 'list_id' => $list->list_id,\n ));\n if (empty($importUrl)) {\n $importUrl = new ListUrlImport();\n }\n \n $cliEnabled = $options->get('system.importer.cli_enabled', 'no') == 'yes';\n $webEnabled = $options->get('system.importer.web_enabled', 'yes') == 'yes';\n $urlEnabled = $options->get('system.importer.url_enabled', 'no') == 'yes';\n\n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('list_import', 'Import subscribers into your list'),\n 'pageHeading' => Yii::t('list_import', 'Import subscribers'),\n 'pageBreadcrumbs' => array(\n Yii::t('lists', 'Lists') => $this->createUrl('lists/index'),\n $list->name => $this->createUrl('lists/overview', array('list_uid' => $list->list_uid)),\n Yii::t('list_import', 'Import subscribers')\n )\n ));\n\n $maxUploadSize = (int)$options->get('system.importer.file_size_limit', 1024 * 1024 * 1) / 1024 / 1024;\n $this->render('list', compact('list', 'importCsv', 'importText', 'importDb', 'importUrl', 'maxUploadSize', 'cliEnabled', 'webEnabled', 'urlEnabled'));\n }", "public function list_users(){\n $input=array(\n 'module' => 'MysqlFE',\n 'function' => 'listusers'\n );\n $query=$this->build_query($input);\n $raw=$this->query($query);\n $ob=json_decode($raw, false);\n return $status=$ob->cpanelresult->data;\n \n }", "public function listItemAdmin() {\n $user = Yii::app()->user->id;\n $command = Yii::app()->db->createCommand('SELECT support_id, support_name, support_nameen, support_phone, support_value, support_order, support_type FROM ' . $this->tableName() . ' WHERE dos_usernames_username=:user');\n $command->bindParam(\":user\", $user, PDO::PARAM_STR);\n return $command->queryAll();\n }", "function tw_list_member($search, $page = -1) {\r\n $url = '1.1/lists/members';\r\n $cursor = -1;\r\n if ($page == 'next') $cursor = $_SESSION[$search.'list_member_next_cursor'];\r\n if ($page == 'previous') $cursor = $_SESSION[$search.'list_member_previous_cursor'];\r\n $search = explode('/', $search);\r\n $slug = str_replace(' ', '-', $search[1]);\r\n $owner_screen_name = $search[0];\r\n $arr = array(\r\n 'slug' => $slug,\r\n 'owner_screen_name' => $owner_screen_name,\r\n 'cursor' => $cursor\r\n );\r\n $data_user = array();\r\n $cursor = 0;\r\n $output = tw_request($url, $arr);\r\n if ($output['success'] && count($output['response']['users']) > 0) {\r\n foreach($output['response']['users'] as $k => $v) {\r\n $data_user[] = tw_render_user($v);\r\n }\r\n }\r\n $next = $output['response']['next_cursor_str'];\r\n $previous = $output['response']['previous_cursor_str'];\r\n $http_code = $output['http_code'];\r\n $error = $output['error'];\r\n $success = $output['success'];\r\n $output2 = array(\r\n 'response' => $data_user,\r\n 'http_code' => $http_code,\r\n 'error' => $error,\r\n 'success' => $success,\r\n 'next' => $next,\r\n 'previous' => $previous\r\n );\r\n return $output2;\r\n}", "public function listUsersInForFriendsSection(){\t\t\n\t\t\t$arrObjPerm = $this->listJournalPerm();\n\t\t\tif(count($arrObjPerm) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t\t$this->loadObject('User');\n\n\t\t\t$arrUsers = array();\n\t\t\t\n\t\t\t$objGroup = $this->loadModel('Group');\n\t\t\n\t\t\tforeach ($arrObjPerm as $value){\n\t\t\t\t$journalperm = $value->data['Journalperm'];\n\t\t\t\t\t\n\t\t\t\tif (($journalperm['tablename_id'] == 3) && ($journalperm['id_value'] == 0)) {\n\t\t\t\t\t$arrUsers = array_merge($arrUsers , $this->User->listFriend(array('buildBelongs' => 0)));\n\t\t\t\t}\n\t\t\t\tif ($journalperm['tablename_id'] == 3 && $journalperm['id_value'] > 0) {\n\t\t\t\t\t$arrUsers[] = $this->User->findById($journalperm['id_value'], array('recursive'=>-1), \"0\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($journalperm['tablename_id'] == 10) && ($journalperm['id_value'] == 0)){\n\t\t\t\t\t$arrGroups = $this->User->listGroupsByUser();\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($arrGroups)){\n\t\t\t\t\t\tforeach($arrGroups as $key => $value){\n\t\t\t\t\t\t\t$arrUsers = array_merge($arrUsers , $value->listMembers());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ( ($journalperm['tablename_id'] == 10) && ($journalperm['id_value'] != 0) ) {\n\t\t\t\t\t$group = $objGroup->findById($journalperm['id_value']);\n\t\t\t\t\t$arrUsers = array_merge($arrUsers , $group->listMembers());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Remove Duplicated Users\n\t\t\t$arrUserId = array();\n\t\t\tforeach($arrUsers as $key => $value){\n\t\t\t\tif(in_array($value->getPrimaryId(),$arrUserId)){\n\t\t\t\t\tunset($arrUsers[$key]);\n\t\t\t\t}else{\n\t\t\t\t\t$arrUserId[] = $value->getPrimaryId();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $arrUsers;\n\t}", "public static function listData()\n\t{\n\t\treturn CHtml::listData(CActiveRecord::model(__CLASS__)->findAll(),'id','users_users_id');\n\t}", "public function getListUserfullname() {\n\t\t\t$users= User::model()->findAll();\t\t\t\n\t\t\t$list[]= \"--- select all ---\";\t\n\t\t\tforeach($users as $row)\n\t\t\t{\t\t\t\t\t\n\t\t\t\t$list[$row['user_id']]= $row['user_full_name'];\t\n\t\t\t}\n\t\t\treturn $list;\n\t\t}", "public function getUserList() {\n $orderBy = \"id desc\";\n if (isset($_GET['o_type']))\n $orderBy = $_GET['o_field'] . \" \" . $_GET['o_type'];\n $where = \"\";\n $flag = true;\n $whereParam = array();\n if (isset($_GET['searchForm']['user_name']) && trim($_GET['searchForm']['user_name']) != \"\" && isset($_GET['searchForm']['role']) && trim($_GET['searchForm']['role']) != \"\") {\n $where .= \" ((name like %ss_name or username like %ss_username or email like %ss_username) \";\n $where .= \" and (roll_id = %d_roll)) \";\n $whereParam[\"name\"] = Stringd::processString($_GET['searchForm']['user_name']);\n $whereParam[\"username\"] = Stringd::processString($_GET['searchForm']['user_name']);\n $whereParam[\"email\"] = Stringd::processString($_GET['searchForm']['user_name']);\n $whereParam[\"roll\"] = Stringd::processString($_GET['searchForm']['role']);\n $flag = false;\n } else if (isset($_GET['searchForm']['user_name']) && trim($_GET['searchForm']['user_name']) != \"\") {\n $where .= \" name like %ss_name or username like %ss_username or email like %ss_username \";\n $whereParam[\"name\"] = Stringd::processString($_GET['searchForm']['user_name']);\n $whereParam[\"username\"] = Stringd::processString($_GET['searchForm']['user_name']);\n $whereParam[\"email\"] = Stringd::processString($_GET['searchForm']['user_name']);\n $flag = false;\n } else if (isset($_GET['searchForm']['role']) && trim($_GET['searchForm']['role']) != \"\") {\n $where .= \" roll_id = %d_roll \";\n $whereParam[\"roll\"] = Stringd::processString($_GET['searchForm']['role']);\n $flag = false;\n }\n\n if ($_SESSION[CFG::$session_key]['roll_id'] == 3) {\n if ($flag == false) {\n $where.=\" and \";\n }\n $where.=\" roll_id in (3,4) \";\n }\n\n\n //DB::debugMode();\n UTIL::doPaging(\"totalUsers\", \"id,name,username,email,phone,created_by,roll_id,updated_by,active\", CFG::$tblPrefix . \"user\", $where, $whereParam, $orderBy); //exit;\n }", "public function actionLists() {\n $criteria = new CDbCriteria();\n\t\t$criteria->addCondition('type=\"static\" OR type=\"dynamic\"');\n if(Yii::app()->user->getName()!='admin'){\n $condition = 'visibility=\"1\" OR assignedTo=\"Anyone\" OR assignedTo=\"'.Yii::app()->user->getName().'\"';\n /* x2temp */\n $groupLinks = Yii::app()->db->createCommand()->select('groupId')->from('x2_group_to_user')->where('userId='.Yii::app()->user->getId())->queryColumn();\n if(!empty($groupLinks))\n $condition .= ' OR assignedTo IN ('.implode(',',$groupLinks).')';\n\n $condition .= 'OR (visibility=2 AND assignedTo IN \n (SELECT username FROM x2_group_to_user WHERE groupId IN\n (SELECT groupId FROM x2_group_to_user WHERE userId='.Yii::app()->user->getId().')))';\n $criteria->addCondition($condition);\n }\n\t\t\n\t\t$contactLists = new CActiveDataProvider('X2List', array(\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 'createDate DESC',\n\t\t\t),\n\t\t\t'criteria' => $criteria\n\t\t));\n\n\t\t$totalContacts = X2Model::model('Contacts')->count();\n\t\t$totalMyContacts = X2Model::model('Contacts')->count('assignedTo=\"' . Yii::app()->user->getName() . '\"');\n\t\t$totalNewContacts = X2Model::model('Contacts')->count('assignedTo=\"' . Yii::app()->user->getName() . '\" AND createDate >= ' . mktime(0, 0, 0));\n\n\t\t$allContacts = new X2List;\n\t\t$allContacts->attributes = array(\n\t\t\t'id' => 'all',\n\t\t\t'name' => Yii::t('contacts', 'All Contacts'),\n\t\t\t'description' => '',\n\t\t\t'type' => 'dynamic',\n\t\t\t'visibility' => 1,\n\t\t\t'count' => $totalContacts,\n\t\t\t'createDate' => 0,\n\t\t\t'lastUpdated' => 0,\n\t\t);\n\t\t$newContacts = new X2List;\n\t\t$newContacts->attributes = array(\n\t\t\t'id' => 'new',\n\t\t\t'assignedTo' => Yii::app()->user->getName(),\n\t\t\t'name' => Yii::t('contacts', 'New Contacts'),\n\t\t\t'description' => '',\n\t\t\t'type' => 'dynamic',\n\t\t\t'visibility' => 1,\n\t\t\t'count' => $totalNewContacts,\n\t\t\t'createDate' => 0,\n\t\t\t'lastUpdated' => 0,\n\t\t);\n\t\t$myContacts = new X2List;\n\t\t$myContacts->attributes = array(\n\t\t\t'id' => 'my',\n\t\t\t'assignedTo' => Yii::app()->user->getName(),\n\t\t\t'name' => Yii::t('contacts', 'My Contacts'),\n\t\t\t'description' => '',\n\t\t\t'type' => 'dynamic',\n\t\t\t'visibility' => 1,\n\t\t\t'count' => $totalMyContacts,\n\t\t\t'createDate' => 0,\n\t\t\t'lastUpdated' => 0,\n\t\t);\n\n\t\t$contactListData = $contactLists->getData();\n\t\t$contactListData[] = $newContacts;\n\t\t$contactListData[] = $myContacts;\n\t\t$contactListData[] = $allContacts;\n\t\t$contactLists->setData($contactListData);\n\n\n\t\t$this->render('listIndex', array(\n\t\t\t'contactLists' => $contactLists,\n\t\t));\n\t}", "public function userSideBarList(Request $request) {\n \n $input = $request->all();\n \n $mobileNumber = $input['mobile_number'];\n \n if( isset( $mobileNumber ) && !empty( $mobileNumber ) ) {\n \n $userDetail = new UserDetail();\n $mobileNoExists = $userDetail->checkUserMobileNoExists( $mobileNumber );\n \n if( isset( $mobileNoExists ) && !empty( $mobileNoExists ) ) {\n\n $getUserDetail = new UserDetail();\n $sideBarLists = $getUserDetail->getSidebarProfileDetails( $input );\n\n /* echo \"<pre>\";\n print_r($sideBarLists);\n exit; */ \n if( isset( $sideBarLists ) && !empty( $sideBarLists ) ) {\n \n $response = array(); \n foreach( $sideBarLists as $i => $sideBarList ) { \n \n $response['user_id'] = $sideBarLists->user_id;\n $response['full_name'] = CustomHelper::getCamelCase($sideBarLists->full_name);\n $response['first_letter'] = CustomHelper::getFirstLetterReturn($sideBarLists->full_name);\n $response['user_level'] = \"Level : \".$sideBarLists->user_level;\n $response['user_type'] = Config::get('constant.USER');\n \n } \n\n if( isset( $response ) && !empty( $response ) ) { \n \n return response()->json(['success' => $this->successStatus, 'message' => $response], $this->successStatusCode );\n \n } else {\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printProfileNotCreated() ], $this->failureStatusCode );\n }\n \n } else { // if sideBarLists\n\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printProfileNotCreated() ], $this->failureStatusCode );\n }\n \n } else { \n\n return response()->json(['success' => $this->failureStatus, 'message' => $this->printCorrectMobileNumber() ], $this->failureStatusCode );\n } \n\n } else {\n \n return response()->json(['success' => $this->failureStatus, 'message' => $this->printMobileNoMissing() ], $this->failureStatusCode );\n } \n\n }", "public function verified_user_list() {\r\n\t\t$data['page_data'] = $this->load->view('web_user/verified_user', array(), TRUE);\r\n\t\techo modules::run(AUTH_DEFAULT_TEMPLATE, $data);\r\n\t}", "private function viewList ( ) {\r\n \r\n /** crida al mètode que recupera la llista d'usuaris */\r\n $this->usuari = $this->model->getLlistaUsuaris ( );\r\n \r\n /** estableix la vista que s'ha de mostrar */\r\n $this->view = $_SESSION[\"viewPath\"] . 'usersview.php'; \r\n\r\n }", "public function index()\n {\n \n $mods = UserMod::paginate(10);//แก้เพื่อเวลาทำpagination จะให้มีกี่แถวต่อหน้า\n return view('admin.user.lists',compact('mods'));\n\n\n }" ]
[ "0.7575135", "0.7333101", "0.622374", "0.5857883", "0.57600456", "0.5568894", "0.5437219", "0.54301727", "0.54237646", "0.5413581", "0.54107255", "0.53901863", "0.53796375", "0.53324294", "0.5287662", "0.5280543", "0.52754915", "0.5275469", "0.5259568", "0.52591616", "0.52539355", "0.52173305", "0.52003324", "0.51996386", "0.5180353", "0.5179787", "0.51753575", "0.5168721", "0.51651865", "0.51503354", "0.5137469", "0.51357484", "0.51320326", "0.51141787", "0.51010406", "0.509507", "0.5079035", "0.5075858", "0.5075073", "0.5066154", "0.50640315", "0.5061142", "0.5059903", "0.5046959", "0.50416136", "0.50366145", "0.5036332", "0.50255185", "0.5014071", "0.4997181", "0.49893177", "0.49679393", "0.49655867", "0.49588266", "0.49433506", "0.4940033", "0.49378783", "0.49323684", "0.49154705", "0.49141568", "0.49114934", "0.49094552", "0.49039054", "0.49021453", "0.4901444", "0.4900982", "0.48971283", "0.48950452", "0.48949474", "0.48936886", "0.48916438", "0.48885447", "0.48866767", "0.4883289", "0.48814458", "0.48777983", "0.48703825", "0.4868", "0.48622197", "0.48590073", "0.48386765", "0.48371", "0.48361474", "0.48318395", "0.4830215", "0.48191893", "0.48155862", "0.48127562", "0.4812428", "0.4811804", "0.48110226", "0.48072454", "0.48037526", "0.47996008", "0.4795103", "0.47938764", "0.4791249", "0.4783018", "0.47779667", "0.47689962" ]
0.84669435
0
// function::load_popup_call_staff_VNGHR description: popup execute action call user
// function::load_popup_call_staff_VNGHR описание: попап выполнения действия вызова пользователя
public function load_popup_call_staff_VNGHR($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) { //write log for user calling $this->insert_call_action_history($arrUser['id'], $arrUser['fullname'], $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId, NOTIFY_ACTION_TYPE_CALL); $this->loadview('contact/popup_call_vng_staff_list', array('arrUser' => $arrUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId, 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strChangeId' => $strChangeId) , 'layout_popup'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load_popup_list_mobile_user_vng_staff_list() {\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getStaffById($iUserId);\n\t\t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['cellphone'] = str_replace($arrOrders, ', ', $arrUser['cellphone']);\n\t \t\t$arrUser['cellphone'] = str_replace($arrChildOrders, '', $arrUser['cellphone']);\t \t\t\n\t \t$arrUser['cellphone'] = explode(', ', $arrUser['cellphone']);\n\t\t $this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t\t\t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function load_popup_call_user($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId) {\n \t// pd(count($arrUser['mobile']));\n \t$iUserActionId = $_SESSION['userId'];\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\tif(!empty($strAlertMsg)) {\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($strTimeAlert)) {\n\t\t\t$strTimeAlert = date(FORMAT_MYSQL_DATETIME, $strTimeAlert);\n\t\t}\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n 'ref_id' => $arrUser['userid'],\n\t\t\t'incident_id' => $strIncidentId,\n\t\t\t'alert_id' => $strAlertId,\n\t\t\t'alert_message' => $strAlertMsg, \n\t\t\t'time_alert' => $strTimeAlert,\n\t\t\t'change_id' => $strChangeId,\n\t\t\t'ip_action' => $this->strIpAddress\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strTimeAlert' => $strTimeAlert,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId), 'layout_popup');\n\t}", "public function load_popup_sms_vng_staff_list() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null; \n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n\t\t$arrOneUser = $this->contact_model->getStaffById($noUserId);\n\t\t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(!empty($arrOneUser)) {\n \t\t$arrOneUser['cellphone'] = str_replace($arrOrders, ', ', $arrOneUser['cellphone']);\n\t \t$arrOneUser['cellphone'] = str_replace($arrChildOrders, '', $arrOneUser['cellphone']);\n\t if(strpos($arrOneUser['cellphone'], ',')!==false) {\n\t $arrOneUser['cellphone'] = explode(', ', $arrOneUser['cellphone']);\n\t } else {\n\t $arrOneUser['cellphone'] = array($arrOneUser['cellphone']);\n\t }\n \t} else {\n \t\t$arrOneUser = array();\n \t}\n \t\n\t\t$this->loadview('contact/popup_send_message_VNGHR', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_call_user_by_id($iUserId, $strZbxHostName, $strIncidentId) {\n \t$iUserActionId = $_SESSION['userId'];\n\t\t$arrUser = $this->contact_model->getUserById($iUserId);\n\t\t//write log for user calling\n\t\t$strContent = 'Called to '.$arrUser['full_name'];\n\t\t$oCurrentDatetime = new DateTime(null, new DateTimeZone(TIMEZONE_HCM));\n\t\t$arrInsertData = array(\n\t\t\t'content' => $strContent,\n\t\t\t'action_type' => NOTIFY_ACTION_TYPE_CALL,\n\t\t\t'user_action_id' => intval($iUserActionId),\n 'created_date' => $oCurrentDatetime->format('Y-m-d H:i:s'),\n\t\t\t'host_name'\t=> $strZbxHostName\n\t\t);\n\t\t$this->contact_model->insert_action_history($arrInsertData);\n\t\t$this->loadview('contact/popup_call_user', array('arrUser' => $arrUser,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strZbxHostName'\t=> $strZbxHostName,\n\t\t\t\t\t\t\t\t\t\t\t\t 'strIncidentId' => $strIncidentId), 'layout_popup');\n\t}", "public function load_popup_user_information() {\n\t\t$strUserDomain = $_REQUEST['user'];\n\t\t$strIncidentId = $strAlertId = $strAlertMsg = $strTimeAlert = $strIdentifier = $strChangeId = null;\n\t\tif(!empty($_REQUEST['incident_id'])) {\n\t\t\t$strIncidentId = $_REQUEST['incident_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_id'])) {\n\t\t\t$strAlertId = $_REQUEST['alert_id'];\n\t\t}\n\t\tif(!empty($_REQUEST['alert_msg'])) {\n\t\t\t$strAlertMsg = trim($_REQUEST['alert_msg']);\n\t\t\t$strAlertMsg = urldecode($strAlertMsg);\n\t\t}\n\t\tif(!empty($_REQUEST['time_alert'])) {\n\t\t\t$strTimeAlert = trim($_REQUEST['time_alert']);\n\t\t}\n\t\tif(!empty($_REQUEST['identifier'])) {\n\t\t\t$strIdentifier = $_REQUEST['identifier'];\n\t\t}\n\t\tif(!empty($_REQUEST['change_id'])) {\n\t\t\t$strChangeId = $_REQUEST['change_id'];\n\t\t}\n\t\t$arrUsersInfo = $this->contact_model->getListUsersInfoByUserDomain($strUserDomain);\n\t\t//$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain('minht');\n\t\t$arrVNGStaffList = $this->contact_model->getVNGStaffListByUserDomain($strUserDomain);\n\t\t$arrEmails = array();\n\t\t$arrSearched = array();\n\t\t$arrVNGStaffListSearched = array();\n\t\t$t = 0;\n\t\tif(!empty($arrUsersInfo)) {\n\t\t\t$noUserIdTemp = $arrUsersInfo[0]['userid']; \n\t\t\t$arrEmails[0] = $arrUsersInfo[0]['email'];\n\t\t\tforeach ($arrUsersInfo as $key => $oneUser) {\n\t\t\t\tif($noUserIdTemp != $oneUser['userid']) {\n\t\t\t\t\t$noUserIdTemp = $oneUser['userid'];\n\t\t\t\t\t$t = 0;\n\t\t\t\t\t$arrEmails[] = strtolower($oneUser['email']);\n\t\t\t\t} \n\t\t\t\t$arrSearched[$noUserIdTemp][$t] = $oneUser;\n\t\t\t\t$t++;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$arrSearched = array();\n\t\t}\n\n\t\tif(!empty($arrVNGStaffList)) {\n\t\t\tforeach ($arrVNGStaffList as $index => $oOneStaff) {\n\t\t\t\tif(!in_array(strtolower($oOneStaff->email), $arrEmails)) {\n\t\t\t\t\t$arrVNGStaffListSearched[] = $oOneStaff;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$arrVNGStaffListSearched = array();\n\t\t}\n\t\t$this->loadview('contact/popup_search_by_user_result', array('arrSearchUsersResult' => $arrSearched, 'arrVNGStaffs' => $arrVNGStaffListSearched, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'strIdentifier' => $strIdentifier, 'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "public function load_popup_list_mobile_user() {\n \t// pd($_REQUEST);\n \t$iUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = !empty($_REQUEST['incident_id']) ? $_REQUEST['incident_id'] : null;\n\t\t$strAlertId = !empty($_REQUEST['alert_id']) ? $_REQUEST['alert_id'] : null;\n\t\t$strAlertMsg = !empty($_REQUEST['alert_msg']) ? $_REQUEST['alert_msg'] : null;\n\t\t$strTimeAlert = !empty($_REQUEST['time_alert']) ? $_REQUEST['time_alert'] : null;\n\t\t$strChangeId = !empty($_REQUEST['change_id']) ? $_REQUEST['change_id'] : null;\n \t$arrUser = array();\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n \tif(isset($iUserId)) {\n \t\t$arrUser = $this->contact_model->getUserById($iUserId);\n \t\tif(!empty($arrUser)) {\n\t \t\t$arrUser['mobile'] = str_replace($arrOrders, ', ', $arrUser['mobile']);\n\t \t\t$arrUser['mobile'] = str_replace($arrChildOrders, '', $arrUser['mobile']);\n\t \t$arrUser['mobile'] = explode(', ', $arrUser['mobile']);\n\t\t\t\t$this->call_service($arrUser, $strIncidentId, $strAlertId, $strAlertMsg, $strTimeAlert, $strChangeId);\n\t \t} else {\n\t\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\t\n\t\t\t}\n \t} else {\n \t\t$iUserId = 0;\n\t\t\t$this->loadview('error/error_no_found_user', array(), 'layout_popup');\n \t}\n }", "public function loadProfilePopup()\n {\n $this->error(false);\n\n $sM = $this->get('m');\n $sModule = $this->get('module');\n $sName = $this->get('name');\n $sMatchType = $this->get('match_type');\n $sMatchID = $this->get('match_id');\n $sMatchName = $this->get('match_name');\n\n $bIsRight = false;\n $sMatchTypeUserConvertToPages = $sMatchType;\n if ($sMatchType == 'user')\n {\n $bIsRight = true;\n $aUser = Phpfox::getService('user')->getByUserName($sMatchName);\n if (isset($aUser['user_id']) === true)\n {\n // check pages object\n if ((!isset($aUser['user_id'])) || (isset($aUser['user_id']) && $aUser['profile_page_id'] > 0))\n {\n if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n {\n $sMatchTypeUserConvertToPages = 'page';\n }\n } else\n {\n Phpfox::getBlock('profilepopup.user');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n } else\n {\n $bIsRight = false;\n\t\t\t\t\t\t\t\t$sMatchTypeUserConvertToPages = 'page';\n }\n }\n if ($sMatchType == 'page' || $sMatchTypeUserConvertToPages == 'page')\n {\n $bIsRight = true;\n\t\t\t\t\t\tif (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($sMatchName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$aPage = Phpfox::getService('pages')->getForView($sMatchID);\n if (!$aPage)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.pages');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'event')\n {\n $bIsRight = true;\n $aEvent = Phpfox::getService('event')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.event');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n if ($sMatchType == 'fevent')\n {\n $bIsRight = true;\n if (Phpfox::isModule('fevent'))\n {\n $aEvent = Phpfox::getService('fevent')->getEvent($sMatchID);\n if (!$aEvent)\n {\n $bIsRight = false;\n } else\n {\n Phpfox::getBlock('profilepopup.fevent');\n echo json_encode(array('content' => $this->getContent(false), 'msg' => \"success\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }\n }\n\n if ($bIsRight === false)\n {\n echo json_encode(array('content' => '', 'msg' => \"failure\", 'match_type' => $sMatchType, 'match_id' => $sMatchID, 'match_name' => $sMatchName));\n }\n }", "public function load_popup_sms() {\n \t$noUserId = $_REQUEST['userid'];\n\t\t$strIncidentId = @$_REQUEST['incident_id'];\n\t\t$strAlertId = @$_REQUEST['alert_id'];\n\t\t$strAlertMsg = @$_REQUEST['alert_msg'];\n\t\t$strTimeAlert = isset($_REQUEST['time_alert']) ? trim($_REQUEST['time_alert']) : null;\n\t\t$strSMSIdentifier = isset($_REQUEST['sms_identifier']) ? trim($_REQUEST['sms_identifier']) : null;\n\t\t$strChangeId = isset($_REQUEST['change_id']) ? trim($_REQUEST['change_id']) : null;\n \t$arrOrders = array('; ', ';', '/ ','/');\n \t$arrChildOrders = array('. ', '- ', '.', '-');\n\t\t$arrOneUser = array();\n\t\tif($noUserId != null) {\n\t\t\t$arrOneUser = $this->contact_model->getUserById($noUserId);\n\t\t\tif(!empty($arrOneUser)) {\n\t\t\t\t$arrOneUser['mobile'] = str_replace($arrOrders, ', ', $arrOneUser['mobile']);\n\t\t \t$arrOneUser['mobile'] = str_replace($arrChildOrders, '', $arrOneUser['mobile']);\n\t\t if(strpos($arrOneUser['mobile'], ',')!==false) {\n\t\t $arrOneUser['mobile'] = explode(', ', $arrOneUser['mobile']);\n\t\t } else {\n\t\t $arrOneUser['mobile'] = array($arrOneUser['mobile']);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$this->loadview('contact/popup_send_message', array('arrOneUser' => $arrOneUser, 'strIncidentId' => $strIncidentId, 'strAlertId' => $strAlertId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strAlertMsg' => $strAlertMsg, 'strTimeAlert' => $strTimeAlert, 'sms_identifier' => $strSMSIdentifier,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'strChangeId' => $strChangeId\n\t\t), 'layout_popup');\n\t}", "function eHealthServicePatient() {\n\n $userId = $this->value('userId');\n $ehs = $this->value('ehs');\n\n if ($this->value('confirm') == \"yes\") {\n if (is_numeric($this->value('ehs'))) {\n $query = \"UPDATE user SET ehs = '\" . $this->value('ehs') . \"' WHERE user_id = \" . $userId;\n $result = @mysql_query($query);\n }\n $this->output = \"<script language='javascript'> \n parent.parent.location.reload();\n //parent.parent.GB_hide();\n parent.parent.setTimeout('GB_CURRENT.hide()',1000); \n </script>\";\n return;\n }\n\n if ($ehs == 0) {\n $replace['message'] = \"By clicking E health service your service will become disable.<br /><br /><span style='padding-left:110px;'>Do you still want to disable?</span>\";\n } else {\n $replace['message'] = \"By clicking E health service your service will become enabled.<br /><br /><span style='padding-left:110px;'>Do you still want to enable?</span>\";\n }\n $replace['ehs'] = $this->value('ehs');\n $replace['userId'] = $this->value('userId');\n $replace['body'] = $this->build_template($this->get_template(\"ehealthservice\"), $replace);\n $replace['browser_title'] = \"Tx Xchange: Home\";\n $this->output = $this->build_template($this->get_template(\"main\"), $replace);\n }", "public function registerViewResume()\n\t {\n\t \tPhpfox::isUser(true);\n\t \t$this->setTitle(Phpfox::getPhrase('resume.view_resume'));\n\t\t$aAccount = Phpfox::getService(\"resume.account\")->getAccount();\n\t\tif($aAccount && $aAccount['view_resume']>=1)\n\t\t{\n\t\t\techo Phpfox::getPhrase('resume.your_request_has_been_sent_please_wait_approve_from_administrator');\t\n\t\t}\n\t\telse {\n\t\t\tPhpfox::getBlock('resume.register-view-popup');\t\n\t\t}\n\t }", "public function showUserChanger(array $data);", "function loadAdminEventHome() \n {\t\n\t \n\t // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if ($privManager->isBasicAdmin($this->EVENT_ID)==true)\t// check if privilege level is high enough\n { \n\t $links = array();\n\t \n\t $parameters = array();//[RAD_CALLBACK_PARAMS]\t \t \n\t \n\t $link = $this->getCallBack( modulecim_reg::PAGE_ADMINHOME, '', $parameters );\n\t\t $links[\"BackLink\"] = $link; \n\t \n\t if ($privManager->isEventAdmin($this->EVENT_ID)==true)\t// check if privilege level is high enough\n\t {\n\t\t \n\t\t\t\t\t/** Check if recalculation link was clicked **/\n\t\t\t\t\tif ($this->IS_RECALC == FinancialTools::RECALC_COMPLETE)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// run recalculation of balance owing\n\t\t\t\t\t\t$balanceSetter = new FinancialTools();\n\t\t \t\t\t$balanceSetter->recalculateBalances($this->EVENT_ID);\n\t\t \t\t\t$this->IS_RECALC = FinancialTools::RECALC_NOTNEEDED;\n\t\t \t\t\t\n\t\t \t\t\t$eventPriceRules = new RowManager_PriceRuleManager();\n\t\t\t\t\t $eventPriceRules->setEventID($this->EVENT_ID);\n\t\t\t\t\t $eventPriceRules->setPriceRuleType(RowManager_PriceRuleTypeManager::VOLUME_RULE);\n\t\t\t\t\t \n\t\t\t\t\t $ruleList = $eventPriceRules->getListIterator();\n\t\t\t\t\t $ruleArray = $ruleList->getDataList();\n\t\t\t\t\t \n\t\t\t\t\t $ruleIDs = array();\n\t\t\t\t\t reset($ruleArray);\t\t// cycle through volume rules\n\t\t\t\t\t foreach (array_keys($ruleArray) as $k)\n\t\t\t\t\t {\n\t\t\t\t\t\t $record = current($ruleArray);\t \n\t\t\t \t\n\t\t\t \t\t\t$activeRule = new RowManager_ActiveRuleManager($record['pricerules_id']); \n\t\t\t\t\t\t\t$setRecord = array();\n\t\t\t\t\t\t\t$setRecord['is_recalculated'] = RowManager_ActiveRuleManager::IS_TRUE;\n\t\t\t\t\t\t\t$activeRule->loadFromArray($setRecord); \n\t\t\t $activeRule->updateDBTable(); \t\t\n\t\t\t \n\t\t\t next($ruleArray);\n\t\t }\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t /** Check if a volume rule exists; if so, check if volume rule triggered ***/\n\t\t\t\t\t if ($this->triggerBalanceRecalculation($this->EVENT_ID) == true)\n\t\t\t\t\t {\t \n\t\t\t\t\t\t $this->IS_RECALC = FinancialTools::RECALC_NEEDED;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t}\t// end eventAdmin privilege check 1\n\t\t\t\t\n\n\t\t\t\t// Need to set campus-link so that summary table data can be created for download PDF link\n\t\t\t $parameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\t \n\t\t\t $campus_link = $this->getCallBack( modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS, '', $parameters );\n\t\t $campus_link .= \"&\". modulecim_reg::CAMPUS_ID . \"=\";\n\t\t \n\t\t\t $this->pageDisplay = new page_AdminEventHome( $this->moduleRootPath, $this->viewer, $this->EVENT_ID, $this->IS_RECALC, $campus_link ); \n\t \n\t \n\t // set the pageCallBack to be without any additional parameters\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_ADMINEVENTHOME, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack );\n\t \n\t \n\t \n\t if ($privManager->isSuperAdmin()==true)\t// check if privilege level is high enough\n\t {\n\t\t $parameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\t \t \n\t \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITFIELDTYPES, '', $parameters );\n\t\t $links[\"EditFieldTypes\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITPRICERULETYPES, '', $parameters );\n\t\t $links[\"EditPriceRuleTypes\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITCREDITCARDTYPES, '', $parameters );\n\t\t $links[\"EditCreditCardTypes\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITPRIVILEGETYPES, '', $parameters );\n\t\t $links[\"EditPrivilegeTypes\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_ADDSUPERADMIN, '', $parameters );\n\t\t $links[\"AddSuperAdmins\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITSTATUSES, '', $parameters );\n\t\t $links[\"EditStatusTypes\"] = $link; \n\t }\n\t \n// \t if ($privManager->isCampusAdmin($this->EVENT_ID,null)==true)\t// check if privilege level is high enough\n// \t { \t \n\n\t\t $links[\"CampusLink\"] = $campus_link; \n// \t } \n\t\n\t\t\t if ($privManager->isEventAdmin($this->EVENT_ID)==true)\t// check if privilege level is high enough\t \n\t\t\t { \n\t\t\t\t /**** NOTE: PDF generation TEMPORARILY disabled until PDF plugin added to production PHP environment ****/\n\t\t\t\t \n\n\t\t\t\t\t/** GENERATE PDF OF SUMMARY DATA **/\n\t\t\t\t\t$fileName = 'summary'.rand(1,MAX_TEMP_SEED).'.pdf';\n\t\t\t\t\t$filePath = getcwd().\"/Reports/\".$fileName;\t// change to '\\\\' for local use ?\n\t\t\t\t\t$linkPath = SITE_PATH_REPORTS.$fileName;\n\t\t\t\t\t$page_margin = 20;\n\t\t\t\t\t$column_widths = array();\n\t\t\t\t\t$column_widths[0]=0;\n\t\t\t\t\t$column_widths[1]=195;\t\t//campus\n\t\t\t\t\t$column_widths[2]=70;\t\t// link\n\t\t\t\t\t$column_widths[3]=35;\t\t// males total\n\t\t\t\t\t$column_widths[4]=50; \t\t// females total\n\t\t\t\t\t$column_widths[5]=30;\t\t// both genders total\n\t\t\t\t\t$column_widths[6]=70;\t\t// cancellations\n\t\t\t\t\t$column_widths[7]=55;\t\t// completed regs\n\t\t\t\t\t$column_widths[8]=55;\t\t// incomplete regs\n\t\t\t\t\t\n\t\t\t\t\t$table_pdf = new PDF_Template_Table($filePath, $page_margin, $column_widths, \"Registrations\");\n\t\t\t\t\t$table_pdf->generateTable();\t//(true,true);\n\n// \t\t\t\t $metaRegSummaryHeadings = $this->pageDisplay->getMetaSummaryHeadings();\n\t\t\t\t $metaRegSummaryData = $this->pageDisplay->getMetaSummaryData();\n\t\t\t\t $campusRegSummaryHeadings = $this->pageDisplay->getSummaryHeadings();\n\t\t\t\t $campusRegSummaryData = $this->pageDisplay->getSummaryData();\n// \t\t\t\t echo 'summary data = <pre>'.print_r($campusRegSummaryData,true).'</pre>';\n\t\n\t\t\t\t\t$table_pdf->fillTable($campusRegSummaryHeadings,$metaRegSummaryData, $campusRegSummaryData,true,true);\n\t\t\t\t\t\n\t\t\t\t\t/*** Add a pie chart of campus registrations **/\n\t\t\t\t\t$chart_pdf = new PDF_Template_Charts($table_pdf->getPDF());\n\t\t\t\t\t$event = new RowManager_EventManager($this->EVENT_ID);\n\t\t\t\t\t$title = 'Total Campus Registrations for '.$event->getEventName();\n\t\t\t\t\t$chart_width = 5;\t//PDF::PAGEWIDTH_LETTER*0.5;\n\t\t\t\t\t$chart_height = 5;\t//PDF::PAGEHEIGHT_LETTER*0.5; \t\n\t\t\t\t\t\n// \t\t\t\t\techo 'chart height/width = '.$chart_height.', '.$chart_height;\n\t\t\t\t\t\n\t\t\t\t\t$found_nonzero = false;\n\t\t\t\t\t$campus_totals = array();\n\t\t\t\t\treset($campusRegSummaryData);\n\t\t\t\t\tforeach (array_keys($campusRegSummaryData) as $key)\n\t\t\t\t\t{\n\t\t\t\t\t\t$record = current($campusRegSummaryData);\n\t\t\t\t\t\t$campus_totals[$key] = $record['campusTotal'];\n\t\t\t\t\t\tif ($record['campusTotal'] > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$found_nonzero = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnext($campusRegSummaryData);\n\t\t\t\t\t}\n// \t\t\t\t echo 'campus totals data = <pre>'.print_r($campus_totals,true).'</pre>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t// required to avoid divide-by-zero error when generating pie chart with no data\n\t\t\t\t if ($found_nonzero == true) {\n\t\t\t\t\t\t$chart_pdf->createPieChart($title, $chart_width, $chart_height, $campus_totals);\n\t\t\t\t\t}\n\t\t\t\t\t$table_pdf->Output();\n\t\n\t\t\t\t $link = $linkPath;\n\t\t\t\t $links[\"DownloadSummary\"] = $link;\n\t\t\t\t /** <END> PDF GENERATION **/\t\n\t\t\t\t \n\t\t\t\t $emailPageParameters = array('EVENT_ID'=>$this->EVENT_ID);//[RAD_CALLBACK_PARAMS] \n\t\t $email_link = $this->getCallBack( modulecim_reg::PAGE_EMAILCOMPOSER, '', $emailPageParameters ); \t \n\t\t $links[\"EmailRegistrants\"] = $email_link; \t \n \n\t\t\t\t \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EVENTDETAILS, '', $parameters );\n\t\t $links[\"EditEventDetails\"] = $link;\n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_ADDEVENTADMIN, '', $parameters );\n\t\t $links[\"AddEventAdmins\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_ADDCAMPUSADMIN, '', $parameters );\n\t\t $links[\"AddCampusAdmins\"] = $link; \n\t\t\n\t\t $this->IS_RECALC = FinancialTools::RECALC_COMPLETE;\n\t\t $recalcParams = array('IS_RECALC'=>$this->IS_RECALC, 'EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID);\n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_ADMINEVENTHOME, '', $recalcParams );\n\t\t $links[\"RecalculateBalances\"] = $link; \n\t\t \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITFORMFIELDS, '', $parameters );\n\t\t $links[\"EditEventFormFields\"] = $link; \n\t\t $link = $this->getCallBack( modulecim_reg::PAGE_EDITPRICERULES, '', $parameters );\n\t\t $links[\"EditEventPriceRules\"] = $link; \n\t\t \n\t\t \n\t\t /* Output the file to be downloaded */\n\t\t/* if (isset($this->DOWNLOAD_TYPE))\t//($_REQUEST[\"file\"]))\t//\t\t//if (isset($_REQUEST[\"file\"])) {\n\t\t {\t\n\t\t\t $fileDir = SITE_PATH_REPORTS;\n\t\t\t \n\t\t\t echo \"Data type = \".$this->DOWNLOAD_TYPE; \n\t\t\t switch($this->DOWNLOAD_TYPE)\n\t\t\t {\n\t\t\t\t case modulecim_reg::DOWNLOAD_EVENT_DATA: \n\t\t\t\t \t\t$fileName = $this->getSummaryData($this->EVENT_ID, 1);\t//$_REQUEST[\"file\"];\t\n\t\t\t\t \t\techo \"FILE NAME = \".$fileName;\t\t\t\t\t\n\t\t\t\t\t \t\t$file=$fileDir.$fileName;\n\t\t\t\t\t \t\t\n\t\t//\t\t\t \t\techo \"headers: <pre>\".print_r(headers_list(),true).\"</pre><br>\";\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t\t// TODO: move below code out of SWITCH\n\t\t\t\t\t \t\t header(\"Content-Location: \".$file);\n\t\t\t\t\t\t\t header(\"Content-type: text/comma-separated-values\");\n\t\t\t\t\t\t\t header(\"Content-Transfer-Encoding: Binary\");\n\t\t\t\t\t\t\t header(\"Content-length: \".filesize($file));\n\t\t\t\t\t\t\t header(\"Content-disposition: attachment; filename=\\\"\".basename($file).\"\\\"\");\n\t\t\t\t\t\t\t readfile(\"$file\");\n\t\t\t\t\t\t\t \n\t\t\n\t\t\t\t\t \t\tbreak;\n\t\t\t\t\t case modulecim_reg::DOWNLOAD_SCHOLARSHIP_DATA:\n\t\t/*\t\t \t\t$fileName = $this->getSummaryData($this->EVENT_ID, 1);\t//$_REQUEST[\"file\"];\t\n\t\t\t\t \t\techo \"FILE NAME = \".$fileName;\t\t\t\t\t\n\t\t\t\t\t \t\t$file=$fileDir.$fileName;\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t\t// TODO: move below code out of SWITCH\n\t\t\t\t\t\t\t header(\"Content-type: text/comma-separated-values\");\n\t\t\t\t\t\t\t header(\"Content-Transfer-Encoding: Binary\");\n\t\t\t\t\t\t\t header(\"Content-length: \".filesize($file));\n\t\t\t\t\t\t\t header(\"Content-disposition: attachment; filename=\\\"\".basename($file).\"\\\"\");\n\t\t\t\t\t\t\t readfile(\"$file\"); */\n\t\t/*\t\t\t \t\techo \"NOT YET IMPLEMENTED\";\n\t\t\t\t\t \t\tbreak;\n\t\t\t\t\t default:\n\t\t\t\t\t \t\tbreak;\n\t\t\t\t }\n\t\t\t\t unset($this->DOWNLOAD_TYPE);\n\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t echo \"No file selected\";\n\t\t\t\t\t} \n\t\t\t\t\t/** above code gratefully modified from code found at: \n\t\t\t\t\t\thttp://www.higherpass.com/php/tutorials/File-Download-Security/1/ **/\n\t\t\t\t\t\t \n\t\t \n\t\t //$this->DOWNLOAD_TYPE = modulecim_reg::DOWNLOAD_EVENT_DATA;\n\t\t //$fileDownloadParameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID, 'DOWNLOAD_TYPE'=>$this->DOWNLOAD_TYPE);//[RAD_CALLBACK_PARAMS] \n\t\t// $link2 = SITE_PATH_MODULES.'app_'.modulecim_reg::MODULE_KEY.'/objects_pages/'.modulecim_reg::CSV_DOWNLOAD_TOOL.'?'.modulecim_reg::EVENT_ID.'='.$this->EVENT_ID.'&'.modulecim_reg::DOWNLOAD_TYPE.'='.modulecim_reg::DOWNLOAD_EVENT_DATA;\t//$this->getCallBack( modulecim_reg::PAGE_ADMINEVENTHOME, '', $fileDownloadParameters );\n\t\t// $links[\"EventDataDump\"] = $link2; //Event Data Dump - for importing into Excel\n\t\t\n\t\t $this->DOWNLOAD_TYPE = modulecim_reg::DOWNLOAD_EVENT_DATA;\n\t\t $fileDownloadParameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID, 'DOWNLOAD_TYPE'=>$this->DOWNLOAD_TYPE);//[RAD_CALLBACK_PARAMS] \n\t\t $link2 = $this->getCallBack( modulecim_reg::PAGE_DOWNLOADREPORT, '', $fileDownloadParameters );\n\t\t $links[\"EventDataDump\"] = $link2; //Event Data Dump - for importing into Excel \n\t\t \n\t\t $this->DOWNLOAD_TYPE = modulecim_reg::DOWNLOAD_SCHOLARSHIP_DATA;\n\t\t $fileDownloadParameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID, 'DOWNLOAD_TYPE'=>$this->DOWNLOAD_TYPE);//[RAD_CALLBACK_PARAMS] \n\t\t $link3 = $this->getCallBack( modulecim_reg::PAGE_DOWNLOADREPORT, '', $fileDownloadParameters );\n\t\t $links[\"EventScholarshipList\"] = $link3; //Event Scholarship List - for importing into Excel\n \t}\t// end event-admin privilege check 2\n\t \n\t/*[RAD_LINK_INSERT]*/\n\t $this->pageDisplay->setLinks( $links );\n\t //$this->previous_page = modulecim_reg::PAGE_ADMINEVENTHOME; \n\t \t\t\n\n }\n else\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n\n\t \n \n }", "function loadReg_home() \n {\n // set the pageCallBack to be without any additional parameters\n // (an AdminBox needs this so Language Switching on a page doesn't\n // pass a previous operations)\n $parameters = array('VIEWER_ID'=>$this->VIEWER_ID);//[RAD_CALLBACK_PARAMS]\n $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_REG_HOME, $this->sortBy, $parameters);\n $this->setPageCallBack( $pageCallBack );\n \n // set flag for if the page is located inside the student registration process\n if ($this->IS_IN_REG_PROCESS == modulecim_reg::IS_SIGNUP) \n {\n\t $isInRegProcess = 'TRUE';\n// \t $this->IS_IN_REG_PROCESS == modulecim_reg::IS_FALSE;\t//reset flag\n }\n else \n {\n\t $isInRegProcess = 'FALSE';\n } \n \n \n\n\t\t\t// get person_id via viewer object (i.e. the logged-in user will be signed up for event)\n if ((!isset($this->PERSON_ID))||($this->PERSON_ID == ''))\n {\n\t $this->PERSON_ID = $this->getPersonIDfromViewerID();\n }\n \n // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n \n \n $this->pageDisplay = new page_Reg_home( $this->moduleRootPath, $this->viewer, $this->REG_ID, $this->EVENT_ID, $this->PERSON_ID, $isInRegProcess, $this->MINISTRY_ID ); \n $this->pageDisplay->isAdmin($privManager->isBasicAdmin());\n \n $links = array();\n \n if ($privManager->isBasicAdmin()==true)\t// check if privilege level is high enough\n {\n// \t $this->MINISTRY_ID = 2; /* TEST: AIA */\n\t $parameters = array( 'VIEWER_ID'=>$this->VIEWER_ID);//[RAD_CALLBACK_PARAMS]\n\t $link = $this->getCallBack( modulecim_reg::PAGE_ADMINHOME, '', $parameters );\t\t//\n\t $links[\"adminHome\"] = $link;\n }\n \n $parameters = array( 'MINISTRY_ID'=>$this->MINISTRY_ID, 'EVENT_ID'=>$this->EVENT_ID);//[RAD_CALLBACK_PARAMS_EDIT]\n $viewLink = $this->getCallBack( modulecim_reg::PAGE_VIEWEVENTDETAILS, $this->sortBy, $parameters );\n $viewLink .= \"&\". modulecim_reg::EVENT_ID . \"=\";\n $links[\"view\"] = $viewLink;\n\n \n $this->IS_IN_REG_PROCESS = modulecim_reg::IS_SIGNUP; \n $this->CAMPUS_ID = $this->getCampusIDfromViewerID();\n \n $parameters = array('MINISTRY_ID'=>$this->MINISTRY_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'IS_IN_REG_PROCESS'=>$this->IS_IN_REG_PROCESS, 'EVENT_ID'=>$this->EVENT_ID, 'PERSON_ID'=>$this->PERSON_ID); //[RAD_CALLBACK_PARAMS]\n $registerLink = $this->getCallBack(modulecim_reg::PAGE_EDITPERSONALINFO, $this->sortBy, $parameters ); \n $registerLink .= \"&\". modulecim_reg::EVENT_ID . \"=\";\n $links[\"register\"] = $registerLink; \n \n $links[\"complete\"] = $registerLink;\t// use registration link for 'complete registration' as well \n \n $links[\"edit_reg\"] = $registerLink;\t// use registration link for 'edit registration' as well \n \n // cancel registration link information\n// $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'PERSON_ID'=>$this->PERSON_ID); //[RAD_CALLBACK_PARAMS]\n// $cancelLink = $this->getCallBack(modulecim_reg::PAGE_CONFIRMCANCELREGISTRATION, $this->sortBy, $parameters ); \n// $cancelLink .= \"&\". modulecim_reg::EVENT_ID . \"=\";\n// $links[\"cancel\"] = $cancelLink; \n \n \n/*[RAD_LINK_INSERT]*/\n\n $this->pageDisplay->setLinks( $links ); \n //$this->previous_page = modulecim_reg::PAGE_REG_HOME; \n \n }", "public function uiView(Zikula_DisplayHook $hook)\n {\n // Input from the hook\n $callermodname = $hook->getCaller();\n $callerobjectid = $hook->getId();\n\n // Check permissions\n if (!SecurityUtil::checkPermission('Ephemerides::', \"::\", ACCESS_READ)) {\n return;\n }\n\n // Get items\n $items = ModUtil::apiFunc('Ephemerides', 'user', 'gettoday', $args);\n\n\n // create the output object\n $view = Zikula_View::getInstance('Ephemerides', false, null, true);\n $view->assign('areaid', $hook->getAreaId());\n $view->assign('items', $items);\n $template = 'ephemerides_user_display.tpl';\n\n // Add style\n PageUtil::addVar('stylesheet', 'modules/Ephemerides/style/style.css');\n\n $response = new Zikula_Response_DisplayHook('provider.ephemerides.ui_hooks.ephemeride', $view, $template);\n $hook->setResponse($response);\n }", "function <Application>_Display($CallBack, $ViewerID, $ViewerLanguageID, $ViewerAccessLv) {\n\t\t$this->callBack \t\t= $CallBack;\n\t\t$this->viewerID \t\t= $ViewerID;\n\t\t$this->viewerLanguageID = $ViewerLanguageID;\n\t\t$this->viewerAccessLv \t= $ViewerAccessLv;\n\t\t\n\t\tDisplayObject::DisplayObject();\n\t\t\n\t\t$this->pageTitle = 'Forgot to set the Title';\n\t\t$this->formAction = $CallBack;\n\t\t\n\t\t$this->isFormIncluded = true;\n\t\t\n\t\t$this->DB = new <Application>_DB();\n\t\t$this->isDBInitialized = false;\n\t\t\n\t}", "private function _RenderAsPopup()\n\t{\n\t\t$strObjectName = \"ProvisioningHistoryPopup\". ((DBO()->Service->Id->IsSet)? DBO()->Service->Id->Value : \"\");\n\t\t\n\t\t$this->_RenderFilterControls($strObjectName);\n\t\n\t\t// Render the History\n\t\t$strHistoryContainerDivId = \"HistoryContainerForPopup\". ((DBO()->Service->Id->IsSet)? DBO()->Service->Id->Value : \"\");\n\t\techo \"<div id='ContainerDiv_ScrollableDiv_History' style='border: solid 1px #606060; padding: 5px 5px 5px 5px'>\\n\";\n\t\techo \"<div id='ScrollableDiv_History' style='overflow:auto; height:410px; width:auto; padding: 0px 3px 0px 3px'>\\n\";\n\t\techo \"<div id='$strHistoryContainerDivId'>\\n\";\n\t\t$this->_RenderHistory($strObjectName);\n\t\techo \"</div>\\n\";\n\t\techo \"</div>\\n\"; //ScrollableDiv_History\n\t\techo \"</div>\\n\"; //ContainerDiv_ScrollableDiv_History\n\t\t\n\t\techo \"</div>\\n\"; // GroupedContent\n\t\t\n\t\techo \"<div class='ButtonContainer'><div class='Right'>\\n\";\n\t\t$this->Button(\"Close\", \"Vixen.Popup.Close(this);\");\n\t\techo \"</div></div>\\n\";\n\t\t\n\t\t// Initialise the javascript object\n\t\t$intAccountId\t\t= DBO()->Account->Id->Value;\n\t\t$intServiceId\t\t= (DBO()->Service->Id->Value) ? DBO()->Service->Id->Value : \"null\";\n\t\t$intCategoryFilter\t= DBO()->History->CategoryFilter->Value;\n\t\t$intTypeFilter\t\t= (DBO()->History->TypeFilter->Value) ? DBO()->History->TypeFilter->Value : \"null\";\n\t\t$intMaxItems\t\t= DBO()->History->MaxItems->Value;\n\t\t$strPopupId\t\t\t= $this->_objAjax->strId;\n\t\t$strJavascript\t= \"\tif (Vixen.$strObjectName == undefined)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tVixen.$strObjectName = new VixenProvisioningHistoryClass;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tVixen.$strObjectName.Initialise($intAccountId, $intServiceId, $intCategoryFilter, $intTypeFilter, $intMaxItems, '$strHistoryContainerDivId', false, '$strPopupId');\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t\n\t\techo \"<script type='text/javascript'>$strJavascript</script>\\n\";\n\t}", "function advinvsys_profile() {\r\n global $mybb, $db, $templates, $memprofile, $advinvsys_profile, $lang, $plugins, $AISDevelop;\r\n\r\n // verificam daca este activa aceasta functie\r\n if ($mybb->settings['advinvsys_setting_enable'] != 1) {\r\n $advinvsys_profile = '';\r\n return;\r\n }\r\n\r\n // se permite adaugarea unor alte portiuni de coduri\r\n $plugins->run_hooks('advinvsys_profile_start');\r\n\r\n // daca e activa atunci se afiseaza\r\n $lang->load('advinvsys');\r\n\r\n // cate invitatii are persoana de fata?\r\n $invitations = $AISDevelop->truncNumber($memprofile['invitations']);\r\n\r\n // informatii aditionale\r\n $extra = '';\r\n $extra1 = '';\r\n if ($mybb->settings['advinvsys_setting_showrefc'] == 1) {\r\n\r\n // care este uid-ul ei\r\n $uid = intval($memprofile['uid']);\r\n\r\n // se intoarce din baza de date numarul de persoane aduse pe forum\r\n $query = $db->write_query(\"SELECT COUNT(uid) AS number FROM \" . TABLE_PREFIX . \"users \r\n WHERE invitation_refer = '{$uid}'\");\r\n\r\n if ($row = $db->fetch_array($query)) {\r\n $count = intval($row['number']);\r\n eval(\"\\$extra .= \\\"\" . $templates->get('advinvsys_profile_extra') . \"\\\";\");\r\n }\r\n }\r\n\r\n // nu iti poti trimite singur invitatii\r\n // nici un vizitator nu iti poate trimite invitatii\r\n if ($mybb->user['uid'] && $memprofile['uid'] != $mybb->user['uid']) {\r\n $username = '&amp;usrn=' . $memprofile['username'];\r\n eval(\"\\$extra1 .= \\\"\" . $templates->get('advinvsys_profile_extra1') . \"\\\";\");\r\n }\r\n\r\n // se permite adaugarea unor alte portiuni de coduri\r\n $plugins->run_hooks('advinvsys_profile_end');\r\n\r\n // se afiseaza in profil informatiile legate de sistemul de invitatii\r\n eval(\"\\$advinvsys_profile = \\\"\" . $templates->get('advinvsys_profile') . \"\\\";\");\r\n}", "function addAssignedUserID($displayname, $varname) {\n global $app_strings;\n\n $json = getJSONobj();\n\n $popup_request_data = array(\n 'call_back_function' => 'set_return',\n 'form_name' => 'MassUpdate',\n 'field_to_name_array' => array(\n 'id' => 'assigned_user_id',\n 'user_name' => 'assigned_user_name',\n ),\n );\n $encoded_popup_request_data = $json->encode($popup_request_data);\n $qsUser = array('method' => 'get_user_array', // special method\n 'field_list' => array('user_name', 'id'),\n 'populate_list' => array('assigned_user_name', 'assigned_user_id'),\n 'conditions' => array(array('name' => 'user_name', 'op' => 'like_custom', 'end' => '%', 'value' => '')),\n 'limit' => '30', 'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']);\n\n $qsUser['populate_list'] = array('mass_assigned_user_name', 'mass_assigned_user_id');\n $html = <<<EOQ\n\t\t<td width=\"15%\" class=\"dataLabel\">$displayname</td>\n\t\t<td class=\"dataField\"><input class=\"sqsEnabled\" autocomplete=\"off\" id=\"mass_assigned_user_name\" name='assigned_user_name' type=\"text\" value=\"\"><input id='mass_assigned_user_id' name='assigned_user_id' type=\"hidden\" value=\"\" />\n\t\t<input title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1\n\t\t\t\tonclick='open_popup(\"Users\", 600, 400, \"\", true, false, $encoded_popup_request_data);' />\n\t\t</td>\nEOQ;\n $html .= '<script type=\"text/javascript\" language=\"javascript\">if(typeof sqs_objects == \\'undefined\\'){var sqs_objects = new Array;}sqs_objects[\\'mass_assigned_user_name\\'] = ' .\n $json->encode($qsUser) . '; registerSingleSmartInputListener(document.getElementById(\\'mass_assigned_user_name\\'));\n\t\t\t\taddToValidateBinaryDependency(\\'MassUpdate\\', \\'assigned_user_name\\', \\'alpha\\', false, \\'' . $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'] . '\\',\\'assigned_user_id\\');\n\t\t\t\t</script>';\n\n return $html;\n }", "public function callback() {\n\t\t// Check for admin auth except certain pathnames .. cant get it to work\n\t\t//$res=$this->HB->checkAdminAuth();\n\t\t//if(!$res['success']) die('Not Authorized. Please login first.');\n\n\t\t$api=API_URL;\n\n\t\t// send all report commands to HdtReport\n\t\tif(preg_match('/^report-(.*)$/', $_GET['action'])){\n\t\t\t$H = new \\HdtApp\\HdtReport();\n\t\t\t$H->onApiCall($_GET['action']);\n\t\t\tdie();\n\t\t}\n\n\t\tswitch( $_GET['action'] ){\n\n\n\n\t\t\tcase 'commportal':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\tif($_GET['clientID']){\n\t\t\t\t\techo \"<style>body{font-size:1.3em; line-height:1.4em;font-family:Arial;}</style>\";\n\t\t\t\t\t$btns=$H->clientID2Btns($_GET['clientID']);\n\t\t\t\t\tif(!$btns) die();\n\t\t\t\t\tforeach($btns as $btn){\n\t\t\t\t\t\techo \"<a href='$api?action=commportal&btn=$btn'>$btn</a><BR>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif( $_GET['btn'] )\n\t\t\t\t{\n\t\t\t\t\t$btn = (substr($_GET['btn'], 0, 1) == '1') ? substr($_GET['btn'], 1) : $_GET['btn'];\n\n\t\t\t\t\tinclude \"/opt/hdt-cdr/commportal-sso/CommPortal.php\";\n\t\t\t\t\t$cp=new CommPortal($btn); \t\t//0215\n\t\t\t\t\t$url=$cp->getPortalUrl();\n\t\t\t\t\theader(\"Location: $url\");\n\t\t\t\t\tdie();\n\t\t\t\t\t//echo \"<iframe src='$url' style='width:100%; height:100%;'></iframe>\";\n\t\t\t\t}\n\t\t\t\tdie();\n\t\n\t\t\tcase 'call-records':\t\t\t\t// forward user to view a customers complete call records list\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\tif($_GET['id']) $arg=['clientID'=>$_GET['id']];\n\t\t\t\telseif($_GET['invID']) $arg=['invoiceID'=>$_GET['invID']];\n\t\t\t\t$url = $H->getCallRecordsUrl($arg);\n\t\t\t\tif( $url[0] && $url[1]){ \n\t\t\t\t\theader(\"Location: \".$url[1]);\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($url[0]) $msg=\"Error 310 - Cannot get call records\";\n\t\t\t\telse $msg=\"Error 309 - \".$url[1];\n\t\t\t\t\n\t\t\t\techo $msg;\n\t\t\t\tdie();\n\n\n\t\t\tcase 'has-call-records':\t\t\t// check if client has BTNs (pass in either ?id=<clientID> or ?invID=<invoiceid>\n\t\t\t\tif(!$_GET['clientID']) die();\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\tif($H->clientHasCallRecords($_GET['clientID'])) echo 1;\n\t\t\t\telse echo 0;\n\t\t\t\tdie();\n\n\t\t\t\t\n\n\t\t\t// &x=1 to execute\n\t\t\tcase 'fix-invoice-dates':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\t$opts = [];\n\t\t\t\t$opts['execute'] = $_GET['x'];\n\t\t\t\t$opts['client_id'] = $_GET['client_id'];\n\t\t\t\t$opts['delete_last_invoice'] = $_GET['dli'];\n\t\t\t\t$res = $H->fixInvoiceDueDates($opts);\n\t\t\t\techo json_encode($res);\n\t\t\t\treturn;\n\n\t\t\tcase 'invoice-add-calls':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\t$res = $H->addCallCostsToInvoice( $_GET['id'] );\n\t\t\t\techo json_encode($res);\n\t\t\t\treturn;\n\t\t\t\n\n\t\n\t\t\tcase 'process-invoice':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\tif($_GET['id']=='all'){\n\t\t\t\t\t$page=$_GET['page'];\n\t\t\t\t\t$res = $H->processAll('unpaid', $page);\n\t\t\t\t}else\n\t\t\t\t\t$res = $H->processInvoice( $_GET['id'] );\n\t\t\t\techo json_encode($res);\n\t\t\t\treturn;\n\n\n\t\t\tcase 'reset-invoice':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\t$res= $H->resetInvoice( $_GET['id'] );\n\t\t\t\techo json_encode($res);\n\t\t\t\treturn;\n\n\n\t\t\tcase 'get-invoice-balance':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\t$res = $H->getClientBalance( $_GET['invoiceID'] );\n\t\t\t\t$res['hasCallRecords'] = $H->clientHasCallRecords($res['client_id']);\n\t\t\t\techo json_encode($res);\n\t\t\t\treturn;\n\t\t\t\t\n\n\t\t\tcase 'show-taxes':\n\t\t\t\t$H=new HdtInvoice();\n\t\t\t\t$H->displayTaxInfo();\t\n\t\t\t\treturn;\n\n\n\t\t\t// Sync a customerID to AuthNet CIM (expected var: &id=INT)\n\t\t\tcase 'sync-to-cim':\n\t\t\t\techo \"<pre>\";\n\t\t\t\t$clientID=$_GET['id'];\n\t\t\t\t$client = $this->HB->getClientDetails( ['id'=>$clientID] );\n\n\t\t\t\techo \"Syncing cust: \".$clientID.\" \".$client['client']['email'].\" \";\n\t\t\t\t$AUTH=new \\HdtApp\\HdtAuthNet();\n\t\t\t\t$res=$AUTH->syncCustomer($client['client']);\n\t\t\t\tif($res['result']){\n\t\t\t\t\techo \" SAVED.\";\n\t\t\t\t}else{\n\t\t\t\t\techo \" *** FAILED *** \\n\";\n\t\t\t\t\tvar_dump($res);\n\t\t\t\t}\n\t\t\t\tdie();\n\n\n\t\t\t// imports list of credit card numbers from external php file\n\t\t\tcase 'import-cc':\n\t\t\t\t$id=$_GET['id'];\n\t\t\t\tinclude 'cc.php';\n\t\t\t\tif(!$cc) die(\"no file found\");\n\n\t\t\t\tif(isset($id)){\n\t\t\t\t\tlist($clientID, $cc_num, $cc_mo, $cc_year) = $cc[$id];\n\t\t\t\t\t$res=$this->importCreditCard($clientID, $cc_num, $cc_mo, $cc_year);\n\t\t\t\t\tif($res['result']){\n\t\t\t\t\t\techo \"OK: $clientID : \".$res['cardType'] . \"\\n\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"$cid *** FAIL ***\\n\";\n\t\t\t\t\t\tvar_dump($res);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$nums=[36,50,113,153,166,172,178,181,195,201];\n\n\t\t\t\t\techo \"<pre>:\\n\";\n\t\t\t\t\tforeach($nums as $num){\n\t\t\t\t\t\t$idx=$num;\n\t\t\t\t\t\t$c=$cc[$idx];\n\t\t\t\t\t\techo \"$idx ::::::: \";\n\n\t\t\t\t\t\t$url=API_URL . \"?action=import-cc&id=$idx\";\n\t\t\t\t\t\t$ch = curl_init();\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_URL,$url);\n\t\t\t\t\t\tcurl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t\t\t\t\tcurl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\t\t\t\t\t$result=curl_exec($ch);\n\t\t\t\t\t\techo $result.\"\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tdie();\n\n\n\t\t\tcase 'api-methods':\n\t\t\t\techo \"<pre>\";\n\t\t\t\t$res=$this->HB->getAPIMethods();\n\t\t\t\tvar_dump($res);\n\t\t\t\tdie();\n\n\n\t\t\tcase 'test':\n\t\t\t\techo \"<pre>\";\n\t\t\t\t$res=$this->HB->getOrderDetails(['id'=>668]);\n\t\t\t\tvar_dump($res);\n\t\t\t\tdie();\n\n\t\t}// switch\n\t}", "public function setApproveWhoView()\n\t{\n\t\t$iId = $this->get('id');\n\t\t$aAccount = Phpfox::getService('resume.account')->getAccountById($iId);\n\t\t\n\t\t$sStatus = $this->get('status');\n\t\t\n\t\t$oSetting = Phpfox::getService(\"resume.setting\");\n\t\t\n\t\t// Get global setting\n\t\t$iWhoViewedMMeGroupId = (int) $oSetting->getUserGroupId($aAccount['user_id'],1);\n\t\t\t\t\n\t\t$iViewAllResumeGroupId = (int) $oSetting->getUserGroupId($aAccount['user_id'],2);\n\t\t\n\t\t$user_group_id = $iViewAllResumeGroupId;\n\t\t\n\t\tif($sStatus == 'yes')\n\t\t{\n\t\t\t// Set approve\n\t\t\tPhpfox::getService(\"resume.account.process\")->updateApprove($aAccount['account_id'],\"is_employee\",1);\n\n\t\t\t$user_group_id = $iWhoViewedMMeGroupId;\n\t\t\t\n\t\t\tPhpfox::getService(\"resume.account\")->updateUserGroup($aAccount['user_id'],$user_group_id);\n\t\t\t\n\t\t\t//Add Notification\n\t\t\tPhpfox::getService('notification.process')->add('resume_whoview_approve', $aAccount['account_id'], $aAccount['user_id']);\n\t\t\t\n\t\t\t$this->call(\"$(\\\"#resume_view_{$iId}\\\").find(\\\".type_2\\\").find(\\\".yes_button\\\").show();\");\n\t\t\t$this->call(\"$(\\\"#resume_view_{$iId}\\\").find(\\\".type_2\\\").find(\\\".no_button\\\").hide();\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\t// Set approve\n\t\t\tPhpfox::getService(\"resume.account.process\")->updateApprove($aAccount['account_id'],\"is_employee\",0);\n\n\t\t\t$user_group_id = 2;\n\t\t\tPhpfox::getService(\"resume.account\")->updateUserGroup($aAccount['user_id'],$user_group_id);\n\t\t\t\n\t\t\t\n\t\t\t//Add Notification\n\t\t\tPhpfox::getService('notification.process')->add('resume_whoview_unapprove', $aAccount['account_id'], $aAccount['user_id']);\n\t\t\t\n\t\t\t$this->call(\"$(\\\"#resume_view_{$iId}\\\").find(\\\".type_2\\\").find(\\\".yes_button\\\").hide();\");\n\t\t\t$this->call(\"$(\\\"#resume_view_{$iId}\\\").find(\\\".type_2\\\").find(\\\".no_button\\\").show();\");\n\t\t}\n\t}", "protected function invoke()\n {\n //patched by jixian for fix ajax post data\n if (isset($_POST['__url']))\n {\n $getUrl = parse_url($_POST['__url']);\n $query = $getUrl['query'];\n $parameter = explode('&', $query);\n foreach ($parameter as $param)\n {\n $data = explode('=', $param);\n $name = $data[0];\n $value = $data[1];\n $_GET[$name] = $value;\n }\n }\n\n // get invocation type\n $invocationType = (isset($_REQUEST['F']) ? $_REQUEST['F'] : \"\");\n\n if ($invocationType == '') // is invocation?\n return;\n\n // check is valid invocation?\n if ($invocationType != \"RPCInvoke\" && $invocationType != \"Invoke\")\n {\n trigger_error(\"$invocationType is not a valid invocation\", E_USER_ERROR);\n return;\n }\n\n // read parameters\n $arg_list = array();\n $i = 0;\n\n eval(\"\\$P$i = (isset(\\$_REQUEST['P$i']) ? \\$_REQUEST['P$i']:'');\");\n $Ptmp = \"P\" . $i;\n \n eval(\"\\$P$i = (isset(\\$_REQUEST['P$i']) ? \\$_REQUEST['P$i']:'');\");\n \n\n\n if (strstr($P0, Popup_Suffix)) // _popupx_?\n {\n $name_len = strlen($P0);\n $suffix_len = strlen(Popup_Suffix);\n $P0 = substr($P0, 0, $name_len - $suffix_len - 1) . \"]\";\n }\n\n while ($$Ptmp != \"\")\n {\n $parm = $$Ptmp;\n $parm = substr($parm, 1, strlen($parm) - 2);\n $arg_list[] = $parm;\n $i++;\n eval(\"\\$P$i = (isset(\\$_REQUEST['P$i']) ? \\$_REQUEST['P$i']:'');\");\n $Ptmp = \"P\" . $i;\n }\n\n if ($invocationType == \"RPCInvoke\")\n BizSystem::clientProxy()->setRPCFlag(true);\n\n // invoke the function\n $num_arg = count($arg_list);\n if ($num_arg < 2)\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_RPCARG\", array($class));\n trigger_error($errmsg, E_USER_ERROR);\n } else\n {\n $objName = array_shift($arg_list);\n $methodName = array_shift($arg_list);\n\n $obj = BizSystem::getObject($objName);\n\n if ($obj)\n {\n if (method_exists($obj, $methodName))\n {\n if (!$this->validateRequest($obj, $methodName))\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_REQUEST_REJECT\", array($obj->m_Name, $methodName));\n trigger_error($errmsg, E_USER_ERROR);\n }\n switch (count($arg_list))\n {\n case 0: $rt_val = $obj->$methodName();\n break;\n case 1: $rt_val = $obj->$methodName($arg_list[0]);\n break;\n case 2: $rt_val = $obj->$methodName($arg_list[0], $arg_list[1]);\n break;\n case 3: $rt_val = $obj->$methodName($arg_list[0], $arg_list[1], $arg_list[2]);\n break;\n default: $rt_val = call_user_func_array(array($obj, $methodName), $arg_list);\n }\n } else\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_METHODNOTFOUND\", array($objName, $methodName));\n trigger_error($errmsg, E_USER_ERROR);\n }\n } else\n {\n $errmsg = BizSystem::getMessage(\"SYS_ERROR_CLASSNOTFOUND\", array($objName));\n trigger_error($errmsg, E_USER_ERROR);\n }\n\n if ($invocationType == \"Invoke\") // no RPC invoke, page reloaded -> rerender view\n {\n if (BizSystem::clientProxy()->hasOutput())\n BizSystem::clientProxy()->printOutput();\n }\n else if ($invocationType == \"RPCInvoke\") // RPC invoke\n {\n if (BizSystem::clientProxy()->hasOutput())\n {\n if ($_REQUEST['jsrs'] == 1)\n echo \"<html><body><form name=\\\"jsrs_Form\\\"><textarea name=\\\"jsrs_Payload\\\" id=\\\"jsrs_Payload\\\">\";\n BizSystem::clientProxy()->printOutput();\n if ($_REQUEST['jsrs'] == 1)\n echo \"</textarea></form></body></html>\";\n }\n else\n return $rt_val;\n }\n }\n }", "public function onLoadCallback()\n {\n if (!\\Input::get('dcawizard') || 'edit' !== \\Input::get('act')) {\n return;\n }\n\n if (version_compare(VERSION, '4.0', '>')) {\n $session = \\System::getContainer()->get('session')->getBag('contao_backend')->get('popupReferer');\n } else {\n $session = \\Session::getInstance()->get('popupReferer');\n }\n\n if (!is_array($session)) {\n return;\n }\n\n list($table, $id) = explode(':', \\Input::get('dcawizard'));\n\n // Use the current URL without (act and id parameters) as referefer\n $url = \\Haste\\Util\\Url::removeQueryString(['act', 'id'], \\Environment::get('request'));\n $url = \\Haste\\Util\\Url::addQueryString('id=' . $id, $url);\n\n // Replace the last referer value with the correct link\n end($session);\n $session[key($session)]['current'] = $url;\n\n \\Session::getInstance()->set('popupReferer', $session);\n }", "function MyProfile_user_view()\r\n{\r\n \treturn MyProfile_user_display();\r\n}", "function load_login_popup()\n\t{\n\t\t$data['gpAuthUrl'] = $this->input->post('gpAuthUrl');\n\t\t$data['fbLoginUrl'] = $this->input->post('fbLoginUrl');\n\n\t\t$load_login_view = $this->load->view('login_view', $data, TRUE);\n\t\techo $load_login_view;\n\t}", "function load_free_visa_popup($is_mobile, $show_icon_deal = false){\r\n\r\n\t$view_data['free_visa_content'] = load_view('common/visa/free_visa_content', array(), $is_mobile);\r\n\t\r\n\t$view_data['show_icon_deal'] = $show_icon_deal;\r\n\r\n\t$popup_free_visa = load_view('common/visa/popup_free_visa', $view_data, $is_mobile);\r\n\r\n\treturn $popup_free_visa;\r\n}", "function view_list_for_user($handle,$limit,$op_sa,$user,$lv,$location)\n{\n\nif(!empty($limit)){\n\t// significa que esta cambiano vista de usuarios\n\t$handle->query(\"UPDATE paging_settings SET views='$limit' WHERE id_user='$user'\");\n\techo \"<script>\t\n\t\twindow.location.replace('users.php');\n\t\t</script>\";\n}\n\nglobal $num_reg; // contiene el numero de registros a mostrar para este usuario\nglobal $v_branch; // contiene la sucursal a mostrar solo para el super admin\n// recuperamos la paginacion del usuario si este no establecio un parametro se obtendra el parametro del sistema\n$pagin=$handle->query(\"SELECT * FROM paging_settings WHERE id_user='$user'\");\n$re=$pagin->fetch_assoc();\n$num_reg=$re[\"views\"];\n$v_branch=$re[\"nam_loc\"];\t\n$v_branch=$location;\t\t\n\n}", "function showLoad($tabledefid,$userid,$securitywhere){\r\n\r\n $uuid = getUuid($this->db, \"tbld:5c9d645f-26ab-5003-b98e-89e9049f8ac3\", $tabledefid);\r\n\r\n $querystatement = \"\r\n SELECT\r\n id,\r\n name,\r\n userid\r\n FROM\r\n usersearches\r\n WHERE\r\n tabledefid = '\".$uuid.\"'\r\n AND type='SCH'\r\n AND (\r\n (userid = '' \".$securitywhere.\")\r\n OR userid = '\".$userid.\"')\r\n ORDER BY\r\n userid,\r\n name\";\r\n\r\n $queryresult = $this->db->query($querystatement);\r\n\r\n if(!$queryresult)\r\n $error = new appError(500,\"Cannot retrieve saved search information\");\r\n\r\n $querystatement=\"\r\n SELECT\r\n advsearchroleid\r\n FROM\r\n tabledefs\r\n WHERE id= '\".$tabledefid.\"'\";\r\n\r\n $tabledefresult = $this->db->query($querystatement);\r\n\r\n if(!$tabledefresult)\r\n $error = new appError(500,\"Cannot retrieve table definition information.\");\r\n\r\n $tableinfo=$this->db->fetchArray($tabledefresult);\r\n\r\n ?>\r\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr>\r\n <td valign=\"top\">\r\n <p>\r\n <label for=\"LSList\">saved searches</label><br />\r\n <?php $this->showSavedSearchList($queryresult)?>\r\n </p>\r\n </td>\r\n <td valign=\"top\" width=\"100%\">\r\n <p>\r\n <label for=\"LSSelectedSearch\">name</label><br />\r\n <input type=\"text\" id=\"LSSelectedSearch\" size=\"10\" readonly=\"readonly\" class=\"uneditable\" />\r\n </p>\r\n <p>\r\n <textarea id=\"LSSQL\" name=\"LSSQL\" rows=\"8\" cols=\"10\" <?php if(!hasRights($tableinfo[\"advsearchroleid\"])) echo ' readonly=\"readonly\"'?>></textarea>\r\n </p>\r\n </td>\r\n <td valign=\"top\">\r\n <p><br/><input id=\"LSLoad\" type=\"submit\" name=\"command\" class=\"Buttons\" disabled=\"disabled\" value=\"run search\"/></p>\r\n <p><input id=\"LSDelete\" type=\"button\" onclick=\"LSDeleteSearch('<?php echo APP_PATH ?>')\" class=\"Buttons\" disabled=\"disabled\" value=\"delete\"/></p>\r\n <div id=\"LSResults\">&nbsp;</div>\r\n </td>\r\n </tr>\r\n </table>\r\n <?php\r\n\r\n }", "final public function execute(){\n\t\t$this->addJavascript(\"/static/selection/selection_utils.js\");\n\t\ttheme::css($this, \"selection.css\");\n\t\t$id = PNApplication::$instance->components[\"selection\"]->getCampaignId();\n\t\t$can_access_selection_data = PNApplication::$instance->components[\"user_management\"]->hasRight(\"can_access_selection_data\",true);\n\t\t/* Check the user is allowed to read the selection data */\n\t\tif(!$can_access_selection_data) echo \"<div style='padding:5px'><div class='error_box'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> You are not allowed to access to the selection data</div></div>\";\n\t\telse{\n\t\t\tif($id <> null) {\n\t\t\t\tif (PNApplication::$instance->selection->getOneConfigAttributeValue(\"generate_applicant_id\"))\n\t\t\t\t\t$this->onload(\"window.top._applicant_id_padding=\".PNApplication::$instance->selection->getOneConfigAttributeValue(\"number_of_applicant_id_digits\").\";\");\n\t\t\t\t$this->executeSelectionPage();\n\t\t\t} else {\n\t\t\t\t$campaigns = SQLQuery::create()->select(\"SelectionCampaign\")->execute();\n\t\t\t\tif (count($campaigns) == 0) {\n\t\t\t\t\tif (PNApplication::$instance->user_management->hasRight(\"manage_selection_campaign\")) {\n\t\t\t\t\t?>\n\t\t\t\t\t<div style=\"margin:10px\">\n\t\t\t\t\t<button class='action' onclick=\"getIFrameWindow(findFrame('pn_application_frame')).createCampaign();return false;\">Create a first selection campaign</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\t} else\n\t\t\t\t\t\techo \"<div style='padding:5px'><div class='info_box'><img src='\".theme::$icons_16[\"info\"].\"' style='vertical-align:bottom'/> There is no selection campaign yet</div></div>\"; \n\t\t\t\t} else {\n\t\t\t\t\ttheme::css($this, \"section.css\");\n\t\t\t\t\t?>\n\t\t\t\t\t<div style='width:100%;height:100%;overflow:auto'>\n\t\t\t\t\t\t<div style='min-height:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;'>\n\t\t\t\t\t\t\t<div class='section' style='background-color:white;border:1px solid #A0A0A0;margin:5px;'>\n\t\t\t\t\t\t\t\t<div style='padding:5px;'>\n\t\t\t\t\t\t\t\t\t<div style='font-weight:bold'>\n\t\t\t\t\t\t\t\t\t\t<img src='<?php echo theme::$icons_16[\"question\"];?>' style='vertical-align:bottom'/>\n\t\t\t\t\t\t\t\t\t\tPlease select a selection campaign:\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<ul style='margin-top:5px'>\n\t\t\t\t\t\t\t\t\t\t<?php foreach($campaigns as $c) {\n\t\t\t\t\t\t\t\t\t\t\techo \"<li><a class='black_link' href='#' onclick=\\\"getIFrameWindow(findFrame('pn_application_frame')).changeCampaign(\".$c[\"id\"].\");return false;\\\">\".toHTML($c[\"name\"]).\"</a></li>\";\n\t\t\t\t\t\t\t\t\t\t}?>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php if (PNApplication::$instance->user_management->hasRight(\"manage_selection_campaign\")) { ?>\n\t\t\t\t\t\t\t\t<div class='footer'>\n\t\t\t\t\t\t\t\tOr <button class='action green' onclick=\"getIFrameWindow(findFrame('pn_application_frame')).createCampaign();return false;\">Create a new campaign</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function refresh_user_details($id)\n{\n}", "public function action(){\r\n\t// get the listener user_id\r\n\t$listenerArr = userDB::getCore()->select('users', \"user_name like '\".$this->_listener_id.\"'\");\r\n\tif ( $listenerArr && is_array($listenerArr) && ($listenerArr['room_id'] == $this->_user->room_id) ) { \r\n\t $listener_id = $listenerArr['user_id'];\r\n\t // insert into dialogs table\r\n\t $activityArr=array();\r\n $activityArr['teller_id']=$this->_user->user_id;\r\n $activityArr['room_id']= $this->_user->room_id; \r\n $activityArr['comment']=$this->_user->name.' tell '.$listenerArr['user_name'].': '.$this->_dialog; \t\r\n\t $activityArr['command']='tell';\r\n\t $activityArr['dialog']=$this->_dialog;\r\n\t $activityArr['listener_id']=$listener_id;\r\n\t $activityArr['time']=time();\r\n \t $added = userDB::getCore()->insert('dialogs',$activityArr);\t\r\n\t unset($activityArr); \r\n\t return true;\r\n\t} else { \r\n\t return false;\r\n\t} \r\n\r\n }", "public function hookDisplayTop($params)\r\r\n\t{\r\r\n\t\t$ageValid = $this->checkAge();\r\r\n\t\tif (Tools::usingSecureMode())\r\r\n\t\t\t$domain = Tools::getShopDomainSsl(true);\r\r\n\t\telse\r\r\n\t\t\t$domain = Tools::getShopDomain(true);\r\r\n\r\r\n\t\t$this->context->smarty->assign(array(\r\r\n\t\t\t\t'ageValid' => $ageValid,\r\r\n\t\t\t\t'token' => Tools::getToken(false), //token needed for validation\r\r\n\t\t\t\t'basis' => $domain.__PS_BASE_URI__,\r\r\n\t\t\t\t'currentpath' => $this->_path,\r\r\n\t\t\t\t'backURL' => Configuration::get($this->name.'_url')\r\r\n\t\t\t));\r\r\n\t\t\t\r\r\n\t\tif(_PS_VERSION_ >= 1.5 )\r\r\n\t\t{\r\r\n\t\t\t$this->context->controller->addjqueryPlugin('fancybox');\r\r\n\t\t\t$this->context->controller->addCSS(_PS_JS_DIR_.'jquery/plugins/fancybox/jquery.fancybox.css', 'all');\r\r\n\t\t\t$this->context->controller->addCSS(($this->_path).'views/css/design.css', 'all');\r\r\n\t\t\t//switch config option\r\r\n\t\t\tswitch ( Configuration::get($this->name.'_option') )\r\r\n\t\t\t{\r\r\n\t\t\t\tcase 0: return $this->display( __FILE__, 'views/templates/front/ageverifyer.tpl' ); break;\r\r\n\t\t\t\tcase 1: return $this->display( __FILE__, 'views/templates/front/ageverifyer_light.tpl' ); break;\r\r\n\t\t\t\tdefault: return $this->display( __FILE__, 'views/templates/front/ageverifyer.tpl' ); break;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse // old PS 1.4\r\r\n\t\t{\r\r\n\t\t\tTools::addJS(_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js');\t\r\r\n\t\t\tTools::addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'all');\r\r\n\t\t\tTools::addCSS(($this->_path).'views/css/design.css', 'all');\r\r\n\t\t\t\r\r\n\t\t\t//switch config option\r\r\n\t\t\tswitch ( Configuration::get($this->name.'_option') )\r\r\n\t\t\t{\r\r\n\t\t\t\tcase 0: return $this->display( __FILE__, 'views/templates/front/ageverifyer14.tpl' ); break;\r\r\n\t\t\t\tcase 1: return $this->display( __FILE__, 'views/templates/front/ageverifyer_light14.tpl' ); break;\r\r\n\t\t\t\tdefault: return $this->display( __FILE__, 'views/templates/front/ageverifyer14.tpl' ); break;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t}", "private function showContactEngine()\n\t{\n\t\t\n\t\tsymCalling($this->jprofile_result,$this->loginData,$this->contact_status_new,\"\",$this->spammer,$this->filter_prof,$this->contact_limit_reached,$this->SAMEGENDER,$this->contact_limit_message,$this->smarty);\n\t}", "function viewapprovetimeoffapproval($user_id=1,$org_id=10,$employeetimeoffid=1,$approverresult=0)\n\t{\n\t\t\n\t\ttry{\n\n\n\t\t\t$ptoff=$this->Leaveapproval_model->getpreviousTimeOffApprovalSts($user_id,$org_id,$employeetimeoffid);\n\t\t\t$gtos=$this->Leaveapproval_model->getTimeOffApprovalSts($employeetimeoffid);\n\t\t\t\n\t\t\t$arr = array('uid'=> $user_id, 'orgid' => $org_id, 'timeoffid' => $employeetimeoffid, 'approverresult' => $approverresult , 'ptoff' => $ptoff, 'gtos'=>$gtos);\n\t\t\t// $this->view->userid = $arr[0] = $user_id;\n\t\t\t// // $user_id = \n\t\t\t// $this->view->org_id = $arr[1] = $org_id;\n\t\t\t// $this->view->employeetimeoffid = $arr[2] = $employeetimeoffid;\n\t\t\t// $this->view->approverresult = $arr[3] = $approverresult;\n\t\t\t// $arr[4] = \"\";\n\t\t\t// $arr[5] = \"\";\n\t\t\t// $dept = $this->loadModel('Leaveapproval');\n\t\t\t\n\t\t\t\n\t\t\t//$this->view->appSts = true;\n\t\t\t$this->load->view('leave/timeoff/approvetimeoffbymail',$arr);\n\t\t\n\t\t\t//echo json_encode($deptarray);\t\n\t\t\t//echo $deptarray['successMsg'];\n\t\t\t//echo \"<h3>\" .$deptarray['successMsg']. \"</h3>\";\n\t\t}catch(Exception $e){\n\t\t\tTrace($e->getMessage());\n\t\t}\n\t}", "function viewDataLink( $popUp = false, $tableid = null, &$row, $key = '', $val = '' )\r\n {\r\n global $Itemid;\r\n if ($this->_outPutFormat == 'json' || $this->_outPutFormat == 'raw' || $this->getPostMethod() == 'ajax') {\r\n return '#';\r\n }\r\n\r\n $action = ($this->_admin) ? \"task\" : \"view\";\r\n $url = \"index.php?option=com_fabrik&\";\r\n //$bits[] = \"action=$action\";\r\n\r\n if (is_null($tableid)) {\r\n $table = $this->getTable();\r\n $tableid = $table->id;\r\n }\r\n $facetTabel = $this->_facetedTable( $tableid );\r\n if (!$facetTabel->canView()) {\r\n return '<div style=\"text-align:center\"><a title=\"'.JText::_('Insufficient access rights. Please login').'\"><img src=\"media/com_fabrik/images/login.png\" alt=\"'.JText::_('iInsufficient access rights. Please login').'\" /></a></div>';\r\n }\r\n if ($this->_admin){\r\n $bits[] = \"c=table\";\r\n $bits[] = \"task=viewTable\";\r\n $bits[] = \"cid=$tableid\";\r\n } else {\r\n $bits[] = \"Itemid=$Itemid\";\r\n $bits[] = \"view=table\";\r\n $bits[] = \"tableid=$tableid\";\r\n }\r\n\r\n if ($key != '') {\r\n //$bits[] = \"{$key}[value]=$val\";\r\n $bits[] = \"{$key}=$val\";\r\n }\r\n if (!is_null($row)) {\r\n $bits[] = \"fabrik_cursor={$row->_cursor}\";\r\n $bits[] = \"fabrik_total={$row->_total}\";\r\n }\r\n $bits[] = 'limitstart=0';\r\n\r\n if ($popUp) {\r\n $bits[] = \"tmpl=component\";\r\n }\r\n $url .= implode(\"&\", $bits);\r\n $url = JRoute::_($url);\r\n\r\n if ($popUp) {\r\n FabrikHelperHTML::mocha( 'a.popupwin' );\r\n $url = '<a rel=\"{\\'maximizable\\':true,\\'title\\':\\''.JText::_('VIEW').'\\'}\" href=\"'. $url.'\" class=\"popupwin\">'. JText::_('VIEW') .'</a>';\r\n } else {\r\n $url = \"<a href=\\\"$url\\\">\" . JText::_('VIEW'). \"</a>\";\r\n }\r\n return $url;\r\n }", "function getAlert($db)\n{\n global $arrUserInfo;\n global $_SESSION;\n global $strKriteriaCompany;\n scopeData(\n $strDataEmployee,\n $strDataSubSection,\n $strDataSection,\n $strDataDepartment,\n $strDataDivision,\n $_SESSION['sessionUserRole'],\n $arrUserInfo\n );\n $strClass = \"bgNewRevised\";\n $strResult = \"<table width=100 border=0 cellspacing=0 cellpadding=1>\\n\";\n // cek apakah ada perubahan data PEGAWAI ---\n $strLink = \"javascript:goAlert('employee_search.php')\";\n if ($_SESSION['sessionUserRole'] == ROLE_ADMIN || $_SESSION['sessionUserRole'] == ROLE_SUPER) { //. cek apakah ada yang flagnya 1/3\n $strLink = \"javascript:goAlert('employee_temporary_list.php',1)\";\n $strSQL = \"SELECT count(id) AS total FROM hrd_employee_temporary WHERE status = \" . REQUEST_STATUS_NEW;\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Modified employee data : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n if ($_SESSION['sessionUserRole'] == ROLE_ADMIN) { //. cek apakah ada yang flagnya 1\n $strLink = \"javascript:goAlert('employee_search.php',2)\";\n $strSQL = \"SELECT count(id) AS total FROM hrd_employee WHERE flag=2 \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Employee data need approval : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n //------ END of Employee\n // ---- cek informasi data ABSENCE -------\n $strLink = \"javascript:goAlert('absence_list.php')\";\n if ($_SESSION['sessionUserRole'] >= ROLE_ADMIN) {\n // cek yang statusnya udah baru\n $strLink = \"javascript:goAlert('absence_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(t0.id) AS total FROM hrd_absence as t0 LEFT JOIN hrd_employee as t1 ON t0.id_employee = t1.id\n WHERE status = \" . REQUEST_STATUS_NEW . \" \" . $strKriteriaCompany;\n if ($strDataDivision != \"\") {\n $strSQL .= \"AND division_code = '$strDataDivision' \";\n }\n if ($strDataDepartment != \"\") {\n $strSQL .= \"AND department_code = '$strDataDepartment' \";\n }\n if ($strDataSection != \"\") {\n $strSQL .= \"AND section_code = '$strDataSection' \";\n }\n if ($strDataSubSection != \"\") {\n $strSQL .= \"AND sub_section_code = '$strDataSubSection' \";\n }\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Absence Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n if ($_SESSION['sessionUserRole'] == ROLE_SUPER) {\n // cek yang statusnya udah checked\n $strLink = \"javascript:goAlert('absence_list.php',\" . REQUEST_STATUS_CHECKED . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_absence WHERE status = \" . REQUEST_STATUS_CHECKED . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Absence Request Need Approval : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n } elseif ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR) {\n // cari request baru yang ada di bawah departmentnnya\n // cek yang statusnya udah new\n $strLink = \"javascript:goAlert('absence_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(t1.id) AS total FROM hrd_absence AS t1 \";\n $strSQL .= \"LEFT JOIN hrd_employee AS t2 ON t1.id_employee = t2.id \";\n $strSQL .= \"WHERE t1.status = \" . REQUEST_STATUS_NEW . \" \";\n $strSQL .= \"AND (t2.department_code = '\" . $arrUserInfo['department_code'] . \"' \";\n $strSQL .= \"OR t2.division_code = '\" . $arrUserInfo['division_code'] . \"' \";\n $strSQL .= \"OR t2.section_code = '\" . $arrUserInfo['section_code'] . \"' ) \";\n $strSQL .= \"AND t1.id_employee <> '\" . $arrUserInfo['id_employee'] . \"' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Absence Request (Need Approval) : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n // ---- END of Absence\n // ---- cek informasi data LEAVE\n $strLink = \"javascript:goAlert('leave_list.php')\";\n if ($_SESSION['sessionUserRole'] >= ROLE_ADMIN) {\n // cek yang statusnya udah baru\n $strLink = \"javascript:goAlert('leave_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(t1.id) AS total FROM hrd_absence_detail AS t1 \";\n $strSQL .= \"LEFT JOIN hrd_absence_type AS t2 ON t1.absence_type = t2.code \";\n $strSQL .= \"LEFT JOIN hrd_absence AS t3 ON t1.id_absence = t3.id WHERE status = \" . REQUEST_STATUS_NEW . \" AND t2.is_leave = TRUE \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Leave Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n if ($_SESSION['sessionUserRole'] == ROLE_SUPER) {\n // cek yang statusnya udah checked\n $strLink = \"javascript:goAlert('leave_list.php',\" . REQUEST_STATUS_CHECKED . \")\";\n $strSQL = \"SELECT COUNT(t1.id) AS total FROM hrd_absence_detail AS t1 \";\n $strSQL .= \"LEFT JOIN hrd_absence_type AS t2 ON t1.absence_type = t2.code \";\n $strSQL .= \"LEFT JOIN hrd_absence AS t3 ON t1.id_absence = t3.id WHERE status = \" . REQUEST_STATUS_CHECKED . \" AND t2.is_leave = TRUE \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Checked Leave Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n } elseif ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR) {\n // cari request baru yang ada di bawah departmentnnya\n // cek yang statusnya udah new\n $strLink = \"javascript:goAlert('leave_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(t1.id) AS total FROM hrd_absence_detail AS t1 \";\n $strSQL .= \"LEFT JOIN hrd_absence_type AS t4 ON t1.absence_type = t4.code \";\n $strSQL .= \"LEFT JOIN hrd_absence AS t3 ON t1.id_absence = t3.id \";\n $strSQL .= \"LEFT JOIN hrd_employee AS t2 ON t1.id_employee = t2.id \";\n $strSQL .= \"WHERE t3.status = \" . REQUEST_STATUS_NEW . \" AND t4.is_leave = TRUE \";\n $strSQL .= \"AND (t2.department_code = '\" . $arrUserInfo['department_code'] . \"' \";\n $strSQL .= \"OR t2.division_code = '\" . $arrUserInfo['division_code'] . \"' \";\n $strSQL .= \"OR t2.section_code = '\" . $arrUserInfo['section_code'] . \"' ) \";\n $strSQL .= \"AND t1.id_employee <> '\" . $arrUserInfo['id_employee'] . \"' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Leave Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n // ---- END of Leave\n // -- cek Permintaan Karyawan baru\n $strLink = \"javascript:goAlert('recruitment_list.php')\";\n if ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR || $_SESSION['sessionUserRole'] == ROLE_ADMIN) {\n // cek yang statusnya udah baru\n $strLink = \"javascript:goAlert('recruitment_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_recruitment_need WHERE status = \" . REQUEST_STATUS_NEW . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Recruitment Need Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\"><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n // cek yang statusnya udah verified\n $strLink = \"javascript:goAlert('recruitment_list.php',\" . REQUEST_STATUS_VERIFIED . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_recruitment_need WHERE status = \" . REQUEST_STATUS_VERIFIED . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Verified Recruitment Need Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n if ($_SESSION['sessionUserRole'] == ROLE_ADMIN) {\n // cek yang statusnya udah checked\n $strLink = \"javascript:goAlert('recruitment_list.php',\" . REQUEST_STATUS_CHECKED . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_recruitment_need WHERE status = \" . REQUEST_STATUS_CHECKED . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Recruitment Need Request Need Approval : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n // --- end of Permintaan Karyawan\n // cek TRAINING PLAN yang belum dibuat request-nya\n if ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR || $_SESSION['sessionUserRole'] == ROLE_ADMIN) {\n $strLink = \"javascript:goAlert('training_plan_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(id1) AS total FROM \";\n $strSQL .= \"(SELECT id AS id1 FROM hrd_training_plan \";\n $strSQL .= \"WHERE ((expected_date > CURRENT_DATE AND (expected_date - interval '1 months') < CURRENT_DATE) OR (expected_date < CURRENT_DATE)) \";\n if ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR) {\n $strSQL .= \"AND department_code = '\" . $arrUserInfo['department_code'] . \"' \";\n }\n $strSQL .= \"EXCEPT \";\n $strSQL .= \"SELECT DISTINCT id_plan AS id1 FROM hrd_training_request \";\n $strSQL .= \"WHERE EXTRACT(year FROM request_date) = '\" . date(\"Y\") . \"' \";\n if ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR) {\n $strSQL .= \"AND department_code = '\" . $arrUserInfo['department_code'] . \"' \";\n }\n $strSQL .= \") AS tbl \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Unrequested Training Plan : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n // --- Permintaan Training ---\n $strLink = \"javascript:goAlert('training_request_list.php')\";\n if ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR || $_SESSION['sessionUserRole'] == ROLE_ADMIN) {\n // cek yang statusnya udah baru\n $strLink = \"javascript:goAlert('training_request_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_training_request WHERE status = \" . REQUEST_STATUS_NEW . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Training Need Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n // cek yang statusnya udah verified\n $strLink = \"javascript:goAlert('training_request_list.php',\" . REQUEST_STATUS_VERIFIED . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_training_request WHERE status = \" . REQUEST_STATUS_VERIFIED . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Verified Training Request : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n if ($_SESSION['sessionUserRole'] == ROLE_ADMIN) {\n // cek yang statusnya udah checked\n $strLink = \"javascript:goAlert('training_request_list.php',\" . REQUEST_STATUS_CHECKED . \")\";\n $strSQL = \"SELECT COUNT(id) AS total FROM hrd_training_request WHERE status = \" . REQUEST_STATUS_CHECKED . \" \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;Training Request Need Approval : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n } else if ($_SESSION['sessionUserRole'] == ROLE_SUPERVISOR) {\n // cari request baru yang ada di bawah departmentnnya\n // cek yang statusnya udah new\n $strLink = \"javascript:goAlert('training_request_list.php',\" . REQUEST_STATUS_NEW . \")\";\n $strSQL = \"SELECT COUNT(t1.id) AS total FROM hrd_training_request AS t1 \";\n $strSQL .= \"LEFT JOIN hrd_employee AS t2 ON t1.id_employee = t2.id \";\n $strSQL .= \"WHERE t1.status = \" . REQUEST_STATUS_NEW . \" \";\n $strSQL .= \"AND t2.department_code = '\" . $arrUserInfo['department_code'] . \"' \";\n $strSQL .= \"AND t2.section_code = '\" . $arrUserInfo['section_code'] . \"' \";\n $strSQL .= \"AND t1.id_employee <> '\" . $arrUserInfo['id_employee'] . \"' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['total'] != \"\" && $rowDb['total'] > 0) {\n $strResult .= \" <tr valign=top class=$strClass>\\n\";\n $strResult .= \" <td align=left nowrap>&nbsp;New Training Request (Need Approval) : </td>\\n\";\n $strResult .= \" <td align=right nowrap><strong><a href=\\\"$strLink\\\">\" . $rowDb['total'] . \"&nbsp; data</a></strong></td>\\n\";\n $strResult .= \" </tr>\\n\";\n }\n }\n }\n // -- end of Permintaan Training\n $strResult .= \"</table>\\n\";\n return $strResult;\n}", "function showwelcome(){\r\n\t\r\nmakechangebar('welcome',\"if (gid('codegen_button')) gid('codegen_button').onclick();\");\r\n\t\t\r\n?>\r\n<div style=\"position:relative;margin-left:60px;\"><?php makehelp('welcometab2','maxtab',1);?></div>\r\n<div class=\"section\" style=\"position:relative;\">\r\n\t<?php makehelp('welcometab','tabview',1);?>\r\n\t<div class=\"sectiontitle\"><a ondblclick=\"toggletabdock();\"><?php tr('hometab_welcome');?></a></div>\r\n\t\r\n<?php\r\n\r\n//listsslcerts();\r\n\r\n/*\r\n?>\r\n\tWide View Test: \r\n\t<a class=\"hovlink\" onclick=\"ajxjs(self.showwideviewdemo,'wideview.js');addtab('wide_1','Wide View 1','showwidedemo&wideid=1',null,null,{wide:true});\">wide view 1</a>\r\n\t&nbsp;\r\n\t<a class=\"hovlink\" onclick=\"ajxjs(self.showwideviewdemo,'wideview.js');addtab('wide_2','Wide View 2','showwidedemo&wideid=2',null,null,{wide:true});\">wide view 2</a>\r\n<?php\r\n*/\r\n\t\r\n/*\r\n\r\n//auto lookup tests:\r\n\r\n\t<input class=\"inp\" id=\"dtest0\" onfocus=\"pickdate(this,{params:'vmode=test&testid=123'});\" onkeyup=\"_pickdate(this,{params:'vmode=test&testid=123'});\" placeholder=\"Date\">\r\n\t<?php makelookup('dtest0',1);?>\r\n\t<input class=\"inp\" id=\"dtest1\" onfocus=\"pickdate(this,{params:'vmode=heat&recid=123'});\" onkeyup=\"_pickdate(this,{params:'vmode=heat&recid=123'});\" placeholder=\"Date\">\r\n\t<?php makelookup('dtest1',1);?>\r\n\r\n\t<input class=\"inp\" onfocus=\"document.hotspot=this;\">\r\n\t<textarea onfocus=\"document.hotspot=this;\" class=\"inplong\"></textarea>\r\n\t\r\n\t<input class=\"inp\" id=\"mtest\" onfocus=\"pickmonth(this,<?php echo date('Y');?>);\" placeholder=\"Month\">\r\n\t<?php makelookup('mtest',1);?>\r\n\t<br><br>\r\n\t<input class=\"inp\" id=\"dtest\" onfocus=\"pickdate(this);\" onkeyup=\"_pickdate(this);\" placeholder=\"Date\">\r\n\t<?php makelookup('dtest',1);?>\r\n\t<br><br>\r\n\t<input class=\"inp\" id=\"test\" onfocus=\"pickdatetime(this,{start:0,end:24});\" onkeyup=\"_pickdatetime(this,{start:0,end:24});\" placeholder=\"Date/Time\">\r\n\t<span id=\"test_val2\"></span>\r\n\t<?php makelookup('test',1);?>\r\n\t<br><br>\r\n\t<input class=\"inp\" id=\"test2\" onfocus=\"picktime(this,{start:0,end:24,y:2015,m:11,d:1});\" placeholder=\"Time on 2015-11-1\">\r\n\t<span id=\"test2_val2\"></span>\r\n\t<?php makelookup('test2',1);?>\r\n*/\r\n\r\n/*\r\n//gsx demo:\r\n\t\r\n\t$lines=array(\r\n\t\t'\"Parallel Programming',\r\n\t\t'is the art of deliverying a baby',\r\n\t\t'in just one month',\r\n\t\t'with the help of 10 women.\"',\r\n\t);\r\n\t\r\n\t$ta=microtime(1);\r\n\t\t\t\r\n\tgsx_begin();\r\n\t\r\n\tforeach ($lines as $line){\t\r\n\t\t//gsx_hello($line,1);\r\n\t\tgsx_exec('gsx_hello',array('msg','delay'),$line,1);\r\n\t}//foreach\r\n\t\t\r\n\tgsx_end();\r\n\t\r\n\t$tb=microtime(1);\r\n\techo \"<br>Total time: \".round($tb-$ta,2).\"s\";\r\n*/\r\n?>\r\n<div id=\"homedashreports\">\r\n<?php\r\n\t\tlisthomedashreports();\r\n?>\r\n</div>\r\n<?php\r\n\t\t//lazy way to generate a starter screen, but better than nothing\r\n\t\t\r\n\t\tauto_welcome();\t\t\r\n\t\t\t\r\n\t\tshowgyroscopeupdater();\r\n\t\t\r\n\t\tif ($_SERVER['REMOTE_ADDR']==='127.0.0.1'&&($_SERVER['O_IP']==='127.0.0.1'||$_SERVER['O_IP']==='::1')) showguide(); else echo '<div style=\"padding-bottom:100px;\"></div>';\r\n\t\t\r\n\t?>\t\t\t\r\n\r\n\r\n\t\r\n</div><!-- section -->\r\n<?php\r\n\r\n\r\n}", "public function onshow($script);", "public function staff_request()\n {\n $this->redirectUser(array('budget', 'canvasser', 'auditor', 'property', 'admin', 'board'));\n\n $data['page_title'] = lang('staff_req_page_title'); //title of the page\n $data['page_script'] = 'staff_request'; // script filename of the page user.js\n $this->renderPage('request/staff_request', $data);\n }", "private function _do_feu_action()\n\t{\n\t\tif( $feusers =& cms_utils::get_module('FrontEndUsers' ))\n\t\t{\n\t\t\t$redirectPage = $this->GetProperty('redirect_page');\n\t\t\tif($redirectPage == $this->mId || $redirectPage == $this->mAlias)\n\t\t\t{\n\t\t\t\t$redirectPage = '';\n\t\t\t}\n\t\t\t\n\t\t\t# get feu_params\n\t\t\tif(!$this->GetPropertyValue('inherit_feu_params'))\n\t\t\t{\n\t\t\t\t$feu_params = $this->GetPropertyValue('feu_params');\n\t\t\t\t$feu_params_smarty = $this->GetPropertyValue('feu_params_smarty');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$feu_params = $this->InheritParentProp('feu_params');\n\t\t\t\t$feu_params_smarty = $this->InheritParentProp('feu_params_smarty');\n\t\t\t}\n\t\t\tif($feu_params_smarty)\n\t\t\t{\n\t\t\t\t$feu_params = $feusers->ProcessTemplateFromData($feu_params);\n\t\t\t}\n\t\t\t$matches = array();\n\t\t\t$result = preg_match_all(AC_BLOCK_PARAM_PATTERN, $feu_params, $matches);\n\t\t\t$feu_params1 = array(); # array(param_name => param_value)\n\t\t\t$feu_params2 = array(); # string \"param_name=param_value\"\n\t\t\tfor ($i = 0; $i < count($matches[1]); $i++)\n\t\t\t{\n\t\t\t\tif(startswith($matches[2][$i],'\\''))\n\t\t\t\t{\n\t\t\t\t\t$matches[2][$i] = trim($matches[2][$i],'\\'');\n\t\t\t\t}\n\t\t\t\telse if(startswith($matches[2][$i],'\"'))\n\t\t\t\t{\n\t\t\t\t\t$matches[2][$i] = trim($matches[2][$i],'\"');\n\t\t\t\t}\n\t\t\t\t$feu_params1[$matches[1][$i]] = $matches[2][$i];\n\t\t\t\t$feu_params2[] = $matches[1][$i] . '=' . $matches[2][$i];\n\t\t\t}\n\t\t\t#---\n\t\t\t\n\t\t\t# do feu_action\n\t\t\t$feuAction = $this->GetProperty('feu_action');\n\t\t\tif(!$redirectPage)\n\t\t\t{\n\t\t\t\tif($feuAction && !$this->_feuAction)\n\t\t\t\t{\n\t\t\t\t\t$this->_feuAction = true;\n\t\t\t\t\t# cannot pass custom_params when DoAction() is used\n\t\t\t\t\treturn $feusers->DoAction('default', 'cntnt01', array_merge(array('form'=>'login'),$feu_params1), $this->mId);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t# get custom_params\n\t\t\tif(!$this->GetPropertyValue('inherit_custom_params'))\n\t\t\t{\n\t\t\t\t$custom_params = $this->GetPropertyValue('custom_params');\n\t\t\t\t$custom_params_smarty = $this->GetPropertyValue('custom_params_smarty');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$custom_params = $this->InheritParentProp('custom_params');\n\t\t\t\t$custom_params_smarty = $this->InheritParentProp('custom_params_smarty');\n\t\t\t}\n\t\t\tif($custom_params_smarty)\n\t\t\t{\n\t\t\t\t$custom_params = $feusers->ProcessTemplateFromData($custom_params);\n\t\t\t}\n\t\t\t$matches = array();\n\t\t\t$result = preg_match_all(AC_BLOCK_PARAM_PATTERN, $custom_params, $matches);\n\t\t\t$custom_params1 = array();\n\t\t\t$custom_params2 = array();\n\t\t\tfor ($i = 0; $i < count($matches[1]); $i++)\n\t\t\t{\n\t\t\t\tif(startswith($matches[2][$i],'\\''))\n\t\t\t\t{\n\t\t\t\t\t$matches[2][$i] = trim($matches[2][$i],'\\'');\n\t\t\t\t}\n\t\t\t\telse if(startswith($matches[2][$i],'\"'))\n\t\t\t\t{\n\t\t\t\t\t$matches[2][$i] = trim($matches[2][$i],'\"');\n\t\t\t\t}\n\t\t\t\t$custom_params1[$matches[1][$i]] = $matches[2][$i];\n\t\t\t\t$custom_params2[] = $matches[1][$i] . '=' . $matches[2][$i];\n\t\t\t}\n\t\t\t\n\t\t\tif($feuAction)\n\t\t\t{\n\t\t\t\t$url = $feusers->CreateFrontendLink('cntnt01', $redirectPage, 'default', '', $feu_params1, '', true, false, true) . (!empty($custom_params2) ? '&' . implode('&',$custom_params2) : ''); \n\t\t\t\t#return $feusers->RedirectForFrontEnd('cntnt01', $redirectPage, 'default', $feu_params1, false);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$manager =& cmsms()->GetHierarchyManager();\n\t\t\t\t$node = $manager->sureGetNodeByAlias($redirectPage);\n\t\t\t\tif(!is_object($node))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$content =& $node->GetContent();\n\t\t\t\tif (!is_object($content) || !$url = $content->GetURL())\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$config = cmsms()->GetConfig();\n\t\t\t\t$url = trim(str_replace(\n\t\t\t\t\tarray($config['root_url'] . '/index.php',\n\t\t\t\t\t\t$config['ssl_url'] . '/index.php',\n\t\t\t\t\t\t$config['root_url'],\n\t\t\t\t\t\t$config['ssl_url']),\n\t\t\t\t\t'', $url),'/?');\n\t\t\t\t\n\t\t\t\tif(!empty($custom_params1) && !empty($custom_params2))\n\t\t\t\t{\n\t\t\t\t\tif($config['url_rewriting'] == 'none')\n\t\t\t\t\t{\n\t\t\t\t\t\tif($content->Secure())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $config['ssl_url'] . '/index.php?' . implode('&',$custom_params2) . '&' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $config['root_url'] . '/index.php?' . implode('&',$custom_params2) . '&' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if($config['url_rewriting'] == 'internal')\n\t\t\t\t\t{\n\t\t\t\t\t\tif($content->Secure())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $config['ssl_url'] . '/index.php/' . implode('/',$custom_params1) . '/' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $config['root_url'] . '/index.php/' . implode('/',$custom_params1) . '/' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($content->DefaultContent())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url .= $content->Alias() . $config['page_extension'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if($config['url_rewriting'] == 'mod_rewrite')\n\t\t\t\t\t{\n\t\t\t\t\t\tif($content->Secure())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $config['ssl_url'] . '/' . implode('/',$custom_params1) . '/' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $config['root_url'] . '/' . implode('/',$custom_params1) . '/' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($content->DefaultContent())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url .= $content->Alias() . $config['page_extension'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn redirect($url);\n\t\t}\n\t}", "function loadEditCampusRegistrations_OffflineRegBox() \n {\n // set the pageCallBack to be without any additional parameters\n // (an AdminBox needs this so Language Switching on a page doesn't\n // pass a previous operations)\n $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS_OFFFLINEREGBOX, $this->sortBy, $parameters);\n $this->setPageCallBack( $pageCallBack );\n \n \n $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n $formAction = $this->getCallBack(modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS_OFFFLINEREGBOX, $this->sortBy, $parameters );\n $this->pageDisplay = new FormProcessor_EditCampusRegistrations_OffflineRegBox( $this->moduleRootPath, $this->viewer, $formAction, $this->REG_ID , $this->EVENT_ID);//[RAD_FORMINIT_FOREIGNKEY_INIT] \n \n }", "function MyProfile_user_tab() {\r\n\t// get variables\r\n \t$uid \t\t\t= (int)FormUtil::getPassedValue('uid');\r\n \t$viewer_uid \t= pnUserGetVar('uid');\r\n \t$modname \t\t= FormUtil::getPassedValue('modname');\r\n \t// create output\r\n \t$render = pnRender::getInstance('MyProfile');\r\n\t// go on now..\r\n \tif (isset($modname) && pnModAvailable($modname)) {\r\n\t \tpnModLangLoad($modname);\r\n\t \t$output = pnModAPIFunc($modname,'myprofile','tab',array('uid'=>$uid));\r\n\t \t$ajax = (int)FormUtil::getPassedValue('ajax');\r\n\t\tif ($ajax == 1) {\r\n\t\t\tif (pnModGetVar('MyProfile','convertToUTF8') == 1) $output = DataUtil::convertToUTF8($output);\r\n\t\t\techo $output;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $output;\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\telse return false;\r\n}", "function get_appv_user_event($req_id,$wflow_id,$stp_id){\n\t\t$conn = $GLOBALS['conn'];\n\t\t$ug_tbl_app = json_decode(get_appv_members($req_id, $wflow_id, $stp_id));\n\t\t$userTaskapprv = (isset($ug_tbl_app->ug_members)) ? $ug_tbl_app->ug_members : 'xxx';\n\t\t$wrapped='\"'.str_replace(',','\",\"',$userTaskapprv).'\"';\t\n\n\t\t$statuses = array(\"Approved\", \"Confirmed\");\n\t\t$status = '\"' . implode('\",\"', $statuses) . '\"';\n\t\n//\n\t\t$sql = \"SELECT count(id) as cid FROM fs_request_task_approver WHERE \n\t\t rq_no = '$req_id' AND steps_id = '$stp_id' AND approver_id IN($wrapped)\";\n\t\t//echo $sql;\n\t\t$query = $conn->query($sql);\n\t\t$row = $query->fetch_assoc();\n\t\t$countFilter = (isset($row['cid'])) ? $row['cid'] : 0;\n\t\treturn $countFilter; //json_encode($row);\n\t\t$conn->close();\n\t\t//return $genCode;\n}", "public function view($view, $template, $data = []){\n $data['popups'] = isset($_SESSION['popups']) ? $_SESSION['popups'] : array();\n\t\t$_SESSION['popups'] = array();\n require_once 'views/' . $template . '.phtml';\n }", "public function facebookCallBack($fb_code) {\n //get user info\n $userName = $this->Session->read('UserData.userName');\n $facebook_info = $this->FacebookNotification->facebookCallBack($fb_code);\n if ($facebook_info['facebook_id']) {\n $result = $this->FacebookUser->find('first', array('conditions' => array('FacebookUser.midas_id' => $userName)));\n $data = array();\n if (count($result) == 0) {\n $data['midas_id'] = $userName;\n $data['facebook_id'] = $facebook_info['facebook_id'];\n $data['facebook_username'] = $facebook_info['facebook_username'];\n $this->FacebookUser->save($data);\n } else {\n $this->FacebookUser->id = $result['FacebookUser']['id'];\n $data['midas_id'] = $userName;\n $data['facebook_id'] = $facebook_info['facebook_id'];\n $data['facebook_username'] = $facebook_info['facebook_username'];\n $this->FacebookUser->save($data);\n }\n }\n //refresh the parent window and close the poup window.\n echo \"<script type=\\\"text/javascript\\\">\n function refreshParent() {\n window.opener.location.reload(); \n window.close();\n }refreshParent();\n\t\t </script>\";\n exit();\n }", "public function actionInvite()\n\t{\n\t\t/*\n\t\t$inviteeID = Yii::app()->getRequest()->getParam('contactID');\t\n\t\t//$notification = UserNotifications::model()->find(array('condition'=>'userID=:inviteeID', 'params'=>array(':inviteeID'=>$inviteeID)));\n\n\t\t$currentUser = Users::model()->getUserStoriesByName(Yii::app()->user->name);\n\t\t*/\n\n\t\tif(isset($_GET['host']) && isset($_GET['guest'])) {\n\n\t\t\t$guestID = htmlspecialchars($_GET['guest']);\n\t\t\t$hostID = htmlspecialchars($_GET['host']);\n\n\t\t\t$hostName = Users::model()->getUserNameByID($hostID);\n\t\t\n\t\t\t//TODO: move to model\n\t\t\t$notification = new UserNotifications;\n\t\t\t$notification->userID = $guestID;\n\t\t\t$notification->notText = strToUpper($hostName) . ' ruft Sie an';\n\t\t\t$notification->notLink = Yii::app()->createUrl('call/accepted', array('host'=> $hostID, 'guest' => $guestID, 'isInvited'=>'1'));\n\t\t\t$notification->inviterID = $hostID;\n\t\t\t$notification->save();\n\t\t\t/*\t\t\t\t\n\t\t\t$invitee = Users::model()->getUserStoriesAndMusicAndImagesByID($inviteeID);\n\t\t\t\t\t\n\t\t\t$this->render('//site/calling', array('invitee'=>$invitee, 'notification' => $notification));\t\t\t\n\t\t\t*/\n\n\t\t\t$conversationPartners = Users::model()->getUserStoriesAndMusicAndImagesByID($guestID, $hostID);\n\t\t\t\n\t\t\tif(!empty($conversationPartners)) {\n\t\t\t\t$this->render('calling', array('conversationPartners' => $conversationPartners, 'notification' => $notification));\n\t\t\t} else {\n\t\t\t\techo \"No results from DB\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"GET NOT SET\";\n\t\t\t$this->render('room');//, array('conversationPartners' => $conversationPartners));\n\t\t}\t\t\n\n\t}", "function loadConfirmDeleteRegistration() \n {\n\t \n\t // if event-id is missing, use reg-id to find it\n\t if ((!isset($this->EVENT_ID)||($this->EVENT_ID == '')) && ($this->REG_ID != ''))\n\t {\n\t\t $eventFinder = new RowManager_RegistrationManager($this->REG_ID);\n\t\t $this->EVENT_ID = $eventFinder->getEventID();\t\t \n\t }\n\t \n\t // if campus-id is missing, use person-id to find it\n\t if ((!isset($this->CAMPUS_ID)||($this->CAMPUS_ID == '')) && ($this->PERSON_ID != ''))\n\t {\n\t\t $campusFinder = new RowManager_EditCampusAssignmentManager();\n\t\t $campusFinder->setPersonID($this->PERSON_ID);\n\t\t $campusList = $campusFinder->getListIterator();\n\t\t $campusArray = $campusList->getDataList();\n// \t\t echo 'campus array = <pre>'.print_r($campusArray,true).'</pre>';\n\t\t \n\t\t // pick the first campus found\t\t \n\t\t $record = current($campusArray); \n\t\t $this->CAMPUS_ID = $record['campus_id']; \n\t }\t \n\n\t // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if ($privManager->isCampusAdmin($this->EVENT_ID, $this->CAMPUS_ID)==true)\t// check if privilege level is high enough\n {\t\t \n\t\t \n\t // set the pageCallBack to be without any additional parameters\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_CONFIRMDELETEREGISTRATION, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack );\n\t \n\t \n\t $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $formAction = $this->getCallBack(modulecim_reg::PAGE_CONFIRMDELETEREGISTRATION, $this->sortBy, $parameters );\n\t $this->pageDisplay = new page_ConfirmDeleteRegistration( $this->moduleRootPath, $this->viewer, $formAction, $this->REG_ID );\n\t \n\t //$this->previous_page = modulecim_reg::PAGE_CONFIRMDELETEREGISTRATION; \n } \n \t\t\telse\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n }", "public function hooray_ajax() {\n\t\t$ac = '_'.$this->checkData('ac');\n\t\t$AdminDesktop = M('AdminDesktop');\n\t\t$DESKTOP = $AdminDesktop->where(\"admin_id=\".GBehavior::$session['id'])->find();\n\t\t$this->$ac($DESKTOP,$AdminDesktop);\n\t}", "function loadConfirmCancelRegistration() \n {\n // set the pageCallBack to be without any additional parameters\n // (an AdminBox needs this so Language Switching on a page doesn't\n // pass a previous operations)\n $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'PERSON_ID'=>$this->PERSON_ID, 'RECEIPT_ID'=>$this->RECEIPT_ID);//[RAD_CALLBACK_PARAMS]\n $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_CONFIRMCANCELREGISTRATION, $this->sortBy, $parameters);\n $this->setPageCallBack( $pageCallBack );\n \n $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID, 'PERSON_ID'=>$this->PERSON_ID, 'RECEIPT_ID'=>$this->RECEIPT_ID);//[RAD_CALLBACK_PARAMS]\n $formAction = $this->getCallBack(modulecim_reg::PAGE_CONFIRMCANCELREGISTRATION, $this->sortBy, $parameters ); \n \n $this->PERSON_ID = $_REQUEST[modulecim_reg::PERSON_ID]; \n \n $this->pageDisplay = new page_ConfirmCancelRegistration( $this->moduleRootPath, $this->viewer, $formAction, $this->EVENT_ID, $this->PERSON_ID ); \n \n// $links = array();\n// \n// /*[RAD_LINK_INSERT]*/\n\n// $this->pageDisplay->setLinks( $links ); \n\n \n \n }", "public static function DEFINITION_RDW_SHOWRESULT_FULL($w,$h) {\n\tglobal $sid;\n\tglobal $datasource;\n\tglobal $slrq;\n \n\t//Mark/adapt propagated sid to be inside this widget:\n\t$sid='2'.$sid;\t\n\t\t\n\tif ($DEBUG) {\n\t\tprint \"<br> retrieving $UC3_SOCIALAGGWRESULTS_RM results for sid=$sid and datasource=null, $slrq, $render\";\n\t\t//exit;\n\t}\n\tglobal $m; $m=$UC3_SOCIALAGGWRESULTS_RM; // for following method\n\tRodinResultManager::renderAllResultsInOwnTab($sid,$datasource_null,$slrq);\n\t\n\treturn true; \n}", "function popup_msg_enrollment()\n {\n $rcmail = rcmail::get_instance();\n $config_2FA = self::__get2FAconfig();\n $excludedUserInEnforce2FA = $this->__pluginExcludeEnforce2FA();\n\n if (\n !$config_2FA['activate'] && $rcmail->config->get('force_enrollment_users') &&\n $rcmail->task == 'settings' && $rcmail->action == 'plugin.twofactor_gauthenticator' &&\n !$excludedUserInEnforce2FA\n ) {\n // add overlay input box to html page\n $rcmail->output->add_footer(html::tag('form', array(\n 'id' => 'enrollment_dialog',\n 'method' => 'post'),\n html::tag('h3', null, $this->gettext('enrollment_dialog_title')) .\n $this->gettext('enrollment_dialog_msg')\n ));\n\n $rcmail->output->add_script(\n \"$('#enrollment_dialog').show().dialog({ modal:true, resizable:false, closeOnEscape: true, width:420 });\", 'docready'\n );\n }\n }", "function loadPersonRecordCleanUp($person_fname, $person_lname, $person_email, $max_exec_time)\n {\t\n\t // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if ($privManager->isSuperAdmin()==true)\t\n {\t\t \n\t\t \n\t // set the pageCallBack to be without any additional parameters\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t $parameters = array('PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID);//[RAD_CALLBACK_PARAMS]\n\t $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_PERSONRECORDCLEANUP, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack ); \n\t \n\t $this->pageDisplay = new page_PersonRecordCleanUp( $this->moduleRootPath, $this->viewer, $this->sortBy, $person_fname, $person_lname, $person_email, $max_exec_time); \n\t \n \t $links = array();\n\t $parameters = array();\t//, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID);\t//, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $continueLink = $this->getCallBack( modulecim_reg::PAGE_PERSONRECORDCLEANUP_FORM, \"\", $parameters );\n\t $links[\"cont\"] = $continueLink;\n\t\n \t $this->pageDisplay->setLinks( $links ); \n }\n else\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n }", "public function on_show_originate($template, $tab_path, $action)\n {\n\n if (!(check_permission(PERM_ORIGINATE_CALL)))\n throw new Exception(\"You do not have the required permissions to originate a call!\");\n\n try {\n\n $ext = (isset($_POST[\"ext\"])) ? $_POST[\"ext\"] : $_SESSION[\"extension\"];\n $number = (isset($_POST[\"number\"])) ? $_POST[\"number\"] : \"\";\n $caller_num = (isset($_POST[\"caller_num\"])) ? $_POST[\"caller_num\"] : \"\";\n $caller_name = (isset($_POST[\"caller_name\"])) ? $_POST[\"caller_name\"] : \"\";\n $timeout = intval(get_global_config_item(\"click2dial\", \"timeout\", 30));\n\n if (isset($_GET[\"number\"]) && empty($number))\n $number = $_GET[\"number\"];\n\n if (isset($_POST[\"call\"])) {\n\n $this->do_originate_call($ext, $number, $caller_num, $caller_name, $timeout);\n\n $date = date(DATE_RFC2822);\n\n $this->show_messagebox(\n MESSAGEBOX_INFO,\n \"Originate call succeded.\\n\\\"$ext\\\" -> \\\"$number\\\" on $date\",\n false\n );\n\n }\n } catch (Exception $e) {\n\n $this->show_messagebox(MESSAGEBOX_ERROR, $e->getmessage(), false);\n }\n\n require($template->load(\"originate.tpl\"));\n\n $template->include_script(\"originate.js\");\n }", "static function invokeCallBackward(/*.args.*/)\n\t{\n\t\ttry {\n\t\t\tself::$us->window_session->invokeCallBackward( func_get_args() );\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\tthrow new RuntimeException($e->getMessage(), 1, $e);\n\t\t}\n\t}", "public function triggerUserParams($uparams = array()) {\n\t\t\t$params = array (\n\t\t\t\t\t'layout',\n\t\t\t\t\t'body_pattern',\n\t\t\t\t\t'skin' \n\t\t\t);\n\t\t\t$params = array_merge_recursive ( $params, $uparams );\n\t\t\tif ($this->getConfig ( 'enable_paneltool' )) {\n\t\t\t\tif (isset ( $this->request->get ['pavreset'] )) {\n\t\t\t\t\tforeach ( $params as $param ) {\n\t\t\t\t\t\t$kc = $this->theme . \"_\" . $param;\n\t\t\t\t\t\t$this->addParam ( $param, null );\n\t\t\t\t\t\tsetcookie ( $kc, null, 0, '/' );\n\t\t\t\t\t\tif (isset ( $_COOKIE [$kc] )) {\n\t\t\t\t\t\t\t$this->cparams [$kc] = null;\n\t\t\t\t\t\t\t$_COOKIE [$kc] = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$exp = time () + 60 * 60 * 24 * 355;\n\t\t\t\tforeach ( $params as $param ) {\n\t\t\t\t\t$kc = $this->theme . \"_\" . $param;\n\t\t\t\t\tif (isset ( $this->request->post ['userparams'] ) && ($data = $this->request->post ['userparams'])) {\n\t\t\t\t\t\tif (isset ( $data [$param] )) {\n\t\t\t\t\t\t\tsetcookie ( $kc, $data [$param], $exp, '/' );\n\t\t\t\t\t\t\t$this->cparams [$kc] = $data [$param];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->assignUserParam ( $kc );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset ( $this->request->post ['userparams'] ) || isset ( $this->request->get ['pavreset'] )) {\n\t\t\t\t\t\n\t\t\t\t\t$this->redirect ( $this->url->link ( \"common/home\", 'changed=' . time (), 'SSL' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function callUserFunctionCanCallFunction() {}", "function trigger_item_17($userid)\n\t{\n\t\t$obj = new ga_core_bll();\n\t\t$obj->trigger_item($userid, 17);\n\t}", "function voipscript_get_run_ivr_menu_script($options) {\n\n $script = new VoipScript('voipscript_run_ivr_menu');\n\n // initialize script variables\n\n $script->addSet('_menu_options', json_encode($options['prompt']));\n\n $input_options = $options['input_options'];\n $script->addSet('_input_options', json_encode($input_options));\n\n $keys_allowed = implode(array_keys($input_options));\n $script->addSet('_keys_allowed', $keys_allowed);\n\n $script->addSet('_counter', $options['max_attempts']);\n $script->addSet('_invalid_msg', json_encode($options['invalid_msg']));\n $script->addSet('_no_input_msg', json_encode($options['no_input_msg']));\n $script->addSet('_timeout', $options['timeout']);\n \n // run the script\n\n $script->addLabel('play_menu_options');\n $script->addSet('_counter', '^%_counter - 1');\n $script->addGotoIf('go_back', '^%_counter < 0');\n$script->addLog('^json_decode(%_menu_options, TRUE)', 'about to call getInput');\n $script->addGetInput('^json_decode(%_menu_options, TRUE)', 1, '', '%_timeout');\n$script->addLog('%input_digits', 'getInput result');\n $script->addGotoIf('no_input_received', \"^%input_digits == ''\");\n/**\n TODO: ideally, the correct line should be as follows\n $script->addGotoIf('valid_option',\n \"^strpos(' ' . '%_keys_allowed', '%input_digits')\");\n however, since the eval function is not processing '0', '*', '#' correctly,\n I had to replace the line by the following. Hopefully, we'll be able to\n solve this little bug soon (2011.04.20)\n check http://stackoverflow.com/questions/3241070/php-recursive-variable-replacement\n NOTE: among other things, the eval function adds single quotes around all \n non-numeric strings. Since %_keys_allowed always includes 'ti',\n we don't need to include single quotes when referring to it.\n**/\n $script->addGotoIf('valid_option',\n \"^(%input_digits === '0') ? strpos(' ' . %_keys_allowed, %input_digits) : FALSE\");\n $script->addGotoIf('valid_option',\n \"^(%input_digits === '*') ? strpos(' ' . %_keys_allowed, %input_digits) : FALSE\");\n $script->addGotoIf('valid_option',\n \"^(%input_digits === '#') ? strpos(' ' . %_keys_allowed, %input_digits) : FALSE\");\n $script->addGotoIf('valid_option',\n \"^strpos(' ' . %_keys_allowed, \\\"%input_digits\\\")\");\n $script->addGoto('invalid_option');\n\n $script->addLabel('no_input_received');\n $script->addSet('ivr_option_selected', \n \"^_voipscript_get_element('t', json_decode(%_input_options, TRUE))\");\n $script->addSay('^json_decode(%_no_input_msg, TRUE)');\n $script->addGoto('play_menu_options');\n \n $script->addLabel('valid_option');\n $script->addSet('ivr_option_selected',\n \"^_voipscript_get_element(%input_digits, json_decode(%_input_options, TRUE))\");\n $script->addGoto('go_back');\n \n $script->addLabel('invalid_option');\n $script->addSet('ivr_option_selected',\n \"^_voipscript_get_element('i', json_decode(%_input_options, TRUE))\");\n $script->addSay(\"^json_decode(%_invalid_msg, TRUE)\");\n $script->addGoto('play_menu_options');\n \n $script->addLabel('go_back');\n $script->addUnset('_menu_options');\n $script->addUnset('_input_options');\n $script->addUnset('_keys_allowed');\n $script->addUnset('_counter');\n $script->addUnset('_invalid_msg');\n $script->addUnset('_no_input_msg');\n $script->addUnset('_timeout');\n $script->addReturn();\n\n return $script;\n}", "function dpsp_pop_up_subpage() {\n\n\t\tinclude_once 'views/view-submenu-page-pop-up.php';\n\n\t}", "public function acceptPopup() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('acceptPopup', func_get_args()));\n }", "function popup($page_name = '',$param = '')\r\n\t{\r\n\t\t$this->load->model('Crud_model');\r\n\r\n\t\tif($page_name == 'add_user_model')\r\n\t\t{\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view('admin_models/add_models/add_user_model.php');\r\n\t\t}\r\n\t\telse if($page_name == 'edit_user_model')\r\n\t\t{\r\n\t\t\t$data['single_user'] = $this->Crud_model->fetch_record_by_id('mp_users',$param);\r\n\t\t\t//model name available in admin models folder\r\n\t\t\t$this->load->view( 'admin_models/edit_models/edit_user_model.php',$data);\r\n\t\t}\r\n\t\t\r\n\t}", "function display_menu(){\n $ussd_text = \"Welcome to PataRide. Find your selection from the menu options and press call\\n\";\n $ussd_proceed($ussd_text);\n }", "public function users_admin_load() {\r\n\t\tglobal $plugin_page, $ura_pending_approval_list_page, $parent_page, $title;\r\n\t\t$ura_pending_approval_list_page = new URA_USERS_LIST_TABLE_NUA();\r\n\t\t$doaction = $ura_pending_approval_list_page->get_bulk_actions();\r\n\t\t$title = __( 'Users', 'user-registration-aide' ) ;\r\n\t\t$parent_file = 'users.php';\r\n\t\t// Build redirection URL\r\n\t\t$redirect_to = remove_query_arg( array( 'action', 'error', 'updated', 'activated', 'notactivated', 'deleted', 'notdeleted', 'resent', 'notresent', 'do_delete', 'do_resend', 'do_activate', '_wpnonce', 'signup_ids', 'mailto', 'email', 'resend_email' ), $_SERVER['REQUEST_URI'] );\r\n\t\t\r\n\t\t/**\r\n\t\t * Fires at the start of the signups admin load.\r\n\t\t *\r\n\t\t * @since 1.5.3.0\r\n\t\t *\r\n\t\t * @param string $doaction Current bulk action being processed.\r\n\t\t * @param array $_REQUEST Current $_REQUEST global.\r\n\t\t */\r\n\t\tdo_action( 'ura_signups_admin_load', $doaction, $_REQUEST );\r\n\r\n\t\t/**\r\n\t\t * Filters the allowed actions for use in the user signups admin page.\r\n\t\t *\r\n\t\t * @since 1.5.3.0\r\n\t\t *\r\n\t\t * @param array $value Array of allowed actions to use.\r\n\t\t */\r\n\t\t$allowed_actions = array( 'approve_user', 'deny_user', 'activate_user', 'resend_email', 'resend_password_email', 'delete_user' );\r\n\r\n\t\t// Prepare the display of the Community Profile screen\r\n\t\tif ( ! in_array( $doaction, $allowed_actions ) || ( -1 == $doaction ) ) {\r\n\r\n\t\t\t\r\n\t\t\t// per_page screen option\r\n\t\t\tadd_screen_option( 'per_page', array( 'label' => _x( 'Pending Accounts', 'Pending Accounts per page (screen options)', 'user-registration-aide' ) ) );\r\n\t\t\r\n\t\t\t$screen = get_current_screen();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tif ( ! empty( $_REQUEST['approval_ids' ] ) ) {\r\n\t\t\t\t$signups = wp_parse_id_list( $_REQUEST['approval_ids' ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function display_popup_calendar()\n\t{\n\t global $app;\n\t $rs['cal'] = db::get_recordset(\"cost_center\",\"0=0 and region_id = '$user[region_id]'\");\n\t $quarter = libadm::get_quarter(date(\"F\"));\n\t $year = date(\"Y\");\n\t $budget_region = db::lookup(\"id\", \"budget\", \"region_id = '$user[region_id]' and quarter = '$quarter' and year = '$year'\");\n\t\tinclude \"$app[path]/blk_left_budget.php\";\n\t}", "public function crms_user()\n {\n $this->load->model(\"Customer_message\");\n $data[\"message_data\"]=$this->Customer_message->getCustomMessageForHeader();\n $this->load->model(\"notification\");\n $data[\"insurence_date\"]=$this->notification->insurence_date();\n $data[\"revenue_license_date\"]=$this->notification->revenue_license_date();\n $data[\"car_booking_notification\"]=$this->notification->car_booking_notification();\n $data[\"car_not_recive\"]=$this->notification->car_not_recive();\n\n\n $this->load->model('StaffModel');\n $data[\"staff_details\"] = $this->StaffModel->getStaffDetails();\n $data[\"staff_details_for_id\"] = $this->StaffModel->getStaffDetailsForAutoId();\n \n $this->load->view('crms_user', $data);\n \n }", "public function startShow()\n\t{\t\n\t\t// Loads basic settings, system and site, loads clean_path\n\t\t$this->loadProfessor();\n\t\t\n\t\t// Checks for user cookies and/or sessions and loads user information\n\t\t$this->greetUser();\n\t\t\n\t\t$call_parts = wed_getSystemValue('CALL_PARTS');\n\t\t$call_page = (!empty($call_parts[0])) ? $call_parts[0] : null ;\n\t\t\n\t\t/*\n\t\t * Calling different Shows\n\t\t *\n\t\t * Here we can formulate and call different shows based on the value of the\n\t\t * control code in the url.\n\t\t *\n\t\t * wizard is code for an ajax call. The group part of the url will usually be a\n\t\t * file name that is being called. The query will usually contain a directory path\n\t\t * within the theme directory where the file is actually located.\n\t\t *\n\t\t */\n\t\tif ($call_page=='wizard')\n\t\t{\n\t\t\t$this->callWizard();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Records the url and user\n\t\t\t$this->trackUser();\n\t\t\t\n\t\t\t// Do different shows here\n\t\t\t$this->showPagePresentation($call_page); // Default show for now\n\t\t}\n\t}", "public function etatqvgcpexceloldAction()\n {\n\n $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n \n if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\n if($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $date_debut = (string)$this->_request->getParam('date_debut');\n $this->view->date_fin = $date_debut;\n $date_fin = (string)$this->_request->getParam('date_fin');\n $this->view->date_fin = $date_fin;\n $code_tegc = (string)$this->_request->getParam(\"code_tegc\");\n $this->view->code_tegc = $code_tegc;\n\n //Util_Utils::genererExcelVGCp($date_debut, $date_fin, $code_tegc);\n$this->_redirect(Util_Utils::genererExcelVGCp($date_debut, $date_fin, $code_tegc));\n\n }", "public function userView($viewname,$data=[]){\n return \\App::call('\\\\BethelChika\\Laradmin\\Http\\Controllers\\User\\PluginUserController@pluginVendorUserView',\n ['viewname'=>$viewname,'data'=>$data]);\n }", "function view_details($choice,$flag,$user){\r\n\t$query = \"SELECT * FROM users WHERE userName = '{$user}' \";\r\n\t$result = mysql_query($query);\r\n\tconfirm_query($result);\r\n\t$users = mysql_fetch_assoc($result);\r\n\t$user_since =date(\"d.m.Y H:i:s\",$users['creationDate']);\r\n\t$last_login = date(\"d.m.Y H:i:s\",$users['lastLogin']);\r\n\tif($users['status'] == 1){ $userStatus = \"active\"; }\r\n\telse{ $userStatus == \"inactive\"; }\r\nif($user == $_SESSION['USERNAME'] || $_SESSION['ACCESSCODE']==\"green\"){\r\necho\"\r\n\t<div id='myform' class='cols'>\r\n\t\t<div class='alpha'>\r\n\t\t\t\t<label> user id <input type='text' name='userid' required='required' readonly='readonly' autocomplete='on' value='\".$users['id'].\"'/> </label>\r\n\t\t\t\t<label> full name <input type='text' name='fullName' maxlength='30' required='required' readonly='readonly' autocomplete='on' value='\".$users['fullName'].\"'/> </label>\r\n\t\t\t\t<label> address <input type='text' name='address' required='required' readonly='readonly' autocomplete='on' value='\".$users['address'].\"'/> </label>\r\n\t\t\t\t<label> email <input type='email' required='required' minlength='9' name='eMail' readonly='readonly' autocomplete='on' value='\".$users['eMail'].\"'/> </label> \r\n\t\t\t\t<label> display name <input type='text' name='displayName' maxlength='16' required='required' readonly='readonly' autocomplete='on' value='\".$users['displayName'].\"'/> </label>\r\n\t\t\t\t<label> cell no <input type='number' name='cellNo' maxlength='16' required='required' readonly='readonly' autocomplete='on' value='\".$users['cellNo'].\"'/> </label>\r\n\t\t</div>\r\n\t\t<div class='beta'>\r\n\t\t\t\t<label> username <input type='text' name='userName' minlength='6' required='required' autocomplete='on' readonly='readonly' value='\".$users['userName'].\"'/> </label>\r\n\t\t\t\t<label> access code <input type='text' name='accessCode' required='required' autocomplete='on' readonly='readonly' value='\".$users['accessCode'].\"'/> </label>\r\n\t\t\t\t<label> user since <input type='text' name='creationDate' required='required' readonly='readonly' autocomplete='on' value='\".$user_since.\"'/> </label>\r\n\t\t\t\t<label> last login <input type='text' name='creationDate' required='required' readonly='readonly' autocomplete='on' value='\".$last_login.\"'/> </label>\r\n\t\t\t\t<label> total sale <input type='text' name='accessCode' required='required' autocomplete='on' readonly='readonly' value='\".$users['totalSale'].\"'/> </label>\r\n\t\t\t\t<label> user status <input type='text' name='creationDate' required='required' readonly='readonly' autocomplete='on' value='\".$userStatus.\"'/> </label>\r\n\t\t</div>\r\n\r\n\t\t<div class='clear'></div>\r\n\t\t\r\n\t</div>\r\n\";\r\n}\r\nelse{\r\naccess_denied();\r\n}\r\n}", "function user_panel_pm(){\n\treturn 'view my P.Ms here';\n}", "private function _addToProspectListButton()\n {\n global $app_strings, $sugar_version, $sugar_config, $current_user;\n\n $query = \"SELECT distinct prospects.id, prospects.assigned_user_id, prospects.first_name, prospects.last_name, prospects.phone_work, prospects.title,\n\t\t\t\temail_addresses.email_address email1, users.user_name as assigned_user_name\n\t\t\t\tFROM users_last_import,prospects\n LEFT JOIN users ON prospects.assigned_user_id=users.id\n\t\t\t\tLEFT JOIN email_addr_bean_rel on prospects.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Prospect' and email_addr_bean_rel.primary_address=1 and email_addr_bean_rel.deleted=0\n\t\t\t\tLEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id\n\t\t\t\tWHERE users_last_import.assigned_user_id = '{$current_user->id}' AND users_last_import.bean_type='Prospect' AND users_last_import.bean_id=prospects.id\n\t\t\t\tAND users_last_import.deleted=0 AND prospects.deleted=0\";\n\n $prospect_id=[];\n if(!empty($query)){\n $res=$GLOBALS['db']->query($query);\n while($row = $GLOBALS['db']->fetchByAssoc($res))\n {\n $prospect_id[]=$row['id'];\n }\n }\n $popup_request_data = array(\n 'call_back_function' => 'set_return_and_save_background',\n 'form_name' => 'DetailView',\n 'field_to_name_array' => array(\n 'id' => 'prospect_list_id',\n ),\n 'passthru_data' => array(\n 'child_field' => 'notused',\n 'return_url' => 'notused',\n 'link_field_name' => 'notused',\n 'module_name' => 'notused',\n 'refresh_page'=>'1',\n 'return_type'=>'addtoprospectlist',\n 'parent_module'=>'ProspectLists',\n 'parent_type'=>'ProspectList',\n 'child_id'=>'id',\n 'link_attribute'=>'prospects',\n 'link_type'=>'default',\t //polymorphic or default\n 'prospect_ids'=>$prospect_id,\n )\n );\n\n $json = getJSONobj();\n $encoded_popup_request_data = $json->encode($popup_request_data);\n\n return <<<EOHTML\n<script type=\"text/javascript\" src=\"include/SubPanel/SubPanelTiles.js?s={$sugar_version}&c={$sugar_config['js_custom_version']}\"></script>\n<input align=right\" type=\"button\" name=\"select_button\" id=\"select_button\" class=\"button\"\n title=\"{$app_strings['LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL']}\"\n value=\"{$app_strings['LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL']}\"\n onclick='open_popup(\"ProspectLists\",600,400,\"\",true,true,$encoded_popup_request_data,\"Single\",\"true\");' />\nEOHTML;\n\n }", "protected function showHomeUser($vd) {\n // mostro la home degli Utenti\n $vd->setHeaderImage(basename(__DIR__) . '/../view/header.php');\n $vd->setContent(basename(__DIR__) . '/../view/user/contentx.php');\n $vd->setServizi(basename(__DIR__) . '/../view/user/servizi.php');\n $vd->setStaff(basename(__DIR__) . '/../view/user/staff.php');\n $vd->setAbout(basename(__DIR__) . '/../view/user/about.php');\n $vd->setNavigationBar(basename(__DIR__) . '/../view/user/top_menu.php');\n $vd->setFooter(basename(__DIR__) . '/../view/footer.php');\n $vd->setBooking(basename(__DIR__) . '/../functionUser/prenota.php');\n $vd->setViewBooking(basename(__DIR__) . '/../functionUser/visualizzaPrenotazione.php');\n $vd->setFooter(basename(__DIR__) . '/../view/footer.php');\n }", "function check_shg_samrudhi($caller,$exten,$starttime,$agi,$time,$x,$unique_id,$ivr_call_id,$language,$void_code,$member_limit,$health,$vo_shgs,$shg_code){\n$shg_samrudhi_query=\"select *,DEPOSIT_PER from SHG_SAMRUDHI_PERCENTAGE() where shg_id='$shg_code'\";\n$total_deposit_rs=mssql_fetch_array(mssql_query($shg_samrudhi_query));\n$check_shg_samrudhi=$total_deposit_rs['DEPOSIT_PER'];\n\t\t\t\n\t\tif($check_shg_samrudhi > 99)\n\t\t{\n\t\t$shg_samrudhi_validation=1;\n\t\t}\n\t\telse{\n\t\t$shg_samrudhi_validation=0;\t\n\t\t\t\n\t\t\t}\n\t\t\treturn $shg_samrudhi_validation;\n\n\t}", "public function caller($user_id)\n\t{\n\t\tif (!correct_user($user_id)) return;\n\n\t\t$experiments = $this->callerModel->get_experiments_by_caller($user_id);\n\n\t\t$data['page_title'] = lang('experiments');\n\t\t$data['table'] = create_experiment_table($experiments);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/list_view', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "public function callFirstView(){\n\t\t// goi ham lay thong tin tat ca user ra - bat thang model xu ly\n\t\t$user = new UserModel();\n\t\t$listUsers = $user->getListUser();\n\n\t\tinclude 'view/user/list_user.php';\n\t}", "function update_users_view()\r\n\t{\n\t\tgeoOrderItem::callUpdate('Admin_user_management_update_users_view',intval($_GET['b']));\n\t\tgeoAddon::triggerUpdate('Admin_user_management_update_users_view',intval($_GET['b']));\n\t\treturn true;\r\n\t}", "public function register()\n\t {\n\t \t$this->setTitle(Phpfox::getPhrase('resume.who_s_view_me'));\n\t\t$aAccount = Phpfox::getService(\"resume.account\")->getAccount();\n\t\tif($aAccount && $aAccount['view_resume']!=1)\n\t\t{\n\t\t\techo Phpfox::getPhrase('resume.your_request_has_been_sent_please_wait_approve_from_administrator');\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPhpfox::getBlock('resume.registerpopup');\n\t\t}\n\t }", "public function actionUserOpt()\n {\n $ret = [\n 'resultNo'=>0,\n 'resultDesc'=>'请求成功!'\n ];\n yii::error(\"游戏参数:\".json_encode( $_REQUEST ) );\n $model = new MgGameUseropt();\n $model->setAttributes( $_REQUEST );\n if ( !$model->save() ) {\n yii::error( json_encode( $model->getErrors() ,JSON_UNESCAPED_UNICODE ) );\n $ret['resultNo'] = 90000;\n $ret['resultDesc'] = json_encode( $model->getErrors() ,JSON_UNESCAPED_UNICODE );\n }else{\n $notice = $this->getMsg( $model );\n //提示用户\n if( !empty( $notice['openid'] ) ){\n $ret = WeChatService::getIns()->sendCsMsg([\n 'touser'=> $notice['openid'],\n 'msgtype'=>'text',\n 'text'=>[\n 'content'=>$notice['msg']\n ]\n ]);\n yii::error( json_encode( $ret ) );\n }\n }\n echo json_encode( $ret );\n }", "function LoadExtraDetailsPopup()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_OPERATOR);\n\n\t\t// Retrieve the array of new services\n\t\t// Note that this is an array of objects (structs), not an array of associative arrays\n\t\t//$objService = DBO()->Service->Data->Value;\n\n\t\tif (DBO()->Service->ServiceType->Value == SERVICE_TYPE_LAND_LINE)\n\t\t{\n\t\t\t// Accomodate the extra LaneLine details\n\t\t\tDBO()->Account->Load();\n\n\t\t\t// Retrieve the address details of each service belonging to this account\n\t\t\tDBO()->Account->AllAddresses = $this->_GetAllServiceAddresses(DBO()->Account->Id->Value);\n\n\t\t\tif (DBO()->Service->AddressDetails->IsSet)\n\t\t\t{\n\t\t\t\t// The service has already had details defined, load them\n\t\t\t\t$arrAddressDetails = DBO()->Service->AddressDetails->Value;\n\n\t\t\t\tforeach ($arrAddressDetails as $strProperty=>$mixValue)\n\t\t\t\t{\n\t\t\t\t\tDBO()->ServiceAddress->{$strProperty} = $mixValue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Set Default values for things\n\t\t\t\t// Don't forget this form has to include controls for the Indial100 checkbox and enabling ELB\n\t\t\t\t$this->_SetDefaultValuesForServiceAddress(DBO()->ServiceAddress, DBO()->Account);\n\t\t\t\tDBO()->Service->Indial100 = FALSE;\n\t\t\t\tDBO()->Service->ELB = FALSE;\n\t\t\t\tDBO()->Service->AuthorisationDate = date(\"d/m/Y\");\n\t\t\t}\n\t\t}\n\t\telseif (DBO()->Service->ServiceType->Value == SERVICE_TYPE_MOBILE)\n\t\t{\n\t\t\tDBO()->ServiceMobileDetail->SimPUK\t\t= DBO()->Service->SimPUK->Value;\n\t\t\tDBO()->ServiceMobileDetail->SimESN\t\t= DBO()->Service->SimESN->Value;\n\t\t\tDBO()->ServiceMobileDetail->SimState\t= DBO()->Service->SimState->Value;\n\t\t\tDBO()->ServiceMobileDetail->DOB\t\t\t= DBO()->Service->DOB->Value;\n\t\t\tDBO()->ServiceMobileDetail->Comments\t= DBO()->Service->Comments->Value;\n\n\t\t\t// Set values that have been passed through\n\t\t}\n\t\telseif (DBO()->Service->ServiceType->Value == SERVICE_TYPE_INBOUND)\n\t\t{\n\t\t\t// Set values that have been passed through\n\t\t\tDBO()->ServiceInboundDetail->AnswerPoint\t= DBO()->Service->AnswerPoint->Value;\n\t\t\tDBO()->ServiceInboundDetail->Configuration\t= DBO()->Service->Configuration->Value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// This shouldn't ever get called\n\t\t\tAjax()->AddCommand(\"Alert\", \"ERROR: AppTemplateService->LoadExtraDetailsPopup: ServiceType '\". $objService->intServiceType .\"' does not require any extra details defined\");\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t$this->LoadPage('service_bulk_add_extra_details');\n\t\treturn TRUE;\n\t}", "function show_install() {\n\tif(VIEW_OFF) return;\n?>\n<script type=\"text/javascript\">\nfunction showmessage(message) {\n\tdocument.getElementById('notice').innerHTML += message + '<br />';\n\tdocument.getElementById('notice').scrollTop = 100000000;\n}\nfunction initinput() {\n\twindow.location='index.php?method=ext_info';\n}\n</script>\n\t<div class=\"main\">\n\t\t<div class=\"btnbox\"><div id=\"notice\"></div></div>\n\t\t<div class=\"btnbox marginbot\">\n\t<input type=\"button\" name=\"submit\" value=\"<?=lang('install_in_processed')?>\" disabled style=\"height: 25\" id=\"laststep\" onclick=\"initinput()\">\n\t</div>\n<?php\n}", "public function CallBackFunctionBlock($id, $row)\n {\n $sReturnValue = parent::CallBackFunctionBlock($id, $row);\n\n $sReturnValue = substr($sReturnValue, 0, strrpos($sReturnValue, '<div id=\"functionTitle_'.$row['cmsident'].'\" class=\"functionTitle\">'));\n\n $aParameter = TGlobal::instance()->GetUserData(null, array('module_fnc', 'id', '_noModuleFunction', 'pagedef'));\n $aParameter['module_fnc'] = array(TGlobal::instance()->GetExecutingModulePointer()->sModuleSpotName => 'LoginAsExtranetUser');\n $aParameter['_noModuleFunction'] = 'true';\n $aParameter['id'] = $id;\n $aParameter['pagedef'] = 'tableeditor';\n $aParameter['tableid'] = $this->oTableConf->id;\n\n $sURL = PATH_CMS_CONTROLLER.'?'.$this->getUrlUtil()->getArrayAsUrl($aParameter);\n\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (true === $securityHelper->isGranted('CMS_RIGHT_ALLOW-LOGIN-AS-EXTRANET-USER')) {\n $sReturnValue .= \"<a href=\\\"{$sURL}\\\" target=\\\"_blank\\\"><i class=\\\"fas fa-user-check\\\" onMouseOver=\\\"$('#functionTitle_'+\".$row['cmsident'].\").html('\".TGlobal::Translate('chameleon_system_extranet.action.login_as_extranet_user').\"');\\\" onMouseOut=\\\"$('#functionTitle_'+\".$row['cmsident'].\").html('');\\\"></i></a>\";\n }\n\n $sReturnValue .= '<div id=\"functionTitle_'.$row['cmsident'].'\" class=\"functionTitle\"></div>';\n $sReturnValue .= '</div>';\n\n return $sReturnValue;\n }", "public function view_html($user_id){\n \n echo '<a href=\"javascript:void(0)\" class=\"mwb_points_update button button-primary mwb_wpr_save_changes\" data-id=\"'.$user_id.'\">'.__(\"Update\", MWB_WPR_Domain).'</a>';\n \n }", "public function liveUserAction()\n {\n \t// render the data and attach the grid to the response\n $this->getResponse()->setBody(\n \t$this->getLayout()->createBlock(\n \t\t'piwik/adminhtml_dashboard_tab_live_user'\n \t)->toHtml()\n );\n }", "function MyProfile_user_display()\r\n{\r\n $myprofile_dom = ZLanguage::getModuleDomain('MyProfile');\r\n // Security check\r\n if (!SecurityUtil::checkPermission('MyProfile::', '::', ACCESS_OVERVIEW)) return LogUtil::registerPermissionError();\r\n\r\n\t// Add js\t\t\r\n\tPageUtil::addVar('javascript','modules/MyProfile/pnjavascript/myprofile.js');\r\n\t\r\n\t// Create output and assign data\r\n\t$render \t= pnRender::getInstance('MyProfile');\r\n\t$uid\t\t= (int) FormUtil::getPassedValue('uid');\r\n\t$viewer_uid\t= pnUserGetVar('uid');\r\n\t$uname\t\t= FormUtil::getPassedValue('uname');\r\n\r\n\t// check for parameters and redirect to own profiel if there is no parameter\r\n\tif (!isset($uname) && ($uid < 2) && pnUserLoggedIn()) {\r\n\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => $viewer_uid)));\r\n\t}\r\n\r\n\t// get Plugin\r\n\t$pluginname = FormUtil::getPassedValue('pluginname');\r\n\tif (!isset($pluginname)) $pluginname=\"MyProfile\";\r\n\r\n\t// Caching settings\r\n \t$render->cache_id = (int)pnUserLoggedIn().'-'.$uid.'-'.$pluginname;\r\n\r\n\t// redirect to the MyProfile display page with user id as parameter to acoid trouble with any mis-spelled usernames or special characters\r\n\t// but only if uid is not submitted.\r\n\tif (isset($uname)) {\r\n\t\tif (pnUserGetIDFromName($uname) > 1) {\r\n\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t}\r\n\t\telse {\r\n\t\t \t// maybe the username has to be decoded due to some special characters...\r\n\t\t \t$last = FormUtil::getPassedValue('last');\r\n\t\t \tif (isset($last) && ($last == 1)) {\r\n\t\t \t \t// is the username utf8 encoded?\r\n\t\t \t \t$uname = utf8_decode($uname);\r\n\t\t \t \tif (pnUserGetIDFromName($uname) > 1) return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => pnUserGetIDFromName($uname))));\r\n\t\t\t\telse return pnRedirect(pnModURL('MyProfile','user','display',array('uid' => -1)));\r\n\t\t\t}\r\n\t\t \telse {\r\n\t\t \t \t// perhaps there are some special html characters?\r\n\t\t\t\treturn pnRedirect(pnModURL('MyProfile','user','display',array('uname' => html_entity_decode($uname), 'last' => 1)));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// We only reach this point if there is no uname parameter. Now we have to get the username for the profile\r\n\t// Guests are not allowed to have a profile page ;-)\r\n\t\r\n\t// get and assign online state of user\r\n\t$online = pnModAPIFunc('MyProfile','user','getOnline',array('uid' => $uid));\r\n\tif (is_array($online) && ($online[0]['id'] == $uid)) $render->assign('onlinestatus', 1);\r\n\telse $render->assign('onlinestatus', 0);\r\n\r\n\t// get profile\r\n\t$uname = pnUserGetVar('uname', $uid);\r\n\tif ($uid > 1) $profile = pnModAPIFunc('MyProfile','user','getProfile',array('uid'=>$uid, 'uname'=>$uname));\r\n\tif (\t!isset($uname) \t\t\t||\r\n\t\t\t!(strlen($uname) > 0) \t||\r\n\t\t\t!($uid > 1) )\t{\r\n\t\t// assign invalid user or user not found template\r\n\t\t$render = pnRender::getInstance('MyProfile');\r\n\t\treturn $render->fetch('myprofile_user_display_invalid.htm');\r\n\t}\r\n\t$render->assign('profile',$profile);\r\n\t\r\n\t// assign user name and uid\r\n\tif (isset($uid) && ($uid > 1)) $uname = pnUserGetVar('uname',$uid);\r\n\telse $name = pnUserGetIDFromName($uid);\r\n\t$render->assign('uname',\t\t\t\t$uname);\r\n\t$render->assign('encuname',\t\t\t\trawurlencode($uname));\r\n\t$render->assign('uid',\t\t\t\t\t$uid);\r\n\t$render->assign('viewer_uid',\t\t\t$viewer_uid);\r\n\t$render->assign('plugin_noajax',\t\tpnModGetVar('MyProfile','plugin_noajax'));\r\n\t$render->assign('homelink',\t\t\t\tpnGetBaseURL().pnModURL('MyProfile','user','tab',array('uid'=>$uid,'ajax'=>1,'modname'=>'MyProfile')));\r\n\r\n\t// Set Standard page title\r\n\tPageUtil::setVar('title', __('Profile of user', $myprofile_dom).' '.$uname);\r\n\r\n\t// ContactList plugin\r\n\t$render->assign('contactlistavailable',\tpnModAvailable('ContactList'));\r\n\tif (pnModAvailable('ContactList')) $render->assign('contactlist_nopublicbuddylist',\tpnModGetVar('ContactList','nopublicbuddylist'));\r\n\t\r\n\t$render->assign('pluginname',$pluginname);\r\n\tif (($pluginname != \"MyProfile\") && pnModAvailable($pluginname)) pnModLangLoad($pluginname);\r\n\r\n // get the plugins\r\n $plugins = pnModAPIFunc('MyProfile','admin','getPlugins',array('uid' => $uid));\r\n\r\n $render->assign('plugins',$plugins);\r\n // execute all \"onLoad\"-Funktions and sort out the invisible plugins\r\n pnModAPIFunc('MyMap','myprofile','onLoad');\r\n foreach ($plugins as $plugin) {\r\n\t \tpnModAPIFunc($plugin['loadname'],'myprofile','onLoad');\r\n\t}\r\n\t\r\n\t// and all necessary stylesheets\r\n\tpnModAPIFunc('MyProfile','user','addStyleSheets',array('plugins' => $plugins));\t\r\n\r\n\t// let's combine myprofile with clickedme and call clickedme whenever \r\n\t// anything (even a plugin) of a user was called\r\n\tif (($uid != $viewer_uid) && (pnModAvailable('ClickedMe'))) pnModAPIFunc('ClickedMe','user','addClick',array('clicked_uid' => $uid));\r\n\r\n\t// get the plugin output\r\n\t$output = pnModAPIFunc($pluginname,'myprofile','tab',array('uid' => $uid, 'uname' => $uname));\r\n\t$render->assign('content',$output);\r\n\t\r\n\t// Return the output\r\n return $render->fetch('myprofile_user_display.htm');\r\n}", "public function executeSelectionPage() {\n\t\t$this->addJavascript(\"/static/widgets/grid/grid.js\");\n\t\t$this->addJavascript(\"/static/data_model/data_list.js\");\n\t\t$this->onload(\"init_list();\");\n\t\t$this->addStylesheet(\"/static/selection/applicant/applicant_list.css\");\n\t\t$container_id = $this->generateID();\n\t\t$input = isset($_POST[\"input\"]) ? json_decode($_POST[\"input\"], true) : array();\n\t\t$campaign_id = @$_GET[\"campaign\"];\n\t\tif ($campaign_id == null) $campaign_id = PNApplication::$instance->selection->getCampaignId();\n\t\t\n\t\t$profile_page = null;\n\t\t$can_edit_applicants = PNApplication::$instance->user_management->hasRight(\"edit_applicants\");\n\t\t$can_create = $can_edit_applicants;\n\t\t$can_assign_to_is = $can_edit_applicants;\n\t\t$can_assign_to_exam = $can_edit_applicants;\n\t\t$can_assign_to_interview = $can_edit_applicants;\n\t\t$can_exclude = $can_edit_applicants;\n\t\t$can_remove = $can_edit_applicants;\n\t\t$is_final = false;\n\t\t$final_with_programs = false;\n\t\t$filters = \"\";\n\t\t$forced_fields = array();\n\t\tif (isset($_GET[\"type\"])) {\n\t\t\tswitch ($_GET[\"type\"]) {\n\t\t\t\tcase \"exam_passers\":\n\t\t\t\t\t$can_create = false;\n\t\t\t\t\t$can_remove = false;\n\t\t\t\t\t$can_assign_to_is = false;\n\t\t\t\t\t$can_assign_to_exam = false;\n\t\t\t\t\t$filters = \"filters.push({category:'Selection',name:'Eligible for Interview',force:true,data:{values:[1]}});\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"interview_passers\":\n\t\t\t\t\t$can_assign_to_is = false;\n\t\t\t\t\t$can_assign_to_exam = false;\n\t\t\t\t\t$can_assign_to_interview = false;\n\t\t\t\t\t$can_create = false;\n\t\t\t\t\t$can_remove = false;\n\t\t\t\t\t$filters = \"filters.push({category:'Selection',name:'Eligible for Social Investigation',force:true,data:{values:[1]}});\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"si\":\n\t\t\t\t\t$can_assign_to_is = false;\n\t\t\t\t\t$can_assign_to_exam = false;\n\t\t\t\t\t$can_assign_to_interview = false;\n\t\t\t\t\t$can_create = false;\n\t\t\t\t\t$can_remove = false;\n\t\t\t\t\t$filters = \"filters.push({category:'Selection',name:'Eligible for Social Investigation',force:true,data:{values:[1]}});\\n\";\n\t\t\t\t\t$profile_page = \"Social Investigation\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"final\":\n\t\t\t\t\t$can_assign_to_is = false;\n\t\t\t\t\t$can_assign_to_exam = false;\n\t\t\t\t\t$can_assign_to_interview = false;\n\t\t\t\t\t$can_exclude = false;\n\t\t\t\t\t$can_create = false;\n\t\t\t\t\t$can_remove = false;\n\t\t\t\t\t$final_with_programs = count($this->component->getPrograms()) > 1;\n\t\t\t\t\t$filters = \"filters.push({category:'Selection',name:'Eligible for Social Investigation',force:true,data:{values:[1]}});\\n\";\n\t\t\t\t\t$filters .= \"filters.push({category:'Selection',name:'Social Investigation Grade',force:true,data:{values:['NOT_NULL']}});\\n\";\n\t\t\t\t\t$filters .= \"filters.push({category:'Selection',name:'Excluded',force:true,data:{values:[0]}});\\n\";\n\t\t\t\t\tarray_push($forced_fields, array(\"Selection\",\"Final Decision of PN\"));\n\t\t\t\t\tif ($final_with_programs)\n\t\t\t\t\t\tarray_push($forced_fields, array(\"Selection\",\"Selected for program\"));\n\t\t\t\t\tarray_push($forced_fields, array(\"Selection\",\"Final Decision of Applicant\"));\n\t\t\t\t\tarray_push($forced_fields, array(\"Selection\",\"Reason of Applicant to decline\"));\n\t\t\t\t\tif ($final_with_programs) {\n\t\t\t\t\t\t$batch = array();\n\t\t\t\t\t\tforeach ($this->component->getPrograms() as $program)\n\t\t\t\t\t\t\tif ($program[\"batch\"] <> null)\n\t\t\t\t\t\t\t\t$batch[$program[\"batch\"]] = PNApplication::$instance->curriculum->getBatch($program[\"batch\"]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$batch_id = SQLQuery::create()->select(\"SelectionCampaign\")->whereValue(\"SelectionCampaign\",\"id\",$this->component->getCampaignId())->field(\"batch\")->executeSingleValue();\n\t\t\t\t\t\tif ($batch_id <> null)\n\t\t\t\t\t\t\t$batch = PNApplication::$instance->curriculum->getBatch($batch_id);\n\t\t\t\t\t}\n\t\t\t\t\t$is_final = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t?>\n\t\t<div style='width:100%;height:100%;display:flex;flex-direction:column;'>\n\t\t\t<div id='list_container' style=\"flex:1 1 auto\"></div>\n\t\t\t<?php if (PNApplication::$instance->user_management->hasRight(\"edit_applicants\")) {?>\n\t\t\t<div class='page_footer' style=\"flex:none;\">\n\t\t\t\t<span id='nb_selected'>0 applicant selected</span>:\n\t\t\t\t<?php\n\t\t\t\t$nb_can_assign = 0;\n\t\t\t\tif ($can_assign_to_is) $nb_can_assign++;\n\t\t\t\tif ($can_assign_to_exam) $nb_can_assign++;\n\t\t\t\tif ($can_assign_to_interview) $nb_can_assign++;\n\t\t\t\tif ($nb_can_assign > 1) echo \"Assign to \";\n\t\t\t\t?>\n\t\t\t\t<?php if ($can_assign_to_is) {?> \n\t\t\t\t<button class='action' id='button_assign_is' disabled='disabled' onclick='assignIS(this);'><?php if ($nb_can_assign == 1) echo \"Assign to \";?>Information Session</button>\n\t\t\t\t<?php }?>\n\t\t\t\t<?php if ($can_assign_to_exam) {?> \n\t\t\t\t<button class='action' id='button_assign_exam_center' disabled='disabled' onclick='assignExamCenter(this);'><?php if ($nb_can_assign == 1) echo \"Assign to \";?>Exam Center</button>\n\t\t\t\t<?php }?>\n\t\t\t\t<?php if ($can_assign_to_interview) {?> \n\t\t\t\t<button class='action' id='button_assign_interview_center' disabled='disabled' onclick='assignInterviewCenter(this);'><?php if ($nb_can_assign == 1) echo \"Assign to \";?>Interview Center</button>\n\t\t\t\t<?php }?>\n\t\t\t\t<?php if ($can_exclude) { ?> \n\t\t\t\t<button class='action red' id='button_exclude' disabled='disabled' onclick=\"excludeStudents();\">Exclude from the process</button>\n\t\t\t\t<?php }?>\n\t\t\t\t<?php if ($can_remove) { ?> \n\t\t\t\t<button class='action red' id='button_remove' disabled='disabled' onclick=\"removeStudents();\">Definitely Remove</button>\n\t\t\t\t<?php }?>\n\t\t\t\t<?php if ($is_final) { ?>\n\t\t\t\t<span style='white-space: nowrap'>\n\t\t\t\t<b><i>PN Decision:</i></b>\n\t\t\t\t<?php if ($final_with_programs) {\n\t\t\t\t\tforeach ($this->component->getPrograms() as $program)\n\t\t\t\t\t\techo \"<button class='action green' id='button_pn_selected_\".$program[\"id\"].\"' disabled='disabled' onclick='PNSelected(\".$program[\"id\"].\");'>Selected for \".toHTML($program[\"name\"]).\"</button>\";\n\t\t\t\t\tforeach ($this->component->getPrograms() as $program)\n\t\t\t\t\t\techo \"<button class='action' id='button_pn_waiting_list_\".$program[\"id\"].\"' disabled='disabled' onclick='PNWaitingList(\".$program[\"id\"].\");'>Waiting List for \".toHTML($program[\"name\"]).\"</button>\";\n\t\t\t\t} else { ?>\n\t\t\t\t<button class='action green' id='button_pn_selected' disabled='disabled' onclick='PNSelected();'>Selected!</button>\n\t\t\t\t<button class='action' id='button_pn_waiting_list' disabled='disabled' onclick='PNWaitingList();'>Waiting List</button>\n\t\t\t\t<?php } ?>\n\t\t\t\t<button class='action red' id='button_pn_no' disabled='disabled' onclick='PNNo();'>No</button>\n\t\t\t\t<button class='action grey' id='button_pn_remove' disabled='disabled' onclick='PNRemove();'>Remove Decision</button>\n\t\t\t\t</span>\n\t\t\t\t<span style='white-space: nowrap'>\n\t\t\t\t<b><i>Applicant decision:</i></b>\n\t\t\t\t<button class='action green' id='button_app_yes' disabled='disabled' onclick='ApplicantYes();'>Yes</button>\n\t\t\t\t<button class='action red' id='button_app_no' disabled='disabled' onclick='ApplicantNo();'>No</button>\n\t\t\t\t<button class='action grey' id='button_app_remove' disabled='disabled' onclick='ApplicantRemove();'>Remove Decision</button>\n\t\t\t\t</span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php } ?>\n\t\t</div>\n\t\t<script type='text/javascript'>\n\t\tvar dl;\n\t\tvar filters = <?php if (isset($input[\"filters\"])) echo json_encode($input[\"filters\"]); else echo \"[]\"; ?>;\n\t\t<?php echo $filters; ?>\n\t\tfunction init_list() {\n\t\t\tdl = new data_list(\n\t\t\t\t'list_container',\n\t\t\t\t'Applicant', <?php echo $campaign_id;?>,\n\t\t\t\t[\n\t\t\t\t\t'Selection.ID',\n\t\t\t\t\t'Personal Information.First Name',\n\t\t\t\t\t'Personal Information.Last Name',\n\t\t\t\t\t'Personal Information.Gender',\n\t\t\t\t\t'Personal Information.Birth Date',\n\t\t\t\t\t'Personal Information.Address.0',\n\t\t\t\t\t'Personal Information.Address.1',\n\t\t\t\t\t'Selection.Information Session',\n\t\t\t\t\t'Selection.Exam Center',\n\t\t\t\t\t'Selection.Interview Center'\n\t\t\t\t],\n\t\t\t\tfilters,\n\t\t\t\t<?php echo isset($_GET[\"all\"]) ? \"-1\" : \"100\"; ?>,\n\t\t\t\t'Personal Information.Last Name',\n\t\t\t\ttrue,\n\t\t\t\tfunction (list) {\n\t\t\t\t\t // make the info available to be able to change the color\n\t\t\t\t\tlist.alwaysGetField('Selection','Excluded');\n\t\t\t\t\tlist.setRowClassProvider(function(sent_fields, received_values) {\n\t\t\t\t\t\tvar index;\n\t\t\t\t\t\tfor (index = 0; index < sent_fields.length; ++index)\n\t\t\t\t\t\t\tif (sent_fields[index].name == \"Excluded\" && sent_fields[index].category == \"Selection\") break;\n\t\t\t\t\t\tif (received_values[index].v == 1)\n\t\t\t\t\t\t\treturn \"excluded_applicant\"; // excluded in red\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t});\n\t\t\t\t\tlist.grid.makeScrollable();\n\t\t\t\t\tvar get_creation_data = function() {\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\tsub_models:{SelectionCampaign:<?php echo PNApplication::$instance->selection->getCampaignId();?>},\n\t\t\t\t\t\t\tprefilled_data:[]\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvar filters = list.getFilters();\n\t\t\t\t\t\tfor (var i = 0; i < filters.length; ++i) {\n\t\t\t\t\t\t\tif (filters[i].category == \"Selection\") {\n\t\t\t\t\t\t\t\tif (filters[i].name == \"Information Session\") {\n\t\t\t\t\t\t\t\t\tif (filters[i].data.values.length == 1 && filters[i].data.values[0] != 'NULL' && filters[i].data.values != 'NOT_NULL')\n\t\t\t\t\t\t\t\t\t\tdata.prefilled_data.push({table:\"Applicant\",data:\"Information Session\",value:filters[i].data.values[0]});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t};\n\t\t\t\t\tlist.addTitle(\"/static/selection/applicant/applicants_16.png\", <?php if (isset($input[\"title\"])) echo json_encode($input[\"title\"]); else echo \"'Applicants'\";?>);\n\n\t\t\t\t\t<?php if (PNApplication::$instance->user_management->hasRight(\"edit_applicants\") && $can_create) {?>\n\t\t\t\t\tvar create_applicant = document.createElement(\"BUTTON\");\n\t\t\t\t\tcreate_applicant.className = \"flat\";\n\t\t\t\t\tcreate_applicant.innerHTML = \"<img src='\"+theme.build_icon(\"/static/selection/applicant/applicant_16.png\",theme.icons_10.add)+\"' style='vertical-align:bottom'/> Create Applicant\";\n\t\t\t\t\tcreate_applicant.onclick = function() {\n\t\t\t\t\t\twindow.top.require(\"popup_window.js\",function() {\n\t\t\t\t\t\t\tvar p = new window.top.popup_window('New Applicant', theme.build_icon(\"/static/selection/applicant/applicant_16.png\",theme.icons_10.add), \"\");\n\t\t\t\t\t\t\tvar frame = p.setContentFrame(\"/dynamic/people/page/popup_create_people?types=applicant&not_from_existing=true&ondone=reload_list\", null, get_creation_data());\n\t\t\t\t\t\t\tframe.reload_list = reload_list;\n\t\t\t\t\t\t\tp.show();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tlist.addHeader(create_applicant);\n\n\t\t\t\t\tvar import_applicants = document.createElement(\"BUTTON\");\n\t\t\t\t\timport_applicants.className = \"flat\";\n\t\t\t\t\timport_applicants.innerHTML = \"<img src='\"+theme.icons_16._import+\"' style='vertical-align:bottom'/> Import Applicants\";\n\t\t\t\t\timport_applicants.onclick = function() {\n\t\t\t\t\t\twindow.top.require(\"popup_window.js\",function() {\n\t\t\t\t\t\t\tvar p = new window.top.popup_window('Import Applicants', theme.icons_16._import, \"\");\n\t\t\t\t\t\t\tvar frame = p.setContentFrame(\"/dynamic/selection/page/applicant/popup_import?ondone=reload_list\", null, get_creation_data());\n\t\t\t\t\t\t\tframe.reload_list = reload_list;\n\t\t\t\t\t\t\tp.show();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tlist.addHeader(import_applicants);\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<?php if ($is_final && PNApplication::$instance->user_management->hasRight(\"manage_selection_campaign\")) {\n\t\t\t\t\t\tif ($final_with_programs) {\n\t\t\t\t\t\t\tforeach ($this->component->getPrograms() as $program) {\n\t\t\t\t\t\t\t\tif ($program[\"batch\"] == null) { ?>\n\t\t\t\t\t\t\t\t\tvar create_batch = document.createElement(\"BUTTON\");\n\t\t\t\t\t\t\t\t\tcreate_batch.className = \"flat\";\n\t\t\t\t\t\t\t\t\tcreate_batch.style.fontWeight = \"bold\";\n\t\t\t\t\t\t\t\t\tcreate_batch.innerHTML = \"<img src='/static/curriculum/batch_16.png'/> Create a Batch with list of \"+<?php echo json_encode(toHTML($program[\"name\"])); ?>;\n\t\t\t\t\t\t\t\t\tcreate_batch.onclick = function() {\n\t\t\t\t\t\t\t\t\t\tpopupFrame(theme.build_icon(\"/static/curriculum/batch_16.png\",theme.icons_10.add), \"Create Batch from Selection\", \"/dynamic/selection/page/create_batch?ondone=reloadPage&program=<?php echo $program[\"id\"];?>\", null, null, null, function(frame,popup) {\n\t\t\t\t\t\t\t\t\t\t\tframe.reloadPage = function() {\n\t\t\t\t\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tlist.addHeader(create_batch);\n\t\t\t\t\t\t\t\t\t<?php\t\n\t\t\t\t\t\t\t\t} else { ?>\n\t\t\t\t\t\t\t\t\tvar update_batch = document.createElement(\"BUTTON\");\n\t\t\t\t\t\t\t\t\tupdate_batch.className = \"flat\";\n\t\t\t\t\t\t\t\t\tupdate_batch.style.fontWeight = \"bold\";\n\t\t\t\t\t\t\t\t\tupdate_batch.innerHTML = \"<img src='/static/curriculum/batch_16.png'/> Update Batch <?php echo toHTML($batch[$program[\"batch\"]][\"name\"]); ?> with \"+<?php echo json_encode(toHTML($program[\"name\"])); ?>;\n\t\t\t\t\t\t\t\t\tupdate_batch.onclick = function() {\n\t\t\t\t\t\t\t\t\t\tpopupFrame(theme.build_icon(\"/static/curriculum/batch_16.png\",theme.icons_10.add), \"Update Batch from Selection\", \"/dynamic/selection/page/update_batch_confirm?batch=<?php echo $program[\"batch\"];?>&program=<?php echo $program[\"id\"];?>\", null, null, null, function(frame,popup) {\n\t\t\t\t\t\t\t\t\t\t\tframe.confirmed = function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar locker = lockScreen(null, \"Updating batch of students...\");\n\t\t\t\t\t\t\t\t\t\t\t\tservice.json(\"selection\",\"update_batch\",{batch:<?php echo $program[\"batch\"];?>,program:<?php echo $program[\"id\"];?>},function(res) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tunlockScreen(locker);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tlist.addHeader(update_batch);\n\t\t\t\t\t\t\t\t\tvar unlink_batch = document.createElement(\"BUTTON\");\n\t\t\t\t\t\t\t\t\tunlink_batch.className = \"flat\";\n\t\t\t\t\t\t\t\t\tunlink_batch.style.fontWeight = \"bold\";\n\t\t\t\t\t\t\t\t\tunlink_batch.innerHTML = \"<img src='\"+theme.icons_16.unlink+\"'/> Unlink \"+<?php echo json_encode(toHTML($program[\"name\"])); ?>+\" with Batch <?php echo toHTML($batch[$program[\"batch\"]][\"name\"]); ?>\";\n\t\t\t\t\t\t\t\t\tunlink_batch.onclick = function() {\n\t\t\t\t\t\t\t\t\t\tconfirmDialog(\"Are you sure you want to unlink this selection process with this Batch ?<br/>All the applicants who were already included in the batch will be removed from the batch.\",function(yes) {\n\t\t\t\t\t\t\t\t\t\t\tif (!yes) return;\n\t\t\t\t\t\t\t\t\t\t\tservice.json(\"selection\",\"unlink_batch\",{program:<?php echo $program[\"id\"];?>},function(res) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (res) location.reload();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tlist.addHeader(unlink_batch);\n\t\t\t\t\t\t\t\t\t<?php \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\tif ($batch_id <> null) {?>\n\t\t\t\t\t\t\t\tvar update_batch = document.createElement(\"BUTTON\");\n\t\t\t\t\t\t\t\tupdate_batch.className = \"flat\";\n\t\t\t\t\t\t\t\tupdate_batch.style.fontWeight = \"bold\";\n\t\t\t\t\t\t\t\tupdate_batch.innerHTML = \"<img src='/static/curriculum/batch_16.png'/> Update Batch <?php echo toHTML($batch[\"name\"]); ?> with final list\";\n\t\t\t\t\t\t\t\tupdate_batch.onclick = function() {\n\t\t\t\t\t\t\t\t\tpopupFrame(theme.build_icon(\"/static/curriculum/batch_16.png\",theme.icons_10.add), \"Update Batch from Selection\", \"/dynamic/selection/page/update_batch_confirm?batch=<?php echo $batch_id;?>\", null, null, null, function(frame,popup) {\n\t\t\t\t\t\t\t\t\t\tframe.confirmed = function() {\n\t\t\t\t\t\t\t\t\t\t\tvar locker = lockScreen(null, \"Updating batch of students...\");\n\t\t\t\t\t\t\t\t\t\t\tservice.json(\"selection\",\"update_batch\",{batch:<?php echo $batch_id;?>},function(res) {\n\t\t\t\t\t\t\t\t\t\t\t\tunlockScreen(locker);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tlist.addHeader(update_batch);\n\t\t\t\t\t\t\t\tvar unlink_batch = document.createElement(\"BUTTON\");\n\t\t\t\t\t\t\t\tunlink_batch.className = \"flat\";\n\t\t\t\t\t\t\t\tunlink_batch.style.fontWeight = \"bold\";\n\t\t\t\t\t\t\t\tunlink_batch.innerHTML = \"<img src='\"+theme.icons_16.unlink+\"'/> Unlink this selection with Batch <?php echo toHTML($batch[\"name\"]); ?>\";\n\t\t\t\t\t\t\t\tunlink_batch.onclick = function() {\n\t\t\t\t\t\t\t\t\tconfirmDialog(\"Are you sure you want to unlink this selection process with this Batch ?<br/>All the applicants who were already included in the batch will be removed from the batch.\",function(yes) {\n\t\t\t\t\t\t\t\t\t\tif (!yes) return;\n\t\t\t\t\t\t\t\t\t\tservice.json(\"selection\",\"unlink_batch\",{},function(res) {\n\t\t\t\t\t\t\t\t\t\t\tif (res) location.reload();\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tlist.addHeader(unlink_batch);\n\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\tvar create_batch = document.createElement(\"BUTTON\");\n\t\t\t\t\t\t\t\tcreate_batch.className = \"flat\";\n\t\t\t\t\t\t\t\tcreate_batch.style.fontWeight = \"bold\";\n\t\t\t\t\t\t\t\tcreate_batch.innerHTML = \"<img src='/static/curriculum/batch_16.png'/> Create a Batch of students with final list\";\n\t\t\t\t\t\t\t\tcreate_batch.onclick = function() {\n\t\t\t\t\t\t\t\t\tpopupFrame(theme.build_icon(\"/static/curriculum/batch_16.png\",theme.icons_10.add), \"Create Batch from Selection\", \"/dynamic/selection/page/create_batch?ondone=reloadPage\", null, null, null, function(frame,popup) {\n\t\t\t\t\t\t\t\t\t\tframe.reloadPage = function() {\n\t\t\t\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tlist.addHeader(create_batch);\n\t\t\t\t\t\t\t<?php }\n\t\t\t\t\t\t} \n\t\t\t\t\t} ?>\n\n\t\t\t\t\t<?php if (PNApplication::$instance->user_management->hasRight(\"edit_applicants\")) { ?>\n\t\t\t\t\tlist.grid.setSelectable(true);\n\t\t\t\t\tlist.grid.onselect = selectionChanged;\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\tvar has_forced_filter = false;\n\t\t\t\t\tfor (var i = 0; i < filters.length; ++i)\n\t\t\t\t\t\tif (filters[i].force) { has_forced_filter = true; break; }\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar or = filters[i].or;\n\t\t\t\t\t\t\twhile (or) { if (or.force) { has_forced_filter = true; break; } or = or.or; }\n\t\t\t\t\t\t\tif (has_forced_filter) break;\n\t\t\t\t\t\t}\n\t\t\t\t\tif (!has_forced_filter) {\n\t\t\t\t\t\tvar predefined_filters = document.createElement(\"BUTTON\");\n\t\t\t\t\t\tpredefined_filters.className = \"flat\";\n\t\t\t\t\t\tpredefined_filters.innerHTML = \"<img src='/static/data_model/filter.gif'/> Pre-defined filters\";\n\t\t\t\t\t\tpredefined_filters.onclick = function() {\n\t\t\t\t\t\t\tvar t=this;\n\t\t\t\t\t\t\trequire(\"context_menu.js\",function() {\n\t\t\t\t\t\t\t\tvar menu = new context_menu();\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show all applicants (remove all filters)\", function() {\n\t\t\t\t\t\t\t\t\tlist.resetFilters();\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only those still in the process (not excluded)\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Excluded');\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exclusion Reason');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Excluded',data:{values:[0]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only those excluded from the process\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Excluded');\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exclusion Reason');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Excluded',data:{values:[1]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addSubMenuItem(null, \"Show only those excluded because of\", function(sub_menu, onready) {\n\t\t\t\t\t\t\t\t\tvar f = list.getField(\"Selection\", \"Exclusion Reason\");\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < f.filter_config.possible_values.length; ++i) {\n\t\t\t\t\t\t\t\t\t\tvar val = f.filter_config.possible_values[i];\n\t\t\t\t\t\t\t\t\t\tsub_menu.addIconItem(null, val, function(ev, val) {\n\t\t\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Excluded');\n\t\t\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exclusion Reason');\n\t\t\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Exclusion Reason',data:{values:[val]}});\n\t\t\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t\t\t}, val);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonready();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addSubMenuItem(null, \"Show only those coming from a specific Information Session\", function(sub_menu, onready) {\n\t\t\t\t\t\t\t\t\tvar f = list.getField(\"Selection\", \"Information Session\");\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < f.filter_config.possible_values.length; ++i) {\n\t\t\t\t\t\t\t\t\t\tvar val = f.filter_config.possible_values[i];\n\t\t\t\t\t\t\t\t\t\tsub_menu.addIconItem(null, val[1], function(ev, val) {\n\t\t\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Information Session');\n\t\t\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Information Session',data:{values:[val]}});\n\t\t\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t\t\t}, val[0]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonready();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only those who are not assigned to any Information Session\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Information Session');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Information Session',data:{values:[\"NULL\"]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addSubMenuItem(null, \"Show only those from a psecific Exam Center\", function(sub_menu, onready) {\n\t\t\t\t\t\t\t\t\tvar f = list.getField(\"Selection\", \"Exam Center\");\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < f.filter_config.possible_values.length; ++i) {\n\t\t\t\t\t\t\t\t\t\tvar val = f.filter_config.possible_values[i];\n\t\t\t\t\t\t\t\t\t\tsub_menu.addIconItem(null, val[1], function(ev, val) {\n\t\t\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exam Center');\n\t\t\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Exam Center',data:{values:[val]}});\n\t\t\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t\t\t}, val[0]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonready();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only those who are not assigned to any Exam Center\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exam Center');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Exam Center',data:{values:[\"NULL\"]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addSubMenuItem(null, \"Show only those from a specific High School\", function(sub_menu, onready) {\n\t\t\t\t\t\t\t\t\tvar f = list.getField(\"Selection\", \"High School\");\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < f.filter_config.list.length; ++i) {\n\t\t\t\t\t\t\t\t\t\tvar val = f.filter_config.list[i];\n\t\t\t\t\t\t\t\t\t\tsub_menu.addIconItem(null, val.name, function(ev, val) {\n\t\t\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','High School');\n\t\t\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'High School',data:[val]});\n\t\t\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t\t\t}, val.id);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonready();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only those who are not assigned to any High School\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','High School');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'High School',data:[\"NULL\"]});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addSubMenuItem(null, \"Show only those followed by a specific NGO\", function(sub_menu, onready) {\n\t\t\t\t\t\t\t\t\tvar f = list.getField(\"Selection\", \"Following NGO\");\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < f.filter_config.list.length; ++i) {\n\t\t\t\t\t\t\t\t\t\tvar val = f.filter_config.list[i];\n\t\t\t\t\t\t\t\t\t\tsub_menu.addIconItem(null, val.name, function(ev, val) {\n\t\t\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Following NGO');\n\t\t\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Following NGO',data:[val]});\n\t\t\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t\t\t}, val.id);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonready();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only those who are not followed by any NGO\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Following NGO');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Following NGO',data:[\"NULL\"]});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only if eligible for Interview (exam passers)\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Eligible for Interview');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Eligible for Interview',data:{values:[1]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only absent during exam\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exam Attendance');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Exam Attendance',data:{values:['No']}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only if eligible for Social Investigation (interview passers)\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Eligible for Social Investigation');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Eligible for Social Investigation',data:{values:[1]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only absent during interview\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Selection','Exam Attendance');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Interview Attendance',data:{values:[0]}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only boys\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Personal Information','Gender');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Personal Information',name:'Gender',data:{values:['M']}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.addIconItem(null, \"Show only girls\", function() {\n\t\t\t\t\t\t\t\t\tlist.removeFiltersOn('Personal Information','Gender');\n\t\t\t\t\t\t\t\t\tlist.addFilter({category:'Personal Information',name:'Gender',data:{values:['F']}});\n\t\t\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tmenu.showBelowElement(t);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlist.addHeader(predefined_filters);\n\t\t\t\t\t}\n\n\t\t\t\t\t<?php if (@$_GET[\"type\"] == \"si\") {?>\n\t\t\t\t\tvar div = document.createElement(\"DIV\");\n\t\t\t\t\tdiv.style.marginLeft = \"5px\";\n\t\t\t\t\tdiv.innerHTML = \"Show only applicants \";\n\t\t\t\t\tvar select = document.createElement(\"SELECT\");\n\t\t\t\t\tvar o;\n\t\t\t\t\to = document.createElement(\"OPTION\");\n\t\t\t\t\to.value = 'all';\n\t\t\t\t\to.text = \"eligible for social investigation\";\n\t\t\t\t\tselect.add(o);\n\t\t\t\t\to = document.createElement(\"OPTION\");\n\t\t\t\t\to.value = 'to_be_visited';\n\t\t\t\t\to.text = \"who have to be visited\";\n\t\t\t\t\tselect.add(o);\n\t\t\t\t\to = document.createElement(\"OPTION\");\n\t\t\t\t\to.value = 'to_be_reviewed';\n\t\t\t\t\to.text = \"who have been visited, to be reviewed\";\n\t\t\t\t\tselect.add(o);\n\t\t\t\t\to = document.createElement(\"OPTION\");\n\t\t\t\t\to.value = 'passers';\n\t\t\t\t\to.text = \"who passed the social investigation\";\n\t\t\t\t\tselect.add(o);\n\t\t\t\t\tdiv.appendChild(select);\n\t\t\t\t\tlist.addHeader(div);\n\t\t\t\t\tselect.onchange = function() {\n\t\t\t\t\t\tswitch (this.value) {\n\t\t\t\t\t\tcase \"all\":\n\t\t\t\t\t\t\tlist.resetFilters();\n\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"to_be_visited\":\n\t\t\t\t\t\t\tlist.resetFilters();\n\t\t\t\t\t\t\tlist.addFilter({\n\t\t\t\t\t\t\t\tcategory:'Selection',name:'Social Investigation Visits',\n\t\t\t\t\t\t\t\tdata:{type:'null'},\n\t\t\t\t\t\t\t\tor: {\n\t\t\t\t\t\t\t\t\tcategory:'Selection',name:'Social Investigation Visits',\n\t\t\t\t\t\t\t\t\tdata:{type:'>0',element_data:{type:'more_equals',value:parseSQLDate(dateToSQL(new Date()),true).getTime()/1000}}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"to_be_reviewed\":\n\t\t\t\t\t\t\tlist.resetFilters();\n\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Social Investigation Grade',data:{values:[\"NULL\"]}});\n\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Social Investigation Visits',data:{type:'not_null'}});\n\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Social Investigation Visits',data:{type:'none',element_data:{type:'more_equals',value:parseSQLDate(dateToSQL(new Date()),true).getTime()/1000}}});\n\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"passers\":\n\t\t\t\t\t\t\tvar f = list.getField(\"Selection\",\"Final Decision of PN\");\n\t\t\t\t\t\t\tif (!list.isShown(f))\n\t\t\t\t\t\t\t\tlist.showField(f,false,null,true);\n\t\t\t\t\t\t\tf = list.getField(\"Selection\",\"Final Decision of Applicant\");\n\t\t\t\t\t\t\tif (!list.isShown(f))\n\t\t\t\t\t\t\t\tlist.showField(f,false,null,true);\n\t\t\t\t\t\t\tf = list.getField(\"Selection\",\"Reason of Applicant to decline\");\n\t\t\t\t\t\t\tif (!list.isShown(f))\n\t\t\t\t\t\t\t\tlist.showField(f,false,null,true);\n\t\t\t\t\t\t\tlist.resetFilters();\n\t\t\t\t\t\t\tlist.addFilter({category:'Selection',name:'Social Investigation Grade',data:{values:[\"Priority 1 (A+)\", \"Priority 2 (A)\", \"Priority 3 (A-)\", \"Priority 4 (B+)\", \"Priority 5 (B)\"]}});\n\t\t\t\t\t\t\tlist.reloadData();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\tlist.makeRowsClickable(function(row){\n\t\t\t\t\t\twindow.top.popupFrame('/static/selection/applicant/applicant_16.png', 'Applicant', \"/dynamic/people/page/profile?people=\"+list.getTableKeyForRow(\"People\",row.row_id)<?php if ($profile_page<>null) echo \"+'&page=\".urlencode($profile_page).\"'\";?>, {sub_models:{SelectionCampaign:<?php echo PNApplication::$instance->selection->getCampaignId();?>}}, 95, 95); \n\t\t\t\t\t});\n\n\t\t\t\t\t<?php \n\t\t\t\t\tforeach ($forced_fields as $ff)\n\t\t\t\t\t\techo \"list.showField(list.getField(\".json_encode($ff[0]).\",\".json_encode($ff[1]).\"),true,null,true);\";\n\t\t\t\t\t?>\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tfunction reload_list() {\n\t\t\tdl.reloadData();\n\t\t};\n\t\tfunction selectionChanged(indexes, rows_ids) {\n\t\t\tdocument.getElementById('nb_selected').innerHTML = indexes.length+\" applicant\"+(indexes.length>1?\"s\":\"\")+\" selected\";\n\t\t\t<?php if ($can_assign_to_is) { ?>\n\t\t\tdocument.getElementById('button_assign_is').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t\t<?php if ($can_assign_to_exam) { ?>\n\t\t\tdocument.getElementById('button_assign_exam_center').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t\t<?php if ($can_assign_to_interview) { ?>\n\t\t\tdocument.getElementById('button_assign_interview_center').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t\t<?php if ($can_exclude) { ?>\n\t\t\tdocument.getElementById('button_exclude').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t\t<?php if ($can_remove) { ?>\n\t\t\tdocument.getElementById('button_remove').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t\t<?php if ($is_final) { ?>\n\t\t\t<?php if ($final_with_programs) {\n\t\t\t\tforeach ($this->component->getPrograms() as $program) {\n\t\t\t\t\techo \"document.getElementById('button_pn_selected_\".$program[\"id\"].\"').disabled = indexes.length > 0 ? '' : 'disabled';\";\n\t\t\t\t\techo \"document.getElementById('button_pn_waiting_list_\".$program[\"id\"].\"').disabled = indexes.length > 0 ? '' : 'disabled';\";\n\t\t\t\t}\n\t\t\t} else { ?>\n\t\t\tdocument.getElementById('button_pn_selected').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\tdocument.getElementById('button_pn_waiting_list').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t\tdocument.getElementById('button_pn_no').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\tdocument.getElementById('button_pn_remove').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\tdocument.getElementById('button_app_yes').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\tdocument.getElementById('button_app_no').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\tdocument.getElementById('button_app_remove').disabled = indexes.length > 0 ? \"\" : \"disabled\";\n\t\t\t<?php } ?>\n\t\t}\n\t\tfunction getSelectedApplicantsIds() {\n\t\t\tvar applicants_rows = dl.grid.getSelectionByRowId();\n\t\t\tvar applicants_ids = [];\n\t\t\tfor (var i = 0; i < applicants_rows.length; ++i)\n\t\t\t\tapplicants_ids.push(dl.getTableKeyForRow(\"Applicant\", applicants_rows[i]));\n\t\t\treturn applicants_ids;\n\t\t}\n\t\tfunction assignIS(button) {\n\t\t\trequire(\"assign_is.js\", function() {\n\t\t\t\tassign_is(button, getSelectedApplicantsIds(), function() {\n\t\t\t\t\treload_list();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\tfunction assignExamCenter(button) {\n\t\t\tpopupFrame(\"/static/selection/exam/exam_center_16.png\", \"Assign applicants to an exam center\", \"/dynamic/selection/page/exam/assign_applicants_to_center?ondone=refreshList\", {applicants:getSelectedApplicantsIds()}, null, null, function(frame,popup) {\n\t\t\t\tframe.refreshList = reload_list;\n\t\t\t});\n\t\t}\n\t\tfunction assignInterviewCenter(button) {\n\t\t\tpopupFrame(\"/static/selection/interview/interview_16.png\", \"Assign applicants to an interview center\", \"/dynamic/selection/page/interview/assign_applicants_to_center?ondone=refreshList\", {applicants:getSelectedApplicantsIds()}, null, null, function(frame,popup) {\n\t\t\t\tframe.refreshList = reload_list;\n\t\t\t});\n\t\t}\n\t\tfunction excludeStudents() {\n\t\t\tpopupFrame(null, \"Exclude applicants from the selection process\", \"/dynamic/selection/page/applicant/exclude?ondone=refreshList\", {applicants:getSelectedApplicantsIds()}, null, null, function(frame,popup) {\n\t\t\t\tframe.refreshList = reload_list;\n\t\t\t});\n\t\t}\n\t\tfunction removeStudents() {\n\t\t\tvar applicants_ids = getSelectedApplicantsIds();\n\t\t\tconfirmDialog(\n\t\t\t\t\"You are requesting to definitely remove \"+(applicants_ids.length > 1 ? applicants_ids.length+\" applicants\" : \"an applicant\")+\" from the database.<br/>\"+\n\t\t\t\t\"This must be done only if it was a mistake when creating \"+(applicants_ids.length > 1 ? \"it\" : \"them\")+\".<br/>\"+\n\t\t\t\t\"Else you should use the functionality to exclude from the process.<br/>\"+\n\t\t\t\t\"<br/>\"+\n\t\t\t\t\"Do you confirm you want to definitely remove from the database ?\",\n\t\t\t\tfunction(yes) {\n\t\t\t\t\tif (!yes) return;\n\t\t\t\t\tservice.json(\"selection\",\"applicant/remove\",{applicants:applicants_ids},function(res) {\n\t\t\t\t\t\tif (res) reload_list();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tfunction PNSelected(program_id) {\n\t\t\tvar locker = lockScreen();\n\t\t\tvar cells = [{\n\t\t\t\ttable: 'Applicant',\n\t\t\t\tsub_model: <?php echo PNApplication::$instance->selection->getCampaignId();?>,\n\t\t\t\tkeys: getSelectedApplicantsIds(),\n\t\t\t\tvalues: [{column:'final_decision',value:'Selected'}]\n\t\t\t}];\n\t\t\tif (program_id) cells[0].values.push({column:'program',value:program_id});\n\t\t\tservice.json(\"data_model\",\"save_cells\",{cells:cells},function(res) {\n\t\t\t\treload_list();\n\t\t\t\tunlockScreen(locker);\n\t\t\t});\n\t\t}\n\t\tfunction PNWaitingList(program_id) {\n\t\t\tvar locker = lockScreen();\n\t\t\tvar cells = [{\n\t\t\t\ttable: 'Applicant',\n\t\t\t\tsub_model: <?php echo PNApplication::$instance->selection->getCampaignId();?>,\n\t\t\t\tkeys: getSelectedApplicantsIds(),\n\t\t\t\tvalues: [{column:'final_decision',value:'Waiting List'}]\n\t\t\t}];\n\t\t\tif (program_id) cells[0].values.push({column:'program',value:program_id});\n\t\t\tservice.json(\"data_model\",\"save_cells\",{cells:cells},function(res) {\n\t\t\t\treload_list();\n\t\t\t\tunlockScreen(locker);\n\t\t\t});\n\t\t}\n\t\tfunction PNNo() {\n\t\t\tvar locker = lockScreen();\n\t\t\tservice.json(\"data_model\",\"save_cells\",{cells:[{\n\t\t\t\ttable: 'Applicant',\n\t\t\t\tsub_model: <?php echo PNApplication::$instance->selection->getCampaignId();?>,\n\t\t\t\tkeys: getSelectedApplicantsIds(),\n\t\t\t\tvalues: [{column:'final_decision',value:'Rejected'},{column:'program',value:null}]\n\t\t\t}]},function(res) {\n\t\t\t\treload_list();\n\t\t\t\tunlockScreen(locker);\n\t\t\t});\n\t\t}\n\t\tfunction PNRemove() {\n\t\t\tvar locker = lockScreen();\n\t\t\tservice.json(\"data_model\",\"save_cells\",{cells:[{\n\t\t\t\ttable: 'Applicant',\n\t\t\t\tsub_model: <?php echo PNApplication::$instance->selection->getCampaignId();?>,\n\t\t\t\tkeys: getSelectedApplicantsIds(),\n\t\t\t\tvalues: [{column:'final_decision',value:null},{column:'program',value:null}]\n\t\t\t}]},function(res) {\n\t\t\t\treload_list();\n\t\t\t\tunlockScreen(locker);\n\t\t\t});\n\t\t}\n\t\tfunction ApplicantYes() {\n\t\t\tvar locker = lockScreen();\n\t\t\tservice.json(\"data_model\",\"save_cells\",{cells:[{\n\t\t\t\ttable: 'Applicant',\n\t\t\t\tsub_model: <?php echo PNApplication::$instance->selection->getCampaignId();?>,\n\t\t\t\tkeys: getSelectedApplicantsIds(),\n\t\t\t\tvalues: [{column:'applicant_decision',value:'Will come'}]\n\t\t\t}]},function(res) {\n\t\t\t\treload_list();\n\t\t\t\tunlockScreen(locker);\n\t\t\t});\n\t\t}\n\t\tfunction ApplicantNo() {\n\t\t\tpopupFrame(null, \"Applicants declined\", \"/dynamic/selection/page/applicant/declined?ondone=refreshList\", {applicants:getSelectedApplicantsIds()}, null, null, function(frame,popup) {\n\t\t\t\tframe.refreshList = reload_list;\n\t\t\t});\n\t\t}\n\t\tfunction ApplicantRemove() {\n\t\t\tvar locker = lockScreen();\n\t\t\tservice.json(\"data_model\",\"save_cells\",{cells:[{\n\t\t\t\ttable: 'Applicant',\n\t\t\t\tsub_model: <?php echo PNApplication::$instance->selection->getCampaignId();?>,\n\t\t\t\tkeys: getSelectedApplicantsIds(),\n\t\t\t\tvalues: [{column:'applicant_decision',value:null},{column:'applicant_not_coming_reason',value:null}]\n\t\t\t}]},function(res) {\n\t\t\t\treload_list();\n\t\t\t\tunlockScreen(locker);\n\t\t\t});\n\t\t}\n\t\t</script>\n\t\t<?php \n\t}", "public function viewAction(){\n\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\t$objName = 'clients';\n\n\t\t$clientsModel = new Timemanagement_Model_Clients();\n\n\t\ttry\n\t\t{\n\t\t\tif(is_numeric($id) && $id>0)\n\t\t\t{\n\t\t\t\t$data = $clientsModel->getClientDetailsById($id);\n\t\t\t\tif(!empty($data) && $data != \"norows\")\n\t\t\t\t{\n\t\t\t\t\t$this->view->data = $data;\n\t\t\t\t\t$this->view->id = $id;\n\t\t\t\t\t$this->view->ermsg = '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->view->ermsg = 'norecord';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->view->ermsg = 'nodata';\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$this->view->ermsg = 'nodata';\n\t\t}\n\t}", "public function init_public() {\n\t\t// Load plugin settings.\n\t\t$settings = IncPopupDatabase::get_settings();\n\n\t\t// Initialize javascript-data.\n\t\t$this->script_data['ajaxurl'] = '';\n\t\t$this->script_data['do'] = 'get_data';\n\t\t$this->script_data['ajax_data'] = array();\n\n\t\t// Find the current loading method.\n\t\t$cur_method = isset( $settings['loadingmethod'] ) ? $settings['loadingmethod'] : 'ajax';\n\t\tif ( empty( $cur_method ) ) { $cur_method = 'ajax'; }\n\n\t\tif ( isset( $_POST['_po_method_'] ) ) { $cur_method = $_POST['_po_method_']; }\n\n\t\t/*\n\t\t * Apply the specific loading method to include the popup on the page.\n\t\t * Details to the loading methods are documented in the header comment\n\t\t * of the \"load_method_xyz()\" functions.\n\t\t */\n\t\tswitch ( $cur_method ) {\n\t\t\tcase 'ajax': // former 'external'\n\t\t\t\t$this->load_method_ajax();\n\t\t\t\tbreak;\n\n\t\t\tcase 'front': // former 'frontloading'\n\t\t\t\t$this->load_method_front();\n\n\t\t\t\tif ( isset( $_GET['action'] )\n\t\t\t\t\t&& $_GET['action'] == 'inc_popup'\n\t\t\t\t) {\n\t\t\t\t\t$this->ajax_load_popup();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'footer':\n\t\t\t\t$this->load_method_footer();\n\t\t\t\tbreak;\n\n\t\t\tcase 'raw': // Set via form field \"_po_method_\"\n\t\t\t\t$this->load_method_raw();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t/**\n\t\t\t\t * Custom loading handler can be processed by an add-on.\n\t\t\t\t */\n\t\t\t\tdo_action( 'popup-init-loading-method', $cur_method, $this );\n\t\t\t\tbreak;\n\t\t}\n\t}", "function printShowLink($params)\n{\n extract($params);\n global $arrUserList;\n $strResult = \"\";\n // tambahkan info record info\n $strDiv = \"<div id='detailRecord$counter' style=\\\"display:none\\\">\\n\";\n $strDiv .= getWords(\"last modified\") . \": \" . substr($record['created'], 0, 19) . \" \";\n $strDiv .= (isset($arrUserList[$record['created_by']])) ? $arrUserList[$record['created_by']]['name'] . \"<br>\" : \"<br>\";\n $strDiv .= getWords(\"verified\") . \": \" . substr($record['verified_time'], 0, 19) . \" \";\n $strDiv .= (isset($arrUserList[$record['verified_by']])) ? $arrUserList[$record['verified_by']]['name'] . \"<br>\" : \"<br>\";\n $strDiv .= getWords(\"checked\") . \": \" . substr($record['checked_time'], 0, 19) . \" \";\n $strDiv .= (isset($arrUserList[$record['checked_by']])) ? $arrUserList[$record['checked_by']]['name'] . \"<br>\" : \"<br>\";\n $strDiv .= getWords(\"approved\") . \": \" . substr($record['approved_time'], 0, 19) . \" \";\n $strDiv .= (isset($arrUserList[$record['approved_by']])) ? $arrUserList[$record['approved_by']]['name'] . \"<br>\" : \"<br>\";\n $strDiv .= getWords(\"denied\") . \": \" . substr($record['denied_time'], 0, 19) . \" \";\n $strDiv .= (isset($arrUserList[$record['denied_by']])) ? $arrUserList[$record['denied_by']]['name'] . \"<br>\" : \"<br>\";\n $strDiv .= \"</div>\\n\";\n $strResult .= $strDiv . \"<a href=\\\"javascript:openViewWindowByContentId('Record Information', 'detailRecord$counter', 400, 150)\\\" title=\\\"\" . getWords(\n \"show record info\"\n ) . \"\\\">\" . getWords(\"show\") . \"</a>\";\n return $strResult;\n}", "function view()\n\t{\n\t\t# pick random one? if so, how sort on admin side?\n\t\t# maybe have large popup with member info and form on left, LARGE calendar on right,\n\t\t# with calendar showing names for each day, and buttons on left (date form) saying 'choose by day' to \n\t\t# click on calendar's day number to fill in form, then ajax update 'save' button... \n\n\t\t# TO MANAGE, ADMIN JUST NEEDS TO LOG IN, GO TO HOME PAGE, CLICK ON MEMBER MENTIONED IN SPOTLIGHT AND THEN\n\t\t# click on 'manage spotlight' button...\n\n\n\t\t# WAIT!!!! WHAT IF THIS ISNT WHATS WANTED? I HAVE TO READ THOSE EMAILS!!!!!\n\n\t\t# *** JUST GET FRONTEND TO EVERYTHING DONE, THEN PAYPAL AND ACLS DONE, THEN CHECK EMAILS ABOUT BACKEND, etc..\n\n\t\t$this->layout = 'xml';\n\n\t\t# SOMEDAY IMPLEMENT RANDOM PICKING OF LIST... 'order by rand()' ...\n\t\t$this->MemberSuccessSpotlight->recursive = 0;\n\t\t#$spotlight = $this->MemberSuccessSpotlight->find(\"start_date <= now() AND now() <= end_date AND Member.active = 1\", null, \"end_date ASC, start_date ASC\");\n\t\t$spotlight = $this->MemberSuccessSpotlight->find(\"first\", array('conditions'=>\"start_date <= now() AND Member.active = 1\", \"limit\"=>1, \"order\"=>\"start_date DESC\"));\n\n\t\t$registration_date = $spotlight['Member']['registration_date'];\n\t\tif (!$registration_date) { $registration_date = date('Y-m-d'); }\n\t\t$reg_parts = split(\"-\", $registration_date);\n\t\t$member_since = $reg_parts[0];\n\t\tif (!$member_since) { $member_since = date('Y'); }\n\t\t\n\t\t$this->set('member_since', $member_since);\n\t\t$this->set('success_spotlight', $spotlight);\n\t}", "public static function DEFINITION_RDW_SHOWRESULT_FULL($w,$h) {\n\tglobal $sid;\n\tglobal $datasource;\n global $slrq;\n\t\n\tRodinResultManager::renderAllResultsInOwnTab($sid,$datasource,$slrq);\n\t\n\treturn true; \n}", "function SfParamter(){\r\n\t\t$this->load->model(\"master_calendar/master_calender\",\"MC\");\r\n\t\t$dataid = '';\r\n\t\t$dataid = $this->input->post(\"dataid\");\r\n\t\t$MethodT = $this->input->post(\"MethodT\");\r\n\t\t$HijriDateBox = $this->input->post(\"Hijri_Date\");\r\n\t\t\r\n\t\tif( $MethodT == 'NTP'){\r\n\t\t\t//insertation\r\n\t\t\t$meth = 1;\r\n\t\t\t$HChecking = 0;\r\n\t\t}else{\r\n\t\t\t// updatation\r\n\t\t\t$meth = 2;\r\n\t\t\t$HChecking = 1;\r\n\t\t}\r\n\t\t\r\n\t\tif( $meth == 2){\r\n\t\t\t$dataid = (int)$dataid;\r\n\t\t\t$res = $this->MC->get_event($dataid);\r\n\t\t\t\r\n\t\t\t$IDate = $res[\"calendar_ID\"];\r\n\t\t\t$RtHji = $this->getIsmlicDateByDate($IDate);\r\n\t\t\t$HijriDate = $RtHji[\"HijriDate\"];\r\n\t\t\t//$HChecking = $RtHji[\"HChecking\"];\r\n\t\t\t//$HChecking = 0;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$holiday_profile = $res[\"event_ID\"];\r\n\t\t\t$holiday_title = $res[\"event_title\"];\r\n\t\t\t$holiday_short_title = $res[\"event_short_title\"];\r\n\t\t\t$holiday_description = $res[\"event_description\"];\r\n\t\t}else{\r\n\t\t\t$holiday_profile = '';\r\n\t\t\t$holiday_title = '';\r\n\t\t\t$holiday_short_title = '';\r\n\t\t\t$holiday_description = '';\r\n\t\t\t//$HChecking = 0;\r\n\t\t\t$HijriDate = $HijriDateBox;\r\n\t\t\t$IDate = '';\r\n\t\t}\r\n\t\t\r\n\t\t$UU = '';\r\n\t\t$VU = '';\r\n\t\t$DH = '';\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t$Staff = $this->MC->Get_All_Event('Staff');\t\t\r\n\t\t$html ='';\r\n\t\t\r\n\t\t$html .='<div class=\"modal-dialog\">';\r\n\t\t$html .='<div class=\"modal-content\">';\r\n\t\t$html .='<div class=\"modal-header\">';\r\n\t\t$html .='<button type=\"button\" class=\"close floatClose\" data-dismiss=\"modal\">&times;</button>';\r\n\t\t$html .='<h4 class=\"modal-title\">Staff Parameter</h4>';\r\n\t\t$html .='</div><!-- modal-header -->';\r\n\t\t$html .='<div class=\"modal-body\">';\r\n\t\t$html .='<div class=\"row\">';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html .='<div class=\"col-md-12\" style=\"padding:10px 0;\">\r\n\t\t<div class=\"col-md-3\" style=\"padding-top:5px;\">\r\n\t\t\tSuper Profile\r\n\t\t</div>';\r\n\t\t$html .='<div class=\"col-md-9\">';\r\n\t\t\t$html .='<select name=\"SuperProfile\" id=\"SuperProfile\">';\r\n\t\t\tif( !empty($Staff) ):\r\n\t\t\tforeach($Staff as $s ){\r\n\t\t\t\tif( $s[\"ID\"] == $holiday_profile ){\r\n\t\t\t\t\t$se = \"selected\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$se = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$html .='<option value=\"'.$s[\"ID\"].'\" '.$se.'>'.$s[\"cat_name\"].'</option>';\r\n\t\t\t}\r\n\t\t\tendif;\r\n\t\t\t$html .='</select>';\r\n\t\t$html .='</div>';\r\n\t$html .='</div>';\r\n\t$html .='<div class=\"col-md-12\" style=\"padding:10px 0;\">\r\n\t\t<div class=\"col-md-3\" style=\"padding-top:5px;\">\r\n\t\t\tTitle\r\n\t\t</div>\r\n\t\t<div class=\"col-md-9\">\r\n\t\t\t<input type=\"text\" placeholder=\"Title\" name=\"SPTitle\" id=\"SPTitle\" value=\"'.$holiday_title.'\" />\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-12\" style=\"padding:10px 0;\">\r\n\t\t<div class=\"col-md-3\" style=\"padding-top:5px;\">\r\n\t\t\tShort Title\r\n\t\t</div>\r\n\t\t<div class=\"col-md-9\">\r\n\t\t\t<input type=\"text\" placeholder=\"Short Title\" name=\"SPShortTitle\" id=\"SPShortTitle\" value=\"'.$holiday_short_title.'\" />\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-12\" style=\"padding:10px 0;\">\r\n\t\t<div class=\"col-md-3\" style=\"padding-top:5px;\">\r\n\t\t\tDescription\r\n\t\t</div>\r\n\t\t<div class=\"col-md-9\">\r\n\t\t\t<textarea name=\"SPDescription\" id=\"SPDescription\">'.$holiday_description.'</textarea>';\r\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$dataid.'\" name=\"date_id_SP\" id=\"date_id_SP\" />';\r\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$meth.'\" name=\"OpType\" id=\"OpType\" />';\r\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$HijriDateBox.'\" name=\"HijriDateBox\" id=\"HijriDateBox\" />';\r\n\t\t\t$html .= '<input type=\"hidden\" value=\"'.$IDate.'\" name=\"Standard_date\" id=\"Standard_date\" />';\r\n\t\t\t\r\n\t\t$html .= '</div>';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html .='</div>';\r\n\t\t\r\n\t\t$html .= '<div class=\"col-md-12\" style=\"padding:10px 0;\"><div class=\"col-md-3\" style=\"padding-top:5px;\"></div><div class=\"col-md-9\">';\r\n\t\t\t//$html .= '<input type=\"checkbox\" name=\"Reflect_Hijri\" value=\"'.$HijriDate.'\" id=\"Reflect_Hijri\" />';\r\n\t\t\tif( $HChecking==1){\r\n\t\t\t\t//$html .= '<input type=\"checkbox\" name=\"Reflect_Hijri\" value=\"'.$HijriDate.'\" id=\"Reflect_Hijri\" checked />';\t\r\n\t\t\t\t//$html .= '<label for=\"Reflect_Hijri\"> Reflect To Hijri Date </label>';\r\n\t\t\t}else{\r\n\t\t\t\t$html .= '<input type=\"checkbox\" name=\"Reflect_Hijri\" value=\"'.$HijriDate.'\" id=\"Reflect_Hijri\" />';\t\r\n\t\t\t\t$html .= '<label for=\"Reflect_Hijri\"> Add To Hijri Date </label>';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t$html .= '</div></div>';\r\n\t\t\r\n\t\t\r\n\t\t$html .= '</div>';\r\n\t\t$html .= '</div><!-- modal-body -->';\r\n\t\t$html .= '<div class=\"modal-footer\">';\r\n\t\t$html .= '<input type=\"submit\" class=\"greenBTN widthSmall\" id=\"SPButton\" value=\"Set Staff Parameter\">';\r\n\t\t\r\n\t\tif( $HChecking==1){\r\n\t\t\r\n\t\t$html .= ' <button type=\"button\" class=\"btn btn-default\" data-type=\"SP\" data-dated=\"'.$IDate.'\" data-id=\"'.$dataid.'\" id=\"HPRevome\">Remove! Parameter</button>';\t\r\n\t\t}\r\n\t\t\r\n\t\t$html .= '</div><!-- Modal Footer-->';\r\n\t\t$html .= '</div>';\r\n\t\t$html .= '</div>';\r\n\t\t\r\n\t\techo $html;\r\n\t}", "function admin_view_user($id) {\n\t\t//\n\t}", "function displaySucessfulApprove() {\n\tif ( isset($_SESSION['username']) ) {\n\t\t$uid = $_SESSION['id'];;\n\t\tif (isset($_POST['approve'])) {\n\t\t\t$id = $_POST['rid'];\n\t\t\tdb_approve($id, $uid);\n\t\t}\n\t}\n}", "function execute()\n {\n plugin::execute();\n /* Log view */\n if($this->is_account && !$this->view_logged){\n $this->view_logged = TRUE;\n if(isset($this->parent->by_object['user']) || (isset($this->attrs['objectClass']) &&in_array_strict(\"gosaAccount\",$this->attrs['objectClass']))){\n new log(\"view\",\"users/\".get_class($this),$this->dn);\n }else{\n new log(\"view\",\"groups/\".get_class($this),$this->dn);\n }\n }\n\n /* Check profile server */\n if($this->acl_is_writeable(\"gotoProfileServer\")){\n\n if(!empty($this->gotoProfileServer) && !isset($this->gotoProfileServers[$this->gotoProfileServer])){\n\n\n if(count($this->gotoProfileServers)){\n\n /* Get First Profile */\n $new = key($this->gotoProfileServers);\n\n /* Another profile server found */\n msg_dialog::display(_(\"Warning\"), sprintf(_(\"Profile server '%s' is not available anymore. Switched to server '%s'.\"), $this->gotoProfileServer, $new), WARNING_DIALOG);\n }else{\n\n /* No other profile servers found */\n msg_dialog::display(_(\"Warning\"), sprintf(_(\"Profile server '%s' is not available anymore. Kiosk profile will be disabled.\"), $this->gotoProfileServer), WARNING_DIALOG);\n $this->gotoProfileServer = \"none\";\n }\n }\n } \n\n $this->detect_grouptype();\n\n /* Fill templating stuff */\n $smarty= get_smarty();\n $smarty->assign(\"kiosk_enabled\",$this->kiosk_enabled);\n $display= \"\";\n\n $smarty->assign(\"is_group\",$this->is_group);\n\n /* Prepare all variables for smarty */\n foreach($this->attributes as $s_attr){\n /* Set value*/\n $smarty->assign($s_attr,set_post($this->$s_attr));\n\n /* Set checkbox state*/\n if(empty($this->$s_attr)){\n $smarty->assign($s_attr.\"CHK\",\"\");\n }else{\n $smarty->assign($s_attr.\"CHK\",\" checked \");\n }\n }\n\n $tmp = $this->plInfo();\n foreach($tmp['plProvidedAcls'] as $val => $desc){\n $smarty->assign(\"$val\".\"ACL\", $this->getacl($val));\n }\n\n /* Is accout enabled | are we editing from usermenu or admin menu \n All these tab management is done here\n */\n\n\n /* Working from Usermenu an the Account is currently disbled\n * this->parent : is only set if we are working in a list of tabs\n * is_account : is only true if the needed objectClass is given\n */\n if((!isset($this->parent))&&(!$this->is_account)){\n /* We are currently editing this tab from usermenu, but this account is not enabled */\n $smarty->assign(\"is_account\",$this->is_account);\n /* Load template */\n $display .= $smarty->fetch(get_template_path('environment.tpl', TRUE));\n /* Avoid the \"You are currently editing ....\" message when you leave this tab */\n $display .= back_to_main(); \n /* Display our message to the user */\n return $display;\n\n\n /* We are currently editing from group tabs, because \n * $this->parent is set\n * posixAccount is not set, so we are not in usertabs.\n */\n }elseif((isset($this->parent))&&(!isset($this->parent->by_object['posixAccount']))){\n $smarty->assign(\"is_account\",\"true\");\n $this->uid = $this->cn;\n $this->attrs['uid'] = $this->cn;\n\n /* Change state if needed */\n if (isset($_POST['modify_state'])){\n if(($this->acl_is_createable() && !$this->is_account) || \n ($this->acl_is_removeable() && $this->is_account)){\n $this->is_account= !$this->is_account;\n }\n }\n /* Group Dialog with enabled environment options */\n if ($this->is_account){\n $display= $this->show_disable_header(msgPool::removeFeaturesButton(_(\"Desktop\")),\n msgPool::featuresEnabled(_(\"Desktop\")));\n } else {\n\n /* Environment is disabled \n If theres is no posixAccount enabled, you won't be able to enable \n environment extensions\n */\n if((isset($this->parent->by_object['group']))||(isset($this->attrs['objectClass']))&&((in_array_strict(\"posixAccount\",$this->attrs['objectClass'])))){\n $display= $this->show_enable_header(msgPool::addFeaturesButton(_(\"Desktop\")),\n msgPool::featuresDisabled(_(\"Desktop\")));\n return $display;\n }elseif((isset($this->parent->by_object['ogroup']))){\n $display= $this->show_enable_header(msgPool::addFeaturesButton(_(\"Desktop\")),\n msgPool::featuresDisabled(_(\"Desktop\")));\n return $display;\n }else{\n $display= $this->show_enable_header(msgPool::addFeaturesButton(_(\"Desktop\")),\n msgPool::featuresDisabled(_(\"Desktop\"), _(\"POSIX\")), TRUE);\n return $display;\n }\n }\n }else{\n /* Editing from Usermenu \n * Tell smarty that this accoutn is enabled \n */\n $smarty->assign(\"is_account\",\"true\");\n\n /* Change state if needed */\n if (isset($_POST['modify_state'])){\n if(($this->acl_is_createable() && !$this->is_account) || \n ($this->acl_is_removeable() && $this->is_account)){\n $this->is_account= !$this->is_account;\n }\n }\n\n if(isset($this->parent)){\n\n // 3. Account enabled . Editing from adminmenu\n if ($this->is_account){\n $display= $this->show_disable_header(msgPool::removeFeaturesButton(_(\"Desktop\")),\n msgPool::featuresEnabled(_(\"Desktop\")));\n } else {\n\n if($this->parent->by_object['posixAccount']->is_account==true){\n $display= $this->show_enable_header(msgPool::addFeaturesButton(_(\"Desktop\")),\n msgPool::featuresDisabled(_(\"Desktop\")));\n return $display;\n }else{\n $display= $this->show_enable_header(msgPool::addFeaturesButton(_(\"Desktop\")),\n msgPool::featuresDisabled(_(\"Desktop\"), _(\"POSIX\")), TRUE);\n return $display;\n }\n }\n }\n }\n \n /* Reset header toggle */\n if($this->multiple_support_active){\n $display = \"\";\n }\n\n /* Account is Account : is_accounbt=true.\n * Else we won't reach this. \n */\n\n /* Prepare all variables for smarty */\n foreach($this->attributes as $s_attr){\n /* Set value*/\n $smarty->assign($s_attr,set_post($this->$s_attr));\n\n /* Set checkbox state*/\n if(empty($this->$s_attr)){\n $smarty->assign($s_attr.\"CHK\",\"\");\n }else{\n $smarty->assign($s_attr.\"CHK\",\" checked \");\n }\n }\n\n $tmp = $this->plInfo();\n foreach($tmp['plProvidedAcls'] as $val => $desc){\n $smarty->assign(\"$val\".\"ACL\", $this->getacl($val));\n }\n\n foreach(array(\"gotoProfileFlagC\",\"gotoProfileFlagL\") as $s_attr){\n $smarty->assign($s_attr.\"ACL\",$this->getacl($s_attr));\n }\n\n if($this->read_only) {\n $smarty->assign(\"gotoPrinterACL\",\"r\");\n }else{\n $smarty->assign(\"gotoPrinterACL\",\"rw\");\n }\n\n\n $smarty->assign(\"useProfile\",$this->useProfile);\n if(empty($this->useProfile) && !$this->multiple_support_active){\n $smarty->assign(\"useProfileCHK\",\"\");\n $smarty->assign(\"gotoProfileServerACL\" , preg_replace(\"/w/\",\"\",$this->getacl(\"gotoProfileServer\")));\n $smarty->assign(\"gotoProfileQuotaACL\" , preg_replace(\"/w/\",\"\",$this->getacl(\"gotoProfileQuota\")));\n $smarty->assign(\"gotoProfileFlagCACL\" , preg_replace(\"/w/\",\"\",$this->getacl(\"gotoProfileFlagC\")));\n }else{\n $smarty->assign(\"useProfileCHK\",\" checked \");\n }\n \n $smarty->assign(\"gotoProfileServerWriteable\", $this->acl_is_writeable(\"gotoProfileServer\"));\n $smarty->assign(\"gotoProfileACL\", $this->getacl(\"gotoProfileServer\").$this->getacl(\"gotoProfileQuota\"));\n\n /* HANDLE Profile Settings here \n * Assign available Quota and resolution settings\n * Get all available profile server\n * Get cache checkbox\n * Assign this all to Smarty \n */\n\n if(empty($this->gotoProfileFlagL)){\n $smarty->assign(\"gotoProfileFlagLCHK\",\" \");\n }else{\n $smarty->assign(\"gotoProfileFlagLCHK\",\" checked \");\n }\n\n if(empty($this->gotoProfileFlagC)){\n $smarty->assign(\"gotoProfileFlagCCHK\",\" \");\n }else{\n $smarty->assign(\"gotoProfileFlagCCHK\",\" checked \");\n }\n\n\n $smarty->assign(\"gotoXResolutions\" , set_post($this->gotoXResolutions));\n $smarty->assign(\"gotoXResolutionKeys\" , set_post(array_flip($this->gotoXResolutions)));\n\n $smarty->assign(\"gotoProfileServers\", set_post($this->gotoProfileServers));\n if(!is_array($this->gotoProfileServers)){\n $this->gotoProfileServers =array();\n }\n\n /* Handle kiosk profiles*/\n $smarty->assign(\"kiosk_servers\" , set_post($this->gotoKioskProfiles['SERVERS']));\n $smarty->assign(\"kiosk_server\" , set_post($this->gotoKioskProfile_Server));\n $smarty->assign(\"kiosk_profiles\", set_post($this->gotoKioskProfiles['BY_SERVER'][$this->gotoKioskProfile_Server]));\n $smarty->assign(\"kiosk_profile\" , set_post($this->gotoKioskProfile_Profile));\n \n\n /* Logonscript Management\n * Get available LogonScripts (possibly grey out (or mark) these script that are defined for the group) \n * Perform add Delete edit Posts \n */\n\n /* Dialog Save */\n if(isset($_POST['LogonSave'])){\n\n if(!$this->acl_is_writeable(\"gotoLogonScript\")){\n msg_dialog::display(_(\"Permission error\"), msgPool::permModify(_(\"Log on scripts\")), ERROR_DIALOG);\n unset($this->dialog);\n $this->dialog=FALSE;\n $this->is_dialog=false;\n }else{\n $this->dialog->save_object();\n if(count($this->dialog->check())!=0){\n foreach($this->dialog->check() as $msg){\n msg_dialog::display(_(\"Error\"), $msg, ERROR_DIALOG);\n }\n }else{\n $tmp = $this->dialog->save();\n unset($this->dialog);\n $this->dialog=FALSE;\n $this->is_dialog=false;\n\n if($this->multiple_support_active){\n $tmp['UsedByAllUsers'] = TRUE;\n }\n $this->gotoLogonScripts[$tmp['LogonName']]=$tmp; \n }\n }\n }\n \n\n /* Dialog Quit without saving */\n if(isset($_POST['LogonCancel'])){\n $this->is_dialog= false;\n unset($this->dialog);\n $this->dialog= FALSE;\n }\n\n /* Check Edit Del New Posts for a selected LogonScript */ \n if($this->acl_is_writeable(\"gotoLogonScript\") && \n (isset($_POST['gotoLogonScriptNew'])) || isset($_POST['gotoLogonScriptEdit']) ||isset($_POST['gotoLogonScriptDel'])){\n\n /* New Logon Script: Open an edit dialog, we don't need a $_POST['gotoLogonScript'] here.\n * In this case we create a new Logon Script.\n */\n if(isset($_POST['gotoLogonScriptNew'])){\n $this->is_dialog = true;\n $this->dialog = new logonManagementDialog($this->config,$this->dn);\n }\n\n /* If we receive a Delete request and there is a Script selected in the selectbox, delete this one.\n * We only can delete if there is an entry selected.\n */\n if((isset($_POST['gotoLogonScriptDel']))&&(isset($_POST['gotoLogonScript']))){\n unset($this->gotoLogonScripts[$_POST['gotoLogonScript']]);\n }\n\n /* In this case we want to edit an existing entry, we open a new Dialog to allow editing.\n * There must be an entry selected to perform edit request.\n */\n if((isset($_POST['gotoLogonScriptEdit']))&&(isset($_POST['gotoLogonScript']))){\n $is_entry = $this->gotoLogonScripts[get_post('gotoLogonScript')];\n $this->is_dialog = true;\n $this->dialog = new logonManagementDialog($this->config,$this->dn,$is_entry);\n }\n }\n\n /* Append List to smarty*/\n if($this->multiple_support_active){\n $smarty->assign(\"gotoLogonScripts\", set_post($this->gotoLogonScripts));\n $smarty->assign(\"gotoLogonScriptKeysCnt\", count($this->gotoLogonScripts));\n }else{\n $ls = $this->printOutLogonScripts();\n $smarty->assign(\"gotoLogonScripts\", set_post($ls));\n $smarty->assign(\"gotoLogonScriptKeys\",set_post(array_flip($ls)));\n $smarty->assign(\"gotoLogonScriptKeysCnt\",count($ls));\n }\n\n /* In this section server shares will be defined \n * A user can select one of the given shares and a mount point\n * and attach this combination to his setup.\n */\n\n $smarty->assign(\"gotoShareSelections\", set_post($this->gotoShareSelections));\n if(!is_array($this->gotoShareSelections)){\n $this->gotoShareSelections = array();\n }\n $smarty->assign(\"gotoShareSelectionKeys\", set_post(array_flip($this->gotoShareSelections)));\n\n /* if $_POST['gotoShareAdd'] is set, we will try to add a new entry \n * This entry will be, a combination of mountPoint and sharedefinitions \n */\n if(isset($_POST['gotoShareAdd']) && $this->acl_is_writeable(\"gotoShare\")){\n\n /* We assign a share to this user, if we don't know where to mount the share */\n if(!isset($_POST['gotoShareSelection']) || get_post('gotoShareSelection') == \"\"){\n msg_dialog::display(_(\"Error\"), msgPool::invalid(_(\"Share\")), ERROR_DIALOG);\n }elseif((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match(\"/[\\|]/i\",$_POST['gotoShareMountPoint']))){\n msg_dialog::display(_(\"Error\"), msgPool::invalid(_(\"Mount point\")), ERROR_DIALOG);\n }elseif(preg_match('/ /', $_POST['gotoShareMountPoint'])){\n msg_dialog::display(_(\"Error\"), msgPool::invalid(_(\"Mount point\"), \"/[^\\s]/\"), ERROR_DIALOG);\n }elseif(!(\n preg_match(\"/^\\//\",$_POST['gotoShareMountPoint']) ||\n preg_match(\"/^~/\",$_POST['gotoShareMountPoint']) ||\n preg_match(\"/^\\$HOME/\",$_POST['gotoShareMountPoint']) ||\n preg_match(\"/^.HOME/\",$_POST['gotoShareMountPoint']) ||\n preg_match(\"/^\\$USER/\",$_POST['gotoShareMountPoint']) ||\n preg_match(\"/^.USER/\",$_POST['gotoShareMountPoint']) ||\n preg_match(\"/^%/\",$_POST['gotoShareMountPoint'])\n )\n ){\n msg_dialog::display(_(\"Error\"), msgPool::invalid(_(\"Mount point\")), ERROR_DIALOG);\n }else{\n $a_share = $this->gotoAvailableShares[get_post('gotoShareSelection')];\n $s_mount = get_post('gotoShareMountPoint');\n $s_user = get_post('ShareUser');\n /* Preparing the new assignment */ \n $this->gotoShares[$a_share['name'].\"|\".$a_share['server']]=$a_share;\n $this->gotoShares[$a_share['name'].\"|\".$a_share['server']]['Username']=$s_user;\n $this->gotoShares[$a_share['name'].\"|\".$a_share['server']]['PwdHash']=\"\";\n $this->gotoShares[$a_share['name'].\"|\".$a_share['server']]['mountPoint']=$s_mount;\n\n if($this->multiple_support_active){\n $this->gotoShares[$a_share['name'].\"|\".$a_share['server']]['UsedByAllUsers']= TRUE;\n }\n }\n } \n\n /* if the Post gotoShareDel is set, someone asked GOsa to delete the selected entry (if there is one selected)\n * If there is no defined share selected, we will abort the deletion without any message \n */\n $once = true;\n if($this->acl_is_writeable(\"gotoShare\")){\n foreach($_POST as $name => $value){\n if((preg_match(\"/^gotoShareDel_/\",$name)) && ($once)){\n $once = false; \n $key = preg_replace(\"/^gotoShareDel_/\",\"\",$name);\n $key = postDecode($key);\n if(isset($this->gotoShares[$key])) {\n unset($this->gotoShares[$key]);\n }\n\n /* Remove corresponding password entry, too. This is a workaround\n to get rid of old-style entries. */\n $key= preg_replace(\"/\\|/\", \"|!\", $key);\n if(isset($this->gotoShares[$key])) {\n unset($this->gotoShares[$key]);\n }\n }\n if((preg_match(\"/^gotoShareResetPwd_/\",$name)) && ($once)){\n $once = false;\n $key = preg_replace(\"/^gotoShareResetPwd_/\",\"\",$name);\n $key = postDecode($key);\n $this->gotoShares[$key]['PwdHash'] = \"\";\n if(preg_match(\"/^!/\",$this->gotoShares[$key]['server'])){\n unset($this->gotoShares[$key]);\n }\n }\n }\n }\n\n // Build up share list\n $data = $lData = array(); \n foreach($this->gotoShares as $key => $entry){\n $img = \"\";\n\n // Skip password only entries\n if( empty($entry['server']) && empty($entry['name']) &&\n empty($entry['mountPoint']) && empty($entry['Username'])){\n continue;\n } \n\n // While editing mutlipe users at once we've to seperate \n // entries used by all users and those used by only some.\n $color = \"\";\n if($this->multiple_support_active){\n if($entry['UsedByAllUsers']){\n $value .= \"&nbsp;(<b>\"._(\"Used by all users\").\"</b>)\";\n }else{\n $color = \"color: #999999;\";\n $value .= \"&nbsp;(<b>\"._(\"Used by some users\").\"</b>)\";\n }\n }\n\n // Create password reset image button \n if($entry['PwdHash'] != \"\"){\n $img.= \n image('plugins/goto/images/list_reset_password.png',\n 'gotoShareResetPwd_'.postEncode($key),\n _(\"Reset password hash\"));\n }\n\n // Build up list entries - Handle entries starting with '!' here.\n $data[$key]=$key;\n if(preg_match(\"/^!/\",$this->gotoShares[$key]['server'])){\n\n // If we are currently editing groups environment, skip those ! entries */ \n if($this->is_group) continue;\n\n $lData[$key] = array('data' => array(\n $entry['server'].\"://\",\n $entry['name'], \n \"\",\n \"\",\n image(\"plugins/groups/images/select_group.png\",\"\",_(\"Group share\")),\n $img));\n }else{\n\n $img.= image('images/lists/trash.png',\"gotoShareDel_\".postEncode($key),msgPool::delButton());\n $lData[$key] = array('data' => array(\n $entry['server'].\"://\",\n $entry['name'], \n $entry['mountPoint'], \n $entry['Username'], \n image(\"plugins/users/images/select_user.png\",\"\",_(\"User share\")),\n $img));\n }\n }\n $this->shareList->setListData($data,$lData);\n $this->shareList->update();\n $this->shareList->setAcl($this->getacl(\"gotoShare\"));\n $smarty->assign(\"shareList\",$this->shareList->render());\n\n /* Hotplug devices will be handled here \n * There are 3 possible methods for this feature\n * Create a new Hotplug, A Dialog will open where you can specify some hotplug information\n * Delete will erase an entry, the entry must be selcted in the ListBox first\n * Editing an entry will open a dialog where the informations about the selcted entry can be changed\n */\n\n /* We have to delete the selected hotplug from the list*/\n if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice_post'])) && $this->acl_is_writeable(\"gotoHotplugDeviceDN\")){\n if($this->acl_is_writeable(\"gotoHotplugDeviceDN\")){\n foreach($_POST['gotoHotplugDevice_post'] as $name){\n unset($this->gotoHotplugDevices[$name]);\n }\n }\n }\n\n /* There are already defined hotplugs from other users we could use */\n if(isset($_POST['gotoHotplugDeviceUse']) && $this->acl_is_writeable(\"gotoHotplugDeviceDN\")){\n $tmp =array();\n foreach($this->gotoHotplugDevices as $plugs){\n $tmp[] = $plugs['name'];\n }\n $this->dialog = new hotplugSelect($this->config, get_userinfo());\n $this->is_dialog = true;\n }\n\n /* Dialog Aborted */\n if(isset($_POST['hotplugSelect_cancel'])){\n $this->dialog= FALSE;\n $this->is_dialog = false;\n }\n\n /* Dialod saved */\n if(isset($_POST['hotplugSelect_save'])){\n\n $res = $this->dialog->save();\n foreach($res as $hotplug){\n $name = $hotplug['cn'][0];\n $entry['dn'] = $hotplug['dn'];\n\n /* Set class values */\n $tmp = preg_split(\"/\\|/\",$hotplug['gotoHotplugDevice'][0]);\n $entry['name'] = $hotplug['cn'][0];\n $entry['description'] = $tmp[0];\n $entry['id'] = $tmp[1];\n $entry['produkt'] = $tmp[2];\n $entry['vendor'] = $tmp[3];\n if($this->multiple_support_active){\n $entry['UsedByAllUsers'] = TRUE;\n }\n $this->gotoHotplugDevices[$name]= $entry; \n }\n $this->dialog= FALSE;\n $this->is_dialog = false;\n }\n\n if($this->dialog instanceOf hotplugSelect){\n \n // Build up blocklist\n session::set('filterBlacklist', array('cn' => array_keys($this->gotoHotplugDevices)));\n return($this->dialog->execute());\n }\n\n if($this->multiple_support_active){\n $smarty->assign(\"gotoHotplugDevices\", set_post($this->gotoHotplugDevices));\n }else{\n $smarty->assign(\"gotoHotplugDevices\", set_post($this->printOutHotPlugDevices()));\n $smarty->assign(\"gotoHotplugDeviceKeys\",set_post(array_flip($this->printOutHotPlugDevices())));\n }\n\n /* Printer Assignment will managed below \n * A printer can be assigned in two different ways and two different types\n * There are 2 types of users assigned to a printer : user and admin\n * They only differ in the member attribute they will be assigned to. user: gotoUserPrinter admin: gotoadminPrinter\n * The different types of assigning a user are : 1 assigning a user to a printer 2. assigning a group to a printer\n */ \n\n /* First handle Add Post. Open a dialog that allows us to select a printer or two */ \n if(isset($_POST['gotoPrinterAdd'])){\n $this->dialog = new printerSelect($this->config,get_userinfo());\n $this->is_dialog=true;\n }\n\n if(isset($_POST['printerSelect_cancel']) && $this->dialog instanceOf printerSelect){\n $this->is_dialog=false;\n $this->dialog=FALSE;\n }\n\n if(isset($_POST['printerSelect_save']) && $this->dialog instanceOf printerSelect){\n\n $res = $this->dialog->save();\n foreach($res as $printer){\n\n $pname = $printer['cn'][0];\n $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'], $printer['dn'],\"printer\");\n $printerObj->set_acl_base($printer['dn']);\n\n $type = false;\n\n \n if($this->is_group){\n if($this->dn == \"new\"){ \n $type = \"AddGroup\";\n }elseif(isset($this->NewDeletedPrinters[$pname])){\n $type = \"AddGroup\";\n }elseif($printerObj->by_object['printgeneric']->AddMember(\"AddGroup\",$this->dn)){\n $type = \"AddGroup\";\n }\n }else{\n if($this->multiple_support_active){\n $type = \"AddUser\";\n }elseif(isset($this->NewDeletedPrinters[$pname])){\n $type = \"AddUser\";\n }elseif($this->dn == \"new\"){ \n $type = \"AddUser\";\n }elseif($printerObj->by_object['printgeneric']->AddMember(\"AddUser\",$this->dn)){\n $type = \"AddUser\";\n }\n }\n\n if($type){\n $this->gotoPrinter[$pname]=$printer;\n $this->gotoPrinter[$pname]['mode']=\"user\";\n $this->add_del_printer_member_was_called = true;\n\n $this->NewAddedPrinters[$pname] = $pname;\n if(isset($this->NewDeletedPrinters[$pname])){\n unset($this->NewDeletedPrinters[$pname]);\n }\n }\n }\n\n $this->is_dialog=false;\n unset($this->dialog);\n $this->dialog =FALSE;\n }\n\n // Display printer selection dialog \n if($this->dialog instanceOf printerSelect){\n\n // Build up blocklist\n session::set('filterBlacklist',array('cn' => array_keys($this->gotoPrinter)));\n return($this->dialog->execute());\n }\n\n\n if((isset($_POST['gotoPrinterDel']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){\n $printer = get_post('gotoPrinterSel');\n foreach($printer as $pname){\n\n $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$this->gotoPrinter[$pname]['dn'],\"printer\");\n $printerObj->set_acl_base($this->gotoPrinter[$pname]['dn']);\n\n $type = false;\n if($this->is_group){\n if(isset($this->NewAddedPrinters[$pname])){\n $type = \"Group\";\n }elseif($printerObj->by_object['printgeneric']->DelMember(\"AddGroup\",$this->cn)){\n $type = \"Group\";\n }\n }else{\n if(isset($this->NewAddedPrinters[$pname])){\n $type = \"User\";\n }elseif($printerObj->by_object['printgeneric']->DelMember(\"AddUser\",$this->uid)){\n $type = \"User\";\n }\n }\n if($type){\n $this->add_del_printer_member_was_called = true;\n unset($this->gotoPrinter[$pname]);\n\n $this->NewDeletedPrinters[$pname] = $pname;\n if(isset($this->NewAddedPrinters[$pname])){\n UNSET($this->NewAddedPrinters[$pname]);\n }\n }\n }\n }\n\n if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){\n $printers = get_post('gotoPrinterSel');\n $this->add_del_printer_member_was_called = true;\n foreach($printers as $printer){\n if($this->gotoPrinter[$printer]['mode']==\"user\"){\n $this->gotoPrinter[$printer]['mode']=\"admin\";\n }else{\n $this->gotoPrinter[$printer]['mode']=\"user\";\n }\n }\n }\n\n if((isset($_POST['gotoPrinterDefault']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){\n if($this->is_group){\n msg_dialog::display(_(\"Error\"), _(\"Cannot set default printer flag for groups!\"), ERROR_DIALOG);\n }else{\n if ($this->gosaDefaultPrinter == $_POST['gotoPrinterSel'][0]){\n $this->gosaDefaultPrinter= \"\";\n } else {\n $this->gosaDefaultPrinter= $_POST['gotoPrinterSel'][0];\n }\n }\n }\n\n $smarty->assign(\"gotoPrinter\", set_post($this->printOutPrinterDevices()));\n\n /* General behavior */\n if(is_object($this->dialog)){\n $this->dialog->save_object();\n $disp =$this->dialog->execute();\n return($disp);\n }\n\n /* Assign used attributes for multiple edit */\n foreach(array(\"gotoPrinter\",\"kiosk_server\",\"gotoProfileFlagL\",\"gotoXResolution\",\n \"useProfile\",\"gotoProfileServer\",\"gotoProfileQuota\",\"gotoProfileFlagC\") as $box){\n $ubox =\"use_\".$box;\n if(in_array_strict($box,$this->multi_boxes)){\n $smarty->assign($ubox,TRUE);\n }else{\n $smarty->assign($ubox,FALSE);\n }\n }\n\n /* Als smarty vars are set. Get smarty template and generate output */\n $smarty->assign(\"multiple_support\",$this->multiple_support_active);\n $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));\n return($display);\n }", "static public function contact_refresh($un, $fn, $pf) {\n\t\t// $un usernamei \n\t\tglobal $data_dir;\n\n\t\t/* using readfile() purposely insures PHP commands in file are ignored, inline javascript? */\n\t\t// FUTURE: read this into a buffer, skip outputing sensative information\n\necho \"\\n<br><br>PROFILE TYPE: \".$pf;\n\t \treadfile($data_dir.'/users/'.$un.'_profile');\n\t\tif (($pf & profile::ACCTYP_MASK) == profile::ACCTYP_PROV)\n\t//\tif (($p_flgs & profile::ACCTYP_MASK) == profile::ACCTYP_PROV)\n\t \treadfile($data_dir.'/users/'.$un.'_addr'); // provider\n\t\telse\n\t \treadfile($data_dir.'/users/'.$un.'_pddr'); // personal\n\t\techo \"\\n<span id=\\\"profile_fname\\\">\".$fn.'</span>';\n\t\techo \"\\n<span id=\\\"profile_flags\\\">\".$pf.\"</span>\\n\";\n\t\t}", "public function GetEmployee($WHID) {\n global $PAGE_DIR, $EVENT_PATH, $AJAX, $EVENTS_ID, $EVENT_SETUPS_ID;\n\n $CONTACT = new Contacts;\n $row = $CONTACT->GetAllContactDetails($WHID);\n\n $name = '';\n $contact = '';\n\n $name.= $this->DisplayItem($row['salutation'], ' ');\n $name.= $this->DisplayItem($row['first_name'], ' ');\n $name.= $this->DisplayItem($row['middle_name'], ' ');\n $name.= $this->DisplayItem($row['last_name'], ' ');\n\n $contact .= $this->DisplayItem($row['email_address'], '<br />');\n $contact .= $this->DisplayItem($row['phone_number'], '<br />');\n\n $contact .= $this->DisplayItem($row['wh_id'], '<br />');\n // $contact .= $this->DisplayItem($row['active'], '<br />');\n\n $reg_status = $this->getEmployeeRegistration($WHID, $this->EVENT_SETUPS_ID, true);\n $reg_record = $this->Reg_Record;\n\n $REGISTER_LINK_RESET = '';\n $WHID = '';\n $link = $PAGE_DIR . $EVENT_PATH . '/event_registration_process;iframe=1;';\n $eq = EncryptQuery(\"wh_id={$row['wh_id']};register=1;events_id=$EVENTS_ID;event_setups_id=$EVENT_SETUPS_ID\");\n\n $eq_cancel = EncryptQuery(\"type=CancelEventRegistration;wh_id={$row['wh_id']};events_id=$EVENTS_ID;event_setups_id=$this->EVENT_SETUPS_ID;event_registrations_id={$reg_record['event_registrations_id']}\");\n\n $cancel_link = '@@PAGEDIR@@/AJAX@@EVENTPATH@@/@@PAGENAME@@';\n\n if (strpos($reg_status, $this->Messages['UNREGISTERED'])) {\n $reg_link = \"<br />[<a class=\\\"register_link\\\" href=\\\"#\\\" onclick=\\\"overlayWindow('$eq', '&nbsp;', '$link'); return false;\\\">[T~CE_MNU_REGISTER]</a>]\";\n $class = '';\n } else {\n $id = 'box_contact_' . $row['wh_id'];\n $reg_link = <<<LBL_LINK\n <br />[<a class=\"cancel_link\" href=\"#\"\n onclick=\"if (confirm('[T~CE_L_0039]')) {\n $('#$id').load('$cancel_link?cancel=1;eq=$eq_cancel');\n }\n return false;\">[T~CE_EML_CONF_0012]</a>]\nLBL_LINK;\n $class = ' box_have_registration';\n }\n\n\n if ($AJAX) {\n $START = '';\n $END = '';\n\n } else {\n $START = '<div id=\"box_contact_' . $row['wh_id'] . '\" class=\"box_wrapper_full\">';\n $END = '</div>';\n }\n\n\n\n $output = <<<OUTPUT\n $START\n <div class=\"box_header\">\n <div class=\"box_header_left\">$name</div>\n <div class=\"box_header_right\">\n\n </div>\n <div class=\"box_clear\"></div>\n </div>\n <div class=\"box_body$class\">\n <table width=\"600\"><tr><td width=\"300\">$contact</td><td width=\"300\">$reg_status$reg_link</td></tr></table>\n </div>\n $END\nOUTPUT;\n\n return $output;\n }", "function civicrm_api3_dgw_hov_create( $inparms ) {\n /*\n * set superglobal to avoid double update via post or pre hook\n */\n $GLOBALS['dgw_api'] = \"nosync\";\n $outparms['is_error'] = '1';\n /*\n * if no hov_nummer passed, error\n */\n if ( !isset( $inparms['hov_nummer'] ) ) {\n return civicrm_api3_create_error( \"Hov_nummer ontbreekt\" );\n } else {\n $hov_nummer = trim( $inparms['hov_nummer'] );\n }\n /*\n * Corr_name can not be empty\n */\n if ( !isset($inparms['corr_name'] ) || empty( $inparms['corr_name'] ) ) {\n return civicrm_api3_create_error( \"Corr_name ontbreekt\" );\n } else {\n $corr_name = trim( $inparms['corr_name'] );\n }\n /*\n * if no hh_persoon passed and no mh_persoon passed, error\n */\n if ( !isset( $inparms['hh_persoon'] ) && !isset( $inparms['mh_persoon'] ) ) {\n return civicrm_api3_create_error( \"Hoofdhuurder of medehuurder ontbreekt\" );\n } else {\n if ( isset( $inparms['hh_persoon'] ) ) {\n $hh_persoon = trim( $inparms['hh_persoon'] );\n } else {\n $hh_persoon = null;\n }\n if (isset( $inparms['mh_persoon'] ) ) {\n $mh_persoon = trim( $inparms['mh_persoon'] );\n } else {\n $mh_persoon = null;\n }\n }\n /*\n * if hh_persoon and mh_persoon empty, error\n */\n if ( empty( $hh_persoon ) && empty( $mh_persoon ) ) {\n return civicrm_api3_create_error( \"Hoofdhuurder en medehuurder ontbreken beide\" );\n }\n $persoonsnummer_first_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'persoonsnummer_first' );\n /*\n * if hh_persoon not found in CiviCRM, error\n */\n $hh_type = null;\n if ( !empty( $hh_persoon ) ) {\n $hhparms = array( \"custom_\".$persoonsnummer_first_field['id'] => $hh_persoon );\n $hhparms['version'] = 3;\n $res_hh = civicrm_api( 'Contact', 'getsingle', $hhparms );\n if ( isset( $res_hh['count'] ) ) {\n if ( $res_hh['count'] == 0 ) {\n $persoonsnummer_org_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'nr_in_first' );\n $hhparms = array(\n 'version' => 3,\n 'custom_'.$persoonsnummer_org_field['id'] => $hh_persoon\n );\n $res_hh = civicrm_api( 'Contact', 'getsingle', $hhparms );\n }\n }\n if ( isset( $res_hh['contact_id'] ) ) {\n $hh_id = $res_hh['contact_id'];\n if ( isset( $res_hh['contact_type'] ) ) {\n $hh_type = strtolower( $res_hh['contact_type']);\n }\n } else {\n if ( isset( $res_hh['error_message'] ) ) {\n $returnMessage = \"Contact niet gevonden, foutmelding van API Contact Getsingle : \".$res_hh['error_message'];\n } else {\n $returnMessage = \"Contact niet gevonden\";\n }\n return civicrm_api3_create_error( $returnMessage );\n }\n }\n /*\n * if mh_persoon not found in CiviCRM, error\n */\n if ( !empty( $mh_persoon ) ) {\n $mhparms = array( \"custom_\".$persoonsnummer_first_field['id'] => $mh_persoon );\n $mhparms['version'] = 3;\n $res_mh = civicrm_api( 'Contact', 'getsingle', $mhparms );\n if ( isset( $res_mh['count'] ) ) {\n if ( $res_mh['count'] == 0 ) {\n $persoonsnummer_org_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'nr_in_first' );\n $mhparms = array(\n 'version' => 3,\n 'custom_'.$persoonsnummer_org_field['id'] => $mh_persoon\n );\n $res_mh = civicrm_api( 'Contact', 'getsingle', $mhparms );\n }\n }\n if ( isset( $res_mh['contact_id'] ) ) {\n $mh_id = $res_mh['contact_id'];\n } else {\n if ( isset( $res_mh['error_message'] ) ) {\n $returnMessage = \"Contact niet gevonden, foutmelding van API Contact Getsingle : \".$res_mh['error_message'];\n } else {\n $returnMessage = \"Contact niet gevonden\";\n }\n return civicrm_api3_create_error( $returnMessage );\n }\n }\n /*\n * if start_date passed and format invalid, error\n */\n if ( isset( $inparms['start_date'] ) && !empty( $inparms['start_date'] ) ) {\n $valid_date = CRM_Utils_DgwUtils::checkDateFormat( $inparms['start_date'] );\n if ( !$valid_date ) {\n return civicrm_api3_create_error( \"Onjuiste formaat start_date\" );\n } else {\n $start_date = date( \"Ymd\", strtotime( $inparms['start_date'] ) );\n }\n }\n /*\n * if end_date passed and format invalid, error\n */\n if ( isset( $inparms['end_date'] ) && !empty( $inparms['end_date'] ) ) {\n $valid_date = CRM_Utils_DgwUtils::checkDateFormat( $inparms['end_date'] );\n if ( !$valid_date ) {\n return civicrm_api3_create_error( \"Onjuiste formaat end_date\" );\n } else {\n $end_date = date( \"Ymd\", strtotime( $inparms['end_date'] ) );\n }\n }\n /*\n * if hh_start_date passed and format invalid, error\n */\n if ( isset( $inparms['hh_start_date'] ) && !empty( $inparms['hh_start_date'] ) ) {\n $valid_date = CRM_Utils_DgwUtils::checkDateFormat( $inparms['hh_start_date'] );\n if ( !$valid_date ) {\n return civicrm_api3_create_error( \"Onjuiste formaat hh_start_date\" );\n } else {\n $hh_start_date = date( \"Ymd\", strtotime( $inparms['hh_start_date'] ) );\n }\n }\n /*\n * if hh_end_date passed and format invalid, error\n */\n if ( isset( $inparms['hh_end_date'] ) && !empty( $inparms['hh_end_date'] ) ) {\n $valid_date = CRM_Utils_DgwUtils::checkDateFormat( $inparms['hh_end_date'] );\n if ( !$valid_date ) {\n return civicrm_api3_create_error( \"Onjuiste formaat hh_end_date\" );\n } else {\n $hh_end_date = date( \"Ymd\", strtotime( $inparms['hh_end_date'] ) );\n }\n }\n /*\n * if mh_start_date passed and format invalid, error\n */\n if ( isset( $inparms['mh_start_date'] ) && !empty( $inparms['mh_start_date'] ) ) {\n $valid_date = CRM_Utils_DgwUtils::checkDateFormat( $inparms['mh_start_date'] );\n if ( !$valid_date ) {\n return civicrm_api3_create_error( \"Onjuiste formaat mh_start_date\" );\n } else {\n $mh_start_date = date( \"Ymd\", strtotime( $inparms['mh_start_date'] ) );\n }\n }\n /*\n * if mh_end_date passed and format invalid, error\n */\n if ( isset( $inparms['mh_end_date'] ) && !empty( $inparms['mh_end_date'] ) ) {\n $valid_date = CRM_Utils_DgwUtils::checkDateFormat( $inparms['mh_end_date'] );\n if ( !$valid_date ) {\n return civicrm_api3_create_error( \"Onjuiste formaat mh_end_date\" );\n } else {\n $mh_end_date = date( \"Ymd\", strtotime( $inparms['mh_end_date'] ) );\n }\n }\n $hov_group = CRM_Utils_DgwApiUtils::retrieveCustomGroupByName( 'Huurovereenkomst (huishouden)' );\n if ( !is_array( $hov_group ) ) {\n return civicrm_api3_create_error( \"CustomGroup Huurovereenkomst niet gevonden\" );\n }\n $hov_group_id = $hov_group['id'];\n $hov_group_table = $hov_group['table_name'];\n $hov_group_org = CRM_Utils_DgwApiUtils::retrieveCustomGroupByName('Huurovereenkomst (organisatie)');\n if ( !is_array( $hov_group_org ) ) {\n return civicrm_api3_create_error( \"CustomGroup Huurovereenkomst Org niet gevonden\" );\n }\n $hov_group_org_id = $hov_group_org['id'];\n /*\n * Validation passed, processing depends on contact type (issue 240)\n * Huurovereenkomst can be for individual or organization\n */\n if ( $hh_type == \"organization\" ) {\n $customparms['version'] = 3;\n $customparms['entity_id'] = $hh_id;\n /*\n * check if huurovereenkomst already exists\n */\n $values = CRM_Utils_DgwApiUtils::retrieveCustomValuesForContactAndCustomGroupSorted( $hh_id, $hov_group_org_id );\n $key = \"\"; //update alle records van een huurovereenkomt, als leeg nieuwe invoegen\n foreach( $values as $id => $field ) {\n if ( $field['hov_nummer'] == $hov_nummer) {\n $key = ':'.$id;\n break; //stop loop\n }\n }\n $hov_nummer_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'hov_nummer' );\n $begindatum_overeenkomst_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'begindatum_overeenkomst' );\n $einddatum_overeenkomst_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'einddatum_overeenkomst' );\n $vge_nummer_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'vge_nummer' );\n $vge_adres_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'vge_adres' );\n $naam_op_overeenkomst_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName( 'naam_op_overeenkomst' );\n $customparms['custom_'.$hov_nummer_field['id'].$key] = $hov_nummer;\n if (isset( $start_date ) && !empty( $start_date ) ) {\n $customparms['custom_'.$begindatum_overeenkomst_field['id'].$key] = $start_date;\n }\n if ( isset( $end_date ) && !empty( $end_date ) ) {\n $customparms['custom_'.$einddatum_overeenkomst_field['id'].$key] = $end_date;\n }\n if ( isset( $inparms['vge_nummer'] ) ) {\n $customparms['custom_'.$vge_nummer_field['id'].$key] = trim( $inparms['vge_nummer'] );\n }\n if ( isset( $inparms['vge_adres'] ) ) {\n $customparms['custom_'.$vge_adres_field['id'].$key] = trim( $inparms['vge_adres'] );\n }\n if ( isset( $inparms['corr_name'] ) ) {\n $customparms['custom_'.$naam_op_overeenkomst_field['id'].$key] = trim( $inparms['corr_name'] );\n }\n $res_custom = civicrm_api( 'CustomValue', 'Create', $customparms );\n if ( civicrm_error( $res_custom ) ) {\n return civicrm_api3_create_error( $res_custom['error_message'] );\n }\n $outparms['is_error'] = 0;\n /*\n * if type = individual\n */\n } else {\n $huishouden_id = 0;\n /*\n * huurovereenkomst for individual (household), first check if HOV exists\n */\n require_once 'CRM/Utils/DgwUtils.php';\n $huurOvereenkomst = CRM_Utils_DgwUtils::getHuurovereenkomstHuishouden( $hov_nummer );\n if ( empty( $huurOvereenkomst ) ) {\n /*\n * create huishouden for new huurovereenkomst\n */\n $hh_parms = array(\n 'version' => 3,\n 'contact_type' => 'Household',\n 'household_name' => $inparms['corr_name']\n );\n $hh_res = civicrm_api( 'Contact', 'Create', $hh_parms );\n if ( isset( $hh_res['id'] ) ) {\n $huishouden_id = (int) $hh_res['id'];\n $key = \"\";\n /*\n * for both persons, check if a relation hoofdhuurder to household is\n * present. If so, update with incoming dates. If not so, create.\n */\n if (isset($hh_persoon)) {\n $rel_med_id = CRM_Utils_DgwApiUtils::retrieveRelationshipTypeIdByNameAB('Medehuurder');\n $rel_hfd_id = CRM_Utils_DgwApiUtils::retrieveRelationshipTypeIdByNameAB('Hoofdhuurder');\n $parms = array(\n 'version' => 3,\n 'relationship_type_id' => $rel_med_id,\n 'contact_id_a' => $huishouden_id,\n );\n $res = civicrm_api('Relationship', 'get', $parms);\n $updated = false;\n if (!civicrm_error($res)) {\n foreach($res['values'] as $rid => $value) {\n $rel_params['version'] = 3;\n $rel_params['id'] = $rid;\n $rel_params['relationship_type_id'] = $rel_hfd_id;\n if (isset($hh_start_date) && !empty($hh_start_date)) {\n $rel_params['start_date'] = $hh_start_date;\n }\n if (isset($hh_end_date) && !empty($hh_end_date)) {\n $rel_params['end_date'] = $hh_end_date;\n }\n civicrm_api('Relationship', 'Create', $rel_params);\n $updated = true;\n }\n }\n if (!$updated) {\n $rel_params['version'] = 3;\n $rel_params['contact_id_a'] = $hh_id;\n $rel_params['contact_id_b'] = $huishouden_id;\n $rel_params['is_active'] = 1;\n $rel_params['relationship_type_id'] = $rel_hfd_id;\n if (isset($hh_start_date) && !empty($hh_start_date)) {\n $rel_params['start_date'] = $hh_start_date;\n }\n if (isset($hh_end_date) && !empty($hh_end_date)) {\n $rel_params['end_date'] = $hh_end_date;\n }\n civicrm_api('Relationship', 'Create', $rel_params);\n }\n }\n if (isset($mh_persoon) && !empty($mh_persoon)) {\n $rel_med_id = CRM_Utils_DgwApiUtils::retrieveRelationshipTypeIdByNameAB('Medehuurder');\n $rel_hfd_id = CRM_Utils_DgwApiUtils::retrieveRelationshipTypeIdByNameAB('Hoofdhuurder');\n $parms = array(\n 'version' => 3,\n 'relationship_type_id' => $rel_med_id,\n 'contact_id_a' => $mh_id,\n );\n $res = civicrm_api('Relationship', 'get', $parms);\n $updated = false;\n if (!civicrm_error($res)) {\n foreach($res['values'] as $rid => $value) {\n $rel_params['version'] = 3;\n $rel_params['id'] = $rid;\n if (isset($mh_start_date) && !empty($mh_start_date)) {\n $rel_params['start_date'] = $mh_start_date;\n }\n if (isset($mh_end_date) && !empty($mh_end_date)) {\n $rel_params['end_date'] = $mh_end_date;\n }\n civicrm_api('Relationship', 'Create', $rel_params);\n $updated = true;\n }\n }\n if (!$updated) {\n $rel_params['version'] = 3;\n $rel_params['contact_id_a'] = $mh_id;\n $rel_params['contact_id_b'] = $huishouden_id;\n $rel_params['is_active'] = 1;\n $rel_params['relationship_type_id'] = $rel_med_id;\n if (isset($mh_start_date) && !empty($mh_start_date)) {\n $rel_params['start_date'] = $mh_start_date;\n }\n if (isset($mh_end_date) && !empty($mh_end_date)) {\n $rel_params['end_date'] = $mh_end_date;\n }\n civicrm_api('Relationship', 'Create', $rel_params);\n }\n }\n /*\n * copy address, email and phone from hoofdhuurder\n */\n CRM_Utils_DgwUtils::processAddressesHoofdHuurder( $hh_id );\n CRM_Utils_DgwUtils::processEmailsHoofdHuurder( $hh_id );\n CRM_Utils_DgwUtils::processPhonesHoofdHuurder( $hh_id );\n } else {\n $returnMsg = \"Onverwachte fout: huishouden niet aangemaakt in CiviCRM\";\n if ( isset( $hh_res['error_message'] ) ) {\n $returnMsg .= \" , melding vanuit CiviCRM API : {$hh_res['error_message']}\";\n }\n return civicrm_api3_create_error( $returnMsg );\n }\n\n } else {\n $huishouden_id = $huurOvereenkomst->entity_id;\n $key = \":\".$huurOvereenkomst->id;\n }\n $hov_nummer_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName('HOV_nummer_First');\n $begindatum_overeenkomst_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName('Begindatum_HOV');\n $einddatum_overeenkomst_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName('Einddatum_HOV');\n $vge_nummer_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName('VGE_nummer_First');\n $vge_adres_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName('VGE_adres_First');\n $naam_op_overeenkomst_field = CRM_Utils_DgwApiUtils::retrieveCustomFieldByName('Correspondentienaam_First');\n /*\n * huurovereenkomst aanmaken\n */\n $customparms['version'] = 3;\n $customparms['entity_id'] = $huishouden_id;\n $customparms['custom_'.$hov_nummer_field['id'].$key] = $hov_nummer;\n if (isset($start_date) && !empty($start_date)) {\n $customparms['custom_'.$begindatum_overeenkomst_field['id'].$key] = $start_date;\n }\n if (isset($end_date) && !empty($end_date)) {\n $customparms['custom_'.$einddatum_overeenkomst_field['id'].$key] = $end_date;\n }\n if (isset($inparms['vge_nummer'])) {\n $customparms['custom_'.$vge_nummer_field['id'].$key] = trim($inparms['vge_nummer']);\n }\n if (isset($inparms['vge_adres'])) {\n $customparms['custom_'.$vge_adres_field['id'].$key] = trim($inparms['vge_adres']);\n }\n if (isset($inparms['corr_name'])) {\n $customparms['custom_'.$naam_op_overeenkomst_field['id'].$key] = trim($inparms['corr_name']);\n }\n $res_custom = civicrm_api('CustomValue', 'Create', $customparms);\n if (civicrm_error($res_custom)) {\n return civicrm_api3_create_error($res_custom['error_message']);\n }\n $outparms['is_error'] = 0;\n //update correspondentie naam bij huishouden\n if (isset($inparms['corr_name'])) {\n $cor_parms['version'] = 3;\n $cor_parms['name'] = trim($inparms['corr_name']);\n $cor_parms['contact_id'] = $huishouden_id;\n $res_cor = civicrm_api('Contact', 'Create', $cor_parms);\n }\n }\n unset($GLOBALS['dgw_api']);\n return $outparms;\n}", "function contacts_viewcontent_alm_customers_contacts_notify_holidays_BeforeShow(& $sender)\n{\n $contacts_viewcontent_alm_customers_contacts_notify_holidays_BeforeShow = true;\n $Component = & $sender;\n $Container = & CCGetParentContainer($sender);\n global $contacts_viewcontent; //Compatibility\n//End contacts_viewcontent_alm_customers_contacts_notify_holidays_BeforeShow\n\n//Custom Code @26-2A29BDB7\n// -------------------------\n // Write your own code here.\n \t$notify_holidays = explode(\",\", $sender->GetValue());\n\t$contacts_viewcontent->alm_customers_contacts->notify_holidays->Multiple = true;\n\t$contacts_viewcontent->alm_customers_contacts->notify_holidays->SetValue($notify_holidays);\n\n// -------------------------\n//End Custom Code\n\n//Close contacts_viewcontent_alm_customers_contacts_notify_holidays_BeforeShow @25-D0DFE732\n return $contacts_viewcontent_alm_customers_contacts_notify_holidays_BeforeShow;\n}", "public function viewAction() {\n// Validate request methods\n $this->validateRequestMethod();\n\n//IF ANONYMOUS USER THEN SEND HIM TO SIGN IN PAGE\n $check_anonymous_help = $this->getRequestParam('anonymous');\n if ($check_anonymous_help) {\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n }\n\n//GET LOGGED IN USER INFORMATION\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n if (!Engine_Api::_()->core()->hasSubject('sitereview_review')) {\n $this->respondWithError('no_record');\n }\n\n//GET EVENT ID AND OBJECT\n $sitereview = Engine_Api::_()->core()->getSubject()->getParent();\n\n//WHO CAN VIEW THE EVENTS\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view\")->isValid() || !Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.allowreview', 1)) {\n $this->respondWithError('unauthorized');\n }\n\n $review = Engine_Api::_()->core()->getSubject();\n if (empty($review)) {\n $this->respondWithError('no_record');\n }\n\n//GET USER LEVEL ID\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n//GET LEVEL SETTING\n $can_view = Engine_Api::_()->authorization()->getPermission($level_id, 'siteevent_event', \"view\");\n\n if ($can_view != 2 && $viewer_id != $sitereview->owner_id && ($sitereview->draft == 1 || $sitereview->search == 0 || $sitereview->approved != 1)) {\n $this->respondWithError('unauthorized');\n }\n\n if ($can_view != 2 && ($review->status != 1 && empty($review->owner_id))) {\n $this->respondWithError('unauthorized');\n }\n\n $params = array();\n $params = $review->toArray();\n $params['owner_title'] = $review->getOwner()->getTitle();\n $params['helpful_count'] = Engine_Api::_()->getDbTable('helpful', 'sitereview')->getCountHelpful($review->review_id, 1);\n\n if (isset($params['type']) && !empty($params['type']) && $params['type'] == 'visitor') {\n $params['owner_title'] = (isset($params['anonymous_name']) && !empty($params['anonymous_name'])) ? $params['anonymous_name'] : \"\";\n }\n\n//GET LOCATION\n if (!empty($sitereview->location) && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.location', 1)) {\n $params['location'] = $sitereview->location;\n }\n $params['tag'] = $sitereview->getKeywords(', ');\n\n//GET EVENT CATEGORY TABLE\n $tableCategory = Engine_Api::_()->getDbTable('categories', 'sitereview');\n\n $category_id = $sitereview->category_id;\n if (!empty($category_id)) {\n\n $params['categoryname'] = Engine_Api::_()->getItem('sitereview_category', $category_id)->category_name;\n\n $subcategory_id = $sitereview->subcategory_id;\n\n if (!empty($subcategory_id)) {\n\n $params['subcategoryname'] = Engine_Api::_()->getItem('sitereview_category', $subcategory_id)->category_name;\n\n $subsubcategory_id = $sitereview->subsubcategory_id;\n\n if (!empty($subsubcategory_id)) {\n\n $params['subsubcategoryname'] = Engine_Api::_()->getItem('sitereview_category', $subsubcategory_id)->category_name;\n }\n }\n }\n $response['response'] = $params;\n\n $this->respondWithSuccess($response, true);\n }", "function loadAdminHome() \n {\n // set the pageCallBack to be without any additional parameters\n // (an AdminBox needs this so Language Switching on a page doesn't\n // pass a previous operations)\n $parameters = array('EVENT_ID'=>$this->EVENT_ID);//[RAD_CALLBACK_PARAMS]\n $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_ADMINHOME, $this->sortBy, $parameters);\n $this->setPageCallBack( $pageCallBack );\n \n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if ($privManager->isBasicAdmin()==true)\t// check if privilege level is high enough\n { \n \t\t$this->pageDisplay = new page_AdminHome( $this->moduleRootPath, $this->viewer, $this->sortBy ); \n \t\t\t\n\t $links = array();\n\t \n\t/*[RAD_LINK_INSERT]*/\n\t\n\t $parameters = array( );//[RAD_CALLBACK_PARAMS]\n\t $link = $this->getCallBack( modulecim_reg::PAGE_ADMINEVENTHOME, '', $parameters );\n\t $link .= \"&\".modulecim_reg::EVENT_ID.\"=\";\n\t $links[\"access\"] = $link;\n\t\n\t $parameters = array('EVENT_ID'=>$this->EVENT_ID);//[RAD_CALLBACK_PARAMS]\n\t $sortByLink = $this->getCallBack( modulecim_reg::PAGE_ADMINHOME, '', $parameters );\n\t $sortByLink .= \"&\".modulecim_reg::SORTBY.\"=\";\n\t $links[\"sortBy\"] = $sortByLink;\n\t \n\t \n\t\n\t $this->pageDisplay->setLinks( $links ); \n\t //$this->previous_page = modulecim_reg::PAGE_ADMINHOME; \n }\n else\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n \n }", "function loadEditCampusRegistrations() \n {\n\n\t // get privileges for the current viewer\n $privManager = new PrivilegeManager( $this->viewer->getID() ); \n if ($privManager->isCampusAdmin($this->EVENT_ID, $this->CAMPUS_ID)==true)\t// check if privilege level is high enough\n {\t\n\t\t \t \n\t // set the pageCallBack to be without any additional parameters\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t // (BELOW NOTE) REMOVED REG_ID FROM LIST OF PARAMETERS, SINCE I WANT REG_ID FOR CONFIRM. E-MAIL BUT NOT TO CONFUSE OFFLINE REG PROCESS\n\t $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $pageCallBack = $this->getCallBack(modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack );\n\t \n\t // set flag for if the page is located inside the offline registration process\n\t if ($this->IS_IN_REG_PROCESS == modulecim_reg::IS_OFFLINE_REG) \n\t {\n\t\t $isInRegProcess = 'TRUE';\n\t// \t $this->IS_IN_REG_PROCESS == modulecim_reg::IS_FALSE;\t//reset flag\n\t }\n\t else \n\t {\n\t\t $isInRegProcess = 'FALSE';\n\t } \n\t \n\t $this->IS_IN_REG_PROCESS = modulecim_reg::IS_OFFLINE_REG; \n\t // (BELOW NOTE) REMOVED REG_ID FROM LIST OF PARAMETERS, SINCE I WANT REG_ID FOR CONFIRM. E-MAIL BUT NOT TO CONFUSE OFFLINE REG PROCESS\n\t $formParameters = array('IS_IN_REG_PROCESS'=>$this->IS_IN_REG_PROCESS, 'EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $formAction = $this->getCallBack(modulecim_reg::PAGE_EDITPERSONALINFO, $this->sortBy, $formParameters ); \n\t //$formAction,\n\t \n\t $this->pageDisplay = new page_EditCampusRegistrations( $this->moduleRootPath, $this->viewer, $formAction, $this->sortBy, $this->EVENT_ID, $this->CAMPUS_ID, $isInRegProcess, $this->REG_ID ); \n\t \n\t $links = array();\n\t $this->REG_ID = '';\t\t// reset registration ID so that offline reg. process is not confused\n\t \n\t // links for downloading CSV reports (campus-specific)\n\t $this->DOWNLOAD_TYPE = modulecim_reg::DOWNLOAD_EVENT_DATA;\n\t $fileDownloadParameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID, 'DOWNLOAD_TYPE'=>$this->DOWNLOAD_TYPE);//[RAD_CALLBACK_PARAMS] \n\t $link2 = $this->getCallBack( modulecim_reg::PAGE_DOWNLOADREPORT, '', $fileDownloadParameters );\n\t $links[\"CampusEventDataDump\"] = $link2; //Event Data Dump - for importing into Excel \n\t \n\t $this->DOWNLOAD_TYPE = modulecim_reg::DOWNLOAD_SCHOLARSHIP_DATA;\n\t $fileDownloadParameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID, 'DOWNLOAD_TYPE'=>$this->DOWNLOAD_TYPE);//[RAD_CALLBACK_PARAMS] \n\t $link3 = $this->getCallBack( modulecim_reg::PAGE_DOWNLOADREPORT, '', $fileDownloadParameters );\n\t $links[\"CampusEventScholarshipList\"] = $link3; //Event Scholarship List - for importing into Excel \n\t \n\t \n\t // regular links\n\t $emailPageParameters = array('EVENT_ID'=>$this->EVENT_ID , 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS] \n\t $link4 = $this->getCallBack( modulecim_reg::PAGE_EMAILCOMPOSER, '', $emailPageParameters ); \t \n\t $links[\"EmailCampusRegistrants\"] = $link4; \t \n\t \n\t $parameters = array( 'EVENT_ID'=>$this->EVENT_ID);\t//, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID);\t//, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $continueLink = $this->getCallBack( modulecim_reg::PAGE_ADMINEVENTHOME, \"\", $parameters );\n\t $links[\"cont\"] = $continueLink;\n\t \n\t $parameters = array( 'EVENT_ID'=>$this->EVENT_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS_EDIT]\t\t\n\t \n\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t $editLink = $this->getCallBack( modulecim_reg::PAGE_EDITREGISTRATIONDETAILS, $this->sortBy, $parameters );\n\t $editLink .= \"&\". modulecim_reg::REG_ID . \"=\";\n\t $links[ \"edit\" ] = $editLink;\n\t \n\t // NOTE: delete link is same as edit link for an AdminBox: but not in this case, since we point to confirm page\n\t $delLink = $this->getCallBack( modulecim_reg::PAGE_CONFIRMDELETEREGISTRATION, $this->sortBy, $parameters );\n\t $delLink .= \"&\". modulecim_reg::REG_ID . \"=\";\n\t $links[ \"del\" ] = $delLink;\n\t\n\t/*[RAD_LINK_INSERT]*/\n\t\n\t $parameters = array('EVENT_ID'=>$this->EVENT_ID, 'FIELDTYPE_ID'=>$this->FIELDTYPE_ID, 'PRICERULETYPE_ID'=>$this->PRICERULETYPE_ID, 'CCTYPE_ID'=>$this->CCTYPE_ID, 'PRIV_ID'=>$this->PRIV_ID, 'VIEWER_ID'=>$this->VIEWER_ID, 'SUPERADMIN_ID'=>$this->SUPERADMIN_ID, 'EVENTADMIN_ID'=>$this->EVENTADMIN_ID, 'FIELD_ID'=>$this->FIELD_ID, 'DATATYPE_ID'=>$this->DATATYPE_ID, 'PRICERULE_ID'=>$this->PRICERULE_ID, 'CAMPUSACCESS_ID'=>$this->CAMPUSACCESS_ID, 'CASHTRANS_ID'=>$this->CASHTRANS_ID, 'CCTRANS_ID'=>$this->CCTRANS_ID, 'REG_ID'=>$this->REG_ID, 'FIELDVALUE_ID'=>$this->FIELDVALUE_ID, 'SCHOLARSHIP_ID'=>$this->SCHOLARSHIP_ID, 'STATUS_ID'=>$this->STATUS_ID, 'CAMPUS_ID'=>$this->CAMPUS_ID);//[RAD_CALLBACK_PARAMS]\n\t $sortByLink = $this->getCallBack( modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS, '', $parameters );\n\t $sortByLink .= \"&\".modulecim_reg::SORTBY.\"=\";\n\t $links[\"sortBy\"] = $sortByLink;\n\t\n\t $this->pageDisplay->setLinks( $links ); \n\t// $this->previous_page = modulecim_reg::PAGE_EDITCAMPUSREGISTRATIONS; \n\t// echo \"prev page = \".$this->previous_page;\n } \n \t\t\telse\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n }" ]
[ "0.61957216", "0.61486053", "0.6120051", "0.6027643", "0.5955577", "0.5190054", "0.50964916", "0.49379218", "0.493334", "0.47388077", "0.46594888", "0.46551737", "0.4594182", "0.45923123", "0.4554101", "0.45207456", "0.4502881", "0.44956747", "0.44872376", "0.4483614", "0.44781935", "0.447533", "0.4471763", "0.44702238", "0.44509074", "0.4437546", "0.4437002", "0.44368055", "0.4434842", "0.44284758", "0.44199386", "0.43888187", "0.4380986", "0.43746692", "0.43598384", "0.4352983", "0.43452233", "0.43380117", "0.43342882", "0.43243715", "0.43240488", "0.43168584", "0.43122235", "0.43118083", "0.43071017", "0.43016496", "0.4296227", "0.42943978", "0.42764258", "0.42572877", "0.42543668", "0.42522684", "0.42496157", "0.4238691", "0.42369568", "0.42344385", "0.42341596", "0.42294052", "0.4206211", "0.42060843", "0.42047778", "0.42033204", "0.4201736", "0.41974366", "0.419681", "0.41959223", "0.41868943", "0.4185705", "0.41835606", "0.41818792", "0.41811547", "0.4175424", "0.41754103", "0.41726223", "0.41714928", "0.41707277", "0.41697136", "0.41600916", "0.415814", "0.41538745", "0.4147292", "0.41458717", "0.4143081", "0.41383234", "0.41382068", "0.41353095", "0.41344967", "0.41335502", "0.41326562", "0.41325042", "0.41310632", "0.41231582", "0.41211924", "0.41211188", "0.4117586", "0.41161034", "0.4115131", "0.41129842", "0.410777", "0.4107288" ]
0.71400404
0
/ Only allow POST requests.
Разрешить только запросы POST.
function only_post_requests() { if ($_SERVER['REQUEST_METHOD'] !== 'POST') { header('HTTP/1.1 403 Forbidden'); exit(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_post_request(){\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n }", "function is_post_request(){\n return $_SERVER[\"REQUEST_METHOD\"] == \"POST\";\n }", "public function requirePostMethod()\n {\n // require POST requests\n if($_SERVER['REQUEST_METHOD'] && $_SERVER['REQUEST_METHOD'] != 'POST')\n {\n header('Allow: POST', true, 405);\n throw new Exception(\"Invalid HTTP request method.\");\n }\n }", "function checkPost(){\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\n return true;\n }\n else{\n http_response_code(405);\n exit('Expected POST');\n }\n}", "function ensurePOST() {\n if ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n ErrorHandler::generic_error(new Error(\"Invalid Request Method. Please use POST.\"));\n }\n}", "public function checkPostRequest() {\r\n if (!Request::isPost()) Response::redirect();\r\n }", "function isPost()\r\n{\r\n return isset($_SERVER['REQUEST_METHOD'])\r\n && $_SERVER['REQUEST_METHOD'] == 'POST';\r\n}", "function is_post()\n{\n\treturn $_SERVER['REQUEST_METHOD'] == 'POST';\n}", "protected function isPostRequest()\n \t{\n \treturn Input::server(\"REQUEST_METHOD\") == \"POST\";\n \t}", "function isPostRequest()\n{\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST' );\n}", "function isPostRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST' );\r\n}", "public function isPostRequest() {\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST' );\n }", "public function isPost(){\n\t\treturn $_SERVER['REQUEST_METHOD'] === 'POST';\n\t}", "public function isPostRequest()\n {\n $requestMethod = static::getRequestMethodFromServer();\n return (isset($requestMethod) && !strcasecmp($requestMethod, 'POST'));\n }", "function isPost() {\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\n return true;\n } else {\n return false;\n }\n}", "public function isPost(){\n return HTTP\\Request::is(\"POST\"); \n }", "function isPost(){\n\tif($_SERVER['REQUEST_METHOD']=='POST'){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function is_post () {\n $method = array_get($_SERVER, 'REQUEST_METHOD', 'get');\n \n return strtolower($method) === 'post';\n}", "function RequestIsPost()\n{\n\treturn $_SERVER['REQUEST_METHOD'] == 'POST' ? 1 : 0;\n}", "public static function isPost() {\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n }", "public static function isPost()\r\n {\r\n return $_SERVER['REQUEST_METHOD'] == 'POST';\r\n }", "public function isPOST()\n {\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n }", "function IsPost()\n\t{\n\t\treturn $_SERVER[REQUEST_METHOD] == 'POST';\n\t}", "public static function isPost()\n {\n return $_SERVER['REQUEST_METHOD'] == \"POST\";\n }", "public static function isPostRequest()\n\t{\n\t\tif(self::getServer('REQUEST_METHOD') === 'POST')\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function getIsPostRequest()\n\t{\n\t\treturn isset($_SERVER['REQUEST_METHOD']) && !strcasecmp($_SERVER['REQUEST_METHOD'],'POST');\n\t}", "public function isPostRequest()\n {\n return ($this->_method == 'POST');\n }", "public function isPost(){ }", "public static function ifPost() {\n return $_SERVER['REQUEST_METHOD'] === 'POST';\n }", "function isPost() {\n $flag = ($_SERVER['REQUEST_METHOD'] == 'POST') ? TRUE : FALSE;\n return $flag;\n}", "static public function isPost()\n\t{\n\t\treturn strtolower($_SERVER['REQUEST_METHOD']) == 'post';\n\t}", "public static function isPost()\n {\n return self::getMethod() === 'POST';\n }", "private function checkHttpMethodIsPost()\n {\n if ($_SERVER['REQUEST_METHOD'] != 'POST') {\n throw new Exception('Invalid HTTP method.');\n }\n }", "public function is_post() {\n return strtolower($_SERVER['REQUEST_METHOD']) == \"post\";\n }", "public function isPost()\n {\n return (isset($this->server['REQUEST_METHOD']) && ($this->server['REQUEST_METHOD'] == 'POST'));\n }", "public function checkPostVancancy(){\n\n }", "protected function _isPost()\n {\n return strtolower($_SERVER['REQUEST_METHOD']) == 'post';\n }", "public function is_post()\n {\n return $this->request->method() === HTTP_Request::POST;\n }", "public function isPost()\n {\n $request = $this->server();\n if ($request[\"REQUEST_METHOD\"] == 'POST') {\n return true;\n }\n return false;\n }", "protected function isPost()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') return true;\n return false;\n }", "function method_post(){\r\n\treturn count($_POST) > 0; //$_SERVER['REQUEST_METHOD'] === 'POST';\r\n}", "public function isPost() : bool\n {\n $this->checkAutomaticAuthentication();\n\n return $_SERVER['REQUEST_METHOD'] === 'POST';\n }", "function check_post_only() {\n if(!$_POST) {\n write_error_page(\"This scripts can only be called from a form.\");\n exit;\n }\n}", "function isPost() {\n\t\treturn ($this->method == 'POST');\n\t}", "public function isPost()\n {\n return $this->method === \"POST\";\n }", "public function isPost() {\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n return true;\n }\n return false;\n }", "public function isPost() {\n return $this->method() == 'POST';\n }", "public function isPost() {\n\n\t\tif($this->server['REQUEST_METHOD'] == 'POST') {\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isPost(): bool\n\t{\n\t\treturn $this->getRequest()->getMethod() === 'POST';\n\t}", "public function isPost()\n {\n return ($this->getMethod()=='POST');\n }", "function request_needs_validation() {\n\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\treturn in_array($request_method, [ \"post\", \"put\", \"patch\", \"delete\" ]);\n}", "function mustBePosted() {\n\t\treturn true;\n\t}", "public function isPost()\n {\n return (Request::METHOD_POST == $this->method);\n }", "function isPost() {\n\t\t$_this =& PKPRequest::_checkThis();\n\n\t\treturn ($_this->getRequestMethod() == 'POST');\n\t}", "public function isPost()\n {\n return $this->isMethod('POST');\n }", "public function isPost()\n {\n return $this->getMethod() === 'POST';\n }", "protected function isPost()\n {\n return ($this->request->getMethod() == 'POST');\n }", "public function isPostRequest()\n {\n return !$this->post->isEmpty();\n }", "public static function isPost()\n {\n return self::method() === self::METHOD_POST;\n }", "public function isPost()\r\n {\r\n return strtoupper($this->method) === 'POST';\r\n }", "public function post()\n\t{\n\t\tthrow new NotAllowedException($this);\n\t}", "public function isPost()\n {\n if ('POST' == $this->getMethod()) {\n return true;\n }\n return false;\n }", "public function isPost() {\n\t\treturn ($this->getMethod() === 'POST');\n\t}", "protected function isPost() {\n\t\treturn $this->_request->is('post');\n\t}", "public function isPost()\n {\n return ($this->getMethod() == self::METHOD_POST);\n }", "function handleAllRequests()\n{\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n //registracia ucitela\n handlePostRequest();\n }\n else {\n http_response_code(405);\n }\n}", "function handlePOSTRequest() {\n if (array_key_exists('submitHavingRequest', $_POST)) {\n handleHavingRequest();\n }\n }", "function handlePost()\n {\n return false;\n }", "public function isPost()\n {\n return $this->getMethod() === self::METHOD_POST;\n }", "public function isPost()\n {\n return $this->method() === 'post';\n }", "function is_post(): bool\n{\n return app()->request->isPost();\n}", "public function isPost()\n {/*{{{*/\n return ($this->method === self::METHOD_POST);\n }", "public function isPost() {\n\t\treturn $this->getRequest ()->isPost ();\n\t}", "public static function spoofed()\n\t{\n\t\treturn is_array($_POST) and array_key_exists('REQUEST_METHOD', $_POST);\n\t}", "public function getIsPost()\n {\n return $this->getMethod() === 'POST';\n }", "function _isHttpPost()\n{\n return (bool) count($_POST);\n}", "function PortaMx_checkPOST()\n{\n\tglobal $context;\n\n\t// cleanup POST array\n\tif(empty($_POST))\n\t\treturn false;\n\n\t$_POST = PortaMx_makeSafe($_POST);\n\n\t// id admin security logon ?\n\tif(isset($_POST['admin_pass']))\n\t{\n\t\t// yes .. remove the posts\n\t\tunset($_POST['admin_pass']);\n\t\tif(isset($_POST['admin_hash_pass']))\n\t\t\tunset($_POST['admin_hash_pass']);\n\t\tif(isset($_POST[$context['session_var']]))\n\t\t\tunset($_POST[$context['session_var']]);\n\t}\n\treturn !empty($_POST);\n}", "public function testOnlyPost() {\n $response = $this->post('/match');\n $response->assertStatus(200);\n\n $response = $this->put('/match');\n $response->assertStatus(405);\n\n $response = $this->get('/match');\n $response->assertStatus(405);\n }", "function allow_save_post($post)\n {\n }", "protected function _invalid_request() {\n\t\treturn $this->JSONOutput(array(\"error\" => 1 , \"message\" => \"Request method must be POST\"));\n\t}", "private function _set_post_on_json_request() {\n\t\tif(serv('REQUEST_METHOD') != 'POST' || !stristr(serv('CONTENT_TYPE'), 'json')) return;\n\t\t$_POST = json_decode(file_get_contents('php://input'), true);\n\t\tif(!$_POST) $_POST = array();\n\t}", "public function isPost()\n {\r\n return (bool) $_POST;\n }", "public static function requestMethod()\n {\n $server = new \\app\\super\\Server();\n return $server->isPost();\n }", "function __canPost() {\n $return = true;\n \n foreach($this->requiredFields as $field) {\n if(!isset($this->fields[$field])) {\n if(array_key_exists($field, $this->dummyVals)) {\n $this->addField($field, $this->dummyVals[$field]);\n } else {\n $return = false;\n $this->errors[] = 'Required field not found: '.$field;\n }\n }\n }\n \n return $return;\n }", "public function POST() {}", "public function testIsPost()\n {\n $request = $this->Request;\n\n $this->assertTrue($request::isPost());\n }", "protected function isPost()\n {\n return $this->getRequest()->isPost();\n }", "public static function isPosted() {\n if (array_key_exists('REQUEST_METHOD', $_SERVER) && $_SERVER['REQUEST_METHOD'] == 'POST') {\n return true;\n } else {\n return false;\n }\n }", "function ignorePost($ignore=true);", "private function setPostMethod() {\n\t\t$this->_action = 'save';\n\t\tif (empty($_POST)) {\n\t\t\t$response = new \\System\\Helpers\\Response('Please submit data', 200, true);\n\t\t\t$response->toJSON();\n\t\t}\n\t}", "abstract static protected function requestNotAllowedCallback();", "public static function isMethodPost () : bool {\n\t\treturn self::getMethod() === 'post';\n\t}", "public static function isGettingGlobalPOST()\n {\n if (count($_POST) > 0)\n {\n trigger_error(\"File cannot receive posted data\", E_USER_ERROR);\n }\n }", "public function post_it() { $this->method = \"POST\" ;}", "protected function getIsPatchViaPostRequest()\n\t{\n\t\treturn isset($_POST['_method']) && !strcasecmp($_POST['_method'],'PATCH');\n\t}", "public function testPostOrderForbidden()\n {\n $response = $this->json('post', $this->endpoint, $this->data, [\n 'REMOTE_ADDR' => '1.0.4.0' // Australia\n ]);\n\n $response->assertStatus(403);\n\n $response = $this->json('post', $this->endpoint, $this->data, [\n 'REMOTE_ADDR' => '152.200.0.0' // Colombia\n ]);\n\n $response->assertStatus(403);\n }", "public function testAllowedPostPaths() {\n $_SERVER['REQUEST_URI'] = \"/post-test-d\";\n $_SERVER['REQUEST_METHOD'] = \"POST\";\n\n echo \"{{POST}} REQUEST_URI set to \".$_SERVER['REQUEST_URI'].PHP_EOL;\n echo \"{{POST}} REQUEST_METHOD set to \".$_SERVER['REQUEST_METHOD'].PHP_EOL.\".\".PHP_EOL;\n echo \"Expecting:\".PHP_EOL.\n \" ~ test-d == true\".PHP_EOL.\n \" ~ test-e == false\".PHP_EOL.\n \" ~ test-f == false\".PHP_EOL;\n\n $var = new FunkyBunch\\SimpleHTTPRouter\\Router;\n $this->assertTrue($var->post(\"/post-test-d\", function(){echo \"Result: test-d\".PHP_EOL;}));\n $this->assertFalse($var->post(\"/post-test-e\", function(){echo \"Result: test-e\".PHP_EOL;}));\n $this->assertFalse($var->post(\"/post-test-f\", function(){echo \"Result: test-f\".PHP_EOL;}));\n echo PHP_EOL.PHP_EOL;\n unset($var);\n }", "public function guest_may_not_update_post()\n {\n $post = create('App\\Post');\n\n $this->postJson(\"/api/v1.01/posts/{$post->id}/update\", [])->assertStatus(401);\n }", "function shouldServe()\n {\n return ('XMLHttpRequest' == getenv('HTTP_X_REQUESTED_WITH'))\n && ('POST'=== strtoupper(getenv('REQUEST_METHOD')))\n && (!empty($_POST['persona_action']));\n }", "public function isForbidden(): bool {}" ]
[ "0.80665916", "0.795455", "0.7869887", "0.7813274", "0.77910936", "0.76115704", "0.7607549", "0.75984937", "0.7594815", "0.7583378", "0.7551293", "0.75239867", "0.743296", "0.73993146", "0.7362356", "0.7328075", "0.7307894", "0.7294617", "0.7292972", "0.72845036", "0.7269567", "0.72612053", "0.725524", "0.7253896", "0.72194123", "0.72156155", "0.7165504", "0.7159162", "0.71571904", "0.71458584", "0.7138376", "0.7122089", "0.71216714", "0.7103657", "0.7095543", "0.70887923", "0.70853776", "0.70786864", "0.70555365", "0.7052389", "0.70449096", "0.70399326", "0.7017493", "0.6967426", "0.69607747", "0.69593555", "0.6952913", "0.6942079", "0.69322205", "0.6925082", "0.69060004", "0.6899778", "0.6898735", "0.6897032", "0.68947303", "0.68895656", "0.68769747", "0.6868708", "0.68511057", "0.68446946", "0.6825341", "0.67984134", "0.6776328", "0.67755675", "0.67721736", "0.675878", "0.674856", "0.67399436", "0.6731801", "0.6715554", "0.66971016", "0.6683371", "0.6667493", "0.66452545", "0.6641962", "0.6614166", "0.6602596", "0.6588697", "0.65279", "0.6518545", "0.6516956", "0.64920396", "0.6483951", "0.6477855", "0.64753616", "0.6458174", "0.64419866", "0.6433084", "0.6413652", "0.63961256", "0.63957983", "0.6395159", "0.6392547", "0.63916796", "0.6369541", "0.6356896", "0.6354224", "0.6317531", "0.62981236", "0.62928027" ]
0.8420306
0
Gets the Kinesis client.
Получает клиент Kinesis.
public function getKinesisClient($type) { if (!empty($this->clients[$type])) { return $this->clients[$type]; } $config = [ 'version' => $this->config['api_version'], 'region' => $this->config['region'], ]; $config['credentials'] = [ 'key' => $this->config[$type]['key'], 'secret' => $this->config[$type]['secret'], ]; $sdk = new Sdk(); $this->clients[$type] = $sdk->createKinesis($config); return $this->clients[$type]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClient()\n {\n return $this->call('client');\n }", "protected function getClient() {\n if(!isset($this->_client)) {\n if(!Yii::app()->hasComponent($this->sentryComponent)) {\n Yii::log(\"'$this->sentryComponent' does not exist\", \n CLogger::LEVEL_TRACE, 'application.RSentryLogRoute');\n $this->_client = false;\n } else {\n $sentry = Yii::app()->{$this->sentryComponent};\n \n if(!$sentry || !$sentry->getIsInitialized()) {\n Yii::log(\"'$this->sentryComponent' not initialised\", \n CLogger::LEVEL_TRACE, 'application.RSentryLogRoute');\n $this->_client = false;\n } else {\n $this->_client = $sentry;\n }\n }\n }\n \n return $this->_client;\n }", "public function getClient()\n {\n return $this->get('client');\n }", "public function getClient(): S3Client\n {\n return $this->client;\n }", "protected function getClient()\n {\n return $this->connection ? $this->client->connection($this->connection) : $this->client;\n }", "protected function getClient()\n {\n return $this->client ?? ($this->client = new Client());\n }", "public function getClient() {\n\t\treturn $this->_client;\n\t}", "public function getClient() {\n if(is_null($this->client)) {\n $this->client = $this->connect(); \n }\n return $this->client;\n }", "public function getClient()\r\n {\r\n return $this->client;\r\n }", "public function getClient()\r\n {\r\n return $this->client;\r\n }", "public function getClient()\n {\n return $this->_client;\n }", "private function getClient()\n {\n if ($this->_client === null) {\n $this->_client = SnsClient::factory([\n 'key' => $this->key,\n 'secret' => $this->secret,\n 'region' => $this->region\n ]);\n }\n return $this->_client;\n }", "public function getClient() {\n\t\treturn $this->client;\n\t}", "public function getClient() {\n\t\treturn $this->client;\n\t}", "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "public function getClient() {\n if (!$this->client) {\n $this->setClient();\n }\n return $this->client;\n }", "public function getClient()\n {\n if (empty($this->client)) {\n $this->setClient();\n }\n \n return $this->client;\n }", "protected function _getSourceClient()\n {\n if(!$this->_client) {\n $accessToken = $this->getAccessToken();\n if($accessToken) {\n $this->_client = new Client($accessToken, \"PHP-Example/1.0\");\n }\n }\n\n return $this->_client;\n }", "public function getClient()\n {\n if (empty($this->client)) {\n $this->client = $this->makeClient();\n }\n\n return $this->client;\n }", "public function getClient()\n {\n return static::$client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this->client;\n }", "public function getClient()\n {\n if (!$this->client) {\n $this->client = new Client();\n }\n\n return $this->client;\n }", "public function getClient() \n {\n return $this->client;\n }", "protected function getClient()\n\t{\n\t\tif (is_null($this->s3client)) {\n\t\t\t$aws_config = Loader::config('aws_v1');\n\n\t\t\tif (is_array($aws_config)) {\n\t\t\t\tCFCredentials::set($aws_config);\n\t\t\t}\n\n\t\t\t$this->s3client = new AmazonS3();\n\t\t}\n\n\t\treturn $this->s3client;\n\t}", "public function getClient() {\n return $this->client;\n }", "protected static function getClient()\n {\n return static::getStorage()\n ->getDriver()\n ->getAdapter()\n ->getClient();\n }", "private function _getClient()\n {\n if (!isset($this->_client) || !is_object($this->_client)) {\n $this->_client = Mage::getModel('payjunction/client', $this->_getClientOptions());\n }\n return $this->_client;\n }", "private function getClient() { \n\t\treturn $this->client;\n\t}", "protected function getClient()\n {\n return $this->client;\n }", "public static function getClient()\n {\n /** @var \\Sentry\\State\\Hub $instance */\n return $instance->getClient();\n }", "public function client()\n {\n return $this->client;\n }", "public function getClient()\n {\n return $this;\n }", "public function client()\n\t{\n\t\treturn $this->get(Token::CLIENT);\n\t}", "protected function getClient()\n {\n if ($this->client === null) {\n $this->client = self::createClient();\n }\n\n return $this->client;\n }", "protected function getClient()\n {\n $client = $this->getOauth($this)->getClient();\n return $client;\n }", "public function getClient()\n {\n return $this->authorizationCode->getClient();\n }", "public function getClient(): Client\n {\n return $this->_client;\n }", "public function getClient()\n {\n if ($this->client === null) {\n $this->client = $this->getStaticClient();\n }\n \n return $this->client;\n }", "public function getClient()\n\t{\n\t\treturn JApplicationHelper::getClientInfo($this->getState('client_id', 0));\n\t}", "public function client() {\n\t\treturn $this->client;\n\t}", "public function getClient()\n {\n if ( $order = $this->getOrder() ){\n return $order->client;\n }\n\n return client();\n }", "public function getClient(){\n return $this->client;\n }", "public function getClient(): Client\n {\n return $this->client;\n }", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "public function getClient()\n {\n return $this->trans->serviceClient;\n }", "public function getClient()\n {\n return $this->trans->serviceClient;\n }", "public function client(): \\GraphAware\\Neo4j\\Client\\Client\n {\n return $this->client;\n }", "public function getClient()\n {\n $client = $this->reduceFirst(function (SearchProviderInterface $provider) {\n return $provider->getClient();\n });\n\n if (null === $client) {\n throw new \\RuntimeException('No provider was able to return a client');\n }\n\n return $client;\n }", "public function getClient()\n {\n return new Client($this->app, []);\n }", "public function client()\n {\n if(null === $this->_client) {\n $this->_client = new Client();\n }\n return $this->_client;\n }", "public function &getClient()\n {\n return $this->client;\n }", "public function getClient(): CloudFrontClient\n {\n return $this->client;\n }", "public function &getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "public function getClientHandler()\n {\n return $this->clientHandler;\n }", "public function getS3Client() {\n return $this->_s3Client;\n }", "public function get_client() {\n return model_client::load_by_id($this->client_id);\n }", "private function getClient(): Client\n {\n if (!$this->client instanceof Client)\n $this->client = new Client();\n\n return $this->client;\n }", "public function getClient() {\n if ($this->_client === false) {\n $this->_client = new AliClient($this->key, $this->signature);\n }\n\n return $this->_client;\n }", "public function getClient()\n {\n return $this->initializeSoapClient();\n }", "public function getClient()\n {\n return $this->_apiClient;\n }", "public function getClient()\n {\n if ($this->options['client'] instanceof Client\\ClientInterface) {\n $client = $this->options['client'];\n } else {\n // the client object itself (php < 5.4)\n $className = __NAMESPACE__ . '\\\\Client\\\\' .\n ucfirst(strtolower($this->options['api']['client']));\n $client = new $className($this->options['client']);\n }\n return $client;\n }", "public function s3Client() {\n \t// Create an Amazon S3 client object\n \tif (!isset($this->s3ClientObj)) {\n \t\ttry {\n \t\t\t$this->s3ClientObj = S3Client::factory(array(\n \t\t\t\t\t'key' => $this->_s3Key,\n \t\t\t\t\t'secret' => $this->_s3Secret\n \t\t\t));\n \t\t} catch (Exception $exception) {\n \t\t\tthrow $exception;\n \t\t}\n \t}\n \treturn $this->s3ClientObj;\n }", "public function getClientKey()\n {\n return $this->client_key;\n }", "public function getClient(): Client\n {\n if ($this->client === null) {\n $this->client = new Client();\n }\n\n return $this->client;\n }", "protected function getClient(InputInterface $in) : Client {\n if (!$this->client) {\n $this->client = new Client([\n 'key' => $in->getOption('key'),\n 'baseUri' => $in->getOption('base-uri'),\n 'collection' => $in->getOption('collection'),\n ]);\n }\n\n return $this->client;\n }", "public function getClient()\n {\n return $this->hasOne(OauthClient::className(), ['client_id' => 'client_id']);\n }" ]
[ "0.6696503", "0.6696288", "0.6669996", "0.666104", "0.66567403", "0.658225", "0.6480747", "0.64740276", "0.64737946", "0.64623976", "0.6459512", "0.6451112", "0.64481366", "0.64481366", "0.6436296", "0.6436296", "0.6436296", "0.64333093", "0.6420943", "0.641422", "0.63960826", "0.63920975", "0.6390385", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.6381706", "0.63714355", "0.6363983", "0.6360604", "0.6356042", "0.63526237", "0.6345953", "0.63415796", "0.63309366", "0.63261396", "0.63154644", "0.6303286", "0.63030946", "0.62844884", "0.626621", "0.62577397", "0.6251746", "0.6232437", "0.62051755", "0.6197726", "0.6196563", "0.61945647", "0.6166733", "0.6164211", "0.6156791", "0.6156791", "0.6156791", "0.6134152", "0.6134152", "0.6109495", "0.6094913", "0.6066712", "0.6043268", "0.60313916", "0.6027787", "0.60235786", "0.6017146", "0.6007194", "0.6004137", "0.6003132", "0.5997942", "0.59931946", "0.59603333", "0.5886371", "0.58692706", "0.58677626", "0.5861467", "0.5854046", "0.58513796" ]
0.7541577
0
/$this>datos>toggle_estado(); return "Cambio de estado realizado con éxito";
$this>datos>toggle_estado(); return "Изменение состояния успешно выполнено";
function grid_toggle_estado() { //return $_POST["accion_activa"]; if($_POST["accion_activa"]== 3) { $this->datos->toggle_estado(); return "Cambio de estado realizado con &eacute;xito"; } else { $this->datos->toggle_estado_actualizar_estado(); //return "Cambio de estado realizado con &eacute;xito"; return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function aktivasi(){\n return \"kartu telah aktif\";\n }", "function icono_activo($estado){\n if($estado==0){ return '<i class=\"fas fa-toggle-off text-danger\" title=\"Inactivo\"></i>'; }\n else{return '<i class=\"fas fa-toggle-on text-info\" title=\"Activo\"></i>';}\n}", "public function inactivo()\n {\n \treturn self::INACTIVO;\n }", "public function CambiaEstado(){\n\t\t$idActividad=$_REQUEST['idActividad'];\n\t\t$estado=$_REQUEST['estado'];\n\t\tif($estado==1)\n\t\t\t$this->model->CambiaEstado($idActividad,0);\n\t\telse\n\t\t\t$this->model->CambiaEstado($idActividad,1);\n\t\techo $this->mensaje=\"Se ha actualizado correctamente el estado\";\n\t}", "public function aktivasi();", "function getEstado () { \n \treturn $this -> inciEstado; \n }", "function actualizar_estado($idciudad, $estado) {\n $menu_activo = 'active';\n $data['menu_activo_localizacion'] = $menu_activo;\n //mandando el estilo del item activo\n $item_activo = 'enlace_activo';\n $data['item_activo_localizacion_ciudades'] = $item_activo;\n if ($estado == 0) {\n $actualizarEstado = $this->Ciudades_modelo->actualizarEstado($idciudad, 1);\n if ($actualizarEstado) {\n $data [\"Mensaje_Ciudad_Estado\"] = 'Estado Actualizado';\n } else {\n $data [\"Mensaje_Ciudad_Estado\"] = '';\n }\n }\n if ($estado == 1) {\n $actualizarEstado = $this->Ciudades_modelo->actualizarEstado($idciudad, 0);\n if ($actualizarEstado) {\n $data [\"Mensaje_Ciudad_Estado\"] = 'Estado Actualizado';\n } else {\n $data [\"Mensaje_Ciudad_Estado\"] = '';\n }\n }\n //obtener ciudades existentes\n $obtenerCiudades = $this->Ciudades_modelo->obtenerCiudades();\n $data['obtenerCiudades'] = $obtenerCiudades;\n //obtener total de registros en tabla ciudades\n $obtenerTotalCiudades = $this->Ciudades_modelo->obtenerTotalCiudades();\n $data['obtenerTotalCiudades'] = $obtenerTotalCiudades;\n //cargando la vista y enviando datos\n $data [\"contenido_principal\"] = \"ciudades/mantenimiento_ciudades\";\n $data [\"titulo\"] = \"Administración de Ciudades\";\n $this->load->view(\"includes/template_localizacion\", $data);\n }", "public function getEstado(){\n return $this->estado;\n }", "function cambiarEstado(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE catalogo_fase SET ctf_estado='$estado' WHERE ctf_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function getEstado()\n {\n return $this->estado;\n }", "public function getEstado()\n {\n return $this->estado;\n }", "function cambiarEstado(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE catalogo_tarea SET ctt_estado='$estado' WHERE ctt_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "function msgEstado($tipo){\r\n\r\n\tswitch(trim($tipo)){\r\n\t\tcase 1:\r\n\t\t\t$msg='Habilitado';\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$msg='Deshabilitado';\r\n\t}\r\n\t\r\n\treturn $msg;\r\n}", "public function activarPantalla( ) {\n }", "public function attaquer() {\n echo \" tire une flèche\";\n }", "public function activo()\n {\n \treturn self::ACTIVO;\n }", "public function detalle_tirilla()\n {\n\n }", "public function estaVencido()\n {\n }", "private static function inactivo()\n {\n try {\n $id = $_GET['id'];\n $arrayarea['Estado'] = 'Inactivo';\n $arrayarea['idTrasferencia'] = $id;\n $area = new areaclass($arrayarea);\n $area->acivar();\n\n // si logra editar el objeto redirecciona a la vista para actualizar\n header('Location:../vista/areatrasferencia/verarea.php');\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "function tarefa($txt) {\n $this->duelo->apagar_tarefa($this->dono, 'sb_phase', $this->inst);\n parent::destruir();\n $this->_ativar();\n return true;\n }", "function estado($con,$id)\r\n {\r\n \t//buscar si fue entregada o no\r\n \t$sql=\"select gui_entregada from guia where gui_id=$id\";\r\n \t$rs=&$con->Execute($sql);\r\n \t$entregada=$rs->fields[0];\r\n \tif($entregada==\"1\")//entregada\r\n \t{\r\n \t $sql1=\"select gui_entregadapor,gui_fechaentrega from guia where gui_id=$id\";\r\n \t $rs1=&$con->Execute($sql1);\r\n \t $ent_por=$rs1->fields[0];\r\n \t $ent_fecha=$rs1->fields[1];\r\n \t $msg=\"Guía entregada por \".$ent_por.\" con fecha \".$ent_fecha; \r\n \t $vestado=\"1\";\r\n \t \t \r\n \t}\r\n \telse //si no es entregada\r\n \t{ \t \r\n \t //si está en manifiestos de desembarque\r\n \t $sql1=\"select count(mandesdet_id) from mandes_detalle \"\r\n \t \t .\"where gui_id=$id \";\r\n \t //echo \"<hr>$sql1</hr>\";\r\n \t $rs1=&$con->Execute($sql1);\r\n \t $variable=$rs1->fields[0];\r\n \t if($variable>0)//en lista de desembarque\r\n \t {\r\n \t $endesembarque=1; \t \r\n \t $vestado=\"r\";//ready\r\n \t $msg=\"Guía lista para ser entregada\";\r\n \t } \r\n \t else\r\n \t {\r\n \t \t $endesembarque=0;\r\n \t \t $vestado=\"f\";//faltan piezas\r\n \t \t //si no está desembarcada\r\n \t \t $msg=\"Guía en espera de completar, faltan piezas\";\r\n \t }\t \r\n \t}\r\n \t$resultado[\"estado\"]=$vestado;\r\n \t$resultado[\"mensaje\"]=$msg;\r\n \treturn ($resultado);\r\n }", "function actualizarEstado(){\n return \"UPDATE `proyecto` \n SET `estado` = '\".$this->estado.\"' \n WHERE `proyecto`.`idproyecto` = \".$this->id.\";\";\n \n}", "public function fecharFolha(){\n \n $this->lAberto = false;\n $this->salvar();\n }", "public function getEstado(){\n\t\treturn $this->estado;\n\t}", "public function desactivarTipoCita($idTipoCita){\n\n \n $query = \"UPDATE tb_tiposCita SET estado = 'I' WHERE idTipoCita = '$idTipoCita' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\n\t\t\t\n\t\t\t\n }", "public function actionInactivarTasa(){\r\n\r\n $idTasa = yii::$app->request->get('value');\r\n\r\n $_SESSION['idTasa'] = $idTasa;\r\n\r\n $inactivar = self::beginSave(\"inactivar\" , 0);\r\n\r\n if($inactivar == true){\r\n return MensajeController::actionMensaje(200);\r\n }else{\r\n return MensajeController::actionMensaje(920);\r\n }\r\n }", "function mostrarFrmRecalcularEstado(){\n $this->mostrarFormularioEstudiantes();\n }", "public function monstrarAcao(){\n $this->Andar();\n }", "public function cambio_estatus(){\n\t\t\t\t\t\t\t\t$idusuario=$this->uri->segment(3);\n \t\t\t\t\t\t$data['est'] =$this->uri->segment(4);\n\t\t\t\t\t\t\t\t$data_estatus=array(\n\t\t\t\t\t\t\t\t\t'id_privilegio'=>$data['est']\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$this->sise_model->cambiar_estatus($data_estatus,$idusuario);\n\t\t\t\t\t\t\t\t/*if ($data['est']==3) {\n\t\t\t\t\t\t\t\t\t$this->sise_model->obtener_registrar_materias($idusuario);\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\theader('Location:'.base_url('index.php/sise/aspirantes').'');\n\t\t\t\t\t\t\t}", "public function inactivarTasa($conn, $conexion)\r\n {\r\n $idTasa = $_SESSION['idTasa'];\r\n\r\n\r\n $tableName = 'varios';\r\n\r\n $arregloCondition = ['id_impuesto' => $idTasa];\r\n\r\n $arregloDatos['inactivo'] = 1;\r\n\r\n\r\n\r\n\r\n $conexion = new ConexionController();\r\n\r\n $conn = $conexion->initConectar('db');\r\n\r\n $conn->open();\r\n\r\n\r\n\r\n if ($conexion->modificarRegistro($conn, $tableName, $arregloDatos, $arregloCondition)){\r\n\r\n\r\n\r\n return true;\r\n\r\n }\r\n\r\n }", "public function inicio() {\n }", "public function actualizarEstado(){\r\n\t\t $consulta = \"UPDATE vehiculos\r\n\t\t\t\t\t\t\t SET estado=$this->estado\r\n WHERE id=$this->id;\";\r\n echo $consulta;\r\n\t\t return Database::get()->query($consulta);\r\n\t\t}", "public function mostrarEstado() {\n \n //FUNCION CON LA CONSULTA A REALIZAR\n $sql = \"SELECT `ESTCODIGO`,`ESTDESCRIPCION` FROM `estado` WHERE `ESTTIPO`='PERSONAL' ORDER BY ESTDESCRIPCION\";\n $this->_conexion->ejecutar_sentencia($sql);\n return $this->_conexion->retorna_select();\n \n }", "function btnactivarClick($sender, $params)\n {\n //activar la oferta y ya no sera modificable\n if($this->btnactivar->tag == 1)\n {\n $this->revisar();\n }\n else //activar\n {\n $this->guardar();\n //if(Derechos('Evadir margen minimo') == false)\n if($this->edmargen->Text > $this->edmargen->tag || (Derechos('Evadir margen minimo') == true))\n {\n $ban = true;\n if($this->edmodelo->text == '' || $this->edcliente->text == '')\n {\n echo '<script language=\"javascript\" type=\"text/javascript\">\n alert(\\'No puedes Activar faltan el Modelo o el Cliente\\');\n </script>';\n $ban = false;\n }\n\n if($this->edano->Text == '' || $this->edcolor->Text == '' || $this->edtiempoent->Text == '')\n {\n echo '<script language=\"javascript\" type=\"text/javascript\">\n alert(\\'No puedes Activar faltan datos por capturar\\');\n </script>';\n $ban = false;\n }\n\n if($ban)\n {\n $this->cboestatus->ItemIndex = 90;\n $this->btnactivar->Caption = 'Revisar';\n $this->edfase->Text = 'Cotizacion';\n $this->edfase->Tag = 2;\n //poner estatus del boton a revision\n $this->btnactivar->Tag = 1;\n $sql = 'update ofertas set idestatus=90,idfase=2\n where idoferta=' . $this->edoferta->Text.' and idrevision='.$this->edrevision->Text;\n $rs = mysql_query($sql)or die('Error consulta SQL: ' . $sql);\n $this->habilitar(true);\n\n $msn = 'Oferta No. ' . $this->edoferta->Text .\n ' Activada por Vendedor: ' . $this->edvendedor->Text .\n ' Cliente: ' . $this->edcliente->Text .\n ' Descripcion del camion: ' . $this->edmodelo->Text .\n ' Tipo: ' . $this->edtipocamion->Text .\n ' Precio de Venta: $ ' . $this->edtotal->text . ' ' .\n $this->cbomoneda->Items[$this->cbomoneda->ItemIndex] .\n ' Margen de Utilidad : ' . $this->edmargen->Text . ' %' .\n ' Fecha: ' . date(\"d/m/Y\");\n\n $this->insertarnota();\n\n //enviarmail('CRM@ibc.com.mx', GetConfiguraciones('mailavisos'), 'Aviso de OFERTA ACTIVADA', $msn);\n enviarmailattach('crm@ibc.com.mx', 'Sistema de CRM', GetConfiguraciones('mailavisos'), 'Varios', 'AVISO DE OFERTA ACTIVADA', $msn, '', '');\n echo '<script language=\"javascript\" type=\"text/javascript\">\n alert(\\'Oferta Activada: \\');\n </script>';\n }\n }\n else\n echo '<script language=\"javascript\" type=\"text/javascript\">\n alert(\\'El Margen de la utilidad es Menor al ' . $this->edmargen->tag . '% preestablecido \\');\n </script>';\n }\n }", "public function changeStatus()\r\n {\r\n }", "function verPincho(){\r\n\t$establecimiento = new Establecimiento();\r\n\t$establecimiento->usuario_id = $_SESSION['user']['usuario_id'];\r\n\t$GLOBALS['Pincho'] = $establecimiento->hasPincho();\r\n\r\n\tif($GLOBALS['Pincho']){\r\n\t\tinclude_once($GLOBALS['LAYOUT_PATH'].'header.php');\r\n\t\tinclude_once($GLOBALS['LAYOUT_PATH'].'loginNavEstablecimiento.php');\r\n\t\tinclude_once($GLOBALS['TEMPLATES_PATH'].'establecimiento/editarPincho.php');\r\n\t\tinclude_once($GLOBALS['LAYOUT_PATH'].'footer.php');\r\n\t}else{\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'establecimientoController.php', array(array('action','registrarPincho'\t)));\r\n\t}\r\n}", "public function encender()\n {\n\n if ($this->estado){\n print \"no puedes encender el auto 2 veces\";\n }else{\n print \"Auto encendido\";\n $this->estado=true;\n }\n\n }", "function ConfBotonIco($puesto, $nombre, $icoTrue, $icoFalse, $tooltipTrue, $tooltipFalse){\n if($puesto['id_ciudadano']){\n if($puesto[$nombre] != ''){\n $status = $puesto[$nombre];\n $ico = ($puesto[$nombre]) ? $icoTrue : $icoFalse;\n $tooltip = ($puesto[$nombre]) ? $tooltipTrue : $tooltipFalse;\n $fulllink = '<a class=\"btn btn-secondary btn-sm\" title=\"'. $tooltip . '\" href=\"controlador/adddefensasql.php?' . $nombre . '=' . $status .'&id=' . $puesto['id_defensa'] . '\">';\n if($puesto[$nombre] == 1){\n return $fulllink . $ico . '</a>';\n }else{\n return $fulllink . $ico . '</a>';\n }\n }else{\n return '<a class=\"btn btn-secondary btn-sm\" href=\"electoral.php?id=' . $puesto[$nombre] .'\"><i class=\"fas fa-sliders-h\"></i></a>';\n }\n }\n }", "public function CambiarEstado() {\n\t\tif(!$this->input->is_ajax_request()) show_404();\n\t\t/*if($this->session->userdata('tipo_usuario') != 'diseñadores') {\n\t\t\texit(json_encode(array('bandera' => false, 'msj'=>'No cuentas con los permisos necesarios para realizar esta acción')));\n\t\t}*/\n\t\t$folio = $this->input->post('folio');\n\t\t$estatus = $this->input->post('estatus');\n\n\t\t$data = array(\n\t\t\t'folio'=>$folio,\n\t\t\t'estatus'=>$estatus\n\t\t);\n\n\t\tif($data['estatus'] == 'D') {\n\t\t\t$data['fase_uno_usuario_autorizacion'] = $this->created_user;\n\t\t\t$data['fase_uno_fecha_autorizacion'] = date('Y-m-d');\n\t\t}\n\t\tif($data['estatus'] == 'G') {\n\t\t\t$data['fase_dos_usuario_autorizacion'] = $this->created_user;\n\t\t\t$data['fase_dos_fecha_autorizacion'] = date('Y-m-d');\n\t\t}\n\n\n\t\t$this->load->model('encabezado');\n\t\t$this->encabezado->editar($data) ? exit(json_encode(array('bandera' => true))): exit(json_encode(array('bandera' => false, 'msj'=>'Se presento un error al cambiar el estatus de la cotización')));\n\t}", "function editar_estado()\n {\n $permiso = $this->permiso_administrador();\n\n $this->load->model('tpoadminv1/catalogos/Catalogos_model');\n \n $data['title'] = \"Editar estado\";\n $data['heading'] = $this->session->userdata('usuario_nombre');\n $data['mensaje'] = \"\";\n $data['job'] = $this->session->userdata('usuario_job');\n $data['active'] = 'catalogos'; // solo active \n $data['subactive'] = 'sujetos_so'; // class=\"active\"\n $data['optionactive'] = \"busqueda_estados\"; // class=\"active\"\n $data['body_class'] = 'skin-blue';\n $data['main_content'] = 'tpoadminv1/catalogos/editar_estado';\n \n $data['estado'] = $this->Catalogos_model->dame_estado_id($this->uri->segment(5));\n\n $data['scripts'] = \"\";\n\n $this->load->view('tpoadminv1/includes/template', $data);\n }", "public function mostrar_tabla_usuarios_administradores_controlador(){\r\n\t$respuesta=datos_admi::mostrar_tabla_usuarios_administradores_modelo(\"desactivar_admi\");\r\nforeach ($respuesta as $fila => $item) {\r\necho '<tr>\r\n <td>'.$item[\"cedula\"].'</td>\r\n\t\t\t<td>'.$item[\"estado\"].'</td>\r\n\t\r\n\r\n\t\t\t\t\t<th>\r\n\t\t\t \t<div class=\"botones\">\r\n\t\t<i class=\"fa fa-power-off\" ></i><a href=\"central_super_usuario.php?action=desactiva&decedula='.$item[\"cedula\"].'\" style=\"color: green\"> <button class=\"e\">Desactivar</button> </a>\r\n\t</div>\r\n \r\n\t\t\t</th>\r\n\t\t\t\r\n\t\t</tr>\r\n\r\n';\r\n}\r\n}", "public function activarTipoCita($idTipoCita){\n\n \n $query = \"UPDATE tb_tiposCita SET estado = 'A' WHERE idTipoCita = '$idTipoCita' \";\n \n\t\t \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\n\t\t\t\n\t\t\t\n }", "function syncChamadoStatus($chave, $nomeStatus){\n ChamadoController::update_status_name($chave, $nomeStatus);\n}", "public function rasa(){\n echo \"Buah {$this->nama} memiliki rasa yang manis seperti {$this->nama}.\";\n }", "function Devuelve_Evento_Observado()\r\n{\r\n // al usuario\r\n return 10;\r\n}", "public function desactivar($idtasa){\n\n $sql=\" UPDATE tasa SET estado='0' WHERE idtasa='$idtasa' \";\n return ejecutarConsulta($sql);\n\n\n }", "public function desactivar($idformatos){\n\n $sql=\" UPDATE formatos SET estado='0' WHERE idformatos='$idformatos' \";\n return ejecutarConsulta($sql);\n\n\n }", "function EtatArret()\n\t\t{\n\t\t\t$this->etat = \"Arret\";\n\t\t\techo(\"<br>Le véhicule est à l'arret :<br>\");\n\t\t}", "function Devuelve_Evento_cancela()\r\n{\r\n // por parte del usuario\r\n return 9;\r\n}", "function ChangerEtatAction($idAction)\n{\n$reussi = false;\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t$req = \"\n\t\t\tSelect Etat \n\t\t\t\tfrom Actions\n\t\t\t\twhere idActions = '\".$idAction.\"'\n\t\t\t\n\t\t\t\t\t\";\n\t\t\t$result = $pdo -> query($req)->fetch();\n\t}\n\t $Etat = $result['0'];\n\t \n\t if($Etat == 'CL')\n\t {\n\t $req = \"Update Actions set Etat = 'EC' where idActions = '\".$idAction.\"' \";\n\t $result = $pdo ->exec($req);\n\t $reussi = true;\n\t }\n\t else if($Etat == 'EC')\n\t {\n\t $req = \"Update Actions set Etat = 'CL' where idActions = '\".$idAction.\"' \";\n\t $result = $pdo ->exec($req);\n\t $reussi = true;\n\t }\n\t \n\t return $Etat;\n\n}", "function controlSeleccionado()\r\n\t{\r\n\t\t\t$this->procedimiento = 'kaf.ft_anexo_ime';\r\n\t\t\t$this->transaccion = 'KAF_CONTROL_CON';\r\n\t\t\t$this->tipo_procedimiento = 'IME';\r\n\r\n\t\t\t//Define los parametros para la funcion\r\n\t\t\t$this->setParametro('id_anexo', 'id_anexo', 'int4');\r\n\r\n\t\t\t//Ejecuta la instruccion\r\n\t\t\t$this->armarConsulta();\r\n\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t//Devuelve la respuesta\r\n\t\t\treturn $this->respuesta;\r\n\t}", "function cambiarEstado($correo){\n conectar($conexion);\n $correo1 = $_GET['correo'];\n $tipoCorreo = $_GET['tipoCorreo'];\n $id = $_GET['id'];\n $sql = \"UPDATE correoFrontEnd\n SET SN_ESTADO = '1'\n WHERE DS_CORREODESTINATARIO = '$correo1' AND OID = '$id'\";\n $sqlQuery=mysqli_query($conexion,$sql) or die (\"Error al momento de cambiar el estado del correo \".mysqli_error($conexion));\n}", "function frenar(){\n\t\t\treturn \"el coche esta frenando<br>\";\n\t\t}", "function atualizarStatusDM($chamado, $conf) \n{\n interagirComChamado($chamado->chave, $chamado->status_name, $conf);\n}", "public function desactivarPersonalizadoObservacionesExamenFisico($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_observacionesExamenFisico SET estado = 'I' WHERE idPersonalizadoObservacionExamenFisico = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function editar_estado($id_usuario,$estado){\n\n\n \t \t$conectar=parent::conexion();\n \t //\tparent::set_names();\n\n //el parametro est se envia por via ajax\n \t \tif($_POST[\"est\"]==\"0\"){\n\n \t \t\t$estado=1;\n\n \t \t} else {\n\n \t \t\t$estado=0;\n \t \t}\n\n \t \t$sql=\"update usuarios set \n \n estado=?\n\n where \n id_usuario=?\n\n\n \t \t\" ;\n\n \t \t$sql=$conectar->prepare($sql);\n\n\n \t \t$sql->bindValue(1,$estado);\n \t \t$sql->bindValue(2,$id_usuario);\n \t \t$sql->execute();\n\n\n \t }", "private static function activo()\n {\n try {\n $id = $_GET['id'];\n $arrayarea['Estado'] = 'Activo';\n $arrayarea['idTrasferencia'] = $id;\n $area = new areaclass($arrayarea);\n $area->acivar();\n\n // si se logra editar el objeto redirecciona a la vista para actualizar\n header('Location:../vista/areatrasferencia/verarea.php');\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function colorestado($estado) {\n\n try{\n \n if ($estado == \"Agendada\"){\n $est = '<td style=\"background:#FE2E2E ; color:#FFFFFF\">'.$estado.'</td> ';\n }else if ($estado == \"Confirmada\"){\n $est = '<td style=\"background:#DBA901 ; color:#FFFFFF\">'.$estado.'</td> ';\n }else if ($estado == \"Atendida\"){\n $est = '<td style=\"background:#0B610B ; color:#FFFFFF\">'.$estado.'</td> ';\n }else if ($estado == \"Anulada\"){\n $est = '<td style=\"background:#0B243B ; color:#FFFFFF\">'.$estado.'</td> ';\n }else {\n $est = '<td>'.$estado.'</td> ';\n }\n return $est;\n\n } catch (Exception $e) {\n echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../paginas_usu/index_usuario.php';</script>\";\n }\n }", "function printEstadoProceso($Estado, $FlagProcesado, $FlagPagado) {\r\n\tif ($Estado == \"A\") {\r\n\t\tif ($FlagPagado == \"S\") $src = \"imagenes/check_red.png\";\r\n\t\telse {\r\n\t\t\tif ($FlagProcesado == \"N\") $src = \"imagenes/reloj.png\";\r\n\t\t\telse $src = \"imagenes/check.png\";\r\n\t\t}\r\n\t} else $src = \"imagenes/inactivo.png\";\r\n\t$img = \"<img src='$src' width='16' height='16' />\";\r\n\treturn $img;\r\n}", "public function change_status(){\n \n if($this->input->post()){\n $id = $this->input->post('id');\n $table = $this->input->post('table');\n \n $status = $this->cm->change_status($table, ['id' => $id]);\n if($status == 1){\n echo '<i class=\"fa fa-fw fa-check green-check-icon\"></i>'; die();\n } elseif($status == 0){\n echo '<i class=\"fa fa-fw fa-close red-check-icon\"></i>'; die();\n }\n }\n }", "function visualizar(){\r\n $perfil_dao= new perfil_dao();\r\n $ativo=\"disabled\";\r\n $resultado=$perfil_dao::selecionar($_POST[\"id\"],$ativo);\r\n echo \"Visualizar perfil¨\".$resultado;\r\n //echo $resultado;\r\n\r\n }", "function mostrarBotonRecomendacion($otroUsuario)\n{\n $toRecomendacion = DAORecomendacion::buscarRecomendacion($_SESSION['usuario'], $otroUsuario, $_SESSION['pelicula']);\n if (isset($toRecomendacion)) {\n echo sprintf(\n \"<td><button class=\\\"opcionesAmigos\\\" onclick=\\\"procesar('%s', 'eliminarRecomendacion')\\\"> Eliminar recomendación </button>\",\n $otroUsuario\n );\n } else {\n echo sprintf(\n \"<td><button class=\\\"opcionesAmigos\\\" onclick=\\\"procesar('%s', 'recomendar')\\\"> Recomendar </button>\",\n $otroUsuario\n );\n }\n}", "static public function ctrAnularSolicitud(){\n\n if(isset($_GET[\"idGasto\"])){\n\n $id = $_GET[\"idGasto\"];\n #var_dump($id);\n\n $gasto = ModeloCentroCostos::mdlMostrarGastosCajaId($id);\n #var_dump($gasto[\"fecha\"]);\n\n $fechaGasto = $gasto[\"fecha\"];\n $mesGasto = date(\"m\", strtotime($fechaGasto));\n #var_dump((int)$mesGasto);\n\n $saldos = ModeloMaestras::mdlTraerSaldos((int)$mesGasto);\n #var_dump($saldos[\"estado\"]); \n\n if($saldos[\"estado\"] == \"CER\"){\n\n # Mostramos una alerta suave\n echo '<script>\n swal({\n type: \"error\",\n title: \"Error\",\n text: \"¡No es posible eliminar gastos en un mes cerrado!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n }).then((result)=>{\n if(result.value){\n window.location=\"solicitud-caja\";}\n });\n </script>';\n\n }else{\n\n # traemos la fecha y la pc\n date_default_timezone_set('America/Lima');\n $fecha = new DateTime();\n $PcReg= gethostbyaddr($_SERVER['REMOTE_ADDR']);\n\n $datos = array( \"id\" => $id, \n \"fecanu\" => $fecha->format(\"Y-m-d H:i:s\"),\n \"usuanu\"\t=> $_SESSION[\"nombre\"],\n \"pcanu\" \t=> $PcReg);\n #var_dump($datos);\n\n $respuesta = ModeloCentroCostos::mdlAnularGastosCaja($datos);\n #var_dump($respuesta);\n\n if($respuesta == \"ok\"){\n \n echo'<script>\n\n swal({\n type: \"success\",\n title: \"La solicitud ha sido anulada correctamente\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then(function(result){\n if (result.value) {\n\n window.location = \"solicitud-caja\";\n\n }\n })\n\n </script>';\n\n } \n\n }\n\n\n }\n\n }", "function eteindreFeu ()\r\n {\r\n\r\n }", "function cl_empagemovdetalhetransmissao() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemovdetalhetransmissao\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function rasa(){\n echo \"Buah {$this->nama} memiliki rasa yang asam, manis dan gurih seperti {$this->nama}.\";\n }", "function evt__guardar()\r\n\t{\r\n $insc=$this->controlador()->dep('datos')->tabla('inscripcion_beca')->get();\r\n if($insc['estado']=='I'){\r\n //sincroniza con la base de datos\r\n toba::notificacion()->agregar('Se ha guardado correctamente', \"info\");\r\n } else{\r\n toba::notificacion()->agregar('La inscripcion ya ha sido enviada, no puede ser modificada', \"info\");\r\n }\r\n\t}", "public function desactivarPersonalizadoObservacionesExamen($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_observacionesExamen SET estado = 'I' WHERE idPersonalizadoObservacionExamen = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function editar()\n {\n }", "public function editar()\n {\n }", "public function editar()\n {\n }", "public function desactivarPersonalizadoObservacionesCirugia($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_observacionesCirugia SET estado = 'I' WHERE idPersonalizadoObservacionCirugia = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function desactivarPersonalizadoMotivoCirugia($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_motivoCirugia SET estado = 'I' WHERE idPersonalizadoMotivoCirugia = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function UpdateStatusPesanan()\n {\n }", "public function vencerCotizacion(){\n try {\n\n //CONEXION A LA BASE DE DATOS\n $conexion = new PDO('mysql:host='.$this->datosConexionBD[0].';\n dbname='.$this->datosConexionBD[3], $this->datosConexionBD[1], $this->datosConexionBD[2]);\n\n $conexion -> exec(\"set names utf8\");\n\n //Sentencia SQL para modificar un registro\n $query = \"UPDATE cotizaciones SET\n\n statusCotizacion = 2,\n idUsuario = '\".$this->id.\"'\n\n WHERE folioCotizacion = '\".$this->folio.\"'\";\n\n $statement = $conexion->prepare($query);\n\n $statement->execute();\n\n return \"Cotizacion vencida\";\n }\n\n catch(PDOException $e){\n return \"Error: \" . $e->getMessage();\n }\n }", "public function desactivarPersonalizadoObservacionesFormula($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_observacionesFormulacion SET estado = 'I' WHERE idPersonalizadoObservacionFormulacion = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function master_control($param,$que = null){\n\n\tif(is_null($que)){\n\t\t//seccion\n\t\t$titulo = 'Seccion';\n\t\t$link = 'secciones';\n\t\t$identificador = 'id';\n\t\t$tabla = 'secciones';\n\t\t$estado = $param;\n\t}else{\n\t\t//es directiva\n\t\t$titulo = 'Directiva';\n\t\t$link = 'directivas';\n\t\t$identificador = 'text';\n\t\t$tabla = $param;\n\t\t$estado = 'estado';\n\t}\n\n\t$salida = $this->get($tabla);\n\t$return = '<table class=\"table table-hover interruptor\"><tr>';\n\tif($que == 'directiva'){\n\t\t\t$return.= '<th>Numero</th>';\n\t}\t\t\t\n\n\t$return.= '<th>'.$titulo.'</th><th></th><th>Estado</th><th>Opcion</th></tr>';\n\tforeach ($salida as $key => $value) {\n\t\tif($value[$estado] == 1){\t\n\t\t\t$status = 'Activado';\t\n\t\t\t$opcion = 'Desactivar';\n\t\t\t$opcion_class = 'btn-danger';\n\t\t}else{\t\t\t\t\t\t\n\t\t\t$status = 'Desactivado'; \n\t\t\t$opcion = 'Activar'; \n\t\t\t$opcion_class = 'btn-success';\n\t\t}\n\t\t$return.= '<tr>';\n\t\tif($que == 'directiva'){\n\t\t\t$return.= '<td>'.$value['id'].'</td>';\n\t\t}\t\t\n\t\t$return.='<td>'.$value[$identificador].'</td>\n\t\t\t\t<td></td>\n\t\t\t\t<td>'.$status.'</td>\n\t\t\t\t<td><a class=\"btn '.$opcion_class.'\" \n\t\t\t\t\t link=\"index.php?perfil_mda=10&'.$link.'='.$tabla.'&sujeto='.$value['id'].'\">\n\t\t\t\t\t '.$opcion.'</a></td>\n\t\t\t </tr>';\n\t}\n\t$return .= '</table>';\n\treturn $return;\n}", "function set_enum_enhancer($is_enhancer){\n $html = \"\";\n if($is_enhancer == 1){\n $html = \"Penambah\";\n }else{\n $html = \"Pengurang\";\n }\n return $html;\n}", "static function exibirStatus($bool, $mostraImg = true) {\n if ($mostraImg)\n return \"<img src=\\\"\" . CAM_IMG . ($bool ? \"ativo\" : \"inativo\") . \".png\\\" />\";\n else\n return ($bool ? \"Sim\" : \"Não\");\n }", "function Visibilidad($visibilidad){\n\tif($visibilidad == 1){\n\t\treturn \"Visible\";\n\t}else{\n\t\treturn \"Oculto\";\n\t}\n}", "public function desactivarPersonalizadoMotivoHospitalizacion($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_motivoHospitalizacion SET estado = 'I' WHERE idPersonalizadoMotivoHospitalizacion = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function setStatus() {\n $view = USingleton::getInstance(\"VRegistrazione\");\n $dati = $view->getDatiStato();\n $session = USingleton::getInstance(\"USession\");\n $fuser = new FUtente();\n $user = $fuser->load($session->leggi_valore(\"email\"));\n $user->setStatus($dati[\"status\"]);\n $fuser->update($user);\n $view_ricerca = USingleton::getInstance('VRicerca');\n $view_ricerca->displayProfiloUtente($user);\n }", "public function deteleUser(){\n return \"Função selecionar tudo\";\n }", "public function desactivarPersonalizadoMotivoConsulta($idPersonalizado){\n\t\t\n $query = \"UPDATE tb_personalizados_motivoConsulta SET estado = 'I' WHERE idPersonalizadoMotivoConsulta = '$idPersonalizado' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \t\t\n\t\t\n\t\t\n\t}", "public function aprobar_rechazar_click($opcion,$sender,$param)\n {\n $id=$sender->CommandParameter;\n\t\t$sql=\"UPDATE asistencias.vacaciones_disfrute set estatus='$opcion' where id='$id'\";\n $resultado=modificar_data($sql,$this);\n $this->consulta_vacaciones($sender, $param);\n\n // ahora, dependiendo si se aprueba o se rechaza, se toman acciones.\n if ($opcion == 2)\n { // si la solicitud fue rechazada, se muestra el mensaje correspondiente\n // se incluye el registro en la bitácora de eventos\n $descripcion_log = \"Se ha rechazado la solicitud de vacaciones registrada con el id: \".$id;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'D',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de Vacación Rechazada\";\n $this->LTB->texto->Text = \"La Solicitud de vacación ha sido rechazada.\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/mal.png\";\n\n }\n else\n { // si la solicitud fue aprobada, se muestra el mensaje correspondiente\n\n $sql2=\"Select v.id, v.dias_disfrute, v.cedula, v.fecha_desde, v.fecha_hasta, v.dias_feriados,\n v.periodo, v.dias_restados, CONCAT(p.nombres,' ',p.apellidos) as nombres\n from asistencias.vacaciones_disfrute v, organizacion.personas p\n where (v.id='$id') and (v.cedula=p.cedula)\";\n $resultado=cargar_data($sql2,$sender);\n\n $dias_disfrute = $resultado[0]['dias_disfrute'];\n $dias_feriados = $resultado[0]['dias_feriados'];\n $dias_restados = $resultado[0]['dias_restados'];\n $cedula = $resultado[0]['cedula'];\n $periodo = $resultado[0]['periodo'];\n $desde = $resultado[0]['fecha_desde'];\n $hasta = $resultado[0]['fecha_hasta'];\n $nombres = $resultado[0]['nombres'];\n $id_vacacion = $resultado[0]['id'];\n\n\n // Se incluye la observación en el sistema de asistencias.\n $observaciones=\"El funcionario(a) \".$nombres.\", titular de la cédula de identidad \".$cedula.\", se encuentra \".\n\t\t\t\t\t \"disfrutando \".$dias_disfrute.\" días de vacaciones correspondientes al período \".$periodo.\", a partir del día \".\n\t\t\t\t\t cambiaf_a_normal($desde).\" hasta el \".cambiaf_a_normal($hasta);\n\n // Descuento los dias de vacaciones que me especifican en el periodo de las vacaciones disponibles.\n $sql=\"UPDATE asistencias.vacaciones set pendientes=pendientes-'$dias_disfrute', disfrutados=disfrutados+'$dias_disfrute'\n where cedula='$cedula' and periodo='$periodo'\";\n $resultado=modificar_data($sql,$this);\n\n\n // si es necesario el descuento de días por horario especial, se llama a la función que se\n // encarga de realizarlo\n if ($dias_restados > 0)\n { // si hay que descontra algun dia, se llama a la funcion que lo hace.\n descuento_especial_de_dias($dias_restados,$cedula,$sender);\n $observaciones=$observaciones.\". Se descontaron \".$dias_restados.\" días de sus vacaciones por horario especial.\";\n }\n\n /* Se Inserta las observaciones correspondientes en el sistema de asistencias para\n * que aparezcan en los reportes. */\n $cod_organizacion = usuario_actual('cod_organizacion');\n $horario_vigente = obtener_horario_vigente($cod_organizacion,$desde,$sender);\n $hora_desde = $horario_vigente[0]['hora_entrada'];\n $hora_hasta = $horario_vigente[0]['hora_salida'];\n\n $codigo_nuevo=proximo_numero(\"asistencias.justificaciones\",\"codigo\",null,$sender);\n\n $sqli=\"insert into asistencias.justificaciones (codigo, tipo_id_doc, estatus)\n\t \t\t\t values ('$codigo_nuevo','VA', '1')\";\n $resultadoi=modificar_data($sqli,$sender);\n\n $sqli=\"insert into asistencias.justificaciones_personas (cedula, codigo_just)\n\t\t values ('$cedula','$codigo_nuevo')\";\n $resultadoi=modificar_data($sqli,$sender);\n\n // se coloca la relacion de la justificacion con la vacacion\n $sql=\"UPDATE asistencias.vacaciones_disfrute set referencia='$codigo_nuevo' WHERE id='$id_vacacion'\";\n $resultado=modificar_data($sql,$sender);\n\n $sqli=\"insert into asistencias.justificaciones_dias (codigo_just, fecha_desde, hora_desde, fecha_hasta,\n\t\t\t hora_hasta, codigo_tipo_falta, descuenta_ticket,lun,mar,mie,jue,vie,codigo_tipo_justificacion,\n\t\t\t\t\t\t observaciones,hora_completa)\n\t\t\t\t values ('$codigo_nuevo','$desde', '$hora_desde', '$hasta', '$hora_hasta','IN','No','1','1','1','1','1',\n\t\t\t\t\t\t '1','$observaciones','1')\";\n $resultadoi=modificar_data($sqli,$sender);\n\n // se incluye el registro en la bitácora de eventos\n $descripcion_log = \"<strong>Aprobados</strong> \".$dias_disfrute.\" días de vacaciones de \".$nombres.\" C.I.: \".$cedula.\n \", desde \".cambiaf_a_normal($desde).\" al \".cambiaf_a_normal($hasta).\n \", período \".$periodo.\" (\".$dias_feriados.\" días feriados, \".$dias_restados.\n \" días descontados). <strong> Cód. Observación: \".$codigo_nuevo.\"</strong> \";\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'A',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Aprobado\";\n $this->LTB->texto->Text = $descripcion_log;\n $this->LTB->imagen->Imageurl = \"imagenes/botones/bien.png\";\n }\n\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n }", "function modificarTorneo($servicios) {\n\t\n\tif ($_POST['activo'] == \"on\")\n\t$activo = 1;\n\telse\n\t$activo = 0;\n\t\n\t/*\n\t//para pruebas\n\t$fechacrea = date('Y-m-d');\n\t$sql = \"update dbtorneos set nombre = '\".$_POST['nombre'].\"', fechacreacion = '\".$fechacrea.\"', activo =\".$activo.\" where idtorneo =\".$_POST['idtorneo'];\n\techo $sql;\n\t*/\n\t\n\t\n\t$modificar = $servicios ->modificarTorneo($_POST['nombre'],$activo,$_POST['idtorneo']);\n\t\n\t\n\t//echo \"<p>Hola</p>\";\n\t\n\t$res = $servicios->TraerIdTorneos($_POST['idtorneo']);\n\tif ($modificar == 1) {\n\techo \"\n\t\t\t<table id='itsthetable' width='750' cellpadding='0' cellspacing='0'>\n\t\t\t<caption>Torneos Cargados</caption>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t<th>IdTorneo</th>\n\t\t\t<th>Nombre del Torneo</th>\n\t\t\t<th>Fecha de Creaci&oacute;n</th>\n\t\t\t<th>Activo</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\";\n\t\t\t\n\t\t\twhile ($row = mysql_fetch_array($res)) {\n\t\t\techo \"<tr>\n\t\t\t<td align='center'>\";\n\t\t\techo $row[0];\n\t\t\techo \"</td>\n\t\t\t<td align='left'>\";\n\t\t\techo $row[1];\n\t\t\techo \"</td>\n\t\t\t<td align='center'>\";\n\t\t\techo $row[2];\n\t\t\techo \"</td>\n\t\t\t<td align='center'>\";\n\t\t\tif ($row[3] != 0)\n\t\t\techo \"Si\";\n\t\t\telse \n\t\t\techo \"No\";\n\t\t\techo \"</td>\n\t\t\t</tr>\";\n\t\t\t\n\t\t\t } \n\t\t\techo\n\t\t\t\"</tbody>\n\t\t\t</table>\";\n\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"Error al modificar!!!.\";\n\t\t\t}\n\t\n\t\n}", "function Indice(){\n parent::Modelo();\n }", "function presentarBotonesConfirmacion() {\n ?>\n <tr class=\"texto_subtitulo\">\n <?\n $continuar=$this->crearVariablesContinuar();\n $icono='clean.png';\n $texto='S&iacute;';\n $this->crearCeldaBoton($continuar,$icono,$texto);\n $retornar=$this->crearVariablesRetorno();\n $icono='x.png';\n $texto='No';\n $this->crearCeldaBoton($retornar,$icono,$texto);\n ?>\n </tr>\n <?\n }", "function cl_isstipoalvara() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"isstipoalvara\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function getEstado()\n {\n throw new SysNotImplementedException();\n }", "private static function editar()\n {\n }", "function cl_isencaolanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"isencaolanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function ChangeState($idusuario,$opcion) {\n if($opcion == '0')\n {\n $obj = Doctrine::getTable('SegUsuario')->find($idusuario);\n $obj->estado = '0';\n $obj->save();\n return 1;\n }\n elseif($opcion == '1')\n {\n $obj = Doctrine::getTable('SegUsuario')->find($idusuario);\n $obj->estado = '1';\n $obj->save();\n return 1;\n }\n return 0;\n }", "public function estado($id)\n {\n $empleado = Empleado::find($id);\n switch ($empleado->estado)\n {\n case null:$empleado->estado = 1;\n $empleado->save();\n $mensaje = \"Estado activo asiganado al empleado: $empleado->nombres $empleado->apellidos\";\n break;\n\n case 1:$empleado->estado = 2;\n $empleado->save();\n $mensaje = \"Estado inactivo asiganado al empleado: $empleado->nombres $empleado->apellidos\";\n break;\n\n case 2: $empleado->estado = 1;\n $mensaje = \"Estado actio asignado al empleado: $empleado->nombres $empleado->apellidos\";\n $empleado->save();\n break;\n\n }\n //redireccionar a la ruta por defecto (index 'empleado')\n //con un mesaje de exito\n return redirect('empleado')->with('mensaje_exito', $mensaje);\n }", "public function modifica_actividad() {\n\n // Comprueba que tenga iniciada sesion.\n if ($this -> libreria_sesiones -> comprobar_session() == true){\n // Retornar la ACL del usuario\n $acl = $this -> session -> acl;\n $fallo = 0;\n $pa_la_vista = array();\n // Inicializamos\n $pa_la_vista['actualizado'] = 0;\n $pa_la_vista['usuario'] = array();\n $pa_la_vista['actividades'] = array();\n // errores\n $num_error=0;\n $pa_la_vista['error'] = array ();\n $pa_la_vista['error'][$num_error] = \"\";\n // Obtiene todos los barrios\n $pa_la_vista['barrios'] = $this -> modelo_barrios -> devuelve_barrios();\n // Obtiene todos las secciones\n $pa_la_vista['secciones'] = $this -> modelo_secciones -> devuelve_secciones();\n // Datos del usuario de la sesion de usuario\n $datos_usuario = $this -> libreria_sesiones -> devuelve_datos_session();\n $idusuario = $datos_usuario['idsesion'];\n $acl = $datos_usuario['acl'];\n $pa_la_vista['usuario'] = $datos_usuario;\n // Revisamos si tenemos el id de actividad (por get o por post o por hidden, da igual)\n $idactividades = $this -> input -> post_get(\"idactividades\");\n if (!$idactividades){\n $fallo = 2;\n $pa_la_vista['error'] = \"No hay actividad\";\n }\n\n // Revisamos si ha modificado, es decir, como te digo abajo si modificar=1\n\n // Si modificar = 1 hacemos el update\n if ($this -> input -> POST(\"modificar\")==1 && $fallo==0){\n // Datos de la actividad del POST\n $campanya = $this -> input -> POST(\"campanya\");\n $actividad = $this -> input -> POST(\"actividad\");\n $descripcion = $this -> input -> POST(\"descripcion\");\n $organiza = $this -> input -> POST(\"organiza\");\n $lugar = $this -> input -> POST(\"lugar\");\n $idbarrio = $this -> input -> POST(\"idbarrio\");\n $idseccion = $this -> input -> POST(\"idseccion\");\n $fecha = $this -> input -> POST(\"fecha\");\n $hora = $this -> input -> POST(\"hora\");\n\n \t$documento;\n\t\t$fichero;\n\t\t// A recordar:\n\t\t// Sumo Pontifice = 1\n\t\t// Redactor = 2\n\t\t// Editor = 3\n\t\t// Disabled = 0\n\t\tif ($acl != 1 && $acl != 2) {\n $publicada = 0;\n\t\t} else {\n $publicada = 1;\n\t\t}\n // Comprobar los campos\n if (!$this -> esta_vacio($actividad)) {\n $fallo = 1;\n $pa_la_vista['error'][$num_error] = \"La actividad no puede estar vacía\";\n $num_error ++;\n }\n if (!$this -> esta_vacio($lugar)) {\n $fallo = 1;\n $pa_la_vista['error'][$num_error] = \"El lugar no puede estar vacío\";\n $num_error ++;\n }\n if (!$this -> esta_vacio($idbarrio)) {\n $fallo = 1;\n $pa_la_vista['error'][$num_error] = \"El barrio no puede estar vacío\";\n $num_error ++;\n }\n if (!$this -> esta_vacio($idseccion)) {\n $fallo = 1;\n $pa_la_vista['error'][$num_error] = \"La sección no puede estar vacía\";\n $num_error ++;\n }\n if (!$this -> esta_vacio($fecha)) {\n $fallo = 1;\n $pa_la_vista['error'][$num_error] = \"La fecha no puede estar vacía\";\n $num_error ++;\n }\n if ($fallo == 0) {\n // Obtenemos la fecha para grabar\n $fechahora = $this -> fecha_grabar($fecha, $hora);\n // update\n $this -> modelo_actividades -> update_actividad($idactividades,$campanya,$actividad,$descripcion,$organiza,$lugar,$idbarrio,$idseccion,$fechahora,$idusuario,$publicada);\n $pa_la_vista['actualizado'] = 1; // OJO de momento lo dejo lo tenía par los errores\n // Conseguimos los datos por el modelo para enviarlos a la vista principal\n // Actividades de usuario por fecha descencente\n $actividades = $this -> modelo_actividades -> actividad_usuario_fecha($idusuario);\n $pa_la_vista['actividades'] = $actividades;\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/menu\",$datos_usuario);\n $this -> load -> view (\"admin/actividades/principal\",$pa_la_vista);\n $this -> load -> view (\"admin/footer\");\n }\n }\n if ($this -> input -> POST(\"modificar\")!=1 || $fallo == 1){\n // Conseguimos los datos por el modelo\n //OJO ?? // Si es la primera vez los datos del modelo\n if ($fallo == 0) {\n $actividades = $this -> modelo_actividades -> actividad_id($idactividades);\n foreach ($actividades as $fila) {\n // separa la fecha y la hora\n $fecha_hora = $fila['fecha'];\n $fecha = $this -> devuelve_fecha($fecha_hora);\n $hora = $this -> devuelve_hora($fecha_hora);\n\n $fila['fecha'] = $fecha;\n $fila['hora'] = $hora;\n }\n $pa_la_vista['actividades'] = $fila;\n }else {\n // Si es por un fallo recupera los valores que ha metido antes\n $fila = array(\n \"idactividades\" => $idactividades,\n \"campanya\" => $campanya,\n \"actividad\" => $actividad,\n \"descripcion\" => $descripcion,\n \"organiza\" => $organiza,\n \"lugar\" => $lugar,\n \"idbarrio\" => $idbarrio,\n \"idseccion\" => $idseccion,\n \"fecha\" => $fecha,\n \"hora\" => $hora\n );\n $pa_la_vista['actividades'] = $fila;\n }\n\n // Se lo enviamos a las vistas correspondientes\n\n // Recuerda que aqui puedes elegir el usar la vista de add_actividad modificandola o hacer una vista nueva\n // Te lo dejo a tu eleccion\n // Lo unico es que la vista, cuando modifica ha de llamar a este controlador enviando por hidden un parametro\n // por ejemplo\n // <input type=\"hidden\" value=\"1\" name=\"modificar\">\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/menu\",$datos_usuario);\n $this -> load -> view (\"admin/actividades/modificar_actividad\",$pa_la_vista);\n $this -> load -> view (\"admin/footer\");\n } else if ($fallo == 2){\n // Si hay algún error\n // ?? ver si tiene que ir a modificar_actividad o principal\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/menu\",$datos_usuario);\n $this -> load -> view (\"admin/actividades/modificar_actividad\",$pa_la_vista);\n $this -> load -> view (\"admin/footer\");\n }\n } else {\n //Enviamos al inicio\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/index\");\n $this -> load -> view (\"admin/footer\");\n }\n }", "static public function ctrEditarTipo(){\n\n if (isset($_POST[\"editarTipo\"])) {\n\n if(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarTipo\"])){\n\n $tabla = \"tipos\";\n\n $datos = array(\"tipo\" => $_POST[\"editarTipo\"] ,\n \"id\" => $_POST[\"idTipo\"]);\n\n $respuesta = ModeloTipos::modalEditarTipo($tabla, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n\n swal({\n\n type: \"success\",\n title: \"¡El Tipo de Establecimiento ha sido editado correctamente!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n\n }).then(function(result){\n\n if(result.value){\n\n window.location = \"tipos\";\n\n }\n\n });\n\n\n </script>';\n }\n\n } else {\n\n echo '<script>\n\n swal({\n\n type: \"error\",\n title: \"¡El tipo de establecimiento no puede ir vacío o llevar caracteres especiales!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n\n }).then(function(result){\n\n if(result.value){\n\n window.location = \"tipos\";\n\n }\n\n });\n\n </script>';\n\n }\n\n }\n\n }", "function EDIT()\n{\n\t//realiza la comprobacion del dato\n\tif ($this->Comprobar_atributos() == TRUE){\n\t$sql = \"UPDATE USUARIOS SET login = '$this->login',password = '$this->password',DNI = '$this->DNI',nombre = '$this->nombre',apellidos = '$this->apellidos',telefono = '$this->telefono',email = '$this->email',FechaNacimiento = '$this->FechaNacimiento',fotopersonal = '$this->fotopersonal',sexo = '$this->sexo' WHERE login= '$this->login'\";\n\t//realiza la comprobacion del dato\n\tif ($this->mysqli->query($sql))\n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//en caso contrario\n\telse\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;\n\t}//en caso contrario\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "function enable_change( $status, $order_cs )\n {\n // echo \"disabled\";\n \n //////////////////////////////////////////////\n // 정상이 아니면 취소 금지\n if ( $order_cs )\n echo \"disabled\";\n }", "public function activar(){\n $sql = \"UPDATE usuario SET estatus= '1' WHERE idusuario={$this->idusuario};\";\n $save = $this->db->query($sql);\n\n $result = false;\n if ($save) {\n $result = true;\n }\n return $result;\n }", "public function venderAuto(){\n echo \"<p>El vendedor $this->nombre $this->apellido vendio un auto</p>\";\n }" ]
[ "0.69799083", "0.6731099", "0.661886", "0.6486427", "0.6439503", "0.6435641", "0.63865453", "0.62568516", "0.62303615", "0.62239975", "0.62234586", "0.6207084", "0.61711687", "0.61708033", "0.615454", "0.6149173", "0.6126454", "0.6121989", "0.6110878", "0.6097893", "0.6083753", "0.60663205", "0.60626143", "0.6048239", "0.6024094", "0.60203075", "0.60049033", "0.60006434", "0.5997411", "0.599442", "0.5992134", "0.59796333", "0.5973655", "0.597365", "0.59685683", "0.5962021", "0.5956119", "0.59517795", "0.5929246", "0.5926268", "0.5920699", "0.59197044", "0.5917277", "0.5912678", "0.59117544", "0.5900678", "0.5900432", "0.58999354", "0.5892908", "0.5890904", "0.58863515", "0.58606493", "0.5857501", "0.58543533", "0.5851477", "0.58454895", "0.5844821", "0.58379614", "0.5836623", "0.5835777", "0.5830528", "0.58290046", "0.58264285", "0.58234495", "0.58187354", "0.5812521", "0.5811574", "0.58098096", "0.5807603", "0.5807603", "0.5807603", "0.5802671", "0.5798626", "0.5797748", "0.5793455", "0.5791562", "0.5790325", "0.5787761", "0.5786268", "0.5785291", "0.5778329", "0.5771841", "0.57660323", "0.5763716", "0.5760301", "0.57493293", "0.5748104", "0.57453334", "0.574242", "0.5741299", "0.5737715", "0.57341117", "0.5730745", "0.57239485", "0.57185966", "0.5715969", "0.5715586", "0.5715244", "0.5710825", "0.57106596" ]
0.81839
0
END printLastMiniCif FUNCTION HEADER / / Function to print one CIF from its id with its comment / / id of the cif to show /URL of the page where we call the method, used to redirecte after sending a comment
КОНЕЦ printLastMiniCif ФУНКЦИОНАЛЬНЫЙ ЗАГОЛОВОК // Функция для печати одного CIF по его идентификатору с его комментарием // Идентификатор CIF для отображения // URL страницы, с которой вызывается метод, используется для перенаправления после отправки комментария
public function printCifById($id, $URL) { /* * -------------------------------------------------------------- * Fonction à améliorer, créer une method pour afficher * les étoiles. Possible de réduire le code. SI LE TEMPS LE PERMET * --------------------------------------------------------------- * */ //Req to get info about the CIF $reqCif = $this->db->prepare('SELECT * FROM t_cif INNER JOIN t_category ON t_cif.fkCategory = t_category.idCategory INNER JOIN t_member ON t_cif.fkMember = t_member.idMember WHERE idCIF = :idCIF'); $reqCif->execute(array( 'idCIF' => $id )); $cif = $reqCif->fetch(); //Req to get the evaluation of the cif $reqEval = $this->db->prepare('SELECT COUNT(idEvaluation) AS "nbEval",ROUND(AVG(evaNote),1) AS "eval" FROM t_evaluation WHERE fkCIF = :fkCIF'); $reqEval->execute(array( 'fkCIF' => $id )); $eval = $reqEval->fetch(); ?> <!--_____________________CIF_________________--> <div class="cif-category-container"> <h3 class="cif-category-title"><?php echo $cif['catName'];?></h3> <div class="cif-detail"> <h4 class="cif-title"><?php echo $cif['cifTitle'];?></h4> <p> <?php //Add <br/> to the string $cif['cifDescription'] = str_replace("\n","<br/>",$cif['cifDescription']); echo $cif['cifDescription']; ?> </p> <div class="cif-detail-bottom"> <p>Posté par <?php echo $cif['memPseudo']; ?> | Nombre d'évaluations : <?php echo $eval['nbEval']?> | Note : <?php //Round the average to 0.5 $eval['eval'] = round($eval['eval'] * 2) / 2; //Loop to write the average of notes of the cif //Check nb of full star to write for($o = $eval['eval']; $o > 0.5; $o--) { echo '<span class="glyphicon glyphicon-star"></span>'; //If there's 0.5 left, put a half star if($o-1 == 0.5) { echo '<span class="glyphicon glyphicon-star half"></span>'; }//END if }//END for //Write the rest of the empty stars //Ceil = around to supp for($z = 0; $z < 5-ceil($eval['eval']); $z++) { echo '<span class="glyphicon glyphicon-star empty"></span>'; }//END for $reqEval->closeCursor(); $reqCif->closeCursor(); ?> </p> </div> </div> </div> <!--_____________________/CIF_________________--> <!--_____________________Comment_________________--> <div class="cif-category-container"> <h3 class="cif-category-title">Commentaires</h3> <?php //Req to get all the comment of the cif $reqComment = $this->db->prepare('SELECT evaComment, evaNote, memPseudo FROM t_evaluation INNER JOIN t_member ON fkMember = idMember WHERE fkCIF = :fkCIF ORDER BY idEvaluation'); $reqComment->execute(array( 'fkCIF' => $id )); echo '<div class="cif-detail comment">'; //Run all the evaluations while($comment = $reqComment->fetch()) { //Write the comment only if evaComment isn't empty if($comment['evaComment'] !== '') { ?> <h4 class="comment-name"> <?php //Round the average to 0.5 $comment['evaNote'] = round($comment['evaNote'] * 2) / 2; //Write pseudo echo $comment['memPseudo'] . '&nbsp; | &nbsp;'; //Check nb of full star to write for ($o = $comment['evaNote']; $o > 0.5; $o--) { echo '<span class="glyphicon glyphicon-star"></span>'; //If there's 0.5 left, put a half star if ($o - 1 == 0.5) { echo '<span class="glyphicon glyphicon-star half"></span>'; }//END if }//END for //Write the rest of the empty stars for ($z = 0; $z < 5 - ceil($comment['evaNote']); $z++) { echo '<span class="glyphicon glyphicon-star empty"></span>'; }//END For ?> </h4> <!--Write the comment--> <div class="cif-detail-bottom"> <?php //Add <br/> to the string $comment['evaComment'] = str_replace("\n","<br/>",$comment['evaComment']); ?> <p class="comment-text"><?php echo $comment['evaComment']; ?></p> </div> <?php } //END IF }//END While if(isset($_SESSION['namPseudo']) AND $_SESSION['namPseudo'] !== '') { ?> <h4 class="comment-name"> Ajouter un commentaire :</h4> <div class="cif-detail-bottom"> <div class="comment-cif-detail"> <form class="form" role="form" method="post" action="addComment.php" accept-charset="UTF-8"> <textarea class="form-control" name="comment" rows="10" placeholder="Commentaire"></textarea><br/> <input type="radio" name="evaluation" value="1" checked>&nbsp;<span class="glyphicon glyphicon-star"></span><br/> <input type="radio" name="evaluation" value="2">&nbsp;<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><br/> <input type="radio" name="evaluation" value="3">&nbsp;<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><br/> <input type="radio" name="evaluation" value="4">&nbsp;<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><br/> <input type="radio" name="evaluation" value="5">&nbsp;<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><br/> <br/> <input name="idCif" type="hidden" value="<?php echo $id; ?>"> <input name="URL" type="hidden" value="<?php echo $URL; ?>"> <button type="submit" class="btn btn-primary btn-block btn-comment">Soumettre</button> </form> </div> </div> <?php } ?> </div> <?php $reqComment->closeCursor(); ?> </div> <!--_____________________/Comment_________________--> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function printLastMiniCif($URL)\r\n {\r\n //Req to get all the cifs\r\n $reqCif = $this->db->query('SELECT cifTitle,cifDescription,idCIF FROM t_cif ORDER BY idCif DESC LIMIT 5');\r\n\r\n //Write all the cifs\r\n while($cif = $reqCif->fetch())\r\n {\r\n $this->printOneCIF($cif['idCIF'],$cif['cifTitle'],$cif['cifDescription'],'./page/', $URL);\r\n\r\n }//END while\r\n\r\n $reqCif->closeCursor();\r\n\r\n }", "private function printOneCIF($id,$title, $description, $path, $URL)\r\n {\r\n ?>\r\n <!--Div for CIF and title + text inside-->\r\n <?php echo ('<a class=\"cif-detail-link\" href=\"'.$path.'cifDetail.php?id='.$id.'\">');?>\r\n <div class=\"cif\">\r\n <h4 class=\"cif-title\">\r\n <?php\r\n echo $title;\r\n ?>\r\n </h4>\r\n <p class=\"cif-description\">\r\n <?php\r\n //Write only the first 380 character of the cif\r\n echo substr($description, 0, 380).'...';\r\n ?>\r\n </p>\r\n <?php\r\n if(isset($_SESSION['namPseudo'])) {\r\n ?>\r\n <!--Dropdown evaluate-->\r\n <div class=\"cif-bottom\">\r\n <ul class=\"ul-dropdown\">\r\n <li class=\"dropdown\">\r\n <a data-toggle=\"dropdown\" class=\"evaluate-link\" role=\"link\">Evaluer <span\r\n class=\"glyphicon glyphicon-star-empty\"></span></a>\r\n\r\n <div class=\"dropdown-menu\">\r\n <form class=\"form\" method=\"post\" action=\"<?php echo $path.'addComment.php'; ?>\" accept-charset=\"UTF-8\">\r\n <div class=\"form-group\">\r\n <textarea class=\"form-control\" name=\"comment\" rows=\"4\" placeholder=\"Commentaire\"></textarea>\r\n </div>\r\n <div class=\"form-group\" id=\"div-evaluate\">\r\n <input type=\"radio\" name=\"evaluation\" value=\"1\" checked>&nbsp;<span\r\n class=\"glyphicon glyphicon-star\"></span><br/>\r\n <input type=\"radio\" name=\"evaluation\" value=\"2\">&nbsp;<span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><br/>\r\n <input type=\"radio\" name=\"evaluation\" value=\"3\">&nbsp;<span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><br/>\r\n <input type=\"radio\" name=\"evaluation\" value=\"4\">&nbsp;<span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><br/>\r\n <input type=\"radio\" name=\"evaluation\" value=\"5\">&nbsp;<span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><span\r\n class=\"glyphicon glyphicon-star\"></span><br/>\r\n\r\n <input name=\"idCif\" type=\"hidden\" value=\"<?php echo $id; ?>\">\r\n <input name=\"URL\" type=\"hidden\" value=\"<?php echo $URL; ?>\">\r\n </div>\r\n <div class=\"form-group\">\r\n <button type=\"submit\" class=\"btn btn-primary btn-block\">Soumettre</button>\r\n </div>\r\n </form>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n <!--Dropdown evaluate-->\r\n <?php\r\n }\r\n ?>\r\n </div>\r\n </a>\r\n <?php\r\n\r\n }", "public static function outCommFunc($id_img)\n\t{\t\n\t\t//echo \"id_img=\".$id_img.\"<br>\";\n\t\t$db = Db::getConnection();\n\t\t$sql = $db->prepare('SELECT * \n\t\t\tFROM comment WHERE id_img = :id_img ORDER BY datetime DESC LIMIT 10');\n\t\tif($sql -> execute(array(':id_img' => $id_img)))\n\t\t{\n\t\t\t$i=0;\n\t\t\twhile($row = $sql->fetch())\n\t\t\t{\n\t\t\t\techo $comm[$i]['id_comment'] = $row['id_comment'];\n\t\t\t\techo \" i=\".$i.\"<br>\";\n\t\t\t\techo $comm[$i]['datetime'] = $row['datetime'];\n\t\t\t\techo \" i=\".$i.\"<br>\";\t\n\t\t\t\techo $comm[$i]['id_user'] = $row['id_user'];\n\t\t\t\techo \" i=\".$i.\"<br>\";\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $comm;\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function printAllCIF($URL)\r\n {\r\n\r\n //Check if there's filter on category or not\r\n if($this->category == 'all')\r\n {\r\n $reqCIF = $this->db->query('SELECT * FROM t_cif INNER JOIN t_category ON fkCategory = idCategory GROUP BY catName, cifTitle, idCIF');\r\n }\r\n else if($this->category !== 'all')\r\n {\r\n $reqCIF = $this->db->prepare('SELECT * FROM t_cif INNER JOIN t_category ON fkCategory = idCategory WHERE catName = :catName GROUP BY catName, cifTitle, idCIF');\r\n $reqCIF->execute(array(\r\n 'catName' => $this->category\r\n ));\r\n\r\n }//END if\r\n\r\n //Set a category var to null to check when it's a new category\r\n $cat = \"\";\r\n\r\n while($cif = $reqCIF->fetch())\r\n {\r\n //Print title of the category if it's a new one\r\n if($cat != $cif['catName'])\r\n {\r\n $cat = $cif['catName'];\r\n echo '</div><div class=\"cif-category-container\">';\r\n echo '<h3 class=\"cif-category-title\">'.$cat.'</h3>';\r\n\r\n //Method to print a cif\r\n $this->printOneCIF($cif['idCIF'],$cif['cifTitle'],$cif['cifDescription'],'./',$URL);\r\n }\r\n else\r\n {\r\n //Method to print a cif\r\n $this->printOneCIF($cif['idCIF'],$cif['cifTitle'],$cif['cifDescription'],'./',$URL);\r\n\r\n }//END If\r\n\r\n }//END While\r\n\r\n }", "function printFoto(&$row, $conn, $utente_esperto){\n \n //elenco dei commenti\n $sql = queryCommenti($row['email_utente'], $row['id_cinguettio']);\n \n //effettuo l'interrogazione per estrarre i commenti alla foto \n // memorizzo il numero di commenti effettuati\n $commenti = mysqli_query($conn, $sql);\n $num_commenti = mysqli_num_rows($commenti);\n \n //query per il numero massimo di commenti di commenti effettuati dall'utente per il cinguettio\n $sql = queryNumeroMaxCommenti($row['email_utente'], $row['id_cinguettio']);\n \n //effettuo l'interrogazione e memorizzo il numero massimo di commenti effettuati dall utente \n //per il cinguettio\n $result = mysqli_query($conn, $sql);\n $sql_result = mysqli_fetch_assoc($result);\n $max_commenti_utente = $sql_result['num_commenti'];\n \n // stampo l'header dei post\n printHeaderPost($row);\n\n // verifico che sia stata inserita una descrizione della foto\n if($row['descrizione_foto'] != NULL){\n echo '<div class=\"post-descrizione-foto\">' . $row['descrizione_foto'] . '</div>';\n }\n\n // stampo la foto\n echo '<img class=\"post-foto\" src=\"' . $row['path_foto'] . '\" alt=\"cinguettio di foto\"/>'; \n\n // stampo il numero di commenti\n echo '<div class=\"commenti\">'; \n echo 'Commenti <span class=\"numero-commenti\">' . $num_commenti . '</span>';\n echo '</div>';\n \n echo '<div class=\"lista-commenti\">';\n if($num_commenti > 0){\n // stampo i commenti\n while($comm = mysqli_fetch_assoc($commenti)){\n echo '<a class=\"link-commenti\" href=\"ricercaUtente.php?email_nickname=' . $comm['email_utente'] . '\">';\n echo '<span class=\"nickname-commento\">'. $comm['nickname'] . '</span>';\n echo '<span class=\"data-commento\">'; \n printData($comm['data_ora_commento'], 'd/m/Y H:i');\n echo '</span>'; \n echo '<span class=\"testo-commento\">' . $comm['commento'] . '</span>';\n echo '</a>';\n }\n } \n echo '</div>';\n\n // verifico se l'utente ha già inserito più di tre commenti\n if($max_commenti_utente >= 3){\n echo '<button onclick=\"showModal(' .\"'ins-errore-max-commenti','post-container'\" . ')\" class=\"inserimento-commento\">'; \n echo 'Inserisci un commento </button>';\n }\n // verifico se l'utente è esperto\n else if($utente_esperto == FALSE){\n echo '<button onclick=\"showModal(' .\"'ins-errore-no-esperto','post-container'\" . ')\" class=\"inserimento-commento\">'; \n echo 'Inserisci un commento </button>';\n }\n else{\n // creo l'id della modal\n $id_modal = $row['id_cinguettio'] . '_' . $row['email_utente'];\n echo '<button onclick=\"showModal(' .\"'\" . $id_modal . \"',\" . \"'post-container'\" . ')\" class=\"inserimento-commento\">'; \n echo 'Inserisci un commento </button>';\n }\n}", "function img_comments($img_id, $ssize, $lang) {\n// Gibt die Kommentare und das Kommentier-Formular aus.\n $mycomm = mycomm($img_id);\n if (mysql_num_rows($mycomm)>0) {\n for ($n=0; $n<mysql_num_rows($mycomm); $n++) {\n $user_id = mysql_result($mycomm,$n,\"user\");\n $myuser = myuser($user_id);\n // User-Details\n $user = mysql_result($myuser,0,\"name\");\n $email = mysql_result($myuser,0,\"email\");\n $homepage = mysql_result($myuser,0,\"homepage\");\n $place = mysql_result($myuser,0,\"place\");\n // Comment-Details\n $time = mysql_result($mycomm,$n,\"time\");\n $text = mysql_result($mycomm,$n,\"text\");\n // Transforming\n if ($user==NULL||$user==\"\"||!isset($user)||$user==\"Anonymous\") $user == $lang['comm_anonymous'];\n if ($email==NULL||$email==\"\"||!isset($email)) {\n $email_1 = \"\";\n\t$email_2 = \"\";\n } else {\n $email_1 = \"<a href=\\\"mailto:$email\\\">\";\n\t$email_2 = \"</a>\";\n }\n if (!($homepage==NULL||$homepage==\"\"||!isset($homepage))) $homepage = \" (<a href=\\\"$homepage\\\">\" . $lang['comm_web'] . \"</a>)\";\n if (!($place==NULL||$place==\"\"||!isset($place))) $place = \" \" . $lang['comm_from'] . \" $place\";\n $text = str_replace(\"\\n\",\"<br />\\n\",$text);\n $time = substr($time,8,2). \".\" . substr($time,5,2) . \".\" . substr($time,0,4) . \" \" . $lang['at'] . \" \" . substr($time,11,2) . \":\" . substr($time,14,2);\n print \"<p name=\\\"comments\\\" id=\\\"comments\\\" style=\\\"display: block;\\\"><small>$email_1$user$email_2$homepage$place<br /><small>$time</small></small><br />\\n$text</p>\\n\";\n }\n } else {\n print \"<p name=\\\"comments\\\" id=\\\"comments\\\" style=\\\"display: block;\\\">\" . $lang['nocomments'] . \"</p>\\n\";\n }\n print \"<p><a href=\\\"javascript: comment_show('\" . $lang['addcomment'] . \"', '\" . $lang['switchcomment'] . \"');\\\" tabindex=\\\"10\\\" name=\\\"addcomment\\\" id=\\\"addcomment\\\">\" . $lang['addcomment'] . \"</a></p>\\n\";\n print \"<p><form action=\\\"index.php?img=$img_id&ssize=$ssize&act=addcomment\\\" id=\\\"comment\\\" name=\\\"comment\\\" method=\\\"POST\\\" style=\\\"display: none;\\\">\\n\";\n if (isset($_COOKIE[\"imgallery2_user\"])) {\n $user_id = $_COOKIE[\"imgallery2_user\"];\n $myuser = myuser($user_id);\n if (mysql_num_rows($myuser)>0) {\n print \" <input type=\\\"hidden\\\" id=\\\"f_hidden\\\" name=\\\"user_id\\\" value=\\\"$user_id\\\" />\\n\";\n $name = mysql_result($myuser,0,\"name\");\n $place = mysql_result($myuser,0,\"place\");\n $email = mysql_result($myuser,0,\"email\");\n $homepage = mysql_result($myuser,0,\"homepage\");\n } else { $name = $lang['comm_name']; $place = $lang['comm_place']; $email = $lang['comm_email']; $homepage = $lang['comm_homepage']; }\n } else { $name = $lang['comm_name']; $place = $lang['comm_place']; $email = $lang['comm_email']; $homepage = $lang['comm_homepage']; }\n print \" <input type=\\\"hidden\\\" id=\\\"f_hidden\\\" name=\\\"img_id\\\" value=\\\"$img_id\\\" />\\n\";\n print \" <input type=\\\"submit\\\" tabindex=\\\"16\\\" id=\\\"f_submit\\\" name=\\\"submit\\\" value=\\\"\" . $lang['comm_send'] . \"\\\" />\\n\";\n print \" <input type=\\\"text\\\" tabindex=\\\"11\\\" maxlength=\\\"127\\\" id=\\\"f_name\\\" name=\\\"name\\\" value=\\\"$name\\\" svalue=\\\"\" . $lang['comm_name'] . \"\\\" OnFocus=\\\"comment_focus(this.id,this.svalue)\\\" OnBlur=\\\"comment_focusout(this.id,this.svalue)\\\" /><br />\\n\";\n print \" <input type=\\\"text\\\" tabindex=\\\"12\\\" maxlength=\\\"127\\\" id=\\\"f_place\\\" name=\\\"place\\\" value=\\\"$place\\\" svalue=\\\"\" . $lang['comm_place'] . \"\\\" OnFocus=\\\"comment_focus(this.id,this.svalue)\\\" OnBlur=\\\"comment_focusout(this.id,this.svalue)\\\" /><br />\\n\";\n print \" <input type=\\\"text\\\" tabindex=\\\"13\\\" maxlength=\\\"127\\\" id=\\\"f_email\\\" name=\\\"email\\\" value=\\\"$email\\\" svalue=\\\"\" . $lang['comm_email'] . \"\\\" OnFocus=\\\"comment_focus(this.id,this.svalue)\\\" OnBlur=\\\"comment_focusout(this.id,this.svalue)\\\" /><br />\\n\";\n print \" <input type=\\\"text\\\" tabindex=\\\"14\\\" maxlength=\\\"127\\\" id=\\\"f_homepage\\\" name=\\\"homepage\\\" value=\\\"$homepage\\\" svalue=\\\"\" . $lang['comm_homepage'] . \"\\\" OnFocus=\\\"comment_focus(this.id,this.svalue)\\\" OnBlur=\\\"comment_focusout(this.id,this.svalue)\\\" /><br />\\n\";\n print \" <textarea id=\\\"f_text\\\" tabindex=\\\"15\\\" name=\\\"text\\\" svalue=\\\"comment\\\" OnFocus=\\\"comment_focus(this.id,this.svalue)\\\" OnBlur=\\\"comment_focusout(this.id,this.svalue)\\\">\" . $lang['comm_text'] . \"</textarea><br />\\n\";\n print \"<p id=\\\"comment_optional\\\" style=\\\"display: none;\\\"><small>\" . $lang['optional'] . \" </small></p>\\n\";\n print \"</form></p>\\n\";\n}", "function get_commenti($id) {\n $this->manage_session(1);\n\n require_once('model/commento.php');\n $commento = new commento($this->db, $id);\n $o = '';\n foreach ($commento->get_children() as $id_com) {\n $c = new view('commenti', 'vedi');\n $c->set_message($id_com);\n $c->set_db($this->db);\n $c->set_user($this->user);\n $c->render(false);\n }\n echo $o;\n }", "function dispOneComment ($type, $row, $startNum=0) {\n global $spc, $rowCntr;\n $row = array_map(stripslashes, str_replace(\"\\\\\",\"\",$row)); # strip slashes from all elements in $row\n $email = (($row['hideEmail'] != \"Y\") ? obfuscateEmail($row['cmtEmail']) : \"(hidden)\");\n print \"<div class='comment'>\\n\";\n if ($type == \"G\") { # Guestbook gets differnt display format from all other comments\n print \"# \".($startNum +1).$spc.$spc.\"<img src='img/name.gif'>: \".$row['cmtName'].\" on \". $row['createDateTime'];\n if (strlen($row['cmtEmail']) > 2) { \n print \"<br/>$spc<img src='img/email.gif'>: \".$email; }\n if (strlen($row['cmtWebsite']) > 0) {\n print $spc.\"<img src='img/home.gif'>: <a href='http://\".$row['cmtWebsite'].\"' target='_blank'>\".$row['cmtWebsite'].\"</a>\\n\"; }\n } else {\n if (strlen(trim($row['cmtSubject'])) > 1) { \n print \"<strong><i>\".$row['cmtSubject'].\"</i></strong><br/>\"; }\n print \"$spc$spc by \".$row['cmtName'];\n if (($row['hideEmail'] != \"Y\") && (strlen($row['cmtEmail']) > 0)) { print \" ($email)\"; }\n print $spc.\" on \".$row['createDateTime'];\n }\n if ($_SESSION['status'] == \"1\") { # Allow Admins to Delete, Hide, or Show (unHide) any comment.\n print \"&nbsp; &nbsp; <input type='submit' name='cmtSubmit' value='dele_$rowCntr'>\";\n print \" &nbsp; <input type='submit' name='cmtSubmit' value='\";\n if ($row['cmtStatus'] == \"H\") { print \"show\"; } else { print \"hide\"; }\n print \"_$rowCntr'>\"; \n print \"<input type='hidden' name='rowIDs[]' value='\".$row['rowID'].\"'>\"; \n }\n print \"<p>\".$row['cmtText'].\"</p>\\n</div id='comment'>\\n\";\n $rowCntr++; \n}", "public function print_disclosure($cmid) {\n global $OUTPUT, $USER, $DB;\n\n static $tiiconnection;\n\n $config = $this->plagiarism_turnitin_admin_config();\n $output = '';\n\n // Get course details.\n $cm = get_coursemodule_from_id('', $cmid);\n\n $moduletiienabled = $this->get_config_settings('mod_'.$cm->modname);\n // Exit if Turnitin is not being used for this activity type.\n if (empty($moduletiienabled)) {\n return '';\n }\n\n $plagiarismsettings = $this->get_settings($cmid);\n // Check Turnitin is enabled for this current module.\n if (empty($plagiarismsettings['use_turnitin'])) {\n return '';\n }\n\n $this->load_page_components();\n\n // Show resubmission warning - but not for mod forum.\n if ($cm->modname != 'forum') {\n $tiisubmissions = $DB->get_records('plagiarism_turnitin_files', array('userid' => $USER->id, 'cm' => $cm->id));\n $tiisubmissions = current($tiisubmissions);\n\n if ($tiisubmissions) {\n $genparams = $this->plagiarism_get_report_gen_speed_params();\n $output .= html_writer::tag('div', get_string('reportgenspeed_resubmission', 'plagiarism_turnitin', $genparams), array('class' => 'tii_genspeednote'));\n }\n }\n\n // Show agreement.\n if (!empty($config->plagiarism_turnitin_agreement)) {\n $contents = format_text($config->plagiarism_turnitin_agreement, FORMAT_MOODLE, array(\"noclean\" => true));\n $output .= $OUTPUT->box($contents, 'generalbox boxaligncenter', 'intro');\n }\n\n // Exit here if the plugin is not configured for Turnitin.\n if (!$this->is_plugin_configured()) {\n return $output;\n }\n\n // Show EULA if necessary and we have a connection to Turnitin.\n if (empty($tiiconnection)) {\n $tiiconnection = $this->test_turnitin_connection();\n }\n if ($tiiconnection) {\n $coursedata = $this->get_course_data($cm->id, $cm->course);\n\n $user = new turnitin_user($USER->id, \"Learner\");\n $user->join_user_to_class($coursedata->turnitin_cid);\n $eulaaccepted = ($user->useragreementaccepted == 0) ? $user->get_accepted_user_agreement() : $user->useragreementaccepted;\n\n if ($eulaaccepted != 1) {\n $eulalink = html_writer::tag('span',\n get_string('turnitinppulapre', 'plagiarism_turnitin'),\n array('class' => 'pp_turnitin_eula_link tii_tooltip', 'id' => 'rubric_manager_form')\n );\n $eulaignoredclass = ($eulaaccepted == 0) ? ' pp_turnitin_eula_ignored' : '';\n $eula = html_writer::tag('div', $eulalink, array('class' => 'pp_turnitin_eula'.$eulaignoredclass,\n 'data-userid' => $user->id));\n\n $form = turnitin_view::output_launch_form(\n \"useragreement\",\n 0,\n $user->tiiuserid,\n \"Learner\",\n get_string('turnitinppulapre', 'plagiarism_turnitin'),\n false\n );\n $form .= \" \".get_string('noscriptula', 'plagiarism_turnitin');\n\n $noscripteula = html_writer::tag('noscript', $form, array('class' => 'warning turnitin_ula_noscript'));\n }\n\n // Show EULA launcher and form placeholder.\n if (!empty($eula)) {\n $output .= $eula.$noscripteula;\n\n $turnitincomms = new turnitin_comms();\n $turnitincall = $turnitincomms->initialise_api();\n\n $customdata = array(\"disable_form_change_checker\" => true,\n \"elements\" => array(array('html', $OUTPUT->box('', '', 'useragreement_inputs'))));\n\n $eulaform = new turnitin_form($turnitincall->getApiBaseUrl().TiiLTI::EULAENDPOINT, $customdata,\n 'POST', $target = 'eulaWindow', array('id' => 'eula_launch'));\n $output .= $OUTPUT->box($eulaform->display(), 'tii_useragreement_form', 'useragreement_form');\n }\n }\n\n if ($config->plagiarism_turnitin_usegrademark && !empty($plagiarismsettings[\"plagiarism_rubric\"])) {\n\n // Update assignment in case rubric is not stored in Turnitin yet.\n $this->sync_tii_assignment($cm, $coursedata->turnitin_cid);\n\n $rubricviewlink = html_writer::tag('span',\n get_string('launchrubricview', 'plagiarism_turnitin'),\n array('class' => 'rubric_view rubric_view_pp_launch_upload tii_tooltip',\n 'data-courseid' => $cm->course,\n 'data-cmid' => $cm->id,\n 'title' => get_string('launchrubricview',\n 'plagiarism_turnitin'), 'id' => 'rubric_manager_form'\n )\n );\n $rubricviewlink = html_writer::tag('div', $rubricviewlink, array('class' => 'row_rubric_view'));\n\n $output .= html_writer::tag('div', $rubricviewlink, array('class' => 'tii_links_container tii_disclosure_links'));\n }\n\n return $output;\n }", "function print_mini_cams( $cam ) {\t\n\n\t\t\t// Check if HD\n\t\t\t\tif ( $cam->is_hd == 'True' )\n\t\t\t\t\t$hd = '<a href=\"' . BASEHREF . 'cams/hd\">HD</a>';\n\t\t\t\telse\n\t\t\t\t\t$hd = '';\n\n\t\t\t// Check if New\n\t\t\t\tif ( $cam->is_new == 'True' )\n\t\t\t\t\t$new = '<a href=\"' . BASEHREF . 'cams/new\">New</a>';\n\t\t\t\telse\n\t\t\t\t\t$new = '';\t\n\n\t\t\techo '\t\n\n\t\t\t<!-- Mini Post -->\n\t\t\t\t<article class=\"mini-post\">\n\t\t\t\t\t<header>\n\t\t\t\t\t\t<h3><a href=\"' . BASEHREF . 'cam/' . $cam->username . '\">' . $cam->display_name . '</a></h3>\n\t\t\t\t\t\t<span class=\"published icon fa-clock-o\" > ' . ago( $cam->seconds_online ) . '</span> <span class=\"published icon fa-comment\"> ' . $cam->num_users . '</span>\n\t\t\t\t\t</header>\n\t\t\t\t\t<a href=\"' . BASEHREF . 'cam/' . $cam->username . '\" class=\"image\"><img src=\"' . $cam->image_url . '\" alt=\"Watch ' . $cam->display_name . ' Streaming Live\" /></a>\n\t\t\t\t</article>\n\n\t\t\t\t\n\t\t\t';\t\n\t\t\t\t\n\t\t}", "function image_fce($ID,$obrazek,$imd){ //imd je rozliseni obrazku, pokud jich je k obsahu vice\n\nglobal $ico_lupa2;\nglobal $ico_smazat2;\n\n\n$pole=array(\".jpg\",\".gif\");\n\n foreach($pole as $pripona):\n\n\t$obrazek1=$obrazek.$pripona;\n\n\tif(File_Exists ($obrazek1)):\n\t\techo \"&nbsp;&nbsp;&nbsp;<a href=\\\"javascript: void window.open('detail_img.php?obrazek_det=$obrazek1','detail','height=50, width=50, scrollbars=no')\\\" title=\\\"\\\">\".htmlspecialchars($ico_lupa2).\"</a>&nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\techo \"<a href=\\\"htmlspecialchars($_SERVER[PHP_SELF])?del_img=ok&amp;ID=htmlspecialchars($ID)&amp;imd=htmlspecialchars($imd)\\\" onclick=\\\"return potvrd('Opravdu si přejete smazat obrázek?\\\\nNeuložená data budou ztracena.')\\\">\".htmlspecialchars($ico_smazat2).\"</a>\";\n\tendif;\n\n endforeach;\n\n}", "function printDetailOfSelf($imageOnly = NULL){\t\t\n\t\t// Das Bild dessen Details angezeigt werden sollen\n\t\t$currentImage = $this->imageArray[$this->pointerToCurrent];\n\t\t\n\t\t\n\t\t// Eine neue CunddImages-Instanz erstellen\n\t\t// TODO: den Pointer merken\n\t\t$imageId = $currentImage['schluessel'];\n\t\t\n\t\t$tempCunddImages = new CunddImages($currentImage['parent']);\n\t\t$this->overwriteAndRelease($tempCunddImages);\n\t\t\n\t\t$this->getImageWithId($imageId);\n\t\t\n\t\t//$currentImage = $this->imageArray[0];\n\t\t\n\t\t/* */\n\t\t\n\t\t// DEBUGGEN\n\t\tif($say OR $this->debug){\n\t\t\tCunddTools::pd($this);\n\t\t}\n\t\t// DEBUGGEN\n\t\t\n\t\t// Das Bild anzeigen\n\t\t// Einen div um das Bild und dessen Informationen legen\n\t\t$wert = $this->imageArray[$this->pointerToCurrent]['schluessel'];\n\t\techo CunddTemplate::inhalte_einrichten($wert, 4, $this->classPrefix.'_show_'.$this->classPrefix.'_container', 'output');\n\t\t\n\t\t// Das Array erstellen das an CunddTemplate übergeben wird\n\t\t$currentImagesAttributes = self::getAttributesFromString($currentImage['attribute']);\n\t\t$forceRemotePath = $currentImagesAttributes['forceRemotePath'];\n\t\t\n\t\t$tag = $this->classPrefix.'_show_'.$this->classPrefix.'_detail';\n\t\t$currentImage[$tag] = CunddFiles::get_real_path($currentImage['dateiname'], NULL, $forceRemotePath); // Pfad des Bildes\n\t\t$currentImage['className'] = $this->className;\n\t\t\n\t\t// Die Größe des Bildes ermitteln\n\t\tif($maxWidth){\n\t\t\t$currentImage['maxWidth'] = $maxWidth;\n\t\t} else {\n\t\t\t$currentImage['maxWidth'] = CunddConfig::get('CunddGalerie_max_detail_image_width');\n\t\t}\n\t\t\n\t\tif($maxHeight){\n\t\t\t$currentImage['maxHeight'] = $maxHeight;\n\t\t} else {\n\t\t\t$currentImage['maxHeight'] = CunddConfig::get('CunddGalerie_max_detail_image_height');\n\t\t} \n\t\t\n\t\techo CunddTemplate::inhalte_einrichten($currentImage, 4, $tag, 'output');\n\t\t\n\t\t// Die Zusatzinformationen anzeigen wenn $imageOnly nicht gesetzt ist\n\t\tif(!$imageOnly){\n\t\t\t$this->showImageWithoutPicture();\n\t\t}\n\t\t\n\t\t// Den div schließen\n\t\techo CunddTemplate::inhalte_einrichten(NULL, 4, 'universal_close_div', 'output');\n\t\t/* */\n\t\t\n\t\treturn true;\n\t}", "function print_ad_cat($id,$title, $cat='', $marque, $model, $ad_ville, $etat, $urg, $price,\n\t$id_ann,$an_ville, $diffdate, $an_nom, $nbr_cons, $annonceur_photo, $photo){\n\tprint \"<aside class=aside_ad><div class=ad_desc>\";\n\t/* Annonce */\n\tif($photo)\n\t\tprint '<img src=\"data:image/jpeg;base64,'.base64_encode( $photo ).'\"/>';\n\telse print \"<img src=/TechStore/app/img/logo.png>\";\n\tprint \"<div class=ad_caracts>\";\n\tprint \"<div class=ad_title><a href=/TechStore/app/ad/ad.php?id=$id target=_blank>$title</a></div>\";\n\tprint \"$cat<br>$marque $model<br>$ad_ville<br>$etat<br>$urg<br>$nbr_cons\";\n\tprint \"\t<div class=ad_price>$price €</div>\"; \n\tprint \"</div></div>\";\n\t/* Annonceur */\n\tprint \"<div class=annonceur_div>\";\n\tprint \"<div class=annonceur_ville>$an_ville</div>\";\n\tprint \"<div class=diff_date_pub>$diffdate</div>\";\n\tprint \"<a href=/TechStore/app/annonceur/annonceur.php?id=$id_ann target=_blank>\";\n\tprint \"<div class= ann_photo>\";\n\tif($annonceur_photo)\n\t\tprint '<img src=\"data:image/jpeg;base64,'.base64_encode( $annonceur_photo ).'\"/>';\n\telse print \"<img src=/TechStore/app/img/user.png>\";\n\tprint \"</div>\";\n\tprint \"<div class=annonceur_nom>$an_nom</div>\";\n\tprint \"</a></div></aside>\";\n}", "private function get_comment($id){\n $comment_no = $this->configs->item('comment_no');\n //get comments' order\n $order = $this->input->get('order') ? $this->input->get('order') : 'ASC';\n //get comments' number\n $count = $this->comment->list_comment($id, 0, 'cm_id', $order, $this->page, $comment_no, TRUE);\n $this->load->library('dpagination');\n $this->dpagination->generate($count,$comment_no,$this->page,\"/t/{$id}\",8);\n return $this->comment->list_comment($id, 0, 'cm_id', $order, $this->page, $comment_no);\n }", "function printAlbom($ftplocation,$ftp_id){\n\n $local_file = $GLOBALS['local_file'];\n \n echo \"<div class=\\\"albomField\\\">\";\n \n \n $contents = ftp_nlist($ftp_id, $ftplocation);\n for ($i = 0 ; $i < count($contents) ; $i++)\n {\n \n $server_file = $contents[$i];\n\n // we are looking for images only \n if (strpos(strtolower($server_file) , '.jpg') != false) // TODO: add more formats soon\n {\n // try to download $server_file and save to $local_file\n if (ftp_get($ftp_id, $local_file, $server_file, FTP_BINARY))\n { \n //TODO: add link to sliddeshow\n echo \"<div class=\\\"albPhoto\\\"><a href=\\\"pfoto.php?loc=\" . $server_file .\"\\\">\";\n echo \"<img src=\\\"\" . scaleImg($local_file) . \"\\\" title=\\\"\". $server_file .\"\\\"></a></div>\\n\"; \n }\n else\n {\n echo \"<h1>FTP ERROR</h1>\\nNot possible to get img:\" . $server_file; \n } \n }\n \n }\n echo \"</div>\";\n}", "function DispFlClasst($NmChamp) {\nglobal $tbchptri, $tbordtri;\nfor ($l=1;$l<=3;$l++) {\n if ($tbchptri[$l]==$NmChamp) {\n echo \"<IMG SRC=\\\"fl\".$l.$tbordtri[$l].\".gif\\\" alt=\\\"la flèche indique le sens et le n° d'ordre de clé du classement de ce champ\\\">&nbsp;\";\n break;\n }\n }\n}", "function displayCommentOnPhoto($response_message, $xmlrequest) {\r\n\r\n if (isset($response_message['DisplayCommentOnPhoto']['SuccessCode']) && ( $response_message['DisplayCommentOnPhoto']['SuccessCode'] == '000')) {\r\n $commentsinfo = array();\r\n $pagenumber = $xmlrequest['DisplayCommentOnPhoto']['pageNumber'];\r\n $commentsinfo = $this->display_comment_on_photo($xmlrequest, $pagenumber, 20);\r\n $commentsinfo['Comment'] = bubble_sort($commentsinfo['Comment']);\r\n $userinfocode = $response_message['DisplayCommentOnPhoto']['SuccessCode'];\r\n $userinfodesc = $response_message['DisplayCommentOnPhoto']['SuccessDesc'];\r\n $currentcommentcount = isset($commentsinfo['Comment']['count']) && ($commentsinfo['Comment']['count']) ? $commentsinfo['Comment']['count'] : 0;\r\n $totalcommentcount = isset($commentsinfo['Comment']['totalrecords']) && ($commentsinfo['Comment']['totalrecords']) ? $commentsinfo['Comment']['totalrecords'] : 0;\r\n //$postcount = 0;\r\n $str = '';\r\n for ($i = 0; $i < $currentcommentcount; $i++) {\r\n $commentsinfo['Comment'][$i]['comment'] = strip_tags($commentsinfo['Comment'][$i]['comment'], \"<br />\");\r\n $commentsinfo['Comment'][$i]['comment'] = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"<br />\", \"<br/>\"), \"\\\\n\", $commentsinfo['Comment'][$i]['comment']);\r\n $commentsinfo['Comment'][$i]['comment'] = str_replace(array(\"\\\"\"), \"\", $commentsinfo['Comment'][$i]['comment']);\r\n $commentsinfo['Comment'][$i]['User']['photo_b_thumb'] = ((isset($commentsinfo['Comment'][$i]['User']['is_facebook_user'])) && (strlen($commentsinfo['Comment'][$i]['User']['photo_b_thumb']) > 7) && ($commentsinfo['Comment'][$i]['User']['is_facebook_user'] == 'y' || $commentsinfo['Comment'][$i]['User']['is_facebook_user'] == 'Y')) ? $commentsinfo['Comment'][$i]['User']['photo_b_thumb'] : ((isset($commentsinfo['Comment'][$i]['User']['photo_b_thumb']) && (strlen($commentsinfo['Comment'][$i]['User']['photo_b_thumb']) > 7)) ? $this->profile_url . $commentsinfo['Comment'][$i]['User']['photo_b_thumb'] : $this->profile_url . default_images($commentsinfo['Comment'][$i]['User']['gender'], $commentsinfo['Comment'][$i]['User']['profile_type']));\r\n $postVia = ((isset($commentsinfo['Comment'][$i]['post_via'])) && ($commentsinfo['Comment'][$i]['post_via'])) ? \"iPhone\" : \"\";\r\n $date = time_difference($commentsinfo['Comment'][$i]['date']); // date(\"d/m/y : H:i:s\", $commentsinfo['Comment'][$i]['date'])\r\n $str_temp = ' {\r\n \"postId\":\"' .str_replace('\"', '\\\"',$commentsinfo['Comment'][$i]['id']). '\",\r\n \"totalComment\":\"' .str_replace('\"', '\\\"',$commentsinfo['Comment'][$i]['total_comment']). '\",\r\n \"authorID\":\"' .str_replace('\"', '\\\"',$commentsinfo['Comment'][$i]['mem_id']). '\",\r\n \"authorProfileImgURL\":\"' .str_replace('\"', '\\\"',$commentsinfo['Comment'][$i]['User']['photo_b_thumb']). '\",\r\n \"authorName\":\"' .str_replace('\"', '\\\"',$commentsinfo['Comment'][$i]['User']['profilenam']). '\",\r\n \"gender\":\"' .str_replace('\"', '\\\"',$commentsinfo['Comment'][$i]['User']['gender']). '\",\r\n \"authorType\":\"' . $commentsinfo['Comment'][$i]['User']['profile_type'] . '\",\r\n \"postText\":\"' .str_replace('\"', '\\\"',trim(preg_replace('/\\s+/', ' ', $commentsinfo['Comment'][$i]['comment']))). '\",\r\n \"postTimestamp\":\"' . $date . '\",\r\n \"postVia\":\"' .str_replace('\"', '\\\"',$postVia). '\"\r\n\r\n }';\r\n //$postcount++;\r\n $str = $str . $str_temp;\r\n $str = $str . ',';\r\n }\r\n $str = substr($str, 0, strlen($str) - 1);\r\n $response_str = response_repeat_string();\r\n $response_mess = '{\r\n ' . $response_str . '\r\n \"DisplayCommentOnPhoto\":{\r\n \"errorCode\":\"' . $userinfocode . '\",\r\n \"errorMsg\":\"' . $userinfodesc . '\",\r\n \"currentComments\":\"' . $currentcommentcount . '\",\r\n \"totalComments\":\"' . $totalcommentcount . '\",\r\n \"posts\":[ ' . $str . ']\r\n }\r\n}\r\n';\r\n } else {\r\n $userinfocode = $response_message['DisplayCommentOnPhoto']['ErrorCode'];\r\n $userinfodesc = $response_message['DisplayCommentOnPhoto']['ErrorDesc'];\r\n $response_mess = get_response_string(\"DisplayCommentOnPhoto\", $userinfocode, $userinfodesc);\r\n }\r\n return getValidJSON($response_mess);\r\n }", "function comment_ID() {\r\n\techo return_comment_ID();\r\n}", "function ShowComment($pageId)\n {\n $eComunity = DashBoard::GetApp(\"Comunity\", $this->Core);\n $comments = $eComunity->GetCommentByApp(\"Cms\", \"CmsPage\", $pageId);\n\n $html = \"\";\n\n if(count($comments) > 0)\n {\n foreach($comments as $comment)\n {\n $html .= \"<div class='comment'>\";\n $html .= $comment->Message->Value;\n\n if($comment->Actif->Value == false)\n {\n $btnPublish = new Button(BUTTON);\n $btnPublish->CssClass = \"btn btn-primary\";\n $btnPublish->Value = $this->Core->GetCode(\"Cms.Publish\");\n $btnPublish->OnClick = \"CmsAction.Publish(this, \".$comment->IdEntite.\", 1)\";\n $html .= $btnPublish->Show();\n }\n else\n {\n $btnDePublish = new Button(BUTTON);\n $btnDePublish->CssClass = \"btn btn-primary\";\n $btnDePublish->Value = $this->Core->GetCode(\"Cms.UnPublish\");\n $btnDePublish->OnClick = \"CmsAction.Publish(this, \".$comment->IdEntite.\", 0)\";\n $html .= $btnDePublish->Show();\n\n }\n $html .= \"</div>\";\n }\n\n return $html;\n }\n else\n {\n return $this->Core->GetCode(\"Cms.NoComment\");\n }\n }", "function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)\r\n{\r\n global $CONFIG, $LINEBREAK;\r\n\r\n $superCage = Inspekt::makeSuperCage();\r\n\r\n $width = $CONFIG['picture_table_width'];\r\n\r\n echo '<a name=\"top_display_media\"></a>'; // set the navbar-anchor\r\n starttable();\r\n echo $nav_menu;\r\n endtable();\r\n\r\n starttable();\r\n echo $picture;\r\n endtable();\r\n if ($CONFIG['display_film_strip'] == 1) {\r\n echo $film_strip;\r\n }\r\n\r\n\r\n echo $votes;\r\n\r\n $picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');\r\n echo $LINEBREAK . '<div id=\"picinfo\" style=\"display: '.str_replace('.gif','.png',$picinfo).';\">' . $LINEBREAK;\r\n starttable();\r\n echo $pic_info;\r\n endtable();\r\n echo '</div>' . $LINEBREAK;\r\n\r\n echo '<a name=\"comments_top\"></a>';\r\n echo '<div id=\"comments\">' . $LINEBREAK;\r\n echo $comments;\r\n echo '</div>' . $LINEBREAK;\r\n\r\n}", "public function qm_get_comment() {\n\t\tcheck_ajax_referer( 'qm_get_comment', 'security' );\n\t\t$cid = intval( $_POST['cid'] );\n\t\t$text = get_comment_text( $cid );\n\t\techo $this->get_formatted_comment( $text );\n\t\twp_die();\n\t}", "public function print_disclosure($cmid) {\n global $OUTPUT;\n $plagiarismsettings = (array)get_config('plagiarism');\n //TODO: check if this cmid has plagiarism enabled.\n echo $OUTPUT->box_start('generalbox boxaligncenter', 'intro');\n $formatoptions = new stdClass;\n $formatoptions->noclean = true;\n echo format_text($plagiarismsettings['crot_student_disclosure'], FORMAT_MOODLE, $formatoptions);\n echo $OUTPUT->box_end();\n }", "function CMT_reportAbusiveComment ($cid, $type)\n{\n global $_CONF, $_TABLES, $_USER, $LANG03, $LANG12, $LANG_LOGIN;\n\n $retval = '';\n\n if (empty ($_USER['username'])) {\n $retval .= COM_startBlock ($LANG_LOGIN[1], '',\n COM_getBlockTemplate ('_msg_block', 'header'));\n $loginreq = new Template ($_CONF['path_layout'] . 'submit');\n $loginreq->set_file ('loginreq', 'submitloginrequired.thtml');\n $loginreq->set_var ('xhtml', XHTML);\n $loginreq->set_var ('login_message', $LANG_LOGIN[2]);\n $loginreq->set_var ('site_url', $_CONF['site_url']);\n $loginreq->set_var ('lang_login', $LANG_LOGIN[3]);\n $loginreq->set_var ('lang_newuser', $LANG_LOGIN[4]);\n $loginreq->parse ('errormsg', 'loginreq');\n $retval .= $loginreq->finish ($loginreq->get_var ('errormsg'));\n $retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));\n\n return $retval;\n }\n\n COM_clearSpeedlimit ($_CONF['speedlimit'], 'mail');\n $last = COM_checkSpeedlimit ('mail');\n if ($last > 0) {\n $retval .= COM_startBlock ($LANG12[26], '',\n COM_getBlockTemplate ('_msg_block', 'header'))\n . $LANG12[30] . $last . $LANG12[31]\n . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));\n\n return $retval;\n }\n\n $start = new Template($_CONF['path_layout'] . 'comment');\n $start->set_file(array('report' => 'reportcomment.thtml'));\n $start->set_var('xhtml', XHTML);\n $start->set_var('site_url', $_CONF['site_url']);\n $start->set_var('layout_url', $_CONF['layout_url']);\n $start->set_var('lang_report_this', $LANG03[25]);\n $start->set_var('lang_send_report', $LANG03[10]);\n $start->set_var('cid', $cid);\n $start->set_var('type', $type);\n $start->set_var('gltoken_name', CSRF_TOKEN);\n $start->set_var('gltoken', SEC_createToken());\n\n $result = DB_query (\"SELECT uid,sid,pid,title,comment,UNIX_TIMESTAMP(date) AS nice_date FROM {$_TABLES['comments']} WHERE cid = $cid AND type = '$type'\");\n $A = DB_fetchArray ($result);\n\n $result = DB_query (\"SELECT username,fullname,photo,email FROM {$_TABLES['users']} WHERE uid = {$A['uid']}\");\n $B = DB_fetchArray ($result);\n\n // prepare data for comment preview\n $A['cid'] = $cid;\n $A['type'] = $type;\n $A['username'] = $B['username'];\n $A['fullname'] = $B['fullname'];\n $A['photo'] = $B['photo'];\n $A['email'] = $B['email'];\n $A['indent'] = 0;\n $A['pindent'] = 0;\n\n $thecomment = CMT_getComment ($A, 'flat', $type, 'ASC', false, true);\n $start->set_var ('comment', $thecomment);\n $retval .= COM_startBlock ($LANG03[15])\n . $start->finish ($start->parse ('output', 'report'))\n . COM_endBlock ();\n\n return $retval;\n}", "function list_chude_moi($id, $limit)\n {\n $check = $this->load('class_check');\n $skin = $this->load('class_skin');\n $thongtin = mysqli_query($this->getConnection(), \"SELECT * FROM tintuc WHERE duyet='1' ORDER BY id DESC LIMIT $limit\");\n $list = \"\";\n while ($r_tt = mysqli_fetch_assoc($thongtin)) {\n $list .= '\t\t\t\t\t\t\n<div class=\"popular-media-content\"> \n<a href=\"./xem-' . $check->blank($r_tt['tieu_de']) . '-' . $r_tt['id'] . '.html\" class=\"pull-l\"><img src=\"' . $r_tt['minh_hoa'] . '\" onerror=\"this.src=\\'./contents/images/no_images.png\\';\" width=\"100\" height=\"80\" class=\"media-object\"> </a>\n<div class=\"media-body\">\n<h4 class=\"p-media-heading\"><a href=\"./xem-' . $check->blank($r_tt['tieu_de']) . '-' . $r_tt['id'] . '.html\">' . $r_tt['tieu_de'] . '</a></h4>\n</div>\n</div>\n<div class=\"clear\"></div>';\n }\n return $list;\n }", "public static function cmf_getReferralSnippet()\n {\n ob_start();\n ?>\n <span class=\"footnote_referral_link\">\n <a target=\"_blank\" href=\"https://www.cminds.com/store/footnote/?af=<?php echo get_option('cmf_footnoteAffiliateCode') ?>\">\n <img src=\"https://www.cminds.com/wp-content/uploads/download_footnote.png\" width=122 height=22 alt=\"Download Footnote Pro\" title=\"Download Footnote Pro\" />\n </a>\n </span>\n <?php\n $referralSnippet = ob_get_clean();\n return $referralSnippet;\n }", "function ProccessComment()\n{\n// ouvre le fichier commentaire \n $handle = fopen(\"Commentaire.txt\", \"r\");\n if ($handle) {\n\t// on cherche dans chaque ligne \n while (($line = fgets($handle)) !== false) {\n\t\t// si le nom de l'image est dans la ligne on get la ligne dans le tableau\n if (strpos($line, $_SESSION['ImageCommentaire']) !== false) {\n $Array[] = getStringBetween($line, \"*\", \"~\");\n }\n }\n fclose($handle);\n }\n //Si le tableau n'est pas vide alors on affiche son contenue avec style et grâce\n if (!empty($Array)) {\n\t// pour chaque ligne dans le tableau, on affiche son information\n for ($i = count($Array) - 1; $i >= 0; $i--) {\n\t\t// get le nom utilisateur dans la chaine \n $user = substr($Array[$i], 0, strpos($Array[$i], '_'));\n\t\t// get le commentaire dans la chaine\n $comment = getStringBetween($Array[$i], \"_\", \"/\");\n\t\t// get la date dans la chaine \n $date = getStringBetween($Array[$i], \"/\", \"¯\");\n\t\t// affiche le tout \n echo \"\n <hr data-brackets-id='12673'>\n <ul data-brackets-id='12674' id='sortable' class='list-unstyled ui-sortable'>\n <strong class='pull-left primary-font'>$user</strong>\n <small class='pull-right text-muted'>\n <span class='glyphicon glyphicon-time'></span>$date</small>\n </br>\n <li class='ui-state-default'>$comment</li>\n </br>\n </ul>\n \";\n }\n }\n}", "function get_instance_comment($c_id) {\n $iid = $this->instance_id;\n $query = \"select * from `\".GALAXIA_TABLE_PREFIX.\"instance_comments` where `instance_id`=? and `c_id`=?\";\n $result = $this->mDb->query($query,array((int)$iid,(int)$c_id));\n $res = $result->fetchRow();\n return $res;\n }", "public function getCoverInfo($idC)\n {\n $portada = Portadas::where(\"curso\",\"=\",$idC)\n ->first();\n if (is_null($portada)) {\n return response()->json(['message' => 'Portada no encontrada'], 404);\n }\n\n return response()->json($portada,200);\n }", "function do_report_comment( $comment )\n\t{\t\n\t\t/* Make sure we have an image id */\n\t\tif( ! $comment )\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') );\n\t\t}\t\t\n\t\t\n\t\t/* Make sure the form was completed */\n\t\tif( empty( $this->ipsclass->input['message'] ) )\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'complete_form' ) );\t\n\t\t}\n\n\t\t/* Get the image and category info */\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'gallery_comments', 'where' => \"pid={$comment}\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t$comment = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t\t\t/* Get the image and category info */\n\t\t$image = $this->glib->get_image_info( $comment['img_id'] );\n\t\t$cat = ( !$image['category_id'] ) ? $this->glib->get_album_info( $image['album_id'] ) : $this->glib->get_category_info( $image['category_id'] );\n\n\t\t/* Make sure we can view this category */\n\t\tif( ! $this->ipsclass->check_perms( $cat['perms_images'] ) && $image['category_id'] )\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );\t\t\n\t\t}\n\t\t\n\t\t/* Get a list of moderator masks */\n\t\t\n\t\t/*\n\t\t* TODO: Offload this when reworking permissions for 2.1 */\n\t\tif( $image['category_id'] )\n\t\t{\n\t\t\t/*\n\t\t\t* In a category, grab mods */\n\t\t\t$mods = explode( ',', $cat['perms_moderate'] );\n\t\t\t\n\t\t\t/* Format SQL Query */\n\t\t\tforeach( $mods as $mod )\n\t\t\t{\n\t\t\t\t$q[] = \"$mod IN ( g_perm_id )\";\n\t\t\t}\n\t\t\t$q = implode( \" OR \", $q );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t* In an album, grab any groups that have album mod perms */\n\t\t\t$q = \"g_mod_albums = 1 OR g_id = {$this->ipsclass->vars['admin_group']}\";\n\t\t}\n\n\t\t/* Query for groups */\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'g_id', 'from' => 'groups', 'where' => $q ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\twhile( $i = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$mod_groups[] = $i['g_id'];\t\n\t\t}\n\t\t\n\t\t/* Query for members */\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, email, name', 'from' => 'members', 'where' => \"mgroup IN ( \".implode( \",\",$mod_groups ).\" )\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t$mods = array();\n\t\twhile( $i = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$mods[] = $i;\n\t\t}\n\t\t/* Get needed modules */\n require KERNEL_PATH . \"class_email.php\";\t\t\n\t\t $this->email = new class_email();\n\t\t $this->email->html_email = 1;\n\t\t $this->email->ipsclass = &$this->ipsclass;\n\t\t\n\t\trequire_once( ROOT_PATH.'sources/lib/func_msg.php' );\n\t\t$this->lib = new func_msg();\n $this->lib->ipsclass =& $this->ipsclass; \n\t\t$this->lib->init();\n\t\t\n\t\t/* Loop through the mods */\n\t\t$report = trim( stripslashes( $this->ipsclass->input['message'] ) );\n\t\t$st = $this->ipsclass->input['st'];\n\t\tforeach( $mods as $data )\n\t\t{\n\t\t\t$message = $this->ipsclass->lang['report_comment_email'];\n\n\t\t\t$message = str_replace( '<#MODNAME#>' , $data['name'] , $message );\n\t\t\t$message = str_replace( '<#SENDERNAME#>', $this->ipsclass->member['name'], $message );\t\t\n\t\t\t$message = str_replace( '<#LINK#>' , \"<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}\".\"?automodule=gallery&cmd=si&img={$comment['img_id']}&st={$st}#{$comment['pid']}'>{$this->ipsclass->lang['link_to_comment']}</a>\", $message );\t\t\t\n\t\t\t$message = str_replace( '<#REPORT#>' , $report , $message );\n\t\t\t\n\t\t\t$subject = $this->ipsclass->lang['report_img_page'].' '.$this->ipsclass->vars['board_name'];\n\t\t\t\t\t\t\n\t\t\tif( $this->ipsclass->var['gallery_send_report'] == 'email' )\n\t\t\t{\n\t\t\t\t$this->email->to = $data['email'];\n\t\t\t\t$this->email->from\t\t= $this->ipsclass->member['email'];\n\t\t\t\t$this->email->subject\t= $subject;\n\t\t\t\t$this->email->message\t= $message;\n\t\t\t\t$this->email->send_mail();\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->lib->to_by_id = $data['id'];\n \t\t\t\t$this->lib->from_member = $this->ipsclass->member;\n \t\t\t\t$this->lib->msg_title = $this->ipsclass->lang['report_comment_page'];\n \t\t\t\t$this->lib->msg_post = $message;\n\t\t\t\t$this->lib->force_pm = 1;\n\t\t\t\t\n\t\t\t\t$this->lib->send_pm();\n\t\t\t\t\n\t\t\t\tif ( $this->lib->error )\n\t\t\t\t{\n\t\t\t\t\tprint $this->error;\n\t\t\t\t\texit();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['report_redirect_comment'], \"automodule=gallery&amp;cmd=si&amp;img={$comment['img_id']}\" );\t\t\n\t}", "function csm_comment_form() {\r\n cs_print_smilies();\r\n}", "public function GaweCommentPosEr ()\n {\n $cal = new GaweCommentPosEr();\n //send the webclass\n $webClass = __CLASS__;\n\n //run the crud utility\n Crud::run($cal, $webClass);\n\n //pr($mps);\n //mode=ws\n }", "function comment_ID()\n{\n}", "function wct_talks_the_comment_number() {\n\techo wct_talks_get_comment_number();\n}", "function get_comment_ID()\n{\n}", "function display_comment_on_photo($xmlrequest, $pagenumber, $limit) {\r\n $userId = mysql_real_escape_string($xmlrequest['DisplayCommentOnPhoto']['userId']);\r\n $photoId = mysql_real_escape_string($xmlrequest['DisplayCommentOnPhoto']['photoId']);\r\n $commentsinfo = array();\r\n $lowerLimit = isset($pagenumber) ? ($pagenumber - 1) * $limit : 0;\r\n $query = \"SELECT SQL_CALC_FOUND_ROWS photo_comments.id, photo_comments.mem_id, photo_comments.comment, photo_comments.date,photo_comments.post_via FROM photo_comments WHERE photo_comments.photo_id='$photoId' AND (parent_id=0||parent_id=NULL) ORDER BY photo_comments.date DESC LIMIT $lowerLimit,$limit\"; // LIMIT $lowerlimit,$limit\r\n\r\n if (DEBUG)\r\n writelog(\"profile.class.php :: display_comment_on_photo() :: query:\", $query, false);\r\n\r\n $commentsinfo['Comment'] = execute_query($query, true, \"select\");\r\n $count = isset($commentsinfo['Comment']['count']) ? $commentsinfo['Comment']['count'] : 0;\r\n\r\n if (DEBUG)\r\n writelog(\"profile.class.php :: display_comment_on_photo() :: query:\", \"Total Records: \", false, $count);\r\n\r\n for ($i = 0; $i < $count; $i++) {\r\n\r\n $id = isset($commentsinfo['Comment'][$i]['mem_id']) && ($commentsinfo['Comment'][$i]['mem_id']) ? $commentsinfo['Comment'][$i]['mem_id'] : NULL;\r\n $postId = isset($commentsinfo['Comment'][$i]['id']) && ($commentsinfo['Comment'][$i]['id']) ? $commentsinfo['Comment'][$i]['id'] : NULL;\r\n if ($postId)\r\n $commentsinfo['Comment'][$i]['total_comment'] = $this->get_total_comment_count_photo($postId);\r\n if ($id) {\r\n $query_userinfo = \"SELECT members.is_facebook_user,members.profilenam,members.privacy,members.photo_b_thumb,members.gender,members.profile_type FROM members WHERE members.mem_id='$id'\";\r\n $commentsinfo['Comment'][$i]['User'] = execute_query($query_userinfo, false);\r\n }\r\n }\r\n $total_comment_records = execute_query(\"SELECT photo_comments.id, photo_comments.mem_id, photo_comments.comment, photo_comments.date,photo_comments.post_via FROM photo_comments WHERE photo_comments.photo_id='$photoId' AND (parent_id=0||parent_id=NULL) ORDER BY photo_comments.date\", true, \"select\"); // LIMIT $lowerlimit,$limit\r\n $commentsinfo['Comment']['totalrecords'] = (isset($total_comment_records['count'])) ? $total_comment_records['count'] : 0;\r\n if (DEBUG)\r\n writelog(\"Profile:display_comment_on_photo\", $commentsinfo, true);\r\n return $commentsinfo;\r\n }", "function printHTML() \n {\n?>\n <center>\n <table border=1 cellspacing=0 cellpadding=2>\n\n <tr>\n <th>Channel</th>\n <th>Delays</th>\n <th>SNRs</th>\n </tr>\n<?\n for ($ichan=0; $ichan<$this->nchan; $ichan++)\n {\n $id = sprintf(\"CH%02d\", $ichan);\n echo \"<tr id='ch_\".$id.\"' style='display: none;'>\\n\";\n echo \"<td>\".$id.\"</td>\\n\";\n foreach ($this->types as $type)\n {\n echo \"<td>\";\n echo \"<a href='' id='cp_\".$type.\"_\".$id.\"_link'>\";\n echo \"<img id='cp_\".$type.\"_\".$id.\"' src='' width='200px' height='150px'>\";\n echo \"</a>\";\n echo \"</td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n?>\n </table>\n </center>\n<?\n }", "function beans_comment_avatar() {\n\n\tglobal $comment;\n\n\t// Stop here if no avatar.\n\tif ( !$avatar = get_avatar( $comment, $comment->args['avatar_size'] ) )\n\t\treturn;\n\n\techo beans_open_markup( 'beans_comment_avatar', 'div', array( 'class' => 'uk-comment-avatar' ) );\n\n\t\techo $avatar;\n\n\techo beans_close_markup( 'beans_comment_avatar', 'div' );\n\n}", "function show_foto($rhid, $original, $html_classes, &$msg) {\n\n global $directory, $base_url, $link;\n $db = $link;\n $msg = '';\n $cnt = 0;\n $foto = '';\n $result = '';\n \n # Obtem directoria das fotos dos colaboradores\n $dir_fotos = ASSETS_URL.\"/img/\";\n $physical_dir_fotos = ROOT_PATH.\"/public/assets/img/\";\n \n if ($msg != '') {\n echo $msg;\n } else {\n/* \n $query = \"SELECT foto FROM web_rh_identificacoes WHERE rhid = :RHID_ AND foto != '' \";\n try {\n $stmt = $db->prepare($query);\n $stmt->bindParam(':RHID_', $rhid);\n $stmt->execute();\n $cnt = $stmt->rowCount();\n } catch (Exception $ex) {\n $msg = \"show_foto#1 :\" . $ex->getMessage();\n }\n if ($msg == '') {\n try {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $foto = $row['foto'];\n }\n } catch (Exception $ex) {\n $msg = \"show_foto#2 :\" . $ex->getMessage();\n }\n }\n*/ \n$foto = '';\n\n if ($msg == '') {\n if ($foto == '') {\n $foto = 'noimage.jpg';\n }\n \n # url da foto a mostrar\n $t_foto = $dir_fotos . $foto; \n\n # obtem carateristicas da foto\n if ($original == 'S') {\n list($width, $height, $type, $attr) = getimagesize($physical_dir_fotos.'/'.$foto);\n $result = \"<img src='\" . $t_foto . \"?=\" . rand(100000,999999) . \"' width='$width' height='\" . $height . \"' class='\" .$html_classes. \"'/>\";\n } else {\n $result = \"<img src='\" . $t_foto . \"?=\" . rand(100000,999999) . \"' class='\" .$html_classes. \"'/>\";\n }\n /* if ($foto != '') {\n\n if ($t_w) {\n $t_foto = $dir_th . 't_w' . $t_w . '_' . $foto;\n } else {\n $t_foto = $dir_th . 't_h' . $t_h . '_' . $foto;\n }\n\n if (!file_exists($t_foto)) {\n\n //the new width of the resized image, in pixels.\n $extlimit = \"yes\"; //Limit allowed extensions? (no for all extensions allowed)\n //List of allowed extensions if extlimit = yes\n $limitedext = array(\".gif\", \".jpg\", \".png\", \".jpeg\", \".bmp\");\n\n list($width, $height, $type, $attr) = getimagesize($dir_fotos . $foto);\n $file_type = $type;\n $file_name = $foto;\n\n //check the file's extension\n $ext = strrchr($file_name, '.');\n $ext = strtolower($ext);\n\n $getExt = explode('.', $file_name);\n $file_ext = $getExt[count($getExt) - 1];\n\n /////////////////////////////////\n // CREATE THE THUMBNAIL //\n ////////////////////////////////\n //keep image type\n if ($width) {\n\n ini_set('memory_limit', '-1');\n\n #1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(orden de bytes intel), 8 = TIFF(orden de bytes motorola), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF, 15 = WBMP, 16 = XBM.\n if ($file_type == \"2\" || $file_type == \"10\")\n $new_img = imagecreatefromjpeg($dir_fotos . $foto);\n elseif ($file_type == \"3\" || $file_type == \"3\")\n $new_img = imagecreatefrompng($dir_fotos . $foto);\n elseif ($file_type == \"1\")\n $new_img = imagecreatefromgif($dir_fotos . $foto);\n\n //calculate the image ratio\n $imgratio = $width / $height;\n if ($t_w) {\n $newwidth = $t_w;\n $newheight = $t_w / $imgratio;\n\n if ($newheight > 60) {\n $newheight = 60;\n $newwidth = 60 * $imgratio;\n }\n } else {\n $newheight = $t_h;\n $newwidth = $t_h * $imgratio;\n }\n\n //function for resize image.\n if (function_exists(imagecreatetruecolor)) {\n $resized_img = imagecreatetruecolor($newwidth, $newheight);\n\n //the resizing is going on here!\n imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n\n //finally, save the image\n ImageJpeg($resized_img, $t_foto);\n ImageDestroy($resized_img);\n ImageDestroy($new_img);\n\n if ($t_w != '' && $t_h != '') {\n $result = \"<img src='\" . $t_foto . \"' width='$t_w' height='\" . $t_h . \"' class='\" .$html_classes. \"'/>\";\n } else {\n $result = \"<img src='\" . $t_foto . \"' width='$newwidth' height='\" . $newheight . \"' class='\" .$html_classes. \"'/>\";\n }\n } else {\n $result = \"PHP package [gd] is not installed.\";\n }\n }\n } else {\n\n list($width, $height, $type, $attr) = getimagesize($t_foto);\n\n if ($t_w != '' && $t_h != '') {\n $result = \"<img src='\" . $t_foto . \"?=\" . filemtime($t_foto) . \"' width='\" . $t_w . \"' height='\" . $t_h . \"' class='\" .$html_classes. \"'/>\";\n } else {\n $result = \"<img src='\" . $t_foto . \"?=\" . filemtime($t_foto) . \"' width='$width' height='\" . $height . \"' class='\" .$html_classes. \"'/>\";\n }\n }\n } # END foto != '' */ \n }\n } //Photos directory\n \n return $result;\n }", "function showComments($idComment, $idTopic, $offset, $limit) {\n echo '<ul id=\"list-comments\">';\n $comments = CommentManager::getCommentsByFatherCommentId($idComment, $idTopic, $offset, $limit);\n foreach ($comments as $comment) {\n echo '<li><article class=\"comment\">';\n echo '<header class=\"comment-header\">';\n echo $comment->getSubject();\n //echo '<p style=\"display: inline;float:right\">';\n echo $comment->getName() . ' | id: '.$comment->getId().' | ' . $comment->getDateTime() . ' | Positivos: ' . $comment->getLike() . ' | Negativos: ' . $comment->getUnlike();\n echo '</p>';\n echo '</header>';\n echo '<p class=\"article-text\"><img align=\"left\" src=\"' . $comment->getImg() . '\"/>';\n echo $comment->getComment() . '</p>';\n echo '<footer class=\"article-footer\"><input name=\"repply\" id=\"'.$comment->getId().'\" type=\"button\" value=\"repply\"/></footer></article></li>';\n $idComment = $comment->getId();\n showComments($idComment, null, null, null);\n }\n echo '</ul>';\n}", "public function actionPrintinf($id) {\n $laboratorio = Laboratorio::find()->where(['id' => 1])->one();\n\t\t$model = $this->findModel ( $id );\n\t\tif ($model) {\n\t\t\t$modelp = $model->protocolo;\n\t\t}\n\t\t\n\t\t$pdf = new Pdf ( [\n\t\t\t\t// 'mode' => Pdf::MODE_CORE,\n\t\t\t\t'mode' => Pdf::MODE_BLANK,\n\t\t\t\t// A4 paper format\n\t\t\t\t'format' => Pdf::FORMAT_A4,\n\t\t\t\t// portrait orientation\n\t\t\t\t'orientation' => Pdf::ORIENT_PORTRAIT,\n\t\t\t\t// stream to browser inline\n\t\t\t\t'destination' => Pdf::DEST_BROWSER,\n\t\t\t\t'cssFile' => '@app/web/css/print/informe.css',\n\t\t\t\t// any css to be embedded if required\n\t\t\t\t'cssInline' => '* {font-size:14px;}',\n\t\t\t\t// set mPDF properties on the fly\n\t\t\t\t\n\t\t\t\t'content' => $this->renderPartial ( '_print_inf', [ \n\t\t\t\t\t\t'model' => $model,\n\t\t\t\t\t\t'modelp' => $modelp,\n 'laboratorio' => $laboratorio,\n\t\t\t\t] ),\n\t\t\t\t'options' => [ \n\t\t\t\t\t\t'title' => 'Informe Inmunohistoquímico' \n\t\t\t\t],\n\t\t\t\t'methods' => [ \n\t\t\t\t\t\t'SetHeader' => [ \n\t\t\t\t\t\t\t\t'Sistema LABnet' \n\t\t\t\t\t\t],\n\t\t\t\t\t\t'SetFooter' => [ \n\t\t\t\t\t\t\t\t$laboratorio->direccion.'|web: '.$laboratorio->web.'|Tel.:'.$laboratorio->telefono \n\t\t\t\t\t\t] \n\t\t\t\t] \n\t\t] );\n\t\t\n\t\tYii::$app->response->format = \\yii\\web\\Response::FORMAT_RAW;\n\t\tYii::$app->response->headers->add('Content-Type', 'application/pdf'); \n\t\treturn $pdf->render ();\n\t}", "function get_email_point_comment($n1, $n2, $c1, $idP)\r\n{\t\t\r\n\t$message = '<html>\r\n\t\t\t\t\t<meta name=\"viewport\" content=\"width=320, initial-scale=1, user-scalable=no\">\r\n <head> \r\n <link media=\"only screen and (min-device-width: 481px)\" href=\"http://www.pulzos.com/statics/css/ext/emails/iOSDevice.css\" type= \"text/css\" rel=\"stylesheet\">\t\t\t\t\t\r\n </head>\r\n\t\t\t\t\t<body>\r\n\t\t\t\t\t\t<div style=\"width: 765px; height: 80px\" id=\"cabeza_desktop\">\r\n\t\t\t\t\t\t\t<img src=\"http://www.pulzos.com/statics/img/mailPulzosCabecera.jpg\" alt=\"Pulzos Rewards Network\" />\r\n </div>\r\n <div id=\"cabeza_movil\" align=\"left\">\r\n </div>\r\n <style type=\"text/css\">\r\n @media screen and (max-device-width: 481px) {#cabeza_movil\r\n {\r\n background-image: url(\"http://www.pulzos.com/statics/img/mailPulzosCabeceraMovil.jpg\");\r\n background-repeat: no-repeat;\r\n width: 320px;\r\n height: 100px;\r\n margin:auto;\r\n }\r\n\r\n #cabeza_desktop\r\n { \r\n display:none;\r\n }}\r\n </style>\r\n\t\t\t\t\t\t<div style=\"width: 765px\" id=\"cuerpo_desktop\">\r\n\t\t\t\t\t\t\tHola <strong>' . $n1 . '</strong>,<br /><br />\r\n\t\t\t\t\t\t\t' . $n2 . ' se ha apuntado a tu comentario:<br /><br />\r\n\t\t\t\t\t\t\t<center>\r\n\t\t\t\t\t\t\t\t“<a href=\"http://www.pulzos.com/inicio.php/comentados/index/'.$idP.'\" style=\"text-decoration: none; color: #511E59\"><p>\" '.$c1.'\"</p></a>”\r\n\t\t\t\t\t\t\t</center><br /><br />\r\n\t\t\t\t\t\t\tSaludos Cordiales,<br /><br />\r\n\t\t\t\t\t\t\t<strong>Equipo Pulzos Rewards Network.</strong>\r\n </div>\r\n <style type=\"text/css\">\r\n @media screen and (max-device-width: 481px) {#cuerpo_desktop { width: 320px; }}\r\n </style>\r\n <div id=\"pie_movil\">\r\n </div>\r\n\t\t\t\t\t\t<div style=\"height: 80px; width: 765px\" id=\"pie_desktop\">\r\n\t\t\t\t\t\t\t<img src=\"http://www.pulzos.com/statics/img/mailPulzosPie.jpg\" alt=\"\" />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</body>\r\n\t\t\t\t</html>';\r\n return $message;\r\n}", "function cogito_action_comment_top() \t\t{ do_action( 'cogito_action_comment_top' );}", "function components_position_blank($com_id) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<img src='{$this->ipsclass->skin_acp_url}/images/blank.gif' width='12' height='12' border='0' style='vertical-align:middle' />\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function output($pgen,$brotherid) {\n\tglobal $qqi,$qq;\n\t$linktext=isset($this->link) ? \" onclick=\\\"window.location='{$qqi->hrefPrep($this->link)}';\\\" style=\\\"cursor:pointer\\\"\" : '';\n\techo \"<img{$qqi->idcstr($this->longname)} src=\\\"{$qqi->hrefPrep('m/img/cleardot.gif',False)}\\\" height=\\\"{$this->height}\\\" width=\\\"{$this->width}\\\"$linktext>\";\t\n}", "function comments_popup_link($zero = \\false, $one = \\false, $more = \\false, $css_class = '', $none = \\false)\n{\n}", "function wct_talks_the_talk_comment_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {\n\techo wct_talks_get_talk_comment_link( $zero, $one, $more, $css_class, $none );\n}", "public function _showThumbnail() {\r\n\treturn \"showThumbnail.php?file=\".$this->_file;\r\n\t//$this->_imageInfo[\"h\"][\"Thumbnail\"]\r\n }", "function NewPage($id,$filenamestr){\r\r\n \r\r\n $output1 = trim(str_replace(chr(34),\"\",str_replace(chr(39),\"\",str_replace(chr(92),\"\",$filenamestr))));\r\r\n $FileStr=strtolower(str_replace(\" \",\"-\",$output1)).\".php\";\r\r\n $filename=strtolower(\"../\".$FileStr);\r\r\n\r\r\n #Content of the file\r\r\n $filecontent='<?php '.\r\r\n '$'.\"pgid=$id;\r\r\n \".\"include_once('./cmseditorpages.php');\r\r\n \".'?>';\r\r\n $filehendler=fopen(\"$filename\",wb);\r\r\n fwrite($filehendler,$filecontent);\r\r\n fclose($filehendler); #Close the file\r\r\n return $FileStr;\r\r\n }", "public function actionPrintcito($id) {\n $laboratorio = Laboratorio::find()->where(['id' => 1])->one();\n\t\t$model = $this->findModel ( $id );\n\t\tif ($model) {\n\t\t\t$modelp = $model->protocolo;\n\t\t}\n\t\t\n\t\t$pdf = new Pdf ( [\n\t\t\t\t// 'mode' => Pdf::MODE_CORE,\n\t\t\t\t'mode' => Pdf::MODE_BLANK,\n\t\t\t\t// A4 paper format\n\t\t\t\t'format' => Pdf::FORMAT_A4,\n\t\t\t\t// portrait orientation\n\t\t\t\t'orientation' => Pdf::ORIENT_PORTRAIT,\n\t\t\t\t// stream to browser inline\n\t\t\t\t'destination' => Pdf::DEST_BROWSER,\n\t\t\t\t'cssFile' => '@app/web/css/print/informe.css',\n\t\t\t\t// any css to be embedded if required\n\t\t\t\t'cssInline' => '* {font-size:14px;}',\n\t\t\t\t// set mPDF properties on the fly\n\t\t\t\t\n\t\t\t\t'content' => $this->renderPartial ( '_print_inf_cito', [ \n\t\t\t\t\t\t'model' => $model,\n\t\t\t\t\t\t'modelp' => $modelp,\n 'laboratorio' => $laboratorio,\n\t\t\t\t] ),\n\t\t\t\t'options' => [ \n\t\t\t\t\t\t'title' => 'Estudio de Citología Especial' \n\t\t\t\t],\n\t\t\t\t'methods' => [ \n\t\t\t\t//\t\t'SetHeader' => [ \n\t\t\t\t//\t\t\t\t'Sistema LABnet' \n\t\t\t\t//\t\t],\n\t\t\t\t\t\t'SetFooter' => [ \n\t\t\t\t\t\t\t\t$laboratorio->direccion.'|web: '.$laboratorio->web.'|Tel.:'.$laboratorio->telefono \n\t\t\t\t\t\t] \n\t\t\t\t] \n\t\t] );\n\t\t\n\t\tYii::$app->response->format = \\yii\\web\\Response::FORMAT_RAW;\n\t\tYii::$app->response->headers->add('Content-Type', 'application/pdf'); \n\t\treturn $pdf->render ();\n\t}", "function CMT_getComment( &$comments, $mode, $type, $order, $delete_option = false, $preview = false, $ccode = 0 )\n{\n global $_CONF, $_TABLES, $_USER, $LANG01, $LANG03, $MESSAGE, $_IMAGE_TYPE;\n\n $indent = 0; // begin with 0 indent\n $retval = ''; // initialize return value\n\n $template = new Template( $_CONF['path_layout'] . 'comment' );\n $template->set_file( array( 'comment' => 'comment.thtml',\n 'thread' => 'thread.thtml' ));\n\n // generic template variables\n $template->set_var( 'xhtml', XHTML );\n $template->set_var( 'site_url', $_CONF['site_url'] );\n $template->set_var( 'site_admin_url', $_CONF['site_admin_url'] );\n $template->set_var( 'layout_url', $_CONF['layout_url'] );\n $template->set_var( 'lang_authoredby', $LANG01[42] );\n $template->set_var( 'lang_on', $LANG01[36] );\n $template->set_var( 'lang_permlink', $LANG01[120] );\n $template->set_var( 'order', $order );\n\n if( $ccode == 0 ) {\n $template->set_var( 'lang_replytothis', $LANG01[43] );\n $template->set_var( 'lang_reply', $LANG01[25] );\n } else {\n $template->set_var( 'lang_replytothis', '' );\n $template->set_var( 'lang_reply', '' );\n }\n\n // Make sure we have a default value for comment indentation\n if (!isset($_CONF['comment_indent'])) {\n $_CONF['comment_indent'] = 25;\n }\n\n if ($preview) {\n $A = $comments;\n if (empty( $A['nice_date'])) {\n $A['nice_date'] = time();\n }\n if (!isset($A['cid'])) {\n $A['cid'] = 0;\n }\n if (!isset($A['photo'])) {\n if (isset($_USER['photo'])) {\n $A['photo'] = $_USER['photo'];\n } else {\n $A['photo'] = '';\n }\n }\n if (! isset($A['email'])) {\n if (isset($_USER['email'])) {\n $A['email'] = $_USER['email'];\n } else {\n $A['email'] = '';\n }\n }\n $mode = 'flat';\n } else {\n $A = DB_fetchArray( $comments );\n }\n\n if (empty($A)) {\n return '';\n }\n\n $token = '';\n if ($delete_option && !$preview) {\n $token = SEC_createToken();\n }\n\n // check for comment edit\n\n $row = 1;\n do {\n // check for comment edit\n $commentedit = DB_query(\"SELECT cid,uid,UNIX_TIMESTAMP(time) AS time FROM {$_TABLES['commentedits']} WHERE cid = {$A['cid']}\");\n $B = DB_fetchArray($commentedit);\n if ($B) { //comment edit present\n // get correct editor name\n if ($A['uid'] == $B['uid']) {\n $editname = $A['username'];\n } else {\n $editname = DB_getItem($_TABLES['users'], 'username',\n \"uid={$B['uid']}\");\n }\n // add edit info to text\n $A['comment'] .= '<div class=\"comment-edit\">' . $LANG03[30] . ' '\n . strftime($_CONF['date'], $B['time']) . ' '\n . $LANG03[31] . ' ' . $editname\n . '</div><!-- /COMMENTEDIT -->';\n }\n\n // determines indentation for current comment\n if ($mode == 'threaded' || $mode == 'nested') {\n $indent = ($A['indent'] - $A['pindent']) * $_CONF['comment_indent'];\n }\n\n // comment variables\n $template->set_var('indent', $indent);\n $template->set_var('author_name', strip_tags($A['username']));\n $template->set_var('author_id', $A['uid']);\n $template->set_var('cid', $A['cid']);\n $template->set_var('cssid', $row % 2);\n\n if ($A['uid'] > 1) {\n $fullname = '';\n if (! empty($A['fullname'])) {\n $fullname = $A['fullname'];\n }\n $fullname = COM_getDisplayName($A['uid'], $A['username'],\n $fullname);\n $template->set_var('author_fullname', $fullname);\n $template->set_var('author', $fullname);\n $alttext = $fullname;\n\n $photo = '';\n if ($_CONF['allow_user_photo']) {\n if (isset ($A['photo']) && empty($A['photo'])) {\n $A['photo'] = '(none)';\n }\n $photo = USER_getPhoto($A['uid'], $A['photo'], $A['email']);\n }\n if( !empty( $photo )) {\n $template->set_var( 'author_photo', $photo );\n $camera_icon = '<img src=\"' . $_CONF['layout_url']\n . '/images/smallcamera.' . $_IMAGE_TYPE . '\" alt=\"\"' . XHTML . '>';\n $template->set_var( 'camera_icon',\n COM_createLink(\n $camera_icon,\n $_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . $A['uid']\n )\n );\n } else {\n $template->set_var( 'author_photo', '' );\n $template->set_var( 'camera_icon', '' );\n }\n\n $template->set_var( 'start_author_anchortag', '<a href=\"'\n . $_CONF['site_url'] . '/users.php?mode=profile&amp;uid='\n . $A['uid'] . '\">' );\n $template->set_var( 'end_author_anchortag', '</a>' );\n $template->set_var( 'author_link',\n COM_createLink(\n $fullname,\n $_CONF['site_url'] . '/users.php?mode=profile&amp;uid=' . $A['uid']\n )\n );\n\n } else {\n //comment is from anonymous user\n if (isset($A['name'])) {\n $A['username'] = strip_tags($A['name']);\n }\n $template->set_var( 'author', $A['username'] );\n $template->set_var( 'author_fullname', $A['username'] );\n $template->set_var( 'author_link', $A['username'] );\n $template->set_var( 'author_photo', '' );\n $template->set_var( 'camera_icon', '' );\n $template->set_var( 'start_author_anchortag', '' );\n $template->set_var( 'end_author_anchortag', '' );\n }\n\n // hide reply link from anonymous users if they can't post replies\n $hidefromanon = false;\n if( empty( $_USER['username'] ) && (( $_CONF['loginrequired'] == 1 )\n || ( $_CONF['commentsloginrequired'] == 1 ))) {\n $hidefromanon = true;\n }\n\n // this will hide HTML that should not be viewed in preview mode\n if( $preview || $hidefromanon ) {\n $template->set_var( 'hide_if_preview', 'style=\"display:none\"' );\n } else {\n $template->set_var( 'hide_if_preview', '' );\n }\n\n // for threaded mode, add a link to comment parent\n if( $mode == 'threaded' && $A['pid'] != 0 && $indent == 0 ) {\n $result = DB_query( \"SELECT title,pid FROM {$_TABLES['comments']} WHERE cid = '{$A['pid']}'\" );\n $P = DB_fetchArray( $result );\n if( $P['pid'] != 0 ) {\n $plink = $_CONF['site_url'] . '/comment.php?mode=display&amp;sid='\n . $A['sid'] . '&amp;title=' . urlencode( htmlspecialchars( $P['title'] ))\n . '&amp;type=' . $type . '&amp;order=' . $order . '&amp;pid='\n . $P['pid'] . '&amp;format=threaded';\n } else {\n $plink = $_CONF['site_url'] . '/comment.php?mode=view&amp;sid='\n . $A['sid'] . '&amp;title=' . urlencode( htmlspecialchars( $P['title'] ))\n . '&amp;type=' . $type . '&amp;order=' . $order . '&amp;cid='\n . $A['pid'] . '&amp;format=threaded';\n }\n $parent_link = COM_createLink($LANG01[44], $plink) . ' | ';\n $template->set_var('parent_link', $parent_link);\n } else {\n $template->set_var('parent_link', '');\n }\n\n $template->set_var( 'date', strftime( $_CONF['date'], $A['nice_date'] ));\n $template->set_var( 'sid', $A['sid'] );\n $template->set_var( 'type', $A['type'] );\n\n // COMMENT edit rights\n $edit_option = false;\n if (isset($A['uid']) && isset($_USER['uid'])\n && ($_USER['uid'] == $A['uid']) && ($_CONF['comment_edit'] == 1)\n && ((time() - $A['nice_date']) < $_CONF['comment_edittime'])\n && (DB_getItem($_TABLES['comments'], 'COUNT(*)',\n \"pid = {$A['cid']}\") == 0)) {\n $edit_option = true;\n if (empty($token)) {\n $token = SEC_createToken();\n }\n } elseif (SEC_hasRights('comment.moderate')) { \n $edit_option = true;\n }\n \n // edit link\n $edit = '';\n if ($edit_option) {\n $editlink = $_CONF['site_url'] . '/comment.php?mode=edit&amp;cid='\n . $A['cid'] . '&amp;sid=' . $A['sid'] . '&amp;type=' . $type;\n $edit = COM_createLink($LANG01[4], $editlink) . ' | ';\n }\n\n // unsubscribe link\n $unsubscribe = '';\n if (($_CONF['allow_reply_notifications'] == 1) && !COM_isAnonUser()\n && isset($A['uid']) && isset($_USER['uid'])\n && ($_USER['uid'] == $A['uid'])) {\n $hash = DB_getItem($_TABLES['commentnotifications'], 'deletehash',\n \"cid = {$A['cid']} AND uid = {$_USER['uid']}\");\n if (! empty($hash)) {\n $unsublink = $_CONF['site_url']\n . '/comment.php?mode=unsubscribe&amp;key=' . $hash;\n $unsubattr = array('title' => $LANG03[43]);\n $unsubscribe = COM_createLink($LANG03[42], $unsublink,\n $unsubattr) . ' | ';\n }\n }\n\n // if deletion is allowed, displays delete link\n if ($delete_option) {\n $deloption = '';\n\n // always place edit option first, if available\n if (! empty($edit)) {\n $deloption .= $edit;\n }\n\n // actual delete option\n $dellink = $_CONF['site_url'] . '/comment.php?mode=delete&amp;cid='\n . $A['cid'] . '&amp;sid=' . $A['sid'] . '&amp;type=' . $type\n . '&amp;' . CSRF_TOKEN . '=' . $token;\n $delattr = array('onclick' => \"return confirm('{$MESSAGE[76]}');\");\n $deloption .= COM_createLink($LANG01[28], $dellink, $delattr) . ' | ';\n\n if (!empty($A['ipaddress'])) {\n if (empty($_CONF['ip_lookup'])) {\n $deloption .= $A['ipaddress'] . ' | ';\n } else {\n $iplookup = str_replace('*', $A['ipaddress'],\n $_CONF['ip_lookup']);\n $deloption .= COM_createLink($A['ipaddress'], $iplookup) . ' | ';\n }\n }\n\n if (! empty($unsubscribe)) {\n $deloption .= $unsubscribe;\n }\n\n $template->set_var('delete_option', $deloption);\n } elseif ($edit_option) {\n $template->set_var('delete_option', $edit . $unsubscribe);\n } elseif (! COM_isAnonUser()) {\n $reportthis = '';\n if ($A['uid'] != $_USER['uid']) {\n $reportthis_link = $_CONF['site_url']\n . '/comment.php?mode=report&amp;cid=' . $A['cid']\n . '&amp;type=' . $type;\n $report_attr = array('title' => $LANG01[110]);\n $reportthis = COM_createLink($LANG01[109], $reportthis_link,\n $report_attr) . ' | ';\n }\n $template->set_var('delete_option', $reportthis . $unsubscribe);\n } else {\n $template->set_var('delete_option', '');\n }\n \n //and finally: format the actual text of the comment, but check only the text, not sig or edit\n $text = str_replace('<!-- COMMENTSIG --><div class=\"comment-sig\">', '',\n $A['comment']);\n $text = str_replace('</div><!-- /COMMENTSIG -->', '', $text);\n $text = str_replace('<div class=\"comment-edit\">', '', $text);\n $text = str_replace('</div><!-- /COMMENTEDIT -->', '', $text);\n if( preg_match( '/<.*>/', $text ) == 0 ) {\n $A['comment'] = nl2br( $A['comment'] );\n }\n\n // highlight search terms if specified\n if( !empty( $_REQUEST['query'] )) {\n $A['comment'] = COM_highlightQuery( $A['comment'],\n $_REQUEST['query'] );\n }\n\n $A['comment'] = str_replace( '$', '&#36;', $A['comment'] );\n $A['comment'] = str_replace( '{', '&#123;', $A['comment'] );\n $A['comment'] = str_replace( '}', '&#125;', $A['comment'] );\n\n // Replace any plugin autolink tags\n $A['comment'] = PLG_replaceTags( $A['comment'] );\n\n // create a reply to link\n $reply_link = '';\n if ($ccode == 0) {\n $reply_link = $_CONF['site_url'] . '/comment.php?sid=' . $A['sid']\n . '&amp;pid=' . $A['cid'] . '&amp;title='\n . urlencode($A['title']) . '&amp;type=' . $A['type'];\n $reply_option = COM_createLink($LANG01[43], $reply_link,\n array('rel' => 'nofollow')) . ' | ';\n $template->set_var('reply_option', $reply_option);\n } else {\n $template->set_var('reply_option', '');\n }\n $template->set_var('reply_link', $reply_link);\n\n // format title for display, must happen after reply_link is created\n $A['title'] = htmlspecialchars( $A['title'] );\n $A['title'] = str_replace( '$', '&#36;', $A['title'] );\n\n $template->set_var( 'title', $A['title'] );\n $template->set_var( 'comments', $A['comment'] );\n\n // parse the templates\n if( ($mode == 'threaded') && $indent > 0 ) {\n $template->set_var( 'pid', $A['pid'] );\n $retval .= $template->parse( 'output', 'thread' );\n } else {\n $template->set_var( 'pid', $A['cid'] );\n $retval .= $template->parse( 'output', 'comment' );\n }\n $row++;\n } while( $A = DB_fetchArray( $comments ));\n\n return $retval;\n}", "function get_instance_comment($cId) {\n $iid = $this->instanceId;\n $query = \"select * from `\".GALAXIA_TABLE_PREFIX.\"instance_comments` where `wf_instance_id`=? and `wf_c_id`=?\";\n $result = $this->query($query,array((int)$iid,(int)$cId));\n $res = $result->fetchRow();\n return $res;\n }", "function comment();", "function hideInformation($id,$information)\n\t\t\t{\n\t\t\t\t$spanbefore = '<span id=\"'.$id.'\" style=\"display: none\">';\n\t\t\t\t$properamoutn = strlen($information)-56;\n\t\t\t\t$information2 = substr($information,0,56). $spanbefore . substr($information,-$properamoutn) .'</span> <a id=\"morelink'.$id.'\" href=\"javascript:showFullComment('.$id.')\" class=\"storylinks\">... MORE &gt;</a>';\n\t\t\t\treturn $information2;\n\t\t\t}", "function biagiotti_mikado_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\t\n\t\tglobal $post;\n\t\t\n\t\t$is_pingback_comment = $comment->comment_type == 'pingback';\n\t\t$is_author_comment = $post->post_author == $comment->user_id;\n\t\t\n\t\t$comment_class = 'mkdf-comment clearfix';\n\t\t\n\t\tif ( $is_author_comment ) {\n\t\t\t$comment_class .= ' mkdf-post-author-comment';\n\t\t}\n\t\t\n\t\tif ( $is_pingback_comment ) {\n\t\t\t$comment_class .= ' mkdf-pingback-comment';\n\t\t}\n\n\t\tif ( ! get_avatar( $comment, 'thumbnail' ) ) {\n $comment_class .= ' mkdf-pingback-comment';\n }\n\t\t?>\n\t\t\n\t\t<li>\n\t\t<div class=\"<?php echo esc_attr( $comment_class ); ?>\">\n\t\t\t<?php if ( ! $is_pingback_comment && get_avatar( $comment, 'thumbnail' ) ) { ?>\n\t\t\t\t<div class=\"mkdf-comment-image\"> <?php echo biagiotti_mikado_kses_img( get_avatar( $comment, 'thumbnail' ) ); ?> </div>\n\t\t\t<?php } ?>\n\t\t\t<div class=\"mkdf-comment-text\">\n\t\t\t\t<div class=\"mkdf-comment-date\"><?php comment_time( get_option( 'date_format' ) ); ?></div>\n\t\t\t\t<div class=\"mkdf-comment-info\">\n\t\t\t\t\t<h4 class=\"mkdf-comment-name vcard\">\n\t\t\t\t\t\t<?php if ( $is_pingback_comment ) {\n\t\t\t\t\t\t\tesc_html_e( 'Pingback:', 'biagiotti' );\n\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t<?php echo wp_kses_post( get_comment_author_link() ); ?>\n\t\t\t\t\t</h4>\n\t\t\t\t</div>\n\t\t\t\t<?php if ( ! $is_pingback_comment ) { ?>\n\t\t\t\t\t<div class=\"mkdf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php\n\t\t\t\tcomment_reply_link( array_merge( $args, array(\n\t\t\t\t\t'reply_text' => esc_html__( 'reply', 'biagiotti' ),\n\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t'max_depth' => $args['max_depth']\n\t\t\t\t) ) );\n\t\t\t\tedit_comment_link( esc_html__( 'edit', 'biagiotti' ) );\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php //li tag will be closed by WordPress after looping through child elements ?>\n\t\t<?php\n\t}", "function getsmilies () {\r\n global $lang;\r\n $zeilen = 3; $i = 0;\r\n\t$b = '<script language=\"JavaScript\" type=\"text/javascript\">function moreSmilies () { var x = window.open(\"about:blank\", \"moreSmilies\", \"width=250,height=200,status=no,scrollbars=yes,resizable=yes\"); ';\r\n $a = '';\r\n $erg = db_query('SELECT emo, ent, url FROM `prefix_smilies`');\r\n\twhile ($row = db_fetch_object($erg) ) {\r\n\r\n $b .= 'x.document.write (\"<a href=\\\"javascript:opener.put(\\''.addslashes(addslashes($row->ent)).'\\')\\\">\");';\r\n $b .= 'x.document.write (\"<img style=\\\"border: 0px; padding: 5px;\\\" src=\\\"include/images/smiles/'.$row->url.'\\\" title=\\\"'.$row->emo.'\\\"></a>\");';\r\n\r\n if ($i<12) {\r\n # float einbauen\r\n if($i%$zeilen == 0 AND $i <> 0) { $a .= '<br /><br />'; }\r\n $a .= '<a href=\"javascript:put(\\''.addslashes($row->ent).'\\')\">';\r\n $a .= '<img style=\"margin: 2px;\" src=\"include/images/smiles/'.$row->url.'\" border=\"0\" title=\"'.$row->emo.'\"></a>';\r\n }\r\n $i++;\r\n\t}\r\n $b .= ' x.document.write(\"<br /><br /><center><a href=\\\"javascript:window.close();\\\">'.$lang['close'].'</a></center>\"); x.document.close(); }</script>';\r\n if ($i>12) { $a .= '<br /><br /><center><a href=\"javascript:moreSmilies();\">'.$lang['more'].'</a></center>'; }\r\n $a = $b.$a;\r\n return ($a);\r\n}", "function info_caja($idcaja)\n{\n global $idcompCajaExp;\n $html = '';\n $Caja = new Caja($idcaja);\n $idcomp = $_REQUEST[\"idbusqueda_componente\"];\n\n if (empty($idcompCajaExp)) {\n $record = BusquedaComponente::findColumn('idbusqueda_componente', ['nombre' => 'caja_expediente']);\n if ($record) {\n $GLOBALS['idcompCajaExp'] = $record[0];\n } else {\n $html = 'NO se encuentra el componente';\n }\n }\n $data = [\n 'idbusqueda_componente' => $idcompCajaExp,\n 'idcaja' => $idcaja\n ];\n $params = http_build_query($data);\n\n $btn='';\n if ($idcompCajaExp) {\n if ($Caja->isResponsable()) {\n $btn .= '<button class=\"btn btn-info mx-1 delCaja\" data-id=\"' . $idcaja . '\" title=\"Mover a la papelera\"><i class=\"fa fa-recycle\"></i></button>';\n }\n $html .= <<<FINHTML\n <div class =\"row mx-0 my-0\">\n <div class=\"col-1\">\n <i class='{$Caja->getIcon()}'></i>\n </div>\n\n <div class =\"col-3 cursor kenlace_saia\" conector = \"iframe\" enlace = \"views/caja/index.php?{$params}\" titulo = \"{$Caja->codigo}\">\n {$Caja->codigo}\n </div>\n\n <div class=\"col-3\">\n {$Caja->getPropietario()}\n </div>\n\n <div class=\"col-2\">\n {$Caja->fecha_creacion}\n </div>\n\n <div class=\"float-right col-3\">\n {$btn}<button class=\"btn btn-info mx-1 infoCaja\" data-id=\"{$idcaja}\" title=\"Información de la caja\"><i class=\"fa fa-info-circle\"></i></button>\n </div>\n </div> \nFINHTML;\n }\n return $html;\n}", "function display() {\n $chapterMngr = new ChapterManager();\n $commentMngr = new CommentManager();\n $id = 1;\n\n if (isset($_GET['id'])) {\n $id = abs((int) $_GET['id']);\n }\n $chapter = $chapterMngr->get($id);\n \n if (!empty($chapter)) {\n if ($chapter->published()) {\n $paginationLinkBase = './?chapter&id=' . $id . '&';\n $paginationLinkOption = '#commentsListSection';\n $pageGETparameter = 'p';\n\n $offset = 0;\n $commentsPerPage = 10;\n $currentPageIx = 0;\n $pagesCount = ceil($commentMngr->getCommentsCount($id) / $commentsPerPage);\n\n if (isset($_GET['p'])) {\n $currentPageIx = abs((int) $_GET['p']);\n if ($currentPageIx >= $pagesCount) { $currentPageIx = $pagesCount - 1; }\n $offset = $currentPageIx * $commentsPerPage;\n }\n\n $comments = $commentMngr->getList($offset, $commentsPerPage, $id);\n\n $GLOBALS['pageTitle'] = \"Chapitre \" . $chapter->number() . \" : \" . $chapter->title();\n array_push($GLOBALS['pageStylesheets'], 'chapter', 'pagination');\n require('./view/chapter.php');\n }\n } else {\n echo \"Le chapitre que vous avez demandé n'existe pas.\";\n }\n }", "function print_item_photo_new($url = 'javascript:void(0)', $mode = '', $projectid = 0, $borderwidth = '0', $bordercolor = '#ffffff')\n{\n global $ilance, $myapi, $ilconfig, $ilpage, $phrase;\n \n $html = '';\n \n // query database for product image for preview\n $ufile = $ilance->db->query(\"\n SELECT attachid, filename, filehash, attachtype\n FROM \" . DB_PREFIX . \"attachment\n WHERE project_id = '\" . intval($projectid) . \"'\n AND (attachtype = 'itemphoto' OR attachtype = 'slideshow')\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($ufile) > 0)\n {\n $pictures = 0;\n while ($rfile = $ilance->db->fetch_array($ufile))\n {\n if ($rfile['attachtype'] == 'itemphoto')\n {\n switch ($mode)\n {\n case 'thumb':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"../' . $ilpage['attachment'] . '?cmd=thumb&amp;subcmd=results&amp;id=' . $rfile['filehash'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n\t\t\t\t\t\t\n ($apihook = $ilance->api('foto_thumb')) ? eval($apihook) : false;\n\t\t\t\t\t\t\n break;\n }\n\t\t\t\t\t\t\t\t\t\tcase 'thumbgallery':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' . $ilpage['attachment'] . '?cmd=thumb&amp;subcmd=resultsgallery&amp;id=' . $rfile['filehash'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n break;\n }\n\t\t\t\t\t\t\t\t\t\tcase 'thumbsnapshot':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' . $ilpage['attachment'] . '?cmd=thumb&amp;subcmd=resultssnapshot&amp;id=' . $rfile['filehash'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n break;\n }\n case 'full':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' . $ilpage['attachment'] . '?id=' . $rfile['filehash'] . '\" alt=\"\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" /></a>';\n break;\n }\n case 'checkup':\n {\n return '1';\n break;\n }\n }\n }\n else if ($rfile['attachtype'] == 'slideshow')\n {\n $pictures++;\n }\n }\n \n if ($mode == 'thumb' AND $pictures > 0)\n {\n $html1 = '\n <div class=\"gallery-thumbs-cell\">\t\t\t\n <div class=\"gallery-thumbs-entry\">\n <div class=\"gallery-thumbs-main-entry\">\n <div class=\"gallery-thumbs-wide-wrapper\">\n <div class=\"gallery-thumbs-wide-inner-wrapper\">';\n $html1 .= $html;\n $html1 .= '<div class=\"gallery-thumbs-corner-text\"><span>' . ($pictures + 1) . ' photos</span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ';\n \n $html = $html1;\n }\n }\n else \n {\n $html = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'nophoto.gif\" alt=\"\" border=\"0\" />';\n }\n \n \n return $html;\n}", "private static function icon($id,$title=\"\",$cid=0)\n {\n if($id == 0) return ''; $image = '';\n if($id < 0) $id = $id+4294967296;\n\n if(in_array($id, array('100','200','300','400','500','600')))\n $image = \"inc/images/tsviewer/group_icon_\".$id.\".png\";\n else if(self::$AllowDownloadIcons)\n {\n if(Cache::check_binary('ts_icon_'.$id) && !in_array($id, self::$nf_pic_ids))\n {\n // Sende Download-Anforderung zum TS3 Server\n if(show_teamspeak_debug && show_debug_console)\n DebugConsole::insert_initialize('TS3Renderer::icon()', 'Download Icon: \"icon_'.$id.'\"');\n\n $ftInitDownload = self::ftInitDownload(convert::ToString('/icon_'.$id),$cid);\n if(is_array($ftInitDownload) && array_key_exists('ftkey', $ftInitDownload) && $ftInitDownload['size'])\n {\n if(show_teamspeak_debug && show_debug_console)\n DebugConsole::insert_info('TS3Renderer::icon()', 'Download Icon: \"icon_'.$id.'\" with FTKey: \"'.$ftInitDownload['ftkey'].'\"');\n\n $file_stream=self::ftDownloadFile($ftInitDownload);\n if(!empty($file_stream) && $file_stream != false)\n {\n if(show_teamspeak_debug && show_debug_console)\n DebugConsole::insert_successful('TS3Renderer::icon()', 'Icon: \"icon_'.$id.'\" Downloaded');\n\n Cache::set_binary('ts_icon_'.$id,$file_stream,'', (24*60*60) ); //24h\n $image = 'data:image/png;base64,'.base64_encode($file_stream);\n }\n else\n self::$nf_pic_ids[$id] = true;\n }\n else\n self::$nf_pic_ids[$id] = true;\n }\n else\n $image = 'data:image/png;base64,'.base64_encode(Cache::get_binary('ts_icon_'.$id));\n }\n\n return empty($image) ? '' : '<img src=\"'.$image.'\" alt=\"\" class=\"tsicon\"'.(empty($title) ? '' : ' title=\"'.$title.'\"').' />';\n }", "public function next_comment()\n {\n }", "function informal_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n\n if (get_comment_type() == 'pingback' || get_comment_type() == 'trackback') : ?>\n\n <li class=\"pingback\" id=\"comment-<?php comment_ID(); ?>\">\n\n <article <?php comment_class('clearfix'); ?>>\n\n <header>\n\n <h4><?php _e('Pingback:', THEMEDOMAIN); ?></h4>\n <p><?php edit_comment_link(); ?></p>\n\n </header>\n\n <?php comment_author_link(); ?>\n\n </article>\n\n <?php endif; ?>\n\n <?php if (get_comment_type() == 'comment') : ?>\n <li id=\"comment-<?php comment_ID(); ?>\">\n <article <?php comment_class('clearfix'); ?>>\n <figure class=\"comment-avatar\">\n <?php\n $avatar_size = 80;\n if ($comment->comment_parent != 0) {\n $avatar_size = 48;\n }\n\n echo get_avatar($comment, $avatar_size);\n ?>\n </figure>\n\n <div class=\"comment-wrapper\">\n <div class=\"comment-info\">\n <h4><span><?php _e('AUTOR', THEMEDOMAIN); ?></span> <?php comment_author_link(); ?> <?php //comment_date(); ?> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?></h4>\n <!-- <p></p> -->\n <p><span>Comentario</span></p>\n </div><!-- end comment-info -->\n\n <div class=\"comment-text\">\n\n <?php if ($comment->comment_approved == '0') : ?>\n\n <p class=\"awaiting-moderation text-center\"><?php _e('Tu comentario está esperando ser moderado.', THEMEDOMAIN); ?></p>\n\n <?php endif; ?>\n\n <?php comment_text(); ?>\n\n </div><!-- end comment-text -->\n </div><!-- end comment-wrapper -->\n </article>\n <?php endif;\n}", "function show_comments() {\r\n\tglobal $db_query;\r\n\t$comments = $db_query->get_comment();\r\n\t$comment_ID=\"\";\r\n\t$comment_author = \"\";\r\n\t$comment_author_email = \"\";\r\n\t$comment_author_url = \"\";\r\n\t$comment_date = \"\";\r\n\t\r\n\tfor($i=0; $i<count($comments); $i++)\r\n\t{\r\n\t $comment_ID = $comments[$i]->comment_ID;\r\n\t\t$comment_author = $comments[$i]->comment_author;\r\n\t\t$comment_date = mysql2date('d.m.Y, g:iA', $comments[$i]->comment_date);\r\n\t\t$comment_author_email = $comments[$i]->comment_author_email;\r\n\t\t$comment_author_url = $comments[$i]->comment_author_url;\r\n\t\tif ($comment_author_email != \"\")\r\n\t\t\t$comment_author_email = \"[<a href='mailto:$comment_author_email'>@</a>]\";\r\n\t\tif ($comment_author_url != \"http://\")\r\n\t\t\t$comment_author_url = \"[<a href='$comment_author_url'>H</a>]\";\r\n\t\telse\r\n\t\t\t$comment_author_url = \"\";\r\n\t\techo(\"<div class='blogkcomments'>\");\r\n\t\techo(\"<div class='blogkrow'>\");\r\n\t\techo(\"<a id='\".bin2hex($comment_date).\"' name='\".bin2hex($comment_date).\"'></a>\");\r\n\t\techo($comments[$i]->comment_content);\r\n\t\techo(\"</div><div class='blogkrow'>\");\r\n\t\techo(\"<strong>$comment_author</strong>\");\r\n\t\t// only admin can see comment's email\r\n\t\tif(user_is_auth())\r\n\t\t{\r\n\t\t echo($comment_author_email);\r\n\t\t}\r\n\t\techo(\"$comment_author_url, $comment_date\");\r\n\t\techo(\" <a href='\".comment_permalink().\"#\".bin2hex($comment_date).\"'>link</a>\");\r\n\t\tif(user_is_auth())\r\n\t\t{\r\n\t\t echo(\" <span onclick=\\\"javascript:xajax_saveSpamComment($comment_ID);\\\"><a href=\\\"javascript://\\\">spam?</a></span>\");\r\n\t\t}\r\n\t\techo(\"</div></div>\");\r\n\t}\r\n}", "public function GaweCommentPos ()\n {\n $cal = new GaweCommentPos();\n //send the webclass\n $webClass = __CLASS__;\n\n //run the crud utility\n Crud::run($cal, $webClass);\n\n //pr($mps);\n //mode=ws\n }", "function GetCasaLnk( $Id, $CodLoc, $Name, $sifix )\n {\n global $LocInfo;\n \n $path = \"casa-particular-en-\";\n $Loc = $LocInfo[$CodLoc];\n \n if( isset($Loc) ) \n { $path .= strtolower( str_replace( ' ', '-', $Loc ) ); }\n else\n { $path .= \"cuba\"; }\n \n $Nombre = strtolower( str_replace( ' ', '-', $Name ) ); \n return $path.'/'.$Nombre.'/'.$sifix.$Id;\n }", "abstract protected function processGif();", "function cp_print_beginPage($id,$title,$deepness,$isLogged = false){\r\n $path=\"\";\r\n for($i = 0 ; $i < $deepness ; $i++){\r\n $path.=\"../\";\r\n }\r\n\r\n if($isLogged){\r\n $pseudo = $_SESSION['pseudo'];\r\n $status = $_SESSION['status'];\r\n }else{\r\n $status = -1;\r\n }\r\n \r\n // useful for transition\r\n if($status == 3){\r\n $statusClass = \"all\";\r\n }else if($status == 2 || $status == 1){\r\n $statusClass = \"redacOrAdmin\";\r\n }else{\r\n $statusClass = \"simpleUser\";\r\n } \r\n\r\n echo '<!DOCTYPE html>',\r\n '<html lang=\\'fr\\'>',\r\n '<head>',\r\n '<meta charset=\"utf-8\">',\r\n '<title>La Gazette de L-INFO | ',$title,'</title>',\r\n '<link rel=\"stylesheet\" href=\"',$path,'styles/gazette.css\">',\r\n '</head>',\r\n '<body>',\r\n '<nav>',\r\n '<ul>',\r\n '<li><a href=\"',$path,'index.php\">Accueil</a></li>',\r\n '<li><a href=\"',$path,'php/actus.php\">Toute l\\'actu</a></li>',\r\n '<li><a href=\"',$path,'php/recherche.php\">Recherche</a></li>',\r\n '<li><a href=\"',$path,'php/redaction.php\">La rédac\\'</a></li>';\r\n\r\n if($status == -1){\r\n echo '<li><a href=\"',$path,'php/connexion.php\">Se connecter</a></li>';\r\n }else{\r\n echo '<li><a>',$pseudo,'</a>',\r\n '<ul class=\"'.$statusClass.'\">',\r\n '<li><a href=\"',$path,'php/compte.php\">Mon profil</a></li>',\r\n ($status > 0 && $status != 2) ? \"<li><a href=\\\"$path\".\"php/nouveau.php\\\">Nouvel article</a></li>\":'',\r\n ($status > 1) ? \"<li><a href=\\\"$path\".\"php/administration.php\\\">Administration</a></li>\":'',\r\n '<li><a href=\"',$path,'php/deconnexion.php\">Se deconnecter</a></li>',\r\n '</ul>',\r\n '</li>';\r\n }\r\n \r\n echo '</ul>',\r\n '</nav>',\r\n '<header>',\r\n '<img src=\"',$path,'images/titre.png\" alt=\"Titre : La gazette de l\\'info\">',\r\n '<h1>',$title,'</h1>',\r\n '</header>',\r\n '<main id=\"',$id,'\">'; \r\n\r\n}", "function ceo_latest_comic_jump() {\n\t$chapter = 0; $respond = ''; \n\tif (isset($_GET['latest'])) $chapter = esc_attr($_GET['latest']);\n\tif (isset($_GET['comment'])) $respond = '#respond';\n\tif (!empty($chapter)) {\n\t\tif (!is_numeric($chapter)) { //if the argument after latest is not a number, we assume it is the slugname\n\t\t\t$this_chapter = get_term_by('slug', $chapter, 'chapters'); //added: get chapter by slug\n\t\t} else {\n\t\t\t$this_chapter = get_term_by('term_id', $chapter, 'chapters'); //get chapter by id\n\t\t}\n\t\t$args = array( \n\t\t\t\t'numberposts' => 1, \n\t\t\t\t'post_type' => 'comic', \n\t\t\t\t'orderby' => 'post_date', \n\t\t\t\t'order' => 'DESC', \n\t\t\t\t'post_status' => 'publish', \n\t\t\t\t'chapters' => $this_chapter->slug\n\t\t\t\t);\t\t\t\t\t\n\t\t$qposts = get_posts( $args );\n\t\tif (is_array($qposts)) {\n\t\t\t$qposts = reset($qposts);\n\t\t\twp_redirect( get_permalink( $qposts->ID ).$respond );\n\t\t} else {\n\t\t\twp_redirect( home_url() );\n\t\t}\n\t} else {\n\t\t$args = array( \n\t\t\t\t'numberposts' => 1, \n\t\t\t\t'post_type' => 'comic', \n\t\t\t\t'orderby' => 'post_date', \n\t\t\t\t'order' => 'DESC', \n\t\t\t\t'post_status' => 'publish'\n\t\t\t\t);\n\t\t$qposts = get_posts( $args );\n\t\tif (is_array($qposts)) {\n\t\t\t$qposts = reset($qposts);\n\t\t\twp_redirect( get_permalink( $qposts->ID ).$respond );\n\t\t} else {\n\t\t\twp_redirect( home_url() );\n\t\t}\n\t}\n\twp_reset_query();\n\texit;\n}", "function print_flash_gallery($config = 'recentlyviewed', $userid = 0)\n{\n global $ilance, $phrase, $ilconfig;\n \n return '';\n $uniqueid = rand(1, 9999);\n \n $html = '\n<div id=\"galleryapplet-' . $uniqueid . '\"></div>\n<script type=\"text/javascript\">\n<!--\nvar fo = new FlashObject(\"' . ((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . DIR_FUNCT_NAME . '/' . DIR_SWF_NAME . '/gallery.swf\", \"galleryapplet-' . $uniqueid . '\", \"600\", \"200\", \"8,0,0,0\", \"#ffffff\");\nfo.addParam(\"quality\", \"high\");\nfo.addParam(\"allowScriptAccess\", \"sameDomain\");\nfo.addParam(\"swLiveConnect\", \"true\");\nfo.addParam(\"flashvars\", \"config_file=' . urlencode(((PROTOCOL_REQUEST == 'https') ? HTTPS_SERVER : HTTP_SERVER) . 'ajax.php?do=flashgallery&config=' . $config . '&userid=' . $userid . '&s=' . session_id() . '&token=' . TOKEN) . '\");\nfo.addParam(\"menu\", \"false\");\nfo.write(\"galleryapplet-' . $uniqueid . '\");\n//-->\n</script>';\n \n return $html;\n}", "function print_ciclista($arr) {\n echo<<<END\n<div class=\"info\">\n<span class=\"tit\">Nazionalit&agrave :</span> $arr[Nazionalita] <br /> <span class=\"tit\">Anno di Nascita :</span> $arr[AnnoNascita] <br /> \n<span class=\"tit\">Professionista dal :</span> $arr[TurnProf] <br /> <span class=\"tit\">Anno di Arrivo in Squadra :</span> $arr[Arrivo]\n</div>\n<div class=\"info\">\n<span class=\"tit\">Passaporto Biologico :</span><br /> <span class=\"tit\">RBC =</span> $arr[RBC] <br /> <span class=\"tit\">Hb =</span> \n\t$arr[Hb] <br /><span class=\"tit\">Hct =</span> $arr[Hct]\n</div>\nEND;\n\t$str = build_rec($arr['Via'],$arr['Num'],$arr['Localita'],$arr['Prov']);\n\techo<<<END\n<div class=\"info\">\n<span class=\"tit\">Recapito :</span> $str - <span class=\"tit\">Telefono :</span> $arr[Telefono] \n</div>\nEND;\n}", "public function viewAllCommentsAction() {\r\n $id = $_REQUEST['id'];\r\n //echo \"<script>alert('$id');</script>\";\r\n $obj = new Users();\r\n $all_comments = $obj->viewAllComments($id, $_SESSION['id'], $_REQUEST['type']);\r\n\r\n $totc = '';\r\n //echo 'rakesh';\r\n foreach ($all_comments as $comm) {\r\n\r\n\r\n $totc.= '<div class = \"comment\"><h5>' . $comm['comment_time'] . '</h5>\r\n<div class = \"comment_img\"><img height = \"27\" width = \"27\" src = \" ' . $comm['profile_image'] . '\" />\r\n</div><div class = \"comment_text\"><h4>' . $comm['name'] . '</h4><p>' . $comm['comment'] . '</p></div><div class = \"comments_icons\">\r\n<div id = \"showdislike' . $comm['cmtid'] . CMT_TYPE . '\" class = \"red\" onclick = \"dislikefanwire(\\'' . $comm['cmtid'] . '\\',\\'' . CMT_TYPE . '\\');\">';\r\n if ($comm['dislike'] == '')\r\n $next = '0';\r\n else\r\n $next = $comm['dislike'];\r\n $totc.='(' . $next . ')</div><div id = \"showlike' . $comm['cmtid'] . CMT_TYPE . '\" class = \"blue\" onclick = \"likefanwire(\\'' . $comm['cmtid'] . ' \\',\\'' . CMT_TYPE . '\\');\">(';\r\n\r\n if ($comm['like'] == '')\r\n $prev = '0';\r\n else\r\n $prev = $comm['like'];\r\n $totc.=$prev . ')</div></div><div class = \"clear\"></div></div>';\r\n //$totc.=\"<h5></h5><div class='comment_img'><img height='27' width='27' src='\". $comm['profile_image'] . \"'></div><div class='comment_text'><h4>\" . $comm['name'] . \"</h4><p>\" . $comm['comment'] . \"</p></div><div class=\\\"clear\\\"></div><br/><hr/>\";\r\n }\r\n echo $totc;\r\n }", "public function actionPrintNilai($id){\n $pelanggaran = DimPelanggaran::find()->where('deleted!=1')->andWhere(['penilaian_id' => $id])->andWhere('status_pelanggaran!=1')->all();\n\n $pdf_content = $this->renderPartial('nilai-pdf', [\n 'model' => $this->findModel($id),\n 'pelanggaran' => $pelanggaran,\n ]);\n\n $mpdf = new \\Mpdf\\Mpdf();\n $mpdf->showImageErrors = true;\n $mpdf->WriteHTML($pdf_content);\n $mpdf->Output();\n exit;\n }", "function dispEr($toPrint,$ending=\"\"){\n echo \"<div class='imgHeading'>Sorry, the $toPrint you requested does not exist.$ending</div>\\n\";\n}", "public function printCommentPages()\n\t{\n\t\tif($this->arParams[\"AJAX_PAGINATION\"])\n\t\t{\n//\t\t\tstrange dirty hack from old template ((\n\t\t\t$this->arParams[\"arImages\"] = $this->arResult[\"arImages\"];\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<div id=\"blog-comment-page\">\n\t\t\t\t<?RecursiveComments($this->arResult[\"CommentsResult\"], $this->arResult[\"firstLevel\"], 0, true, $this->arResult[\"canModerate\"],\n\t\t\t\t\t$this->arResult[\"User\"], $this->arResult[\"use_captcha\"], $this->arResult[\"CanUserComment\"],\n\t\t\t\t\t$this->arResult[\"COMMENT_ERROR\"], $this->arResult[\"Comments\"], $this->arParams);?>\n\t\t\t</div>\n\t\t\t<?\n\t\t\techo ob_get_clean();\n\t\t}\n\t\t\n//\t\tall pages for old-style\n\t\telse\n\t\t{\n\t\t\tob_start();\n\t\t\tfor($i = 1; $i <= $this->arResult[\"PAGE_COUNT\"]; $i++)\n\t\t\t{\n\t\t\t\t$tmp = $this->arResult[\"CommentsResult\"];\n\t\t\t\t$tmp[0] = $this->arResult[\"PagesComment\"][$i];\n\t\t\t\t?>\n\t\t\t\t<div id=\"blog-comment-page-<?=$i?>\"<?if($this->arResult[\"PAGE\"] != $i) echo \"style=\\\"display:none;\\\"\"?>>\n\t\t\t\t\t<?RecursiveComments($tmp, $this->arResult[\"firstLevel\"], 0, true, $this->arResult[\"canModerate\"],\n\t\t\t\t\t\t$this->arResult[\"User\"], $this->arResult[\"use_captcha\"], $this->arResult[\"CanUserComment\"],\n\t\t\t\t\t\t$this->arResult[\"COMMENT_ERROR\"], $this->arResult[\"Comments\"], $this->arParams);?>\n\t\t\t\t</div>\n\t\t\t\t<?\n\t\t\t}\n\t\t\techo ob_get_clean();\n\t\t}\n\t}", "function display_comments($dbc, $user_id) {\n\n // Count the number of comments for the user\n $s = $dbc->query(\"SELECT COUNT(*) AS count FROM comments WHERE user_id = $user_id\");\n $result = $s->fetch_array(MYSQLI_ASSOC);\n $s->close();\n\n // If someone has left a comment for the user\n if ($result['count'] > 0) {\n\n // Echo the part of the html for the page emblem\n echo '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" id=\"header_table\">\n <tbody>\n <tr class=\"thead\">\n <td class=\"thead\">\n <div style=\"float: left\">Comments</div>\n <div style=\"float: right\">' . page_emblem($page_num, $pages, 'forum.php?f=' . $forum_id) . '</div>\n </td>\n </tr>';\n\n\n $q = \"SELECT c.posted_by, DATE_FORMAT(c.posted_on, '%M %D, %Y %l:%i %p') as posted_on, c.comment, u.username, u.thumb_url\n FROM comments as c\n INNER JOIN users as u on u.user_id = c.posted_by\n WHERE c.user_id = $user_id\n ORDER BY posted_on DESC\";\n\n $s = $dbc->query($q);\n\n while ($result = $s->fetch_array(MYSQLI_ASSOC)) {\n \n echo '<tr>\n <td>\n <div id=\"comment\">\n <div style=\"float: left\">\n <img src=\"images/avatars/' . $result['thumb_url'] . '\" class=\"avatar\" style=\"border-radius: 10px; margin-bottom: 10px\" height=\"90px\" width=\"90px\" name=\"avatar\"/>\n </div>\n <div style=\"float: right; width: 560px\">\n <div id=\"comment_top_info\">\n <div style=\"float: left\">\n <a href=\"member.php?u=' . $result['posted_by'] . '\">\n <strong>' . $result['username'] . '</strong>\n </a>\n </div>\n <div style=\"float: right\">' . $result['posted_on'] . '</div>\n </div>\n <div style=\"float: left; margin: 5px auto auto 5px;\">' . $result['comment'] . '</div>\n </div>\n </div>\n </td>\n </tr>';\n }\n // End of the comments table\n echo '</tbody>\n </table>';\n }\n}", "function print_latest_feedback_received($userid = 0, $feedbacktype = '', $shownone = false)\n{\n global $ilance, $myapi, $ilpage, $phrase;\n \n $sql = $ilance->db->query(\"\n SELECT comments\n FROM \" . DB_PREFIX . \"feedback\n WHERE for_user_id = '\" . intval($userid) . \"'\n ORDER BY id DESC\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return stripslashes($res['comments']);\n }\n \n return '';\n}", "function userCommentList() {\n\t\t\t# Opdaterer siden hvert 10. sekund:\n\n//\t\t\t$refreshUrl = $this->pi_linkTP_keepPIvars_url(array(), 0, TRUE);\n//\t\t\t$GLOBALS['TSFE']->additionalHeaderData['admPanelCSS-Skin'] = '<meta http-equiv=\"refresh\" content=\"10;url='.$refreshUrl.'\">';\n\n\t\t\tglobal $TYPO3_DB;\n\n\n\n\t// processerer data\t\t\n\t\t\tif($this->piVars['cmd']=='delete') {\n\t\t\t\t$TYPO3_DB->exec_UPDATEquery(\"tx_aud42cmtscr_comments\", \"uid=\".intval($this->piVars['uid']), array(\"deleted\"=>1));\n\t\t\t}\n\n\n\t//formaterer arrayet \"comments\" + laver html visning.\n\t\t\t$comments = $TYPO3_DB->exec_SELECTgetRows('comment, uid, status, crdate, fe_user_uid, fe_user_name', \"tx_aud42cmtscr_comments\", \"pid=5 AND deleted=0\", \"\", \"crdate DESC\");\n\n\t\t\t$output = '\t<div id=\"portalmessageszone\" class=\"wpz nolayoutchange\">\n\t\t\t\t\t\t\t<div class=\"webpart\">\n\t\t\t\t\t\t\t\t<div class=\"topbar\">\n\t\t\t\t\t\t\t\t\t<span class=\"topBarTitle\">Spørgsmål i kø:</span>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class=\"inner\">\n\t\t\t\t\t\t\t\t\t<div style=\"padding: 10px 15px 15px;\" id=\"myportalmessages\">';\n\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Sætter prefikset sek/min/tim på tiden\n\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tfunction _ago($tm,$rcs = 0) {\n\t\t\t\t\t\t\t\t $cur_tm = time(); $dif = $cur_tm-$tm;\n\t\t\t\t\t\t\t\t $pds = array('sek','min','tim','dag','uge','måned','år','årti');\n\t\t\t\t\t\t\t\t $lngh = array(1,60,3600,86400,604800,2630880,31570560,315705600);\n\t\t\t\t\t\t\t\t for($v = sizeof($lngh)-1; ($v >= 0)&&(($no = $dif/$lngh[$v])<=1); $v--);\n\t\t\t\t\t\t\t\t\t\tif($v < 0) $v = 0; $_tm = $cur_tm-($dif%$lngh[$v]);\n\t\t\t\t\t\t\t\t \t$no = floor($no); if($no <> 1) $pds[$v] .=''; $x=sprintf(\"%d %s \",$no,$pds[$v]);\n\t\t\t\t\t\t\t\t \tif(($rcs == 1)&&($v >= 1)&&(($cur_tm-$_tm) > 0)) $x .= time_ago($_tm);\n\t\t\t\t\t\t\t\t return $x;\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\tforeach($comments as $row) { \t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//Tid spørgsmålet har ligget\n\n\t\t\t\t\t$output.='\n\t\t\t\t\t\t<div class=\"portalmessage\">\n\t\t\t\t\t\t<div class=\"date\">'._ago(intval($row['crdate'])).'</div>\n\t\t\t\t\t\t\t\t\t<div class=\"msg\" style=\"';\n\n\t\t\t\t\t$output.='\" >';\t\t\n\n\t\t\t\t\t// Selve kommentaren\n\t\t\t\t\t$linkingParameters = array('cmd' => 'show', 'uid' => $row[\"uid\"]);\n\t\t\t\t\t$output.='<div>'.htmlspecialchars($row[\"comment\"]).'</div>';\n\n\t\t\t\t\t//Brugernavn\n\t\t\t\t\t$output.='\t<div class=\"senderinfo\" title=\"\"><img src=\"fileadmin/templates/default_files/user.png\" alt=\"\">';\n\t\t\t\t\t\t\t\tif($row['fe_user_uid']!='') {\n\t\t\t\t\t\t\t\t$userName='&nbsp;'.$row['fe_user_name'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\t\t\t\t\n\t\t\t\t\t\t\t\t$userName='&nbsp;(anonym)';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t$output.=$userName;\n\t\t\t\t\t$output.='\t</div>';\n\n\t\t\t\t\t$output.='\t</div>';\n\n\t\t\t\t\t//slet/vis knapper:\t\t\t\n//\t\t\t\t\t$output.='<form method=\"post\" action=\"'.t3lib_div::linkThisScript().'\">';\n//\t\t\t\t\t$output.='<input type=\"hidden\" name=\"uid\" value=\"'.$row[\"uid\"].'\">';\n\t\t\t\t\t$output.='<div style=\"float: right;\">';\n\n\t\t\t\t\tif ($row['fe_user_uid']=!'' && $row['fe_user_uid']===$GLOBALS['TSFE']->fe_user->user['uid'])\t{\n\t\t\t\t\t\t$linkingParameters = array('cmd' => 'edit', 'uid' => $row[\"uid\"]);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$output.='&nbsp;'.$this->pi_linkTP_keepPIvars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<img src=\"fileadmin/templates/default_files/edit.png\">',\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$linkingParameters,\n\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t31\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$linkingParameters = array('cmd' => 'delete', 'uid' => $row[\"uid\"]);\n\t\t\t\t\t\t$output.=$this->pi_linkTP_keepPIvars(\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<img src=\"fileadmin/templates/default_files/delete-silk.png\">',\n\t\t\t\t\t\t\t\t\t\t\t\t\t$linkingParameters,\n\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tTRUE\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t$output.='</div>';\n//\t\t\t\t\t$output.='</form>';\n\n\n\n\n\t\t\t\t\t$output.='\t<div style=\"clear: both;\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>';\n\n\t\t\t\t\t//Slet alle box\n\n\n\t\t\t}\n\t\t\t\t\t$output.='\t<div style=\"float: right; height: 20px; background-color: black;\">\n\t\t\t\t\t\t\t\t\t<a onclick=\"alert();return false;\" href=\"#\" title=\"Slet ALLE\">\n\t\t\t\t\t\t\t\t\t<span style=\"color: white;\">SLET ALLE&nbsp;</span><img src=\"fileadmin/templates/default_files/delete-silk-all.png\" alt=\"Luk\" align=\"absmiddle\">\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t$output.='\t</div></div></div></div>';\n\n\t\t\treturn($output);\n\n\t\t}", "function dispPlayerPic($playerid){\n}", "function print_cams( $cam ) {\t\n\n\t\t\t// Check if HD\n\t\t\t\tif ( $cam->is_hd == 'True' )\n\t\t\t\t\t$hd = '<a href=\"' . BASEHREF . 'cams/hd\">HD</a>';\n\t\t\t\telse\n\t\t\t\t\t$hd = '';\n\n\t\t\t// Check if New\n\t\t\t\tif ( $cam->is_new == 'True' )\n\t\t\t\t\t$new = '<a href=\"' . BASEHREF . 'cams/new\">New</a>';\n\t\t\t\telse\n\t\t\t\t\t$new = '';\t\n\n\t\t\techo '\t\n\t\t\t\t<article class=\"post\">\n\t\t\t\t\t<header>\n\t\t\t\t\t\t<div class=\"title\">\n\t\t\t\t\t\t\t<h2><a href=\"' . BASEHREF . 'cam/' . $cam->username . '\">' . $cam->display_name . '</a></h2>\n\t\t\t\t\t\t\t<p>' . $cam->room_subject . '</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</header>\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<div>\t\t\n\t\t\t\t\t\t<p>'; random_text( $cam->username, $cam->age, $cam->location, $cam->num_users, $cam->seconds_online ); echo '</p></div>\n\t\t\t\t\t\t<a href=\"' . BASEHREF . 'cam/' . $cam->username . '\" class=\"image featured\"><img src=\"' . $cam->image_url . '\" alt=\"Watch ' . $cam->display_name . ' Streaming Live\" /></a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<footer>\n\t\t\t\t\t\t<ul class=\"actions\">\n\t\t\t\t\t\t\t<li><a href=\"' . BASEHREF . 'cam/' . $cam->username . '\" class=\"button big\">View Live Stream</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<ul class=\"stats\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( !empty( $hd ) )\n\t\t\t\t\t\t\t\techo '<li>' . $hd . '</li>';\n\n\t\t\t\t\t\t\tif ( !empty( $new ) )\n\t\t\t\t\t\t\t\techo '<li>' . $new . '</li>';\n\n\t\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<li><a href=\"#\" class=\"icon fa-clock-o\">' . ago( $cam->seconds_online ) . '</a></li>\n\t\t\t\t\t\t\t<li><a href=\"#\" class=\"icon fa-comment\">' . $cam->num_users . '</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</footer>\n\t\t\t\t</article>\t\t\t\n\t\t\t';\t\n\t\t\t\t\n\t\t}", "function last(){\n\t\t// Zeiger verschieben\n\t\t$this->pointerToCurrent = count($this->imageArray)-1;\n\t\t$this->save();\n\t\t\n\t\t// Das Bild ausgeben\n\t\t//$this->show();\n\t\t$temp = $GLOBALS['CunddController']->init(\"CunddGalerie::printDetailOfSelf\");\n\t}", "function comment_notification_title()\n{\nreturn <<<EOF\nYorumunuza yeni bir cevap geldi\nEOF;\n}", "function comment_url() {\r\n\techo return_comment_url();\r\n}", "function printDetailLink($pointerToImage = NULL){\t\t\n\t\tif($pointerToImage == NULL){\n\t\t\t$pointerToImage = $this->pointerToCurrent;\n\t\t}\n\t\t\n\t\t$wert['aufruf'] = 'Cundd'.ucfirst($this->classPrefix).'::printDetail';\n\t\t//$wert['data']\t= 'object = {parentId:\\''.$this->imageArray[$pointerToImage]['schluessel'].'\\'}';\n\t\t$wert['data']\t= $this->imageArray[$pointerToImage]['schluessel'];\n\t\t$wert['title']\t= 'printDetail '.ucfirst($this->classPrefix).' '.$this->imageArray[$pointerToImage]['schluessel'];\n\t\t$wert['classPrefix'] = $this->classPrefix;\n\t\t\n\t\t// Link ausgeben\n\t\techo CunddTemplate::inhalte_einrichten($wert, 4, $this->classPrefix.'_print_detail_'.$this->classPrefix.'_link', 'output');\n\t}", "function show_comments($conn,$post_id,$usr_id){\r\n\r\n\t$comment_list = mysqli_query($conn,\"SELECT * FROM comments WHERE post_id = $post_id AND parent_comment_id = 0 ORDER BY comment_timestamp DESC\");\r\n\r\n\twhile ($rows = mysqli_fetch_assoc($comment_list)) {\r\n\t\t$comment_id = $rows['comment_id'];\r\n\t\t$parent_comment = $rows['parent_comment_id'];?>\r\n\r\n \t\t<div class=\"previous_r_comment\" style=\"padding-bottom: 0px;\">\r\n\t\t\t<div class=\"h_prof_icon_img\" style=\"margin: 0px 4px 5px 0px\">\r\n\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tinclude 'inc/conn_db.php';\r\n\t\t\t\t\t\t\t// $id = $_SESSION['usrID'];\r\n\t\t\t\t\t\t\t$img = \"SELECT * FROM user_user_photo WHERE user_id = '$usr_id' AND profile_photo = 1\";\r\n\t\t\t\t\t\t\t$q_img = mysqli_query($conn,$img);\r\n\t\t\t\t\t\t\t$row = mysqli_fetch_assoc($q_img);\r\n\t\t\t\t\t\t\tif($row){?>\r\n\t\t\t\t\t\t\t<img src=\"<?php echo \"inc/uploaded/\".$row['img_path']; ?>\">\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\t} else {?>\r\n\t\t\t\t\t\t\t<img src=\"image/default/user_default.png\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"previous_r_comment_details\" style=\"width: 100%;padding: 5px 0px;\">\r\n\t\t\t\t<div class=\"comment_style_prof_com\">\r\n\t\t\t\t\t<b style=\"padding-right: 5px;\"><?php echo $_SESSION['usrName'];?></b>\r\n\t\t\t\t\t<p style=\"font-size: 15px;\"><?php echo $rows['comment_content']; ?></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- <hr style=\"margin-top: 5px;\"> -->\r\n\t\t\t\t<div style=\"width: 100%;display: flex;flex-direction: row;padding: 5px 0px;padding: 5px 0px 0px;\" class=\"c_r_reactions\">\r\n\t\t\t\t\t<span title=\"parent_comment_id\"><?php echo $rows['parent_comment_id'];?></span>\r\n\t\t\t\t\t<span class=\"l_d\" title=\"comment_id\"><?php echo $comment_id;?></span>\r\n\t\t\t\t\t<span style=\"margin-left: 10px;\" id=\"comment_span\" onclick=\"showComment(<?php echo $comment_id;?>);\">Reply</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\t\r\n\t\t</div>\r\n\t\t<!-- Put here the form for Replying the comment. -->\r\n\t\t<div id=\"<?php echo $comment_id;?>\" style=\"display: none;\">\r\n\t\t<?php reply_comments($conn,$comment_id)?> \r\n\t\t\t\r\n\t\t<form class=\"f_r_comment\" method=\"POST\" action=\"inc/comment.php\">\r\n\t\t\t<div class=\"h_prof_icon_img\" style=\"margin: 5px 0px 5px 40px;\">\r\n\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tinclude 'inc/conn_db.php';\r\n\t\t\t\t\t\t\t$id = $_SESSION['usrID'];\r\n\t\t\t\t\t\t\t$img = \"SELECT * FROM user_user_photo WHERE user_id = '$id' AND profile_photo = 1\";\r\n\t\t\t\t\t\t\t$q_img = mysqli_query($conn,$img);\r\n\t\t\t\t\t\t\t$row = mysqli_fetch_assoc($q_img);\r\n\t\t\t\t\t\t\tif($row){?>\r\n\t\t\t\t\t\t\t<img src=\"<?php echo \"inc/uploaded/\".$row['img_path']; ?>\">\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\t} else {?>\r\n\t\t\t\t\t\t\t<img src=\"image/default/user_default.png\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"r_comment_\">\r\n\t\t\t\t<input type=\"text\" name=\"comment\" placeholder=\"Reply on this comment...<?php echo $comment_id;?>\" style=\"border-radius: 30px !important;padding: 5px 12px;margin-top: 5px;\">\r\n\t\t\t\t<input type=\"hidden\" name=\"postID\" value=\"<?php echo $post_id;?>\">\r\n\t\t\t\t<input type=\"hidden\" name=\"parent_comment_id\" value=\"<?php echo $comment_id;?>\">\r\n\t\t\t</div>\r\n\t\t\t<input type=\"submit\" name=\"submit\" style=\"display: none;\">\r\n\t\t</form>\r\n\t\t</div>\r\n\r\n<?php \t\r\n\t}\r\n}", "function gallery_comment_notification_title()\n{\nreturn <<<EOF\nYorumunuza yeni bir cevap geldi\nEOF;\n}", "function print_preview($site, $data){\n $text = strip_tags($data[\"text\"]);\n if(strlen($text)>70) $text = mb_substr($text, 0 ,70).'..';\n $fout = '\n <div class=\"content_block\">\n ';\n if(!empty($data[\"img\"])){\n $fout .= '\n <div vr-control id=\"content_'.md5($data[\"url\"]).'\" class=\"content_img\" style=\"background-image: url(\\''.$_SERVER[\"DIR\"].'/img/data/thumb/'.$data[\"img\"].'\\');\"\n onClick=\\'document.getElementById(\"'.$data[\"url\"].'\").click();\\'>\n &nbsp;\n </div>';\n }else{\n $fout .= '\n <div vr-control id=\"content_'.md5($data[\"url\"]).'\" class=\"content_img\" style=\"background-image: url(\\''.$_SERVER[\"DIR\"].'/img/no-image.jpg\\');\"\n onClick=\\'document.getElementById(\"'.$data[\"url\"].'\").click();\\'>\n &nbsp;\n </div>';\n }\n $fout .= '\n <a vr-control id=\"'.$data[\"url\"].'\" href=\"'.$_SERVER[\"DIR\"].'/content/'.$data[\"url\"].'\"><h3>'.mb_substr(strip_tags($data[\"caption\"]),0,100).'</h3></a>\n <p class=\"content_block_text\">\n '.$text.'\n </p>\n </div>';\n return $fout;\n}", "function comment_report_form( $comment )\n\t{\t\n\t\t/* Load Skin Bits */\n\t\t\n\t\t/* Fatal error bug fix */\n if( !is_object( $this->ipsclass->compiled_templates['skin_gallery_comments'] ) ) {\n\t\t\t$this->ipsclass->load_template( 'skin_gallery_comments' );\n }\n\t\t$this->html = $this->ipsclass->compiled_templates['skin_gallery_comments'];\n\t\t\n\t\t/* Get the image */\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'gallery_comments', 'where' => \"pid={$comment}\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t$data = $this->ipsclass->DB->fetch_row();\n\t\t$data['st'] = ( !empty( $this->ipsclass->input['st'] ) ) ? $this->ipsclass->input['st'] : 0;\n\t\n\t\t\t\t\t\t\n\t\t$this->output .= $this->html->report_comment_form( $data );\n\t\t\n $this->nav[] = \"<a href='\".$this->ipsclass->base_url.\"automodule=gallery'>{$this->ipsclass->lang['gallery']}</a>\";\n $this->nav[] = $this->ipsclass->lang['report_comment_page'];\n \n $this->title = $this->ipsclass->lang['report_comment_page'];\n\t\t\t\t\n\t}", "function br_getIcon($id = false) {\n switch(BR_ICON_SET) {\n default :\n return '<span class=\"icon-'.br_getPageIcon($id).'\"></span>';\n break;\n }\n}", "function beans_comment_content() {\n\n\techo beans_output( 'beans_comment_content', beans_render_function( comment_text() ) );\n\n}", "function tmp_reporte_ficha_clinica($param){ \r\n $html = '';\r\n $html.= $this->header_repo();\r\n if($param != 'e'){\r\n $nc = strtoupper($param['ficha_medica']['primer_nombre']).' '.\r\n strtoupper($param['ficha_medica']['segundo_nombre']).' '.\r\n strtoupper($param['ficha_medica']['apellido_paterno']).' '.\r\n strtoupper($param['ficha_medica']['apellido_materno']);\r\n $img = base_url().'/img/foto_perfil/'.$param['ficha_medica']['imagen']; \r\n // Antecedentes Generales\r\n $html.= '<table class=\"tbl_repo\" text-align=\"left\">';\r\n $html.= '<thead>';\r\n $html.= '<tr>';\r\n $html.= ' <th colspan=\"3\" class=\"title-repo\"><h3> HISTORIA CLINICA PACIENTE : '.$nc.'</h3></th>';\r\n $html.= '</tr>';\r\n $html.= '<tr>';\r\n $html.= ' <th><b>Rut</b></th>';\r\n $html.= ' <th><b>Nombres</b></th>';\r\n $html.= ' <th><b>Apellidos</b></th>';\r\n $html.= '</tr>';\r\n $html.= '</thead>';\r\n $html.= '<tbody>';\r\n $html.= '<tr>'; \r\n $html.= ' <td>'.$param['ficha_medica']['rut'].'</td>';\r\n $html.= ' <td>'.ucfirst($param['ficha_medica']['primer_nombre']).' '.ucfirst($param['ficha_medica']['segundo_nombre']).'</td>';\r\n $html.= ' <td>'.ucfirst($param['ficha_medica']['apellido_paterno']).' '.ucfirst($param['ficha_medica']['apellido_materno']).'</td>'; \r\n $html.= '</tr>'; \r\n $html.= '<tr>';\r\n $html.= ' <th><b>Género</b></th>';\r\n $html.= ' <th><b>Fecha de Nacimiento</b></th>';\r\n $html.= ' <th><b>Estado Civil</b></th>';\r\n $html.= ' <th><b>Ocupacion</b></th>';\r\n $html.= '</tr>';\r\n $html.= '<tr>';\r\n if($param['ficha_medica']['genero'] == 'M'){\r\n $html.= ' <td>MASCULINO</td>';\r\n }else if($param['ficha_medica']['genero'] == 'F'){\r\n $html.= ' <td>FEMENINO</td>';\r\n }else{\r\n $html.= ' <td>SIN DEFINIR</td>';\r\n } \r\n $html.= ' <td>'.$param['ficha_medica']['fecha_nac'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['estado_civil'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['descripcion'].'</td>'; \r\n $html.= '</tr>'; \r\n $html.= '<tr>';\r\n $html.= ' <th><b>Teléfono</b></th>';\r\n $html.= ' <th><b>Celular</b></th>';\r\n $html.= ' <th><b>Email</b></th>';\r\n $html.= ' <th><b>Lugar de Nacimiento</b></th>';\r\n $html.= '</tr>'; \r\n $html.= '<tr>'; \r\n $html.= ' <td>'.$param['ficha_medica']['telefono'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['celular'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['email'].'</td>'; \r\n $html.= ' <td>'.$param['ficha_medica']['lugar_nac'].'</td>'; \r\n $html.= '</tr>'; \r\n $html.= '<tr>';\r\n $html.= ' <th><b>Nacionalidad</b></th>';\r\n $html.= ' <th><b>Region</b></th>';\r\n $html.= ' <th><b>Provincia</b></th>';\r\n $html.= ' <th><b>Comuna</b></th>';\r\n $html.= ' <th><b>Calle</b></th>';\r\n $html.= '</tr>'; \r\n $html.= '<tr>'; \r\n $html.= ' <td>'.$param['ficha_medica']['nombre'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['REGION_NOMBRE'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['PROVINCIA_NOMBRE'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['COMUNA_NOMBRE'].'</td>'; \r\n $html.= ' <td>'.$param['ficha_medica']['calle'].'</td>'; \r\n $html.= '</tr>';\r\n $html.= '</tbody>';\r\n $html.= '</table>'; \r\n $html.= '<p><hr></p>';\r\n // Antecedentes Específicos\r\n $html.= '<table class=\"tbl_repo\" text-align=\"left\">';\r\n $html.= '<thead>';\r\n $html.= '<tr>';\r\n $html.= ' <th colspan=\"3\" class=\"title-repo\"><h3> ANTECEDENTES GENERALES</h3></th>';\r\n $html.= '</tr>';\r\n $html.= '<tr>';\r\n $html.= ' <th><b>Religión</b></th>';\r\n $html.= ' <th><b>Previsión</b></th>'; \r\n $html.= '</tr>';\r\n $html.= '</thead>';\r\n $html.= '<tbody>';\r\n $html.= '<tr>'; \r\n $html.= ' <td>'.$param['ficha_medica']['religion'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['prevision_medica'].'</td>'; \r\n $html.= '</tr>'; \r\n $html.= '<tr>';\r\n $html.= ' <th><b>Nivel de Estudios</b></th>';\r\n $html.= ' <th><b>Grupo Sanguíneo</b></th>';\r\n $html.= ' <th><b>Factor RH</b></th>'; \r\n $html.= '</tr>';\r\n $html.= '</thead>';\r\n $html.= '<tbody>';\r\n $html.= '<tr>';\r\n $html.= ' <td>'.$param['ficha_medica']['nivel_estudio'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['grupo_sanguineo'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['factor_rh'].'</td>';\r\n $html.= '</tr>';\r\n $html.= '</tbody>';\r\n $html.= '</table>'; \r\n $html.= '<p><hr></p>'; \r\n // Antecedentes Medicos\r\n $html.= '<table class=\"tbl_repo\" text-align=\"left\">';\r\n $html.= '<thead>';\r\n $html.= '<tr>';\r\n $html.= ' <th colspan=\"3\" class=\"title-repo\"><h3> ANTECEDENTES MEDICOS</h3></th>';\r\n $html.= '</tr>';\r\n $html.= '<tr>';\r\n $html.= ' <th><b>ID Paciente</b></th>';\r\n $html.= ' <th><b>ID Historia Médica</b></th>';\r\n $html.= ' <th><b>ID Médico Tratane</b></th>'; \r\n $html.= '</tr>';\r\n $html.= '</thead>';\r\n $html.= '<tbody>'; \r\n $html.= '<tbody>';\r\n $html.= '<tr>';\r\n $html.= ' <td>'.$param['ficha_medica']['id_paciente'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['id_historia_medica'].'</td>'; \r\n $html.= ' <td>'.$param['ficha_medica']['modificado_por'].'</td>'; \r\n $html.= '</tr>';\r\n $html.= '<tr>';\r\n $html.= ' <th colspan=\"3\"><b>Antecedentes Clínicos</b></th>';\r\n $html.= '</tr>';\r\n $html.= '<tr>';\r\n $html.= ' <td>'.$param['ficha_medica']['id_paciente'].'</td>';\r\n $html.= ' <td>'.$param['ficha_medica']['id_historia_medica'].'</td>'; \r\n $html.= ' <td>'.$param['ficha_medica']['modificado_por'].'</td>'; \r\n $html.= '</tr>'; \r\n $html.= '</tbody>';\r\n $html.= '</table>'; \r\n $html.= '<p><hr></p>';\r\n\r\n }else{\r\n $html.= 'No hay datos para mostrar';\r\n }\r\n return $html;\r\n }", "function simple_mailhander_comment_maker($header, $userObject, $imapUid, $imap, $count, $thread_parent_cid = \"NOPARENT\", $comment_nid = FALSE){\n\twatchdog('Parent Cid', print_r($thread_parent_cid, 1));\n\twatchdog('Comment Nid', print_r($comment_nid, 1));\n\tif($thread_parent_cid >= 1) {\n\t\t$cid = db_query(\"SELECT cid, nid FROM comment WHERE cid = :threadparent\", array(':threadparent' => $thread_parent_cid))->fetchAll();\n\t\t$cid_nid = $cid[0]->nid;\n\t\t$cid_pid = $cid[0]->cid;\n\t} else {\n\t\t$cid_nid = $comment_nid;\n\t\t$cid_pid = 0;\n\t}\n\n\t$author = $userObject->uid;\n\n\t$date = date('U', strtotime($header->date));\n\t$body = getBodyPlain($imapUid, $imap);\n\t//Strip body of the\n\t//Reply text so we only get the new text\n\t$replyText = strpos($body, '((( Reply ABOVE this LINE to POST a COMMENT )))');\n\n\t//Get the part of the body before this\n\t//Trim a bit more off for the ending date\n\t$replyText = $replyText - 65;\n\t$bodySub = substr($body, 0, $replyText);\n\n\t$bodySub = utf8_encode($bodySub);\n\t//Filters for cleaning out message goop\n\t$body = check_markup($bodySub, 'full_html');\n\t$comment = new stdClass();\n\t$comment->cid = 0;\n\t$comment->subject = $header->Subject;\n\t$comment->pid = $cid_pid;\n\t$comment->uid = $author;\n\t$comment->nid = $cid_nid;\n\t$comment->mail = $userObject->mail;\n\t$comment->name = $userObject->name;\n\t$comment->hostname = '127.0.0.1';\n\t$comment->created = $date;\n\t$comment->date = $date;\n\t$comment->is_anonymous = 0;\n\t$comment->status = 1;\n\t$comment->language = LANGUAGE_NONE;\n\t$comment->comment_body[$comment->language][0]['format'] = 'full_html';\n\n\t$comment->comment_body[$comment->language][0]['value'] = $body;\n\ttry {\n\t\tcomment_submit($comment);\n\t\tcomment_save($comment);\n\t} catch (Exception $e) {\n\t\twatchdog('simplified_mailhandler', 'Error Line 531 simplified_mailhandler_helpers.inc' . $e->getMessage());\n\t}\n\t$attachments = SimplifiedMailHandlerCheckAttachment::checkAttachment($imap, $count, $imapUid);\n\tif(count($attachments)) {\n\t\tmakeFilesFromAttachmentsForComments($comment, $attachments);\n\t}\n\n\treturn $comment;\n}", "function tech_comment_preview($ID){\n\tglobal $comment, $tech;\n\t$output = \"\";\n\t$comment_array = get_comments(array('post_id'=>$ID,'number'=>$tech['comment_preview_num'],'type'=>'comment','status'=>'approve'));\n\tif ($comment_array) {\n\t\t$output .=\t'<ul class=\"comment-preview\">';\n\t\tforeach($comment_array as $comment){\n\t\t\t$output .= '<li class=\"comments-link\">';\n\t\t\t$output .= '<div class=\"comment-author\">';\n\t\t\t$output .= '<a href=\"'. get_comment_link() .'\" title=\"'. $comment->comment_author . __(' posted on ','techozoic') . get_comment_date() .'\">';\n\t\t\t$output .= $comment->comment_author . __(' posted on ','techozoic') . get_comment_date();\n\t\t\t$output .= '</a>';\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '<div class=\"comment-text\">';\n\t\t\t$output .= get_comment_excerpt($comment->comment_ID);\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '</li>';\n\t\t}\n\t\t$output .= '</ul>';\n\t}\n\tprint $output;\n}", "function comment_geotagging_secondary($n1, $n2, $n3, $c1, $c2)\r\n{\r\n $message = '<html>\r\n <meta name=\"viewport\" content=\"width=320, initial-scale=1, user-scalable=no\">\r\n <head>\r\n <link media=\"only screen and (min-device-width: 481px)\" href=\"http://www.pulzos.com/statics/css/ext/emails/iOSDevice.css\" type= \"text/css\" rel=\"stylesheet\">\r\n </head>\r\n <body>\r\n <div style=\"width: 765px; height: 80px\" id=\"cabeza_desktop\">\r\n\t\t\t\t\t\t\t<img src=\"http://www.pulzos.com/statics/img/mailPulzosCabecera.jpg\" alt=\"Pulzos Rewards Network\" />\r\n </div>\r\n <style type=\"text/css\">\r\n @media screen and (max-device-width: 481px) {#cabeza_movil\r\n {\r\n background-image: url(\"http://www.pulzos.com/statics/img/mailPulzosCabeceraMovil.jpg\");\r\n background-repeat: no-repeat;\r\n width: 320px;\r\n height: 100px;\r\n margin:auto;\r\n }\r\n\r\n #cabeza_desktop\r\n { \r\n display:none;\r\n }}\r\n </style>\r\n <div id=\"cabeza_movil\" align=\"left\">\r\n </div>\r\n <style type=\"text/css\">\r\n @media screen and (max-device-width: 481px) {#cabeza_movil\r\n {\r\n background-image: url(\"http://www.pulzos.com/statics/img/mailPulzosCabeceraMovil.jpg\");\r\n background-repeat: no-repeat;\r\n width: 320px;\r\n height: 100px;\r\n margin:auto;\r\n }\r\n \r\n #cabeza_desktop\r\n { \r\n display:none;\r\n }}\r\n </style>\r\n <style type=\"text/css\">\r\n @media screen and (max-device-width: 481px) {#cuerpo_desktop { width: 320px; }}\r\n </style>\r\n <div style=\"width: 765px\" id=\"cuerpo_desktop\">\r\n Hola <strong>' . $n3 . '</strong>,<br /><br />\r\n ' . $n2 . ' comento:<br /><br />\r\n \"' . $c2 . '\"<br /><br />\r\n En la publicacion de ' . $n1 . ':<br /><br />\r\n \"' . $c1 . '\" <br /><br />\r\n Gracias por unirte a nuestra Comunidad,<br /><br />\r\n\t\t\t\t\t\t\t<strong>Equipo Pulzos Rewards Network.</strong>\r\n </div>\r\n <style type=\"text/css\">\r\n @media screen and (max-device-width: 481px) {#cuerpo_desktop { width: 320px; }}\r\n </style>\r\n <div id=\"pie_movil\" align=\"left\">\r\n </div>\r\n\t\t\t\t\t\t<div style=\"width: 765px; height: 80px\" id=\"pie_desktop\">\r\n\t\t\t\t\t\t\t<img src=\"http://www.pulzos.com/statics/img/mailPulzosPie.jpg\" alt=\"\" />\r\n\t\t\t\t\t\t</div>\r\n </body>\r\n </html>';\r\n return $message;\r\n}", "function next_comments_link($label = '', $max_page = 0)\n{\n}", "function profile_showall_comments($xmlrequest, $pagenumber, $limit) {\r\n\t$userId = mysql_real_escape_string($xmlrequest['ProfileParentComment']['userId']);\r\n\t$entourageId = mysql_real_escape_string($xmlrequest['ProfileParentComment']['entourageId']);\r\n\t$latest = mysql_real_escape_string($xmlrequest['ProfileParentComment']['latest']);\r\n\r\n\tif (DEBUG)\r\n\t writelog(\"profile.class.php :: profile_showall_comments() : \", \"Start Here \", false);\r\n\r\n\t$profile_hotpress = array();\r\n\t$lowerlimit = isset($pagenumber) ? (($pagenumber - 1) * $limit) : 0;\r\n\tif (($latest) && (isset($xmlrequest['ProfileParentComment']['postId'])) && ($xmlrequest['ProfileParentComment']['postId'] > 0)) {\r\n\t if (DEBUG)\r\n\t\twritelog(\"profile.class.php :: profile_showall_comments() :: latestBulletin variable set to : \", $latest, false);\r\n//$postId=if we want to fetch all comment after specific Id.Then $postId E I else $postId=0\r\n\t //$latest=for latest comment on Profile set=1.\r\n\t $postId = mysql_real_escape_string($xmlrequest['ProfileParentComment']['postId']);\r\n\t //$query_profile_hotpress = \"SELECT bullet_id,link_url,youtubeLink,link_image,image_link,added, tst_id, testimonial,from_id,post_via,photo_album_id FROM testimonials WHERE (tst_id>'$postId')AND(parent_tst_id =0||parent_tst_id =NULL)AND mem_id ='$entourageId' ORDER BY added DESC, tst_id DESC LIMIT $lowerlimit, $limit \";\r\n\t $query_profile_hotpress = \"SELECT SQL_CALC_FOUND_ROWS DISTINCT photo_album.photo_id,members.is_facebook_user,members.privacy,members.mem_id, members.profilenam, members.photo_thumb, members.photo_b_thumb,members.gender,members.profile_type,testimonials.bullet_id,testimonials.link_url,testimonials.youtubeLink,testimonials.link_image,testimonials.image_link,testimonials.added, testimonials.tst_id,testimonials. testimonial,testimonials.from_id,testimonials.post_via,testimonials.photo_album_id FROM testimonials LEFT JOIN members ON (members.mem_id=testimonials.from_id) LEFT JOIN photo_album ON (photo_album.photo_id=testimonials.photo_album_id) WHERE (testimonials.parent_tst_id =0 OR testimonials.parent_tst_id IS NULL)AND testimonials.mem_id ='$entourageId' ORDER BY testimonials.added DESC, testimonials.tst_id DESC LIMIT $lowerlimit, $limit \";//(tst_id>'$postId')AND\r\n\t if (DEBUG)\r\n\t\twritelog(\"profile.class.php :: profile_showall_comments() :: latestBulletin variable set to : \", $query_profile_hotpress, false);\r\n\t}\r\n\tif (!$latest) {\r\n\t //$query_profile_hotpress = \"SELECT bullet_id,link_url,youtubeLink,link_image,image_link,added, tst_id, testimonial, from_id,post_via,photo_album_id FROM testimonials WHERE (parent_tst_id =0||parent_tst_id =NULL)AND mem_id ='$entourageId' ORDER BY added DESC, tst_id DESC LIMIT $lowerlimit, $limit \";\r\n\t $query_profile_hotpress = \"SELECT SQL_CALC_FOUND_ROWS DISTINCT photo_album.photo_id,photo_album.album_id,members.is_facebook_user,members.privacy,members.mem_id, members.profilenam, members.photo_thumb, members.photo_b_thumb,members.gender,members.profile_type,testimonials.bullet_id,testimonials.link_url,testimonials.youtubeLink,testimonials.link_image,testimonials.image_link,testimonials.added, testimonials.tst_id,testimonials. testimonial,testimonials.from_id,testimonials.post_via,testimonials.photo_album_id FROM testimonials LEFT JOIN members ON (members.mem_id=testimonials.from_id) LEFT JOIN photo_album ON (photo_album.photo_id=testimonials.photo_album_id) WHERE (testimonials.parent_tst_id =0||testimonials.parent_tst_id =NULL)AND testimonials.mem_id ='$entourageId' ORDER BY testimonials.added DESC, testimonials.tst_id DESC LIMIT $lowerlimit, $limit \";\r\n\t if (DEBUG)\r\n\t\twritelog(\"profile.class.php :: profile_showall_comments() :: latestBulletin variable set to : \", $query_profile_hotpress, false);\r\n\t}\r\n\r\n\t$result_profile_hotpress = execute_query_new($query_profile_hotpress);\r\n\t$count=0;\r\n\t$str=\"\";\r\n\t$totalProfileComments = execute_query(\"SELECT FOUND_ROWS() as TotalRecords ;\", false);\r\n\t$data['Total'] = $totalProfileComments['TotalRecords'];\r\n\tif ((mysql_num_rows($result_profile_hotpress) > 0)) {\r\n\t while ($row = mysql_fetch_array($result_profile_hotpress, MYSQL_ASSOC)) {\r\n\t\t$id = isset($row['tst_id']) && ($row['tst_id']) ? $row['tst_id'] : NULL;\r\n\t $row['tot_comment'] = $this->get_total_comment_count($id);\r\n\t\t$width_link_image = NULL;\r\n\t\t$height_link_image = NULL;\r\n\t\t//to get thumbnail images.\r\n\t\tif (is_readable($this->local_folder . $row['link_image'])) {\r\n\t\t\t\t$sizee = getimagesize($this->local_folder . $row['link_image']);\r\n\t\t\t\t$width_link_image = $sizee[0];\r\n\t\t\t\t$height_link_image = $sizee[1];\r\n\t\t\t\t$file_extension = substr($row['link_image'], strrpos($row['link_image'], '.') + 1);\r\n\t\t\t\t$arr = explode('.', $row['link_image']);\r\n\t\t\t\t$Id = isset($row['photo_album_id']) && ($row['photo_album_id']) ? $row['photo_album_id'] : NULL;\r\n\t\t\t\tif (!$Id)\r\n\t\t\t\t$Id = isset($row['bullet_id']) && $row['bullet_id'] ? $row['bullet_id'] : NULL;\r\n\t\r\n\t\t\t\tif ((!file_exists($this->local_folder . $arr[0] . \"_\" . $Id . \".\" . $file_extension)) && ($Id) && (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime']))) {\r\n\t\t\t\tthumbanail_for_image($Id,$row['link_image']);\r\n\t\t\t\t}\r\n\t\t \tif (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime'])) {\r\n\t\t\t\t$row['link_image'] = isset($row['link_image']) && (strlen($row['link_image']) > 7) ? event_image_detail($Id, $row['link_image'], 1) : NULL;\r\n\t\t\t\tlist($width_link_image, $height_link_image) = (isset($row['link_image']) && (strlen($row['link_image']) > 7)) ? getimagesize($this->local_folder . $row['link_image']) : NULL;\r\n\t\t \t}\r\n\t\t\t}\r\n\t\t\t$width_image_link = NULL;\r\n\t\t\t$height_image_link = NULL;\r\n\t\t\tif (is_readable($this->local_folder . $row['image_link'])) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sizee = getimagesize($this->local_folder . $row['image_link']);\r\n\t\t\t\t\t$width_image_link = $sizee[0];\r\n\t\t\t\t\t$height_image_link = $sizee[1];\r\n\t\t\t\t\t$file_extension = substr($row['image_link'], strrpos($row['image_link'], '.') + 1);\r\n\t\t\t\t\t$arr = explode('.', $row['image_link']);\r\n\t\t\t\t\t$Id = isset($row['photo_album_id']) && ($row['photo_album_id']) ? $row['photo_album_id'] : NULL;\r\n\t\t\t\t\tif (!$Id)\r\n\t\t\t\t\t$Id = isset($row['bullet_id']) && $row['bullet_id'] ? $row['bullet_id'] : NULL;\r\n\t\t\t\t\tif (!file_exists($this->local_folder . $arr[0] . \"_\" . $Id . \".\" . $file_extension) && (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime']))) {\r\n\t\t\t\t\tthumbanail_for_image($Id, $row['image_link']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (preg_match('/^image\\/(jp[e]?g|png|gif)$/', $sizee['mime'])) {\r\n\t\t\t\t\t$row['image_link'] = isset($row['image_link']) && (strlen($row['image_link']) > 7) ? event_image_detail($Id, $row['image_link'], 1) : NULL;\r\n\t\t\t\t\tlist($width_image_link, $height_image_link) = (isset($row['image_link']) && (strlen($row['image_link']) > 7)) ? getimagesize($this->local_folder . $row['image_link']) : NULL;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$check = isset($row['mem_id']) && ($row['mem_id']) ? $row['mem_id'] : \"\";\r\n\t\t$row['profilenam'] = isset($row['profilenam']) && ($row['profilenam']) ? $row['profilenam'] : \"\";\r\n\t\t$row['gender'] = isset($row['gender']) && ($row['gender']) ? $row['gender'] : \"\";\r\n\t\t$row['profile_type'] = isset($row['profile_type']) && ($row['profile_type']) ? $row['profile_type'] : \"\";\r\n\t\t\r\n\t\tif ($check) {\r\n\t\t\t$row['photo_id'] = isset($row['photo_id']) ? $row['photo_id'] : \"\";\r\n\t\t $row['photo_thumb'] = (isset($row['photo_thumb']) && (strlen($row['photo_thumb']) > 7)) ? $this->profile_url . $row['photo_thumb'] : $this->profile_url . default_images1($row['gender'], $row['profile_type']);\r\n\t\t\t\r\n\t\t\t $row['photo_thumb'] = ((isset($row['is_facebook_user'])) && (strlen($row['photo_thumb']) > 7) && ($row['is_facebook_user'] == 'y' || $row['is_facebook_user'] == 'Y')) ? ((strstr($row['photo_thumb'],\"photos\")!=FALSE && strstr($row['photo_thumb'],\"http\")==FALSE) ? $this->profile_url.$row['photo_thumb'] : $row['photo_thumb']) : ((isset($row['photo_thumb']) && (strlen($row['photo_thumb']) > 7)) ? $this->profile_url . $row['photo_thumb'] : $this->profile_url . default_images($row['gender'], $row['profile_type']));\r\n\r\n\t\t \r\n\t\t $row['photo_b_thumb'] = ((isset($row['is_facebook_user'])) && (strlen($row['photo_b_thumb']) > 7) && ($row['is_facebook_user'] == 'y' || $row['is_facebook_user'] == 'Y')) ? ((strstr($row['photo_b_thumb'],\"photos\")!=FALSE && strstr($row['photo_b_thumb'],\"http\")==FALSE) ? $this->profile_url.$row['photo_b_thumb'] : $row['photo_b_thumb']) : ((isset($row['photo_b_thumb']) && (strlen($row['photo_b_thumb']) > 7)) ? $this->profile_url . $row['photo_b_thumb'] : $this->profile_url . default_images($row['gender'], $row['profile_type']));\r\n\r\n\t\t $row['link_image'] = isset($row['link_image']) && (strlen($row['link_image']) > 7) ? $this->profile_url . $row['link_image'] : NULL;\r\n\t\t $row['youtubeLink'] = isset($row['youtubeLink']) ? $row['youtubeLink'] : NULL;\r\n\t\t $row['link_url'] = isset($row['link_url']) ? $row['link_url'] : NULL;\r\n\t\t $row['image_link'] = isset($row['image_link']) && (strlen($row['image_link']) > 7) ? $this->profile_url . $row['image_link'] : NULL;\r\n\t\t $input = $row['testimonial'];\r\n\t\t $input = str_replace('\\\\', '', $input);\r\n\t\t //to get the type data in the Post like url || text\r\n\t\t if (preg_match(REGEX_URL, $input, $url)) {\r\n\t\t\t$postType = extract_url($input);\r\n\t\t\t$postType = strip_tags($postType);\r\n\t\t\t$postType = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"<br />\", \"\\\"\"), \"\\\\n\", $postType);\r\n\t\t } else {\r\n\t\t\t$postType = 'text';\r\n\t\t }\r\n\t\t \r\n\r\n\t\t /* Added below line on 25 Nov 2011 :: aarya */\r\n\t\t $row['testimonial'] = get_organized_comment_data($row['testimonial'], NULL);\r\n\r\n\t\t $row['photo_album_id'] = isset($row['photo_album_id']) && ($row['photo_album_id']) ? $row['photo_album_id'] : NULL;\r\n\r\n\t\t $postVia = ((isset($row['post_via'])) && ($row['post_via'])) ? \"iPhone\" : \"\";\r\n\t\t $date = time_difference($row['added']); \r\n\t\t\t\r\n\t\t $str_temp = '{\r\n \"postId\":\"' . str_replace('\"', '\\\"', trim($row['tst_id'])) . '\",\r\n \"authorID\":\"' . str_replace('\"', '\\\"', trim($row['mem_id'])) . '\",\r\n \"authorProfileImgURL\":\"' . str_replace('\"', '\\\"', trim($row['photo_b_thumb'])) . '\",\r\n \"authorName\":\"' . str_replace('\"', '\\\"', trim(preg_replace('/\\s+/', ' ', $row['profilenam']))) . '\",\r\n \"gender\":\"' . str_replace('\"', '\\\"', trim($row['gender'])) . '\",\r\n \"profileType\":\"' . str_replace('\"', '\\\"', trim($row['profile_type'])) . '\",\r\n \"postText\":\"' . trim(preg_replace('/\\s+/', ' ', str_replace(\"\\'\", \"'\", htmlspecialchars_decode(str_replace('\"', '\\\"', $row['testimonial']), ENT_QUOTES)))) . '\",\r\n \"postType\":\"' . str_replace('\"', '\\\"', trim($postType)) . '\",\r\n \"photoId\":\"' . str_replace('\"', '\\\"', trim($row['photo_id'])) . '\",\r\n \"uploadedImage\":\"' . str_replace('\"', '\\\"', trim($row['image_link'])) . '\",\r\n \"width_image_link\":\"' . str_replace('\"', '\\\"', trim($width_image_link)) . '\",\r\n \"height_image_link\":\"' . str_replace('\"', '\\\"', trim($height_image_link)) . '\",\r\n \"link_url\":\"' . str_replace('\"', '\\\"', trim($row['link_url'])) . '\",\r\n \"youtubeLink\":\"' . str_replace('\"', '\\\"', trim($row['youtubeLink'])) . '\",\r\n \"link_image\":\"' . str_replace('\"', '\\\"', trim($row['link_image'])) . '\",\r\n \"width_link_image\":\"' . str_replace('\"', '\\\"', trim($width_link_image)) . '\",\r\n \"height_link_image\":\"' . str_replace('\"', '\\\"', trim($height_link_image)) . '\",\r\n \"postTimestamp\":\"' . str_replace('\"', '\\\"', trim($date)) . '\",\r\n \"postVia\":\"' . str_replace('\"', '\\\"', trim($postVia)) . '\",\r\n \"albumId\":\"' . str_replace('\"', '\\\"', trim($row['album_id'])) . '\",\r\n \"commentsCount\":\"' . str_replace('\"', '\\\"', trim($row['tot_comment'])) . '\"\r\n }';\r\n\t\t $postcount++;\r\n\t\t $str = $str . $str_temp;\r\n\t\t $str = $str . ',';\r\n\t\t\r\n\t\t}\t\r\n\t\t$count++;\r\n\t \t}\r\n\t }\r\n\t$count = isset($count) && ($count) ? $count : 0;\r\n\t$data['count']=$count;\r\n\t$data['str']=$str;\r\n\t\r\n\t/*for ($i = 0; $i < $count; $i++) {\r\n\t $id = isset($result_profile_hotpress[$i]['tst_id']) && ($result_profile_hotpress[$i]['tst_id']) ? $result_profile_hotpress[$i]['tst_id'] : NULL;\r\n\t $result_profile_hotpress[$i]['tot_comment'] = $this->get_total_comment_count($id);\r\n\t}*/\r\n\r\n\treturn $data;\r\n }", "function getGalleriffic_start() {\r\r\n global $g1;\r\r\n\treturn \"<link rel='stylesheet' href='templates/Galleriffic1/css/galleriffic-3.css' type='text/css' />\r\r\n\t<script type='text/javascript' src='templates/Galleriffic1/js/jquery-1.3.2.js'></script>\r\r\n\r\r\n\t<script type='text/javascript' src='templates/Galleriffic1/js/jquery.galleriffic.js'></script>\r\r\n\t<script type='text/javascript' src='templates/Galleriffic1/js/jquery.opacityrollover.js'></script>\r\r\n\t<!-- We only want the thunbnails to display when javascript is disabled -->\r\r\n\t<script type='text/javascript'>\r\r\n\t\tdocument.write('<style>.noscript { display: none; }</style>');\r\r\n document.write('<style>div.content { width: \".$g1['cont_width'].\"; height: \".$g1['gal_height'].\"; }</style>');\r\r\n document.write('<style>div.slideshow-container { min-height: \".$g1['cont_height'].\"; }</style>');\r\r\n document.write('<style>div.slideshow-container img { max-width: \".$g1['img_width'].\"; max-height: \".$g1['img_height'].\"; }</style>');\r\r\n document.write('<style>div.loader { min-height: \".$g1['cont_height'].\"; width: \".$g1['cont_width'].\"; }</style>');\r\r\n document.write('<style>div.slideshow a.advance-link { width: \".$g1['cont_width'].\"; min-height: \".$g1['cont_height'].\"; line-height: \".$g1['cont_height'].\"; }</style>');\r\r\n document.write('<style>div.slideshow img { max-height: \".$g1['img_height'].\"; max-width: \".$g1['img_width'].\"; }</style>');\r\r\n document.write('<style>span.image-caption { width: \".$g1['cont_width'].\"; }</style>');\r\r\n document.write('<style>div.navigation { width: \".$g1['nav_width'].\"; }</style>');\r\r\n\t</script>\";\r\r\n}", "private function GetNotif($id, $conn)\n {\n\n $daoMessage = new DaoMessage();\n $response = $daoMessage->SelectSocketNotif($id);\n\n\n if ($response['error']) {\n echo \"----------------------\" . PHP_EOL;\n echo $response['message'] . PHP_EOL;\n echo \"----------------------\" . PHP_EOL;\n $conn->send((string)json_encode(array(\n \"error\" => true,\n \"message\" => $response['message']\n )));\n }\n\n foreach ($this->connections as $connection) {\n\n if ($response['data'][0]->id_user_create == $this->connections[$connection]['id']) {\n\n $complete_object = (string)json_encode(array(\n \"error\" => false,\n \"id_user\" => 'id',\n \"id_checklist\" => 'id_checklist',\n \"objectType\" => '//'\n ));\n $connection->send($complete_object);\n }\n }\n }", "public function addCif($title, $description, $member, $category)\r\n {\r\n $reqAddCif = $this->db->prepare('INSERT INTO t_cif(idCif, cifTitle, cifDescription, fkMember, fkCategory) VALUES(NULL, :cifTitle, :cifDescription, (SELECT idMember FROM t_member WHERE memPseudo = :memPseudo), (SELECT idCategory FROM t_category WHERE catName = :catName)) ');\r\n $reqAddCif->execute(array(\r\n 'cifTitle' => $title,\r\n 'cifDescription' => $description,\r\n 'memPseudo' => $member,\r\n 'catName' => $category\r\n ));\r\n }", "public static function getBannerPicture($id)\n {\n// $curl->setAccessToken(Cookie::get('authToken'));\n// $response = $curl->httpGet(ApiUrl::$url.'getDisplayBanner/'.$id);\n//// $response = json_decode($response, true);\n//\n// return $response;\n return ApiUrl::$url.'getDisplayBanner/'.$id;\n }", "public function NEW_fetch_comment_christian_news($news_id='')\n\t{\n\t\ttry\n\t\t {\n\t\t\t $data = $this->data; \n\t\t\t $html = ''; \n\t\t\t $result = $this->landing_page_cms_model->get_comment_by_news_id($news_id);\n\t\t\t\n\t\t\t// pr($result);\n\t\t\t if(count($result)){\n\t\t\t\t \n\t\t\t\t foreach($result as $key=> $val){\n\t\t\t\t\t \n\t\t\t\t\t $profile_image_filename = get_profile_image($val['i_posted_user_id'],'thumb');\n\t\t\t \t\t $DESC = html_entity_decode(htmlspecialchars_decode($val['s_contents']),ENT_QUOTES,'utf-8');\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t $html .= '<div class=\"txt_content01 comments-number-content\"> \n\t\t\t\t\t \t\t\t<a href=\"javascript:void(0);\"><div style=\"background:url('.$profile_image_filename.') no-repeat center;width:60px; height:60px;\" class=\"pro_photo3\" ></div></a>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t <p class=\"blue_bold12\"><a href=\"javascript:void(0);\">'.$val['s_profile_name'].'</a></p>\n\t\t\t\t\t\t\t\t\t\t <p>'.nl2br($DESC).'</p>\n\t\t\t\t\t\t\t\t\t\t\t <p class=\"read-more txt\">Updated on: '.get_time_elapsed($val['dt_commented_on']).'</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"clr\"></div>\n\t\t\t\t\t\t\t </div>'; \n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t\t echo json_encode( array('result'=>'success','html_data'=>$html) );\n\t\t } \n\t\t\tcatch(Exception $err_obj)\n\t\t\t{\n\t\t\t show_error($err_obj->getMessage());\n\t\t\t} \n\t\t\t\n\t}", "public function get_comment();" ]
[ "0.6918587", "0.6373034", "0.55923116", "0.55398756", "0.55040264", "0.54107624", "0.53813976", "0.53779054", "0.5336471", "0.52939546", "0.5250689", "0.52495146", "0.5230155", "0.5218188", "0.5182718", "0.5182171", "0.5181696", "0.5178596", "0.5167777", "0.5166081", "0.51559913", "0.5147363", "0.5111581", "0.5080782", "0.5071294", "0.5056717", "0.50343347", "0.5004012", "0.49989387", "0.49985868", "0.49932674", "0.49885127", "0.49843413", "0.49586037", "0.49540812", "0.4952015", "0.4950509", "0.49500892", "0.49466345", "0.4920578", "0.49174902", "0.49122903", "0.49071714", "0.49009132", "0.48979977", "0.48894405", "0.48830536", "0.48813868", "0.48745215", "0.4869314", "0.4861929", "0.48599842", "0.4856854", "0.4851165", "0.48445532", "0.48362252", "0.48319912", "0.48313853", "0.4831073", "0.48216185", "0.48187643", "0.48137224", "0.48117143", "0.48110074", "0.48100498", "0.48061952", "0.48031914", "0.4801671", "0.4798656", "0.47936338", "0.479085", "0.47899574", "0.47896847", "0.47880903", "0.4788054", "0.4784635", "0.47820374", "0.47748503", "0.47730145", "0.47660008", "0.4764128", "0.47554407", "0.47539908", "0.4750092", "0.47441348", "0.47430325", "0.4740869", "0.47387472", "0.47376174", "0.47364044", "0.4735766", "0.4730409", "0.4729476", "0.47261006", "0.47258693", "0.47213495", "0.47199392", "0.47187546", "0.47178498", "0.4716788" ]
0.7309745
0
Creates Admin menu entry.
Создает пункт меню Admin.
function create_admin_menu_entry () { if (@$_POST && isset($_POST['option_page']) && 'wdcp' == @$_POST['option_page']) { if (isset($_POST['wdcp_options'])) { $this->data->set_options($_POST['wdcp_options']); } $goback = add_query_arg('settings-updated', 'true', wp_get_referer()); wp_redirect($goback); die; } $page = WP_NETWORK_ADMIN ? 'settings.php' : 'options-general.php'; $perms = WP_NETWORK_ADMIN ? 'manage_network_options' : 'manage_options'; add_submenu_page($page, __('Comments Plus', 'wdcp'), __('Comments Plus', 'wdcp'), $perms, 'wdcp', array($this, 'create_admin_page')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMenuSettings(){\n new adminMenu();\n }", "public function run()\n {\n Menu::create([\n 'title' => 'Administrator Menu',\n 'type' => 'backend',\n 'description' => 'Administrator Default Main Menu'\n ]);\n }", "public static function OnMenuCreation()\n\t{\n\t\tif (utils::GetCurrentEnvironment() == 'production')\n\t\t{\n\t\t\t// Add the admin menus\n\t\t\tif (UserRights::IsAdministrator())\n\t\t\t{\n\t\t\t\t$oAdminMenu = new MenuGroup('AdminTools', 80 /* fRank */);\n\t\t\t\tnew WebPageMenuNode('ITSMDesignerMenu', utils::GetAbsoluteUrlModulePage('itsm-designer-connector', 'launch.php'), $oAdminMenu->GetIndex(), 9 /* fRank */);\n\t\t\t}\n\t\t}\n\t}", "public function create()\n\t{\n\t\treturn view('admin.menu.create');\n\t}", "public function createAdminMenu()\n {\n // Add Settings Sub Option Page\n add_submenu_page('BuzzSEO', __('XML Sitemaps', 'buzz-seo'), __('XML Sitemaps', 'buzz-seo'), 'buzz_seo_settings_sitemaps',\n 'BuzzSEO_XMLSitemaps', array($this, \"addAdminUI\"));\n }", "public function create ()\n {\n if (!check_admin_auth ($this->module_name . '_' . __FUNCTION__)) {\n return auth_error_return ();\n }\n $menu = $this->repository->makeModel ();\n $_method = 'POST';\n $menus = Menu::orderBy ('sort', 'asc')->get ();\n $menus = $menus->toArray ();\n $menuPidList = list_to_tree ($menus);\n $maxSort = Menu::max ('sort');\n $menu->sort = $maxSort ? $maxSort + 1 : 99;\n\n return view ('admin.' . $this->module_name . '.add', compact ('menu', '_method', 'menuPidList'));\n }", "public function admin_menu() {\n }", "public function create()\n {\n if (!empty($this->menu)) {\n add_action('admin_menu', array($this, 'addMenuPages'));\n }\n }", "public function create()\n\t{\n\t\t$menu_item = new \\MenuItem();\n\n\t\t$this->layout->content = \\View::make( 'admin.menu_items.create' )\n\t\t\t->with( 'menu_item', $menu_item );\n\t}", "public function new_menu_item() {\n \n // Get menu's item parameters\n (new MidrubBaseAdminCollectionUserHelpers\\Menu)->new_menu_item();\n \n }", "public function create()\n {\n View::share('title', 'Menüpontok');\n\n $this->layout->content = View::make('admin.menu.create')\n ->with('menuItems', MenuItem::all())\n ->with('menus', Menu::getMenus())\n ->with('parents', MenuItem::getMenuItems())\n ->with('types', MenuItem::types())\n ->with('articleTags', Tag::getArray())\n ->with('articles', Article::getArray())\n ->with('eventTags', Tag::getArray())\n ->with('events', Event::getArray())\n ->with('galleries', Gallery::getGalleries())\n ->with('pages', Page::getArray())\n ->with('documentCategories', DocumentCategory::getArray());\n\n }", "public function adminCreate()\n\t{\n\t\t//\n\t}", "public static function addMenuAction() {\n global $menu;\n $menu_slug = NpAdminActions::adminUrlFilter(admin_url('post-new.php?post_type=page&np_new=1'));\n $menu_slug_2 = 'Colors and Fonts';\n $capability = 'edit_pages';\n $menu['56'] = array(__('Nicepage', 'nicepage'), $capability, $menu_slug, '', 'menu-top menu-icon-nicepage', 'menu-nicepage', 'div');\n $menu['58'] = array(__('Colors and Fonts', 'nicepage'), $capability, $menu_slug_2, '', 'menu-top menu-icon-nicepage-2', 'menu-nicepage-2', 'div');\n }", "public function add_admin_menu() {\r\n # add a main menu\r\n add_menu_page(\r\n 'Manage Dayen Newslatter plugin', # label showed into title tag\r\n 'Dayen Plugin', # title showed in menu\r\n 'manage_options', # capability\r\n 'dayen_newslatter', # ID of menu\r\n [ $this, 'menu_html' ] # the callback called when render a page content\r\n );\r\n # add submenu & return a value of current page to use it when send a newslatter\r\n $hook = add_submenu_page(\r\n \"dayen_newslatter\", # parent manu ID\r\n \"This is a submenu page\",# label showed into title tag\r\n \"Dayen Newslatter\",# title showed in menu\r\n \"manage_options\",# capability\r\n \"dayen_newslatter_submenu\",# ID of menu\r\n [ $this, \"menu_html\" ]# the callback called when render a page conten\r\n );\r\n # listening to load-$hook event to retreive some data to start a send newslatter process\r\n add_action( \"load-$hook\", [ $this, \"process_action\"] );\r\n }", "public function create()\n {\n if(!isSuperAdmin()) {\n abort(401);\n }\n $parentdata = (new Menu)->parentData();\n return view('admin.menu.create',compact('parentdata'));\n }", "function menuCreate(){\n $this->menu = [\n 'account' => ['link'=>'?account', 'title'=>$GLOBALS['topbar']['hi'].', '.$this->username.'!'],\n 'user_logout' => ['link'=>'?user_logout','title'=>$GLOBALS['topbar']['logout']],\n 'user_login' => ['link'=>'?user_login', 'title'=>$GLOBALS['topbar']['login']],\n 'user_register' => ['link'=>'?user_register', 'title'=> $GLOBALS['topbar']['register']]\n ];\n Gui::setTopbarMenu($this->menu['account'], 'logged', 'left');\n Gui::setTopbarMenu($this->menu['user_logout'], 'logged', 'right');\n Gui::setTopbarMenu($this->menu['user_login'], 'out', 'right');\n Gui::setTopbarMenu($this->menu['user_register'], 'out', 'right');\n }", "public function onAdminMenu()\n {\n if ($this->config->get('plugins.static-generator.quick_tray')) {\n $index = [\n 'authorize' => $this->config->get('plugins.static-generator.quick_tray_permissions'),\n 'hint' => $this->grav['language']->translate(\n ['PLUGIN_STATIC_GENERATOR.ADMIN.INDEX.HINT']\n ),\n 'class' => 'static-generator-index',\n 'icon' => 'fa-bolt'\n ];\n $this->grav['twig']->plugins_quick_tray['static-generator-index'] = $index;\n $content = [\n 'authorize' => $this->config->get('plugins.static-generator.quick_tray_permissions'),\n 'hint' => $this->grav['language']->translate(\n ['PLUGIN_STATIC_GENERATOR.ADMIN.CONTENT.HINT']\n ),\n 'class' => 'static-generator-content',\n 'icon' => 'fa-archive'\n ];\n $this->grav['twig']->plugins_quick_tray['static-generator-content'] = $content;\n }\n }", "public function create()\n {\n return view('admin.add_menu' , self::$data);\n }", "public function add_admin_menu(){\n\t\tadd_menu_page('Invitation d\\'événement', 'Event Invitation', 'manage_options', 'cadre21', array($this, 'plugin_routing'), 'dashicons-groups',30);\n\t\tadd_submenu_page('cadre21', 'Créer un nouveau groupe', 'Créer un nouveau groupe', 'manage_options', 'cadre21-creation', array($this, 'creation_html'));\n\t}", "public static function addAdminMenuPage()\n\t\t{\n\t\t\tif ( is_admin() )\n\t\t\t{\n\t\t\t\tif ( is_multisite() ) AdminMenuModule::addPageToNetwork( new LogAdminMenuPage( AdminMenuPage::PARENT_SLUG_NETWORK_SETTINGS ) );\n\t\t\t\tAdminMenuModule::addPage( new LogAdminMenuPage( AdminMenuPage::PARENT_SLUG_SETTINGS ) );\n\t\t\t}\n\t\t}", "public function addAdminMenu(){\n\t\t\tadd_menu_page( 'quake', 'Quake Notifier', '', 'quake');\n\t\t\tadd_submenu_page('quake', 'Quake Config', 'Quake Config', 'manage_options', 'quake_config', array($this, 'adminQuake'));\n\t\t\tadd_submenu_page('quake', 'Quake Update', 'Quake Update', 'manage_options', 'quake_update', array($this, 'updateQuake'));\n\t\t}", "public function create()\n {\n //\n\t\t$this->title = 'Новый пункт меню';\n\t\t\n\t\t$tmp = $this->getMenus()->roots();\n\t\t\n\t\t$menus = $tmp->reduce(function($returnMenus, $menu){\n\t\t\t\n\t\t\t$returnMenus[$menu->id] = $menu->title;\n\t\t\treturn $returnMenus;\n\t\t\t\n\t\t},['0' => 'Родительський пункт меню']);\n\t\t\n\t\t$this->content = view(config('settings.theme').'.admin.menus_create_content')->with(['menus'=>$menus])->render();\n\t\treturn $this->renderOutput();\n }", "public function addmenu()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'menumanager', 'create')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tinclude_once '../'.DIR_CON.'/component/menumanager/modules/menu.php';\n\t\t$instance = new Menu;\n\t\t$instance->add();\n\t}", "private function gen_admin_menu()\n {\n $admin_menu = array (array(\n 'name' => $this->user->lang('guildrequest'),\n 'icon' => './../../plugins/guildrequest/images/adminmenu/guildrequest.png',\n 1 => array (\n 'link' => 'plugins/guildrequest/admin/form.php'.$this->SID,\n 'text' => $this->user->lang('gr_manage_form'),\n 'check' => 'a_guildrequest_form',\n 'icon' => './../../plugins/guildrequest/images/adminmenu/form.png'\n ),\n\t\t/*\n\t\t2 => array (\n 'link' => 'plugins/guildrequest/admin/settings.php'.$this->SID,\n 'text' => $this->user->lang('settings'),\n 'check' => 'a_guildrequest_settings',\n 'icon' => 'manage_settings.png'\n ),\n\t\t*/\n ));\n\n return $admin_menu;\n }", "static function create_the_menu(){\n\t\tadd_menu_page(__('wp add management'), __('Advertising'), 'activate_plugins', 'add_management', array(get_class(),'management_page'));\n\t\tadd_submenu_page('add_management',__('add new advertisement'),__('Add New'),'activate_plugins','advertisent_addition',array(get_class(),'ad_add'));\n\t}", "static function adminMenus() {\n\n\t\t// Add the main menu item\n\t\tadd_menu_page(\"Page Title\", \"Menu Title\", \"manage_options\",\n\t\t \"plugin_main\", array(get_called_class(), \"menuItem\"),\n\t\t \"dashicons-admin-tools\");\n\t}", "public function create_admin_page() {\n \n $submenu_page = add_submenu_page(\n 'options-general.php',\n _x( 'PyImageSearch DPD+HelpScout', 'Admin Page Title', 'pyis-dpd-helpscout' ),\n _x( 'DPD+Helpscout', 'Admin Menu Title', 'pyis-dpd-helpscout' ),\n 'manage_options',\n 'pyis-dpd-helpscout',\n array( $this, 'admin_page_content' )\n );\n \n }", "public function create()\n {\n return view('admin.menu.create');\n }", "public function create()\n {\n return view('admin.menu.create');\n }", "public function create()\n {\n return view('admin.addMenuItem');\n }", "public static function createAdminMenu($action) {\n //create the admin menu\n $adminMenu = array(\n array(\n 'name' => 'index',\n 'level' => 0,\n 'link' => 'admin',\n 'title' => 'Administration : vue d\\'ensemble',\n 'text' => 'Vue d\\'ensemble'\n ),\n array(\n 'name' => 'episode',\n 'level' => 0,\n 'link' => 'admin/episodes',\n 'title' => 'Les chapitres du livre',\n 'text' => 'Episodes'\n ),\n array(\n 'name' => 'creer',\n 'level' => 1,\n 'link' => 'admin/creer',\n 'title' => 'Créer un nouvel épisode',\n 'text' => 'Créer'\n ),\n array(\n 'name' => 'modifier',\n 'level' => 1,\n 'link' => 'admin/modifier',\n 'title' => 'Modifier un épisode existant',\n 'text' => 'Modifier'\n ),\n array(\n 'name' => 'message',\n 'level' => 0,\n 'link' => 'admin/messages',\n 'title' => 'Les messages des lecteurs',\n 'text' => 'Messages'\n ),\n array(\n 'name' => 'profil',\n 'level' => 0,\n 'link' => 'admin/profil',\n 'title' => 'Mon profil',\n 'text' => 'Profil'\n ),\n array(\n 'name' => 'changer',\n 'level' => 1,\n 'link' => 'admin/changer',\n 'title' => 'Modifier mon profil',\n 'text' => 'Modifier'\n )\n );\n try {\n $admin_menu = \"\";\n //create menu\n for ($row = 0; $row < count($adminMenu); $row++) {\n $admin_menu .= '<li class=\"ad-menu-level' . $adminMenu[$row]['level'] . '';\n if ($action == $adminMenu[$row]['name']) {\n $admin_menu .= ' current';\n }\n $admin_menu .= \"\\\">\\n\";\n $admin_menu .= '<a href=\"' . $adminMenu[$row]['link'] . '\" title=\"' . $adminMenu[$row]['title'] . '\">';\n $admin_menu .= $adminMenu[$row]['text'] . \"</a>\\n</li>\\n\";\n }\n return $admin_menu;\n } catch (Exception $ex) {\n throw new Exception($ex);\n }\n }", "function admin_menu()\n { \n add_submenu_page(\n 'tools.php',\n __(\"Wang Jin Che Table\", 'wjc'),\n __(\"Wang Jin Che Table\", 'wjc'),\n 'manage_options',\n 'wjc-table',\n array( $this, 'create_admin_page' ),\n );\n }", "public function createAction() {\n\n //GET THE MENU NAME WHICH IS BEING EDITED\n $name = $this->_getParam('name');\n\n //GET THE MODULE LIST THAT CAN BE CHOOSEN TO SHOW CONTENT\n $moduleArray = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getContentList();\n\n if ($name == 'core_main') {\n // Get form\n $this->view->form = $form = new Sitemenu_Form_Admin_Menu_ItemCreate(array('moduleArray' => $moduleArray, 'isCustom' => '1'));\n\n // Check stuff\n if (!$this->getRequest()->isPost()) {\n return;\n }\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n // Save\n $values = $form->getValues();\n\n if ($values['show_in_tab'] == 1 && empty($values['icon'])) {\n $form->addError(\"Please enter icon as you have selected only icon.\");\n return;\n }\n $label = $values['label'];\n unset($values['label']);\n\n // IF THE OPTION SELECTED MENU ITEM IS NOT A SUBMENU\n if ($values['is_submenu'] == 0) {\n $values['root_id'] = 0;\n $values['parent_id'] = 0;\n }\n\n //IF THE MENU ITEM IS NOT A SUBMENU THEN SET THE VIEW TYPE AS OF PARENT MENU\n $menuItemsTable = Engine_Api::_()->getDbtable('menuItems', 'core');\n if (!empty($values['root_id'])) {\n $params = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('params'), $values['root_id']);\n\n if (!empty($params) && isset($params['menu_item_view_type'])) {\n $params = Zend_Json::decode($params);\n if ($params['menu_item_view_type'] == 1 || $params['menu_item_view_type'] == 2) {\n $values['content'] = 0;\n $values['viewby'] = 0;\n $values['is_category'] = 0;\n $values['category_id'] = 0;\n $values['content_height'] = 0;\n }\n }\n }\n\n if (empty($values['root_id'])) {\n if (isset($values['menu_item_view_type']) && $values['menu_item_view_type'] != 1 && $values['menu_item_view_type'] != 2) {\n if (!is_numeric($values['content_height']) || $values['content_height'] <= 0) {\n $form->addError(\"Please enter valid height. Height should be a number. \");\n return;\n }\n }\n }\n\n if (empty($values['is_sub_navigation'])) {\n $values['sub_navigation'] = 0;\n }\n unset($values['select_sub_navigation']);\n unset($values['message']);\n unset($values['noSubMenuMessage']);\n unset($values['is_submenu']);\n if (isset($values['lumious_enabled_message']))\n unset($values['lumious_enabled_message']);\n\n if (isset($values['data_rel'])) {\n $values['data-rel'] = $values['data_rel'];\n unset($values['data_rel']);\n }\n\n if (!empty($values['parent_id'])) {\n $menuItemEnabled = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('enabled'), $values['parent_id']);\n $order = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('order'), $values['parent_id']);\n if ($menuItemEnabled != $values['enabled']) {\n if (empty($menuItemEnabled)) {\n $form->addError(\"Please uncheck the 'Enabled?' checkbox. Parent sub menu is disabled therefore this menu cannot be enabled.\");\n return;\n }\n }\n } elseif (!empty($values['root_id'])) {\n $menuItemEnabled = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('enabled'), $values['root_id']);\n $order = Engine_Api::_()->getDbtable('modules', 'sitemenu')->getMenuItemColum(array('order'), $values['root_id']);\n if ($menuItemEnabled != $values['enabled']) {\n if (empty($menuItemEnabled)) {\n $form->addError(\"Please uncheck the 'Enabled?' checkbox. Parent menu is disabled therefore this menu cannot be enabled.\");\n return;\n }\n }\n }\n\n $db = $menuItemsTable->getAdapter();\n $db->beginTransaction();\n\n try {\n include APPLICATION_PATH . '/application/modules/Sitemenu/controllers/license/license2.php';\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n $this->view->status = false;\n $this->view->error = true;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRedirect' => $this->view->url(array('module' => 'sitemenu', 'action' => 'editor', 'controller' => 'menu-settings'), 'admin_default', true),\n 'format' => 'smoothbox',\n 'messages' => \"Your Menu Item has been created successfully.\"\n ));\n }\n }", "public function add_admin_menu() {\n add_submenu_page(\n self::SETTINGS_PAGE_SLUG,\n 'Set Templates',\n 'Set Templates',\n $this->min_level,\n self::SETTINGS_PAGE_SLUG . 'settings',\n array( $this, 'display_settings_page' ) \n );\n\n\n // Register submenu for README page\n add_submenu_page(\n self::SETTINGS_PAGE_SLUG,\n 'README',\n 'Help',\n $this->min_level, \n self::SETTINGS_PAGE_SLUG . \n '-readme', \n array( $this, 'display_readme' ) \n );\n }", "public function display_admin_menu_item() {\n add_menu_page(\n 'Visit Seattle Events Importer',\n 'Events Importer',\n 'manage_options',\n 'visit-seattle-events-importer',\n array( 'VSEI_Admin', 'display_page' ),\n 'dashicons-update'\n );\n }", "public function register_admin_menu() {\n\t\tadd_management_page( 'New Post Format Unmigrator', 'New Post Formats', 'manage_options', 'new-post-format-unmigrator', array( $this, 'admin_page' ) );\n\t}", "function add_admin_menu(){\r\n\t\t\t// add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', string $icon_url = '', int $position = null )\r\n\t\t\t// Add a top-level menu page.\r\n\t\t\t add_menu_page( 'Leadify', 'Leadify', 'leadify_access', 'leadify', array($this,'admin_dashboard'), 'div' );\r\n\t\t}", "public function makeMenu() {\n\n $currentUserInfo = Mage::helper('deleteorder')->getCurrentUser();\n $allowedUsers = Mage::helper('deleteorder')->getAllowedUsers();\n $defaultAdmin = Mage::helper('deleteorder')->getDefaultAdmin();\n $menu = Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode('menu');\n $menuTempXml = '<deleteorder module=\"deleteorder\">\n <depends><config>deleteordersettings/general/enable</config></depends>\n <title>Delete Orders</title>\n <sort_order>100</sort_order>\n <children>\n <deleteorder module=\"deleteorder\">\n <title>Delete Orders</title>\n <sort_order>0</sort_order>\n <children>\n <deletefromordergrid module=\"deleteorder\">\n <depends><config>deleteordersettings/general/enablegriddelete</config></depends>\n <title>Delete From Order Grid</title>\n <sort_order>0</sort_order>\n <action>adminhtml/sales_order</action>\n </deletefromordergrid>\n <manualdelete module=\"deleteorder\">\n <title>Manual Delete</title>\n <sort_order>1</sort_order>\n <action>admin_deleteorder/adminhtml_deleteorder/manualDeleteView</action>\n </manualdelete>\n </children>\n </deleteorder>\n\n <deletehistory module=\"deleteorder\">\n <title>Delete Orders History</title>\n <sort_order>1</sort_order>\n <action>admin_deleteorder/adminhtml_deleteorder/index</action>\n </deletehistory>\n </children>\n </deleteorder>';\n $nodeMenuTemp = new Mage_Core_Model_Config_Element($menuTempXml);\n if ($currentUserInfo == $defaultAdmin || $defaultAdmin == '') {\n $menu->appendChild($nodeMenuTemp);\n } elseif (in_array($currentUserInfo, $allowedUsers)) {\n $menu->appendChild($nodeMenuTemp);\n } else {\n \n }\n }", "function Admin_admin_new()\n{\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n $pnRender = new pnRender('Admin');\n\n // As Admin output changes often, we do not want caching.\n $pnRender->caching = false;\n\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin::Item', '::', ACCESS_ADD)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('admin_admin_new.htm');\n}", "public static function NEW_MENU(){\n\t\tLibMenuBar::startTable();\n\t\tLibMenuBar::save('saveclient');\n\t\tLibMenuBar::cancel('cancelclient');\n\t\tLibMenuBar::endTable();\n\t}", "public function adminMenu() {\r\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\r\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"Audit Logging\", wp_defender()->domain ), esc_html__( \"Audit Logging\", wp_defender()->domain ), $cap, $this->slug, array(\r\n\t\t\t&$this,\r\n\t\t\t'actionIndex'\r\n\t\t) );\r\n\t}", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "public function add_menu_page() {\n\t\t\t$page_title = __( 'Etix API', 'tribe-events-calendar' );\n\t\t\t$menu_title = __( 'Etix API', 'tribe-events-calendar' );\n\t\t\t$capability = \"edit_tribe_venues\";\n\n\t\t\t// Tribe__Events__Main should be active by now\n\t\t\t$where = 'edit.php?post_type=' . Tribe__Events__Main::POSTTYPE;\n\n\t\t\t$this->admin_page = add_submenu_page( $where, $page_title, $menu_title, $capability, self::MENU_SLUG, array( $this, 'do_menu_page' ) );\n\n\t\t}", "function LB_admin_add() {\n\t add_menu_page( 'Link Bar Settings', 'Link Bar', 1, 'link-bar-settings', 'LB_admin_create', 'dashicons-share-alt2');\n}", "public static function add_admin_menu() {\n\t\t\t\tadd_menu_page(\n\t\t\t\t\tesc_html__( 'Alep', 'text-domain' ),\n\t\t\t\t\tesc_html__( 'Alep', 'text-domain' ),\n\t\t\t\t\t'manage_options',\n\t\t\t\t\t'theme-settings',\n\t\t\t\t\tarray( 'alep_Theme_Options', 'create_admin_page' )\n\t\t\t\t);\n\t\t\t}", "public static function NEW_MENU(){\n\t\tLibMenuBar::startTable();\n\t\tLibMenuBar::save('savecategory');\n\t\tLibMenuBar::cancel('cancelcategory');\n\t\tLibMenuBar::endTable();\n\t}", "public function add_admin_menu()\n { \n add_menu_page('Carte interactive', 'Carte interactive', 'manage_options', 'carte-interactive', array($this, 'pageAccueil')); \n add_submenu_page('carte-interactive', 'Apercus', 'Apercus', 'manage_options', 'carte-interactive', array($this, 'pageAccueil'));\n add_submenu_page('carte-interactive', 'Options', 'Options', 'manage_options', 'options', array($this, 'pageOption'));\n add_submenu_page('carte-interactive', 'Test', 'Test', 'manage_options', 'test', array($this, 'pageTest'));\n \n }", "public function admin_menu() {\n\t\t// Permission\n\t\tif ( 'lp-database-updater' !== LP_Request::get_string( 'page' ) || ! current_user_can( 'install_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_dashboard_page( '', '', 'manage_options', 'lp-database-updater', '' );\n\t}", "private function createMyMenu()\n {\n $this->menu->create();\n\n $sql = \"INSERT IGNORE INTO `s_core_snippets` (`namespace`, `shopID`, `localeID`, `name`, `value`, `created`, `updated`) VALUES\n ('backend/index/view/main', 1, 1, 'Connect', 'Connect', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 2, 'Connect', 'Connect', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 1, 'Connect/Export', 'Produkte zu Connect', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 2, 'Connect/Export', 'Export', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 1, 'Connect/Settings', 'Einstellungen', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 2, 'Connect/Settings', 'Settings', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 1, 'Connect/Register', 'Einrichtung', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 2, 'Connect/Register', 'Register', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 1, 'Connect/Import', 'Produkte von Connect', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 2, 'Connect/Import', 'Import', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 1, 'Connect/OpenConnect', 'Login', '2016-03-17 18:32:48', '2016-03-17 18:32:48'),\n ('backend/index/view/main', 1, 2, 'Connect/OpenConnect', 'Login', '2016-03-17 18:32:48', '2016-03-17 18:32:48')\n\n ON DUPLICATE KEY UPDATE\n `namespace` = VALUES(`namespace`),\n `shopID` = VALUES(`shopID`),\n `name` = VALUES(`name`),\n `localeID` = VALUES(`localeID`),\n `value` = VALUES(`value`)\n ;\";\n $this->db->exec($sql);\n }", "function MENU_createMenu( ) {\n global $_CONF, $_TABLES, $LANG_MENU00, $LANG_MENU01, $LANG_MENU_ADMIN, $_MENU_CONF,\n $LANG_MENU_MENU_TYPES, $LANG_ADMIN, $Menus;\n\n $retval = '';\n\n $menu_arr = array(\n array('url' => $_CONF['site_admin_url'] .'/plugins/menu/index.php',\n 'text' => $LANG_MENU01['menu_list']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']),\n );\n $retval .= COM_startBlock($LANG_MENU01['menu_builder'].' :: '.$LANG_MENU01['add_newmenu'],'', COM_getBlockTemplate('_admin_block', 'header'));\n $retval .= ADMIN_createMenu($menu_arr, $LANG_MENU_ADMIN[2],\n $_CONF['site_admin_url'] . '/plugins/menu/images/menu.png');\n\n $T = COM_newTemplate(CTL_plugin_templatePath('menu'));\n $T->set_file(array('admin' => 'createmenu.thtml'));\n\n // build menu type select\n\n $menuTypeSelect = '<select id=\"menutype\" name=\"menutype\">' . LB;\n while ( $types = current($LANG_MENU_MENU_TYPES) ) {\n $menuTypeSelect .= '<option value=\"' . key($LANG_MENU_MENU_TYPES) . '\"';\n $menuTypeSelect .= '>' . $types . '</option>' . LB;\n next($LANG_MENU_MENU_TYPES);\n }\n $menuTypeSelect .= '</select>' . LB;\n\n // build group select\n\n $rootUser = DB_getItem($_TABLES['group_assignments'],'ug_uid','ug_main_grp_id=1');\n $usergroups = SEC_getUserGroups($rootUser);\n $usergroups[$LANG_MENU01['non-logged-in']] = 998;\n ksort($usergroups);\n $group_select = '<select id=\"group\" name=\"group\">' . LB;\n for ($i = 0; $i < count($usergroups); $i++) {\n $group_select .= '<option value=\"' . $usergroups[key($usergroups)] . '\"';\n $group_select .= '>' . key($usergroups) . '</option>' . LB;\n next($usergroups);\n }\n $group_select .= '</select>' . LB;\n\n $T->set_var(array(\n 'site_admin_url' => $_CONF['site_admin_url'],\n 'site_url' => $_CONF['site_url'],\n 'form_action' => $_CONF['site_admin_url'] . '/plugins/menu/index.php',\n 'birdseed' => '<a href=\"'.$_CONF['site_admin_url'].'/plugins/menu/index.php\">'.$LANG_MENU01['menu_list'].'</a> :: '.$LANG_MENU01['add_newmenu'],\n 'lang_admin' => $LANG_MENU00['admin'],\n 'version' => $_MENU_CONF['pi_version'],\n 'menutype_select' => $menuTypeSelect,\n 'group_select' => $group_select,\n 'xhtml' => XHTML,\n 'label' => $LANG_MENU01['label'],\n 'menu_type' => $LANG_MENU01['menu_type'],\n 'active' => $LANG_MENU01['active'],\n 'permission' => $LANG_MENU01['permission'],\n 'save' => $LANG_MENU01['save'],\n 'cancel' => $LANG_MENU01['cancel'],\n ));\n $T->parse('output', 'admin');\n $retval .= $T->finish($T->get_var('output'));\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n return $retval;\n}", "static public function add_admin_menu()\n {\n add_menu_page(JRP::TITLE . ' Page', JRP::TITLE, 'manage_options', JRP::PRODUCT, array('JRP', 'page_settings'), JRP::PLUGIN_URL . \"view/images/icon.png\", '4.22');\n add_submenu_page(JRP::PRODUCT, JRP::TITLE . ' Page', 'Settings', 'manage_options', JRP::PRODUCT, array('JRP', 'page_settings'));\n }", "public function set_admin_menu(){\n\t\t\t$this->get_top_level_menus();\n\t\t\t\n\t\t\t$page_title = 'TFC | Menu Manager';\n\t\t\t$menu_title = 'Menu Manager';\n\t\t\t$capability = 'administrator';\n\t\t\t$menu_slug = __FILE__;\n\t\t\t$function = array( $this, 'display_options_page' );\n\t\t\t$icon_url = ''; \n\t\t\t$position = 3;\n\n\t\t\tadd_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );\n\t\t\t$this->add_submenus();\n\t\t\t\n\t\t\t$this->hide_menu_items();\t\n\t\t}", "public function addMenuItem() {\n add_options_page('WpeVelocity', 'WpeVelocity Configuration', 'manage_options', 'wpevelocity-configuration', array($this, 'renderAdmin'));\n add_options_page('WpeVelocityRefund', '', 'manage_options', 'wpevelocity-refund', array($this, 'renderRefund'));\n }", "function powerbi_embedded_create_menu() {\n\n //create new top-level menu\n add_menu_page('Powerbi Embedded Settings', 'Powerbi Embedded Settings', 'administrator', __FILE__, 'powerbi_embedded_settings_page');\n\n //call register settings function\n add_action( 'admin_init', 'register_powerbi_embedded_settings' );\n}", "private function createMenuItems() {\n\t\t$this->addHomeMenu();\n\t\t$this->addSEOBlogMenu();\n\t\t$this->addPluginsMenu();\n\t\t$this->addCoursesMenu();\n\t\t$this->addFAQMenu();\n\t}", "function add_menu_admin()\n{\n add_menu_page('Voucher', 'Vouchers', 'manage_options', 'voucher', \"vouchers_initial_page\", 'dashicons-tickets-alt');\n add_submenu_page('voucher', 'Criar Voucher', 'Criar Voucher', 'publish_posts', 'vouchers-create', 'voucher_create_voucher_page');\n add_submenu_page('voucher', 'Utilizar Código', 'Utilizar Código', 'publish_posts', 'vouchers-use', 'voucher_use_voucher_page');\n add_submenu_page('voucher', 'Confirgurações do Voucher', 'Configurações', 'publish_posts', 'voucher-config', 'voucher_config_page');\n}", "public function create()\n {\n if (!userHasPermission('add-user-menu')) return permissionsException();\n\n //Pageheader set true for breadcrumbs\n $pageConfigs = ['pageHeader' => true];\n $breadcrumbs = [\n ['link' => \"/admin\", 'name' => \"Home\"],\n ['link' => \"/admin/user-menu\", 'name' => \"User Menu\"],\n ['name' => \"Create\"],\n ];\n\n return view('admin.user-menu.create', [\n 'pageConfigs' => $pageConfigs,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }", "public function makeMenu() {}", "function create_admin_menu() {\r\n\t\r\n\t$role = get_role('administrator');\r\n\tif(!$role->has_cap('manage_theme')) $role->add_cap('manage_theme');\r\n\r\n\tadd_theme_page( IAMD_THEME_NAME . esc_html__(' Theme Options', 'spalab'), IAMD_THEME_NAME . esc_html__(' Options', 'spalab'), 'manage_theme', 'spalab', 'dttheme_options_page'\t);\t\r\n\r\n}", "public function add_to_menus()\n {\n }", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public function add_to_menus()\n {\n }", "public function adminMenuItem()\n {\n add_submenu_page(\n 'options-general.php',\n self::PLUGIN_NAME,\n self::PLUGIN_NAME,\n 'manage_options',\n self::MENU_SLUG,\n array( $this, 'displayAdminSettings')\n );\n }", "function create_menu()\n\t{\n\t\tadd_options_page( 'Exit Intent Settings', 'Exit Intent', 'manage_options', POPBOUNCE_OPTION_KEY, [\n\t\t\t$this,\n\t\t\t'settings_page'\n\t\t] );\n\t}", "public function admin_menus()\n\t\t{\n\n\t\t\t// About Page\n\t\t\tadd_dashboard_page(\n\t\t\t\t__( 'Welcome to ' . THEMENAME, THEMENAME ),\n\t\t\t\t__( 'Welcome to ' . THEMENAME, THEMENAME ),\n\t\t\t\t$this->minimum_capability,\n\t\t\t\t'incipio-welcome',\n\t\t\t\tarray( $this, 'welcome_screen' )\n\t\t\t);\n\n\t\t\t// About Page\n\t\t\tadd_dashboard_page(\n\t\t\t\t__( 'Welcome to ' . THEMENAME, THEMENAME ),\n\t\t\t\t__( 'Welcome to ' . THEMENAME, THEMENAME ),\n\t\t\t\t$this->minimum_capability,\n\t\t\t\t'incipio-about',\n\t\t\t\tarray( $this, 'about_screen' )\n\t\t\t);\n\n\t\t\t// Help Page\n\t\t\tadd_dashboard_page(\n\t\t\t\t__( 'Welcome to ' . THEMENAME, THEMENAME ),\n\t\t\t\t__( 'Welcome to ' . THEMENAME, THEMENAME ),\n\t\t\t\t$this->minimum_capability,\n\t\t\t\t'incipio-help',\n\t\t\t\tarray( $this, 'help_screen' )\n\t\t\t);\n\n\t\t}", "static function add_menu_page() {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$parent = 'settings.php';\n\t\t\t} else {\n\t\t\t\t$parent = 'tools.php';\n\t\t\t}\n\n\t\t\tadd_submenu_page(\n\t\t\t\t$parent,\n\t\t\t\t__( 'WP REST Cache', 'rest_cache' ),\n\t\t\t\t'WP REST Cache',\n\t\t\t\t'create_users',\n\t\t\t\tself::$admin_page_slug,\n\t\t\t\tarray( get_called_class(), 'options_page' )\n\t\t\t);\n\t\t}", "public function menu() {\n\n $this->hook = add_management_page(\n __( 'TGM Batch Updates', 'tgm-batch-updates' ),\n __( 'Batch Updates', 'tgm-batch-updates' ),\n 'manage_options',\n $this->plugin_slug,\n array( $this, 'menu_cb' )\n );\n\n }", "public function add_menu()\n {\n if ($this->isLoggedIn()) {\n $data['parents'] = $this->Admin_model->getMenuParents('admin_menu');\n $data['menu'] = $this->Admin_model->getMenuItems('admin_menu');\n $data['theme'] = $this->Admin_model->getActiveTheme();\n $data['company_info'] = $this->Admin_model->get_company_info();\n $data['title'] = $data['company_info']['name'] . \" | Add Admin Menu\";\n $this->load->view('backend/static/head', $data);\n $this->load->view('backend/static/header');\n $this->load->view('backend/static/sidebar1');\n $this->load->view('backend/add_menu');\n $this->load->view('backend/static/footer');\n } else {\n redirect(base_url());\n }\n }", "function admin_menu() {\n\t\\do_action( 'gnist/admin/menu' );\n}", "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\t\t/*\n\t\tadd_submenu_page(\n\t\t\t'live-template-editor-client',\n\t\t\t__( 'Addon test', $this->plugin->slug ),\n\t\t\t__( 'Addon test', $this->plugin->slug ),\n\t\t\t'edit_pages',\n\t\t\t'edit.php?post_type=post'\n\t\t);\n\t\t*/\n\t}", "function wlp_create_menu() {\r\n}", "public function admin_menu() {\n\t\tif ( $this->is_submenu() ) {\n\t\t\tadd_submenu_page(\n\t\t\t\t$this->page_prop( 'parent_slug' ),\n\t\t\t\t$this->page_prop( 'page_title' ),\n\t\t\t\t$this->page_prop( 'menu_title' ),\n\t\t\t\t$this->page_prop( 'capability' ),\n\t\t\t\t$this->page_prop( 'menu_slug' ),\n\t\t\t\tarray( $this, 'callback' ),\n\t\t\t\t$this->page_prop( 'position' )\n\t\t\t);\n\t\t} else {\n\t\t\tadd_menu_page(\n\t\t\t\t$this->page_prop( 'page_title' ),\n\t\t\t\t$this->page_prop( 'menu_title' ),\n\t\t\t\t$this->page_prop( 'capability' ),\n\t\t\t\t$this->page_prop( 'menu_slug' ),\n\t\t\t\tarray( $this, 'callback' ),\n\t\t\t\t$this->page_prop( 'icon_url' ),\n\t\t\t\t$this->page_prop( 'position' )\n\t\t\t);\n\t\t}\n\t}", "function wpa_add_menu() {\n\n $obj = new WP_Adsense_Protector_admin_menue();\n }", "public function addmenuAction()\n {\n $params = $this->_getAllParams();\n if ($params['hid']=='') {\n $menu = \\KC\\Repository\\Menu::insertOne($params);\n echo Zend_Json::encode($menu);\n } else {\n $menu = \\KC\\Repository\\Menu::insertNode($params);\n echo Zend_Json::encode($menu);\n }\n die();\n\n }", "public function add_menu() {\n\n $this->page = add_management_page( 'Bulk Up', 'Bulk Up', 'manage_options', 'bulk-up', [ $this, 'register_page' ] );\n\n }", "function createMenu() {\n $this->mMenu = new cOlLiMenu($this->getMenuDefinition(), $this->getMenuItems());\n }", "public function create_admin_settings_page() {\n\t}", "function wp_cf7db_admin_menu() {\n\tadd_menu_page('Contact Form Entry', //page title\n\t'WP CForm DB', //menu title\n\t'manage_options', //capabilities\n\t'wp_cf7db_list', //menu slug\n\t'wp_cf7db_data_list' //function\n\t);\n}", "public function admin_menu() {\n\t\tadd_submenu_page(\n\t\t\t$this->parent_slug,\n\t\t\t$this->page_title,\n\t\t\t$this->menu_title,\n\t\t\t$this->capability,\n\t\t\t$this->page_slug,\n\t\t\t$this->content_callback\n\t\t);\n\t}", "public function create()\n {\n return view('admin.menus.create');\n }", "public function admin_menu() {\n add_options_page(\n $this::ADMIN_PAGE_TITLE,\n $this::ADMIN_PAGE_DESCRIPTION,\n 'manage_options',\n $this::UNIQUE_IDENTIFIER,\n array( $this, 'orb_form' )\n );\n }", "function adminMenu()\r\n {\r\n add_submenu_page('options-general.php', 'Post-From-Txt', 'Post-From-Txt', 10, basename(__FILE__), array(&$this, 'admin'));\r\n }", "public function run()\n {\n Menu::create([\n \t\t\t'id'\t\t\t=> 1,\n 'menu' \t\t=> 'Administración', \n 'url' \t\t=> '#',\n 'icon' \t\t=> 'ti-panel',\n 'parent' \t\t=> 0,\n 'active'\t\t=> 1,\n 'order'\t\t\t=> 1\n ]);\n\n Menu::create([\n \t\t\t'id'\t\t\t=> 2,\n 'menu' \t\t=> 'Usuarios', \n 'url' \t\t=> 'usuarios',\n 'icon' \t\t=> 'ti-user',\n 'parent' \t\t=> 1,\n 'active'\t\t=> 1,\n 'order'\t\t\t=> 1\n ]);\n\n Menu::create([\n \t\t\t'id'\t\t\t=> 3,\n 'menu' \t\t=> 'Perfiles', \n 'url' \t\t=> 'perfiles',\n 'icon' \t\t=> 'ti-id-badge',\n 'parent' \t\t=> 1,\n 'active'\t\t=> 1,\n 'order'\t\t\t=> 2\n ]);\n }", "public function create_menu() {\n add_menu_page('Tutis Settings', 'Tutis Settings', 'administrator', 'tutis-settings', array( $this, 'settings_page' ) , plugins_url('/img/tutis-icon.png', __FILE__) );\n\n //call register settings function\n add_action( 'admin_init', array( $this, 'plugin_settings' ) );\n }", "function network_admin_menu()\n {\n }", "public function add_admin_menu_client_create() {\n add_submenu_page('client_list', //parent slug\n 'Přidat nového klienta', //page title\n 'Přidat klienta', //menu title\n 'manage_options', //capability\n 'client_create', //menu slug\n 'client_create'); //function\n\n function client_create() {\n $name = $_POST[\"client_name\"];\n $position = $_POST[\"client_position\"];\n $company = $_POST[\"client_company\"];\n $phone = $_POST[\"client_phone\"];\n $email = $_POST[\"client_email\"];\n //insert\n if (isset($_POST['insert'])) {\n global $wpdb;\n $table_name = $wpdb->prefix . 'klient';\n $wpdb->insert(\n $table_name, //table\n array(\n 'client_name' => $name,\n 'client_position' => $position,\n 'client_company' => $company,\n 'client_phone' => $phone,\n 'client_email' => $email,\n 'created' => date('Y-m-d H:i:s'),\n 'updated' => date('Y-m-d H:i:s')), //data\n array('%s', '%s', '%s', '%s', '%s') //data format\n );\n $message = \"Klient přidán\";\n }\n ?>\n <div class=\"wrap\">\n <h2>Přidat nového klienta</h2>\n <?php if (isset($message)): ?>\n <div class=\"updated\"><p><?php echo $message; ?></p></div><?php endif; ?>\n <form method=\"post\" action=\"<?php echo $_SERVER['REQUEST_URI']; ?>\">\n <table class='wp-list-table widefat fixed'>\n <tr>\n <th>Jméno a příjmení</th>\n <td><input type=\"text\" name=\"client_name\" value=\"<?php echo $client_name; ?>\"/></td>\n </tr>\n <tr>\n <th>Pozice</th>\n <td>\n <select name=\"client_position\">\n <option value=\"Manažer\" selected=\"selected\">Manažer</option>\n <option value=\"Pracovník\">Pracovník</option>\n <option value=\"Kurýr\">Kurýr</option>\n </select>\n </td>\n </tr>\n <tr>\n <th>Firma</th>\n <td>\n <select name=\"client_company\">\n <option value=\"IBM\" selected=\"selected\">IBM</option>\n <option value=\"Microsoft\">Microsoft</option>\n <option value=\"Google\">Google</option>\n </select>\n </td>\n </tr>\n <tr>\n <th>Telefon</th>\n <td><input type=\"text\" name=\"client_phone\" value=\"<?php echo $client_phone; ?>\"/></td>\n </tr>\n <tr>\n <th>Email</th>\n <td><input type=\"text\" name=\"client_email\" value=\"<?php echo $client_email; ?>\"/></td>\n </tr>\n </table>\n <input type='submit' name=\"insert\" value='Přidat klienta' class='button'>\n </form>\n </div>\n <?php\n }\n }", "public function menu_add() {\r\n add_submenu_page('tools.php', 'Shortcodes', 'Shortcodes', 'manage_options', 'shortcode-finder', array($this, 'render_menu'));\r\n }", "public function register_admin_menu() {\n\n $menu_args = $this->get_admin_menu_args();\n\n /* Register welcome submenu\n /*---------------------------*/\n add_theme_page(\n $menu_args['title'], // [Title] The title to be displayed on the corresponding page for this menu\n $menu_args['name'], // [Text] The text to be displayed for this actual menu item\n $menu_args['compatibility'],\n $this->page_slug, // [ID/slug] The unique ID - that is, the slug - for this menu item\n array( $this, 'render') // [Callback] The name of the function to call when rendering the menu for this page\n );\n }", "public static function addMenu(){\n add_menu_page(\n self::INFO_TITLE, // TITLE_PAGE\n self::INFO_MENU, // TITLE_MENU\n self::PERMITION, // CAPABILITY\n self::GROUP, // SLUG_PAGE\n [self::class, 'render'], // CALLBACK\n self::DASHICON, // icon\n 2 // POSITION\n );\n }", "public function create()\n {\n return view('gate::pages.menu.create');\n }", "public static function addAdminMenuItems() {\n\t\tadd_submenu_page( CMTT_MENU_OPTION, 'Categories', 'Categories', 'manage_categories', 'edit-tags.php?taxonomy=glossary-categories' );\n\t}", "function import_add_admin ()\n{\n\tglobal $bb_submenu;\n\t$bb_submenu['content.php'][] = array (__('Import'), 'use_keys', 'import_page', 'importer-bbpress.php');\n}", "public function admin_menu() {\n\t\t$optPage = add_menu_page(\n\t\t\t__( 'Janrain Capture' ),\n\t\t\t__( 'Janrain Capture' ),\n\t\t\t'manage_options', JanrainCapture::$name, array( $this, 'main' )\n\t\t);\n\t\t$uiPage = add_submenu_page(\n\t\t\tJanrainCapture::$name,\n\t\t\t__( 'Janrain Capture' ),\n\t\t\t__( 'UI Settings' ),\n\t\t\t'manage_options', JanrainCapture::$name . '_ui', array( $this, 'ui' )\n\t\t);\n\t}" ]
[ "0.7180991", "0.7123836", "0.7096379", "0.7050208", "0.70362175", "0.7032939", "0.6991376", "0.69814295", "0.6970495", "0.69562817", "0.6942163", "0.6932069", "0.69302523", "0.69168544", "0.69086087", "0.69008064", "0.6889323", "0.68703175", "0.68603855", "0.6841583", "0.68359643", "0.68238986", "0.6807538", "0.6807171", "0.67961663", "0.67928", "0.6770266", "0.67609084", "0.67609084", "0.6752634", "0.6744556", "0.6740036", "0.6727917", "0.6700897", "0.6695513", "0.66816694", "0.6673186", "0.66680115", "0.66559505", "0.66537255", "0.6646862", "0.66423863", "0.66423863", "0.66423863", "0.66372186", "0.6625784", "0.66046315", "0.65927124", "0.6591373", "0.6573436", "0.65727675", "0.65709144", "0.6570584", "0.6570547", "0.6557228", "0.6549635", "0.65438014", "0.65397155", "0.6532651", "0.6530585", "0.6527461", "0.65271205", "0.65268975", "0.65268975", "0.65268975", "0.65268975", "0.65268975", "0.65268975", "0.6526496", "0.6514153", "0.65138334", "0.65088326", "0.64987046", "0.64972705", "0.64916325", "0.6489452", "0.6481437", "0.6478875", "0.64754516", "0.6473977", "0.6470443", "0.64682657", "0.6466328", "0.6436735", "0.64301497", "0.6429705", "0.6428577", "0.6421645", "0.64203286", "0.6419984", "0.64139545", "0.6408758", "0.6397825", "0.63972163", "0.63935834", "0.63918054", "0.6384141", "0.6380175", "0.6379552", "0.6378596" ]
0.73919404
0
test that a test expects that an assertion failed
тест, который ожидает, что произойдет сбой утверждения
public function testAssertionFailed(): void { $this->expectAssertionFailed(); $this->assertTrue(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shouldFailInTest();", "protected function assertFailure()\n {\n $this->setExpectedException('PHPUnit_Framework_AssertionFailedError');\n }", "public function testAssertionFailedWithBadMessage(): void\n {\n $this->expectAssertionFailed('this is no true');\n $this->assertTrue(false);\n }", "public function testAssertionFailedMissingFailure(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(true);\n }", "public function testAssertionFailedMissingAssertion(): void\n {\n $this->expectAssertionFailed();\n }", "public function tstFailure(): void\n {\n \t$this->assertEquals('abc', '123');\n }", "public function testAssertionFailedWithMessage(): void\n {\n $this->expectAssertionFailed('this is no true');\n $this->assertTrue(false, 'this is no true');\n }", "private function assertFailure()\n {\n // we don't expect that:\n $this->dontSee('Laravel');\n }", "function testFailsOnException () {\n\t}", "public function failed_test_example()\n\t{\n\t\t$this->expect_array('not an array');\n\t}", "public function fail()\n\t{\n\t\t$frame = $this->assert_called_from();\n\t\t$this->record_fail($frame);\n\t}", "public function testInvalidArgumentIsProperlyThrown()\n{\n $this->calc->add(3, 2);\n\n}", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function test_it_asserts_true()\n {\n $this->assertTrue(true);\n }", "public function testTheTestThatFails()\n {\n $codeception = $this->codeception;\n\n // Get the test that we know fails.\n $test = $codeception->getTest('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n // Confirm the test hasn't been or passed yet\n $this->assertFalse($test->ran());\n $this->assertFalse($test->passed());\n\n // Run the test, which generates the log and analyes the log as it gets added.\n $test = $codeception->run($test);\n\n // Confirm the test was run but it's not passed\n $this->assertTrue($test->ran());\n $this->assertFalse($test->passed());\n }", "public function testSimpleAssertion()\n {\n $this->assertEquals(1, 1);\n }", "protected function assertSuccess()\n {\n $this->setExpectedException(null);\n }", "public function testAssertIsBoolWrongType(): void\n {\n $this->expectException(Ex\\NotBooleanException::class);\n Validator::assertIsBool(__FUNCTION__, 666);\n }", "public function testGetSytnaxFailure() {\n\t\t\t$this->expectException('InvalidArgumentException');\n\t\t\t$this->Helper->_getSyntax('ay dios mio!');\n\t\t}", "public function it_can_assert_is_not_broken()\n {\n $this->assertTreeNotBroken(1);\n $this->assertTreeNotBroken(2);\n }", "public function testAssertResponseStatusErrorFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('error');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testAssertRedirectedFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertRedirectedTo(\"/unit_test/some_bad_action/123\");\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testIsEligible1()\n{\n\n // Traversed conditions\n // if (!$validator->isEligible($this->_actualCount)) == false (line 268)\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIncorrectType2(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(2);\n }", "public function testNothing() {\n return $this->assertTrue(TRUE, t('ok useless but necessary :P'));\n }", "public function testIsEligible2()\n{\n\n // Traversed conditions\n // if (!$validator->isEligible($this->_actualCount)) == true (line 268)\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testDoesItWork()\n {\n $this->assertTrue(true);\n }", "public function testIncorrectType(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(STDOUT);\n }", "function assert($assertion)\n{\n}", "public function testAssertIsBoolCorrectType(): void\n {\n Validator::assertIsBool(__FUNCTION__, false);\n // This assert won't be called if exception is thrown\n $this->assertTrue(true);\n }", "public function testSomething()\n {\n $this->assertTrue(true);\n }", "public function testError2()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == false (line 565)\n // if (\\is_resource($this->stmt_id)) == true (line 569)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testErreurPizzaInconnue()\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessage('Pizza inconnue');\n PizzaCreator::byName('Pizzananas');\n }", "public function testException() {\n $this->expectException(InvalidArgumentException::class);\n }", "public function testInvalid()\n {\n $chain = new ChainValidation();\n $chain->add(new LinkFail());\n $chain->execute([]);\n\n $this->assertEquals(true, $chain->hasError());\n }", "public function testOne() {\n $this->assertTrue(TRUE);\n }", "public function testError3()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == true (line 565)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testAssertNoMailSentFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Failed asserting that no emails were sent.');\n\n $this->sendEmails();\n $this->assertNoMailSent();\n }", "public function testExample()\n {\n \t$this->assertTrue(true);\n }", "public function testAssertResponseCodeFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse(300);\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "abstract public function assertSuccess($arg_context);", "public function testError(): void {\n try {\n $result = Database::query('select devil from hell', true);\n $this->assertFalse($result);\n } catch (Exception $e) {\n $error = Database::error();\n\n $this->assertStringStartsWith('Table', $error);\n $this->assertStringEndsWith(\"doesn't exist\", $error);\n }\n }", "public function testFailInvalidData()\n {\n $data = array();\n try {\n $this->_constraint->fail($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $message = 'Must contain $data[\\'key\\'], $data[\\'file\\'] and $data[\\'contains\\'] elements in $data array';\n $this->assertEquals($e->getMessage(), $message);\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testTestInvalidData()\n {\n $data = array();\n try {\n $result = $this->_constraint->test($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $this->assertEquals(\n 'Must contain $data[\\'line\\'] and $data[\\'contains\\'] elements in $data array',\n $e->getMessage()\n );\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testForErrors()\n {\n return false;\n }", "public function testValid0()\n{\n\n $actual = $this->testSuiteIterator->valid();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGet()\n {\n $this->assertTrue(false);\n }", "public function testSubmitValidData()\n {\n $this->assertTrue(true);\n }", "public function testAssertActionFalse()\n {\n $url = '/unit_test/test_action/123';\n $this->recognize($url);\n \n try {\n $this->assertAction('testCrap');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testError() {\n\t\t$test = new TestError( 'runTest' );\n\t\t$test->run( $this->result );\n\n\t\t$this->assertSame( 1, $this->listener->startTestCount, 'test start count failed' );\n\t\t$this->assertSame( 1, $this->listener->errorCount, 'error count failed' );\n\t\t$this->assertSame( 1, $this->listener->endTestCount, 'test end count failed' );\n\t}", "public function testExample(){\n\t\t$this->assertTrue(true);\n\t}", "public function testInvalidType() {\n $this->setExpectedException('Nimbles\\Core\\Util\\Exception\\InvalidType');\n Type::isType(123, 123);\n }", "public function testNothing()\n {\n $this->assertTrue(true);\n }", "public function testAssertRegexpResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('/nada/');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testFailed(\\unittest\\TestFailure $failure) {\n }", "public function isFailure();", "public function isFailure();", "public function testAssertIsIntWrongType(): void\n {\n\t $this->expectException(Ex\\NotIntegerException::class);\n Validator::assertIsInt(__FUNCTION__, 'chicken');\n }", "function testFailed($message = \"failed\")\n\t{\n\t\t$result = self::TEST_FAILED;\n\t\tthrow new Pie_Exception_TestCaseFailed(compact('message', 'result'));\n\t}", "public function testCreate()\n {\n $this->assertTrue(false);\n }", "public function testAssertResponseStatusSuccessFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('success');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testExample() {\n $this->assertTrue(true);\n }", "public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {\n $this->writeCase(\n 'fail',\n $time,\n $e->getMessage()\n );\n $this->currentTestPass = FALSE;\n }", "function test_tests() {\n\t\t$this->assertTrue( true );\n\t}", "public function testAssertStringResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('nada');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "function my_assert_handler($file, $line, $code)\r\n{\r\n\techo \"<hr>Assertion Failed:\r\n File '$file'<br />\r\n Line '$line'<br />\r\n Code '$code'<br /><hr />\";\r\n}", "function my_assert_handler($file, $line, $code)\r\n{\r\n\techo \"<hr>Assertion Failed:\r\n File '$file'<br />\r\n Line '$line'<br />\r\n Code '$code'<br /><hr />\";\r\n}", "public function testError1()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == false (line 565)\n // if (\\is_resource($this->stmt_id)) == false (line 569)\n // if (\\is_resource($this->conn_id)) == true (line 573)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }" ]
[ "0.7956532", "0.7783085", "0.776224", "0.7732346", "0.7712616", "0.7647668", "0.7635252", "0.74722725", "0.73293513", "0.7146509", "0.7034224", "0.7015353", "0.6957162", "0.6957162", "0.686121", "0.6852438", "0.6849406", "0.6828744", "0.67528296", "0.6732447", "0.67190224", "0.6716002", "0.67118", "0.6688104", "0.6686781", "0.66593343", "0.66543", "0.66508627", "0.6631017", "0.6625262", "0.6611987", "0.66115886", "0.6604671", "0.66019833", "0.66013414", "0.6585712", "0.6582966", "0.65796196", "0.65784436", "0.6577173", "0.65753514", "0.6571053", "0.6569558", "0.6553199", "0.65429884", "0.6531267", "0.6527428", "0.6507057", "0.6506946", "0.6499365", "0.64977986", "0.6495672", "0.6489887", "0.6487785", "0.64810294", "0.6479557", "0.6477039", "0.6477039", "0.6473933", "0.64679337", "0.646406", "0.645435", "0.6450923", "0.64481896", "0.6445987", "0.64435035", "0.64412975", "0.64412975", "0.6430946", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094", "0.64290094" ]
0.8414891
0
test that a test expects that an assertion failed, with the failure message
тест, который ожидает, что произойдет сбой утверждения с сообщением об ошибке
public function testAssertionFailedWithMessage(): void { $this->expectAssertionFailed('this is no true'); $this->assertTrue(false, 'this is no true'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAssertionFailedWithBadMessage(): void\n {\n $this->expectAssertionFailed('this is no true');\n $this->assertTrue(false);\n }", "public function testAssertionFailed(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(false);\n }", "protected function assertFailure()\n {\n $this->setExpectedException('PHPUnit_Framework_AssertionFailedError');\n }", "public function tstFailure(): void\n {\n \t$this->assertEquals('abc', '123');\n }", "public function testAssertionFailedMissingFailure(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(true);\n }", "public function shouldFailInTest();", "public function testAssertionFailedMissingAssertion(): void\n {\n $this->expectAssertionFailed();\n }", "private function assertFailure()\n {\n // we don't expect that:\n $this->dontSee('Laravel');\n }", "function testFailed($message = \"failed\")\n\t{\n\t\t$result = self::TEST_FAILED;\n\t\tthrow new Pie_Exception_TestCaseFailed(compact('message', 'result'));\n\t}", "public function fail()\n\t{\n\t\t$frame = $this->assert_called_from();\n\t\t$this->record_fail($frame);\n\t}", "function testFailsOnException () {\n\t}", "public function testFailureMessages($assertion, $expectedMessage, $params): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage($expectedMessage);\n\n call_user_func_array($this->$assertion(...), $params);\n }", "public function testTheTestThatFails()\n {\n $codeception = $this->codeception;\n\n // Get the test that we know fails.\n $test = $codeception->getTest('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n // Confirm the test hasn't been or passed yet\n $this->assertFalse($test->ran());\n $this->assertFalse($test->passed());\n\n // Run the test, which generates the log and analyes the log as it gets added.\n $test = $codeception->run($test);\n\n // Confirm the test was run but it's not passed\n $this->assertTrue($test->ran());\n $this->assertFalse($test->passed());\n }", "public function testAssertResponseStatusErrorFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('error');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {\n $this->writeCase(\n 'fail',\n $time,\n $e->getMessage()\n );\n $this->currentTestPass = FALSE;\n }", "public function testFailed(\\unittest\\TestFailure $failure) {\n }", "public function testFailure() {\n\t\t$test = new Failure( 'runTest' );\n\t\t$test->run( $this->result );\n\n\t\t$this->assertSame( 1, $this->listener->startTestCount, 'test start count failed' );\n\t\t$this->assertSame( 1, $this->listener->failureCount, 'failure count failed' );\n\t\t$this->assertSame( 1, $this->listener->endTestCount, 'test end count failed' );\n\t}", "public function testCreateWithValidationResultAndMessage() {\n\t\t$result = new ValidationResult(false, 'Incorrect placement of cutlery');\n\t\t$exception = new ValidationException($result, 'An error has occurred', E_USER_WARNING);\n\n\t\t$this->assertEquals(E_USER_WARNING, $exception->getCode());\n\t\t$this->assertEquals('An error has occurred', $exception->getMessage());\n\t\t$this->assertEquals(false, $exception->getResult()->valid());\n\t\t$this->assertEquals('Incorrect placement of cutlery', $exception->getResult()->message());\n\t}", "public function testAddFailed()\n {\n $this->post('/forum/cpus-andoverclocking/anandtech-intels-skylake-sp-xeon-vs-amds-epyc-7000/4/report', ['message' => '']);\n $this->assertResponseOk();\n $this->assertSession('The report could not be saved. Please, try again.', 'Flash.flash.0.message');\n }", "public function failure($message);", "public function failed_test_example()\n\t{\n\t\t$this->expect_array('not an array');\n\t}", "public function testAssertStringResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('nada');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testGetErrorMessage()\n {\n $errorMessage = 'Custom error message';\n\n $error = new \\Exception($errorMessage);\n $error = $this->errorHandler->getErrorMessage($error);\n $this->assertEquals(sprintf('%s%s',$errorMessage, PHP_EOL,PHP_EOL), $error);\n }", "public function testGetMessageInvalidParamType()\n {\n if (\\method_exists($this, 'expectException')) {\n // PHPUnit 5+.\n if (PHP_VERSION_ID >= 70000) {\n $this->expectException('TypeError');\n } else {\n $this->expectException('PHPUnit_Framework_Error');\n }\n } else {\n // PHPUnit 4.\n $this->setExpectedException('PHPUnit_Framework_Error');\n }\n\n $this->getMessageInfo(null, null, null);\n }", "public function testResponseForTheTestThatFails()\n {\n $codeception = $this->codeception;\n $response = $codeception->getRunResponse('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n $this->assertTrue($response['run']);\n $this->assertFalse($response['passed']);\n $this->assertNull($response['message']);\n $this->assertNotNull($response['log']);\n $this->assertEquals($response['state'], 'failed');\n }", "public function testFailed(TestFailure $failure) {\n // Empty\n }", "public function testError() {\n\t\t$test = new TestError( 'runTest' );\n\t\t$test->run( $this->result );\n\n\t\t$this->assertSame( 1, $this->listener->startTestCount, 'test start count failed' );\n\t\t$this->assertSame( 1, $this->listener->errorCount, 'error count failed' );\n\t\t$this->assertSame( 1, $this->listener->endTestCount, 'test end count failed' );\n\t}", "public function assertTrue($actual, $message=NULL);", "public function testInvalidArgumentIsProperlyThrown()\n{\n $this->calc->add(3, 2);\n\n}", "public function testAssertResponseCodeFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse(300);\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testAssertRegexpResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('/nada/');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testError(): void {\n try {\n $result = Database::query('select devil from hell', true);\n $this->assertFalse($result);\n } catch (Exception $e) {\n $error = Database::error();\n\n $this->assertStringStartsWith('Table', $error);\n $this->assertStringEndsWith(\"doesn't exist\", $error);\n }\n }", "function assertFailureOnNext($message) {\r\n\t\t\techo $this->__getRow('assertFailureOnNext', $message);\r\n\t\t}", "protected function _testFailed($message){\n\t\tif($this->colors){\n\t\t\techo str_repeat(' ',$this->tabs+1).\"\\033[0;31m$message\\n\";\n\t\t}\n\t\telse{\n\t\t\techo str_repeat(' ',$this->tabs+1).\"Failed : $message\\n\";\n\t\t}\n\t}", "public function testFailInvalidData()\n {\n $data = array();\n try {\n $this->_constraint->fail($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $message = 'Must contain $data[\\'key\\'], $data[\\'file\\'] and $data[\\'contains\\'] elements in $data array';\n $this->assertEquals($e->getMessage(), $message);\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testSimpleAssertion()\n {\n $this->assertEquals(1, 1);\n }", "public function testErrorMessage(): void\n {\n $e = new ExceptionBase('Message', 'Error');\n $this->assertEquals('Error', $e->getError());\n }", "public function testGetExceptionMessage0()\n{\n\n $actual = $this->expectation->getExceptionMessage();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function isFailure();", "public function isFailure();", "public function testFailed(\\unittest\\TestFailure $failure) {\n $this->write('F');\n }", "public function testGetSytnaxFailure() {\n\t\t\t$this->expectException('InvalidArgumentException');\n\t\t\t$this->Helper->_getSyntax('ay dios mio!');\n\t\t}", "function assert_equals($msg, $expected, $actual) {\n global $count, $fail;\n $count++;\n if ($expected !== $actual) {\n $fail++;\n echo \"Expected '$expected', got '$actual': $msg\\n\";\n }\n}", "public function testGetErrorMessagesAfterValidationFailure()\n {\n $validator = new Json();\n $validator->isValid('coderavine');\n $this->assertCount(1, $validator->errors());\n }", "public function testAssertStringResponseDoesNotContainFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseDoesNotContain('Rendered test action template');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testAssertNoMailSentFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Failed asserting that no emails were sent.');\n\n $this->sendEmails();\n $this->assertNoMailSent();\n }", "public function fail();", "public function testAssertRedirectedFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertRedirectedTo(\"/unit_test/some_bad_action/123\");\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testNothing() {\n return $this->assertTrue(TRUE, t('ok useless but necessary :P'));\n }", "protected function assertError($result, $msg) {\n if (! ($result instanceof F\\Error))\n throw $result;\n $this->assertTrue($result instanceof F\\Error);\n $this->assertEquals($msg, $result->getMessage());\n }", "public function testError() {\n $this->assertSession()->pageTextContains(\"An automated attempt to create the directory {$this->configDirectory}/sync failed, possibly due to a permissions problem.\");\n $this->assertDirectoryDoesNotExist($this->configDirectory . '/sync');\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public abstract function expect($error_msg);", "public function testExceptionErrors(): void\n {\n $exception = new BulkFailureException(['errors' => true]);\n\n self::assertSame(['errors' => true], $exception->getErrors());\n }", "protected function assertSuccess()\n {\n $this->setExpectedException(null);\n }", "public function testAssertResponseStatusSuccessFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('success');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testIncorrectType2(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(2);\n }", "public function testAssertContainsTextFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n\n $this->sendEmails();\n\n $this->assertMailContainsTextAt(1, 'html');\n }", "public function assertExitError() : void\n {\n $this->assertEquals(Command::ERROR, $this->commandResult);\n }", "function fail(string $test, array $stats = []) {\n# echo __METHOD__.\"(\".x2s(func_get_args()).\")\\n\";\n }", "public function testCreateFromMessage() {\n\t\t$exception = new ValidationException('Error inferred from message', E_USER_ERROR);\n\n\t\t$this->assertEquals(E_USER_ERROR, $exception->getCode());\n\t\t$this->assertEquals('Error inferred from message', $exception->getMessage());\n\t\t$this->assertEquals(false, $exception->getResult()->valid());\n\t\t$this->assertEquals('Error inferred from message', $exception->getResult()->message());\n\t}", "function my_assert_handler($file, $line, $code)\n{\n echo \"<hr>Assertion Failed:\n File '$file'<br />\n Line '$line'<br />\n Code '$code'<br /><hr />\";\n}", "function my_assert_handler($file, $line, $code)\r\n{\r\n\techo \"<hr>Assertion Failed:\r\n File '$file'<br />\r\n Line '$line'<br />\r\n Code '$code'<br /><hr />\";\r\n}", "function my_assert_handler($file, $line, $code)\r\n{\r\n\techo \"<hr>Assertion Failed:\r\n File '$file'<br />\r\n Line '$line'<br />\r\n Code '$code'<br /><hr />\";\r\n}", "public function testErreurPizzaInconnue()\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessage('Pizza inconnue');\n PizzaCreator::byName('Pizzananas');\n }", "abstract protected function displayFailure($msg);", "public function testInvalid()\n {\n $chain = new ChainValidation();\n $chain->add(new LinkFail());\n $chain->execute([]);\n\n $this->assertEquals(true, $chain->hasError());\n }", "public function testCreateWithComplexValidationResultAndMessage() {\n\t\t$result = new ValidationResult();\n\t\t$result->error('A spork is not a knife')\n\t\t\t\t->error('A knife is not a back scratcher');\n\t\t$exception = new ValidationException($result, 'An error has occurred', E_USER_WARNING);\n\n\t\t$this->assertEquals(E_USER_WARNING, $exception->getCode());\n\t\t$this->assertEquals('An error has occurred', $exception->getMessage());\n\t\t$this->assertEquals(false, $exception->getResult()->valid());\n\t\t$this->assertEquals('A spork is not a knife; A knife is not a back scratcher',\n\t\t\t$exception->getResult()->message());\n\t}", "public function addFailure(Test $test, AssertionFailedError $e, float $time): void\n {\n }", "public function testIncorrectType(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(STDOUT);\n }", "public function testShowFailed()\n {\n // Task not found\n $this->getJson('api/tasks/0')\n ->assertStatus(404)\n ->assertJson(['message' => 'No query results for model [App\\\\Models\\\\Task] 0']);\n }", "public function setFailMessage($msg);", "function assert($assertion)\n{\n}", "public function testGetMessageException()\n {\n $this->_object->getMessage();\n }", "public function testAssertIsStringWrongType(): void\n {\n\t $this->expectException(Ex\\NotStringException::class);\n Validator::assertIsString(__FUNCTION__, 666);\n }", "public function testFailed(\\unittest\\TestFailure $failure) {\n $this->progress();\n $this->results[]= $failure;\n $this->success= false;\n }", "public function itShouldFail($success)\n {\n if ('fail' === $success) {\n if (0 === $this->getExitCode()) {\n echo 'Actual output:' . PHP_EOL . PHP_EOL . $this->getOutput();\n }\n\n expect($this->getExitCode())->toBeGreaterThan(0);\n } else {\n if (0 !== $this->getExitCode()) {\n echo 'Actual output:' . PHP_EOL . PHP_EOL . $this->getOutput();\n }\n\n expect($this->getExitCode())->toBe(0);\n }\n }", "public function testExceptionThrownWhenStatusIsNotValid():\tvoid\n {\n $paymentStatusValidator = new PaymentStatusValidator();\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Error - Payment status \"invalidStatus\" is invalid.');\n $paymentStatusValidator->validate(['status' => 'invalidStatus']);\n }", "protected function assert_error($type, $msgNeedle, $failingClosure)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$failingClosure($this);\n\t\t\t$this->fail(\"Expected exception, but succeeded. Type $type with $msgNeedle\");\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\tif (strstr(get_class($e), 'PHPUnit'))\n\t\t\t{\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\t$this->assertInstanceOf($type, $e, 'Expected exception class type');\n\t\t\t$this->assertContains($msgNeedle, $e->getMessage(), 'Expected exception message');\n\t\t}\n\t}", "public function record_fail($assert_frame) : void\n\t{\n\t\t$assert_frame->passed = false;\n\t\t$this->active_result->add_assertion_result(new AssertionResult(false, $assert_frame));\n\t}", "public function assertCommandIsFailure(string $message = ''): void\n {\n Assert::assertSame(Command::FAILURE, $this->getStatusCode(), $message ?: 'The command did not fail');\n }", "public function testOnFailureException()\n {\n $command = sprintf(\"%s %s/scripts/failure.php\", PHP_BINARY, __DIR__);\n $result = $this->doExecute($command, 'text:xxx', 'exception:hello world');\n\n $this->assertInstanceOf(\\Exception::class, $result);\n $this->assertEquals('hello world', $result->getMessage());\n }", "function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')\n{\n throw new PHPUnit_Framework_Exception($message, $status_code);\n}", "public function testCreationFailed()\n {\n $this->expectException(Zend_Date_Exception::class);\n $this->expectExceptionMessage(\"No date part in 'notimestamp' found.\");\n $locale = new Zend_Locale();\n $date = new Zend_Date(\"notimestamp\");\n }", "public function testTestInvalidData()\n {\n $data = array();\n try {\n $result = $this->_constraint->test($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $this->assertEquals(\n 'Must contain $data[\\'line\\'] and $data[\\'contains\\'] elements in $data array',\n $e->getMessage()\n );\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testFailed(\\unittest\\TestFailure $failure) {\n $this->status= false;\n $this->stats['failed']++;\n $this->writeFailure($failure);\n }", "public function validationFails()\n {\n $this->assertEquals('FIELD_WRONG_VALUE', $this->validatorFilterDecorator->getErrorId());\n $this->mockValidator->expects($this->once())->method('validate')->will($this->returnValue(false));\n $this->mockRequestValueErrorFactory->expects($this->once())\n ->method('create')\n ->with($this->equalTo('FIELD_WRONG_VALUE'))\n ->will($this->returnValue(new stubRequestValueError('FIELD_WRONG_VALUE', array('en_EN' => 'Something wrent wrong.'))));\n $this->validatorFilterDecorator->callDoExecute('test_value');\n }", "public function describeMismatch($actual);", "public function testException() {\n $this->expectException(InvalidArgumentException::class);\n }", "public function testAssertRegexpResponseDoesNotContainFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseDoesNotContain('/(a)ction template/');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function expectFailedNut()\n {\n $this->expectedNut = 'failnut';\n }", "abstract public function assertSuccess($arg_context);", "public function testAssertIsBoolWrongType(): void\n {\n $this->expectException(Ex\\NotBooleanException::class);\n Validator::assertIsBool(__FUNCTION__, 666);\n }", "public function failure($failure);", "public function assertEmptyVerificationErrors()\n {\n $verificationErrors = $this->getParsedMessages('verification');\n if ($verificationErrors) {\n $this->fail(implode(\"\\n\", $verificationErrors));\n }\n }", "function testInvalidSubmit(){ \n $this->assertFieldValue('itemType[]',\"burrito\",\"burrito\",\"message goes here.\");\n $this->assertFieldValue('quantity[\"burrito\"]',3,3,\"another message\");\n }", "public function testValidateUserFailed()\n {\n $user = User::findByUsername($this->model->username);\n expect_not($user->validateAuthKey('not-existing'));\n }", "public function testAssertActionFalse()\n {\n $url = '/unit_test/test_action/123';\n $this->recognize($url);\n \n try {\n $this->assertAction('testCrap');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function fail($data)\n {\n if (!isset($data['key']) || !isset($data['file']) || !isset($data['contains'])) {\n throw new PHPUnitExt_Constraint_Exception(\n 'Must contain $data[\\'key\\'], $data[\\'file\\'] and $data[\\'contains\\'] elements in $data array'\n );\n }\n\n $data['key']++; // index starts from 0, but lines should be from 1\n $failure = 'Failed asserting file %s on line %d is does not contain %s';\n $failure = sprintf($failure, $data['file'], $data['key'], $data['contains']);\n throw new PHPUnitExt_Constraint_Exception($failure);\n }" ]
[ "0.8311704", "0.82445335", "0.7877279", "0.78222877", "0.7816951", "0.76236635", "0.76056445", "0.75128067", "0.7376212", "0.7093963", "0.7014907", "0.70128495", "0.6987118", "0.69219005", "0.6915418", "0.6899895", "0.68542373", "0.6830328", "0.67980134", "0.6794343", "0.6775255", "0.6766503", "0.6764745", "0.6747569", "0.6728704", "0.67178535", "0.6701253", "0.66890657", "0.66870165", "0.6666998", "0.66547096", "0.6626911", "0.66111994", "0.6598998", "0.65632075", "0.6558206", "0.65484273", "0.6535953", "0.65330756", "0.65330756", "0.6525199", "0.6513705", "0.6512336", "0.6511161", "0.6506447", "0.6506004", "0.6498282", "0.64868665", "0.6468178", "0.64556706", "0.6455178", "0.6444895", "0.6444895", "0.6441328", "0.64377034", "0.6432235", "0.6424044", "0.6419059", "0.6417787", "0.64089704", "0.63967466", "0.63960314", "0.63924336", "0.6389446", "0.6389446", "0.6369318", "0.63673466", "0.6355762", "0.63482285", "0.6347152", "0.6340448", "0.6336087", "0.6327772", "0.6299284", "0.62926805", "0.6291449", "0.6288755", "0.62851584", "0.62834316", "0.627511", "0.62659925", "0.62658125", "0.62644136", "0.62638617", "0.6263558", "0.6260915", "0.6254722", "0.6235264", "0.623335", "0.62327147", "0.6228721", "0.62216485", "0.6221445", "0.62125814", "0.6205767", "0.6200598", "0.6183065", "0.61789477", "0.61786425", "0.6178245" ]
0.83573437
0
test that a test expects that an assertion failed, which does not occur (the assertion is missing)
тест, который ожидает, что произойдет сбой утверждения, который не происходит (утверждение отсутствует)
public function testAssertionFailedMissingAssertion(): void { $this->expectAssertionFailed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAssertionFailed(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(false);\n }", "public function testAssertionFailedMissingFailure(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(true);\n }", "public function testAssertionFailedWithBadMessage(): void\n {\n $this->expectAssertionFailed('this is no true');\n $this->assertTrue(false);\n }", "public function shouldFailInTest();", "private function assertFailure()\n {\n // we don't expect that:\n $this->dontSee('Laravel');\n }", "protected function assertFailure()\n {\n $this->setExpectedException('PHPUnit_Framework_AssertionFailedError');\n }", "public function tstFailure(): void\n {\n \t$this->assertEquals('abc', '123');\n }", "public function testAssertionFailedWithMessage(): void\n {\n $this->expectAssertionFailed('this is no true');\n $this->assertTrue(false, 'this is no true');\n }", "function testFailsOnException () {\n\t}", "public function fail()\n\t{\n\t\t$frame = $this->assert_called_from();\n\t\t$this->record_fail($frame);\n\t}", "public function it_can_assert_is_not_broken()\n {\n $this->assertTreeNotBroken(1);\n $this->assertTreeNotBroken(2);\n }", "public function failed_test_example()\n\t{\n\t\t$this->expect_array('not an array');\n\t}", "public function testNothing() {\n return $this->assertTrue(TRUE, t('ok useless but necessary :P'));\n }", "public function testIsEligible1()\n{\n\n // Traversed conditions\n // if (!$validator->isEligible($this->_actualCount)) == false (line 268)\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsEligible2()\n{\n\n // Traversed conditions\n // if (!$validator->isEligible($this->_actualCount)) == true (line 268)\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testTheTestThatFails()\n {\n $codeception = $this->codeception;\n\n // Get the test that we know fails.\n $test = $codeception->getTest('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n // Confirm the test hasn't been or passed yet\n $this->assertFalse($test->ran());\n $this->assertFalse($test->passed());\n\n // Run the test, which generates the log and analyes the log as it gets added.\n $test = $codeception->run($test);\n\n // Confirm the test was run but it's not passed\n $this->assertTrue($test->ran());\n $this->assertFalse($test->passed());\n }", "public function testFooTakesXAsFalse()\n {\n // ... Put your test code here ...\n\n // ... Put your assertions here ...\n $this->assertTrue(false);\n $this->markTestIncomplete();\n }", "public function testNothing()\n {\n $this->assertTrue(true);\n }", "public function testSimpleAssertion()\n {\n $this->assertEquals(1, 1);\n }", "public function test_it_asserts_true()\n {\n $this->assertTrue(true);\n }", "public function testAssertNoMailSentFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Failed asserting that no emails were sent.');\n\n $this->sendEmails();\n $this->assertNoMailSent();\n }", "protected function assertSuccess()\n {\n $this->setExpectedException(null);\n }", "public function testInvalidArgumentIsProperlyThrown()\n{\n $this->calc->add(3, 2);\n\n}", "public function testField_data0()\n{\n\n // Traversed conditions\n // for (...) == false (line 101)\n\n $actual = $this->cI_DB_sqlite3_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "private function assertNoExceptions()\n {\n $this->assertFalse($this->event->hasExceptions());\n $this->assertEmpty($this->event->getExceptions());\n }", "public function testAssertIsBoolWrongType(): void\n {\n $this->expectException(Ex\\NotBooleanException::class);\n Validator::assertIsBool(__FUNCTION__, 666);\n }", "public function testValid0()\n{\n\n $actual = $this->testSuiteIterator->valid();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testField_data0()\n{\n\n // Traversed conditions\n // for (...) == false (line 123)\n\n $actual = $this->cI_DB_mysql_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testNothing(): void\n {\n $condition = true;\n $this->assertTrue($condition);\n }", "public function testForErrors()\n {\n return false;\n }", "public function testGetSytnaxFailure() {\n\t\t\t$this->expectException('InvalidArgumentException');\n\t\t\t$this->Helper->_getSyntax('ay dios mio!');\n\t\t}", "public function testValidateOrder0()\n{\n\n // Traversed conditions\n // if ($this->_orderNumber) == false (line 292)\n // if ($this->_globalOrderNumber) == false (line 295)\n\n $actual = $this->expectation->validateOrder();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testNever0()\n{\n\n $actual = $this->expectation->never();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testAssertActionFalse()\n {\n $url = '/unit_test/test_action/123';\n $this->recognize($url);\n \n try {\n $this->assertAction('testCrap');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testError2()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == false (line 565)\n // if (\\is_resource($this->stmt_id)) == true (line 569)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidateOrder1()\n{\n\n // Traversed conditions\n // if ($this->_orderNumber) == false (line 292)\n // if ($this->_globalOrderNumber) == true (line 295)\n\n $actual = $this->expectation->validateOrder();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testDoesItWork()\n {\n $this->assertTrue(true);\n }", "public function testAddFailed()\n {\n $this->post('/forum/cpus-andoverclocking/anandtech-intels-skylake-sp-xeon-vs-amds-epyc-7000/4/report', ['message' => '']);\n $this->assertResponseOk();\n $this->assertSession('The report could not be saved. Please, try again.', 'Flash.flash.0.message');\n }", "public function testGetInvalidBeerByName() : void {\n\t//grab a beer by a name that doesn't exist\n\t$beer = Beer::getBeerByBeerName($this->getPDO(), \"Giraffes on Parade\");\n\t$this->assertCount(0,$beer);\n}", "public function testAssertRedirectedFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertRedirectedTo(\"/unit_test/some_bad_action/123\");\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testValidateOrder2()\n{\n\n // Traversed conditions\n // if ($this->_orderNumber) == true (line 292)\n // if ($this->_globalOrderNumber) == false (line 295)\n\n $actual = $this->expectation->validateOrder();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testFooTakesXAsTrue()\n {\n // ... Put your test code here ...\n\n // ... Put your assertions here ...\n $this->assertTrue(false);\n $this->markTestIncomplete();\n }", "public function testError3()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == true (line 565)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testAtLeast0()\n{\n\n $actual = $this->expectation->atLeast();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testField_data0()\n{\n\n // Traversed conditions\n // for (...) == false (line 102)\n\n $actual = $this->cI_DB_cubrid_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testFooTakesXAsNonBoolean()\n {\n // ... Put your test code here ...\n\n // ... Put your assertions here ...\n $this->assertTrue(false);\n $this->markTestIncomplete();\n }", "public function testAssertAssignsFalse()\n {\n $this->get('/unit_test/test_action/123');\n\n $e = null;\n try {\n $this->assertAssigns('testVariable', 'wrong value');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n\n $e = null;\n try {\n $this->assertAssigns('testWrongVar', 'buga buga');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testInvalid()\n {\n $chain = new ChainValidation();\n $chain->add(new LinkFail());\n $chain->execute([]);\n\n $this->assertEquals(true, $chain->hasError());\n }", "public function testAssertIsBoolCorrectType(): void\n {\n Validator::assertIsBool(__FUNCTION__, false);\n // This assert won't be called if exception is thrown\n $this->assertTrue(true);\n }", "public function testError(): void {\n try {\n $result = Database::query('select devil from hell', true);\n $this->assertFalse($result);\n } catch (Exception $e) {\n $error = Database::error();\n\n $this->assertStringStartsWith('Table', $error);\n $this->assertStringEndsWith(\"doesn't exist\", $error);\n }\n }", "public function testCreate()\n {\n $this->assertTrue(false);\n }", "public function testField_data1()\n{\n\n // Traversed conditions\n // for (...) == true (line 101)\n // for (...) == false (line 101)\n\n $actual = $this->cI_DB_sqlite3_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testTestInvalidData()\n {\n $data = array();\n try {\n $result = $this->_constraint->test($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $this->assertEquals(\n 'Must contain $data[\\'line\\'] and $data[\\'contains\\'] elements in $data array',\n $e->getMessage()\n );\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testGet()\n {\n $this->assertTrue(false);\n }", "public function assertEmptyVerificationErrors()\n {\n $verificationErrors = $this->getParsedMessages('verification');\n if ($verificationErrors) {\n $this->fail(implode(\"\\n\", $verificationErrors));\n }\n }", "public function testIncorrectType2(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(2);\n }", "public function testField_data1()\n{\n\n // Traversed conditions\n // for (...) == true (line 123)\n // for (...) == false (line 123)\n\n $actual = $this->cI_DB_mysql_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetInvalidBeerByBeerAbv() : void {\n\t\t//grab a beer that doesn't exist\n\t\t$beer = Beer::getBeerByBeerAbv($this->getPDO(), 12);\n\t\t$this->assertCount(0, $beer);\n\t}", "function error() \r\n\t{\r\n\t\tassert(FALSE);\r\n\t}", "public function testList_fields0()\n{\n\n // Traversed conditions\n // for (...) == false (line 73)\n\n $actual = $this->cI_DB_sqlite3_result->list_fields();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testSomething()\n {\n $this->assertTrue(true);\n }", "public function testOne() {\n $this->assertTrue(TRUE);\n }", "function assert($assertion)\n{\n}", "public function testIsEligible0()\n{\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function isValidComparisonExpectations() {}", "public function isFailure();", "public function isFailure();", "public function testError1()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == false (line 565)\n // if (\\is_resource($this->stmt_id)) == false (line 569)\n // if (\\is_resource($this->conn_id)) == true (line 573)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testAssertRegexpResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('/nada/');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function dummyTest()\n {\n $this->assertTrue(true);\n }", "public function testAssertResponseStatusErrorFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('error');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testCompletenessOfAssertTestCases()\n {\n $cases = $this->provideAssertTestCases();\n $mock = new MemcachedMock();\n $mockReflection = new \\ReflectionClass($mock);\n $allMethods = $mockReflection->getMethods();\n $missing = [];\n foreach ($allMethods as $method) {\n $methodName = $method->getName();\n if (0 !== strpos($methodName, 'assert')) {\n continue;\n }\n\n foreach ($cases as $case) {\n if (in_array($methodName, $case, true)) {\n continue 2;\n }\n }\n\n $missing[] = $methodName;\n }\n\n $this->assertEmpty($missing, sprintf(\"Missing test for the asserts:\\n- %s\", implode(\"\\n- \", $missing)));\n }", "public function testValidateOrder3()\n{\n\n // Traversed conditions\n // if ($this->_orderNumber) == true (line 292)\n // if ($this->_globalOrderNumber) == true (line 295)\n\n $actual = $this->expectation->validateOrder();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testError0()\n{\n\n // Traversed conditions\n // if (\\is_resource($this->curs_id)) == false (line 565)\n // if (\\is_resource($this->stmt_id)) == false (line 569)\n // if (\\is_resource($this->conn_id)) == false (line 573)\n\n $actual = $this->cI_DB_oci8_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsSupported0()\n{\n\n $actual = $this->libedit->isSupported();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testExample()\n {\n \t$this->assertTrue(true);\n }", "public function testErreurPizzaInconnue()\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessage('Pizza inconnue');\n PizzaCreator::byName('Pizzananas');\n }", "public function testTwice0()\n{\n\n $actual = $this->expectation->twice();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testPassthru0()\n{\n\n // Traversed conditions\n // if ($this->_mock instanceof \\Mockery\\Mock) == false (line 812)\n\n $actual = $this->expectation->passthru();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function assert_equals($msg, $expected, $actual) {\n global $count, $fail;\n $count++;\n if ($expected !== $actual) {\n $fail++;\n echo \"Expected '$expected', got '$actual': $msg\\n\";\n }\n}", "public function testFailInvalidData()\n {\n $data = array();\n try {\n $this->_constraint->fail($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $message = 'Must contain $data[\\'key\\'], $data[\\'file\\'] and $data[\\'contains\\'] elements in $data array';\n $this->assertEquals($e->getMessage(), $message);\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testIncorrectType(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(STDOUT);\n }", "public function testVerify0()\n{\n\n $actual = $this->expectation->verify();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testListHistory2()\n{\n\n // Traversed conditions\n // if (!$history) == true (line 41)\n\n $actual = $this->libedit->listHistory();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testCtorFailure()\r\n {\r\n }", "function my_assert_handler($file, $line, $code)\r\n{\r\n\techo \"<hr>Assertion Failed:\r\n File '$file'<br />\r\n Line '$line'<br />\r\n Code '$code'<br /><hr />\";\r\n}", "function my_assert_handler($file, $line, $code)\r\n{\r\n\techo \"<hr>Assertion Failed:\r\n File '$file'<br />\r\n Line '$line'<br />\r\n Code '$code'<br /><hr />\";\r\n}", "public function testWithNoArgs0()\n{\n\n $actual = $this->expectation->withNoArgs();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function test_tests() {\n\t\t$this->assertTrue( true );\n\t}", "public function testError2()\n{\n\n // Traversed conditions\n // if (!\\is_array($sqlsrv_errors)) == false (line 370)\n // if (isset($sqlsrv_error['SQLSTATE'])) == false (line 376)\n // if (isset($sqlsrv_error['code'])) == true (line 380)\n // if (isset($sqlsrv_error['message'])) == false (line 385)\n\n $actual = $this->cI_DB_sqlsrv_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testField_data1()\n{\n\n // Traversed conditions\n // for (...) == true (line 102)\n // for (...) == false (line 102)\n\n $actual = $this->cI_DB_cubrid_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function assertTrue($actual, $message=NULL);", "public function testCreationFailed()\n {\n $this->expectException(Zend_Date_Exception::class);\n $this->expectExceptionMessage(\"No date part in 'notimestamp' found.\");\n $locale = new Zend_Locale();\n $date = new Zend_Date(\"notimestamp\");\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testError1()\n{\n\n // Traversed conditions\n // if (!\\is_array($sqlsrv_errors)) == false (line 370)\n // if (isset($sqlsrv_error['SQLSTATE'])) == false (line 376)\n // if (isset($sqlsrv_error['code'])) == false (line 380)\n // if (isset($sqlsrv_error['message'])) == true (line 385)\n\n $actual = $this->cI_DB_sqlsrv_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testSubmitValidData()\n {\n $this->assertTrue(true);\n }", "public function testResponseForTheTestThatFails()\n {\n $codeception = $this->codeception;\n $response = $codeception->getRunResponse('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n $this->assertTrue($response['run']);\n $this->assertFalse($response['passed']);\n $this->assertNull($response['message']);\n $this->assertNotNull($response['log']);\n $this->assertEquals($response['state'], 'failed');\n }" ]
[ "0.8563314", "0.8141441", "0.7898481", "0.78749996", "0.7785555", "0.77144414", "0.7659244", "0.7644858", "0.73231804", "0.7202426", "0.7114179", "0.71026635", "0.7088035", "0.7017355", "0.70168024", "0.6985386", "0.6985386", "0.6927081", "0.6920055", "0.68824905", "0.6853003", "0.6821559", "0.68171185", "0.67930526", "0.6786044", "0.67513895", "0.67477405", "0.67367494", "0.67181385", "0.6714798", "0.6712427", "0.6705784", "0.670243", "0.66937566", "0.66823745", "0.66782844", "0.6665048", "0.66333693", "0.6629586", "0.6626559", "0.66257435", "0.6620929", "0.66170436", "0.66024965", "0.65894663", "0.65875995", "0.65873194", "0.6584723", "0.65822756", "0.6574092", "0.6568425", "0.6560051", "0.6558159", "0.65564156", "0.65495825", "0.6549447", "0.6548437", "0.65450704", "0.6542694", "0.6541584", "0.65384114", "0.653499", "0.65322405", "0.6530784", "0.65200394", "0.65160376", "0.6514027", "0.65122414", "0.65122414", "0.6510871", "0.6502081", "0.6491489", "0.6483406", "0.6481652", "0.64808035", "0.6480355", "0.64744866", "0.6470984", "0.6469833", "0.64527917", "0.64527804", "0.64526916", "0.64516425", "0.64420915", "0.6441508", "0.64377546", "0.6426747", "0.6426466", "0.6426466", "0.6419563", "0.641759", "0.6414904", "0.64116895", "0.6409548", "0.6407695", "0.6404993", "0.64035565", "0.6397159", "0.6396179", "0.63935494" ]
0.81451535
1
test that a test expects that an assertion failed, but it has another message
тест, который ожидает, что утверждение не прошло, но у него другое сообщение
public function testAssertionFailedWithBadMessage(): void { $this->expectAssertionFailed('this is no true'); $this->assertTrue(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAssertionFailedWithMessage(): void\n {\n $this->expectAssertionFailed('this is no true');\n $this->assertTrue(false, 'this is no true');\n }", "public function testAssertionFailed(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(false);\n }", "public function testAssertionFailedMissingFailure(): void\n {\n $this->expectAssertionFailed();\n $this->assertTrue(true);\n }", "public function tstFailure(): void\n {\n \t$this->assertEquals('abc', '123');\n }", "protected function assertFailure()\n {\n $this->setExpectedException('PHPUnit_Framework_AssertionFailedError');\n }", "function testFailed($message = \"failed\")\n\t{\n\t\t$result = self::TEST_FAILED;\n\t\tthrow new Pie_Exception_TestCaseFailed(compact('message', 'result'));\n\t}", "private function assertFailure()\n {\n // we don't expect that:\n $this->dontSee('Laravel');\n }", "public function shouldFailInTest();", "public function testAssertionFailedMissingAssertion(): void\n {\n $this->expectAssertionFailed();\n }", "function assertFailureOnNext($message) {\r\n\t\t\techo $this->__getRow('assertFailureOnNext', $message);\r\n\t\t}", "public function testFailureMessages($assertion, $expectedMessage, $params): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage($expectedMessage);\n\n call_user_func_array($this->$assertion(...), $params);\n }", "public function testCreateWithValidationResultAndMessage() {\n\t\t$result = new ValidationResult(false, 'Incorrect placement of cutlery');\n\t\t$exception = new ValidationException($result, 'An error has occurred', E_USER_WARNING);\n\n\t\t$this->assertEquals(E_USER_WARNING, $exception->getCode());\n\t\t$this->assertEquals('An error has occurred', $exception->getMessage());\n\t\t$this->assertEquals(false, $exception->getResult()->valid());\n\t\t$this->assertEquals('Incorrect placement of cutlery', $exception->getResult()->message());\n\t}", "public function testGetErrorMessage()\n {\n $errorMessage = 'Custom error message';\n\n $error = new \\Exception($errorMessage);\n $error = $this->errorHandler->getErrorMessage($error);\n $this->assertEquals(sprintf('%s%s',$errorMessage, PHP_EOL,PHP_EOL), $error);\n }", "public function fail()\n\t{\n\t\t$frame = $this->assert_called_from();\n\t\t$this->record_fail($frame);\n\t}", "public function testAddFailed()\n {\n $this->post('/forum/cpus-andoverclocking/anandtech-intels-skylake-sp-xeon-vs-amds-epyc-7000/4/report', ['message' => '']);\n $this->assertResponseOk();\n $this->assertSession('The report could not be saved. Please, try again.', 'Flash.flash.0.message');\n }", "public abstract function expect($error_msg);", "public function testGetMessageInvalidParamType()\n {\n if (\\method_exists($this, 'expectException')) {\n // PHPUnit 5+.\n if (PHP_VERSION_ID >= 70000) {\n $this->expectException('TypeError');\n } else {\n $this->expectException('PHPUnit_Framework_Error');\n }\n } else {\n // PHPUnit 4.\n $this->setExpectedException('PHPUnit_Framework_Error');\n }\n\n $this->getMessageInfo(null, null, null);\n }", "function testFailsOnException () {\n\t}", "public function testCreateWithComplexValidationResultAndMessage() {\n\t\t$result = new ValidationResult();\n\t\t$result->error('A spork is not a knife')\n\t\t\t\t->error('A knife is not a back scratcher');\n\t\t$exception = new ValidationException($result, 'An error has occurred', E_USER_WARNING);\n\n\t\t$this->assertEquals(E_USER_WARNING, $exception->getCode());\n\t\t$this->assertEquals('An error has occurred', $exception->getMessage());\n\t\t$this->assertEquals(false, $exception->getResult()->valid());\n\t\t$this->assertEquals('A spork is not a knife; A knife is not a back scratcher',\n\t\t\t$exception->getResult()->message());\n\t}", "protected function _testFailed($message){\n\t\tif($this->colors){\n\t\t\techo str_repeat(' ',$this->tabs+1).\"\\033[0;31m$message\\n\";\n\t\t}\n\t\telse{\n\t\t\techo str_repeat(' ',$this->tabs+1).\"Failed : $message\\n\";\n\t\t}\n\t}", "public function failed_test_example()\n\t{\n\t\t$this->expect_array('not an array');\n\t}", "public function failure($message);", "public function testGetErrorMessagesAfterValidationFailure()\n {\n $validator = new Json();\n $validator->isValid('coderavine');\n $this->assertCount(1, $validator->errors());\n }", "public function testResponseForTheTestThatFails()\n {\n $codeception = $this->codeception;\n $response = $codeception->getRunResponse('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n $this->assertTrue($response['run']);\n $this->assertFalse($response['passed']);\n $this->assertNull($response['message']);\n $this->assertNotNull($response['log']);\n $this->assertEquals($response['state'], 'failed');\n }", "public function testCreateFromMessage() {\n\t\t$exception = new ValidationException('Error inferred from message', E_USER_ERROR);\n\n\t\t$this->assertEquals(E_USER_ERROR, $exception->getCode());\n\t\t$this->assertEquals('Error inferred from message', $exception->getMessage());\n\t\t$this->assertEquals(false, $exception->getResult()->valid());\n\t\t$this->assertEquals('Error inferred from message', $exception->getResult()->message());\n\t}", "function assert_equals($msg, $expected, $actual) {\n global $count, $fail;\n $count++;\n if ($expected !== $actual) {\n $fail++;\n echo \"Expected '$expected', got '$actual': $msg\\n\";\n }\n}", "public function testGetExceptionMessage0()\n{\n\n $actual = $this->expectation->getExceptionMessage();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "protected function assertError($result, $msg) {\n if (! ($result instanceof F\\Error))\n throw $result;\n $this->assertTrue($result instanceof F\\Error);\n $this->assertEquals($msg, $result->getMessage());\n }", "public function testAssertResponseStatusErrorFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('error');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function setFailMessage($msg);", "public function testGetMessageException()\n {\n $this->_object->getMessage();\n }", "public function testTheTestThatFails()\n {\n $codeception = $this->codeception;\n\n // Get the test that we know fails.\n $test = $codeception->getTest('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n // Confirm the test hasn't been or passed yet\n $this->assertFalse($test->ran());\n $this->assertFalse($test->passed());\n\n // Run the test, which generates the log and analyes the log as it gets added.\n $test = $codeception->run($test);\n\n // Confirm the test was run but it's not passed\n $this->assertTrue($test->ran());\n $this->assertFalse($test->passed());\n }", "public function testAssertNoMailSentFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Failed asserting that no emails were sent.');\n\n $this->sendEmails();\n $this->assertNoMailSent();\n }", "public function testIncorrectType2(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(2);\n }", "public function assertTrue($actual, $message=NULL);", "public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {\n $this->writeCase(\n 'fail',\n $time,\n $e->getMessage()\n );\n $this->currentTestPass = FALSE;\n }", "public function testAssertStringResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('nada');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testAssertRegexpResponseContainsFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseContains('/nada/');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testInvalidArgumentIsProperlyThrown()\n{\n $this->calc->add(3, 2);\n\n}", "public function testAssertContainsTextFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n\n $this->sendEmails();\n\n $this->assertMailContainsTextAt(1, 'html');\n }", "public function test_validation_fails_custom_message_argument()\n {\n\n $data = [\n 'a' => 1,\n 'b' => 2,\n 'c' => 3,\n 'hello' => 'world'\n ];\n\n $validator = new Validator([\n 'action' => function($inner_data, &$validator_message)\n {\n return false;\n },\n 'message' => 'Validation Custom Error'\n ]);\n\n $return = $validator->execute($data);\n $this->assertEquals('error',$return['status']);\n $this->assertEquals('Validation Custom Error',$return['result']);\n\n }", "public function testError() {\n\t\t$test = new TestError( 'runTest' );\n\t\t$test->run( $this->result );\n\n\t\t$this->assertSame( 1, $this->listener->startTestCount, 'test start count failed' );\n\t\t$this->assertSame( 1, $this->listener->errorCount, 'error count failed' );\n\t\t$this->assertSame( 1, $this->listener->endTestCount, 'test end count failed' );\n\t}", "public function testErrorMessage(): void\n {\n $e = new ExceptionBase('Message', 'Error');\n $this->assertEquals('Error', $e->getError());\n }", "public function testFailure() {\n\t\t$test = new Failure( 'runTest' );\n\t\t$test->run( $this->result );\n\n\t\t$this->assertSame( 1, $this->listener->startTestCount, 'test start count failed' );\n\t\t$this->assertSame( 1, $this->listener->failureCount, 'failure count failed' );\n\t\t$this->assertSame( 1, $this->listener->endTestCount, 'test end count failed' );\n\t}", "function testInvalidSubmit(){ \n $this->assertFieldValue('itemType[]',\"burrito\",\"burrito\",\"message goes here.\");\n $this->assertFieldValue('quantity[\"burrito\"]',3,3,\"another message\");\n }", "public function xtestDisplayMessageIfMissed() // <-- Don't forget to remove the x to enable the test\n {\n }", "public function testInvalidMessagesFail($message) {\n $checker = new CommitMessageChecker();\n\n $match_result = $checker->isValid($this->pattern, $message);\n\n $this->assertFalse($match_result, 'Expected the invalid pattern to fail the checker.');\n }", "public function testAssertResponseCodeFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse(300);\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function expect($passed, $msg = \"Default Message\", $success = \"Default Success Message\");", "public function testError() {\n $this->assertSession()->pageTextContains(\"An automated attempt to create the directory {$this->configDirectory}/sync failed, possibly due to a permissions problem.\");\n $this->assertDirectoryDoesNotExist($this->configDirectory . '/sync');\n }", "public function testErreurPizzaInconnue()\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessage('Pizza inconnue');\n PizzaCreator::byName('Pizzananas');\n }", "public function assertExitError() : void\n {\n $this->assertEquals(Command::ERROR, $this->commandResult);\n }", "public function assertEmptyVerificationErrors()\n {\n $verificationErrors = $this->getParsedMessages('verification');\n if ($verificationErrors) {\n $this->fail(implode(\"\\n\", $verificationErrors));\n }\n }", "private function createFailureMessage($message){\n\t\t\n\t\t$this->createHTMLArray(\"MESSAGE\", $message.\" failed unit test\");\n\t\t$this->createHTMLArray(\"RESULT\", \"FAILED\");\n\t}", "public function testExceptionErrors(): void\n {\n $exception = new BulkFailureException(['errors' => true]);\n\n self::assertSame(['errors' => true], $exception->getErrors());\n }", "public function testFailInvalidData()\n {\n $data = array();\n try {\n $this->_constraint->fail($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $message = 'Must contain $data[\\'key\\'], $data[\\'file\\'] and $data[\\'contains\\'] elements in $data array';\n $this->assertEquals($e->getMessage(), $message);\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testError(): void {\n try {\n $result = Database::query('select devil from hell', true);\n $this->assertFalse($result);\n } catch (Exception $e) {\n $error = Database::error();\n\n $this->assertStringStartsWith('Table', $error);\n $this->assertStringEndsWith(\"doesn't exist\", $error);\n }\n }", "public function isFailure();", "public function isFailure();", "public function expectFailedNut()\n {\n $this->expectedNut = 'failnut';\n }", "abstract protected function displayFailure($msg);", "public function testGetSytnaxFailure() {\n\t\t\t$this->expectException('InvalidArgumentException');\n\t\t\t$this->Helper->_getSyntax('ay dios mio!');\n\t\t}", "public function assertCommandIsFailure(string $message = ''): void\n {\n Assert::assertSame(Command::FAILURE, $this->getStatusCode(), $message ?: 'The command did not fail');\n }", "public function testAssertRedirectedFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertRedirectedTo(\"/unit_test/some_bad_action/123\");\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testAssertStringResponseDoesNotContainFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseDoesNotContain('Rendered test action template');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testNothing() {\n return $this->assertTrue(TRUE, t('ok useless but necessary :P'));\n }", "public function testInvalid()\n {\n $chain = new ChainValidation();\n $chain->add(new LinkFail());\n $chain->execute([]);\n\n $this->assertEquals(true, $chain->hasError());\n }", "public static function failureMessageDataProvider(): array\n {\n return [\n 'assertMailCount' => ['assertMailCount', 'Failed asserting that 2 emails were sent.', [2]],\n 'assertMailSentTo' => ['assertMailSentTo', 'Failed asserting that \\'missing@example.com\\' was sent an email.', ['missing@example.com']],\n 'assertMailSentToAt' => ['assertMailSentToAt', 'Failed asserting that \\'missing@example.com\\' was sent email #1.', [1, 'missing@example.com']],\n 'assertMailSentFrom' => ['assertMailSentFrom', 'Failed asserting that \\'missing@example.com\\' sent an email.', ['missing@example.com']],\n 'assertMailSentFromAt' => ['assertMailSentFromAt', 'Failed asserting that \\'missing@example.com\\' sent email #1.', [1, 'missing@example.com']],\n 'assertMailSentWith' => ['assertMailSentWith', 'Failed asserting that \\'Missing\\' is in an email `subject`.', ['Missing', 'subject']],\n 'assertMailSentWithAt' => ['assertMailSentWithAt', 'Failed asserting that \\'Missing\\' is in email #1 `subject`.', [1, 'Missing', 'subject']],\n 'assertMailContains' => ['assertMailContains', 'Failed asserting that \\'Missing\\' is in an email' . PHP_EOL . 'was: .', ['Missing']],\n 'assertMailContainsAttachment' => ['assertMailContainsAttachment', 'Failed asserting that \\'no_existing_file.php\\' is an attachment of an email.', ['no_existing_file.php']],\n 'assertMailContainsHtml' => ['assertMailContainsHtml', 'Failed asserting that \\'Missing\\' is in the html message of an email' . PHP_EOL . 'was: .', ['Missing']],\n 'assertMailContainsText' => ['assertMailContainsText', 'Failed asserting that \\'Missing\\' is in the text message of an email' . PHP_EOL . 'was: .', ['Missing']],\n 'assertMailContainsAt' => ['assertMailContainsAt', 'Failed asserting that \\'Missing\\' is in email #1' . PHP_EOL . 'was: .', [1, 'Missing']],\n 'assertMailContainsHtmlAt' => ['assertMailContainsHtmlAt', 'Failed asserting that \\'Missing\\' is in the html message of email #1' . PHP_EOL . 'was: .', [1, 'Missing']],\n 'assertMailContainsTextAt' => ['assertMailContainsTextAt', 'Failed asserting that \\'Missing\\' is in the text message of email #1' . PHP_EOL . 'was: .', [1, 'Missing']],\n 'assertMailSubjectContains' => ['assertMailSubjectContains', 'Failed asserting that \\'Missing\\' is in an email subject' . PHP_EOL . 'was: .', ['Missing']],\n 'assertMailSubjectContainsAt' => ['assertMailSubjectContainsAt', 'Failed asserting that \\'Missing\\' is in an email subject #1' . PHP_EOL . 'was: .', [1, 'Missing']],\n ];\n }", "protected function assertSuccess()\n {\n $this->setExpectedException(null);\n }", "public function testIncorrectType(): void\n {\n $this->expectException(\\Apishka\\Transformer\\Exception::class);\n $this->expectExceptionMessage('wrong input format');\n\n $this->prepareAssert()->process(STDOUT);\n }", "public function test_validation_fails_custom_message_inside_action()\n {\n $data = [\n 'a' => 1,\n 'b' => 2,\n 'c' => 3,\n 'hello' => 'world'\n ];\n\n $validator = new Validator([\n 'action' => function($inner_data, &$validator_message)\n {\n $validator_message = 'Validation Custom Error';\n return false;\n }\n ]);\n\n $return = $validator->execute($data);\n $this->assertEquals('error',$return['status']);\n $this->assertEquals('Validation Custom Error',$return['result']);\n\n }", "public function fail();", "public function describeMismatch($actual);", "public function testFailed(\\unittest\\TestFailure $failure) {\n }", "protected function assertErrorLogEntries() {}", "public function test_ThatWrongMessage()\n {\n $message = array (\n \"country_code\" => \"0092\",\n \"cellphone_number\" => \"3213674902\",\n \"message\" => \"This \",\n );\n\n $messageQueue = new Message;\n $response = $messageQueue->send($message, 1);\n\n $this->assertThat($response, $this->equalTo('Invalid message found. Message length should be in between 10 and 320'));\n }", "public function testShouldFailEmailValidation()\n {\n $response = $this->post('/api/module_reminder_assigner', ['contact_email' => ['email' =>'chitest@test.com']]);\n //expect redirect\n $response->assertStatus(302);\n }", "public function testTestInvalidData()\n {\n $data = array();\n try {\n $result = $this->_constraint->test($data);\n } catch (PHPUnitExt_Constraint_Exception $e) {\n $this->assertEquals(\n 'Must contain $data[\\'line\\'] and $data[\\'contains\\'] elements in $data array',\n $e->getMessage()\n );\n return true;\n } catch (Exception $e) {\n $this->fail('PHPUnitExt_Constraint_Exception Exception not thrown');\n }\n $this->fail('Exception not thrown');\n }", "public function testGetErrorSubCode(): void\n {\n self::assertSame(2, (new ClientException('', null, 1120, null, 2))->getErrorSubCode());\n }", "public function validationFails()\n {\n $this->assertEquals('FIELD_WRONG_VALUE', $this->validatorFilterDecorator->getErrorId());\n $this->mockValidator->expects($this->once())->method('validate')->will($this->returnValue(false));\n $this->mockRequestValueErrorFactory->expects($this->once())\n ->method('create')\n ->with($this->equalTo('FIELD_WRONG_VALUE'))\n ->will($this->returnValue(new stubRequestValueError('FIELD_WRONG_VALUE', array('en_EN' => 'Something wrent wrong.'))));\n $this->validatorFilterDecorator->callDoExecute('test_value');\n }", "public function testIsEligible2()\n{\n\n // Traversed conditions\n // if (!$validator->isEligible($this->_actualCount)) == true (line 268)\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testAssertContainsHtmlFailure(): void\n {\n $this->expectException(AssertionFailedError::class);\n\n $this->sendEmails();\n\n $this->assertMailContainsHtmlAt(0, 'text');\n }", "public function testAssertRegexpResponseDoesNotContainFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponseDoesNotContain('/(a)ction template/');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "function fail(string $test, array $stats = []) {\n# echo __METHOD__.\"(\".x2s(func_get_args()).\")\\n\";\n }", "public function testExceptionMessageContent(): void\n {\n // Migrator creation\n $migrator = (new MigratorEntity())\n ->setServiceId('migrator.id')\n ->setStatus(ComponentStatus::RUNNING);\n\n $migration = (new MigrationEntity())\n ->setServiceId('migration.id')\n ->addMigrator($migrator)\n ->setStatus(MigrationStatus::MIGRATORS);\n\n $this->getEntityManager()->persist($migration);\n $this->getEntityManager()->persist($migrator);\n $this->getEntityManager()->flush();\n\n // Exception test\n $exception = new MigratorNotReadyException($migrator);\n $message = $exception->getMessage();\n\n self::assertStringContainsString((string)$migrator->getId(), $message);\n self::assertStringContainsString($migrator->getStatus()->value, $message);\n self::assertInstanceOf(MigrationEntity::class, $migrator->getMigration());\n self::assertStringContainsString($migrator->getMigration()->getStatus()->value, $message);\n }", "public function testSimpleAssertion()\n {\n $this->assertEquals(1, 1);\n }", "public function testErrorWithoutMessage()\n {\n $data = [\n 'statusCode' => 39,\n 'data' => ['some' => 'data'],\n ];\n $this->response = $this->prophesize(ResponseInterface::class);\n $this->response->getContent(false)->willReturn(json_encode($data));\n\n $res = new Response($this->response->reveal());\n\n $this->expectException(RequestError::class);\n $this->expectExceptionMessage('Unknown error');\n $res->get('data');\n }", "public function testAssertResponseStatusSuccessFail()\n {\n $url = '/unit_test/test_redirect_action/123';\n $this->get($url);\n \n $e = null;\n try {\n $this->assertResponse('success');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function assertLog($assertion = true, $msg = '') {\n\t\tif($assertion == false) {\n\t\t\t$this->error($msg);\n\t\t}\n\t}", "public function testHasCodeFailsIfCodeDiffers()\n {\n $this->assertFailure();\n $this->assertions->hasCode(400);\n }", "public function testError()\n {\n $data = [\n 'statusCode' => 39,\n 'error' => 'error message',\n 'data' => ['some' => 'data'],\n ];\n $this->response = $this->prophesize(ResponseInterface::class);\n $this->response->getContent(false)->willReturn(json_encode($data));\n\n $res = new Response($this->response->reveal());\n\n $this->expectException(RequestError::class);\n $this->expectExceptionMessage('error message');\n $res->get('data');\n }", "public function testIsEligible1()\n{\n\n // Traversed conditions\n // if (!$validator->isEligible($this->_actualCount)) == false (line 268)\n\n $actual = $this->expectation->isEligible();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testShowFailed()\n {\n // Task not found\n $this->getJson('api/tasks/0')\n ->assertStatus(404)\n ->assertJson(['message' => 'No query results for model [App\\\\Models\\\\Task] 0']);\n }", "abstract public function isFailed();", "public function testCreateMemberValidationFailed(): void\n {\n $this->app->make(Kernel::class)->call('migrate:refresh', ['--seed' => TRUE]);\n $data = static::$memberData;\n $data['email_address'] = '';\n $this->post('/mailchimp/lists/' . env('MAILCHIMP_LIST_ID') . '/members', $data);\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseStatus(400);\n self::assertArrayHasKey('message', $content);\n self::assertArrayHasKey('errors', $content);\n self::assertEquals('Invalid data given', $content['message']);\n\n// foreach (\\array_keys(static::$memberData) as $key) {\n// if (\\in_array($key, static::$notRequired, true)) {\n// continue;\n// }\n//\n// self::assertArrayHasKey($key, $content['errors']);\n// }\n }", "public function testError2()\n{\n\n // Traversed conditions\n // if (!\\is_array($sqlsrv_errors)) == false (line 370)\n // if (isset($sqlsrv_error['SQLSTATE'])) == false (line 376)\n // if (isset($sqlsrv_error['code'])) == true (line 380)\n // if (isset($sqlsrv_error['message'])) == false (line 385)\n\n $actual = $this->cI_DB_sqlsrv_driver->error();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function testAlertNormalNotFound() {\n\t\t$message = new synd_syncml_message(file_get_contents(dirname(__FILE__).'/_syncml/syncml-019-alert.xml'));\n\t\t$actual = $message->getResponse();\n\t\t$expected = new synd_syncml_message(file_get_contents(dirname(__FILE__).'/_syncml/syncml-019-response-notfound.xml'));\n\t\t\n\t\t$this->assertEquals($expected, $actual);\n\t\t//$this->_diff($expected->toString(), $actual->toString());\n\n\t\t$message->delete();\n\t}", "public function testExceptionThrownWhenStatusIsNotValid():\tvoid\n {\n $paymentStatusValidator = new PaymentStatusValidator();\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Error - Payment status \"invalidStatus\" is invalid.');\n $paymentStatusValidator->validate(['status' => 'invalidStatus']);\n }" ]
[ "0.8435056", "0.7782759", "0.73334795", "0.7325337", "0.73132455", "0.7272055", "0.72609496", "0.72371644", "0.7224806", "0.70850825", "0.70588934", "0.7023829", "0.69817275", "0.6959208", "0.69285935", "0.6916064", "0.6883936", "0.68651", "0.6820587", "0.68088996", "0.6808553", "0.6802237", "0.6799522", "0.67921156", "0.6778452", "0.6749533", "0.6649827", "0.6636491", "0.6626013", "0.6603721", "0.66019934", "0.6593554", "0.65931225", "0.6575928", "0.657393", "0.6566421", "0.6559731", "0.65457326", "0.65432215", "0.65091014", "0.65036386", "0.6494444", "0.64886385", "0.6483554", "0.64807904", "0.64736736", "0.6462074", "0.64560646", "0.64417976", "0.6441003", "0.642578", "0.6418962", "0.64164925", "0.6411703", "0.64079314", "0.63986236", "0.6395311", "0.6384755", "0.6384755", "0.63808084", "0.63676", "0.6356547", "0.634307", "0.63106203", "0.62914926", "0.629095", "0.629095", "0.62879175", "0.62800485", "0.6277258", "0.6275289", "0.62743014", "0.6237587", "0.62230283", "0.6218176", "0.62135994", "0.6210307", "0.6199847", "0.61812615", "0.6180408", "0.6172147", "0.6171822", "0.6165901", "0.6164707", "0.6163294", "0.61618483", "0.6161238", "0.6159556", "0.6155251", "0.6154628", "0.615165", "0.6145346", "0.6144925", "0.6133793", "0.6128397", "0.6114983", "0.6109605", "0.61081326", "0.61060846", "0.61036134" ]
0.83413786
1
Loades all modules by going through all folders that are placed directly in modules folder and loads load.php file in each. Hooks to flow_elated_after_options_map action
Загружает все модули, проходя по всем папкам, которые находятся напрямую в папке modules, и загружает файл load.php в каждой. Привязывается к действию flow_elated_after_options_map
function flow_elated_load_modules() { foreach(glob(ELATED_FRAMEWORK_ROOT_DIR.'/modules/*/load.php') as $module_load) { include_once $module_load; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aton_qodef_load_modules() {\n foreach(glob(QODE_FRAMEWORK_ROOT_DIR.'/modules/*/load.php') as $module_load) {\n include_once $module_load;\n }\n }", "private function load_modules() {\r\n\t\t/**\r\n\t\t * Filters the modules slugs list\r\n\t\t */\r\n\t\t$modules = apply_filters(\r\n\t\t\t'wp_hummingbird_modules',\r\n\t\t\tarray( 'minify', 'gzip', 'caching', 'performance', 'uptime', 'cloudflare', 'gravatar', 'page_cache', 'advanced', 'rss', 'redis' )\r\n\t\t);\r\n\r\n\t\tarray_walk( $modules, array( $this, 'load_module' ) );\r\n\t}", "function advinvsys_load_modules() {\r\n global $cache, $plugins, $mybb, $theme, $db, $templates;\r\n\r\n // se intoarce lista cu modulele active\r\n $modules = $cache->read(\"advinvsys_modules\");\r\n\r\n $plugins->run_hooks('advinvsys_modules_do_load');\r\n\r\n if (is_array($modules['active'])) {\r\n\r\n // pentru fiecare modul din lista\r\n foreach ($modules['active'] as $module) {\r\n if ($module != \"\" && file_exists(MYBB_ROOT . \"inc/plugins/advinvsys/plugins/\" . $module . \".php\")) {\r\n require_once MYBB_ROOT . \"inc/plugins/advinvsys/plugins/\" . $module . \".php\";\r\n }\r\n }\r\n }\r\n}", "public function loadModules() {\n\t\tif (!$this->enabled) { return; }\t \n\n\t\t// Initialize structures\n\t\t$this->moduleHandlerLog = \"Loading modules...\\n\";\n\t\t$this->allModules = array();\n\t\t$this->activeModules = $this->db->getActiveModules(); // array\n\t\t\n\t\t// Iterate through the modules folder and generate the module references for the active modules.\n\t\t$basedir = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.CRM_MODULES_BASEDIR;\n\t\t$this->moduleHandlerLog .= \"Looking for modules in path $basedir\\n\";\n\t\t$files = scandir($basedir);\n\t\tforeach ($files as $filename) { // iterate throuhg files/directories.\n\t\t\t$realpath = $basedir.DIRECTORY_SEPARATOR.$filename;\n\t\t\t// If it's a directory (except for \".\" & \"..\")\n\t\t\tif (is_dir($realpath) && (substr($filename, 0, 1 ) !== '.' )) { // possible module.\n\t\t\t\t$this->moduleHandlerLog .= \"Analyzing $filename...\\n\";\n\t\t\t\t$mainModuleFilePath = $realpath.DIRECTORY_SEPARATOR.CRM_MODULES_MAIN_FILENAME;\n\t\t\t\t$classHierarchy = \\creamy\\ModuleHandler::getClassHierarchyInFile($mainModuleFilePath);\n\t\t\t\t$this->moduleHandlerLog .= \"Class hierarchy: \".var_export($classHierarchy, true).\"\\n\";\n\t\t\t\tif (is_array($classHierarchy) && count($classHierarchy) > 0) {\n\t\t\t\t\t$classes = isset($classHierarchy[\"classes\"]) ? $classHierarchy[\"classes\"] : array();\n\t\t\t\t\t$namespace = isset($classHierarchy[\"namespace\"]) ? $classHierarchy[\"namespace\"] : null;\n\t\t\t\t\t\n\t\t\t\t\t// Look for a valid module class.\n\t\t\t\t\tforeach ($classes as $class) {\n\t\t\t\t\t\tif (strtolower($class[\"type\"]) == \"class\") { // we have a class here.\n\t\t\t\t\t\t\ttry { // try to generate the module definition and add it to the modules.\n\t\t\t\t\t\t\t\t$classname = $class[\"name\"];\n\t\t\t\t\t\t\t\t$this->moduleHandlerLog .= \"Instantiating module with short name: $filename, file path: $mainModuleFilePath, class name: $classname, namespace: $namespace\\n\";\n\t\t\t\t\t\t\t\t$def = new \\creamy\\ModuleReference($filename, $mainModuleFilePath, $classname, $namespace);\n\t\t\t\t\t\t\t\t$this->allModules[$classname] = $def;\n\t\t\t\t\t\t\t\t$this->moduleHandlerLog .= \"Successfully loaded module $classname from $realpath\\n\";\n\t\t\t\t\t\t\t\tbreak;\t // success. We don't need to look any further in this file.\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (\\Exception $exception) { // Log module loading failure.\n\t\t\t\t\t\t\t\t$this->moduleHandlerLog .= \"Unable to load module \".$class[\"name\"].\" from $realpath: \".$exception->getMessage().\"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//error_log(\"Module loading process:\\n\".$this->moduleHandlerLog);\n\t}", "public function modules_loaded() {\r\n $this->desploy_modules_position();\r\n }", "private function loadModules()\n {\n //echo 'loading modules ';var_dump(Ini::$storeModules); \n foreach (Ini::$storeModules as $module)\n {\n $className = \\Sys\\Sysutils::Ucase($module);\n $fqClassname = \"\\\\Sys\\\\\".$className;\n Ini::loadModule(\\Sys\\Sysutils::Ucase($module), \\Sys\\Sysutils::Ucase($module), '\\Sys');\n Ini::$autoLoadedClasses[$className] = $fqClassname; \n }\n\n }", "public static function loadModules()\n {\n include_once FP_BB_MODULES_DIR . 'modules/google-map/google-map.php';\n }", "private function load_modules() {\n\t\t$modules_config = $this->App->load_config('modules');\n\t\t$form_config = $this->App->load_config('form_fields');\n\t\t\n\t\tself::$MODULES = array();\n\t\tunset($modules_config['modules']['form_fields']);\n\t\tself::$MODULES['modules'] = $modules_config['modules'];\t\t\t//Data from\n\t\tself::$MODULES['form_fields'] = $form_config['form_fields'];\t//config files\n\t\t\t\n\t\t$modules = self::$MODULES_MODEL->get_rows();\n\t\tforeach ($modules as $m) {\n\t\t\tself::$MODULES[ $m['name'] ]= $m;\n\t\t}\n\t}", "function init_modules() {\n $modules = $this->getModules();\n \n if(is_foreachable($modules)) {\n foreach($this->getModules() as $module) {\n $path = $module->getPath();\n \n $this->smarty->plugins_dir[] = $path . '/helpers';\n require_once $path . '/init.php';\n } // foreach\n \n $this->router->loadByModules($modules);\n $this->events_manager->loadByModules($modules);\n } // if\n }", "public static function load(): void{\n $modules = self::getOrderModules();\n $activates = [];\n /** @var Module[] $queue */\n $queue = [];\n $notDone = true;\n while ($notDone) {\n $notDone = false;\n foreach ($modules as $module) {\n if ($module->isLoaded()) {\n continue;\n }\n // Check if dependencies are met\n if (Module::checkDependencyStatus($module, $activates)) {\n $module->boot();\n array_push($activates, $module->getName());\n do_action('core_module_loaded', $module->getName());\n\n // Check if any queued modules can be loaded\n foreach ($queue as $key => $queuedModule) {\n if (!$queuedModule->isLoaded() && Module::checkDependencyStatus($queuedModule, $activates)) {\n $queuedModule->boot();\n array_push($activates, $queuedModule->getName());\n do_action('core_module_loaded', $queuedModule->getName());\n unset($queue[$key]);\n }\n }\n $notDone = true;\n } else {\n // Add to the queue\n if (!in_array($module, $queue)) {\n array_push($queue, $module);\n }\n }\n }\n }\n\n // Build the missing modules array\n $queue = array_filter(array_keys(self::$modules), function (string $m) use ($activates): bool{\n return !in_array($m, $activates);\n });\n $queue = array_map(function (string $name): Module{\n return self::$modules[$name];\n }, $queue);\n\n // Individual missing module hook\n foreach ($queue as $missingModule) {\n do_action('core_module_not_loaded_' . $missingModule->getName());\n }\n\n // Action for all modules which have not been loaded\n do_action('core_modules_not_loaded', $queue, $activates);\n\n // Action for all modules which have been loaded\n do_action('core_modules_loaded', $activates);\n }", "protected function loadModules()\n\t{\n\t\t/**\n\t\t * Loads the scripts module\n\t\t */\n\t\t$this->loadModule('Anunaboilerplate_Scripts');\n\n\t\t/**\n\t\t * Loads the views module\n\t\t */\n\t\t$this->loadModule('Anunaboilerplate_Views');\n\t}", "public function plugins_loaded() {\n\t\tforeach ( $this->get_option( 'active_modules', array() ) as $module ) {\n\t\t\tif ( file_exists( THEME_MY_LOGIN_PATH . '/modules/' . $module ) )\n\t\t\t\tinclude_once( THEME_MY_LOGIN_PATH . '/modules/' . $module );\n\t\t}\n\t\tdo_action_ref_array( 'tml_modules_loaded', array( &$this ) );\n\t}", "public function fetch_modules()\n {\n\t\tif (sizeof($this->modules) > 0)\n {\n \treturn;\n }\n\n if ( isset(ee()->session->cache['modules']['morsel']['template']['fetch_modules']))\n {\n \t$this->modules = ee()->session->cache['modules']['morsel']['template']['fetch_modules'];\n \treturn;\n }\n\n foreach(array(PATH_MOD) as $directory)\n\t\t{\n\t\t\tif ($fp = @opendir($directory))\n\t\t\t{\n\t\t\t\twhile (false !== ($file = readdir($fp)))\n\t\t\t\t{\n\t\t\t\t\tif ( is_dir($directory.$file) AND ! preg_match(\"/[^a-z\\_0-9]/\", $file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->modules[] = $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclosedir($fp);\n\t\t\t}\n\t\t}\n\n\t\t$this->modules = ee()->session->cache['modules']['morsel']['template']['fetch_modules']= array_unique($this->modules);\n }", "function LoadModules($loadall = false)\n\t{\n\t\tglobal $gCms;\n\t\t$db = $gCms->db;\n\t\t$cmsmodules = &$gCms->modules;\n\n\t\t$dir = dirname(dirname(dirname(__FILE__))).\"/modules\";\n\n\t\tif ($loadall == true)\n\t\t{\n\t\t\t$ls = dir($dir);\n\t\t\twhile (($file = $ls->read()) != \"\")\n\t\t\t{\n\t\t\t\tif (is_dir(\"$dir/$file\") && (strpos($file, \".\") === false || strpos($file, \".\") != 0))\n\t\t\t\t{\n\t\t\t\t\tif (is_file(\"$dir/$file/$file.module.php\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude_once(\"$dir/$file/$file.module.php\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($cmsmodules[$file]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Find modules and instantiate them\n\t\t\t$allmodules = @ModuleOperations::FindModules();\n\t\t\tforeach ($allmodules as $onemodule)\n\t\t\t{\n\t\t\t\tif (class_exists($onemodule))\n\t\t\t\t{\n\t\t\t\t\t$newmodule = new $onemodule;\n\t\t\t\t\t$name = $newmodule->GetName();\n\t\t\t\t\t$cmsmodules[$name]['object'] = $newmodule;\n\t\t\t\t\t$cmsmodules[$name]['installed'] = false;\n\t\t\t\t\t$cmsmodules[$name]['active'] = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tunset($cmsmodules[$name]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t#Figger out what modules are active and/or installed\n\t\t#Load them if loadall is false\n\t\tif (isset($db))\n\t\t{\n\t\t\t$query = \"SELECT * FROM \".cms_db_prefix().\"modules ORDER BY module_name\";\n\t\t\t$result = &$db->Execute($query);\n\t\t\twhile (!$result->EOF)\n\t\t\t{\n\t\t\t\tif (isset($result->fields['module_name']))\n\t\t\t\t{\n\t\t\t\t\t$modulename = $result->fields['module_name'];\n\t\t\t\t\tif (isset($modulename))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($loadall == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (isset($cmsmodules[$modulename]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cmsmodules[$modulename]['installed'] = true;\n\t\t\t\t\t\t\t\t$cmsmodules[$modulename]['active'] = ($result->fields['active']=='1'?true:false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($result->fields['active'] == '1')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (is_file(\"$dir/$modulename/$modulename.module.php\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tinclude_once(\"$dir/$modulename/$modulename.module.php\");\n\t\t\t\t\t\t\t\t\tif (class_exists($modulename))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$newmodule = new $modulename;\n\t\t\t\t\t\t\t\t\t\t$name = $newmodule->GetName();\n\n\t\t\t\t\t\t\t\t\t\tglobal $CMS_VERSION;\n\t\t\t\t\t\t\t\t\t\t$dbversion = $result->fields['version'];\n\n\t\t\t\t\t\t\t\t\t\t#Check to see if there is an update and wether or not we should perform it\n\t\t\t\t\t\t\t\t\t\tif (version_compare($dbversion, $newmodule->GetVersion()) == -1 && $newmodule->AllowAutoUpgrade() == TRUE)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$newmodule->Upgrade($dbversion, $newmodule->GetVersion());\n\t\t\t\t\t\t\t\t\t\t\t$query = \"UPDATE \".cms_db_prefix().\"modules SET version = ? WHERE module_name = ?\";\n\t\t\t\t\t\t\t\t\t\t\t$db->Execute($query, array($newmodule->GetVersion(), $name));\n\t\t\t\t\t\t\t\t\t\t\t$dbversion = $newmodule->GetVersion();\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t#Check to see if version in db matches file version\n\t\t\t\t\t\t\t\t\t\tif ($dbversion == $newmodule->GetVersion() && version_compare($newmodule->MinimumCMSVersion(), $CMS_VERSION) != 1)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$cmsmodules[$name]['object'] = $newmodule;\n\t\t\t\t\t\t\t\t\t\t\t$cmsmodules[$name]['installed'] = true;\n\t\t\t\t\t\t\t\t\t\t\t$cmsmodules[$name]['active'] = ($result->fields['active']=='1'?true:false);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tunset($cmsmodules[$name]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse //No point in doing anything with it\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($cmsmodules[$name]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tunset($cmsmodules[$modulename]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$result->MoveNext();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function initModulesLocations() {\n\t\t// initialized\n\t\tModuleManager::getInstance();\n\t}", "function agnosia_initialize_options_modules() {\r\n\r\n\tglobal $agnosia_options_modules;\r\n\r\n\t$agnosia_options_modules = array(\r\n\t\t'/inc/register/agnosia-register-general-options.php',\r\n\t\t'/inc/register/agnosia-register-sidebar-options.php',\r\n\t\t'/inc/register/agnosia-register-header-options.php',\r\n\t\t'/inc/register/agnosia-register-content-options.php',\r\n\t\t'/inc/register/agnosia-register-footer-options.php',\r\n\t);\r\n\r\n}", "function advinvsys_admin_load_hook() {\r\n global $cache, $plugins, $mybb, $theme, $db, $templates;\r\n\r\n advinvsys_load_modules();\r\n}", "protected function InitializeModules()\n {\n reset($this->moduleLoader->modules);\n\n foreach ($this->moduleLoader->modules as $spotName => $module) {\n $this->global->SetExecutingModulePointer($this->moduleLoader->modules[$spotName]);\n $this->moduleLoader->modules[$spotName]->Init();\n $tmp = null;\n\n /** @psalm-suppress NullArgument */\n $this->global->SetExecutingModulePointer($tmp);\n }\n reset($this->moduleLoader->modules);\n }", "public function modulesLoaded($e)\n {\n $moduleManager = $e->getTarget();\n $sm = $e->getParam('ServiceManager');\n $loadedModules = $moduleManager->getLoadedModules();\n $config = $sm->get('Config');\n if (isset($config['application_manager']) && isset($config['application_manager']['module_paths_migration'])) {\n $configMigration = $config['application_manager']['module_paths_migration'];\n foreach ($loadedModules as $name => $module) {\n if ($module instanceof Feature\\VersionProviderInterface && isset($configMigration[$name])) {\n $this->_listModules[$name] = $module->getVersion();\n $this->_pathMigrations[$name] = $configMigration[$name];\n }\n }\n }\n\n }", "public function loadModules()\n {\n if ($_ENV['APP_ENV'] === 'prod' && !file_exists(MODULE_CACHE_FILE)) {\n // @codeCoverageIgnoreStart\n throw new Exception('The application needs to be compiled before using in production');\n // @codeCoverageIgnoreEnd\n } else {\n $rdi = new AppendIterator();\n $rdi->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(INSTALLDIR . '/components', FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)));\n $rdi->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(INSTALLDIR . '/plugins', FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)));\n $time = file_exists(MODULE_CACHE_FILE) ? filemtime(MODULE_CACHE_FILE) : 0;\n\n if ($_ENV['APP_ENV'] === 'test' || F\\some($rdi, fn ($e) => $e->getMTime() > $time)) {\n Log::info('Rebuilding plugin cache at runtime. This means we can\\'t update DB definitions');\n self::process();\n }\n }\n\n $obj = require MODULE_CACHE_FILE;\n\n foreach ($obj->modules as $module) {\n $module->loadConfig();\n }\n\n foreach ($obj->events as $event => $callables) {\n foreach ($callables as $callable) {\n Event::addHandler($event, $callable);\n }\n }\n }", "private static function loadInstalledModules()\r\n\t{\r\n\t\tself::loadInstalledModuleData();\r\n\r\n\t\t/*\r\n\t\t * Module behaviour can be modified distinctly for every domain\r\n\t\t * If there is a proper file in the SITES/[domain]/modules directory, that\r\n\t\t * class can extend the basic module\r\n\t\t * */\r\n\t\tforeach (self::$installedModules as $currentModule) {\r\n\t\t\t$moduleName = $currentModule->name;\r\n\r\n\t\t\tif ($currentModule->active || $currentModule->category == 'core') {\r\n\t\t\t\t$moduleFilePath = 'modules' . DS . $moduleName . DS . 'module.' . $moduleName . '.php';\r\n\r\n\t\t\t\t$loaded = false;\r\n\r\n\t\t\t\tif (file_exists(ENGINE . DS . $moduleFilePath)) {\r\n\t\t\t\t\tinclude(ENGINE . DS . $moduleFilePath);\r\n\t\t\t\t\t$loaded = true;\r\n\t\t\t\t\tDebug::alert('Base module %' . $moduleName . ' successfully loaded.', 'o');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDebug::alert('Base module %' . $moduleName . ' could not be loaded.', 'n');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Looking for overrides\r\n\t\t\t\tif (file_exists(SITES . DS . DOMAIN . DS . $moduleFilePath)) {\r\n\t\t\t\t\tinclude(SITES . DS . DOMAIN . DS . $moduleFilePath);\r\n\t\t\t\t\tDebug::alert('Override for module %' . $moduleName . ' successfully loaded and activated.', 'o');\r\n\t\t\t\t\t$loaded = true;\r\n\t\t\t\t} elseif ($loaded) {\r\n\t\t\t\t\t// Creating an alias for ModuleNameBase to ModuleName,\r\n\t\t\t\t\t// because the system uses only ModuleName classes\r\n\t\t\t\t\tclass_alias('\\\\Arembi\\Xfw\\\\Module\\\\' . $moduleName . 'Base', '\\\\Arembi\\Xfw\\\\Module\\\\' . $moduleName);\r\n\r\n\t\t\t\t\tDebug::alert('Module %' . $moduleName . ' successfully loaded and activated.', 'o');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!$loaded) {\r\n\t\t\t\t\tDebug::alert('Module %' . $moduleName . ' active, but could not be loaded.', 'f');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself::$activeModules[] = $currentModule;\r\n\t\t\t\t\t// Adding path parameter order for current module\r\n\t\t\t\t\tself::$pathParamOrders[$moduleName] = $currentModule->pathParamOrder;\r\n\r\n\t\t\t\t\t// Now loading the model\r\n\t\t\t\t\t$moduleClass = '\\\\Arembi\\Xfw\\\\Module\\\\' . $moduleName;\r\n\t\t\t\t\tif ($moduleClass::hasModel()) {\r\n\t\t\t\t\t\t// Setting the proper model file name\r\n\t\t\t\t\t\t$modelFileName = 'model.' . $moduleName . '.php';\r\n\t\t\t\t\t\t$modelFilePath = 'modules' . DS . $moduleName . DS . $modelFileName;\r\n\r\n\t\t\t\t\t\t$loaded = false;\r\n\r\n\t\t\t\t\t\tif (file_exists(ENGINE . DS . $modelFilePath)) {\r\n\t\t\t\t\t\t\tinclude(ENGINE . DS . $modelFilePath);\r\n\t\t\t\t\t\t\tDebug::alert('Base model for module %' . $moduleName . ' successfully loaded and activated.', 'o');\r\n\t\t\t\t\t\t\t$loaded = true;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tDebug::alert('Base model for module %' . $moduleName . ' could not be loaded.', 'n');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Looking for overrides\r\n\t\t\t\t\t\tif (file_exists(SITES . DS . DOMAIN . DS . $modelFilePath)) {\r\n\t\t\t\t\t\t\tinclude(SITES . DS . DOMAIN . DS . $modelFilePath);\r\n\t\t\t\t\t\t\tDebug::alert('Override for model of module %' . $moduleName . ' successfully loaded and activated.', 'o');\r\n\t\t\t\t\t\t\t$loaded = true;\r\n\t\t\t\t\t\t} elseif($loaded) {\r\n\t\t\t\t\t\t\tclass_alias('\\\\Arembi\\Xfw\\\\Module\\\\' . $moduleName . 'BaseModel', '\\\\Arembi\\Xfw\\\\Module\\\\' . $moduleName . 'Model');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!$loaded) {\r\n\t\t\t\t\t\t\tDebug::alert('Model for module %' . $moduleName . ' could not be loaded.', 'f');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tDebug::alert('Module %' . $moduleName . ' installed, but not active.', 'i');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Loading domain specific models\r\n\t\t$domainSpecificModels = glob(DOMAIN_DIRECTORY . DS . 'models' . DS . '*.php');\r\n\r\n\t\tforeach ($domainSpecificModels as $m) {\r\n\t\t\tinclude($m);\r\n\t\t}\r\n\r\n\t}", "public function hookLoadLanguageFile()\n\t{\n\t\tif (TL_MODE == 'BE') {\n\t\t\tforeach ($GLOBALS['BE_MOD'] as &$modules) {\n\t\t\t\tforeach ($modules as $moduleKey => $module) {\n\t\t\t\t\tif (!empty($module['nested'])) {\n\t\t\t\t\t\tlist($nested) = explode(':', $module['nested']);\n\n\t\t\t\t\t\t// create nested menu entry\n\t\t\t\t\t\tif (!isset($modules[$nested])) {\n\t\t\t\t\t\t\tif (isset($GLOBALS['TL_LANG']['MOD'][$nested])) {\n\t\t\t\t\t\t\t\t$label = $GLOBALS['TL_LANG']['MOD'][$nested];\n\n\t\t\t\t\t\t\t\tif (is_array($label)) {\n\t\t\t\t\t\t\t\t\t$label = $label[0];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (empty($label)) {\n\t\t\t\t\t\t\t\t$label = $nested;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$pos = array_search(\n\t\t\t\t\t\t\t\t$moduleKey,\n\t\t\t\t\t\t\t\tarray_keys($modules)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$left = array_slice($modules, 0, $pos);\n\t\t\t\t\t\t\t$right = array_slice($modules, $pos);\n\n\t\t\t\t\t\t\t$middle = array(\n\t\t\t\t\t\t\t\t$nested => array(\n\t\t\t\t\t\t\t\t\t'tables' => array(''),\n\t\t\t\t\t\t\t\t\t'stylesheet' => 'system/modules/nested-menu/assets/css/nested-menu.css'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$modules = array_merge($left, $middle, $right);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (!isset($modules[$nested]['tables'])) {\n\t\t\t\t\t\t\t\t$modules[$nested]['tables'] = array('');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($modules[$nested]['tables'][0] !== '') {\n\t\t\t\t\t\t\t\tarray_unshift($modules[$nested]['tables'], '');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$modules[$nested]['callback'] = 'NestedMenuController';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// merge tables\n\t\t\t\t\t\tif (isset($module['tables'])) {\n\t\t\t\t\t\t\t$modules[$nested]['tables'] = array_merge(\n\t\t\t\t\t\t\t\t$modules[$nested]['tables'],\n\t\t\t\t\t\t\t\t$module['tables']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$GLOBALS['TL_JAVASCRIPT']['nested-menu'] = 'system/modules/nested-menu/assets/js/nested-menu.js';\n\n\t\t\t$GLOBALS['TL_CSS']['nested-menu'] = 'system/modules/nested-menu/assets/css/nested-menu.css';\n\t\t}\n\n\t\tunset($GLOBALS['TL_HOOKS']['loadLanguageFile']['nested-menu']);\n\t}", "protected function loadFullModulesList()\n {\n if ($this->modulesList === null) {\n $this->modulesList = $this->modules->getFullModulesList();\n }\n }", "function ava_bb_load_modules() {\n\n\t// Page content modules.\n\tif ( class_exists( 'FLBuilder' ) ) :\n\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/hero/hero.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/video-block/video-block.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/social-proof/social-proof.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/title/title.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/parallax-gallery/parallax-gallery.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/team/team.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/icon-block/icon-block.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/content-blocks/content-blocks.php' );\n\n\tendif;\n\n\t// Conditionally load portfolio template modules.\n\tif ( class_exists( 'FLBuilder' ) && post_type_exists( 'portfolio' ) ) :\n\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio/carson/carson.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio/ethan/ethan.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio/gavin/gavin.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio/liam/liam.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio/jackson/jackson.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio/mia/mia.php' );\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/portfolio-single/parallax/parallax.php' );\n\n\tendif;\n\n\t// Conditionally load WooCommerce modules.\n\tif ( class_exists( 'FLBuilder' ) && ava_is_woocommerce_activated() ) :\n\n\t\trequire get_theme_file_path( '/fl-builder/custom-modules/woocommerce-products/woocommerce-products.php' );\n\n\tendif;\n\n}", "function loadModules() {\n unset($this->modules);\n $sql = \"SELECT module_guid, module_title, module_type, modulegroup_id\n FROM %s\n WHERE (module_type = 'image') AND module_active = 1\n ORDER BY module_title\";\n if ($res = $this->databaseQueryFmt($sql, $this->tableModules)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $this->modules[$row['module_guid']] = $row;\n }\n }\n }", "public function mapModuleFiles()\n {\n if($this->cache) {\n $this->filesMap = $this->existsMappedClassesFile();\n }\n else if(!$this->cache || !$this->filesMap) {\n $this->filesMap = $this->explorer->getModulesFiles($this->dirStructure);\n }\n\n foreach($this->filesMap as $moduleName => $moduleDirectories) {\n foreach($moduleDirectories as $dirName => $files) {\n $this->handleFiles($moduleName, $dirName, $files);\n }\n }\n }", "function form_tools_load() {\n module_load_include('inc', 'entity_toolbox', 'toolbox/forms/functions');\n module_load_include('inc', 'entity_toolbox', 'toolbox/forms/extract');\n module_load_include('inc', 'entity_toolbox', 'toolbox/forms/field_settings');\n}", "private function loadModules(&$path)\n {\n $modules_locations = config_item('modules_locations') ? config_item('modules_locations') : FALSE;\n if(!$modules_locations)\n {\n $modules_locations = APPPATH . 'modules/';\n if(is_dir($modules_locations))\n {\n $modules_locations = array($modules_locations => '../modules/');\n }\n else\n {\n show_error('Modules directory not found');\n }\n }\n\n foreach ($modules_locations as $key => $value)\n {\n if ($handle = opendir($key))\n {\n while (false !== ($entry = readdir($handle)))\n {\n if ($entry != \".\" && $entry != \"..\")\n {\n if(is_dir($key.$entry.'/views'))\n {\n $path[] = $key.$entry.'/views';\n }\n }\n }\n closedir($handle);\n }\n }\n }", "public function modules() {\n $modules = Configure::read('Cloggy.modules');\n if (!empty($modules) && is_array($modules)) {\n foreach ($modules as $module) {\n \n //check if module allowed or not\n $checkModuleAllowed = $this->CloggyAcl->isModuleAllowedByAro($module); \n $checkModuleExcluded = $this->isModuleExcluded($module);\n \n /*\n * if module not excluded\n */\n if (!$checkModuleExcluded) {\n \n /*\n * only list allowed modules\n */\n if($checkModuleAllowed) {\n if (!array_key_exists($module, $this->__modules)) {\n\n $this->__configureModuleInfo($module);\n $this->__modules[$module]['name'] = $this->getModuleName();\n $this->__modules[$module]['desc'] = $this->getModuleDesc();\n $this->__modules[$module]['author'] = $this->getModuleAuthor();\n $this->__modules[$module]['url'] = $this->getModuleUrl();\n $this->__modules[$module]['dep'] = $this->getModuleDependency(); \n $this->__modules[$module]['install'] = $this->isModuleNeedToInstall($module);\n $this->__modules[$module]['installed'] = $this->isModuleInstalled($module);\n $this->__modules[$module]['install_link'] = $this->getModuleInstallLink($module);\n\n //check dependent\n $this->__checkDependentModule($module);\n\n }\n }\n \n } \n \n }\n }\n }", "public static function loadAll(){\n\t\t$settings = require PRAIRIE_PATH . \"/config/autoloader_meadow.php\";\n\t\t$toLoad = $settings[\"loadOrder\"];\n\t\tstatic::$ignore = $settings[\"ignore\"];\n\n\t\tforeach($toLoad as $loading){\n\t\t\tif(is_dir($loading)){\n\t\t\t\tstatic::load($loading);\n\t\t\t}else{\n\t\t\t\trequire $loading;\n\t\t\t}\n\t\t}\n\n\t\t$settings = require PRAIRIE_PATH . \"/config/autoloader_user.php\";\n\t\t$toLoad = $settings[\"loadOrder\"];\n\t\tstatic::$ignore = $settings[\"ignore\"];\n\n\t\tforeach($toLoad as $loading){\n\t\t\tif(is_dir($loading)){\n\t\t\t\tstatic::load($loading);\n\t\t\t}else{\n\t\t\t\trequire $loading;\n\t\t\t}\n\t\t}\n\t}", "protected function loadModules(): void\n\t{\n\t\t// line parsing\n\t\t$this->scriptModule = new Modules\\ScriptModule($this);\n\t\t$this->htmlModule = new Modules\\HtmlModule($this);\n\t\t$this->imageModule = new Modules\\ImageModule($this);\n\t\t$this->phraseModule = new Modules\\PhraseModule($this);\n\t\t$this->linkModule = new Modules\\LinkModule($this);\n\t\t$this->emoticonModule = new Modules\\EmoticonModule($this);\n\n\t\t// block parsing\n\t\t$this->paragraphModule = new Modules\\ParagraphModule($this);\n\t\t$this->blockModule = new Modules\\BlockModule($this);\n\t\t$this->figureModule = new Modules\\FigureModule($this);\n\t\t$this->horizLineModule = new Modules\\HorizLineModule($this);\n\t\t$this->blockQuoteModule = new Modules\\BlockQuoteModule($this);\n\t\t$this->tableModule = new Modules\\TableModule($this);\n\t\t$this->headingModule = new Modules\\HeadingModule($this);\n\t\t$this->listModule = new Modules\\ListModule($this);\n\n\t\t// post process\n\t\t$this->typographyModule = new Modules\\TypographyModule($this);\n\t\t$this->longWordsModule = new Modules\\LongWordsModule($this);\n\t\t$this->htmlOutputModule = new Modules\\HtmlOutputModule($this);\n\t}", "public function load_modules( $modules ) {\n\n\t\t$modules['UdbPro\\\\Widget\\\\Widget_Module'] = __DIR__ . '/modules/widget/class-widget-module.php';\n\t\t$modules['UdbPro\\\\Setting\\\\Setting_Module'] = __DIR__ . '/modules/setting/class-setting-module.php';\n\n\t\t$saved_modules = $this->saved_modules();\n\n\t\tif ( 'true' === $saved_modules['white_label'] ) {\n\t\t\t$modules['UdbPro\\\\Branding\\\\Branding_Module'] = __DIR__ . '/modules/branding/class-branding-module.php';\n\t\t}\n\n\t\tif ( 'true' === $saved_modules['login_customizer'] ) {\n\t\t\t$modules['UdbPro\\\\LoginCustomizer\\\\Login_Customizer_Module'] = __DIR__ . '/modules/login-customizer/class-login-customizer-module.php';\n\t\t}\n\n\t\tif ( 'true' === $saved_modules['admin_pages'] ) {\n\t\t\t$modules['UdbPro\\\\AdminPage\\\\Admin_Page_Module'] = __DIR__ . '/modules/admin-page/class-admin-page-module.php';\n\t\t}\n\n\t\tif ( 'true' === $saved_modules['admin_menu_editor'] ) {\n\t\t\t$modules['UdbPro\\\\AdminMenu\\\\Admin_Menu_Module'] = __DIR__ . '/modules/admin-menu/class-admin-menu-module.php';\n\t\t}\n\n\t\tif ( version_compare( ULTIMATE_DASHBOARD_PLUGIN_VERSION, '3.2.1', '>' ) ) {\n\t\t\tif ( 'true' === $saved_modules['admin_bar_editor'] ) {\n\t\t\t\t$modules['UdbPro\\\\AdminBar\\\\Admin_Bar_Module'] = __DIR__ . '/modules/admin-bar/class-admin-bar-module.php';\n\t\t\t}\n\t\t}\n\n\t\t$modules['UdbPro\\\\Tool\\\\Tool_Module'] = __DIR__ . '/modules/tool/class-tool-module.php';\n\t\t$modules['UdbPro\\\\License\\\\License_Module'] = __DIR__ . '/modules/license/class-license-module.php';\n\n\t\t$ms_helper = new Helpers\\Multisite_Helper();\n\n\t\tif ( $ms_helper->multisite_supported() ) {\n\t\t\t$modules['UdbPro\\\\Multisite\\\\Multisite_Module'] = __DIR__ . '/modules/multisite/class-multisite-module.php';\n\t\t}\n\n\t\treturn $modules;\n\n\t}", "private function load()\n\t{\n\t\t$tpl_exists = (is_object(Fsb::$tpl)) ? true : false;\n\n\t\t$sql = 'SELECT mod_name, mod_status, mod_type\n\t\t\t\tFROM ' . SQL_PREFIX . 'mods';\n\t\t$result = Fsb::$db->query($sql, 'mods_');\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t// Creation du switch de template\n\t\t\tif ($row['mod_status'] && $tpl_exists)\n\t\t\t{\n\t\t\t\tFsb::$tpl->set_switch('ac_mods_' . $row['mod_name']);\n\t\t\t}\n\n\t\t\t// Chargement de la langue\n\t\t\tif ($row['mod_type'] == self::EXTERN)\n\t\t\t{\n\t\t\t\tFsb::$session->load_lang('mods/lg_' . $row['mod_name']);\n\t\t\t}\n\t\t\t$this->data[$row['mod_name']] = $row['mod_status'];\n\t\t}\n\t\tFsb::$db->free($result);\n\t}", "static function preprocessModules() {\n\t\tforeach ( self::$mapModules as $moduleName => &$module ) {\n\t\t\tif ( array_key_exists( 'path', $module ) ) {\n\t\t\t\t// hash is a special path that indicates that\n\t\t\t\t// path matches module name\n\t\t\t\t$path = '/' . ( ($module['path'] === '#') ?\n\t\t\t\t\t$moduleName : $module['path'] );\n\t\t\t\tunset( $module['path'] );\n\t\t\t} else {\n\t\t\t\t$path = '';\n\t\t\t}\n\t\t\t$module['localBasePath'] = self::$extDir . $path;\n\t\t\t$module['remoteExtPath'] = \"GoogleMapsFn{$path}\";\n\t\t}\n\t}", "private function loadModulesInfo()\n {\n $sql = \"SELECT SQL_CACHE * FROM {$this->config->dbTablePrefix}common_module ORDER BY `rank` ASC\";\n\n $rs = $this->model->dba->query($sql);\n\n $_tmp = array();\n\n while($row = $rs->fetchAssoc())\n {\n if(isset($row['config']))\n {\n $this->config->setModuleArray($row['name'], unserialize($row['config']), false);\n unset($row['config']);\n }\n $this->model->register($row['name'], $row);\n $this->model->setModOrder($row['rank'], $row['name']);\n }\n }", "public function rebuildModulesInformation()\n {\n // First remove all module information from the db.\n $oConfig = $this->getConfig();\n\n $oConfig->setConfigParam('aModules', array());\n $oConfig->saveShopConfVar('aarr', 'aModules', array());\n\n $oConfig->setConfigParam('aModuleFiles', array());\n $oConfig->saveShopConfVar('aarr', 'aModuleFiles', array());\n\n $oConfig->setConfigParam('aModuleTemplates', array());\n $oConfig->saveShopConfVar('aarr', 'aModuleTemplates', array());\n\n oxDb::getDb()->execute('DELETE FROM `oxtplblocks`');\n\n // Then re-activate all modules that are not listed as disabled.\n foreach ($this->getActiveModules() as $sModuleId) {\n try {\n $oModule = new \\oxModule;\n if ($oModule->load($sModuleId))\n $oModule->activate();\n } catch (\\Exception $Exception) {\n }\n }\n }", "function post_install_modules(){\n if(is_file('modules_post_install.php')){\n global $current_user, $mod_strings;\n $current_user = new User();\n $current_user->is_admin = '1';\n require_once('ModuleInstall/PackageManager/PackageManager.php');\n require_once('modules_post_install.php');\n //we now have the $modules_to_install array in memory\n $pm = new PackageManager();\n $old_mod_strings = $mod_strings;\n foreach($modules_to_install as $module_to_install){\n if(is_file($module_to_install)){\n $pm->performSetup($module_to_install, 'module', false);\n $file_to_install = sugar_cached('upload/upgrades/module/').basename($module_to_install);\n $_REQUEST['install_file'] = $file_to_install;\n $pm->performInstall($file_to_install);\n }\n }\n $mod_strings = $old_mod_strings;\n }\n}", "protected function _initModules()\n {\n\n }", "private function includeModules(){\n $routeManager = $this->getComponent(\"RouteManager\");\n $configManager = $this->getComponent(\"ConfigManager\");\n\n foreach($configManager->getModuleListConfig() as $module_name){\n $module_file = require_once APPLICATION_PATH.\"/module/{$module_name}/src/Module.php\";\n $module_namespace = \"\\\\{$module_name}\\\\Module\";\n $module = new $module_namespace;\n\n $this->modules[$module_name] = $module;\n $cm = $this->getComponent(\"ServiceManager\");\n// $routeManager->addModuleRoutes($module->getRouteConfig($this->getComponent(\"ServiceManager\")));\n\n $configManager->addModuleConfig($module->getConfig($cm));\n }\n return $this->modules;\n }", "function boot()\r\n{\r\n\r\n // settings should load FIRST\r\n fileload(\"settings/settings.php\");\r\n // fileload the classes\r\n fileload(\"includes/*/*\");\r\n\r\n $url = new URL();\r\n //echo $url->GetUrl();\r\n\r\n\r\n $router = new Router();\r\n // Passive mods should run Before the active ones\r\n $router->RunPassiveModules();\r\n // Run the active mod from the URL\r\n $router->RunActiveModFromURL($url);\r\n\r\n append_left_sidebar(Theme::MainNavigationMenu());\r\n\r\n\r\n ob_start();\r\n Theme::LoadCurrentTheme();\r\n ob_end_flush();\r\n\r\n}", "function hook_modules_to_enable() {\n $modules = array(\n 'pathauto',\n 'nat',\n );\n return $modules;\n}", "function _load_module_packages()\n {\n $this->load->config('modules');\n \n $modules = $this->config->item('modules');\n \n foreach ($modules as $module)\n {\n $this->load->add_package_path(MODPATH . $module);\n }\n }", "public function loadBlocks()\n\t{\n\t\t$this->_cacheModuleBlocks();\t\n\t}", "public function load_module_config(){\n\t\trequire_once( 'config/'.$this->name.'-settings.php' );\n }", "function load(){\n $files=array(\n 'taxonomy/classes.php',\n 'tickets/classes.php',\n 'tickets/helper.php',\n 'tickets/ticket-admin-screen.php',\n 'settings/classes.php',\n 'core/attachment.php',\n 'core/comment.php',\n 'core/component.php',\n 'core/core-base.php',\n 'core/milestone.php',\n 'core/permission.php',\n 'core/priority.php',\n 'core/reporter.php',\n 'core/resolution.php',\n 'core/severity.php',\n 'core/status.php',\n 'core/ticket-extra.php',\n 'core/type.php',\n 'core/user.php',\n 'core/link-functions.php',\n 'core/version.php',\n 'core/workflow-keywords.php',\n 'core/search.php',\n 'business-functions.php',\n 'includes/css-js.php',\n 'includes/filters.php',\n 'core/general-templates.php',\n 'mailer/mailer.php',\n 'mailer/template/base.php',\n 'filters.php'\n );\n if(is_admin()){\n $files[]='admin/screen.php';\n $files[]='admin/seed.php';\n } \n foreach ($files as $file)\n require_once $this->path.$file;\n }", "public function loaded()\n {\n add_action('jetpack_activate_module', array($this, 'on_jetpack_activate_module'), 10, 2);\n add_action('jetpack_deactivate_module', array($this, 'on_jetpack_deactivate_module'), 10, 2);\n }", "protected function loadModules()\n\t{\n\t\t$this->page = new Github_Explorer_Page();\n\t}", "public function loadModuleData() {}", "function entity_groups_tools_load() {\n module_load_include('inc', 'entity_toolbox', 'toolbox/entity_groups/controllers');\n}", "function svl_support_init_load_modules() {\n\t\tglobal $svl_support_includes;\n\n\t\t$svl_support_includes = new SVL_Support_Includes();\n\t}", "public function getLoadedModules();", "private function initModules(ClassLoader $classLoader): void\n {\n /**\n * Developer is able to enable/disable a module through editing `app/config/modules.php`.\n * Modules which do not exist in the config file will be added after initializing.\n */\n $this->diData = $this->eventsData = [];\n $this->modules = [self::ENABLED => [], self::DISABLED => []];\n $this->moduleStatus = is_file(($statusFile = $this->getStatusFile())) ? require $this->getStatusFile() : [];\n\n /**\n * Collect modules built by 3rd party from `vendor` folder\n */\n foreach ($classLoader->getPrefixesPsr4() as $namespace => $directoryGroup) {\n foreach ($directoryGroup as $directory) {\n try {\n $this->collectModule(\n $this->config->collectData($directory . '/' . self::DIR_CONFIG),\n $namespace,\n $directory\n );\n } catch (DomainException $e) {\n continue;\n }\n }\n }\n\n /**\n * Collect local customized modules from `app/modules` folder\n */\n $dir = $this->directory->getDirectoryPath(Directory::MODULES);\n foreach ($this->fileManager->getSubFolders($dir) as $moduleDir) {\n $directory = $dir . '/' . $moduleDir;\n if (($moduleConfig = $this->config->collectData($directory . '/' . self::DIR_CONFIG))) {\n $this->collectModule($moduleConfig, 'App\\\\' . $moduleDir . '\\\\', $directory);\n }\n }\n\n $this->checkDependency();\n usort($this->modules[self::ENABLED], [$this, 'sortModules']);\n $this->updateModuleStatus();\n\n foreach ($this->modules[self::ENABLED] as $moduleConfig) {\n $this->diData = array_merge(\n $this->diData,\n $this->diConfig->collectData($moduleConfig[self::MODULE_DIR] . '/' . self::DIR_CONFIG)\n );\n $this->eventsData = array_merge(\n $this->eventsData,\n $this->eventConfig->collectData($moduleConfig[self::MODULE_DIR] . '/' . self::DIR_CONFIG)\n );\n $this->systemConfigData = array_merge(\n $this->systemConfigData,\n $this->systemConfig->collectData($moduleConfig[self::MODULE_DIR] . '/' . self::DIR_CONFIG)\n );\n }\n }", "public function run()\n {\n $modules = [\n [\n 'name' => 'Dashboard',\n 'route_name' => 'admin.dashboard',\n 'position' => 1,\n 'icon' => '<i class=\"icon-home4\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Posts',\n 'route_name' => 'admin.post.index',\n 'position' => 2,\n 'icon' => '<i class=\"icon-file-check2\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Categories',\n 'route_name' => 'admin.category.index',\n 'position' => 3,\n 'icon' => '<i class=\"icon-tree5\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Tags',\n 'route_name' => 'admin.tag.index',\n 'position' => 4,\n 'icon' => '<i class=\"icon-price-tag\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Pages',\n 'route_name' => 'admin.page.index',\n 'position' => 5,\n 'icon' => '<i class=\"icon-file-check\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Emails',\n 'route_name' => 'admin.email.index',\n 'position' => 6,\n 'icon' => '<i class=\"icon-envelop\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Access',\n 'route_name' => '',\n 'position' => 7,\n 'icon' => '<i class=\"icon-home4\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Users',\n 'route_name' => 'admin.user.index',\n 'position' => 8,\n 'icon' => '<i class=\"icon-users\"></i>',\n 'is_active' => 1\n ],\n [\n 'name' => 'Settings',\n 'route_name' => 'admin.settings',\n 'position' => 9,\n 'icon' => '<i class=\"icon-cog\"></i>',\n 'is_active' => 1\n ],\n\n ];\n\n Module::insert($modules);\n }", "private function findModule(){\n\n $dir_handle = opendir($this->moudleDir);\n\n while($filename = readdir($dir_handle)){\n if( ( $filename != \".\" ) && ( $filename != \"..\" ) ){\n $subFile = $this->moudleDir . DIRECTORY_SEPARATOR . $filename;\n //If the file is a dirction.\n if(is_dir($subFile)){ \n $this->moduleList[] = $filename;\n }\n }\n }\n }", "public static function flush_rewrite_rules_on_modules_switch() {\r\n\t\t$set = get_settings_errors( 'options-framework' );\r\n\t\tif ( $set && isset( $_GET['page'] ) && 'of-modules-menu' === $_GET['page'] ) {\r\n\t\t\tflush_rewrite_rules();\r\n\t\t}\r\n\t}", "private function load_files() {\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/config.php';\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/assets.php';\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/manager.php';\n\n require PREMIUM_ADDONS_PATH . 'includes/templates/types/manager.php';\n\n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/api.php';\n \n }", "protected function configure_modules() {\n\t $config = CmsConfiguration::get(\"modules\");\n\t if(!is_array($mods = $config[\"enabled_modules\"]) ) $mods = array(); \n\t if($mods && $this->current_user->usergroup != \"30\") {\n\t foreach(CMSApplication::get_modules() as $module=>$values) {\n if(!array_key_exists($module, $mods)) {\n CMSApplication::unregister_module($module);\n }\n }\n\t }\n\t}", "protected function __loadUserModules() {\n\t\t$user_modules = array ();\n\t\t\n\t\tif ($this->logged_in) {\n\t\t\t$this->breadcrumbs->pop(\"/\");\n\t\t\t$this->breadcrumbs->push ( 'Home', 'home/'.$this->getClientId(), '<i class=\"fa fa-home\"></i> ' );\n\t\t\t$available_modules = $this->config->item ( 'modules' );\n\t\t\t$sub_menus = $this->subMenu ();\n\t\t\tforeach ( $available_modules as $module ) {\n\t\t\t\tif (! empty ( $module ['clientFeatures'] )) {\n\t\t\t\t\t$client_config = $this->client_model->getClientConfig ( $this->client );\n\t\t\t\t\tforeach ( $module ['clientFeatures'] as $feature => $value ) {\n\t\t\t\t\t\tif (empty ( $client_config [$feature] ) || $client_config [$feature] != $value) {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (! empty ( $module ['permission'] ) && $this->user_model->hasPermission ( $this->client, $this->email, $module ['module'], $module ['permission'] )) {\n\t\t\t\t\t$menu = array ();\n\t\t\t\t\tif (! empty ( $sub_menus ['permission'] ) && $sub_menus ['permission'] == $module ['permission']) {\n\t\t\t\t\t\t// that means this page has some submenu.\n\t\t\t\t\t\tforeach ( $sub_menus ['menu'] as $menu_item ) {\n\t\t\t\t\t\t\tif (! empty ( $menu_item ['permission'] ) && ! $this->user_model->hasPermission ( $this->client, $this->email, $menu_item ['module'], $menu_item ['permission'] )) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$menu [] = $menu_item;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$module ['sub_menu'] = $menu;\n\t\t\t\t\t\n\t\t\t\t\t$user_modules [] = $module;\n\t\t\t\t}else if (! empty ( $module ['permission'] ) && in_array( $module ['permission'], array(\"SupportPage\"))){\n\t\t\t\t\t$user_modules [] = $module;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->load->vars ( array (\n\t\t\t\t'user_modules' => $user_modules \n\t\t) );\n\t}", "protected function loadPlugins()\n {\n if (is_null($this->parent)) {\n $this->parent = sprintf('%s:Admin:Browser@indexAction', $this->moduleName);\n }\n\n $this->view->getBreadcrumbBag()->addOne($this->moduleName, $this->parent)\n ->addOne('Configuration');\n }", "public function loadModule()\n {\n // Nothing to do here yet.\n }", "private function initModules()\n {\n $this->dm->module('Iterator\\Depend\\Module');\n $this->dm->module('Logger\\Depend\\Module');\n $this->dm->module('ApiHelper\\Depend\\Module');\n }", "public static function onLoadConfig() {\n $modules = Kohana::config('core.modules');\n $modules = array_merge(LoadConfig::_readModules(THEMEPATH),\n LoadConfig::_readModules(MODPATH), $modules);\n\n Kohana::config_set('core.modules', $modules);\n }", "public function run()\n {\n array_unshift($this->scripts, 'modules/map');\n parent::run();\n }", "private function initSubModules()\n\t{\n\t\t$modules = new Collection($this);\n\t\t$path = $this->resolvePath(\"modules\");\n\t\t\n\t\tif (is_dir($path)) {\n\t\t\tforeach (new \\DirectoryIterator($path) as $dir) {\n\t\t\t\tif ($dir->isDir() && !$dir->isDot()) {\n\t\t\t\t\t$module = $modules->add(\n\t\t\t\t\t\t$dir->getBasename(),\n\t\t\t\t\t\t$dir->getRealPath()\n\t\t\t\t\t);\n\t\t\t\t\t$module->init();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->modules = $modules;\n\t}", "private function assignModules(){\n\t\t// Parsing and assign modules\n\t\tforeach($this->data[\"modules_data\"] as $module => $module_data){\n\t\t\t$html = \"\";\n\t\t\tforeach($module_data as $plugin => $plugin_data){\t\t\t\t\n\t\t\t\t$version = $plugin_data[\"version\"];\n\t\t\t\t$data = $plugin_data[\"data\"];\t\t\t\t\n\t\t\t\t$smarty_plugin = $this->initSmarty();\n\t\t\t\t$smarty_plugin->setTemplateDir($this->config[\"root\"].'/system/php/plugins/'.$plugin.'/'.$version.'/front/templates');\n\t\t\t\t$smarty_plugin->assign(\"data\", $data);\n\t\t\t\t$html.= $smarty_plugin->fetch(\"default.tpl\");\n\t\t\t}\n\t\t\t$this->smarty->assign($module,$html);\n\t\t}\n\t}", "function qode_listing_load_files() {\n\t\trequire_once 'load.php';\n\t}", "public static function init_modules() {\n self::log('CMS', 'CMS::init_modules() searching: ' . PATH_MODULE_ROOT);\n self::$__modules = array();\n\n $folders = array();\n $modules = scandir(PATH_MODULE_ROOT);\n foreach ($modules as $v) {\n if ($v != '.' && $v != '..') {\n $folders[] = $v;\n }\n }\n \n if (is_dir(PATH_MODULE_ROOT_ADDON)) {\n self::log('CMS', 'CMS::init_modules addons() searching: ' . PATH_MODULE_ROOT_ADDON);\n $folders_addon = array();\n $modules = scandir(PATH_MODULE_ROOT_ADDON);\n foreach ($modules as $v) {\n if ($v != '.' && $v != '..') {\n $folders_addon[] = $v;\n }\n }\n }\n \n if (is_dir(PATH_MODULE_ROOT_ADDON)) {\n foreach ($folders_addon as $v) {\n $folder = dir(PATH_MODULE_ROOT_ADDON . $v);\n while (false !== ($entry = $folder->read())) {\n if (strpos($entry, '.mod.') !== false) {\n $path = PATH_MODULE_ROOT_ADDON . $v . '/' . $entry;\n if (!is_file(PATH_MODULE_ROOT_ADDON . $v . '/ignore.txt')) {\n self::log('CMS', 'CMS::init_modules addon() found: ' . $path);\n self::$__modules[] = array($path, $v);\n } else {\n self::log('CMS', 'CMS::init_modules addon() ignoring: ' . $path);\n }\n }\n }\n $folder->close();\n }\n }\n \n foreach ($folders as $v) {\n $folder = dir(PATH_MODULE_ROOT . $v);\n while (false !== ($entry = $folder->read())) {\n $found = false;\n if (strpos($entry, '.mod.') !== false) {\n $path = PATH_MODULE_ROOT . $v . '/' . $entry;\n if (!is_file(PATH_MODULE_ROOT . $v . '/ignore.txt')) {\n foreach(self::$__modules as $name){\n if($name[1] == $v){\n $found = true;\n }\n }\n if(!$found){\n self::log('CMS', 'CMS::init_modules() found: ' . $path);\n self::$__modules[] = array($path, $v);\n }else{\n self::log('CMS', 'CMS::init_modules() override: ' . $path);\n }\n } else {\n self::log('CMS', 'CMS::init_modules() ignoring: ' . $path);\n }\n }\n }\n $folder->close();\n }\n \n \n foreach (self::$__modules as $v) {\n include($v[0]);\n }\n \n }", "protected function LoadFundamentalModules()\n\t{\n\t\tspl_autoload_register ( array (\n\t\t\t$this, \"Autoload\" \n\t\t),true );\n\t\t//jURL module \n\t\t$this->LoadCustomSystemModule ( \"model.core.jurl\", \".\" );\n\t\t//Registry\n\t\t$this->LoadCustomSystemModule ( \"model.core.registry\", \".\" );\n\t\t$this->Registry = new jRegistry ( );\n\t\t$this->LoadCustomSystemModule ( \"model.j\", \".\" ); //j:: helper\n\t\tj::__Initialize ( $this );\n\t\t$this->LoadCustomSystemModule ( \"model.functions\", \".\" ); //functions helper\n\t\t\n\t}", "public function loadHooks() {\n\t\t\n\t\t$utils = Utilities::get_instance();\n\t\t$utils->log(\"Loading admin_* hooks\");\n\t\tadd_action( 'admin_init', array( $this, 'register' ), 10 );\n\t\tadd_action( 'admin_menu', array( $this, 'addToAdminMenu' ), 10 );\n\t\t\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'loadInputJS' ) );\n\t\t\n\t\t$utils->log(\"Loading settings-options filter hooks\");\n\t\tadd_filter( 'e20r-settings-option-name', array( $this, 'getOptionName' ), 10, 2 );\n\t\t\n\t\t$utils->log(\"Loading View specific JS path filter\");\n\t\tadd_filter( 'e20r-settings-enqueue-js-path', 'E20R\\PMPro\\Addon\\Email_Confirmation\\Views\\Inputs\\Select::jsPath', 10, 1 );\n\t\t\n\t}", "public function setupModules() { }", "protected function loadItems()\n {\n /*\n * Load module items\n */\n foreach ($this->callbacks as $callback) {\n $callback($this);\n }\n }", "private function readModules() {\n $modules = array();\n\n $path = new File(Zibo::DIRECTORY_MODULES);\n $files = $path->read();\n foreach ($files as $file) {\n // skip hidden files\n if (strncmp($file->getName(), '.', 1) === 0) {\n continue;\n }\n\n $fileModules = $this->getModulesFromPath($file);\n\n $modules = Structure::merge($modules, $fileModules);\n }\n\n $this->model->addModules($modules);\n }", "private function findModulePaths()\r\n {\r\n $dirsAsKeys = $this->appConf->getControllerDirs($this->moduleName);\r\n $dirs = array();\r\n foreach ($dirsAsKeys as $dir => $junk) {\r\n $dirs[] = dirname($dir);\r\n }\r\n $this->modulePaths = $dirs;\r\n }", "function sed_wonderland_add_modules( $modules ){\n\n global $sed_pb_modules;\n\n //$module_name = \"themes/wonderland/site-editor/modules/posts/posts.php\";\n //$modules[$module_name] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/posts/posts.php', true, true);\n\n //$module_name = \"themes/wonderland/site-editor/modules/wonderland-products/wonderland-products.php\";\n //$modules[$module_name] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/wonderland-products/wonderland-products.php', true, true);\n \n $module_name = \"themes/wonderland/site-editor/modules/in-btn-back/in-btn-back.php\";\n $modules[$module_name ] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/in-btn-back/in-btn-back.php', true, true);\n \n \n //$module_name = \"themes/wonderland/site-editor/modules/vertical-header/vertical-header.php\";\n //$modules[$module_name ] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/vertical-header/vertical-header.php', true, true);\n\n \n $module_name = \"themes/wonderland/site-editor/modules/rocket/rocket.php\";\n $modules[$module_name ] = $sed_pb_modules->get_module_data(get_stylesheet_directory() . '/site-editor/modules/rocket/rocket.php', true, true);\n \n return $modules;\n\n}", "protected function bootModuleComponents()\n {\n foreach ($this->app['modules']->enabled() as $module) {\n if ($this->moduleHasBlocks($module)) {\n $this->bootModuleBlocks($module);\n }\n }\n }", "public function load()\n {\n foreach ($this->loaders as $loader){\n $loader->load();\n $loader->save();\n }\n }", "function setLoaded() {\n $args = func_get_args();\n\n foreach ($args as $arg) {\n if (isset($this->modules[$arg])) {\n $this->loaded[$arg] = $arg;\n $mod = $this->modules[$arg];\n\n $sups = $this->getSuperceded($arg);\n // accounting for by way of supersede\n foreach ($sups as $supname=>$val) {\n $this->loaded[$supname] = $supname;\n }\n\n // prevent rollups for this module type\n $this->setProcessedModuleType($mod[YUI_TYPE]);\n } else {\n $msg = \"YUI_LOADER: undefined module name provided to setLoaded(): \" . $arg;\n error_log($msg, 0);\n }\n }\n }", "public function dsm_add_scheduled_content_modules() {\n\t\t$dsm_load_divi_modules = $this->dsm_load_divi_with_child_modules();\n\t\tforeach ( $dsm_load_divi_modules as $module ) {\n\t\t\tif ( 'none' !== $module ) {\n\t\t\t\t$filter = 'et_pb_all_fields_unprocessed_' . $module . '';\n\t\t\t\tadd_filter( $filter, array( $this, 'dsm_add_modules_setting' ) );\n\t\t\t}\n\t\t}\n\t}", "protected function _initModules()\n {\n /** @var Zend_Application_Bootstrap_BootstrapAbstract $bootstrap */\n $bootstrap = $this->getBootstrap();\n $bootstrap->bootstrap('FrontController');\n\n /** @var $front Zend_Controller_Front */\n $front = $bootstrap->getResource('FrontController');\n\n // Module detection (in Zend_Controller_Front::addModuleDirectory())\n // requires that each module contains controllers/ directory.\n $this->_modulePaths = array_map('dirname', $front->getControllerDirectory());\n\n // Prepare a list of modules to load\n // don't load modules explicitly given as FALSE\n $modulePaths = $this->_modulePaths;\n\n foreach ($this->getOptions() as $module => $value) {\n if ($value === false) {\n unset($modulePaths[$module]);\n }\n }\n $toLoad = array_keys($modulePaths);\n\n // load modules\n foreach ($toLoad as $module) {\n $this->_loadModule($module);\n }\n\n $this->_sortLoadedModules();\n\n $this->_bootstraps = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);\n }", "public static function load_addons_after_theme_setup() {\r\n if ( function_exists( 'owp_fs' ) ) {\r\n // Don't add extensions and licenses when Freemius is in place.\r\n return;\r\n }\r\n\r\n // Addons directory location\r\n $dir = OE_PATH . '/includes/panel/';\r\n\r\n // Extensions\r\n require_once( $dir . 'extensions.php' );\r\n\r\n // Licenses\r\n require_once( $dir . 'licenses.php' );\r\n }", "protected function _loadModuleUrls()\n {\n $cacheKey = 'url_manager';\n $rules = Yii::app()->cache->get($cacheKey);\n if (YII_DEBUG || !$rules) {\n $rules = array();\n\n $modules = Yii::app()->getModules();\n foreach ($modules as $mid => $module) {\n $moduleClass = Yii::app()->getModule($mid);\n if (isset($moduleClass->rules)) {\n\n $rules = array_merge($moduleClass->rules, $rules);\n }\n }\n\n Yii::app()->cache->set($cacheKey, $rules, Yii::app()->settings->get('app', 'cache_time'));\n }\n $this->rules = array_merge($rules, $this->rules);\n }", "private function load_dependencies() {\n \n /**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core plugin.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-opt-rewards-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-opt-rewards-admin.php';\n\t\t\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-opt-rewards-public.php';\n\n\t\t$this->loader = new Opt_Rewards_Loader();\n\n\t}", "public function modulesAction() {\n $this->_breadcrumbs->addStep($this->Translate('Модули'));\n }", "public static function load_module() {\n add_action('wp_head', [__CLASS__, 'add_header_icons'], 4);\n add_action('wp_head', [__CLASS__, 'add_seo_tags'], 4);\n\n add_action('wp_head', [__CLASS__, 'add_og_tags'], 5);\n add_action('wp_head', [__CLASS__, 'add_twitter_tags'], 5);\n add_action('wp_head', [__CLASS__, 'add_facebook_tags'], 5);\n add_action('wp_head', [__CLASS__, 'add_vk_tags'], 5);\n add_action('wp_head', [__CLASS__, 'add_yandex_meta'], 6);\n\n add_action('wp_head', [__CLASS__, 'add_mediator_meta'], 7);\n\n // Add custom theme lang attributes\n add_filter('language_attributes', [__CLASS__, 'add_xmlns']);\n\n // Add footer description field to customizer\n add_action('customize_register', [__CLASS__, 'add_customize_setting']);\n }", "public function dsm_add_popup_modules() {\n\t\t$dsm_popup_divi_modules = $this->dsm_merge_child_modules();\n\n\t\tforeach ( $dsm_popup_divi_modules as $module ) {\n\t\t\tif ( 'none' !== $module ) {\n\t\t\t\t$filter = 'et_pb_all_fields_unprocessed_' . $module . '';\n\t\t\t\tadd_filter( $filter, array( $this, 'dsm_add_popup_modules_setting' ) );\n\t\t\t}\n\t\t}\n\t}", "public function hook_displayContentMain()\n {\n if (!array_key_exists(\"options\", $this->route_params))\n return;\n\n $module_manager = $this->container->get('module.manager');\n\n // Check if action on module\n if ($this->route_params[\"options\"] != \"all\") {\n $pattern = \"/(\\w+)-(uninstall|install|activate|deactivate)/\";\n preg_match_all($pattern, $this->route_params[\"options\"], $matches, PREG_SET_ORDER);\n\n if (count($matches) == 0)\n return;\n\n $module = array(\n \"name\" => $matches[0][1],\n \"action\" => $matches[0][2]\n );\n\n $module_manager->{$module[\"action\"]}($module[\"name\"]);\n\n $this->redirectToRoute(\"admin_modules\", array(\n \"options\" => \"all\"\n ));\n }\n\n $params = array();\n $params[\"template_modules\"] = $module_manager->loadTemplateModules(\"all\");\n $params[\"project_modules\"] = $module_manager->loadProjectModules(\"all\");\n\n return array(\n \"template\" => __DIR__.\"/admin_modules_manager.html.twig\",\n \"params\" => $params\n );\n }", "function initModules($load=true) {\n\t\n\t\t// load all installed modules\n\t\t$GLOBALS['objCms']->autoLoadModules(true);\n\t\t\n\t\tforeach ($GLOBALS['objCms']->modules as $module => $obj) {\n\t\t\tif (method_exists($obj, 'newsletterInit')) {\n\t\t\t\t$obj->newsletterInit();\n\t\t\t\t$this->_module[$module] = $obj;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function load_files() {\n\t\trequire_once dirname( __FILE__ ) . '/class-admin.php';\n\t}", "public function loadModules() {\n return call_user_func(array($this->commandClass, 'loadModules'));\n }", "public function load_widgets_modules(){\n\t\tif ( class_exists( 'FLBuilder' ) ) {\n\t\t\trequire_once 'modules/pricing-table/pricing-table.php';\n\t\t\trequire_once 'modules/services/services.php';\n\t\t\trequire_once 'modules/post-grid/post-grid.php';\n\t\t}\n\t}", "protected function fixItAll()\n {\n // Manage overrides\n $this->uninstallOverrides();\n $this->installOverrides();\n\n // Register hooks\n foreach ($this->hooks as $hook) {\n $this->registerHook($hook);\n }\n\n $this->updateAllValue('PS_DISABLE_NON_NATIVE_MODULE', false);\n $this->updateAllValue('PS_DISABLE_OVERRIDES', false);\n\n // Redirect in order to load the latest settings\n Tools::redirectAdmin($this->moduleUrl);\n }", "public function loadModuleManagements()\n {\n\n $db = $this->getDb();\n\n $sql = <<<SQL\n\nSELECT\n rowid,\n name,\n access_key,\n description,\n m_time_created,\n id_security_area\nFROM\n wbfsys_module;\n\nSQL;\n\n $this->list = $db->select($sql);\n\n }", "function eael_activated_modules() {\n\n $eael_default_keys = array( 'contact-form-7', 'count-down', 'counter', 'creative-btn', 'divider', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-carousel', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'price-menu', 'flip-carousel', 'interactive-cards', 'ninja-form', 'content-timeline', 'gravity-form', 'data-table', 'caldera-form','twitter-feed', 'twitter-feed-carousel', 'facebook-feed', 'facebook-feed-carousel', 'filter-gallery', 'dynamic-filter-gallery', 'content-ticker', 'image-accordion', 'post-list', 'tooltip', 'adv-tabs', 'adv-accordion', 'adv-google-map', 'google-map-api', 'mailchimp', 'toggle', 'one-page-navigation', 'team-member-carousel', 'image-hotspots', 'logo-carousel', 'wpforms', 'protected-content' );\n\n $eael_default_settings = array_fill_keys( $eael_default_keys, true );\n $eael_get_settings = get_option( 'eael_save_settings', $eael_default_settings );\n $eael_new_settings = array_diff_key( $eael_default_settings, $eael_get_settings );\n\n if( ! empty( $eael_new_settings ) ) {\n\t $eael_updated_settings = array_merge( $eael_get_settings, $eael_new_settings );\n\t update_option( 'eael_save_settings', $eael_updated_settings );\n }\n\n return $eael_get_settings = get_option( 'eael_save_settings', $eael_default_settings );\n}", "function hook_update_7001() {\n module_enable(array('module_name_1'));\n cache_clear_all();\n\n module_disable(array('module_name_2'));\n}", "public function run()\n {\n $subModules = [\n [\n 'name' => 'All Posts',\n 'module_id' => 2,\n 'route' => 'admin.post.index',\n 'position' => 1,\n 'is_active' => 1\n ],\n [\n 'name' => 'Add New',\n 'module_id' => 2,\n 'route' => 'admin.post.create',\n 'position' => 2,\n 'is_active' => 1\n ],\n [\n 'name' => 'All Pages',\n 'module_id' => 5,\n 'route' => 'admin.page.index',\n 'position' => 1,\n 'is_active' => 1\n ],\n [\n 'name' => 'Add New',\n 'module_id' => 5,\n 'route' => 'admin.page.create',\n 'position' => 2,\n 'is_active' => 1\n ],\n [\n 'name' => 'All Emails',\n 'module_id' => 6,\n 'route' => 'admin.email.index',\n 'position' => 1,\n 'is_active' => 1\n ],\n [\n 'name' => 'Add New',\n 'module_id' => 6,\n 'route' => 'admin.email.create',\n 'position' => 1,\n 'is_active' => 1\n ],\n [\n 'name' => 'All Users',\n 'module_id' => 8,\n 'route' => 'admin.user.index',\n 'position' => 1,\n 'is_active' => 1\n ],\n [\n 'name' => 'Add New',\n 'module_id' => 8,\n 'route' => 'admin.user.create',\n 'position' => 2,\n 'is_active' => 1\n ],\n\n ];\n\n SubModule::insert($subModules);\n }", "private static function _refreshModuleList()\r\n {\r\n $modules = array();\r\n $hooks = array();\r\n /* Get a blocking advisory lock on the database. */\r\n $db = DatabaseConnection::getInstance();\r\n $db->getAdvisoryLock('OSATSUpdateLock', 120);\r\n \t//this is only until I finish the entire rewrite, then I will pair things up. Jamin\r\n\t\tinclude('./dbconfig.php');\r\n\t\t$myServer = mysql_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASS);\r\n\t\t$myDB = mysql_select_db(DATABASE_NAME);\r\n\t\t$sql = mysql_query(\"SELECT * FROM moduleinfo ORDER BY ordernum ASC\");\r\n\t\t//$num_rows = mysql_num_rows($sql);\r\n\t\t\r\n\t\twhile ($myrow = mysql_fetch_array($sql))\r\n\t\t{ \r\n\t\t\t$moduleName = strtolower($myrow['name']);\r\n\t\t\t$moduleClass = $myrow['class'];\r\n\t\t\t//echo $moduleClass; -This is for testing only. - Jamin 2-19-2010\r\n\t\t\tinclude ('./modules/' . $moduleName . \"/\" . $moduleClass . \".php\");\r\n\t\t\t$module = new $moduleClass();\r\n\t\t\t//$modules[] = $myrow['class']; \r\n\t\t\t$modules[$moduleName] = array(\r\n\t\t\t\t$moduleClass,\r\n\t\t\t\t$myrow['tabtext'],\r\n\t\t\t\t//$myrow['subtabs'],\r\n\t\t\t\t$module->getSubTabsExternal(),\r\n $module->getSettingsEntries(),\r\n $module->getSettingsUserCategories(),\r\n\t\t\t\t//$myrow['setentries'],\r\n\t\t\t\t//$myrow['usercatagories'],\r\n\t\t\t\t$myrow['visible']);\t\r\n\t\t\t\t\r\n\t\t\t$moduleHooks = $module->getHooks();\r\n foreach ($moduleHooks as $name => $data)\r\n {\r\n \t$hooks[$name][] = $data;\r\n }\r\n\r\n //self::processModuleSchema($moduleName, $module->getSchema());\r\n\r\n\t\t} \t\t\r\n\r\n $db->releaseAdvisoryLock('OSATSUpdateLock');\r\n\r\n /* Is called by installer? */\r\n if (isset($_POST['performMaintenence']))\r\n {\r\n die();\r\n }\r\n\r\n $_SESSION['hooks'] = $hooks;\r\n return $modules;\r\n }", "private function autoload()\n {\n if ($this->loaded) {\n return;\n }\n\n $all = Piwik_FetchAll('SELECT option_value, option_name\n\t\t\t\t\t\t\t\tFROM `' . Piwik_Common::prefixTable('option') . '`\n\t\t\t\t\t\t\t\tWHERE autoload = 1');\n foreach ($all as $option) {\n $this->all[$option['option_name']] = $option['option_value'];\n }\n\n $this->loaded = true;\n }", "protected function initializeModules()\n {\n $modules = array(\n 'accounts'\n );\n $modules = array_merge($modules, $this->config['modules']);\n foreach ($modules as $module) {\n $this->initializeProvider($module);\n $this->initializeTwigModule($module);\n }\n\n $this->initializeTwigModule('general');\n }", "function flow_elated_load_shortcodes() {\n foreach(glob(ELATED_FRAMEWORK_ROOT_DIR.'/modules/shortcodes/*/load.php') as $shortcode_load) {\n include_once $shortcode_load;\n }\n\n include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/shortcodes/lib/shortcode-loader.inc';\n }", "function dynamic_module_load($where, $who) {\r\n\t$module = 'dynamic_module';\r\n\t$GLOBALS['modules_all'] = array();\r\n\t$GLOBALS['first_time_import'] = false;\r\n\t\r\n\t//$GLOBALS['import'] = get_function( 'import', 'import.php' );\r\n\t//$GLOBALS['unload'] = get_function( 'unload', 'import.php' );\r\n\t$GLOBALS['modules'][$module]['functions'][$module . '_list'] = get_module_function( $module . '_list', __FILE__, $module );\r\n\t$GLOBALS['modules'][$module]['functions'][$module . '_reload'] = get_module_function( $module . '_reload', __FILE__, $module );\r\n\t\r\n\t// creating the triggers\r\n\t$GLOBALS['triggers1']['!load'] = array( 'count'=>0, 'who'=>'owners', 'arg'=>'(.+)', 'command'=>array( 0=>array( 0=>$GLOBALS['import'], 1=>1 ) ) );\r\n\t$GLOBALS['triggers1']['!unload'] = array( 'count'=>0, 'who'=>'owners', 'arg'=>'(.+)', 'command'=>array( 0=>array( 0=>$GLOBALS['unload'], 1=>1 ) ) );\r\n\t$GLOBALS['triggers1']['!reload-import'] = array( 'count'=>0, 'who'=>'owners', 'command'=>array( 0=>array( 0=>$GLOBALS['modules'][$module]['functions'][$module . '_reload'], 1=>0 ) ) );\r\n\t$GLOBALS['triggers1']['!list-modules'] = array( 'count'=>0, 'who'=>'owners', 'arg'=>'(|all|loaded|unloaded)', 'command'=>array( 0=>array( 0=>$GLOBALS['modules'][$module]['functions'][$module . '_list'], 1=>1 ) ) );\r\n\t\r\n\t// function redefinition\r\n\t/*$GLOBALS['triggers1']['!load']['command'][0][0] = &$GLOBALS['import'];\r\n\t$GLOBALS['triggers1']['!unload']['command'][0][0] = &$GLOBALS['unload'];\r\n\t$GLOBALS['triggers1']['!reload-import']['command'][0][0] = &$GLOBALS['modules'][$module]['functions'][$module.'_reload'];\r\n\t$GLOBALS['triggers1']['!list-modules']['command'][0][0] = &$GLOBALS['modules'][$module]['functions'][$module.'_list'];*/\r\n\t// old module import\r\n\t//$GLOBALS['import']('#sebbu','bot','dico');//\r\n\t//$GLOBALS['import']( '#sebbu', 'bot', 'dynamic_module' );//it would be an infinite recursion\r\n\t\r\n\treturn true;\r\n}" ]
[ "0.7451278", "0.68853533", "0.6849821", "0.6844776", "0.6713825", "0.6624547", "0.6583829", "0.65774816", "0.65543497", "0.65480757", "0.6436774", "0.64074576", "0.6337761", "0.62961304", "0.6275687", "0.6263796", "0.6233801", "0.62314445", "0.6228013", "0.6207165", "0.61816376", "0.61577874", "0.61516595", "0.6129596", "0.60927516", "0.6090314", "0.60772705", "0.60697633", "0.60694027", "0.6040948", "0.60278976", "0.60085547", "0.5977958", "0.59711415", "0.59556425", "0.5948224", "0.59383327", "0.5920541", "0.5915832", "0.5905986", "0.5903826", "0.59023947", "0.58995396", "0.58836675", "0.5853103", "0.5833858", "0.58244133", "0.5803563", "0.58001816", "0.5794395", "0.57854146", "0.57774085", "0.57760245", "0.57699066", "0.576738", "0.57576853", "0.5753237", "0.575223", "0.57505673", "0.5745565", "0.5732321", "0.5723883", "0.5720173", "0.5715569", "0.5713519", "0.5711243", "0.5709591", "0.5707789", "0.57019544", "0.57003504", "0.5700284", "0.56952816", "0.56907624", "0.5689258", "0.56860423", "0.56819624", "0.56734836", "0.56666255", "0.5665331", "0.5655834", "0.5653374", "0.56531423", "0.56485176", "0.56418324", "0.56159973", "0.56128263", "0.5610731", "0.56070447", "0.559255", "0.5591646", "0.5589758", "0.5580948", "0.55717295", "0.55700856", "0.5566836", "0.5560796", "0.55572146", "0.5536589", "0.55361557", "0.5529245" ]
0.760124
0
Loades all shortcodes by going through all folders that are placed directly in shortcodes folder and loads load.php file in each. Hooks to flow_elated_after_options_map action
Загружает все шорткоды, проходя через все папки, расположенные напрямую в папке shortcodes, и загружает файл load.php в каждой. Привязывается к действию flow_elated_after_options_map
function flow_elated_load_shortcodes() { foreach(glob(ELATED_FRAMEWORK_ROOT_DIR.'/modules/shortcodes/*/load.php') as $shortcode_load) { include_once $shortcode_load; } include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/shortcodes/lib/shortcode-loader.inc'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aton_qodef_load_shortcodes() {\n foreach(glob(QODE_FRAMEWORK_ROOT_DIR.'/modules/shortcodes/*/load.php') as $shortcode_load) {\n include_once $shortcode_load;\n }\n\n do_action('aton_qodef_shortcode_loader');\n }", "function qodef_re_include_shortcodes_file() {\n\t\tforeach ( glob( QODE_RE_SHORTCODES_PATH . '/*/load.php' ) as $shortcode_load ) {\n\t\t\tinclude_once $shortcode_load;\n\t\t}\n\t\t\n\t\tdo_action( 'qodef_re_action_include_shortcodes_file' );\n\t}", "function fusion_init_shortcodes() {\n\tif ( class_exists( 'Avada' ) ) {\n\t\t$filenames = glob( FUSION_CORE_PATH . '/shortcodes/*.php', GLOB_NOSORT );\n\t\tforeach ( $filenames as $filename ) {\n\t\t\trequire_once wp_normalize_path( $filename );\n\t\t}\n\t}\n}", "private function load_shortcodes() {\n // Inits shortcodes\n \\UsabilityDynamics\\Shortcode\\Utility::maybe_load_shortcodes( $this->get( '_computed.path.root' ) . '/lib/shortcodes' );\n }", "function qodef_core_include_shortcodes_file() {\n\t\tforeach ( glob( QODE_CORE_SHORTCODES_PATH . '/*/load.php' ) as $shortcode_load ) {\n\t\t\tinclude_once $shortcode_load;\n\t\t}\n\t\t\n\t\tdo_action( 'qodef_core_action_include_shortcodes_file' );\n\t}", "function qode_news_include_shortcodes_file() {\n\t\tforeach(glob(QODE_NEWS_SHORTCODES_PATH.'/*/load.php') as $shortcode_load) {\n\t\t\tinclude_once $shortcode_load;\n\t\t}\n\t\tdo_action('qode_news_action_include_shortcodes_file');\n\t}", "public function Load_Shortcodes() {\r\n $contexts = $this->contexts;\r\n // If no contexts were returned\r\n if (!$contexts || !is_array($contexts)) { return; }\r\n // Loop through each of the found contexts\r\n foreach ($contexts as $_type => $_context) {\r\n // Add the render function\r\n add_shortcode($_type, function($attr,$content,$shortcode) {\r\n // Retrieve the global vcff forms class\r\n $vcff_forms = vcff_get_library('vcff_forms');\r\n // Retrieve the form instance\r\n $form_instance = $vcff_forms->vcff_focused_form;\r\n // If no form instance can be found\r\n if (!is_object($form_instance)) { return 'No Form Instance Found'; }\r\n // Loop through the form's instanced fields\r\n $fields = $form_instance->fields;\r\n // Loop through the focused fields\r\n foreach ($fields as $machine_code => $field_instance) {\r\n // If this not the field we are looking for\r\n if ($machine_code != $attr['machine_code']) { continue; }\r\n // Render the form\r\n return $field_instance->Form_Render($attr,$content,$shortcode);\r\n }\r\n });\r\n }\r\n // Fire the shortcode init action\r\n do_action('vcff_field_shortcode_init',$this);\r\n }", "function anps_include_all_shortcodes($file) {\r\n $config_url = get_template_directory() . '/config/config_shortcodes.json';\r\n if(file_exists($config_url)) {\r\n $config_data = file_get_contents($config_url); \r\n $shortcodes = json_decode($config_data); \r\n foreach($shortcodes as $item) {\r\n $dir = plugin_dir_path( __FILE__ ).'shortcodes/'.$item;\r\n if(file_exists($dir.'/'.$file.'.php')) {\r\n include_once $dir.'/'.$file.'.php';\r\n }\r\n } \r\n } else {\r\n $dir = plugin_dir_path( __FILE__ ).'shortcodes'; \r\n $results = scandir($dir);\r\n foreach($results as $item) {\r\n if ($item === '.' or $item === '..') { continue; }\r\n if (is_dir($dir . '/' . $item) && file_exists($dir.'/'.$item.'/'.$file.'.php')) {\r\n include_once $dir.'/'.$item.'/'.$file.'.php';\r\n }\r\n }\r\n }\r\n}", "public function processShortcodes() {\n\n // Check if we should bypass cache\n $this->maybeByPassCache();\n\n // Load cache\n $this->loadCache();\n\n foreach (self::$maps as $class) {\n\n $name = false;\n $check = strtolower($class);\n\n if (isset($this->classMaps[$check])) {\n\n if ($this->classMaps[$check] == true) {\n $name = $class;\n }\n else {\n continue;\n }\n }\n else if (class_exists($class, true)) {\n $name = $class;\n $this->classMaps[$check] = true;\n }\n else {\n $this->classMaps[$check] = false;\n }\n\n if ($name) {\n $object = new $name(array());\n vc_map($object->connectVC());\n }\n }\n\n set_transient('vtcore_vc_maps', $this->classMaps, 12 * HOUR_IN_SECONDS);\n\n return $this;\n }", "function init_short_code_shortcodes() {\n\t\tload_plugin_textdomain( self::slug, false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\t\tadd_shortcode( 'code', array( &$this, 'render_code_shortcode' ) );\n\t\tadd_shortcode( 'precode', array( &$this, 'render_precode_shortcode' ) );\n\t\tadd_filter( 'no_texturize_shortcodes', array( &$this, 'no_texturized_shortcodes_filter' ) );\n\t\t$this->add_buttons();\n\t}", "function hgr_xtnd_init() {\n\t\t\tforeach(glob($this->elements_dir.\"/*.php\") as $element) {\n\t\t\t\trequire_once($element);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tWalk trough the shortcodes and add them to addon\n\t\t\t*/\n\t\t\t//foreach(glob($this->shortcodes_dir.\"/*.php\") as $shortcode) {\n\t\t\t//\trequire_once($shortcode);\n\t\t\t//}\n\t\t}", "public static function init_shortcodes() {\n foreach ( self::$shortcode_config_map as $shortcode_name => $shortcode_class ) {\n add_shortcode( $shortcode_name, $shortcode_class . '::output' );\n }\n }", "public function load_shortcodes() {\r\n\r\n\t\tforeach ( $this->shortcodes as $shortcode ) {\r\n\t\t\tnew $shortcode();\r\n\t\t}\r\n\t}", "public function addShortcodes() {\n\t\t// Nothing to do here now, adding class so method exists for child classes\n\t}", "function add_shortcode_folder($paths) {\n $paths = array(dirname(__FILE__) .\"/xxx/xxx/shortcodes/\");\n\n return $paths;\n}", "public function registerAllShortcodes($directory, array $options = [])\n {\n try {\n $ignore = $options['ignore'] ?? [];\n foreach (new \\DirectoryIterator($directory) as $file) {\n if ($file->isDot() || \\in_array($file->getBasename('.php'), $ignore, true)) {\n continue;\n }\n $this->registerShortcode($file->getFilename(), $directory);\n }\n } catch (\\UnexpectedValueException $e) {\n Grav::instance()['log']->error('ShortcodeCore Plugin: Directory not found => ' . $directory);\n }\n }", "protected function _Recusive_Load_Dir($dir) {\r\n if (!is_dir($dir)) { return; }\r\n // Load each of the field shortcodes\r\n foreach (new DirectoryIterator($dir) as $FileInfo) {\r\n // If this is a directory dot\r\n if ($FileInfo->isDot()) { continue; }\r\n // If this is a directory\r\n if ($FileInfo->isDir()) { \r\n // Load the directory\r\n $this->_Recusive_Load_Dir($FileInfo->getPathname());\r\n } // Otherwise load the file\r\n else {\r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.tpl') !== false) { continue; } \r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.php') === false) { continue; } \r\n // Include the file\r\n require_once($FileInfo->getPathname());\r\n }\r\n }\r\n }", "public function shortcodes()\n\t{\n\t\tadd_shortcode( 'beer_map', array( $this, 'beer_map' ) );\n\t\tadd_shortcode( 'beer_selector', array($this, 'beer_selector' ) );\n\t}", "public function load()\n {\n // Core\n $this->auto_load(self::PREFIX.'_Posttypes');\n\n // Shortcodes\n $shortcodes = scandir(self::plugin_path() . '/includes/shortcodes/');\n $this->auto_load_array($shortcodes);\n\n if(is_admin())\n {\n $admin_files = scandir(self::plugin_path() . '/includes/admin/');\n $this->auto_load_array($admin_files);\n }\n\n }", "function includes(){\n\t\trequire_once(LOLINT_PLUGIN_DIR.'shortcode/shortcode.php');\n\t\trequire_once(LOLINT_PLUGIN_DIR.'admin/admin.php');\n\t\trequire_once(LOLINT_PLUGIN_DIR.'admin/activation.php');\n\t\t\n\t}", "function load_codes($zone)\n{\n\t$result = \"\";\n\t\n\t$original = array(\"]]&gt\");\n\t$changed = array(\"]]>\");\n\t\t\n\t$values = get_option(\"insert_codes_plugin_data\");\n\t\t\n\tforeach($values as $value)\n\t{\n\t\tif($value[4] == \"all\" || $value[4] == get_post_type(get_the_id()))\n\t\t\tif( $value[1] == $zone)\n\t\t\t\tif(get_the_id() == $value[0] || $value[0] == 0)\n\t\t\t\t\t$result .= $value[2];\n\t}\t\n\t\n\treturn str_replace($original, $changed, do_shortcode(stripslashes ($result)));\n}", "private function set_shortcodes() {\n\t\tforeach ($this->shortcodes as $code => $val)\n\t\t\t$this->html = str_replace(\"<!--[--{$code}--]-->\", $val, $this->html);\n\t}", "static function init()\n {\n // define html-like shortcodes\n foreach (self::$HTML_TAGS as $tag) {\n self::$_shortcodes[$tag] = [\n 'handler' => ['Wydra', 'do_tag'],\n 'depth' => self::$HTML_TAGS_DEPTH,\n ];\n }\n\n // define data-related shortcodes\n self::$_shortcodes['define'] = [\n 'handler' => ['Wydra', 'define_data'],\n ];\n\n // define shortcodes from template files\n $available_shortcodes = self::scan_templates();\n foreach ($available_shortcodes as $shortcode) {\n self::$_shortcodes[$shortcode['name']] = [\n 'handler' => ['Wydra', 'do_shortcode'],\n 'template' => $shortcode['file'],\n ];\n }\n\n $prefix_list = [\n Wydra\\SHORTCODE_PREFIX_CORE,\n Wydra\\SHORTCODE_PREFIX,\n ];\n // register shortcodes and aliases\n foreach (self::$_shortcodes as $code => $params) {\n foreach ($prefix_list as $prefix) {\n $shortcode_name = $prefix . $code;\n self::$_shortcode_alias[$shortcode_name] = $code;\n add_shortcode($shortcode_name, $params['handler']);\n }\n\n if (!empty($params['depth'])) {\n $depth = min(max((int)$params['depth'], 1), self::$HTML_TAGS_DEPTH);\n // register depth suffixes, like wydra-div-0, w-tag-3\n for ($i = 0; $i <= $depth; $i++) {\n foreach ($prefix_list as $prefix) {\n $shortcode_name = $prefix . $code . '-' . $i;\n self::$_shortcode_alias[$shortcode_name] = $code;\n add_shortcode($shortcode_name, $params['handler']);\n }\n };\n }\n }\n\n // register post type\n self::register_yaml_post_type();\n add_action('admin_menu', function () {\n // add management page with list of registered wydra shortcodes\n add_submenu_page('tools.php',\n __('Wydra shortcodes', 'wydra'),\n __('Wydra shortcodes', 'wydra'),\n 'edit_posts',\n 'wydra_shortcodes',\n 'wydra_wpadmin_shortcodes'\n );\n });\n }", "public function init() \n\t{\n\t\tforeach (self::$codes as $shortcode) {\n\t\t\tadd_shortcode($shortcode, array(__CLASS__, $shortcode . '_shortcode_handler'));\t\t\t\n\t\t}\n\n\t\t// For any shortcodes that use subcodes, register them to a single handler that bears the shortcode's name\n\t\tforeach (self::$subcodes as $code => $subs) {\n\t\t foreach ($subs as $sub) {\n\t\t\tadd_shortcode($sub, array(__CLASS__, $code . '_sub_shortcode_handler'));\n\t\t }\t\n\t\t}\n\n\t\t// Register hooks to customize the html for the wrapper functions\n\t\tadd_filter('pls_listings_search_form_outer_shortcode', array(__CLASS__, 'searchform_shortcode_context'), 10, 6);\n\t\tadd_filter('pls_listings_list_ajax_item_html_shortcode', array(__CLASS__, 'listings_shortcode_context'), 10, 3);\n\t\tadd_filter('property_details_filter', array(__CLASS__, 'prop_details_shortcode_context'), 10, 2);\n\n\n\t\t// Ensure all of shortcodes are set to some snippet...\n\t\tforeach (self::$codes as $code) {\n\t\t\tadd_option( ('pls_' . $code), self::$defaults[$code][0] );\n\t\t}\n\n\t\t// Handle the special case of turning property details functionality on/off...\n\t\tadd_option( self::$prop_details_enabled_key, 'false' ); \n\n\t\t//basically initializes the bootloader object if it's been defined because a\n\t\t//shortcode has been called\n\t\tadd_action('wp_footer', array(__CLASS__, 'init_bootloader'));\n\t\tadd_action('after_switch_theme', array(__CLASS__, 'update_shortcode_js'));\n\t}", "function vc_before_init_actions() {\n if( function_exists('vc_set_shortcodes_templates_dir') ){ \n \n vc_set_shortcodes_templates_dir( get_template_directory() . '/includes/codeless_builder/shortcodes' );\n \n }\n \n}", "function avia_include_shortcode_template($paths) {\n\t$plugins_url = plugin_dir_url( __FILE__ );\n\tarray_unshift($paths, $plugins_url.'php/');\n\treturn $paths;\n}", "function wp_experts_vc_elements(){\r\n \r\n if(class_exists('CmsShortCode')) {\r\n \tadd_filter('cms-shorcode-list', 'wp_experts_shortcodes_list');\r\n\r\n\t require_once( get_template_directory() . '/inc/elements/button/cms_button.php' );\r\n\t require_once( get_template_directory() . '/inc/elements/cta/cms_cta.php' );\r\n\t require_once( get_template_directory() . '/inc/elements/heading/cms_heading.php' );\r\n\t require_once( get_template_directory() . '/inc/elements/social/cms_social.php' );\r\n\t require_once( get_template_directory() . '/inc/elements/googlemap/cms_googlemap.php' );\r\n\t require_once( get_template_directory() . '/inc/elements/countdown/cms_countdown.php' );\r\n\t}\r\n}", "function shortcode_map() {\r\n\t\t\tif ( ! function_exists( 'vc_map' ) ) {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\r\n\t\t\t$base = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_preset',\r\n\t\t\t\t\t'heading' => __( 'Main Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'carousel_preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::style_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'wide_modal' => true,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'heading' => __( 'Single Scroll', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'single_scroll',\r\n\t\t\t\t\t'tooltip' => __( 'Check to enable single item scroll. Navigating through carousel will jump by only one item at a time. Leave unchecked to scroll by all visible items.', 'mpc' ),\r\n\t\t\t\t\t'value' => array( __( 'Enable', 'mpc' ) => 'true' ),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'heading' => __( 'Loop', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'loop',\r\n\t\t\t\t\t'tooltip' => __( 'Check to enable loop. Enabling loop will change the carousel to infinite scroll.', 'mpc' ),\r\n\t\t\t\t\t'value' => array( __( 'Enable', 'mpc' ) => 'true' ),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'heading' => __( 'Slide Show', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'auto_slide',\r\n\t\t\t\t\t'tooltip' => __( 'Check to enable slide show. Carousel will auto slide once the slide show delay pass.', 'mpc' ),\r\n\t\t\t\t\t'value' => array( __( 'Enable', 'mpc' ) => 'true' ),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_slider',\r\n\t\t\t\t\t'heading' => __( 'Slide Show Delay', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'delay',\r\n\t\t\t\t\t'tooltip' => __( 'Specify delay between slides.', 'mpc' ),\r\n\t\t\t\t\t'min' => 500,\r\n\t\t\t\t\t'max' => 15000,\r\n\t\t\t\t\t'step' => 50,\r\n\t\t\t\t\t'value' => 1000,\r\n\t\t\t\t\t'unit' => 'ms',\r\n\t\t\t\t\t'dependency' => array( 'element' => 'auto_slide', 'value' => 'true', ),\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-12 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$base_ext = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_slider',\r\n\t\t\t\t\t'heading' => __( 'Gap', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'gap',\r\n\t\t\t\t\t'tooltip' => __( 'Choose gap between slides.', 'mpc' ),\r\n\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t'max' => 50,\r\n\t\t\t\t\t'step' => 1,\r\n\t\t\t\t\t'value' => 0,\r\n\t\t\t\t\t'unit' => 'px',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-12 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'heading' => __( 'Stretch', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'stretched',\r\n\t\t\t\t\t'tooltip' => __( 'Check to enable slider stretch. Enabling stretch will display parts of previous and next items on carousel sides.', 'mpc' ),\r\n\t\t\t\t\t'value' => array( __( 'Enable', 'mpc' ) => 'true' ),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_text',\r\n\t\t\t\t\t'heading' => __( 'Start At', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'start_at',\r\n\t\t\t\t\t'tooltip' => __( 'Define first displayed slide index.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'std' => 1,\r\n\t\t\t\t\t'label' => '',\r\n\t\t\t\t\t'validate' => true,\r\n\t\t\t\t\t'addon' => array(\r\n\t\t\t\t\t\t'icon' => 'dashicons-images-alt',\r\n\t\t\t\t\t\t'align' => 'prepend'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$source = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_divider',\r\n\t\t\t\t\t'title' => __( 'Source', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'source_section_divider',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Data source', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'source_type',\r\n\t\t\t\t\t'tooltip' => __( 'Select source type for carousel.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t__( 'Products Ids', 'mpc' ) => 'ids',\r\n\t\t\t\t\t\t__( 'Products Category', 'mpc' ) => 'taxonomies',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => 'taxonomies',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'autocomplete',\r\n\t\t\t\t\t'heading' => __( 'Posts', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'ids',\r\n\t\t\t\t\t'tooltip' => __( 'Define list of products displayed by this carousel.', 'mpc' ),\r\n\t\t\t\t\t'settings' => array(\r\n\t\t\t\t\t\t'multiple' => true,\r\n\t\t\t\t\t\t'sortable' => true,\r\n\t\t\t\t\t\t'unique_values' => true,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column',\r\n\t\t\t\t\t'dependency' => array( 'element' => 'source_type', 'value' => array( 'ids' ), ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'autocomplete',\r\n\t\t\t\t\t'heading' => __( 'Taxonomies', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'taxonomies',\r\n\t\t\t\t\t'tooltip' => __( 'Define WooCommerce categories.', 'mpc' ),\r\n\t\t\t\t\t'settings' => array(\r\n\t\t\t\t\t\t'multiple' => true,\r\n\t\t\t\t\t\t'min_length' => 1,\r\n\t\t\t\t\t\t'groups' => true,\r\n\t\t\t\t\t\t'unique_values' => true,\r\n\t\t\t\t\t\t'display_inline' => true,\r\n\t\t\t\t\t\t'delay' => 500,\r\n\t\t\t\t\t\t'auto_focus' => true,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'param_holder_class' => 'vc_not-for-custom',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column',\r\n\t\t\t\t\t'dependency' => array( 'element' => 'source_type', 'value' => array( 'taxonomies' ), ),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Sort by', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'orderby',\r\n\t\t\t\t\t'tooltip' => __( 'Select posts sorting parameter.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t__( 'Date', 'mpc' ) => 'date',\r\n\t\t\t\t\t\t__( 'Order by post ID', 'mpc' ) => 'ID',\r\n\t\t\t\t\t\t__( 'Author', 'mpc' ) => 'author',\r\n\t\t\t\t\t\t__( 'Title', 'mpc' ) => 'title',\r\n\t\t\t\t\t\t__( 'Last modified date', 'mpc' ) => 'modified',\r\n\t\t\t\t\t\t__( 'Number of comments', 'mpc' ) => 'comment_count',\r\n\t\t\t\t\t\t__( 'Random order', 'mpc' ) => 'rand',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => 'date',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t\t'dependency' => array(\r\n\t\t\t\t\t\t'element' => 'source_type',\r\n\t\t\t\t\t\t'value_not_equal_to' => array( 'ids' ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Order', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'order',\r\n\t\t\t\t\t'tooltip' => __( 'Select products sorting order.', 'mpc' ),\r\n//\t\t\t\t\t'group' => __( 'Source', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t__( 'Descending', 'mpc' ) => 'DESC',\r\n\t\t\t\t\t\t__( 'Ascending', 'mpc' ) => 'ASC',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => 'ASC',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t\t'dependency' => array(\r\n\t\t\t\t\t\t'element' => 'source_type',\r\n\t\t\t\t\t\t'value_not_equal_to' => array( 'ids' ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_text',\r\n\t\t\t\t\t'heading' => __( 'Max Items Number', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'items_number',\r\n\t\t\t\t\t'tooltip' => __( 'Define maximum number of displayed products. If the number of products meeting the above parameters is smaller it will only show those products.', 'mpc' ),\r\n\t\t\t\t\t'value' => '6',\r\n\t\t\t\t\t'addon' => array(\r\n\t\t\t\t\t\t'icon' => 'dashicons dashicons-slides',\r\n\t\t\t\t\t\t'align' => 'prepend',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column mpc-advanced-field',\r\n\t\t\t\t\t'label' => '',\r\n\t\t\t\t\t'validate' => true,\r\n\t\t\t\t\t'dependency' => array(\r\n\t\t\t\t\t\t'element' => 'source_type',\r\n\t\t\t\t\t\t'value_not_equal_to' => array( 'ids' ),\r\n\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t/* General */\r\n\t\t\t$rows_cols = MPC_Snippets::vc_rows_cols( array( 'cols' => array( 'min' => 1, 'max' => 4, 'default' => 2 ) ) );\r\n\t\t\t$animation = MPC_Snippets::vc_animation_basic();\r\n\t\t\t$class = MPC_Snippets::vc_class();\r\n\r\n\t\t\t/* Navigation */\r\n\t\t\t$integrate_navigation = vc_map_integrate_shortcode( 'mpc_navigation', 'mpc_navigation__', __( 'Navigation', 'mpc' ) );\r\n\r\n\t\t\t/* Integrate Item */\r\n\t\t\t$item_exclude = array( 'exclude_regex' => '/animation_in(.*)|source_section_divider|^id$/', );\r\n\t\t\t$integrate_item = vc_map_integrate_shortcode( 'mpc_wc_product', '', '', $item_exclude );\r\n\r\n\t\t\t$params = array_merge(\r\n\t\t\t\t$base,\r\n\t\t\t\t$rows_cols,\r\n\t\t\t\t$base_ext,\r\n\r\n\t\t\t\t$source,\r\n\r\n\t\t\t\t$integrate_item,\r\n\r\n\t\t\t\t$integrate_navigation,\r\n\t\t\t\t$animation,\r\n\t\t\t\t$class\r\n\t\t\t);\r\n\r\n\t\t\tif( !class_exists( 'WooCommerce' ) ) {\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'type' => 'custom_markup',\r\n\t\t\t\t\t\t'param_name' => 'woocommerce_notice',\r\n\t\t\t\t\t\t'value' => '<p class=\"mpc-warning mpc-active\"><i class=\"dashicons dashicons-warning\"></i>' . __( 'Please install and activate <a href=\"https://wordpress.org/plugins/woocommerce/\">WooCommerce</a> plugin in order to use this shortcode! :)', 'mpc' ) . '</p>',\r\n\t\t\t\t\t\t'edit_field_class' => 'vc_col-sm-12 vc_column mpc-woocommerce-field',\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'name' => __( 'Carousel Products', 'mpc' ),\r\n\t\t\t\t'description' => __( 'Carousel with products', 'mpc' ),\r\n\t\t\t\t'base' => $this->shortcode,\r\n\t\t\t\t'icon' => 'mpc-shicon-wc-carousel-products',\r\n\t\t\t\t'category' => __( 'Massive', 'mpc' ),\r\n\t\t\t\t'params' => $params,\r\n\t\t\t);\r\n\t\t}", "public function get_shortcodes() {\r\n //Add any other shortcodes\r\n global $shortcode_tags;\r\n $codes = array();\r\n $DS = DIRECTORY_SEPARATOR;\r\n\r\n foreach($shortcode_tags as $codename => $func) {\r\n $code = array();\r\n\r\n if(is_string($func)) {\r\n $reflection = new ReflectionFunction($func);\r\n } else if (is_array($func)) {\r\n $reflection = new ReflectionMethod($func[0], $func[1]);\r\n }\r\n \r\n $code['name'] = $codename;\r\n $funcName = $reflection->getName();\r\n $code['function_name'] = $funcName;\r\n $funcFileName = $reflection->getFileName();\r\n $code['filename'] = $funcFileName;\r\n if(stripos($funcFileName, 'wp-content'.$DS.'plugins') !== false) {\r\n $code['type'] = 'plugin';\r\n $code['details'] = $this->get_plugin_data($funcFileName);\r\n } else if(stripos($funcFileName, 'wp-content'.$DS.'themes') !== false) {\r\n $code['type'] = 'theme';\r\n $code['details'] = array(\r\n 'Name' => wp_get_theme()->get('Name'),\r\n 'ThemeURI' => wp_get_theme()->get('ThemeURI'),\r\n 'Description' => wp_get_theme()->get('Description'),\r\n 'Author' => wp_get_theme()->get('Author'),\r\n 'AuthorURI' => wp_get_theme()->get('AuthorURI'),\r\n 'Version' => wp_get_theme()->get('Version'),\r\n 'TextDomain' => wp_get_theme()->get('TextDomain'),\r\n 'DomainPath' => wp_get_theme()->get('DomainPath')\r\n );\r\n } else {\r\n $code['type'] = 'native';\r\n $code['details'] = array();\r\n }\r\n\r\n $funcDefinition = $this->function_to_string($func);\r\n $funcParams = $reflection->getParameters();\r\n $funcAttrParam = $funcParams[0]->name;\r\n \r\n //Literal match based on array name\r\n $regex = '|'.$funcAttrParam.'\\[[\\'\\\"](.+?)[\\'\\\"]\\]|';\r\n preg_match_all($regex, $funcDefinition, $lmatches, PREG_PATTERN_ORDER);\r\n \r\n //Array based match based on shortcode_atts func\r\n $regex = '|shortcode_atts\\s*\\(\\s*array\\s*\\(([\\s\\S]+?);|';\r\n preg_match_all($regex, $funcDefinition, $smatches, PREG_PATTERN_ORDER);\r\n foreach($smatches[1] as $sm) {\r\n $regex = '|[\\'\\\"](.+?)[\\'\\\"]\\s*=>|';\r\n preg_match_all($regex, $sm, $smatches, PREG_PATTERN_ORDER);\r\n }\r\n \r\n //Array based match based on shortcode_atts reference array\r\n $regex = '|shortcode_atts\\s*\\(\\s*\\$(.+?),|';\r\n preg_match_all($regex, $funcDefinition, $rmatches, PREG_PATTERN_ORDER);\r\n foreach($rmatches[1] as $rm) {\r\n $regex = '|\\$'.$rm.'\\s*=\\s*array\\(([\\s\\S]+?);|';\r\n preg_match_all($regex, $funcDefinition, $rmatches, PREG_PATTERN_ORDER);\r\n }\r\n foreach($rmatches[1] as $rm) {\r\n $regex = '|[\\'\\\"](.+?)[\\'\\\"]\\s*=>|';\r\n preg_match_all($regex, $rm, $rmatches, PREG_PATTERN_ORDER);\r\n }\r\n\r\n $code['params'] = array_unique(array_merge($lmatches[1], $smatches[1], $rmatches[1]));\r\n\r\n $codes[] = $code;\r\n }\r\n \r\n return $codes;\r\n }", "function FlAG_shortcodes() {\r\n\t\r\n\t\t// do_shortcode on the_excerpt could causes several unwanted output. Uncomment it on your own risk\r\n\t\t// add_filter('the_excerpt', array(&$this, 'convert_shortcode'));\r\n\t\t// add_filter('the_excerpt', 'do_shortcode', 11);\r\n\r\n\t\tadd_shortcode( 'flagallery', array(&$this, 'show_flashalbum' ) );\r\n\t\tadd_shortcode( 'grandmp3', array(&$this, 'grandmp3' ) );\r\n\t\tadd_shortcode( 'grandmusic', array(&$this, 'grandmusic' ) );\r\n\t\tadd_shortcode( 'grandflv', array(&$this, 'grandflv' ) );\r\n\t\tadd_shortcode( 'grandvideo', array(&$this, 'grandvideo' ) );\r\n\t\tadd_shortcode( 'grandbanner', array(&$this, 'grandbanner' ) );\r\n\t\tadd_shortcode( 'grandbannerwidget', array(&$this, 'grandbannerwidget' ) );\r\n\t\tadd_action('wp_footer', array(&$this, 'add_script'));\r\n\r\n\t}", "public function initShortcodes()\n {\n add_shortcode($this->tag, array($this, 'shortcode'));\n add_shortcode('op_' . $this->tag, array($this, 'shortcode'));\n }", "public function initShortcodes()\n {\n add_shortcode($this->tag, array($this, 'shortcode'));\n add_shortcode('op_' . $this->tag, array($this, 'shortcode'));\n }", "static function wpb_map_all() {\r\n //print_r(td_block_api::get_all()); die;\r\n\r\n foreach (td_api_block::get_all() as $block_settings) {\r\n // shortcodes that have no $block_settings['map_in_visual_composer'] are maped!\r\n // shrotcodes that have $block_settings['map_in_visual_composer'] !== false are maped\r\n if (isset($block_settings['map_in_visual_composer']) and $block_settings['map_in_visual_composer'] !== false) {\r\n vc_map($block_settings);\r\n }\r\n }\r\n }", "function avia_include_shortcode_template($paths) {\n\t\t$template_url = get_stylesheet_directory();\n\t\tarray_unshift($paths, $template_url.'/shortcodes/');\n\n\t\treturn $paths;\n\t}", "function enqueue_my_files() //It's made by BAW (http://boiteaweb.fr) / I slightly modified it.\n {\n global $post;\n if( !$post ) return;\n $matches = array();\n $pattern = get_shortcode_regex();\n preg_match_all( '/' . $pattern . '/s', $post->post_content, $matches );\n foreach( $matches[2] as $value ) {\n if( $value == 'gallery' ) {\n /*JUST DECOMMENT TO SEE THE SLIDESHOW IN ACTION * < add comment here\n wp_enqueue_script( 'gallery-js-lib', plugins_url( '/js/jquery.cycle.lite.js', __FILE__ ),'1.0', true); //it's a lite version feel free to get the entire script\n wp_enqueue_script( 'gallery-js', plugins_url( '/js/jm-html5-responsive-gallery-example.js', __FILE__ ),'1.0', true); \n remove comment here > */ wp_enqueue_style( 'gallery-style', plugins_url( '/css/jm-html5-responsive-gallery.css', __FILE__ ));\n //don't forget to decomment in css too to see in action\n //just updated handle to avoid conflict. Never use the same handle or it won't work.\n break;\n }\n }\n }", "static private function load_files() {\n\n\t\t\t/* Classes */\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-filesystem.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-pointers.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-posts.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-settings.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ajax.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ajax-layout.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-art.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-auto-suggest.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-color.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-css.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-export.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-extensions.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-fonts.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-debug.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-usage.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-icons.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-iframe-preview.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-import.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-loop.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-model.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-module.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-photo.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-revisions.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-services.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-shortcodes.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-timezones.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ui-content-panel.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ui-settings-forms.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-notifications.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-update.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-access.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-settings.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-utils.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpml.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-privacy.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-presets.php';\n\n\t\t\t/* WP CLI Commands */\n\t\t\tif ( defined( 'WP_CLI' ) ) {\n\t\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpcli-command.php';\n\t\t\t}\n\n\t\t\t/* WP Blocks Support */\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wp-blocks.php';\n\n\t\t\t/* Includes */\n\t\t\trequire_once FL_BUILDER_DIR . 'includes/compatibility.php';\n\n\t\t\t/* Updater */\n\t\t\tif ( file_exists( FL_BUILDER_DIR . 'includes/updater/updater.php' ) ) {\n\t\t\t\trequire_once FL_BUILDER_DIR . 'includes/updater/updater.php';\n\t\t\t}\n\t\t}", "private function includes() {\n\t\trequire_once $this->dir_path . 'lib/extended-cpts/extended-cpts.php';\n\t\trequire_once $this->dir_path . 'lib/class-gw-advanced-merge-tags.php';\n\t\trequire_once $this->dir_path . 'inc/customizer.php';\n\t\trequire_once $this->dir_path . 'inc/cpts-location.php';\n\t\trequire_once $this->dir_path . 'inc/post-types.php';\n\t\trequire_once $this->dir_path . 'inc/cpts-blog.php';\n\t\trequire_once $this->dir_path . 'inc/taxonomies.php';\n\t\trequire_once $this->dir_path . 'inc/metaboxes.php';\n\t\trequire_once $this->dir_path . 'inc/rest-meta.php';\n\t\trequire_once $this->dir_path . 'inc/parish-flow.php';\n\t\trequire_once $this->dir_path . 'inc/gf-parish-data.php';\n\t\trequire_once $this->dir_path . 'inc/documents-meta.php';\n\t\trequire_once $this->dir_path . 'inc/functions.php';\n\t}", "private function addons_shortcode_themes() {\n\t\tglobal $Site;\n\t\tob_start();\n\t\t$template = PATH_THEMES.$Site->theme().DS.'index.php';\n\t\tShortcode::parse( $template );\n\t\t$template = ob_get_contents();\n\t\tob_end_clean();\t\n\t}", "private function loadUnorderedFiles() {\n\t\t$dir = new DirectoryIterator(dirname(__FILE__) . '/includes/wild');\n\t\tforeach ($dir as $fileinfo) {\n\t\t\tif (!$fileinfo->isDot() && 'php' === $fileinfo->getExtension()) {\n\t\t\t\trequire_once $fileinfo->getPathname();\n\t\t\t}\n\t\t}\n\t\tunset($dir, $fileinfo);\n\t}", "private function prepareShortCodeInfo() {\n $postCustomShortCodeSelectors = $this->getSetting('_post_custom_content_shortcode_selectors');\n $shortCodeSpecificFindAndReplaces = $this->getSetting('_post_find_replace_custom_short_code');\n $findAndReplacesForCustomShortCodes = $this->prepareFindAndReplaces($this->getSetting('_post_find_replace_custom_shortcodes'));\n\n if($postCustomShortCodeSelectors && !empty($postCustomShortCodeSelectors)) {\n foreach($postCustomShortCodeSelectors as $selectorData) {\n if(\n !isset($selectorData[\"selector\"]) || empty($selectorData[\"selector\"]) ||\n !isset($selectorData[\"short_code\"]) || empty($selectorData[\"short_code\"])\n )\n continue;\n\n $attr = !isset($selectorData[\"attr\"]) || empty($selectorData[\"attr\"]) ? 'html' : $selectorData[\"attr\"];\n $isSingle = isset($selectorData[\"single\"]);\n\n if($results = $this->extractData($this->crawler, $selectorData[\"selector\"], $attr, false, $isSingle, true)) {\n $result = '';\n\n // If the results is an array, combine all the data into a single string.\n if(is_array($results)) {\n foreach($results as $key => $r) $result .= $r;\n } else {\n $result = $results;\n }\n\n // Find and replace in custom short codes (regex, short code name, find, replace)\n if($shortCodeSpecificFindAndReplaces) {\n foreach($shortCodeSpecificFindAndReplaces as $item) {\n if(Utils::array_get($item, \"short_code\") == $selectorData[\"short_code\"]) {\n $result = $this->findAndReplaceSingle(\n Utils::array_get($item, \"find\"),\n Utils::array_get($item, \"replace\"),\n $result,\n isset($item[\"regex\"])\n );\n }\n }\n }\n\n // Apply find-and-replaces\n $result = $this->findAndReplace($findAndReplacesForCustomShortCodes, $result);\n\n $shortCodeContent[] = [\n \"data\" => $result,\n \"short_code\" => $selectorData[\"short_code\"]\n ];\n }\n }\n\n if(!empty($shortCodeContent)) {\n $this->postData->setShortCodeData($shortCodeContent);\n }\n }\n }", "public function addShortcodes() {\n\t\t$this->subscriber->addShortcode( 'mdm_syndication_embed', [$this, 'shortcodeCallback'] );\n\t}", "private function load_files() {\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/config.php';\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/assets.php';\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/manager.php';\n\n require PREMIUM_ADDONS_PATH . 'includes/templates/types/manager.php';\n\n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/api.php';\n \n }", "function Discography_Shortcodes() {\n\t\tadd_shortcode( 'discography_songs', array( $this, 'discography_songs' ) );\n\t}", "public function load_customize_controls() {\n\n\t\t$files[] = 'control-editor.php';\n\t\t// $files[] = 'control-layout-picker.php';\n\t\t// $files[] = 'control-multiple-checkboxes.php';\n\t\t// $files[] = 'control-select-category.php';\n\t\t// $files[] = 'control-select-menu.php';\n\t\t// $files[] = 'control-select-post.php';\n\t\t// $files[] = 'control-select-post-type.php';\n\t\t// //$files[] = 'control-select-recent-post.php';\n\t\t// $files[] = 'control-select-tag.php';\n\t\t// $files[] = 'control-select-taxonomy.php';\n\t\t// $files[] = 'control-select-user.php';\n\n\t\tforeach ( $files as $file ) {\n\n\t\t\trequire_once( trailingslashit( get_stylesheet_directory() ) . 'inc/controls/' . $file );\n\n\t\t}\n\n\t}", "public function add_shortcodes() {\n\t\tadd_shortcode( 'banner', array( $this, 'banner' ) );\n\t\tadd_shortcode( 'bundle', array( $this, 'bundle' ) );\n\t\tadd_shortcode( 'plugin-info', array( $this, 'plugin_info' ) );\n\t\tadd_shortcode( 'plugin-cta', array( $this, 'plugin_cta' ) );\n\t\tadd_shortcode( 'plugin-stats', array( $this, 'plugin_stats' ) );\n\t\tadd_shortcode( 'yst_review_box', array( $this, 'review_box' ) );\n\t\tadd_shortcode( 'sidebar-content', array( $this, 'sidebar_content' ) );\n\t\tadd_shortcode( 'aside', array( $this, 'sidebar_content' ) );\n\t\tadd_shortcode( 'testimonial', array( $this, 'testimonial' ) );\n\t\tadd_shortcode( 'announcement', array( $this, 'announcement' ) );\n\t\tadd_shortcode( 'pdf-button', array( $this, 'pdf_button' ) );\n\t\tadd_shortcode( 'readmore', array( $this, 'read_more_link' ) );\n\n\t\tadd_shortcode( 'ebook-banner', array( $this, 'ebook_banner' ) );\n\n\t\t// Deprecated shortcodes.\n\t\tadd_shortcode( 'box', array( $this, 'deprecate_box' ) );\n\t\tadd_shortcode( 'download_button', array( $this, 'deprecated_download_button' ) );\n\t\tadd_shortcode( 'support', array( $this, 'support' ) );\n\n\t\tadd_shortcode( 'llms_take_quiz', array( $this, 'llms_complete_lesson' ) );\n\t}", "public function load_files() {\n\n\t\t// WooCommerce tweaks - load first so we can use theme filters and hooks\n\t\tif ( WPEX_WOOCOMMERCE_ACTIVE ) {\n\t\t\trequire_once ( $this->template_dir .'/inc/woocommerce-config.php' );\n\t\t}\n\n\t\t// Include Theme Functions\n\t\trequire_once( $this->template_dir .'/inc/core-functions.php' );\n\t\trequire_once( $this->template_dir .'/inc/conditionals.php' );\n\t\trequire_once( $this->template_dir .'/inc/customizer-config.php' );\n\t\trequire_once( $this->template_dir .'/inc/post-meta-config.php' );\n\t\trequire_once( $this->template_dir .'/inc/category-meta.php' );\n\t\trequire_once( $this->template_dir .'/inc/accent-config.php' );\n\n\t\t// Include Classes\n\t\trequire_once ( $this->template_dir .'/inc/classes/custom-css/custom-css.php' );\n\t\trequire_once ( $this->template_dir .'/inc/classes/customizer/customizer.php' );\n\t\trequire_once ( $this->template_dir .'/inc/classes/gallery-metabox/gallery-metabox.php' );\n\t\trequire_once ( $this->template_dir .'/inc/classes/custom-metaboxes/init.php' );\n\t\trequire_once ( $this->template_dir .'/inc/classes/accent.php' );\n\t\trequire_once( $this->template_dir .'/inc/classes/category-colors.php' );\n\t\trequire_once ( $this->template_dir .'/inc/classes/category-thumbnails/category-thumbnails.php' );\n\n\t}", "protected function LoadBackendCode()\n {\n require_once Path::Combine(__DIR__, 'Globals/AddHooks.php');\n }", "public function load_hooks() {\n\n\t\t/* Add button */\n\t\tadd_action( 'media_buttons_context' , array( __class__ , 'token_button' ) , 99 );\n\n\t\t/* Load supportive libraries */\n\t\tadd_action( 'admin_enqueue_scripts' , array( __CLASS__ , 'enqueue_js' ));\n\n\t\t/* Add shortcode generation dialog */\n\t\tadd_action( 'admin_footer' , array( __CLASS__ , 'token_generation_popup' ) );\n\n\t\t/* Add supportive js */\n\t\tadd_action( 'admin_footer' , array( __CLASS__ , 'token_generation_js' ) );\n\n\t\t/* Add supportive css */\n\t\tadd_action( 'admin_footer' , array( __CLASS__ , 'token_generation_css' ) );\n\n\t\t/* Add shortcode handler */\n\t\tadd_shortcode( 'lead-field', array( __CLASS__, 'process_lead_field_shortcode' ) );\n\n\t\t/* Add shortcode handler */\n\t\tadd_shortcode( 'unsubscribe-link', array( __CLASS__, 'process_unsubscribe_link' ) );\n\n\t}", "function load(){\n $files=array(\n 'taxonomy/classes.php',\n 'tickets/classes.php',\n 'tickets/helper.php',\n 'tickets/ticket-admin-screen.php',\n 'settings/classes.php',\n 'core/attachment.php',\n 'core/comment.php',\n 'core/component.php',\n 'core/core-base.php',\n 'core/milestone.php',\n 'core/permission.php',\n 'core/priority.php',\n 'core/reporter.php',\n 'core/resolution.php',\n 'core/severity.php',\n 'core/status.php',\n 'core/ticket-extra.php',\n 'core/type.php',\n 'core/user.php',\n 'core/link-functions.php',\n 'core/version.php',\n 'core/workflow-keywords.php',\n 'core/search.php',\n 'business-functions.php',\n 'includes/css-js.php',\n 'includes/filters.php',\n 'core/general-templates.php',\n 'mailer/mailer.php',\n 'mailer/template/base.php',\n 'filters.php'\n );\n if(is_admin()){\n $files[]='admin/screen.php';\n $files[]='admin/seed.php';\n } \n foreach ($files as $file)\n require_once $this->path.$file;\n }", "public function run()\n {\n array_unshift($this->scripts, 'modules/map');\n parent::run();\n }", "private function loadStack() {\n\t\t$finder = new Finder();\n\n\t\t// load the wordpress \"stack\"\n\t\t$finder->files()->in( $this->wordpressParams['path'] )->depth( '== 0' )->name( 'wp-load.php' );\n\n\t\tforeach ( $finder as $bootstrapFile ) {\n\t\t\t$this->simulateGlobalRequire( $bootstrapFile->getRealpath() );\n\t\t}\n\t}", "public function load_admin_assets($hook) {\r\n\r\n wp_enqueue_script('mssc-js', plugins_url().'/'.self::PLUGIN_SLUG.'/js/shortcode.js', array('jquery'));\r\n wp_enqueue_style('mssc-tools-css', plugins_url().'/'.self::PLUGIN_SLUG.'/css/tools.css');\r\n \r\n if ($hook == 'post.php' || $hook == 'post-new.php') { \r\n wp_enqueue_style('mssc-post-css', plugins_url().'/'.self::PLUGIN_SLUG.'/css/post.css'); \r\n wp_enqueue_script('mssc-post-js', plugins_url().'/'.self::PLUGIN_SLUG.'/js/shortcode-popup.js', array('jquery', 'mssc-js'));\r\n }\r\n }", "protected function _Load_Context() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/context');\r\n // Fire the shortcode init action\r\n do_action('vcff_field_context_init',$this);\r\n }", "function parseShortcode ($argv): void {\n if (in_array('--shortcode', $argv) || in_array('-s', $argv)) {\n $this->function_to_seek = 'add_shortcode';\n $this->seek_shortcode = true;\n }\n }", "private function loadSourceCodes()\n {\n $sources = $this->sourceRepository->getList();\n foreach ($sources->getItems() as $source) {\n $sourceCode = $source->getSourceCode();\n $this->sourceCodes[$sourceCode] = $sourceCode;\n }\n }", "function afaoptions_do_page() {\r\n\t\t\tinclude_once('all-adsense-admin.php');\r\n\t}", "function _map($path) {\n\t\t$include = '.*[\\/\\\\].*\\.[a-z0-9]{2,3}$';\n\n\t\t$directories = array('.htaccess', '.DS_Store', 'media', '.git', '.svn', 'simpletest', 'empty');\n\t\t$extensions = array('db', 'htm', 'html', 'txt', 'php', 'ctp');\n\n\t\t$exclude = '.*[/\\\\\\](' . implode('|', $directories) . ').*$';\n\t\t$exclude .= '|.*[/\\\\\\].*\\.(' . implode('|', $extensions) . ')$';\n\n\t\tif (!empty($this->_exclude)) {\n\t\t\t$exclude = '|.*[/\\\\\\](' . implode('|', $this->_exclude) . ').*$';\n\t\t}\n\n\t\t$Folder = new Folder($path);\n\t\t$files = $Folder->findRecursive($include);\n\n\t\tforeach ($files as $file) {\n\t\t\tif (preg_match('#' . $exclude . '#', $file)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$search[] = '/' . preg_quote($Folder->pwd(), '/') . '/';\n\t\t\t$search[] = '/(' . implode('|', Media::short()) . ')' . preg_quote(DS, '/') . '/';\n\t\t\t$fragment = preg_replace($search, null, $file);\n\n\t\t\t$mapped = array(\n\t\t\t\t$file => MEDIA_STATIC . Media::short($file) . DS . $fragment\n\t\t\t);\n\n\t\t\twhile (in_array(current($mapped), $this->_map) && $mapped) {\n\t\t\t\t$mapped = $this->_handleCollision($mapped);\n\t\t\t}\n\t\t\twhile (file_exists(current($mapped)) && $mapped) {\n\t\t\t\t$this->out($this->shortPath(current($mapped)) . ' already exists.');\n\t\t\t\t$answer = $this->in('Would you like to [r]ename or [s]kip?', 'r,s', 's');\n\n\t\t\t\tif ($answer == 's') {\n\t\t\t\t\t$mapped = array();\n\t\t\t\t} else {\n\t\t\t\t\t$mapped = array(key($mapped) => $this->_rename(current($mapped)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($mapped) {\n\t\t\t\t$this->_map[key($mapped)] = current($mapped);\n\t\t\t}\n\t\t}\n\t}", "private function register_shortcodes() {\n\t\t$this->shortcode_instances['nmv_data_manager'] = new Data_Manager();\n\n\t\tforeach ( $this->shortcode_instances as $name => $instance ) {\n\t\t\tadd_shortcode( $name, array( $instance, 'run' ) );\n\t\t}\n\t}", "function edgtf_core_include_custom_post_types_files() {\n\t\tif(edgtf_core_theme_installed()) {\n\t\t\tforeach (glob(EDGE_CORE_CPT_PATH . '/*/load.php') as $shortcode_load) {\n\t\t\t\tinclude_once $shortcode_load;\n\t\t\t}\n\t\t}\n\t}", "function map() {\n\t\t\t//that should stay hidden in this array\n\t\t\t$filter = array(\n\t\t\t\t\".\",\n\t\t\t\t\"..\",\n\t\t\t\t\".DS_Store\",\n\t\t\t\t\"BaseView.php\",\n\t\t\t\t\"error\",\n\t\t\t\t\"master\",\n\t\t\t\t\"index\"\n\t\t\t\t);\n\n\t\t\t//Get all files from application/view directory with filtered array\n\t\t\tlist($links, $dirs) = $this->model->map('application/view', $filter);\n\n\t\t\t//create new sitemap array\n\t\t\t$sitemap = array();\n\n\t\t\t//start a loop for each directory\n\t\t\tforeach($dirs as $dir){\n\n\t\t\t\t//create a multidimensional array with directory name handles\n\t\t\t\t$siteMap[$dir] = array();\n\n\t\t\t\t\t//create a loop of to loop through all page/files\n\t\t\t\t\tforeach($links as $link){\n\t\t\t\t\t\t//if the directory name doesnt appera in the string skip loop\n\t\t\t\t\t\tif (strpos($link,$dir) === false) continue;\n\n\t\t\t\t\t\t//trim the $link result\n\t\t\t\t\t\t$trimmed = str_replace(\"application/view\", \"\", $link);\n\t\t\t\t\t\t$trim = str_replace(\".php\", \"\", $trimmed);\n\t\t\t\t\t\t$name = str_replace('/' . $dir . '/',\"\", $trim);\n\n\t\t\t\t\t\t//push the file name with no extension to the multidimensional array\n\t\t\t\t\t\t//where the directory match the files existance\n\t\t\t\t\t\tarray_push($siteMap[$dir], $name);\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->view->siteMap = $siteMap;\n\t\t\t$this->view->render('site/map', 'Sitemap', true, false);\n\t\t}", "function load_codelist_files() {\n add_action( 'admin_enqueue_scripts', 'load_codelist_js' );\n}", "function wpop_action_available_shortcodes() {\n $shortcode = WPop_Shortcode::instance();\n $shortcodes = $shortcode->get();\n $menu = array();\n foreach ( $shortcodes as $info ) {\n if ( !isset( $info['show_menu'] ) || $info['show_menu'] ) {\n $menu[] = $info;\n }\n }\n \n echo '<script type=\"text/javascript\">' . \"\\n\"\n . 'WPop_shortcodes = ' . json_encode( $menu ) . \";\\n\"\n . '</script>' . \"\\n\";\n}", "function yz_activate_wp_menus_shortcodes( $items ) {\r\n return do_shortcode( $items );\r\n}", "function assets($posts){\n\n\t\t$found = false;\n\t\tif ( !empty($posts) ){\n\t\t\tforeach ($posts as $post) {\n\t\t\t\tif ( $this->has_shortcode($post->post_content, 'soah_map') ){\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( $found ){\n // STYLES FOR LEAFLET\n wp_enqueue_style( 'soah-leaflet', get_stylesheet_directory_uri() .'/assets/css/leaflet.1.4.0.css', array(), SOAH_VERSION );\n\n // STYLES FOR CHOROPLETH MAP\n wp_enqueue_style( 'soah-choropleth', get_stylesheet_directory_uri() .'/assets/css/choropleth.map.css', array(), SOAH_VERSION );\n\n // POPPER SCRIPT\n wp_enqueue_script( 'popper', get_stylesheet_directory_uri().'/assets/js/popper.1.14.3.js', array( 'jquery' ), SOAH_VERSION, true );\n\n // LEAFLET SCRIPT\n wp_enqueue_script( 'leaflet', get_stylesheet_directory_uri().'/assets/js/leaflet.1.4.0.js', array( 'jquery', 'popper' ), SOAH_VERSION, true );\n\n // LEAFLET GEOCSV SCRIPT\n wp_enqueue_script( 'leaflet-geocsv', get_stylesheet_directory_uri().'/assets/js/leaflet.geocsv.js', array( 'leaflet' ), SOAH_VERSION, true );\n\n // INDIA DISTRICTS SCRIPT\n wp_enqueue_script( 'leaflet-india-dist', get_stylesheet_directory_uri().'/assets/js/india_dist_662.js', array( 'leaflet' ), SOAH_VERSION, true );\n\n // INDIA STATES SCRIPT\n wp_enqueue_script( 'leaflet-india-states', get_stylesheet_directory_uri().'/assets/js/states.js', array( 'leaflet' ), SOAH_VERSION, true );\n\n // SAMPLE DATA SCRIPT\n wp_enqueue_script( 'soah-sample-data', get_stylesheet_directory_uri().'/assets/js/sample_data.js', array( 'leaflet' ), SOAH_VERSION, true );\n\n // CHOROPLETH MAP SCRIPT\n wp_enqueue_script( 'choropleth', get_stylesheet_directory_uri().'/assets/js/choropleth.js', array( 'leaflet' ), SOAH_VERSION, true );\n\n\t\t}\n\n\t\treturn $posts;\n\n\t}", "function codeless_load_framework() {\n\n // Register all Theme Hooks (add_action, add_filter)\n require_once( get_template_directory() . '/includes/codeless_hooks.php' );\n\n // Codeless Routing Templates and Custom Type Queries\n require_once( get_template_directory().'/includes/core/codeless_routing.php' );\n \n\n // Register all theme related sidebars\n require_once( get_template_directory().'/includes/register/register_sidebars.php' );\n\n // Register Custom Post Types\n // Works with Codeless Builder activated\n // Plugin Territory\n require_once( get_template_directory().'/includes/register/register_custom_types.php' );\n\n // Load Codeless Post Like\n require_once( get_template_directory().'/includes/core/codeless_post_like.php' );\n\n // Load Megamenu\n require_once( get_template_directory().'/includes/core/codeless_megamenu.php' );\n\n // Load all functions that are responsable for Extra Classes and Extra Attrs\n require_once( get_template_directory().'/includes/codeless_html_attrs.php' );\n\n // Load all blog related functions\n require_once( get_template_directory().'/includes/codeless_functions_blog.php' );\n\n // Load all portfolio related functions\n require_once( get_template_directory().'/includes/codeless_functions_portfolio.php' );\n\n // Load Theme Panels\n require_once( get_template_directory().'/includes/codeless_theme_panel/codeless_backpanel.php' );\n require_once( get_template_directory().'/includes/codeless_theme_panel/codeless_theme_panel.php' );\n require_once( get_template_directory().'/includes/codeless_theme_panel/codeless_image_sizes.php' );\n require_once( get_template_directory().'/includes/codeless_theme_panel/codeless_modules.php' ); \n require_once( get_template_directory().'/includes/codeless_theme_panel/codeless_custom_sidebars.php' ); \n require_once( get_template_directory().'/includes/codeless_theme_panel/codeless_system_status.php' );\n \n // Image Resize - Module - Resize image only when needed\n require_once( get_template_directory().'/includes/core/codeless_image_resize.php' );\n\n // Load Comment Walker\n require_once( get_template_directory().'/includes/core/codeless_comment_walker.php' );\n \n // Codeless Icons List\n require_once( get_template_directory().'/includes/core/codeless_icons.php' );\n\n // Fallback Class for Header when Codeless Builder Plugin is not active\n require_once( get_template_directory().'/includes/core/codeless_header_fallback.php' );\n\n // Load Woocommerce Functions\n if( class_exists( 'Woocommerce' ) )\n require_once( get_template_directory().'/includes/codeless_functions_woocommerce.php' );\n}", "public function initTagSelfParse(){\n\t\t$tagPath = dirname(__FILE__) . '/tags/';\n\t\t$tagDir = @opendir($tagPath);\n\t\t$suffix = '.php';\n\t\twhile(($fileName = readdir($tagDir))){\n\t\t\tif(String::endWith($fileName, $suffix)){\n\t\t\t\tinclude_once($tagPath . $fileName);\n\t\t\t}\n\t\t}\n\t\t//load the tag map\n\t\t$this->tagSelfParses = include(dirname(__FILE__) . '/tagmap.php');\n\t}", "private function loadAliases(): void {\n\t\tif (!empty($this->mimeTypeAlias)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true);\n\t\t$this->mimeTypeAlias = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEALIASES, $this->mimeTypeAlias);\n\t}", "public function map_shortcode_scripts() {\n wp_register_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . $this->APIKey, array(), null, true );\n wp_register_script( 'google-maps-cluster-api', plugins_url( 'scripts/google-map-markerclusterer.js' , __FILE__ ), array('google-maps-api'), '1.0.1', true );\n wp_register_script( 'alc-map-js', plugins_url( 'scripts/alc-mapper.js' , __FILE__ ), array('google-maps-api','google-maps-cluster-api'), '1.0.1', true );\n }", "function ignoreShortcodes()\n{\n remove_all_shortcodes();\n}", "public function injectFiles() {\n if (self::$loadFiles) {\n echo ('<link rel = \"stylesheet\" type = \"text/css\" href = \"' . plugin_file('autocomplete.css') . '\"/>');\n echo ('<script type=\"text/javascript\" src=\"' . plugin_file('autocomplete.js') . '\"></script>');\n }\n }", "public static function removeAllShortcodes() {\r\n remove_all_shortcodes();\r\n }", "function wpsbc_include_files_base() {\r\n\r\n\t// Get legend dir path\r\n\t$dir_path = plugin_dir_path( __FILE__ );\r\n\r\n\t// Include languages functions\r\n\tif( file_exists( $dir_path . 'functions-languages.php' ) )\r\n\t\tinclude $dir_path . 'functions-languages.php';\r\n\r\n\t// Include utils functions\r\n\tif( file_exists( $dir_path . 'functions-utils.php' ) )\r\n\t\tinclude $dir_path . 'functions-utils.php';\r\n\r\n\t// Include the shortcodes class\r\n\tif( file_exists( $dir_path . 'class-shortcodes.php' ) )\r\n\t\tinclude $dir_path . 'class-shortcodes.php';\r\n\r\n\t// Include the widget class\r\n\tif( file_exists( $dir_path . 'class-widget-calendar.php' ) )\r\n\t\tinclude $dir_path . 'class-widget-calendar.php';\r\n\r\n\t// Include the widget class\r\n\tif( file_exists( $dir_path . 'class-widget-calendar-search.php' ) )\r\n\t\tinclude $dir_path . 'class-widget-calendar-search.php';\r\n\r\n}", "public function on_init() {\n\t\t$this->register_shortcodes();\n\t}", "function a13_meta_shortcodes( $post ){\n require_once (TPL_SHORTCODES_DIR . '/shortcodes-generate.php');\n $raw = apollo13_shortcodes();\n\n $categories = '<select id=\"shortcode-categories\" name=\"shortcode-categories\"><option value=\"\">' . __be( 'Select category' ) . '</option>';\n $inHtml = '';\n\n foreach($raw as $cats){\n $categories .= '<option value=\"' . $cats['id'] . '\">' . $cats['name'] . '</option>';\n $bufor = '';\n $subcategories = '';\n //generate subcats and fields\n foreach($cats['codes'] as $code){\n $subcategories .= '<option value=\"' . $code['code'] . '\">' . $code['name'] . '</option>';\n\n $fields = '<div id=\"apollo13-' . $code['code'] . '-fields\" class=\"shortcodes-fields apollo13-settings\">';\n foreach($code['fields'] as $field){\n $fields .= apollo13_shortcodes_make_field( $field, $code['code'] );\n }\n $fields .= '</div>';\n $bufor .= $fields;\n }\n if ( $subcategories != '' ){\n $subid = 'apollo13-' . $cats['id'] . '-codes';\n $subcategories = '<select id=\"' . $subid . '\" name=\"' . $subid . '\" class=\"shortcodes-codes\">' . $subcategories . '</select>';\n }\n $inHtml .= $subcategories;\n $inHtml .= $bufor;\n }\n\n $categories .= '</select>';\n\n $html = '<div id=\"shortcode-generator\">';\n $html .= $categories;\n $html .= $inHtml;\n $html .= '<div class=\"buttons-parent\"><span class=\"button\" id=\"send-to-editor\">' . __be( 'Insert code in editor' ) . '</span></div>';\n $html .= '</div>';\n echo $html;\n}", "function bg_show_hide_register_shortcodes() {\r\n\t$bg_show_hide_registered_shortcodes = array(\r\n\t\t\"bg_collapse\" => \"bg_show_hide_shortcode\",\r\n\t\t\"bg_collapse_level2\" => \"bg_show_hide_shortcode\",\r\n\t\t\"bg_collapse_level3\" => \"bg_show_hide_shortcode\",\r\n\t);\r\n\t/* Register shortcodes */\r\n\tforeach( $bg_show_hide_registered_shortcodes as $shortcodeTag => $shortcodeHandler) {\r\n\t\tadd_shortcode( $shortcodeTag, $shortcodeHandler);\r\n\t}\r\n}", "public function beforeSiteLoad()\n\t{\n\t\tglobal $Page, $Post, $Url, $posts; // Better with instance() no?\n\t\t\t\t\t\n\t\t# Add Shortcode class\n\t\trequire_once(dirname(__FILE__). DS .'Shortcode.class.php');\n\t\t\t\t\n\t\t# Add great extras shorcode!\n\t\tinclude_once(dirname(__FILE__). DS .'shortcodes.php');\t\t\n\n\t\t# include shortcodes in themes\t\t\n\t\tpluginShorcode::addons_shortcode_themes(); // FEATURES\n\t\t\t\t\t\t\t\t \n\t\t// Filter then build it!\n\t\tswitch($Url->whereAmI())\n\t\t{\n\t\t\tcase 'post':\n\t\t\t\t$content = $Post->content();\t\t\t\t\n\t\t // Parse Shortcodes\n\t\t $content = Shortcode::parse( $content );\n\t\t $Post->setField('content', $content, true);\t\n\t\t\t\tbreak;\n\t\t\tcase 'page':\n\t\t\t\t$content = $Page->content();\t\t\n\t\t // Parse Shortcodes\n\t\t $content = Shortcode::parse( $content );\n\t\t $Page->setField('content', $content, true);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t// Homepage (Thx Diego for this tip)\t\t\t\n\t\t\t\tforeach($posts as $key=>$Post)\n\t\t\t\t{\n\t\t\t\t\t// Full content parsed by Parsedown\n\t\t\t\t\t$content = $Post->content();\n\t\t\t\n\t\t\t\t\t// Parse with Shortcode\n\t\t\t\t\t$content = Shortcode::parse( $content );\n\t\t\t\n\t\t\t\t\t// Set full content\n\t\t\t\t\t$Post->setField('content', $content, true);\n\t\t\t\n\t\t\t\t\t// Set page break content\n\t\t\t\t\t$explode = explode(PAGE_BREAK, $content);\n\t\t\t\t\t$Post->setField('breakContent', $explode[0], true);\n\t\t\t\t\t$Post->setField('readMore', !empty($explode[1]), true);\n\t\t\t\t} \n\t\t}\n\t \n\t}", "function kpg_display_short_codes() {\r\n\tglobal $shortcode_tags; // array of shortcode tags\r\n?>\r\n\r\n<div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\" onmouseover='var scid=document.getElementById(\"gb0\");scid.style.display=\"block\";scid.style.visibility=\"visible\";return false;' onmouseout='var scid=document.getElementById(\"gb0\");scid.style.display=\"none\";scid.style.visibility=\"hidden\";return false;'>\r\n <div style=\"font-weight:bold\">All Registered Short Codes</div >\r\n <script type=\"text/javascript\">\r\n\tfunction gbsel(i) {\r\n\t var t=document.getElementById(i);\r\n\t\tif (document.all) {\r\n\t\t\tvar range = document.body.createTextRange();\r\n\t\t\trange.moveToElementText(t);\r\n\t\t\trange.select();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar selection = window.getSelection ();\r\n\t\tvar rangeToSelect = document.createRange();\r\n\t\trangeToSelect.selectNodeContents(t);\r\n\t\tselection.removeAllRanges();\r\n\t\tselection.addRange(rangeToSelect);\r\n\t\treturn false;\r\n\t}\r\n\r\n </script>\r\n <?php\r\n $id=1;\r\n\t$gb=array(\r\n\t'wp_caption'=>'wp_caption] id=\"\" align=\"\" width=\"\" caption=\"\"][/wp_caption',\r\n\t'caption'=>'caption id=\"\" align=\"\" width=\"\" caption=\"\"][/caption',\r\n\t'gallery'=>'gallery order=\"\" orderby=\"\" id=\"\" itemtag=\"\" icontag=\"\" captiontag=\"\" columns=\"\" size=\"\" include=\"\" exclude=\"\"',\r\n\t'embed'=>'embed width=\"\" height=\"\"][/embed',\r\n\t\"gbrss\"=>'gbrss feed=\"\" title=\"\" count=\"\" content=\"\"',\r\n\t\"gbwiki\"=>'gbwiki title=\"\"] [/gbwiki',\r\n\t\"gbamazon\"=>'gbamazon title=\"\" affid=\"\"] [/gbamazon',\r\n\t\"gbcustpost\"=>'gbcustpost post_type=\"\" title=\"\" count=\"\" orderby=\"\"',\r\n\t\"gbaddtocart\"=>'gbaddtocart ppid=\"\" item=\"\" amt=\"\"',\r\n\t\"gbviewcart\"=>'gbviewcart ppid=\"\"'\r\n\t);\r\n foreach ($shortcode_tags as $key=>$data) {\r\n\t\t// replace our grab bag with a custom description\r\n\t\tif (array_key_exists($key,$gb)) $key=$gb[$key];\r\n\t\techo \" <span id=\\\"gbid$id\\\" onmouseover=\\\"return gbsel('gbid$id');\\\">[$key]</span> &nbsp; \";\r\n\t\t$id++;\r\n\t}\r\n?><br/>\r\n <div id=\"gb0\" style=\"display:none;visibility:false;width:100%;\" >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\" >\r\n <div style=\"font-weight:bold\">caption (or wp_caption)</div >\r\n [wp_caption] id=\"\" align=\"\" width=\"\" caption=\"\"]image[/wp_caption]<br/>\r\n [caption] id=\"\" align=\"\" width=\"\" caption=\"\"]image id or name[/caption]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;id=(optional) id for use in css<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;width=(optional) width in pixels of image<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;caption=image caption<br/>\r\n </div >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\" >\r\n <div style=\"font-weight:bold\">Embed media</div >\r\n [embed width=\"\" height=\"\"]media url[/embed]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;width=width in pixesl of media<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;height=height in pixesl of media<br/>\r\n </div >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\" >\r\n <div style=\"font-weight:bold\">gallery</div >\r\n [gallery order=&quot;&quot; orderby=\"\" id=&quot;&quot; itemtag=&quot;&quot; icontag=&quot;&quot; captiontag=&quot;&quot; columns=&quot;&quot; size=&quot;&quot; include=&quot;&quot; exclude=&quot;&quot;]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;order=(optional) ASC or DESC or RAND<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;orderby=(optional) SQL columns for sort default: menu_order ID<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;id=(optional) default is current post id<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;itemtag=(optional) tag used for each item default: dl<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;icontag=(optional) tag used for container: dt<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;captiontag=(optional) tag used for caption: dd<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;columns=(optional) Number of columns default: 3<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;size=(optional) Size of gallery image default: thumbnail<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;include=(optional) list of included images<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;exclude=(optional) list of excluded images<br/>\r\n </div >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\" >\r\n <div style=\"font-weight:bold\">Insert Rss Feed</div >\r\n [gbrss feed=&quot;&quot; title=&quot;&quot; count=&quot;&quot; content=&quot;&quot;]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;feed=url of the rss feed<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;title=title above the feed<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;count=max number of feed items<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;content=true or false, show content, otherwise just shows titles \r\n </div >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:2px;\">\r\n <div style=\"font-weight:bold\">Link to Wikipedia.org</div >\r\n [gbwiki title=&quot;&quot;] [/gbwiki]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;Use [gbwiki] before the phrase and [/gbwiki] after it. Example - [gbwiki]WordPress[/gbwiki]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;(optional) title=link title, displays on hover over link\r\n </div >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\">\r\n <div style=\"font-weight:bold\">Affiliate Link to Amazon</div >\r\n [gbamazon title=&quot;&quot; affid=&quot;&quot;] [/gbamazon]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;Use [gbamazon] before the phrase and [/gbwiki] after it. Example - [gbamazon]WordPress[/gbamazon]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;(optional) title=link title, displays on hover over link<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;(optional) affid=Amazon Affiliate ID (defaults to my affid)\r\n \r\n </div >\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\">\r\n <div style=\"font-weight:bold\">Display a list of posts/pages/custom posts</div >\r\n [gbcustpost post_type=&quot;&quot; title=&quot;&quot; count=&quot;&quot; orderby=&quot;&quot;] <br/>\r\n &nbsp;&nbsp;&bull;&nbsp;post_type=post, page or a valid custom post type<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;title=title above list<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;count=max number of items (use -1 to display all)<br/>\r\n &nbsp;&nbsp;&bull;&nbsp;orderby=order of posts (valid sql order by clauses).<br/>\r\n Valid order values:<br/>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;post_date<br/>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;post_date desc<br/>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;upper(post_title)<br/>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;comment_count desc,post_date desc<br/>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;upper(post_author), upper(post_title)<br/>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;upper(post_author), post_date desc<br/>\r\n \r\n </div >\r\n\t \r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:4px;\" >\r\n <div style=\"font-weight:bold\">PayPal add to cart</div >\r\n [gbaddtocart ppid=&quot;&quot; item=&quot;&quot; amt=&quot;&quot;]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; ppid=PayPal id (email) for receiving money<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; item=Name of item to appear in cart (not displayed)<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; amt=Amount (without shipping)<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; (optional) itemno=Item Number for your use<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; (optional) cart=Name of Cart<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; (optional) ship=Shipping amount<br/>\r\n \r\n </div >\r\n\r\n\r\n <div class=\"gbstyle\" style=\"border:thin black solid;padding:2px;\">\r\n <div style=\"font-weight:bold\">PayPal view cart</div >\r\n [gbviewcart ppid=&quot;&quot;]<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; item=Name of item to appear in cart (not displayed)<br/>\r\n &nbsp;&nbsp;&bull;&nbsp; ppid=PayPal id (email) for receiving money<br/>\r\n \r\n </div >\r\n\r\n <em>Note: all shortcodes can use a style=&quot;&quot; parameter to add css styling</em>\r\n\r\n <br/>\r\n <br/>\r\n </div>\r\n </div>\r\n</div >\r\n<?php\r\n\r\n}", "function wpbs_include_files_admin_calendar()\n{\n\n // Get legend admin dir path\n $dir_path = plugin_dir_path(__FILE__);\n\n // Include submenu page\n if (file_exists($dir_path . 'class-submenu-page-calendar.php')) {\n include $dir_path . 'class-submenu-page-calendar.php';\n }\n\n // Include calendars list table\n if (file_exists($dir_path . 'class-list-table-calendars.php')) {\n include $dir_path . 'class-list-table-calendars.php';\n }\n\n // Include legend items list table\n if (file_exists($dir_path . 'class-list-table-legend-items.php')) {\n include $dir_path . 'class-list-table-legend-items.php';\n }\n\n // Include calendar editor outputter\n if (file_exists($dir_path . 'class-calendar-editor-outputter.php')) {\n include $dir_path . 'class-calendar-editor-outputter.php';\n }\n\n // Include admin actions\n if (file_exists($dir_path . 'functions-actions-ical.php')) {\n include $dir_path . 'functions-actions-ical.php';\n }\n\n if (file_exists($dir_path . 'functions-notes.php')) {\n include $dir_path . 'functions-notes.php';\n }\n\n if (file_exists($dir_path . 'functions-actions-csv.php')) {\n include $dir_path . 'functions-actions-csv.php';\n }\n\n if (file_exists($dir_path . 'functions-actions-calendar.php')) {\n include $dir_path . 'functions-actions-calendar.php';\n }\n\n if (file_exists($dir_path . 'functions-actions-legend-item.php')) {\n include $dir_path . 'functions-actions-legend-item.php';\n }\n\n if (file_exists($dir_path . 'functions-actions-ajax-calendar.php')) {\n include $dir_path . 'functions-actions-ajax-calendar.php';\n }\n\n if (file_exists($dir_path . 'functions-actions-ajax-legend-item.php')) {\n include $dir_path . 'functions-actions-ajax-legend-item.php';\n }\n\n if (file_exists($dir_path . 'functions-shortcode-generator.php')) {\n include $dir_path . 'functions-shortcode-generator.php';\n }\n\n}", "abstract public function getDefaultShortCodeOptions();", "function ootheme_options_custom_scripts() {}", "private function load_full() {\n\t\t$c = new ConfigCompiler( $this->_blog_id, $this->_preview );\n\t\t$c->load();\n\t\t$this->_data = $c->get_data();\n\t\t$this->_compiled = true;\n\t}", "private function includes() {\n\n\t\t// Load the Hybrid Core framework and theme files.\n\t\trequire_once( $this->dir_path . 'lib/hybrid.php' );\n\n\t\t// Load theme includes.\n\t\trequire_once( $this->dir_path . 'inc/functions-filters.php' );\n\t\trequire_once( $this->dir_path . 'inc/functions-icons.php' );\n\t\trequire_once( $this->dir_path . 'inc/functions-options.php' );\n\t\trequire_once( $this->dir_path . 'inc/functions-scripts.php' );\n\t\trequire_once( $this->dir_path . 'inc/functions-template.php' );\n\n\t\t// Load Easy Digital Downloads files if plugin is active.\n\t\tif ( class_exists( 'Easy_Digital_Downloads' ) )\n\t\t\trequire_once( $this->dir_path . 'inc/functions-edd.php' );\n\t}", "function qodef_core_include_custom_post_types_files() {\n\t\tif ( qodef_core_theme_installed() ) {\n\t\t\tforeach ( glob( QODE_CORE_CPT_PATH . '/*/load.php' ) as $shortcode_load ) {\n\t\t\t\tinclude_once $shortcode_load;\n\t\t\t}\n\t\t}\n\t}", "private function autoload()\n {\n if ($this->loaded) {\n return;\n }\n\n $all = Piwik_FetchAll('SELECT option_value, option_name\n\t\t\t\t\t\t\t\tFROM `' . Piwik_Common::prefixTable('option') . '`\n\t\t\t\t\t\t\t\tWHERE autoload = 1');\n foreach ($all as $option) {\n $this->all[$option['option_name']] = $option['option_value'];\n }\n\n $this->loaded = true;\n }", "function register_short_code(){\n\t\twp_enqueue_style('cp-shortcode',CP_PATH_URL.'/frontend/shortcodes/css/shortcode.css');\n\t}", "function __construct() {\n\t\n\t\t// Register the list of shortcodes\n\t\t$this->register();\n\t\n\t\t// Enable shortcodes in site elements\n\t\t$this->enable();\n\t}", "function ss_options() {\n\n\t$shortname = 'inc'; // use the same shortname as in the massive-panel;\n\n\t// this array is used for images example (first attribute of the image is used as a description for the image, the second is the path)\n $images_array = array(\"No Pattern\" => \"patterns/p12.png\",\n \t\"Patern 1\" => \"patterns/p1.png\",\n \"Pattern 2\" => \"patterns/p2.png\",\n \"Pattern 3\" => \"patterns/p3.png\",\n \"Pattern 4\" => \"patterns/p4.png\",\n \"Pattern 5\" => \"patterns/p5.png\",\n \"Pattern 6\" => \"patterns/p6.png\",\n \"Pattern 7\" => \"patterns/p7.png\",\n \"Pattern 8\" => \"patterns/p8.png\",\n \"Pattern 9\" => \"patterns/p9.png\",\n \"Pattern 10\" => \"patterns/p10.png\",\n \"Pattern 24\" => \"patterns/p24.png\",\n \"Pattern 23\" => \"patterns/p23.jpg\",\n \"Pattern 13\" => \"patterns/p13.jpg\",\n \"Pattern 15\" => \"patterns/p15.jpg\",\n \"Pattern 14\" => \"patterns/p14.jpg\",\n \"Pattern 16\" => \"patterns/p16.jpg\",\n \"Pattern 17\" => \"patterns/p17.jpg\",\n \"Pattern 18\" => \"patterns/p18.jpg\",\n \"Pattern 19\" => \"patterns/p19.jpg\",\n \"Pattern 20\" => \"patterns/p20.png\",\n \"Pattern 21\" => \"patterns/p21.jpg\",\n \"Pattern 22\" => \"patterns/p22.png\"\n );\n \n $dropDown = array(\"Flip Book Overview\" => \"main\",\n \t\t\t\t \"Brochure\" => \"brochure\",\n \t\t\t\t \"Template Blue\" => \"template-blue\",\n \t\t\t\t \"Template Ocean\" => \"template-ocean\",\n \t\t\t\t \"Template Gold\" => \"template-gold\",\n \t\t\t\t \"Template Light\" => \"template-light\",\n \t\t\t\t \"Template Pistachio\" => \"template-pistachio\",\n \t\t\t\t \"Template Grass\" => \"template-grass\",\n \t\t\t\t \"Template Violet\" => \"template-violet\",\n \t\t\t\t \"Template Brownie\" => \"template-brownie\"); \n \t\t\t\t \n $dropDownMenu = array(\"Stacked\" => \"stacked\",\n \t\t\t\t \t \"Spread\" => \"spread\"); \n \n\t$options = array();\n\t\n\t// logo at the top\n\t$options[] = array(\"type\" => \"logo\",\n\t\t\t\t\t \"src\" => \"styles-switcher/images/logo.png\");\n\t\n\t// Other Books\n\t$options[] = array(\"type\" => \"dropdown\",\n\t\t\t\t\t \"desc\" => \"See other examples\",\n\t\t\t\t\t \"desc-pos\" => \"top\",\n\t\t\t\t\t \"id\" => \"ss_fb_dropdown\",\n\t\t\t\t\t \"options\" => $dropDown,\n\t\t\t\t\t \"val\" => \"Brochure\");\n\t\t\t\t\t \n\t$options[] = array(\"type\" => \"dropdown\",\n\t\t\t\t\t \"desc\" => \"Change menu style\",\n\t\t\t\t\t \"desc-pos\" => \"top\",\n\t\t\t\t\t \"id\" => \"ss_fb_menu\",\n\t\t\t\t\t \"options\" => $dropDownMenu,\n\t\t\t\t\t \"val\" => \"Spread\");\n\t\n\t// background color picker\n\t$options[] = array( \"desc\" => \"Choose background color\",\n\t\t\t\t\t\t\"desc-pos\" => \"top\", \n\t\t\t\t\t\t\"id\" => $shortname.\"_bg_color\",\n\t\t\t\t\t\t\"type\" => \"color\",\n\t\t\t\t\t\t\"val\" => \"#FAFAFA\");\n\n\t// background patern images \n\t$options[] = array( \"desc\" => \"Choose background pattern overlay\",\n\t\t\t\t\t\t\"desc-pos\" => \"top\",\n\t\t\t\t\t\t\"id\" => $shortname.\"_background_image\",\n\t\t\t\t\t\t\"options\" => $images_array,\n\t\t\t\t\t\t\"type\" => \"choose-image\",\n\t\t\t\t\t\t\"val\" => 13);\t\t\t\n\n\treturn $options;\n\n}", "function philosophy_csf_gmap_shortcode($options){\n\n\n\t$options[] = array(\n\n\t\t\t 'name' => 'group_1',\n\t\t\t 'title' => 'Group #1',\n\t\t\t 'shortcodes' => array(\n\n\t\t\t array(\n\t\t\t 'name' => 'gmap',\n\t\t\t 'title' => 'Goggle Map',\n\t\t\t 'fields' => array(\n\t\t\t array(\n\t\t\t 'id' => 'place',\n\t\t\t 'type' => 'text',\n\t\t\t 'title' => 'Place',\n\t\t\t 'help' => 'Enter Your Place',\n\t\t\t 'default' => 'Mirpur DOHS'\n\t\t\t ),\n\t\t\t array(\n\t\t\t 'id' => 'width',\n\t\t\t 'type' => 'text',\n\t\t\t 'title' => 'Width',\n\t\t\t 'default' => '100%'\n\t\t\t ),\n\t\t\t array(\n\t\t\t 'id' => 'height',\n\t\t\t 'type' => 'text',\n\t\t\t 'title' => 'Height',\n\t\t\t 'default' => '100%'\n\t\t\t ),\n\t\t\t array(\n\t\t\t 'id' => 'zoom',\n\t\t\t 'type' => 'text',\n\t\t\t 'title' => 'Zoom',\n\t\t\t 'default' => 14\n\t\t\t ),\n\t\t\t ),\n\t\t\t ),\n\n\t\t )\n\t\t);\n\n\treturn $options ;\n\n}", "function qode_listing_load_files() {\n\t\trequire_once 'load.php';\n\t}", "function _acpperms_parse_source_folder()\n\t{\n\t\t//-------------------------------\n\t\t// INIT\n\t\t//-------------------------------\n\n\t\t$dir = ROOT_PATH . \"sources/action_admin\";\n\t\t$master = array();\n\t\t\n\t\t//-------------------------------\n\t\t// Load lang file...\n\t\t//-------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH . 'cache/lang_cache/en/acp_lang_acpperms.php' );\n\t\t\n\t\t$this->lang = $lang;\n\t\t\n\t\t//-------------------------------\n\t\t// Loop....\n\t\t//-------------------------------\n\t\t\n\t\t$handle = opendir($dir);\n\t\t\t\n\t\twhile ( ( $file = readdir($handle) ) !== false )\n\t\t{\n\t\t\tif ( ($file != \".\") && ($file != \"..\") && ($file != '.DS_Store') )\n\t\t\t{\n\t\t\t\tif ( is_file( $dir.\"/\".$file ) )\n\t\t\t\t{\n\t\t\t\t\t//-------------------------------\n\t\t\t\t\t// Open file and get perm rows\n\t\t\t\t\t//-------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$code = implode( '', file( $dir.\"/\".$file ) );\n\t\t\t\t\t$_name = str_replace( \".php\", \"\", $file );\n\t\t\t\t\t\n\t\t\t\t\t$master[ $_name ] = array();\n\t\t\t\t\t\n\t\t\t\t\t//-------------------------------\n\t\t\t\t\t// Get perm main....\n\t\t\t\t\t//-------------------------------\n\t\t\t\t\t\n\t\t\t\t\tpreg_match( '#var\\s+?\\$perm_main\\s+?=\\s+?[\\'\"](.+?)[\\'\"];#', $code, $match );\n\t\t\t\t\t\n\t\t\t\t\t$master[ $_name ]['perm_main'] = $match[1];\n\t\t\t\t\t\n\t\t\t\t\t//-------------------------------\n\t\t\t\t\t// Get perm child....\n\t\t\t\t\t//-------------------------------\n\t\t\t\t\t\n\t\t\t\t\tpreg_match( '#var\\s+?\\$perm_child\\s+?=\\s+?[\\'\"](.+?)[\\'\"];#', $code, $match );\n\t\t\t\t\t\n\t\t\t\t\t$master[ $_name ]['perm_child'] = $match[1];\n\t\t\t\t\t\n\t\t\t\t\tif ( $master[ $_name ]['perm_main'] AND $master[ $_name ]['perm_child'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t//-------------------------------\n\t\t\t\t\t\t// Get perm rows\n\t\t\t\t\t\t//-------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t\tpreg_match_all( '#cp_permission_check\\(\\s+?\\$this->perm_main\\.[\\'\"]\\|[\\'\"]\\.\\$this->perm_child\\.[\\'\"]\\:(.+?)[\\'\"]\\s+?\\);#i', $code, $match );\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ($i=0; $i < count($match[0]); $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_bit = trim($match[1][$i]);\n\t\t\t\t\t\t\t$master[ $_name ]['perm_bits'][ $_bit ]['name'] = $_bit;\n\t\t\t\t\t\t\t$master[ $_name ]['perm_bits'][ $_bit ]['langstring'] = $lang[ $master[ $_name ]['perm_main'].':'.$master[ $_name ]['perm_child'].':'.$_bit ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t\n\t\tclosedir($handle); \n\t\t\n\t\treturn $master;\n\t}", "public function oscar_shortcodes($atts)\r\n {\r\n require_once plugin_dir_path( __FILE__ ) . 'inc/shortcodes.php';\r\n $oscar_minc_shortcodes = new Oscar_Minc_Shortcodes();\r\n }", "private function loadURLs()\r\n\t{\r\n\t\t$status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\t\tforeach ($this->_url as $scriptname => $modes)\r\n\t\t{\r\n\t\t\t$this->url[$scriptname] = $modes[$status];\r\n\t\t}\r\n\t}", "protected function initShortcutGroups() {}", "function admin_shortcodes_page(){\n add_menu_page( \n __( 'Theme Short Codes', 'textdomain' ),\n 'Short Codes',\n 'manage_options',\n 'shortcodes',\n 'shortcodes_page',\n 'dashicons-book-alt',\n 3\n ); \n}", "function admin_shortcodes_page(){\n add_menu_page( \n __( 'Theme Short Codes', 'textdomain' ),\n 'Short Codes',\n 'manage_options',\n 'shortcodes',\n 'shortcodes_page',\n 'dashicons-book-alt',\n 3\n ); \n}", "function admin_shortcodes_page(){\n add_menu_page( \n __( 'Theme Short Codes', 'textdomain' ),\n 'Short Codes',\n 'manage_options',\n 'shortcodes',\n 'shortcodes_page',\n 'dashicons-book-alt',\n 3\n ); \n}", "private function loadDictionaries()\n {\n if (null !== $this->words) {\n // Dictionaries already loaded\n return;\n }\n\n $this->words = array();\n\n $dictionaryFiles = glob($this->dictionaryDir . '/*');\n\n foreach ($dictionaryFiles as $dictionaryFile) {\n $fileName = substr($dictionaryFile, strlen($this->dictionaryDir) + 1);\n\n preg_match('/^(.+)\\./', $fileName, $parts);\n $lang = $parts[1];\n\n $words = include $dictionaryFile;\n\n foreach ($words as $word) {\n if (!isset($this->words[$word])) {\n $this->words[$word] = array();\n }\n\n if (!in_array($lang, $this->words[$word])) {\n $this->words[$word][] = $lang;\n }\n }\n }\n }", "function mainlib_magellan_all_library_services_shortcode() {\n //Make sure we have the proper css included\n wp_enqueue_style(\"magellan\", plugin_dir_url(__FILE__).\"/css/magellan.css\");\n\n //Start output buffering\n ob_start();\n\n //include the template\n include('templates/all-library-services-shortcode.php');\n\n //Get the output\n $content = ob_get_contents();\n ob_end_clean();\n\n $content = apply_filters(\"magellan_after_service_list\", $content);\n return $content;\n}", "function LoadScripts()\n{\n // Affordability\n $affordabilityFilterVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/AffordabilityFilter.js'));\n wp_enqueue_script('AffordabilityFilter', plugins_url('src/AffordabilityFilter.js', __FILE__), array(), $affordabilityFilterVersion);\n\n // Autocomplete\n $autocompleteVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/Autocomplete.js'));\n wp_enqueue_script('Autocomplete', plugins_url('src/Autocomplete.js', __FILE__), array(), $autocompleteVersion);\n\n // Controller\n $controllerVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/Controller.js'));\n wp_enqueue_script('Controller', plugins_url('src/Controller.js', __FILE__), array(), $controllerVersion);\n\n // Housing Type Filter\n $housingFilterVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/HousingTypeFilter.js'));\n wp_enqueue_script('HousingTypeFilter', plugins_url('src/HousingTypeFilter.js', __FILE__), array(), $housingFilterVersion);\n\n // Leaflet Functions\n $leafletFunctionsVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/LeafletFunctions.js'));\n wp_enqueue_script('LeafletFunctions', plugins_url('src/LeafletFunctions.js', __FILE__), array(), $leafletFunctionsVersion);\n\n // Model\n $modelVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/Model.js'));\n wp_enqueue_script('Model', plugins_url('src/Model.js', __FILE__), array(), $modelVersion);\n\n // View\n $viewVersion = date(\"ymd-Gis\", filemtime(plugin_dir_path(__FILE__) . 'src/Map/View.js'));\n wp_enqueue_script('View', plugins_url('src/View.js', __FILE__), array(), $viewVersion);\n\n LoadStyles();\n}", "public function register_autoloaded_classes() {\n\t\t$classmap = include( TOOLSET_ADDON_MAPS_PATH . '/application/autoload_classmap.php' );\n\n\t\tdo_action( 'toolset_register_classmap', $classmap );\n\t}" ]
[ "0.7271929", "0.6763691", "0.6754", "0.66796833", "0.66394913", "0.6430661", "0.6366046", "0.6267927", "0.62081766", "0.60144645", "0.58500665", "0.58319", "0.582226", "0.58074117", "0.5796336", "0.5784376", "0.5675476", "0.5624564", "0.5617605", "0.5534536", "0.55253726", "0.5516228", "0.5502716", "0.5493505", "0.5483022", "0.5451554", "0.54193974", "0.5411358", "0.5406469", "0.5403473", "0.5380777", "0.5380777", "0.5363619", "0.5355146", "0.53333193", "0.5306977", "0.52911377", "0.5267145", "0.525761", "0.524339", "0.52423084", "0.5239224", "0.5237453", "0.52227426", "0.52056736", "0.5198865", "0.5197805", "0.51952565", "0.5190189", "0.518433", "0.51747847", "0.515977", "0.5155096", "0.5153471", "0.5146825", "0.514342", "0.51418513", "0.51354235", "0.5128915", "0.51286376", "0.51281273", "0.51226217", "0.51204216", "0.5117592", "0.51166487", "0.51126826", "0.5103945", "0.5098847", "0.5098065", "0.50974476", "0.5093746", "0.5076075", "0.5063254", "0.506092", "0.50476366", "0.5042981", "0.50382364", "0.50373083", "0.5027592", "0.50274515", "0.50255084", "0.5023668", "0.5023575", "0.50228626", "0.5021088", "0.50143933", "0.500835", "0.50057113", "0.49949342", "0.49942726", "0.49927688", "0.49855208", "0.49847248", "0.4983931", "0.4983931", "0.4983931", "0.49742782", "0.49737695", "0.4969887", "0.49566346" ]
0.7326872
0
Loades all widgets by going through all folders that are placed directly in widgets folder and loads load.php file in each. Hooks to flow_elated_after_options_map action
Загружает все виджеты, проходя через все папки, которые находятся напрямую в папке widgets, и загружает файл load.php в каждой. Привязывается к действию flow_elated_after_options_map
function flow_elated_load_widgets() { foreach(glob(ELATED_FRAMEWORK_ROOT_DIR.'/modules/widgets/*/load.php') as $widget_load) { include_once $widget_load; } include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/widgets/lib/widget-loader.php'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aton_qodef_load_widgets() {\n\t\t\n foreach(glob(QODE_FRAMEWORK_ROOT_DIR.'/modules/widgets/*/load.php') as $widget_load) {\n include_once $widget_load;\n }\n\n include_once QODE_FRAMEWORK_MODULES_ROOT_DIR.'/widgets/lib/widget-loader.php';\n }", "function bizz_load_widgets() {\n\tunregister_widget( 'Bizz_Widget_Nav_Menu' );\n\n\t/* Load each widget file. */\n\tlocate_template( 'lib_theme/widgets/widget-slider.php', true );\n\tlocate_template( 'lib_theme/widgets/widget-ads.php', true );\n\tlocate_template( 'lib_theme/widgets/widget-social.php', true );\n\tlocate_template( 'lib_theme/widgets/widget-contact-info.php', true );\n\tlocate_template( 'lib_theme/widgets/widget-nav-menu.php', true );\n\n}", "function jetpack_load_widgets() {\n\t$widgets_include = array();\n\n\tforeach ( Jetpack::glob_php( dirname( __FILE__ ) . '/widgets' ) as $file ) {\n\t\t$widgets_include[] = $file;\n\t}\n\t/**\n\t * Modify which Jetpack Widgets to register.\n\t *\n\t * @module widgets\n\t *\n\t * @since 2.2.1\n\t *\n\t * @param array $widgets_include An array of widgets to be registered.\n\t */\n\t$widgets_include = apply_filters( 'jetpack_widgets_to_include', $widgets_include );\n\n\tforeach( $widgets_include as $include ) {\n\t\tinclude_once $include;\n\t}\n\n\tinclude_once dirname( __FILE__ ) . '/widgets/migrate-to-core/image-widget.php';\n\tinclude_once dirname( __FILE__ ) . '/widgets/migrate-to-core/gallery-widget.php';\n}", "public static function load_widgets() {\r\n\t register_widget('DHL_Widget');\r\n\t}", "private function include_widgets_files() {\n\t\t/*require_once( __DIR__ . '/widgets/hello-world.php' );\n\t\trequire_once( __DIR__ . '/widgets/inline-editing.php' );\n\t\trequire_once( __DIR__ . '/widgets/word-cloud.php' );\n\t\trequire_once( __DIR__ . '/widgets/neon_text_widget.php' );\n\t\trequire_once( __DIR__ . '/widgets/food_widget.php' );*/\n\t\t//require_once( __DIR__ . '/widgets/word-cloud.php' );\n\t\t//require_once( __DIR__ . '/widgets/heading-animated.php' );\n\t\t//require_once( __DIR__ . '/widgets/image-animated.php' );\n\t\t\n\t}", "public function widgets_init() {\n\t\t$this->muddle_an_option();\n\t\t$this->test_view();\n\t}", "public function widgetLoad(){\n $widgets = array();\n foreach(asset_get_plugin('widget') as $widget_id => $widget){\n $settings = $this->widgetLoad_settings($widget_id);\n $widgets[$widget_id] = asset_get_handler('widget', $widget_id, $settings);\n }\n return !empty($widgets) ? $widgets : array();\n }", "function cleanyeti_widgets_init() {\n\n\t$cleanyeti_widgetized_areas = cleanyeti_widgets_array();\n\tforeach ( $cleanyeti_widgetized_areas as $key => $value ) {\n\t\tregister_sidebar( $cleanyeti_widgetized_areas[$key]['args'] );\n\t}\n}", "public function load_widget_config()\n {\n global $g_comp_session;\n\n $l_dao = isys_dashboard_dao::instance($this->m_database_component);\n $l_widgets = [];\n\n $this->set_ajax_url(\n [\n C__GET__AJAX => 1,\n C__GET__AJAX_CALL => 'dashboard'\n ]\n );\n\n // At first we load all available widgets for the dialog-field.\n $l_res = $l_dao->get_data();\n\n while ($l_row = $l_res->get_row())\n {\n $l_classname = 'isys_dashboard_widgets_' . $l_row['isys_widgets__identifier'];\n\n if (class_exists($l_classname))\n {\n $l_widgets[$l_row['isys_widgets__const']] = _L($l_row['isys_widgets__title']);\n } // if\n\n if (!class_exists($l_classname))\n {\n // Use registered class which has been registered by the specified module\n $l_classname = isys_register::factory('widget-register')\n ->get($l_row['isys_widgets__identifier']);\n } // if\n\n if (class_exists($l_classname))\n {\n $l_widgets[$l_row['isys_widgets__const']] = _L($l_row['isys_widgets__title']);\n } // if\n else\n {\n continue;\n } // if\n } // while\n\n // Now we load the selected widgets to display them for manipulation (removing, sorting).\n $l_res = $l_dao->get_widgets_by_user($g_comp_session->get_user_id());\n\n if (count($l_res) > 0)\n {\n while ($l_row = $l_res->get_row())\n {\n if (class_exists('isys_dashboard_widgets_' . $l_row['isys_widgets__identifier']) || isset($l_widgets[$l_row['isys_widgets__const']]))\n {\n // Add widget to selection if class exists or is registered by the module\n $l_widget_list[] = [\n 'row_id' => $l_row['isys_widgets_config__id'],\n 'title' => _L($l_row['isys_widgets__title'])\n ];\n }\n } // while\n }\n else\n {\n // We have defined no dashboard - So we load the default.\n $l_default_res = $l_dao->get_widgets_by_default();\n\n if (count($l_default_res) > 0)\n {\n while ($l_row = $l_default_res->get_row())\n {\n if (class_exists('isys_dashboard_widgets_' . $l_row['isys_widgets__identifier']))\n {\n $l_widget_list[] = [\n 'row_id' => $l_row['isys_widgets__const'],\n 'title' => _L($l_row['isys_widgets__title'])\n ];\n }\n } // while\n } // if\n } // if\n\n $l_ajax_url = isys_helper_link::create_url($this->get_ajax_url() + ['func' => 'save_dashboard_config']);\n $l_define_default_ajax_url = isys_helper_link::create_url($this->get_ajax_url() + ['func' => 'define_dashboard_default']);\n $l_overwrite_dashboard_ajax_url = isys_helper_link::create_url($this->get_ajax_url() + ['func' => 'overwrite_user_dashboard']);\n\n return $this->m_tpl->activate_editmode()\n ->assign('title', _L('LC__MODULE__DASHBOARD__WIDGET_CONFIGURATION__TITLE'))\n ->assign('description', _L('LC__MODULE__DASHBOARD__WIDGET_CONFIGURATION__TITLE_DESCRIPTION'))\n ->assign('widget_selection', serialize($l_widgets))\n ->assign('widget_list', $l_widget_list)\n ->assign('ajax_url', $l_ajax_url)\n ->assign('define_default_ajax_url', $l_define_default_ajax_url)\n ->assign('overwrite_dashboard_ajax_url', $l_overwrite_dashboard_ajax_url)\n ->assign(\n 'is_allowed_to_administrate_dashboard',\n isys_auth_dashboard::instance()\n ->is_allowed_to(isys_auth::SUPERVISOR, 'CONFIGURE_OTHER_DASHBOARDS')\n )\n ->fetch(isys_module_dashboard::get_tpl_dir() . 'widget-config.tpl');\n }", "public function widgets_registered() {\n if( defined('ELEMENTOR_PATH') && class_exists('Elementor\\Widget_Base') ){\n $path = <%= plugin_prefix %>_PLUGIN_PLUGIN_PATH.'modules/*/widgets';\n $module_name = glob($path.'/widget-*.php');\n foreach ( $module_name as $widget ) {\n require_once( $widget );\n }\n }\n }", "public function load_widgets_modules(){\n\t\tif ( class_exists( 'FLBuilder' ) ) {\n\t\t\trequire_once 'modules/pricing-table/pricing-table.php';\n\t\t\trequire_once 'modules/services/services.php';\n\t\t\trequire_once 'modules/post-grid/post-grid.php';\n\t\t}\n\t}", "static function initLoadedWidgets() {\n if(isset($_GET['loaded_widgets']) && $_GET['loaded_widgets']) {\n $loaded_widgets = explode(',', $_GET['loaded_widgets']);\n\n if(count($loaded_widgets)) {\n self::$loaded_widgets = $loaded_widgets;\n } // if\n } // if\n }", "public function loadWidget()\n {\n $data = (object)array();\n $data->ad_types = $this->loadWinterAdTypes();\n $data->page = get_option('daft_results_page_id');\n include_once dirname( __FILE__ ) . '/winter_view.php'; \n }", "public function setWidgets() {\n\t\t/*\n\t\t * $widgets = unserialize($this->o_control->o_config->getParam('widgets'));\n\t\t * if(is_array($widgets))\n\t\t * {\n\t\t * foreach ($widgets as $value)\n\t\t * {\n\t\t * $o_widget = new stdClass();\n\t\t * $path = \"sistema/widgets/\".$value.\".php\";\n\t\t * if(file_exists($path))\n\t\t * {\n\t\t * var_dump($this);\n\t\t * $o_widget->name = $value;\n\t\t * $o_widget->view = $path;\n\t\t * ob_start();\n\t\t * require_once $o_widget->view;\n\t\t * $o_widget->stream = ob_get_clean();\n\t\t * $this->v_widgets[$o_widget->name] = $o_widget;\n\t\t * }\n\t\t * else\n\t\t * throw new DException('arquivo '.$value.' não encontrado');\n\t\t *\n\t\t * }\n\t\t * }\n\t\t */\n\t}", "function cms_load_widget_admin()\n {\n // get list widget admin status = 1\n $listWidget = Cache::remember('list_widget_admin', 30, function () {\n return AdminWidget::where('status', 1)->get();\n });\n\n if ($listWidget) {\n foreach ($listWidget as $widget) {\n $widget['config'] = json_decode($widget['config'] ? $widget['config'] : '[]', true);\n // add widget to group\n Widget::group($widget['group'])->position($widget['order'])->addWidget($widget['module'] . '::' . $widget['name'], $widget);\n }\n }\n }", "function loadWidgets() {\n $edit = $_POST[\"edit\"];\n $pageName = $_POST[\"pageName\"];\n\n $page = getPage($pageName);\n $widgets = $page->widgets;\n\n $smallHeight = 475;\n $tallHeight = $smallHeight * 2;\n\n if ($page->getLayoutAsString() == \"1\") {\n ?>\n <div class=\"row\" style=\"height: <?=$tallHeight?>px\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 1, $tallHeight); ?>\n </div>\n </div>\n <?php\n }\n\n else if ($page->getLayoutAsString() == \"2-horizontal\") {\n ?>\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 1, $smallHeight); ?>\n </div>\n </div>\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 2, $smallHeight); ?>\n </div>\n </div>\n <?php\n }\n\n else if ($page->getLayoutAsString() == \"2-vertical\") {\n ?>\n <div class=\"row\" style=\"height: <?=$tallHeight?>px;\">\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 1, $tallHeight); ?>\n </div>\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 2, $tallHeight); ?>\n </div>\n </div>\n <?php\n }\n\n else if ($page->getLayoutAsString() == \"1-2\") {\n ?>\n <div class=\"row\" style=\"height: <?=$tallHeight?>px;\">\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 1, $tallHeight); ?>\n </div>\n <div class=\"col-6\">\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 2, $smallHeight); ?>\n </div>\n </div>\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 3, $smallHeight); ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }\n\n else if ($page->getLayoutAsString() == \"2-1\") {\n ?>\n <div class=\"row\" style=\"height: <?=$tallHeight?>px\">\n <div class=\"col-6\">\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 1, $smallHeight); ?>\n </div>\n </div>\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-12\">\n <? insertWidgetContainer($widgets, 2, $smallHeight); ?>\n </div>\n </div>\n </div>\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 3, $tallHeight); ?>\n </div>\n </div>\n <?php\n }\n\n else if ($page->getLayoutAsString() == \"4\") {\n ?>\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 1, $smallHeight); ?>\n </div>\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 2, $smallHeight); ?>\n </div>\n </div>\n <div class=\"row\" style=\"height: <?=$smallHeight?>px;\">\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 3, $smallHeight); ?>\n </div>\n <div class=\"col-6\">\n <? insertWidgetContainer($widgets, 4, $smallHeight); ?>\n </div>\n </div>\n <?php\n }\n\n ?>\n <input id=\"pageLayoutHiddenInput\" type=\"hidden\" name=\"pageLayout\" value=\"<?= $page->getLayoutAsString(); ?>\">\n <?php\n}", "public function widgets_init() {\n // Setup and filter the theme widgets\n $widgets = VF_Theme::apply_filters('vf/widgets/unregister', array());\n if (is_array($widgets)) {\n foreach ($widgets as $name) {\n if (is_string($name)) {\n unregister_widget($name);\n }\n }\n }\n // Setup and filter the theme sidebars\n $sidebars = VF_Theme::apply_filters('vf/widgets/sidebars', array());\n if (is_array($sidebars)) {\n foreach ($sidebars as $sidebar) {\n if (is_array($sidebar)) {\n register_sidebar($sidebar);\n }\n }\n }\n }", "function wp_maybe_load_widgets()\n{\n}", "private function include_widgets_files() {\n\t\trequire_once 'widgets/class-toggle-translator.php';\n\t}", "public function load()\n\t{\n\t\tadd_action('widgets_init', array($this, 'register_widget'));\n\t\tadd_action('init', array($this, 'load_assets'));\n\t}", "private function include_widgets_files()\n\t{\n\t\trequire_once(__DIR__ . '/widgets/online-express.php');\n\t\trequire_once(__DIR__ . '/widgets/iats.php');\n\t}", "public function render_widgets() {\n\t\t\tinclude $this->find_html_file( 'widgets.php' );\n\t\t}", "function alw_load_widget() {\n\tregister_widget( 'alw_widget' );\n}", "public function hooks() {\n\t\t$this->loader->add_action( 'wp_dashboard_setup', $this, 'add_dashboard_widgets' );\n\t}", "function init_widget(){\n require_once(__DIR__.'/inc/widgets/UsersWidget.php');\n\n // Initiate WP phpBB Bridge widget\n add_action(\n 'widgets_init',\n array('\\wpphpbbu\\widgets\\UsersWidget','register')\n );\n\n // Load WP phpBB Links widget\n require_once(__DIR__.'/inc/widgets/LinksWidget.php');\n\n // Initiate WP phpBB Links widget\n add_action(\n 'widgets_init',\n array('\\wpphpbbu\\widgets\\LinksWidget','register')\n );\n\n // Load WP phpBB Meta widget\n require_once(__DIR__.'/inc/widgets/MetaWidget.php');\n\n // Initiate WP phpBB Meta widget\n add_action(\n 'widgets_init',\n array('\\wpphpbbu\\widgets\\MetaWidget','register')\n );\n\n // Load WP phpBB Topics widget\n require_once(__DIR__.'/inc/widgets/TopicsWidget.php');\n\n // Initiate WP phpBB Topics widget\n add_action(\n 'widgets_init',\n array('\\wpphpbbu\\widgets\\TopicsWidget','register')\n );\n\t}", "public function register_widgets() {\n // Its is now safe to include Widgets files\n $client=is_admin()?1:0;\n $wordpress=Factory::getOpenSource();\n $list_block_front_end=$wordpress->get_list_layout_block_frontend();\n\n foreach($list_block_front_end as $key=> $block){\n $file_widget=WPBOOKINGPRO_ROOT_PATH_PLUGIN.\"/blocks/block_$key/{$key}Widget.php\";\n if(file_exists($file_widget)) {\n require_once $file_widget;\n $class_block_widget = \"{$key}Widget\";\n \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type(new $class_block_widget());\n }\n\n }\n }", "function genesis_extender_require_custom_widget_areas_register_file()\n{\n\tif( defined( 'PARENT_THEME_NAME' ) && PARENT_THEME_NAME == 'Genesis' && file_exists( genesis_extender_get_custom_widget_areas_register_path() ) )\n\t\trequire_once( genesis_extender_get_custom_widget_areas_register_path() );\n}", "function example_load_widgets(){\n\tregister_widget('Example_Widget');\n}", "function flow_elated_load_widget_class(){\n\t\tinclude_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/widgets/lib/widget-class.php';\n\t}", "public function load_widget() {\n\t\t// Remove Genesis Twiter Widget\n\t\tunregister_widget( 'Genesis_Latest_Tweets_Widget' );\n\t\n\t\trequire_once( GENESIS_TWITTER_DIR . '/includes/functions.php' );\n\t\trequire_once( GENESIS_TWITTER_DIR . '/includes/latest-tweets-widget.php' );\n\t\tregister_widget( 'GLTW_Latest_Tweets_Widget' );\n\t}", "function wbtt_widgets_init() {\n if ( function_exists('register_sidebars') ) {\n add_filter( 'thematic_widgetized_areas', 'wbtt_sort_all_widgetized_areas' );\n }\n}", "function wpb_load_widget() {\n\tregister_widget( 'fss_archive_widget' );\n}", "function aton_qodef_load_shortcodes() {\n foreach(glob(QODE_FRAMEWORK_ROOT_DIR.'/modules/shortcodes/*/load.php') as $shortcode_load) {\n include_once $shortcode_load;\n }\n\n do_action('aton_qodef_shortcode_loader');\n }", "function flyrbord_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer',\n\t\t'id' => 'footer',\n\t\t'before_widget' => '<div class=\"footer-widget col-sm-12 center-block\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n register_sidebar( array(\n 'name' => 'Blog Sidebar',\n 'id' => 'blog_sidebar',\n 'before_widget' => '<div class=\"col-sm-12 blog-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Shop Sidebar',\n 'id' => 'shop_sidebar',\n 'before_widget' => '<div class=\"col-sm-4 shop-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "function ntas_load_widgets() {\r\n\tregister_widget( 'NTAS_Widget' );\r\n}", "function theme_widgets_init() {\r\n // Area 1\r\n register_sidebar( array (\r\n 'name' => 'Primary Widget Area',\r\n 'id' => 'primary_widget_area',\r\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget-container %2$s\"><div class=\"paperclip\"></div>',\r\n 'after_widget' => \"</aside>\",\r\n 'before_title' => '<h4>',\r\n 'after_title' => '</h4>',\r\n ) );\r\n register_sidebar( array (\r\n 'name' => 'Secondary Widget Area',\r\n 'id' => 'sidebar_widget_area',\r\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget-container %2$s\"><div class=\"paperclip\"></div>',\r\n 'after_widget' => \"</aside>\",\r\n ) );\r\n register_sidebar( array (\r\n 'name' => 'Tertiary Widget',\r\n 'id' => 'sidebar_weather',\r\n ) );\r\n register_sidebar( array (\r\n 'name' => 'Latest Post',\r\n 'id' => 'latest_post',\r\n ) );\r\n register_sidebar( array (\r\n 'name' => 'Latest Comment',\r\n 'id' => 'latest_comment',\r\n ) );\r\n}", "function codeless_load_widgets() {\n require_once get_template_directory().'/includes/widgets/codeless_flickr.php';\n require_once get_template_directory().'/includes/widgets/codeless_mostpopular.php';\n require_once get_template_directory().'/includes/widgets/codeless_shortcodewidget.php';\n require_once get_template_directory().'/includes/widgets/codeless_socialwidget.php';\n require_once get_template_directory().'/includes/widgets/codeless_twitter.php';\n require_once get_template_directory().'/includes/widgets/codeless_ads.php';\n}", "function sukelius_load_widgets() {\r\n \t\r\n /* Load popular posts widget. */\r\n\trequire_once( trailingslashit( get_template_directory() ) . 'admin/widget-popular-posts.php' );\r\n\tregister_widget( 'Sukelius_Widget_Posts' );\r\n}", "protected function loadWidgetContexts() {}", "private function executeWidgets(Array $widgets = null,$layout = null) {\r\n \t\r\n \tif(is_null($widgets)) {\r\n \t\t$widgets = $this->widgets;\r\n \t}\r\n \t\r\n\t$max = $this->maxwidth-22;\r\n\t\r\n\tforeach($widgets as $module => $entries) {\r\n\t\t\r\n\t\t$ajax = ($module != \"pages\");\r\n\t\t$widgetprocessing = ($ajax && $this->getFirstModule() == $module);\r\n\t\t\r\n\t\tif(!$ajax) {\r\n\t\t\t$this->printSubHeader(true);\t\r\n\t\t} else if($widgetprocessing === true) {\r\n\t\t\t$this->printSubHeader();\r\n\t\t\t$this->widgetprocessing = true;\r\n\t\t}\r\n\t\t\r\n\t\tforeach($entries as $k => $widget) {\r\n\t\t\t\r\n\t\t\t$print = false;\r\n\t\t\t$entry = $module.\"/\".$widget;\r\n\t\t\t\r\n\t\t\t$uri = \"/\".$entry.(($this->config->params) ? (\"?\".urlencode($this->config->params)) : \"?\");\r\n\t \t\t\r\n\t \t\tif($ajax) {\r\n\t \t\t\t$orig_uri = $uri;\r\n\t \t\t\t$orig_uri .= \"widget_load=true\";\r\n\t \t\t\t$uri .= \"&af_format=json\";\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t$uris = ($this->widgetprocessing) ? array($uri,$orig_uri) : array($uri);\r\n\t \t\r\n\t \t\tforeach($uris as $uindex => $uri) {\r\n\t\t \t\r\n\t \t\t\t$this->browser->get($this->config->url.$uri);\r\n\t\t \t\t//echo $this->browser->getResponseBody();\r\n\t\t \t\t/*if($ajax) {\r\n\t\t \t\t\techo $this->browser->getResponseBody();\r\n\t\t \t\texit;\t\r\n\t\t \t\t}\r\n\t\t \t\t*/\r\n\t\t \t\t$this->browser->checkForAuthenticationError();\r\n\t\t\t\t// file_put_contents(\"./foo/\".$widget, $this->browser->getResponseBody());\r\n\t\t \t\t$execTimeNumber = $this->browser->getTotalTime(true);\r\n\t\t \t\t$execTime = $this->browser->getTotalTime();\r\n\t\t \t\t$valid = $this->browser->isValidRequest($ajax);\r\n\t\r\n\t\t \t\t$status = $this->browser->getStatusCode();\r\n\t\t \t\t$size = $this->browser->getResponseSize();\r\n\t\t \t\t$speed = $this->browser->getDownloadSpeed();\r\n\t\t \t\t\r\n\t\t \t\t$serverTimeNumber = $this->browser->getServerTime(true);\r\n\t \t\t\t$serverTime = $this->browser->getServerTime();\r\n\t \t\t\t$transferTimeNumber = $this->browser->getTransferTime(true);\r\n\t \t\t\t$transferTime = $this->browser->getTransferTime();\r\n\t \t\t\t$connectTimeNumber = $this->browser->getConnectTime(true);\r\n\t \t\t\t$connectTime = $this->browser->getConnectTime();\r\n\t\t \t\r\n\t $csize = preg_replace(\"/[^0-9.]+/\",\"\",$size);\r\n\t\t \t\t\r\n\t if($this->config->profiling) {\r\n\t\t $token = $this->browser->getXDebugTokenHeaderValue();\r\n\t $requestProfiler = $this->profiler->loadFromToken($token);\r\n\t \r\n\t if(!$requestProfiler->isEmpty()) {\r\n\t \t$widgetDataCollector = $requestProfiler->get('widget');\r\n\t \t$actionTimeNumber = $widgetDataCollector->getActionTime();\r\n\t \t$actionTime = $actionTimeNumber.$this->config->time_unit;\r\n\t \t$propelDataCollector = $requestProfiler->get('propel');\r\n\t \t$renderTimeNumber = $widgetDataCollector->getRenderTime();\r\n\t \t$renderTime = $renderTimeNumber.$this->config->time_unit;\r\n\t \t$dbCount = $propelDataCollector->getQueriesCount();\r\n\t $dbTime = $propelDataCollector->getTotalQueriesTime();\r\n\t $readTimeNumber = $widgetDataCollector->getReadTime();\r\n\t \r\n\t if ($dbTime != '') {\r\n\t $dbCount .= \" ({$dbTime}ms)\";\r\n\t }\r\n\t \r\n\t } else {\r\n\t \t$actionTime = $renderTime = $dbCount = \"-\";\r\n\t \tif($valid == \"true\") {\r\n\t \t\t--$this->totals[$valid];\r\n\t \t\t++$this->totals[\"false\"];\r\n\t \t\t++$this->totals[\"noprofile\"];\r\n\t \t\t$valid = \"false\";\r\n\t \t}\r\n\t }\t\r\n\t } else {\r\n\t \t$renderTimeNumber = $actionTimeNumber = $serverTimeNumber = $readTimeNumber = $transferTimeNumber = \r\n\t \t$connectTimeNumber = $dbCount = $dbTime = 0;\r\n\t }\r\n \r\n \r\n\t \r\n if($ajax && !$print && (($layout && $widget == $this->getLastWidget($widgets)) ||\r\n ($this->widgetprocessing && $uindex == 1))) {\r\n \t\r\n \t$print = true;\r\n \t\r\n \t//echo $readTimeNumber.\"\\n\";\r\n \t\r\n \tpreg_match(\"/([0-9]+) \\(([0-9]+)/\",$dbCount,$match);\r\n \t\r\n \tif(!$match) {\r\n \t\t$match = array(0,0,0);\r\n \t}\r\n \t\r\n \t$this->addItemTotal($connectTimeNumber,$actionTimeNumber,$readTimeNumber,$renderTimeNumber,$serverTimeNumber,\r\n \t$transferTimeNumber,$execTimeNumber,$csize,$match[1],$match[2]);\r\n \t\t\r\n \tforeach($this->itemtotals as $key => $value) {\r\n \t\t$number = $key.\"Number\";\r\n \t\t$$key = $$number = $value;\r\n \t\tif(strstr($key,\"Time\")) {\r\n \t\t\t$$key .= $this->config->time_unit;\r\n \t\t}\t\r\n \t\t\r\n \t}\r\n \t\r\n \t$dbCount .= \" (\".$dbTime.\")\";\r\n \t$size = $this->formatNumber($size).$this->config->size_unit;\r\n \t$speed = $this->formatNumber($speed).\"KB/s\";\r\n \t$this->resetItemTotals();\t\r\n\t \r\n \tif($this->widgetprocessing) {\r\n \t\t\t\r\n \t\tif($this->itemtotals[\"status\"] === 0 || $status != 200) {\r\n \t\t\t$this->itemtotals[\"status\"] = $status;\t\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t\t$this->itemtotals[\"valid\"] = $valid;\t\r\n \t\t\r\n \t\tif(str_replace($this->config->time_unit, \"\", $execTimeNumber) > $this->config->limit && $ajax) {\r\n\t \t\t\t\t\t\t$this->totals[\"overtime\"][] = $entry;\r\n\t \t\t\t\t\t} \t\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t$type = \"widget\";\r\n\t\t\t \t\t\t++$this->totals[\"widgets\"];\r\n \t\t\r\n \t} else {\r\n \t\t\r\n \t\t$type = \"layout\";\r\n\t\t\t \t\t\t++$this->totals[\"layouts\"];\r\n \t}\t\r\n\t\t \t\t\t\r\n\t\t \t\t\t$this->totals[\"connecttime\"] += $connectTimeNumber;\r\n\t\t\t \t\t$this->totals[$type.\"totaltime\"] += $execTimeNumber;\r\n\t\t\t \t\t$this->totals[$type.\"rendertime\"] += $renderTimeNumber;\r\n\t\t\t $this->totals[$type.\"actiontime\"] += $actionTimeNumber;\r\n\t\t\t $this->totals[$type.\"servertime\"] += $serverTimeNumber;\r\n\t\t\t $this->totals[$type.\"transfertime\"] += $transferTimeNumber;\r\n\t\t\t $this->totals[$type.\"readtime\"] += $readTimeNumber;\r\n \t\r\n\t\t\t $this->totals[$status][] = $this->browser->getStatusMessage($status);\r\n\t\t\t \r\n\t\t\t ++$this->totals[$valid];\r\n \t\r\n }\r\n\t \r\n if($ajax && $print) {\r\n \t\r\n \tif(!$this->config->profiling) {\r\n \t\t$this->logBlock(\r\n\t \t$entry.str_repeat(\" \",$max - (strlen($entry)-6)).\r\n\t str_pad($status, 6, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($valid, 7, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($execTime, 9, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($size, 10, ' ', STR_PAD_LEFT),\r\n \t($valid === \"true\") ? null : \"ERROR\"\r\n \t\t);\r\n \r\n \t} else {\r\n \t\t$this->logBlock(\r\n\t \t$entry.str_repeat(\" \",$max - (strlen($entry)-6)).\r\n\t str_pad($status, 6, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($valid, 7, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($connectTime, 11, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($actionTime, 10, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($readTime, 8, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($renderTime, 10, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($serverTime, 10, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($transferTime, 12, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($execTime, 9, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($dbCount, 12, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($speed, 12, ' ', STR_PAD_LEFT).\r\n\t ' '.\r\n\t str_pad($size, 10, ' ', STR_PAD_LEFT),\r\n\t ($valid === \"true\") ? null : \"ERROR\"\r\n\t \t);\t\r\n \t}\r\n \t\t\t\t\t \t\r\n } else {\r\n \r\n \tpreg_match(\"/([0-9]+) \\(([0-9]+)/\",$dbCount,$match);\r\n \t\r\n \tif(!$match) {\r\n \t\t$match = array(0,0,0);\r\n \t}\r\n \t\r\n \t//echo $readTimeNumber.\"\\n\";\r\n \t\r\n \t$this->addItemTotal($connectTimeNumber,$actionTimeNumber,$readTimeNumber,$renderTimeNumber,$serverTimeNumber,\r\n \t$transferTimeNumber,$execTimeNumber,$csize,$match[1],$match[2]);\r\n \t\r\n\t\t\t if(!$ajax || ($this->widgetprocessing && $uindex == 0)) {\r\n\t\t\t \t$this->itemtotals[\"valid\"] = $valid;\r\n\t\t\t \t$this->itemtotals[\"entry\"] = $entry;\r\n\t\t\t \t$this->itemtotals[\"status\"] = $status;\r\n\t\t\t \t$this->itemtotals[\"speed\"] = sprintf(\"%1.2f%s\",$speed,$this->config->size_unit.\"/s\");\r\n\t\t\t } \r\n\t\t\t \r\n } \r\n\t \t\t\r\n\t \t\t}\r\n\t \t\t\r\n\t\t\tif(!$ajax) {\r\n\t\t\t\t$this->executeWidgets($this->extractWidgetsFromLayout($this->layoutdir.\"/\".$widget.\".xml\"),$entry);\r\n\t\t \t}\r\n\t \t}\r\n\t }\r\n }", "public static function load() {\n\t\tadd_action( 'init', array( __CLASS__, 'init' ) );\n\t\tadd_action( 'widgets_init', array( __CLASS__, 'register_widget' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_scripts' ) );\n\t\tadd_action( 'admin_head-widgets.php', array( __CLASS__, 'admin_head_widgets' ) );\n\t\tadd_action( 'admin_footer-widgets.php', array( __CLASS__, 'admin_footer_widgets' ) );\n\t}", "function selz_widgets_init() {\n\trequire_once( SELZ_DIR . 'widget.php' );\n\tregister_widget( 'Selz_Widget' );\n}", "private function include_widgets_files() {\n\t\trequire_once( __DIR__ . '/widgets/custom-slider.php' );\n\t}", "function roots_widgets_init() {\n // Sidebars\n register_sidebar(array(\n 'name' => __('Primary', 'roots'),\n 'id' => 'sidebar-primary',\n 'before_widget' => '<section class=\"widget %1$s %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ));\n\n register_sidebar(array(\n 'name' => __('Footer', 'roots'),\n 'id' => 'sidebar-footer',\n 'before_widget' => '<section class=\"widget %1$s %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ));\n\n register_sidebar(array(\n 'name' => __('Customer Area Sidebar - Account', 'roots'),\n 'id' => 'customer-account-sidebar',\n 'before_widget' => '<section class=\"widget %1$s %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ));\n\n // Widgets\n register_widget('Roots_Vcard_Widget');\n register_widget('WP_Pills_Nav_Menu_Widget');\n}", "function theme_widgets_init() {\n\t // Area 1\n\t register_sidebar( array (\n\t 'name' => 'Primary Widget Area',\n\t 'id' => 'primary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t // Area 2\n\t register_sidebar( array (\n\t 'name' => 'Secondary Widget Area',\n\t 'id' => 'secondary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t // Area 2\n\t register_sidebar( array (\n\t 'name' => 'Third Widget Area',\n\t 'id' => 'third_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t // Area 2\n\t register_sidebar( array (\n\t 'name' => 'Fourth Widget Area',\n\t 'id' => 'fourth_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t}", "function aw_load_widget() {\r\n\t\tregister_widget( 'SI_Widget' );\r\n\t}", "function socialinks_load_widgets() {\r\n\r\n\t/* Load widget file. */\r\n\trequire_once( SOCIALINKS_WIDGET_DIR . 'widget.php' );\r\n\r\n\t/* Register widget. */\r\n\tregister_widget( 'Socialink_Widget' );\r\n}", "function aton_qodef_load_widget_class(){\n\t\tinclude_once QODE_FRAMEWORK_MODULES_ROOT_DIR.'/widgets/lib/widget-class.php';\n\t}", "function reach_widgets_init() {\n register_sidebar(\n array(\n 'name' => __( 'Reach Call to Action ', 'be-themes' ),\n 'id' => 'reach-bottom-cta',\n 'description' => __( 'Widget area below Content', 'be-themes' ),\n 'before_widget' => '<div class=\"%2$s widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h6>',\n 'after_title' => '</h6>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __( 'Reach Footer ', 'be-themes' ),\n 'id' => 'reach-above-footer',\n 'description' => __( 'Widget area (at top of footer)', 'be-themes' ),\n 'before_widget' => '<div class=\"%2$s widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h6>',\n 'after_title' => '</h6>',\n )\n );\n }", "function genesis_extender_require_custom_widget_areas_file()\n{\n\tif( !is_admin() && file_exists( genesis_extender_get_custom_widget_areas_path() ) )\n\t\trequire_once( genesis_extender_get_custom_widget_areas_path() );\n}", "function wphierarchy_widgets_init() {\n\t\t\t$widgets = array( \n\t\t\t\t'sidebar-1'\t\t\t=> __( 'Right Sidebar', 'wphierarchy' ),\n\t\t\t\t'sidebar-2'\t\t\t=> __( 'Left Sidebar', 'wphierarchy' ),\n\t\t\t\t'header'\t\t\t\t=> __( 'Header Sidebar', 'wphierarchy' ),\n\t\t\t\t'footer-1'\t\t\t=> __( 'Footer Sidebar Left', 'wphierarchy' ),\n\t\t\t\t'footer-2'\t\t\t=> __( 'Footer Sidebar Right', 'wphierarchy' ),\n\t\t\t\t'footer-3'\t\t\t=> __( 'Footer Sidebar Center', 'wphierarchy' ),\n\t\t\t);\n\n\t\tforeach ( $widgets as $id => $name ) {\n\t\t\t/**\n\t\t\t * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar\n\t\t\t * recommended to register sidebar individually (e.g., not register_sidebars)\n\t\t\t */\n\t\t\tregister_sidebar( array(\n\t\t\t\t'name'\t\t\t\t\t\t\t=> $name,\n\t\t\t\t'id'\t\t\t\t\t\t\t\t=> $id,\n\t\t\t\t'description'\t\t\t\t=> __( 'Add widgets for main sidebar here.', 'wphierarchy' ),\n\t\t\t\t'before_widget'\t\t\t=> '<aside id=\"%1$s\" class=\"widget inner-padding %2$s\">',\n\t\t\t\t'after_widget'\t\t\t=> '</aside>',\n\t\t\t\t'before_title'\t\t\t=> '<h2 class=\"widget-title\">',\n\t\t\t\t'after_title'\t\t\t\t=> '</h2>',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function hostedftp_load_widgets() {\r\n\tregister_widget( 'Hosted_FTP_Widget' );\r\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Instagram Area',\n 'id' => 'instagram_area',\n ) );\n\n register_sidebar( array(\n 'name' => 'Twitter Area',\n 'id' => 'twitter_area',\n ) );\n}", "function ava_bb_load_templates() {\n\n\tif ( ! class_exists( 'FLBuilder' ) || ! method_exists( 'FLBuilder', 'register_templates' ) ) {\n\t\treturn;\n\t}\n\n\tFLBuilder::register_templates( get_parent_theme_file_path( '/fl-builder/templates.dat' ) );\n}", "function ehc_register_widget_areas() {\n\t$widgets_areas = array(\n\t\tarray(\n\t\t\t'name' => __( 'Header Right', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'header-right-widget',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the widget area for the right of the header.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Home Left', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'home-left-widget',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the left widget area for the Home page.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Home Center', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'home-center-widget',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the center widget area for the Home page.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Home Right', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'home-right-widget',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the right widget area for the Home page.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Footer Widget 1', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'footer-widget-1',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the widget area for footer widget 1.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Footer Widget 2', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'footer-widget-2',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the widget area for footer widget 3.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Footer Widget 3', CHILD_TEXT_DOMAIN ),\n\t\t\t'id' => 'footer-widget-3',\n\t\t\t'beans_type' => 'grid',\n\t\t\t'description' => __( 'This is the widget area for footer widget 3.', CHILD_TEXT_DOMAIN )\n\t\t),\n\t);\n\n\tforeach ( $widgets_areas as $widget_area ) {\n\t\tbeans_register_widget_area( $widget_area );\n\t}\n}", "public function run()\n {\n $dirWidgets = app_path().'/'.config('newportal.widgets.namespace').'/';\n DB::table('widgets')->delete();\n if (is_dir($dirWidgets)) {\n foreach (File::allFiles($dirWidgets) as $file) {\n $pathFile = (string)$file;\n if (class_basename($pathFile)==\"config.php\") {\n foreach (File::getRequire($pathFile)['widgets'] as $init=>$widget) {\n $widget['init'] = $init;\n $widget['type_id'] = $widget['type'];\n unset($widget['type']);\n Widget::create($widget);\n }\n }\n }\n }\n }", "function widgetsInit() {\r\n register_sidebar( array(\r\n\t\t'name' => 'Grupo 1',\r\n\t\t'id' => 'group1',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div class=\"group1\">',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n register_sidebar( array(\r\n\t\t'name' => 'Grupo 2',\r\n\t\t'id' => 'group2',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => 'Contato',\r\n\t\t'id' => 'contact-info',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n register_sidebar( array(\r\n\t\t'name' => 'Redes Sociais',\r\n\t\t'id' => 'social-media',\r\n\t\t'before_widget' => '<div>',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h2>',\r\n\t\t'after_title' => '</h2>',\r\n\t) );\r\n}", "public function load_customize_controls() {\n\n\t\t$files[] = 'control-editor.php';\n\t\t// $files[] = 'control-layout-picker.php';\n\t\t// $files[] = 'control-multiple-checkboxes.php';\n\t\t// $files[] = 'control-select-category.php';\n\t\t// $files[] = 'control-select-menu.php';\n\t\t// $files[] = 'control-select-post.php';\n\t\t// $files[] = 'control-select-post-type.php';\n\t\t// //$files[] = 'control-select-recent-post.php';\n\t\t// $files[] = 'control-select-tag.php';\n\t\t// $files[] = 'control-select-taxonomy.php';\n\t\t// $files[] = 'control-select-user.php';\n\n\t\tforeach ( $files as $file ) {\n\n\t\t\trequire_once( trailingslashit( get_stylesheet_directory() ) . 'inc/controls/' . $file );\n\n\t\t}\n\n\t}", "function hook_widgets_init() {\n\t\tregister_widget( 'empathy_Widget_Emotions' );\n\t\tregister_widget( 'empathy_Widget_SiteEmotion' );\n\t\tregister_widget( 'empathy_Widget_EmotionCloud' );\n\t}", "function kleo_geodir_init(){\r\n\r\n // Main wrapper open / close\r\n remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10);\r\n add_action('geodir_wrapper_open', 'kleo_geodir_action_wrapper_open', 9);\r\n remove_action('geodir_wrapper_close', 'geodir_action_wrapper_close', 10);\r\n add_action('geodir_wrapper_close', 'kleo_geodir_action_wrapper_close', 9);\r\n\r\n // Remove GeoDirectory home page breadcrumbs\r\n remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);\r\n remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);\r\n\r\n // Remove GeoDirectory listing page title and breadcrumbs\r\n remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);\r\n remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);\r\n\r\n // Remove GeoDirectory details page title and breadcrumbs\r\n remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);\r\n remove_action('geodir_details_main_content', 'geodir_action_page_title', 20);\r\n\r\n // Remove GeoDirectory search page title and breadcrumbs\r\n remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);\r\n remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);\r\n\r\n // Remove GeoDirectory author page title and breadcrumbs\r\n remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);\r\n remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);\r\n\r\n remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10);\r\n\r\n}", "public function admin_init() {\n\t\t\tglobal $pagenow;\n\t\t\tif ( 'widgets.php' == $pagenow ) {\n\t\t\t\tadd_action( 'admin_print_scripts', array( $this, 'load' ) );\n\t\t\t\tadd_filter( 'black_studio_tinymce_admin_pointers-widgets', array( $this, 'register' ), 10 );\n\t\t\t\tadd_filter( 'black_studio_tinymce_admin_pointers-widgets', array( $this, 'filter_dismissed' ), 20 );\n\t\t\t}\n\t\t}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'upper-widgets',\n 'id' => 'upper-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n register_sidebar( array(\n 'name' => 'left-sidebar',\n 'id' => 'left-sidebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'right-sidebar',\n 'id' => 'right-sidebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'desktop-widebar',\n 'id' => 'desktop-widebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'desktop-not-widebar',\n 'id' => 'desktop-not-widebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'lower-widgets',\n 'id' => 'lower-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n register_sidebar( array(\n 'name' => 'mobile-upper-widgets',\n 'id' => 'mobile-upper-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n register_sidebar( array(\n 'name' => 'mobile-widebar',\n 'id' => 'mobile-widebar',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'mobile-lower-widgets',\n 'id' => 'mobile-lower-widgets',\n 'before_widget' => '<li class=\"widget\">',\n 'after_widget' => '</li>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n\n/* register_sidebar( array(\n 'name' => 'leftSidebar',\n 'id' => 'leftSidebar',\n 'before_widget' => '<div class=\"sidebarWidget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"widget-title\">',\n 'after_title' => '</div>',\n ) );\n\n register_sidebar( array(\n 'name' => 'mobileBanner',\n 'id' => 'mobileBanner',\n 'before_widget' => '<div class=\"mobileWidget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<p class=\"mobilewidget-title\">',\n 'after_title' => '</div>',\n ) );\n*/\n}", "function adfc2010_widgets_init() {\n\t// Area 1\n\tregister_sidebar( array (\n\t\t'name' => 'Erster Widget-Bereich',\n\t\t'id' => 'primary-widget-area',\n\t\t'description' => 'Der 1. Widget-Bereich, in der linken Sidebar',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => \"</li>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 2\n\tregister_sidebar( array (\n\t\t'name' => 'Zweiter Widget-Bereich',\n\t\t'id' => 'secondary-widget-area',\n\t\t'description' => 'Der 2. Widget-Bereich, in der rechten Sidebar unten',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => \"</li>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\t// Area 3\n\tregister_sidebar( array (\n\t\t'name' => 'Footer Widget Area',\n\t\t'id' => 'footer-widget-area',\n\t\t'description' => 'Der Widget-Bereich im Seitenfuß',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => \"</li>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n/*\n\t// Area 4\n\tregister_sidebar( array (\n\t\t'name' => __( 'Second Footer Widget Area', 'adfc2010' ),\n\t\t'id' => 'second-footer-widget-area',\n\t\t'description' => __( 'The second footer widget area', 'adfc2010' ),\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => \"</li>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n*/\n}", "function anam_widgets_init() {\n \n // Register widget areas\n\n register_sidebar( array(\n\t\t'name' => __( 'Widget Area', 'anam' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'anam' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Home Page Left Side Widgets', 'anam' ),\n\t\t'id' => 'home-page-left-side-widgets',\n\t\t'description' => '',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Home Page Right Side Widgets', 'anam' ),\n\t\t'id' => 'home-page-right-side-widgets',\n\t\t'description' => '',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n\n // Register and load the widget(s)\n \n anam_create_recent_events_widget();\n anam_create_current_events_widget();\n}", "public function get_widgets()\n\t{\n\t\t$areas = $this->db\n\t\t\t\t\t\t->where('theme_id', $this->_theme->id)\n\t\t\t\t\t\t->get($this->_table['widget_areas'])\n\t\t\t\t\t\t->result();\n\n\t\tforeach ($areas as &$area)\n\t\t{\n\t\t\t$area->instances = $this->db\n\t\t\t\t\t\t\t\t\t->select($this->_table['widget_instances']. '.*, ' . $this->_table['widgets'] . '.slug')\n\t\t\t\t\t\t\t\t\t->where($this->_table['widget_instances'] . '.widget_area_id', $area->id)\n\t\t\t\t\t\t\t\t\t->where($this->_table['widget_instances'] . '.active', '1')\n\t\t\t\t\t\t\t\t\t->order_by($this->_table['widget_instances'] . '.order')\n\t\t\t\t\t\t\t\t\t->join($this->_table['widgets'], $this->_table['widgets'] . '.id = ' . $this->_table['widget_instances'] . '.widget_id')\n\t\t\t\t\t\t\t\t\t->get($this->_table['widget_instances'])\n\t\t\t\t\t\t\t\t\t->result();\n\n\t\t\tforeach ($area->instances as $i_key => $i_val)\n\t\t\t{\n\t\t\t\t$i_opts = unserialize($i_val->options);\n\n\t\t\t\tif ($i_opts)\n\t\t\t\t{\n\t\t\t\t\tforeach ($i_opts as $w_key => $w_val)\n\t\t\t\t\t{\n\t\t\t\t\t\t//$area->instances->$i_val = new stdClass;\n\t\t\t\t\t\t$area->instances[$i_key]->$w_key = $w_val['default'];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($area->instances[$i_key]->widget_area_id);\n\t\t\t\t\tunset($area->instances[$i_key]->widget_id);\n\t\t\t\t\tunset($area->instances[$i_key]->order);\n\t\t\t\t\tunset($area->instances[$i_key]->active);\n\t\t\t\t\tunset($area->instances[$i_key]->options);\n\n\t\t\t\t\t$this->_slug = $area->instances[$i_key]->slug;\n\n\n\t\t\t\t\tif ($class = $this->spawn_class($this->_widgets_path, $i_val->slug, $area->instances[$i_key]))\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = $class->run($area->instances[$i_key]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = false;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($class = $this->spawn_class($this->_widgets_path, $i_val->slug, $area->instances[$i_key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t// no options, just run it\n\t\t\t\t\t\tunset($area->instances[$i_key]->widget_area_id);\n\t\t\t\t\t\tunset($area->instances[$i_key]->widget_id);\n\t\t\t\t\t\tunset($area->instances[$i_key]->order);\n\t\t\t\t\t\tunset($area->instances[$i_key]->active);\n\t\t\t\t\t\tunset($area->instances[$i_key]->options);\n\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = $class->run($area->instances[$i_key]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// send it back to the public controller\n\t\treturn $this->format_widgets($areas);\n\t}", "public function hooks() {\n\t\t$this->loader->add_action( 'init', $this, 'load_content_forms' );\n\t\t$this->loader->add_action( 'init', $this, 'load_widgets_modules' );\n\t}", "function cics_usp_widget_init() {\n\trequire get_template_directory() . '/widgets/cics_usp_paginas_widget.php';\n\tregister_widget( 'Cics_Usp_Paginas_Widget' );\n\n\trequire get_template_directory() . '/widgets/cics_usp_noticias_widget.php';\n\tregister_widget( 'Cics_Usp_Noticias_Widget' );\n\n\trequire get_template_directory() . '/widgets/cics_usp_facts_widget.php';\n\tregister_widget( 'Cics_Usp_Facts_Widget' );\n}", "function sp_widgets_init() {\n\t\n\tglobal $smof_data;\n\t\n\t// Main Widget Area\n\tregister_sidebar(array(\n\t\t'name' => __('Right Sidebar', 'sptheme_domain'),\n\t\t'id' => 'right-sidebar',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3><hr class=\"green\">',\n\t));\n\t\n\t// Footer Widget Area\n\tregister_sidebar(array(\n\t\t'name' => __('Footer Sidebar', 'sptheme_domain'),\n\t\t'id' => 'footer-sidebar',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\t\n\t// Dynamic sidebar generate\n\t$generate_sidebars = $smof_data['sidebar_options']; \n\tif($generate_sidebars){\n\t\tforeach ($generate_sidebars as $sidebar) { \n\t\t\tif ( function_exists('register_sidebar') )\n\t\t\tregister_sidebar(array(\n\t\t\t'name' \t\t\t=> $sidebar['title'],\n\t\t\t'id'\t\t\t=> str_replace(' ', '-', strtolower($sidebar['title'])),\n\t\t\t'description' \t=> 'Widgets in this area will be shown in the sidebar.',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h5 class=\"label-mod\">',\n\t\t\t'after_title' => '</h5>',\n\t\t\t));\n\t\t}\n\t}\n\t\n\t// Addon widgets\t\t\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/text-image-widget.php' );\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/video-widget.php' );\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/fb-likebox-widget.php' );\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/subnav-widget.php' );\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/contact-widget.php' );\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/postslist-widget.php' );\n\trequire_once ( SP_BASE_DIR . 'framework/widgets/cp-newproduct-widget.php' );\n\t\n\t// Register widgets\n\tregister_widget( 'sp_text_image_widget' );\n\tregister_widget( 'sp_video_widget' );\n\tregister_widget( 'sp_fb_likebox_widget' );\n\tregister_widget( 'sp_subnav_widget' );\n\tregister_widget( 'sp_contact_info_widget' );\n\tregister_widget( 'sp_post_list_widget' );\n register_widget( 'sp_custom_list_widget' );\n}", "function myWidgetsInit() {\n\t\n\t/*register_sidebar(array(\n\t\t'name' => 'Right Sidebar',\n\t\t'id' => 'rightSidebar',\n\t\t'before_widget' => '<div class=\"widgets_item\">',\n\t\t'after_widget' => '</div>'\n\t));*/\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Area 1',\n\t\t'id'=>'footer1'\n\t));\n\t\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Area 2',\n\t\t'id'=>'footer2'\n\t));\n\t\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Area 3',\n\t\t'id'=>'footer3'\n\t));\n}", "function blanche_widget_areas(){\n \n register_sidebar(\n \n array(\n \n 'name'=>'Right sidebar',\n 'id'=>'right-sidebar',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'This is the widget for the right sidebar area',\n 'before_widget'=>'<div id=\"\" class=\"sidebar\">',\n 'after_widget'=>'</div>'\n \n \n )\n \n );\n \n register_sidebar(\n \n array(\n \n 'name'=>'Left sidebar',\n 'id'=>'left-sidebar',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'This is the widget for the left sidebar area',\n 'before_widget'=>'<div id=\"\" class=\"sidebar\">',\n 'after_widget'=>'</div>'\n\n \n )\n \n );\n \n \n \n register_sidebar(\n \n array(\n \n 'name'=>'Footer Widget 1',\n 'id'=>'footer-widget-1',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'1st footer widget',\n 'before_widget'=>'<div id=\"\" class=\"footer-sidebar\">',\n 'after_widget'=>'</div>'\n\n \n )\n \n );\n \n register_sidebar(\n \n array(\n \n 'name'=>'Footer Widget 2',\n 'id'=>'footer-widget-2',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'2nd footer widget',\n 'before_widget'=>'<div id=\"\" class=\"footer-sidebar\">',\n 'after_widget'=>'</div>'\n \n \n )\n \n );\n \n register_sidebar(\n \n array(\n \n 'name'=>'Footer Widget 3',\n 'id'=>'footer-widget-3',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'3rd footer widget',\n 'before_widget'=>'<div id=\"\" class=\"footer-sidebar\">',\n 'after_widget'=>'</div>'\n \n \n )\n \n );\n \n\n \n register_sidebar(\n \n array(\n \n 'name'=>'Contact Sidebar',\n 'id'=>'contact-sidebar',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'Widget for the Contact sidebar area',\n 'before_widget'=>'<div id=\"\" class=\"contact-sidebar\">',\n 'after_widget'=>'</div>'\n \n \n )\n \n );\n \n \n// register_sidebar(\n// \n// array(\n// \n// 'name'=>'Front Page Sidebar',\n// 'id'=>'frontpage-sidebar',\n// 'before_title'=>'<h4 class=\"widget-title\">',\n// 'after_title'=>'</h4>',\n// 'description'=>'Widget for the Front-Page sidebar area',\n// 'before_widget'=>'<div id=\"\" class=\"frontpage-sidebar\">',\n// 'after_widget'=>'</div>'\n// \n// \n// )\n// \n// );\n \n \n register_sidebar(\n \n array(\n \n 'name'=>'Maps Plugin Sidebar',\n 'id'=>'maps-sidebar',\n 'before_title'=>'<h4 class=\"widget-title\">',\n 'after_title'=>'</h4>',\n 'description'=>'Widget for the Front-Page Google Map area',\n 'before_widget'=>'<div id=\"\" class=\"maps-sidebar\">',\n 'after_widget'=>'</div>'\n \n \n )\n \n );\n \n \n}", "public function action_register_widgets(){\n\t\t// load the widget files before we register them\n\t\tPathUtil::load_ns_widget(\"ns-widget-shortcode.php\");\n\t\tPathUtil::load_ns_widget(\"ns-widget-image-cta.php\");\n\t\tPathUtil::load_ns_widget(\"ns-widget-post-selections.php\");\n\n\t\t// once they've been loaded, go ahead and register them.\n\t\tregister_widget(\"NS_Widget_Shortcode\");\n\t\tregister_widget(\"NS_Widget_Image_Cta\");\n\t\tregister_widget(\"NS_Widget_Post_Selections\");\n\t}", "function subpages_load_widgets() {\n\tregister_widget( 'Subpages_Widget' );\n}", "private function widgets_to_theme_mods() {\n\n\t\t$sidebars = array(\n\t\t\t'hestia_features_content' => array( 'sidebar-ourfocus', 'ctup-ads' ),\n\t\t\t'hestia_testimonials_content' => array( 'sidebar-testimonials', 'zerif_testim' ),\n\t\t\t'hestia_clients_bar_content' => array( 'sidebar-aboutus', 'zerif_clients' ),\n\t\t\t'hestia_team_content' => array( 'sidebar-ourteam', 'zerif_team' ),\n\t\t);\n\n\t\tforeach ( $sidebars as $hestia_corespondent => $sidebar_settings ) {\n\t\t\t$hestia_content = get_theme_mod( $hestia_corespondent );\n\t\t\t$hestia_content_decoded = json_decode( $hestia_content );\n\t\t\tif ( empty( $hestia_content_decoded ) ) {\n\t\t\t\t$content = $this->get_sidebar_content( $sidebar_settings[0], $sidebar_settings[1] );\n\t\t\t\tif ( ! empty( $content ) ) {\n\t\t\t\t\tset_theme_mod( $hestia_corespondent, $content );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function tf2013_widgets_init() {\r\n\r\n // Kurzinfo\r\n register_sidebar( array(\r\n 'name' => __( 'Kurzinfo', 'tf2013' ),\r\n 'id' => 'kurzinfo-area',\r\n 'description' => __( 'Bereich unterhalb des Menus links', 'tf2013' ),\r\n 'before_widget' => '<div id=\"kurzinfo\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2>',\r\n 'after_title' => '</h2>',\r\n ) );\r\n // Sidebar\r\n register_sidebar( array(\r\n 'name' => __( 'Sidebar', 'tf2013' ),\r\n 'id' => 'sidebar-area',\r\n 'description' => __( 'Klassische Sidebar (rechts)', 'tf2013' ),\r\n 'before_widget' => '<div class=\"widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2>',\r\n 'after_title' => '</h2>',\r\n ) );\r\n\t\r\n\t// Zusatzinfo (Footer)\r\n register_sidebar( array(\r\n 'name' => __( 'Inhaltsinfo', 'tf2013' ),\r\n 'id' => 'inhaltsinfo-area',\r\n 'description' => __( 'Feststehender Inhalt vor den eigentlichen Content', 'tf2013' ),\r\n 'before_widget' => '<div class=\"widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2>',\r\n 'after_title' => '</h2>',\r\n ) );\r\n\t\r\n\t// Zusatzinfo (Footer)\r\n register_sidebar( array(\r\n 'name' => __( 'Zusatzinfo', 'tf2013' ),\r\n 'id' => 'zusatzinfo-area',\r\n 'description' => __( 'Zusatzinfo im Footer', 'tf2013' ),\r\n 'before_widget' => '<div class=\"widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2>',\r\n 'after_title' => '</h2>',\r\n ) );\r\n\r\n \r\n\r\n}", "function place_load_widget(){\n\tregister_widget('place_widget');\n}", "function widget_areas() {\n register_sidebar(\n array(\n 'id' => 'footer_address',\n 'name' => __( 'Footer Address' ),\n 'description' => __( 'This displays the address in the footer' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n )\n );\n register_sidebar(\n array(\n 'id' => 'staff_banner_image',\n 'name' => __( 'Staff Banner Image' ),\n 'description' => __( 'This displays the banner image on staff archive' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n )\n );\n register_sidebar(\n array(\n 'id' => 'events_banner_image',\n 'name' => __( 'Events Banner Image' ),\n 'description' => __( 'This displays the banner image on events archive' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n )\n );\n register_sidebar(\n array(\n 'id' => 'news_banner_image',\n 'name' => __( 'News Banner Image' ),\n 'description' => __( 'This displays the banner image on news archive' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n )\n );\n register_sidebar(\n array(\n 'id' => 'newsletter_banner_image',\n 'name' => __( 'Newsletter Banner Image' ),\n 'description' => __( 'This displays the banner image on newsletter archive' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n )\n );\n register_sidebar(\n array(\n 'id' => 'books_banner_image',\n 'name' => __( 'Books Banner Image' ),\n 'description' => __( 'This displays the banner image on books archive' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n )\n );\n}", "public static function loadAll(){\n\t\t$settings = require PRAIRIE_PATH . \"/config/autoloader_meadow.php\";\n\t\t$toLoad = $settings[\"loadOrder\"];\n\t\tstatic::$ignore = $settings[\"ignore\"];\n\n\t\tforeach($toLoad as $loading){\n\t\t\tif(is_dir($loading)){\n\t\t\t\tstatic::load($loading);\n\t\t\t}else{\n\t\t\t\trequire $loading;\n\t\t\t}\n\t\t}\n\n\t\t$settings = require PRAIRIE_PATH . \"/config/autoloader_user.php\";\n\t\t$toLoad = $settings[\"loadOrder\"];\n\t\tstatic::$ignore = $settings[\"ignore\"];\n\n\t\tforeach($toLoad as $loading){\n\t\t\tif(is_dir($loading)){\n\t\t\t\tstatic::load($loading);\n\t\t\t}else{\n\t\t\t\trequire $loading;\n\t\t\t}\n\t\t}\n\t}", "public function render_dashboard_widgets() {\n\t\t\tinclude $this->find_html_file( 'dashboard-widgets.php' );\n\t\t}", "function bpxl_widgets_init() {\n\tregister_sidebar(array(\n\t\t'name' => __( 'Primary Sidebar', 'bloompixel' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Main sidebar of the theme.', 'bloompixel' ),\n\t\t'before_widget' => '<div class=\"widget sidebar-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title uppercase\">',\n\t\t'after_title' => '</h3>',\n\t));\n\tregister_sidebar(array(\n\t\t'name' => __( 'Secondary Sidebar', 'bloompixel' ),\n\t\t'id' => 'sidebar-2',\n\t\t'description' => __( 'Only displayed when 3 column layout is enabled.', 'bloompixel' ),\n\t\t'before_widget' => '<div class=\"widget sidebar-widget sidebar-small-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title uppercase\">',\n\t\t'after_title' => '</h3>',\n\t));\n\t$sidebars = array(1, 2, 3, 4);\n\tforeach($sidebars as $number) {\n\tregister_sidebar(array(\n\t\t'name' => __( 'Footer', 'bloompixel' ) . ' ' . $number,\n\t\t'id' => 'footer-' . $number,\n\t\t'description' => __( 'This widget area appears on footer of theme.', 'bloompixel' ),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title uppercase\">',\n\t\t'after_title' => '</h3>'\n\t));\n\t}\n}", "static private function load_files() {\n\n\t\t\t/* Classes */\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-filesystem.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-pointers.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-posts.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-settings.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ajax.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ajax-layout.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-art.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-auto-suggest.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-color.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-css.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-export.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-extensions.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-fonts.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-debug.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-usage.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-icons.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-iframe-preview.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-import.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-loop.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-model.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-module.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-photo.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-revisions.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-services.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-shortcodes.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-timezones.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ui-content-panel.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ui-settings-forms.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-notifications.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-update.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-access.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-settings.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-utils.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpml.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-privacy.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-presets.php';\n\n\t\t\t/* WP CLI Commands */\n\t\t\tif ( defined( 'WP_CLI' ) ) {\n\t\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpcli-command.php';\n\t\t\t}\n\n\t\t\t/* WP Blocks Support */\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wp-blocks.php';\n\n\t\t\t/* Includes */\n\t\t\trequire_once FL_BUILDER_DIR . 'includes/compatibility.php';\n\n\t\t\t/* Updater */\n\t\t\tif ( file_exists( FL_BUILDER_DIR . 'includes/updater/updater.php' ) ) {\n\t\t\t\trequire_once FL_BUILDER_DIR . 'includes/updater/updater.php';\n\t\t\t}\n\t\t}", "function joints_custom_dashboard_widgets() {\n\n\t/*\n\tBe sure to drop any other created Dashboard Widgets\n\tin this function and they will all load.\n\t*/\n}", "function theme_widgets_init() {\n\t // Area 1\n\t register_sidebar( array (\n\t 'name' => 'Primary Widget Area',\n\t 'id' => 'primary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\n\t // Area 2\n\t register_sidebar( array (\n\t 'name' => 'Secondary Widget Area',\n\t 'id' => 'secondary_widget_area',\n\t 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t 'after_widget' => \"</li>\",\n\t 'before_title' => '<h3 class=\"widget-title\">',\n\t 'after_title' => '</h3>',\n\t ) );\n\t}", "function widget_common() {\n\t// The plugins_url() function should not be called in the global context of plugins, but rather in a hook like \"init\" or \"admin_init\" \n\tdefine( 'WF_WIDGETS_PLUGIN_PATH', dirname( __FILE__ ) );\n\tdefine( 'WF_WIDGETS_PLUGIN_URL', plugins_url( '', __FILE__ ) ); // v6.55 See note about odd urls that are sometimes generated \n\tdefine( 'WF_WIDGETS_PLUGIN_FILE', plugin_basename( __FILE__ ) );\n\tdefine( 'WF_PLUGINS_DIR_PATH', dirname(dirname( __FILE__ )) ); // v 6.17\n\t//echo WF_WIDGETS_PLUGIN_URL; \n\t\n\t// v6.58 already loaded by wf_lib\n\tif(class_exists('PluginUpdateChecker')) { // v6.59 - just in case\n\t\t$UpdateChecker = new PluginUpdateChecker(\n\t\t\t'http://www.graphicdesignleeds.info/lib/wf_widgets.json',\n\t\t\t__FILE__,\n\t\t\t'wf_widgets'\n\t\t);\n\t}\n\t\n\tfunction wf_get_active_plugin_dirs($value) { //v6.60\n\t\t$path_array = explode('/',$value);\n\t\treturn $path_array[0];\n\t}\n\t\n\t\n\n/////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\n\t\n\t\tabstract class Wf_Widget {\n\t\tpublic $region;\n\t\tpublic $params;\n\t\tpublic $widget_type;\n\t\tpublic $shortcode_content = null; // content of enclosing shortcode gets passed to 2nd param of function shortcode_process()\n\t\tprotected $can_shortcode;\n\t\tprotected $default_params = array(); // param defaults for current widget\n\t\t\n\t\tstatic $current_specs; // complete set of current specs for all widgets\n\t\tstatic $region_html; // v4.4\n\t\tstatic $catfather_array; // v6.73\n\t\t\n\t\tpublic static function init() {\n\t\t\trequire_once( dirname( __FILE__ ) . '/widget_default_specs.php' );\n\t\t\trequire_once( dirname(dirname( __FILE__ )) . '/files/wf_widgets/widget_config.php' );// v5.2\n\t\t\tWf_Widget::$current_specs = $current_specs;\n\t\t\tWf_Widget::$region_html = $region_html; // v4.4\n\t\t\tWf_Widget::$catfather_array = (isset($catfather_array)) ? $catfather_array : array(); // v6.73\n\t\t\t$widget_keys = array_keys($current_specs);\n\t\t\tforeach($widget_keys as $widget) {\n\t\t\t\tadd_shortcode('shortcode_'.$widget, array(__CLASS__,'shortcode_process'));\n\t\t\t}\n\t\t\treturn;\n\t\t}\t\t\n\t\t\t\n\t\tpublic static function add_specs($widget_type, $specs){\n\t\t\tWf_Widget::$current_specs[$widget_type] = $specs;\n\t\t}\n\t\t\n\t\tpublic function __construct($region,$widget_type,$data) { //$region,$qstring\n\t\t\t//global $post; //v6.76\n\t\t\t$this->region = $region; \n\t\t\tif($region == 'shortcode') {\n\t\t\t\t$raw_params = $data;// data is atts\n\t\t\t} else {\n\t\t\t\t$raw_params = trim_parse($data); // data is qstring //v6.4 Was $this->trim_parse\n\t\t\t}\n\t\t\t$raw_params['widget'] = $widget_type; // v6.48 - coz it was getting lost for hardwired widgets\n\t\t\t//$raw_params['host_post'] = $post->ID; //v6.76\n\t\t\tif(empty($this->default_params)) {\n\t\t\t\tforeach (Wf_Widget::$current_specs[$widget_type]['params'] as $pkey => $pvalue) {\n\t\t\t\t\t$this->default_params[$pkey] = $pvalue['default'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->params = $this->tidy_params($this->default_params, $raw_params, $region);\n\t\t\t$this->widget_type = $widget_type;\n\t\t} \n\t\t\n\t\t\n\t\tabstract public function get_html();\n\t\t\n\t\t//static function wf_widgets($regions) { // v3.84 split this up so can access widget_list from admin pages\n\t\tstatic function wf_widgets() { // v5.3\n\t\t\tglobal $post; // v6.44\n\t\t\t//$regions = Wf_Widget::$regions; // v5.3\n\t\t\t$regions = get_regions_list($post);// v6.47\n\t\t\t$widget_list = self::list_wf_widgets($regions);\n\t\t\tWF_Debug::stash(array('$widget_list' => $widget_list));\n\t\t\t$region_html = Wf_Widget::$region_html; // v4.4\n\t\t\tforeach($regions as $region) {// v3.60\n\t\t\t\tif(!isset($region_html[$region])) {\n\t\t\t\t\t$region_html[$region] = ''; // v4.4\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$w_list = array(); // v6.44? WCTS errors \n\t\t\t\t\t//Cannot use string offset as an array in ... wf_widgets.php on line 175 (= the 'disinherit' line)\n\t\t\t\tif(count($widget_list[$region]['current']) > 0) {\n\t\t\t\t\t\n\t\t\t\t\t$w_list[$region] = $widget_list[$region]['current'];\n\t\t\t\t\tif(!is_array($w_list[$region][0])) { // v6.44?\n\t\t\t\t\t\terror_log(\"WF bug trap: wf_widgets.php, REQUEST_URI = \".$_SERVER['REQUEST_URI'].\", REMOTE_ADDR = \".$_SERVER['REMOTE_ADDR']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//if($w_list[$region][0]['qstring'] == \"0\") { // disinherit!\n\t\t\t\t\t\tif($w_list[$region][0]['widget_type'] == \"cancel\") { // disinherit! // v6.66\n\t\t\t\t\t\t\tcontinue; // skip to next region\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} elseif(count($widget_list[$region]['inherited']) > 0 && $widget_list[$region]['inherited'][0]['widget_type'] != \"cancel\") { // v6.66\n\t\t\t\t\t$w_list[$region] = $widget_list[$region]['inherited'];\n\t\t\t\t} else {\n\t\t\t\t\tcontinue; // skip to next region\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($w_list[$region] as $widgnum => $widget) { // widgnum introduced 12.3.12 to allow id for widget\t\t\t\t\t\t\n\t\t\t\t\t$qstring = $widget['qstring'].\"&widgnum=\".$widgnum;// .\"&widget=\".$widget['widget_type']; // v6.48\n\t\t\t\t\t$widget_class = Wf_Widget::$current_specs[$widget['widget_type']]['class_name']; // eg: Post_widget\n\t\t\t\t\t$widget_obj = new $widget_class($region, $widget['widget_type'], $qstring);\n\t\t\t\t\t$region_html[$region] .= $widget_obj->get_html(); // ($region, $qstring); // v4.4 \n\t\t\t\t\t\n\t\t\t\t\tWF_Debug::stash(array('$qstring' => $qstring, '$widget_class' => $widget_class, '$region' => $region, '$region_html[\"'.$region.'\"]' => $region_html[$region]));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tWf_Widget::$region_html = $region_html; // v5.3\n\t\t\t//WF_Debug::stash(array('$region_html' => $region_html));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tstatic function get_region_html($region) { // v5.3 This allows us to use previously undeclared regions on special pages\n\t\t\tif(!isset(Wf_Widget::$region_html[$region])) {\n\t\t\t\treturn'';\n\t\t\t} else {\n\t\t\t\treturn Wf_Widget::$region_html[$region];\n\t\t\t}\n\t\t}\n\t\n\t\n\t\t\n\t\t\t\n\t\tstatic function list_wf_widgets($regions) { // v3.84 This gets called by admin.php\n\t\t\tglobal $post;\n\t\t\t\n\t\t\t/* // v6.73\n\t\t\t$godfather = get_godfather($post->ID, Wf_Widget::$catfather_array); // v6.73\n\t\t\tWF_Debug::stash(array('$godfather' => $godfather));\n\t\t\tif (!$godfather) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t$generations = get_post_ancestors($post->ID); // why do this bit more than once??\n\t\t\t\n\t\t\tarray_unshift($generations, $post->ID); // $id followed by all ancestors\n\t\t\t\n\t\t\tif(!empty(Wf_Widget::$catfather_array)) { // v6.73\n\t\t\t\t$generations = array($godfather); // precalculated from $catfather_array\n\t\t\t\tWF_Debug::stash(array('is_single' => \"Yes\"));\n\t\t\t}\n\t\t\t*/\n\t\t\t$generations = get_generations($post->ID, Wf_Widget::$catfather_array); // v6.73\n\t\t\td('$generations',$generations);\n\t\t\t\n\t\t\t$widget_list = array(); // v6.12\n\t\t\tforeach($regions as $region) {\n\t\t\t\t$widget_list[$region] = self::get_regional_inheritance($generations,$region); // v6.53 \n\t\t\t}\n\t\t\treturn $widget_list; // v4.12 [$region]['current' or 'inherited'] $widget_type,$qstring,$rank,$aboveness\n\t\t}\n\n\n\t\t// v6.67 was getting errors \"should not be called statically\", so made static\n\t\tprivate static function get_regional_inheritance($generations,$region) { // returns 2 arrays: 'current' and 'inherited' // v6.49 // v6.53\n\t\t\t$custom_array = array( // v4.12\n\t\t\t\t'current' => array(),\n\t\t\t\t'inherited' => array()\n\t\t\t);\n\t\t\tforeach ($generations as $aboveness => $generation) { // v3.84\n\t\t\t\t$c_or_i = ($aboveness == 0) ? 'current' : 'inherited'; // v6.66\n\t\t\t\t$custom_values = get_post_custom($generation); \n\t\t\t\tforeach ($custom_values as $cv_key => $cv_value) {\n\t\t\t\t\t\n\t\t\t\t\t$cv_key_array = explode('-',$cv_key);\n\t\t\t\t\tif($cv_key_array[0] == $region) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$qstring = qscode($cv_value[0]); // qscode makes it into a querystring\n\t\t\t\t\t\t$c = count($cv_key_array);\n\t\t\t\t\t\tif($c == 3) { // an order is specified\n\t\t\t\t\t\t\t$rank = $cv_key_array[1]; // eg: \"2\"\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$rank = \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$custom_array[$c_or_i][] = array( // v6.66\n\t\t\t\t\t\t\t\t'widget_type' => $cv_key_array[$c-1],\n\t\t\t\t\t\t\t\t'qstring' => $qstring,\n\t\t\t\t\t\t\t\t'rank' => $rank,\n\t\t\t\t\t\t\t\t'aboveness' => $aboveness\n\t\t\t\t\t\t\t);\n\t\t\t\t\t// v6.66\t\n\t\t\t\t\t} elseif($cv_key == $region.\"_cancel\" && $cv_value[0] == '1') {\n\t\t\t\t\t\t// whether current or inherited: this has to be the only entry for this level\n\t\t\t\t\t\t$custom_array[$c_or_i][] = array( // bit of a clunky, line-of-least-resistance solution!\n\t\t\t\t\t\t\t'widget_type' => 'cancel',\n\t\t\t\t\t\t\t'qstring' => '',\n\t\t\t\t\t\t\t'rank' => '0', // we need to be able to sort by rank later - hence the dummy array\n\t\t\t\t\t\t\t'aboveness' => $aboveness\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} // foreach ($custom_values\n\t\t\t\tif (count($custom_array['inherited']) > 0){ // v4.12 we only need the nearest inheritance\n\t\t\t\t\tbreak; // jumps out of foreach ($generations\n\t\t\t\t}\n\t\t\t} // foreach ($generations\n\t\t\t\n\t\t\tarray_sort_by_column($custom_array['current'], 'rank'); \n\t\t\tarray_sort_by_column($custom_array['inherited'], 'rank'); \n\t\t\treturn $custom_array;\n\t\t}\n\n\n\n\t\tprotected function set_shortcode_content($content) {\n\t\t\t$this->shortcode_content = $content;\n\t\t}\n\t\n\t\t\n\t\tpublic static function shortcode_process($atts,$content=null,$widget_type){ // $atts is an array\n\t\t\t$atts['widget']= substr($widget_type,10); // removes 'shortcode_'\n\t\t\t$widget_class = ucfirst($atts['widget']).\"_widget\"; // eg: Post_widget\n\t\t\t$scwidgobj = new $widget_class('shortcode', $atts['widget'], $atts);\n\t\t\t$scwidgobj->set_shortcode_content($content);\n\t\t\t$html = $scwidgobj->get_html();\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\t\n\t\tprotected function add_action( $action, $function = '', $priority = 10, $accepted_args = 1 ) {\n\t\t\tadd_action( $action, array($this, $function == '' ? $action : $function ), $priority, $accepted_args );\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tprotected function tidy_params($default_params, $sc_atts, $region) { // v3.51\n\t\t\td('$sc_atts',$sc_atts);\n\t\t\t$default_params = array_merge($default_params, array('widgnum'=>false,'widget'=>'','region'=>$region)); // v4.3 added region\n\t\t\n\t\t\textract(shortcode_atts($default_params, $sc_atts)); // v3.50\n\t\t\t\n\t\t\tif(isset($ids)) {\n\t\t\t\t$ids = str_replace(\" \",\"\", $ids); // get rid of any spaces\n\t\t\t\t$ids = explode(',',$ids); // v3.51 Was $id_array\n\t\t\t}\n\t\t\tif(isset($cat) && $cat) { // v3.77 to allow multiple categories v3.79 added && $cat\n\t\t\t\t$cat = str_replace(\" \",\"\", $cat); // get rid of any spaces\n\t\t\t\t$cat = explode(',',$cat); \n\t\t\t}\n\t\t\tif(isset($link)){ // v3.54\n\t\t\t\tif($link) {\n\t\t\t\t\t$link = wf_linkfix($link);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($style)){\n\t\t\t\t$style = str_replace(\",\",\" \", $style); // turn commas into spaces\n\t\t\t\t$style = $widget.\"_widget wf_widget region_\".$region.\" \".$style; // v3.50 renamed $class to $style // v4.2 added wf_widget\n\t\t\t} else {\n\t\t\t\t$style = $widget.\"_widget wf_widget region_\".$region.\" default\"; // v4.2 added wf_widget\n\t\t\t}\n\t\t\tif(isset($caption)) { // v3.38\n\t\t\t\t$caption=stripslashes($caption);\n\t\t\t\t$caption=str_replace(\"_\", \" \", $caption); // because shortcode values can't contain spaces\n\t\t\t}\n\t\t\tif(isset($heading)) {\n\t\t\t\t$heading=stripslashes($heading);\n\t\t\t\t$heading=str_replace(\"_\", \" \", $heading); // because shortcode values can't contain spaces\n\t\t\t\t// added with Wf_Widgets\n\t\t\t\tif(isset($linktext) && $linktext == 'heading') { // 4.3\n\t\t\t\t\t$heading = \"<a href='\".$link.\"'>\".$heading.\"</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$params=compact(array_keys($default_params)); // v3.50 this turns all those variables back into an array again\n\t\t\treturn $params;\n\t\t}\n\t\t\n\t\t\n\t\tprotected function get_endlink($params) { // v5.7\n\t\t\t$html = '';\n\t\t\tif($params['link'] && ($params['linktext'] != 'heading')){\n\t\t\t\t$linktext = ($params['linktext']) ? $params['linktext'] : \"&nbsp;\";\n\t\t\t\t$html = \"\\n<a class='endlink coverlink' href='\".$params['link'].\"'>\".$linktext.\"</a>\\n\";\n\t\t\t} \n\t\t\treturn $html;\n\t\t}\n\n\t\t\n\t\t\n\t\tprotected function output_a_post($rankedpost, $params) { // v3.50\n\t\t\tglobal $post;\n\t\t\t$post_store = $post; //v6.52\n\t\t\t$post = $rankedpost; // v3.40\n\t\t\t$html = '';\n\t\t\td('$rankedpost->ID',$rankedpost->ID);\n\t\t\tif($rankedpost->post_type != 'attachment') { // changed from == 'post' 19.3.12 3.18\n\t\t\t\t$html .= \"\\n<div class='\".$params['style'].\"'>\\n\";\n\t\t\t\t$html .= Wf_Widget::wf_editlink($rankedpost->ID);// v5.9\n\t\t\t\t$html .= extra_markup($params); // v4.2\n\t\t\t\t$custom_fields = get_post_custom($rankedpost->ID); // v3.32\n\t\t\t\t\n\t\t\t\t// v3.37 This section now looks for a customfield \"extras\" applied to the post, and gives priority to this for \"when\" and \"link\"\n\t\t\t\t$when_html =''; // \n\t\t\t\tif(isset($custom_fields['when'])) { // an array\n\t\t\t\t\t//$html .= \"<p class = 'details'>\".$when[0].\"</p>\\n\"; // v3.37 DODGY!! Has $when been defined?\n\t\t\t\t\t$when_html = \"<p class = 'details'>\".$custom_fields['when'][0].\"</p>\\n\";\n\t\t\t\t}\n\t\t\t\tif(isset($custom_fields['extras'])) { // v3.37 \n\t\t\t\t\t$qstring = qscode($custom_fields['extras'][0]); // the QUERYSTRING version\n\t\t\t\t\tparse_str($qstring, $q_array); // parses the querystring into an associative array\n\t\t\t\t\t//preint_r($q_array);\n\t\t\t\t\tif(isset($q_array['link'])) {\n\t\t\t\t\t\t$params['link'] = wf_linkfix($q_array['link']); // NB this over-rides any \"link\" parameter that's set for leftpost, rightpost etc.\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($q_array['when'])) {\n\t\t\t\t\t\t$when_html = \"<p class = 'details'>\".$q_array['when'].\"</p>\\n\"; // NB this over-rides any value set in customfield \"when\".\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t$html .= $when_html;\t\n\t\t\t\t\n\t\t\t\tif($params['show_title']) {\n\t\t\t\t\t$title = remove_square_brackets($rankedpost->post_title); //v3.36\n\t\t\t\t\t$html .= \"<div class='hwrap'><h2>\".$title.\"</h2></div>\\n\"; // <div class='hwrap'> added for carplus v3.15\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$img_html = '';\n\t\t\t\tif($params['pic_size']) {\n\t\t\t\t\t\n\t\t\t\t\tif (has_post_thumbnail($rankedpost->ID ) && $params['pic_size'] != '0') { // v3.38\n\t\t\t\t\t\t$feature_pic_id = get_post_thumbnail_id($rankedpost->ID);\n\t\t\t\t\t\t$img_html = wp_get_attachment_image($feature_pic_id, $params['pic_size']);\n\t\t\t\t\t\t//$img_html = change_width_and_height($img_html,$img_size,$img_size); // v3.49 Was 100,100\n\t\t\t\t\t\t$img_html .= wf_get_caption($rankedpost,$params['caption']); // 3.26\n\t\t\t\t\t\t$img_html .= wf_get_credits($feature_pic_id); // returns empty if no 'credit=' in description, otherwise a suitable <div> (or <a> if it's a link)\n\t\t\t\t\t\t$img_html = \"<div class='picwrap'>\".$img_html.\"</div>\\n\"; // v3.65\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(isset($params['format']) && strpos($params['format'],'l') !== false) { //v5.12\n\t\t\t\t\t$list = true;\n\t\t\t\t} else {\n\t\t\t\t\t$list = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//d('$list',$list); // (F3) calls Wf_Debug\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$html .= \"<div class='postwrap'>\".$img_html.Wf_Widget::get_excerpt_or_full($rankedpost,$params['type'],$list).\"</div>\\n\"; //v5.12 $list\n\t\t\t\t\t\t\t\n\t\t\t} else { // assume it must be 'attachment'\n\t\t\t\n\t\t\t\t$html .= \"\\n<div class='\".$params['style'].\" attachment'>\\n\"; // v4.2\n\t\t\t\t$html .= Wf_Widget::wf_editlink($rankedpost->ID);// v5.9\n\t\t\t\t$html .= extra_markup($params); // v4.2\n\t\t\t\t$html .= \"\\n<div class='credit_wrap'>\\n\"; // v6.46\n\t\t\t\t$html .= wp_get_attachment_image($rankedpost->ID, $size=$params['pic_size'], $icon=false, $attr=array('title' =>''));\n\t\t\t\t$html .= wf_get_credits($rankedpost->ID); // returns empty if no 'credits=' in description, otherwise a suitable <div> (or <a> if it's a link)\n\t\t\t\t$html .= \"</div>\\n\"; // .credit_wrap // v6.46\n\t\t\t\t$html .= wf_get_caption($rankedpost,$params['caption']); // 3.26\n\t\t\t}\n\t\t\tif($params['link']) {\n\t\t\t\tif(!isset($q_array['linktext'])) { //v3.40\n\t\t\t\t\t$linktext = \"&nbsp;\";\n\t\t\t\t} else {\n\t\t\t\t\t$linktext = $q_array['linktext'];\n\t\t\t\t}\n\t\t\t\t$html .= \"\\n<a class='endlink coverlink' href='\".$params['link'].\"'>\".$linktext.\"</a>\\n\"; //v3.40 //v3.41\n\t\t\t}\n\t\t\t\n\t\t\t$html .= \"</div>\\n\";\n\t\t\t$post = $post_store; //v6.52\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\t\n\t\tstatic function wf_editlink($post_id) { // v5.9\n\t\t\tif (current_user_can('edit_post', $post_id)) { // v6.26\n\t\t\t\treturn \"<a class='editlink' href='\".get_edit_post_link($post_id).\"'>Edit</a>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// v6.67 was getting errors \"should not be called statically\", so made static\n\t\tpublic static function get_excerpt_or_full($catpost,$type,$list) { // v3.25 pulled out of get_catposts() so we can recycle it in scode_insert_items()\n\t\t\t// 3.31 added $list - so <more> items in a list get treated the same as automatic excerpts\n\t\t\t$html = ''; // v6.51 so that it doesn't complain when inheritance is cancelled\n\t\t\tif($type=='excerpts') { // there's 3 varieties of excerpt...\n\t\t\t\tif(strpos($catpost->post_content, '<!--more-->') && !$list) { // ie: there's a more tag in the content 3.31\n\t\t\t\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); // set this in functions.php\n\t\t\t\t\t$get_the_excerpt = explode('<!--more-->', $catpost->post_content);\n\t\t\t\t\t$get_the_excerpt = $get_the_excerpt[0] . $excerpt_more;\n\t\t\t\t\t$get_the_excerpt = do_shortcode(apply_filters('mimic_content',$get_the_excerpt)); // 3.30 v6.54\n\t\t\t\t} else { // there is not a more tag in the content (or it's a list)\n\t\t\t\t\tif(($catpost->post_excerpt != '') && !$list) { // there's a real excerpt! (Yeah, right...) 3.31\n\t\t\t\t\t\t$get_the_excerpt = apply_filters('get_the_excerpt', $catpost->post_excerpt); // this is exactly how WordPress does it\n\t\t\t\t\t} else { // we need to do an automatic excerpt - truncate to 55(?) words\n\t\t\t\t\t\t$get_the_excerpt = Wf_Widget::wf_wp_trim_excerpt($catpost->post_content); // function borrowed from wp-includes/formatting.php \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html = apply_filters('the_excerpt', $get_the_excerpt); // this is exactly how WordPress does it\t\n\t\t\t} elseif ($type=='full'){\n\t\t\t\t$html = do_shortcode(apply_filters('mimic_content', $catpost->post_content)).\"\\n\"; // v6.21\n\t\t\t}\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * Generates an excerpt from the content, if needed.\n\t\t *\n\t\t * The excerpt word amount will be 55 words and if the amount is greater than\n\t\t * that, then the string ' [...]' will be appended to the excerpt. If the string\n\t\t * is less than 55 words, then the content will be returned as is.\n\t\t *\n\t\t * The 55 word limit can be modified by plugins/themes using the excerpt_length filter\n\t\t * The ' [...]' string can be modified by plugins/themes using the excerpt_more filter\n\t\t *\n\t\t * @since 1.5.0\n\t\t *\n\t\t * @param string $text The excerpt. If set to empty an excerpt is generated.\n\t\t * @return string The excerpt.\n\t\t */\n\t\t \n\t\t// v6.67 was getting errors \"should not be called statically\", so made static\n\t\tpublic static function wf_wp_trim_excerpt($text) { // Wingfinger version\n\t\t\t$raw_excerpt = $text;\n\t\t\t$text = strip_shortcodes( $text );\n\t\t\n\t\t\t$text = apply_filters('mimic_content', $text); // 3.30\n\t\t\t$text = str_replace(']]>', ']]&gt;', $text);\n\t\t\t$text = strip_tags($text);\n\t\t\t$excerpt_length = apply_filters('excerpt_length', 55); // set this in functions.php\n\t\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); // set this in functions.php\n\t\t\t$words = preg_split(\"/[\\n\\r\\t ]+/\", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);\n\t\t\tif ( count($words) > $excerpt_length ) {\n\t\t\t\tarray_pop($words);\n\t\t\t\t$text = implode(' ', $words);\n\t\t\t\t$text = $text . $excerpt_more;\n\t\t\t} else {\n\t\t\t\t$text = implode(' ', $words);\n\t\t\t}\n\t\t\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t}//abstract class Wf_Widget\n\t\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\n\t//global $post;\t\n\t//d('$post->post_name',$post->post_name);\n\tWf_Widget::init(); // default specs and config - sets up statics $regions and $current_specs and shortcodes\n\t\n\t\t\n\t\t\n\tif ( is_admin() ) {\n\t\trequire_once( WF_WIDGETS_PLUGIN_PATH . '/admin.php' );\n\t} else {\n\t\trequire_once( WF_WIDGETS_PLUGIN_PATH . '/frontend.php' );\n\t\tadd_action( 'template_redirect', 'setup_region_html'); // v6.2\n\t\tfunction setup_region_html() {\n\t\t\tif(!is_404() && !is_search() && !is_archive()) { // v6.3 v6.12 v6.38\n\t\t\t\tWf_Widget::wf_widgets();\n\t\t\t}\n\t\t}\n\t}\n\n\n}", "protected function loadThemeBlocks()\n {\n $this->blocks = [];\n\n $folders = [\n '',\n '/archived',\n '/elements',\n '/php',\n ];\n foreach ($folders as $folder) {\n if (file_exists($this->getFolder() . '/blocks' . $folder)) {\n $blocksDirectory = new DirectoryIterator($this->getFolder() . '/blocks' . $folder);\n foreach ($blocksDirectory as $entry) {\n // skip special subfolders containing blocks\n if (in_array('/' . $entry, $folders)) {\n continue;\n }\n $this->attemptBlockRegistration($entry);\n }\n }\n }\n\n foreach (Extensions::getBlocks() as $slug => $path) {\n $this->attemptExtensionBlockRegistration($slug, $path);\n }\n }", "public function apply_chosen_lockdowns() {\n\n\n\t\tremove_action( 'wp_head', 'rsd_link' );\n\t\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t\tremove_action( 'wp_head', 'wp_shortlink_wp_head' );\n\t\tremove_action( 'wp_head', 'wp_generator' );\n\n\n\t\tremove_action( 'template_redirect', 'maybe_redirect_404' );\n\n\t\t// disable wp-json\n\t\tadd_filter( 'rest_authentication_errors', function ( $result ) {\n\t\t\treturn is_user_logged_in() ? $result : new \\WP_Error( 'disabled', 'Disabled', array( 'status' => 401 ) );\n\t\t} );\n\n\t\tadd_action( 'after_setup_theme', function () {\n\n\t\t\t// Filters for WP-API version 1.x\n\t\t\tadd_filter( 'json_enabled', '__return_false' );\n\t\t\tadd_filter( 'json_jsonp_enabled', '__return_false' );\n\n\t\t\t// Filters for WP-API version 2.x\n\t\t\tadd_filter( 'rest_enabled', '__return_false' );\n\t\t\tadd_filter( 'rest_jsonp_enabled', '__return_false' );\n\n\t\t\t// remove the wp-json header output\n\t\t\tremove_action( 'rest_api_init', 'wp_oembed_register_route' );\n\t\t\tremove_action( 'wp_head', 'rest_output_link_wp_head' );\n\t\t\tremove_action( 'wp_head', 'wp_oembed_add_discovery_links' );\n\t\t\tremove_action( 'template_redirect', 'rest_output_link_header', 11 );\n\t\t\t// Turn off oEmbed auto discovery.\n\t\t\tadd_filter( 'embed_oembed_discover', '__return_false' );\n\t\t\t// Don't filter oEmbed results.\n\t\t\tremove_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10 );\n\t\t\t// Remove oEmbed-specific JavaScript from the front-end and back-end.\n\t\t\tremove_action( 'wp_head', 'wp_oembed_add_host_js' );\n\t\t\t// Remove all embeds rewrite rules.\n\t\t\t//add_filter( 'rewrite_rules_array', 'disable_embeds_rewrites' );\n\n\t\t\t// remove s.w.org dns-prefetch\n\t\t\tremove_action( 'wp_head', 'wp_resource_hints', 2 );\n\n\t\t\tif ( class_exists( '\\WPSEO_Frontend' ) ) {\n\t\t\t\t$inst = \\WPSEO_Frontend::get_instance();\n\t\t\t\tremove_action( 'wpseo_head', array( $inst, 'debug_mark' ), 2 );\n\t\t\t}\n\n\t\t\t//remove_action( 'admin_print_styles', 'print_emoji_styles' );\n\t\t\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\t\t\t//remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\t\t\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\t\t\tremove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n\t\t\tremove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n\t\t\tremove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n\t\t\t//add_filter( 'tiny_mce_plugins', 'machete_disable_emojicons_tinymce' );\n\t\t} );\n\n\n\t\tadd_filter( 'disable_wpseo_json_ld_search', '__return_true' );\n\n\t\t// remove version number from all scripts/styles.\n\t\tadd_filter( 'style_loader_src', function ( $src, $handle ) {\n\t\t\t//\t$src = remove_query_arg( 'ver', $src );\n\t\t\treturn $src;\n\t\t}, 1, 2 );\n\t\tadd_filter( 'script_loader_src', function ( $src, $handle ) {\n\t\t\t//\t$src = remove_query_arg( 'ver', $src );\n\t\t\treturn $src;\n\t\t}, 1, 2 );\n\n\t\tadd_action( 'wp', function () {\n\t\t\tif ( ! is_admin() ) { // maybe is_user_logged_in() as an option too?\n\t\t\t\t// remove super globals.\n\t\t\t\t// wow. I feel dirty writing this.\n\t\t\t\t// this will capture any bad code that slips through the cracks, and prevent reflection attacks.\n\t\t\t\t$_POST = array();\n\t\t\t\t$_GET = array();\n\t\t\t\t$_FILES = array();\n\t\t\t\t$_COOKIE = array();\n\t\t\t\t$_REQUEST = array();\n\t\t\t}\n\t\t} );\n\n\n\t\tadd_action( 'admin_init', function () {\n\t\t\tremove_action( 'admin_head', 'wp_admin_canonical_url' );\n\t\t} );\n\t\t// Disable W3TC footer comment for all users\n\t\tadd_filter( 'w3tc_can_print_comment', '__return_false', 10, 1 );\n\n\n\t\t// xml rpc\n\n\n\t}", "function listdrafts_load_widgets() {\r\n\tregister_widget( 'ListDrafts_Widget' );\r\n}", "public function sidebar_admin_setup() {\n\t\tglobal $wp_registered_widgets, $wp_registered_widget_controls;\n\n\t\tforeach ( $wp_registered_widgets as $id => $widget ) {\n\n\t\t\t// controlless widgets need an empty function so the callback function is called.\n\t\t\tif ( ! $wp_registered_widget_controls[$id] )\n\t\t\t\twp_register_widget_control( $id, $widget['name'], array( $this, 'widget_title_link_empty_control' ) );\n\n\t\t\t$wp_registered_widget_controls[$id]['callback_wtl_redirect'] = $wp_registered_widget_controls[$id]['callback'];\n\t\t\t$wp_registered_widget_controls[$id]['callback'] = array( $this, 'widget_title_link_extra_control');\n\t\t\tarray_push( $wp_registered_widget_controls[$id]['params'], $id );\n\t\t}\n\n\t\t// Update widget_title_link options\n\t\tif ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) ) {\n\t\t\t//error_log(print_r($_POST, true));\n\t\t\t$widget_id = $_POST['widget-id'];\n\n\t\t\tif ( isset( $_POST['widget-title-link'] ) ) {\n\t\t\t\tif ( 0 < strlen( $_POST['widget-title-link'] ) ) {\n\t\t\t\t\tself::$wtl_options[$widget_id] = esc_url( $_POST['widget-title-link'] );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tunset( self::$wtl_options[$widget_id] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tunset( self::$wtl_options[$widget_id] );\n\t\t\t}\n\n\t\t\t// Delete option if widget is being deleted\n\t\t\tif ( isset( $_POST['delete_widget'] ) ) {\n\t\t\t\tif ( 1 === (int) $_POST['delete_widget'] ) {\n\t\t\t\t\tunset( self::$wtl_options[$widget_id] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t//error_log(print_r(self::$wtl_options, true));\n\n\t\tupdate_option( 'widget_title_link', self::$wtl_options );\n\n\t}", "function agregar_widgets() {\n register_sidebar( [\n 'name' => 'widget-footer-1',\n 'id' => 'wf1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ] );\n register_sidebar( [\n 'name' => 'widget-footer-2',\n 'id' => 'wf2',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ] );\n register_sidebar( [\n 'name' => 'widget-footer-3',\n 'id' => 'wf3',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ] );\n register_sidebar( [\n 'name' => 'lateral derecho',\n 'id' => 'ld',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n ] );\n}", "protected function loadThemeLayouts()\n {\n $this->layouts = [];\n\n if (file_exists($this->getFolder() . '/layouts')) {\n $layoutsDirectory = new DirectoryIterator($this->getFolder() . '/layouts');\n foreach ($layoutsDirectory as $entry) {\n $this->attemptLayoutRegistration($entry);\n }\n }\n\n foreach (Extensions::getLayouts() as $slug => $path) {\n $this->attemptExtensionLayoutRegistration($slug, $path);\n }\n }", "public function load_admin_js_files(){\r\n\t\t\t$plugin_version = APPSIDE_MASTER_VERSION;\r\n\t\t\t$all_js_files = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'handle' => 'appside-master-widget',\r\n\t\t\t\t\t'src' => APPSIDE_MASTER_ADMIN_ASSETS .'/js/widget.js',\r\n\t\t\t\t\t'deps' => array('jquery'),\r\n\t\t\t\t\t'ver' => $plugin_version,\r\n\t\t\t\t\t'in_footer' => true\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$all_js_files = apply_filters('appside_admin_js',$all_js_files);\r\n\t\t\tif (is_array($all_js_files) && !empty($all_js_files)){\r\n\t\t\t\tforeach ($all_js_files as $js){\r\n\t\t\t\t\tcall_user_func_array('wp_enqueue_script',$js);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function qodef_core_import_widgets() {\n\t\tif ( current_user_can( 'administrator' ) ) {\n\t\t\t\n\t\t\tif ( empty( $_POST ) || ! isset( $_POST ) ) {\n\t\t\t\tqodef_core_ajax_status( 'error', esc_html__( 'Import field is empty', 'select-core' ) );\n\t\t\t} else {\n\t\t\t\t$data = $_POST;\n\t\t\t\tif ( wp_verify_nonce( $data['nonce'], 'qodef_import_widgets_secret_value' ) ) {\n\t\t\t\t\t$content = $data['content'];\n\t\t\t\t\t$unserialized_content = unserialize( base64_decode( $content ) );\n\t\t\t\t\t\n\t\t\t\t\tforeach ( (array) $unserialized_content['widgets'] as $widget_id => $widget_data ) {\n\t\t\t\t\t\tupdate_option( 'widget_' . $widget_id, $widget_data );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sidebars = get_option( \"sidebars_widgets\" );\n\t\t\t\t\tunset( $sidebars['array_version'] );\n\t\t\t\t\t$data = $unserialized_content;\n\t\t\t\t\t\n\t\t\t\t\tif ( is_array( $data['sidebars'] ) ) {\n\t\t\t\t\t\t$sidebars = array_merge( (array) $sidebars, (array) $data['sidebars'] );\n\t\t\t\t\t\tunset( $sidebars['wp_inactive_widgets'] );\n\t\t\t\t\t\t$sidebars = array_merge( array( 'wp_inactive_widgets' => array() ), $sidebars );\n\t\t\t\t\t\t$sidebars['array_version'] = 2;\n\t\t\t\t\t\twp_set_sidebars_widgets( $sidebars );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tqodef_core_ajax_status( 'success', esc_html__( 'Widgets imported successfully', 'select-core' ) );\n\t\t\t\t} else {\n\t\t\t\t\tqodef_core_ajax_status( 'error', esc_html__( 'Non valid authorization', 'select-core' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tqodef_core_ajax_status( 'error', esc_html__( 'You don\\'t have privileges for this operation', 'select-core' ) );\n\t\t}\n\t}", "function arphabet_widgets_init()\n {\n\n register_sidebar(\n array(\n 'name' => 'Blog Sidebar',\n 'id' => 'blog_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => 'Archive Sidebar',\n 'id' => 'archive_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => 'Standard Blog Sidebar',\n 'id' => 'standard_blog_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => 'Grid Blog Sidebar',\n 'id' => 'grid_blog_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n )\n );\n }", "function crb_widgets_init() {\n\tregister_sidebar(array(\n\t\t'name' => 'Default Sidebar',\n\t\t'id' => 'default-sidebar',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h5 class=\"widgettitle\">',\n\t\t'after_title' => '</h5>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'name' => 'Blog Sidebar',\n\t\t'id' => 'blog-sidebar',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h5 class=\"widgettitle\">',\n\t\t'after_title' => '</h5>',\n\t));\n}", "protected function register_widgets() {\n // require_once $path_to_widget; $widget::inst();\n }", "function ipacs_widgets_init() { \n\n register_sidebar(array(\n 'name' => __('Content blocks', 'ipacs-lite'),\n 'id' => 'ipacs-content-blocks',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n\n register_sidebar(array(\n 'name' => __('Sidebar', 'zerif-lite'),\n 'id' => 'sidebar-1',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ));\n\n register_sidebar(array(\n 'name' => __('About us section', 'zerif-lite'),\n 'id' => 'sidebar-aboutus',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ));\n\n register_sidebars( \n 3, \n array(\n 'name' => __('Footer area %d','zerif-lite'),\n 'id' => 'zerif-sidebar-footer',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget footer-widget-footer %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>'\n ) \n );\n \n}", "public function widgets( ) {\n $sidebar_config = array(\n 'name' => __('Sidebar', 'hoverboard'),\n 'id' => 'main-sidebar',\n 'description' => __('The primary widget area', 'hoverboard'),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n );\n register_sidebar($sidebar_config);\n\n do_action('hoverboard/widgets');\n }", "function biagiotti_mikado_include_blog_elementor_widgets_files() {\n\t\tif ( biagiotti_mikado_is_plugin_installed('core') && biagiotti_mikado_is_theme_registered() ) {\n\t\t\tforeach ( glob( BIAGIOTTI_MIKADO_FRAMEWORK_MODULES_ROOT_DIR . '/blog/shortcodes/*/elementor-*.php' ) as $shortcode_load ) {\n\t\t\t\tinclude_once $shortcode_load;\n\t\t\t}\n\t\t}\n\t}", "function flow_elated_load_shortcodes() {\n foreach(glob(ELATED_FRAMEWORK_ROOT_DIR.'/modules/shortcodes/*/load.php') as $shortcode_load) {\n include_once $shortcode_load;\n }\n\n include_once ELATED_FRAMEWORK_MODULES_ROOT_DIR.'/shortcodes/lib/shortcode-loader.inc';\n }", "function ark_widgets_init() {\n\n\t\tregister_sidebar(array(\n\t\t\t'name' => ark_wp_kses(__('Content Sidebar', 'ark')),\n\t\t\t'id' => 'sidebar-content',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t'after_widget' => '</div></div>',\n\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\n\t\tregister_sidebar(array(\n\t\t\t'name' => ark_wp_kses(__('Content Sidebar 2', 'ark')),\n\t\t\t'id' => 'sidebar-content-2',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t'after_widget' => '</div></div>',\n\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\n\t\tif (class_exists('WooCommerce')) {\n\t\t\tregister_sidebar(array(\n\t\t\t\t'name' => 'Shop Sidebar',\n\t\t\t\t'id' => 'shop-sidebar',\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t\t'after_title' => '</h4>'\n\t\t\t));\n\t\t}\n\n\t\tfor ($i = 1; $i <= 4; $i++) {\n\t\t\tregister_sidebar(array(\n\t\t\t\t'name' => ark_wp_kses(__('Footer Sidebar', 'ark')) . ' #' . $i,\n\t\t\t\t'id' => 'sidebar-footer-' . $i,\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"widget-body\">',\n\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t'before_title' => '<h3 class=\"footer-title widget-title ffb-widget-title\">',\n\t\t\t\t'after_title' => '</h3>'\n\t\t\t));\n\t\t}\n\n\t\tif (class_exists('ffSidebarManager')) {\n\t\t\t$sidebarsThemeOptions = ffSidebarManager::getQuery('sidebars');\n\t\t\tif( !empty($sidebarsThemeOptions) ) {\n\t\t\t\tforeach ($sidebarsThemeOptions->get('sidebars') as $key => $sidebar) {\n\t\t\t\t\tregister_sidebar(array(\n\t\t\t\t\t\t'name' => strip_tags($sidebar->get('title')),\n\t\t\t\t\t\t'id' => 'ark-custom-sidebar-' . sanitize_title($sidebar->get('slug')),\n\t\t\t\t\t\t'description' => strip_tags($sidebar->get('description')),\n\t\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget ffb-widget %2$s\"><div class=\"blog-sidebar widget-body\">',\n\t\t\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t\t\t'before_title' => '<h4 class=\"widget-title ffb-widget-title\">',\n\t\t\t\t\t\t'after_title' => '</h4>'\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function ourWidgetsInit() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"side-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Left',\n 'id' => 'footerleft',\n 'before_widget' => '<div class=\"left-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Center-Left',\n 'id' => 'footercenterleft',\n 'before_widget' => '<div class=\"center-left-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Center-Right',\n 'id' => 'footercenterright',\n 'before_widget' => '<div class=\"center-right-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n register_sidebar(array(\n 'name' => 'Footer Right',\n 'id' => 'footerright',\n 'before_widget' => '<div class=\"right-widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"footer-widget-title\">',\n 'after_title' => '</h4>'\n ));\n}" ]
[ "0.7622263", "0.67964506", "0.6604515", "0.65217775", "0.64398754", "0.6412477", "0.6410669", "0.63087267", "0.63083124", "0.62683433", "0.6252574", "0.61995727", "0.6197615", "0.61772716", "0.61285245", "0.6122483", "0.6113885", "0.6096605", "0.60724133", "0.6068006", "0.605923", "0.60403687", "0.6039114", "0.59975576", "0.5996064", "0.59699166", "0.5961249", "0.59551924", "0.5955158", "0.5954118", "0.59449965", "0.5941972", "0.59346783", "0.59330475", "0.5930833", "0.591609", "0.5915652", "0.59070945", "0.5904389", "0.59028816", "0.58989125", "0.58983135", "0.5887436", "0.58820444", "0.5871937", "0.58713984", "0.5870334", "0.5865168", "0.58600783", "0.585932", "0.58521837", "0.584416", "0.584037", "0.58381045", "0.5830678", "0.5823639", "0.5817725", "0.58155966", "0.57984483", "0.5795761", "0.57947385", "0.5786166", "0.5784445", "0.5784431", "0.5780291", "0.5778544", "0.57724285", "0.57714474", "0.57629544", "0.5760704", "0.5748442", "0.57456464", "0.5730126", "0.5725065", "0.5715922", "0.5713385", "0.571263", "0.5711554", "0.5704174", "0.57024956", "0.5697016", "0.5695167", "0.56922615", "0.56885946", "0.5679192", "0.567541", "0.56751543", "0.56728154", "0.566402", "0.5663552", "0.5658619", "0.565375", "0.5632327", "0.56319076", "0.56308633", "0.5629853", "0.5629764", "0.5629264", "0.5626745", "0.56208193" ]
0.7657539
0
Get all settings with cache support.
Получить все настройки с поддержкой кэша.
public static function allCached() { return Cache::tags(['settings'])->rememberForever('settings.all:' . locale(), function () { return self::all()->mapWithKeys(function ($setting) { return [$setting->key => $setting->value]; }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAllSettings()\n {\n return Cache::rememberForever('settings.all', function () {\n return self::all();\n });\n }", "public function hydrateSettingsCache()\n {\n // Get all settings\n $settings = setting()->all();\n // Cache it forever\n \\Cache::forever($this->settingsCacheKey(), $settings);\n\n return $settings;\n }", "public function get_all()\n\t{\n\t\tif (self::$cache)\n\t\t{\n\t\t\treturn self::$cache;\n\t\t}\n\n\t\t// FIXME: Put this back after 1.2.2 is released\n\t\t// $settings = ci()->settings_m->get_all();\n\t\t\n\t\t$settings = ci()->db\n\t\t\t->select('*, IF(`value` = \"\", `default`, `value`) as `value`', FALSE)\n\t\t\t->get('settings')\n\t\t\t->result();\n\n\t\tforeach ($settings as $setting)\n\t\t{\n\t\t\tself::$cache[$setting->slug] = $setting->value;\n\t\t}\n\n\t\treturn self::$cache;\n\t}", "public static function getCacheSettings()\n {\n if (!isset(self::$cacheSettings)) {\n $settings = [];\n $serialsettings = xarModVars::get('dynamicdata', 'objectcache_settings');\n if (!empty($serialsettings)) {\n $settings = unserialize($serialsettings);\n }\n self::$cacheSettings = $settings;\n }\n return self::$cacheSettings;\n }", "private function _getConfigs()\n {\n $key = KEY_COMMON_CACHE;\n\n if (($settingInfo = Cache::read($key)) === false) {\n $settingTbl = TableRegistry::getTableLocator()->get('Settings');\n $conditions = [\n 'OR' => [\n [\n 'name IN' => [\n 'site_name',\n ],\n ],\n ['name LIKE' => 'site_mail_%'],\n ['name LIKE' => 'me_%'],\n ['name LIKE' => 'meta_%'],\n ],\n ['status' => ENABLED],\n ];\n\n /* @var \\App\\Model\\Table\\SettingsTable $settingTbl */\n $settingInfo = $settingTbl->getListSetting([], $conditions);\n Cache::write($key, $settingInfo);\n }\n\n return $settingInfo;\n }", "public static function getAll() {\n return self::$cache;\n }", "public static function getSettings() {\n if ($result = \\Drupal::cache()->get(self::$nameSettingsCache)) {\n return $result->data;\n }\n else {\n return self::setSettings();\n }\n }", "public function getAll()\n {\n return $this->_settings;\n }", "public function GetAllSettings()\r\n\t\t{\r\n\t\t\t$settings = $this->DB->GetAll(\"SELECT * FROM farm_settings WHERE farmid=?\", array($this->ID));\r\n\t\t\t\r\n\t\t\t$retval = array();\r\n\t\t\tforeach ($settings as $setting)\r\n\t\t\t\t$retval[$setting['name']] = $setting['value']; \r\n\t\t\t\r\n\t\t\t$this->SettingsCache = array_merge($this->SettingsCache, $retval);\r\n\t\t\t\t\r\n\t\t\treturn $retval;\r\n\t\t}", "public function getAllSettings() {\n return $this->settings;\n }", "public function all ()\n\t{\n\n\t\treturn $this->settings;\n\n\t}", "public function getAllSettings()\n {\n return $this->settingsStorage->getAllSettings();\n }", "public function cache() {\n\t\t$config = array();\n\n\t\tforeach (Cache::configured() as $key) {\n\t\t\t$temp = Cache::config($key);\n\t\t\t$config[$key] = $temp['settings'];\n\t\t}\n\n\t\tksort($config);\n\n\t\t$this->set('configuration', $config);\n\t}", "public static function getAllSettings(){\n\t\t$dependency = new CDbCacheDependency('SELECT MAX(updated_time) FROM global_settings');\n\t\t$models = GlobalSettings::model()->cache(1000, $dependency)->findAll();\n\n\t\treturn $models;\n\t}", "public function getSettings() {\n if ($blogSettings = Cache::read($this->_cacheKey)) {\n return $blogSettings;\n }\n $blogSettings = $this->find('list', array(\n 'fields' => array('setting', 'value')\n ));\n Cache::write($this->_cacheKey, $blogSettings);\n return $blogSettings;\n }", "public static function getAllSettings() {\n\t\treturn self::$collection;\n\t}", "public static function settings() {\n\t\treturn self::get_instance()->settings->get_all();\n\t}", "public function all(): array\n {\n return $this->caches;\n }", "private static function getSettings() {\n return Kohana::$config->load('doctrine')->cache;\n }", "public static function all(): object\n {\n self::settingsExists();\n return self::$settings;\n }", "public function GetAllSettings()\r\n\t\t{\r\n\t\t\t$settings = $this->DB->GetAll(\"SELECT * FROM farm_role_settings WHERE farm_roleid=?\", array($this->ID));\r\n\t\t\t$retval = array();\r\n\t\t\tforeach ($settings as $setting)\r\n\t\t\t\t$retval[$setting['name']] = $setting['value']; \r\n\t\t\t\r\n\t\t\t$this->SettingsCache = array_merge($this->SettingsCache, $retval);\r\n\t\t\t\t\r\n\t\t\treturn $retval;\r\n\t\t}", "function get_cache_config() {\r\n $config = array();\r\n\r\n $cssjs_types = $this->get_cssjs_types();\r\n $html_types = $this->get_html_types();\r\n $other_types = $this->get_other_types();\r\n\r\n $this->_get_cache_config($config, $cssjs_types, 'cssjs');\r\n $this->_get_cache_config($config, $html_types, 'html');\r\n $this->_get_cache_config($config, $other_types, 'other');\r\n\r\n return $config;\r\n }", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public static function allFromCache()\n {\n return (new static)->getCache()->rememberForever(static::class, function () {\n return static::loadFromDatabase();\n });\n }", "public function cache() {\n return $this->get('cache', FALSE);\n }", "public function getAll(): array {\n\t\treturn $this->cache;\n\t}", "function getSettings()\n {\n return Vip_Setting::getAllByProductAndCustomer($this, $this->_customer);\n }", "public function getCacheFrontendSettings()\n {\n return isset($this->_data['cache']['frontend']) ? $this->_data['cache']['frontend'] : array();\n }", "public function getConfigCache()\n {\n return $this->getConfiguration()->getConfigCache();\n }", "public function getCacheOptions(): array\n {\n }", "public function settingAll()\n {\n return Setting::all();\n }", "public function getCache();", "public function getAllCacheable();", "private function fetchSettings()\n {\n $model = $this->getModelClassName();\n\n if ($this->app['config']->get('laravel-settings.use_cache')) {\n $expireSeconds = $this->app['config']->get('laravel-settings.cache_expire');\n\n $this->settings = Cache::remember(\n 'settings',\n Carbon::now()->addSeconds($expireSeconds),\n function () use ($model) {\n return $model::get();\n }\n );\n } else {\n $this->settings = $model::get();\n }\n }", "public static function getCache(){\n return self::$cache;\n }", "private function loadCurrentSettings(): array\n {\n $key = [self::KEY_CACHE, 'host' => $this->domains->currentHost];\n $data = $this->cache->get($key);\n\n if (!$data) {\n \n try{\n $data = $this->settingsRepository->getAllByDomain($this->domains->getCurrentId(),$this->languages->getCurrentId(), true);\n }\n catch(\\DomainException $e){\n return [];\n }\n \n $this->cache->set($key, $data);\n }\n \n return (array)$data;\n }", "public static function getSettingsArray()\n {\n return Cache::rememberForever('settings.toArray', function () {\n return self::getAllSettings()->pluck('value', 'name')->toArray();\n });\n }", "public function getCaches() {\n $caches = $this->getFacility(Registry::CACHES);\n foreach ($caches as $cache) $cache->init();\n return $caches;\n }", "public function getSettings() {\n\t\t$listEntries = Temboo_Results::getSubItemByKey($this->base, \"items\");\n\t\t$resultArray = array();\n\t\tif(!is_null($listEntries)) {\n\t\t\tforeach ($listEntries as $entry) {\n\t\t \tarray_push($resultArray, new Google_Calendar_Setting_output($entry));\n\t\t\t}\n\t\t}\n\t\treturn $resultArray;\n\t}", "public static function getCache(){\n\t}", "public function getCache()\n {\n\n return $this->get( 'cache', false );\n }", "public function getCaching()\n {\n return $this->caching;\n }", "public function get_settings() {\n\t\tif ( 0 === count( $this->settings ) ) {\n\t\t\t$this->init_settings();\n\t\t}\n\t\treturn $this->settings;\n\t}", "private static function getAllSettings(): array\n {\n $setting = Setting::settings();\n $s = [];\n foreach ($setting as $section){\n foreach ($section['elements'] as $element){\n $name = $element['name'];\n $value = setting($name);\n $s[$name] =$value;\n }\n }\n return $s;\n }", "public static function &getSettings()\n\t{\n\t\treturn parent::internalGetSettings(self::$configId);\n\t}", "public function getSettings() : array\n {\n return $this->settings;\n }", "public static function getCaches()\n {\n if(self::$caches) {\n return self::$caches;\n }\n\n return self::$caches = [\n new cache_none(),\n new cache_sql(),\n new cache_redis(),\n ];\n }", "public function getSettings()\n {\n return $this->get('settings');\n }", "public function getAllCached()\n {\n // Otherwise, run the code in the anonymous function to retrieve all the data in the links table, and return the cache at the same time.\n return Cache::remember($this->cache_key, $this->cache_expire_in_seconds, function(){\n return $this->all();\n });\n }", "public function getSettings()\r\n {\r\n //query\r\n $result = $this->find('first', array('conditions' => array('Setting.id' => '1'), 'fields' => array('Setting.time_zone', 'Setting.title', 'Setting.title_text', 'Setting.title_logo', 'Setting.currency_symbol', 'Setting.date_format', 'Setting.time_format', 'Setting.pipeline', 'Setting.language')));\r\n return $result;\r\n }", "protected function cache()\n {\n return $this->cache;\n }", "public function getAllSettings()\n {\n $tmpSettings = [];\n\n $dbSettings = $this->_conn->arrayQuery('SELECT name, value, serialized FROM settings');\n foreach ($dbSettings as $item) {\n if ($item['serialized']) {\n $item['value'] = unserialize($item['value']);\n } // if\n\n $tmpSettings[$item['name']] = $item['value'];\n } // foreach\n\n return $tmpSettings;\n }", "public function get_settings () {\n\t\t$settings = array();\n\t\t$transient_key = $this->token . '-settings';\n\n\t\tif ( false === ( $settings = get_transient( $transient_key ) ) ) {\n\n\t\t\t$args = array( 'action' => 'woodojosettings' );\n\t\t\t$response = $this->request( $args );\n\n\t\t\tif ( ( $response->response->code == 1 ) && ( isset( $response->payload ) ) ) {\n\t\t\t\t$settings = $response->payload;\n\n\t\t\t\tset_transient( $transient_key, $settings, $this->settings_expire_time );\n\t\t\t}\n\t\t}\n\n\t\treturn $settings;\n\t}", "public function caching_environment()\n {\n $info = array();\n $info['cache_on'] = array('block_main_rss__cache_on');\n $info['ttl'] = intval(get_option('rss_update_time'));\n return $info;\n }", "public function getCacheConfig() {\r\n return $this->config->cache;\r\n }", "function getAllSettings($flag = false) :array\n {\n return collect(getSettingsFromTable())->toArray();\n }", "public function getCaches()\n {\n return $this->data['caches'];\n }", "public static function getDefaultSettings() {\r\n return array(\r\n // directory\r\n 'cacheDir' => 'cache/phpcache',\r\n // caching time in seconds\r\n 'cacheTime' => '360',\r\n // Debugging\r\n 'debug' => false\r\n );\r\n }", "public function getSettings(): array;", "public static function getSettings(): array;", "public function listCache();", "protected function getSettingStorage()\n {\n $collection = $this->sm->get('yimaSettings')\n ->using('analytics');\n\n return $collection;\n }", "public static function getSettings() {\t\t\n\t\t$model = new SettingsModel('Settings',new Database());\n\t\t$settings = $model->fetchList(array('setting','value'));\n\t\treturn $settings;\n\t}", "static public function read_all( )\n\t{\n\t\tif (self::get_instance( )) {\n\t\t\treturn self::get_instance( )->get_settings( );\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function get_settings() {\n\n\t\t// Return cached settings if they've already been processed\n\t\tif ( !empty( $this->settings ) ) {\n\t\t\treturn $this->settings;\n\t\t}\n\n\t\t// Plugin Authors: Filter to provide arbitrary JSON file paths\n\t\tforeach( (array) apply_filters( 'styles_json_files', array() ) as $json_file ) {\n\t\t\t$this->settings = $this->load_settings_from_json_file( $json_file, $this->settings );\n\t\t}\n\n\t\t// Last-second filter to edit settings as PHP array instead of JSON\n\t\treturn apply_filters( 'styles_settings', $this->settings );\n\t}", "public static function getSettings(): array {}", "public function getCache()\n {\n return $this->call('cache');\n }", "function getCache();", "protected function _getCache()\n\t{\n\t ### create the option configuration to pass unto cache\n\t\t$_cache = ServiceLocatorFactory::getLocator('DV\\View\\Helper\\html\\Cache') ;\n\t\treturn $_cache ;\n\t}", "public function getConfigs($cache = false) {\n\n $token = 'aws-sdk-configs';\n $cacheConfig = \"aws-1min\";\n\n if(($configs = Cache::write($token,$cacheConfig)) === false || !$cache) {\n\n $conf = $this->find('all',array(\n 'contain'=>false,\n 'order'=>array(\"AwsSdkConfig.name\"=>\"ASC\")\n ));\n\n $configs = array();\n\n foreach($conf as $k=>$v) {\n $configs[$v['AwsSdkConfig']['id']] = $v;\n }\n\n Cache::write($token,$configs,$cacheConfig);\n\n }\n\n return $configs;\n\n }", "function settings($key)\n {\n static $settings;\n\n if (is_null($settings)) {\n $settings = Cache::remember('settings', 24 * 60, function () {\n return array_pluck(Setting::active()->get()->toArray(), 'value', 'key');\n });\n }\n\n if (empty($settings[$key])) {\n return null;\n }\n\n return (is_array($key)) ? array_only($settings, $key) : $settings[$key];\n }", "public function getSettings() {\n\t\t\treturn array_slice($this->__settings, 0);\n\t\t}", "public function all(): array\n {\n $settings = $this->settings;\n foreach (Compiler::getViewVariables() as $key) {\n if (array_key_exists($key, $this->settings)) {\n $settings[$key] = $this->settings[$key];\n } elseif (array_key_exists($key, $this->defaults)) {\n $settings[$key] = $this->defaults[$key];\n } else {\n $settings[$key] = null;\n }\n }\n\n return array_filter($settings, function ($value, $setting) {\n return ! in_array($setting, self::$ignore, true);\n }, ARRAY_FILTER_USE_BOTH);\n }", "public static function getSettings()\n {\n $settings = array();\n $request = \\tabs\\api\\client\\ApiClient::getApi()->get(\n '/api/setting'\n );\n \n if ($request->status == 200 \n && is_array($request->response)\n ) {\n foreach ($request->response as $stng) {\n $setting = new \\tabs\\api\\core\\ApiSetting();\n $setting->setName($stng->setting);\n $setting->setValue($stng->value);\n $setting->setBrandcode($stng->brandcode);\n $settings[$setting->getIndex()] = $setting;\n }\n } else {\n // You probably dont have access to do this\n throw new \\tabs\\api\\client\\ApiException(\n $request,\n 'Could not fetch settings'\n );\n }\n \n return $settings;\n }", "public static function get_settings()\n {\n }", "public function all()\n {\n return $this->generateCollect(SettingModel::all());\n }", "protected function getCaches() {\n\n\t\t// any cache configured?\n\t\tif ( !is_array( $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// collect all redis-servers\n\t\t$servers = array();\n\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] as $keyCache => $valueCache ) {\n\t\t\tif ( $valueCache[ 'backend' ] == 'TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Backend\\\\RedisBackend' ) {\n\t\t\t\t$hostname = '127.0.0.1';\n\t\t\t\t$port = 6379;\n\t\t\t\tif ( $valueCache[ 'options' ] ) {\n\t\t\t\t\tif ( $valueCache[ 'options' ][ 'hostname' ] )\n\t\t\t\t\t\t$hostname = $valueCache[ 'options' ][ 'hostname' ];\n\t\t\t\t\tif ( $valueCache[ 'options' ][ 'port' ] )\n\t\t\t\t\t\t$port = $valueCache[ 'options' ][ 'port' ];\n\t\t\t\t}\n\t\t\t\t$servers[ $hostname . ':' . $port ] = $valueCache[ 'options' ];\n\t\t\t}\n\t\t}\n\n\t\tif ( count( $servers ) === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// add all redis-servers\n\t\t$redis = new \\Redis();\n\n\t\t$caches = array();\n\n\t\tforeach( $servers as $server => $options ) {\n\t\t\t$serveroptions = explode( ':', $server );\n\t\t\t$connectionTimeout = 0;\n\t\t\tif ( $options[ 'connectionTimeout' ] )\n\t\t\t\t$connectionTimeout = $options[ 'connectionTimeout' ];\n\t\t\tif ( $redis->connect( $serveroptions[ 0 ], $serveroptions[ 1 ], $connectionTimeout ) ) {\n\t\t\t\tif ( $options[ 'password' ] !== '' ) \n\t\t\t\t\t$redis->auth( $options[ 'password' ] );\n\t\t\t\t$caches[ $server ] = $redis->info();\n\t\t\t\t$redis->close();\n\t\t\t}\n\t\t}\n\n\t\treturn $caches;\n\t}", "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings()\n {\n return $this->settings;\n }", "public function getSettings(){\n\t\t$GLOBALS['cassie'] = new Cassie();\n\t\t$GLOBALS['cassie']->connect();\n\n\t\t$results = $GLOBALS['cassie']->getSettings();\n\t\t$settings = array(\n\t\t\t\"highPriority\" => false,\n\t\t\t\"location\" => false,\n\t\t\t\"os\" => false,\n\t\t\t\"priorityAndLocation\" => false,\n\t\t\t\"languageAndLocation\" => false\n\t\t\t);\n\n\t\tforeach ($results as $row){\n\t\t\t$boolean = $row['enabled'];\n\n\t\t\tif($row['rule_name'] == \"priority\"){\n\t\t\t\t$settings[\"highPriority\"] = $boolean;\n\t\t\t}\n\t\t\tif($row['rule_name'] == \"country\"){\n \t\t$settings[\"location\"] = $boolean;\n \t\t}\n\t\t\tif($row['rule_name'] == \"os\"){\n\t\t\t\t$settings[\"os\"] = $boolean;\n\t\t\t}\n\t\t\tif($row['rule_name'] == \"priorityAndLocation\"){\n\t\t\t\t$settings[\"priorityAndLocation\"] = $boolean;\n\t\t\t}\n\t\t\tif($row['rule_name'] == \"languageAndLocation\"){\n\t\t\t\t$settings[\"priorityAndLocation\"] = $boolean;\n\t\t\t}\n\n\t\t}\n\t\treturn $settings;\n\t }", "private function getSettings() {\n\t\tif (!empty($this->settings)) {\n\t\t\treturn $this->settings;\n\t\t}\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `\" . (version_compare(VERSION, '2.0.1', '<') ? 'group' : 'code') . \"` = '\" . $this->db->escape($this->name) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($this->name . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\t$this->settings = $settings;\n\t\treturn $settings;\n\t}", "private function getSettings() {\n\t\treturn $this->settings;\n\t}", "function get_settings($refresh=null) {\n\treturn _get_settings(self_char_id(), $refresh);\n}", "function get_settings() {\n \n $settings = get_option($this->setting_key);\n return $settings;\n }", "public static function get_setting_items()\n {\n }", "public function get_settings()\n {\n }", "public function get_settings()\n {\n }", "public function getCacheConfiguration()\n {\n return $this->config['cache'];\n }", "public function getSettings()\n {\n\n return $this->settings;\n\n }", "private function cache()\n {\n if (null !== $this->cache) {\n return $this->cache;\n }\n\n /** @var \\t3lib_cache_Manager $typo3CacheManager */\n global $typo3CacheManager;\n\n $this->cache = $typo3CacheManager->getCache($this->strCache);\n\n return $this->cache;\n }" ]
[ "0.83407587", "0.78834736", "0.78409624", "0.77207595", "0.75558627", "0.7475883", "0.74726087", "0.7395053", "0.7313714", "0.7303871", "0.7180174", "0.7169363", "0.7162563", "0.7156257", "0.7155408", "0.7145997", "0.71397233", "0.7130503", "0.71075106", "0.70991564", "0.70553744", "0.70280015", "0.69547755", "0.69547755", "0.69547755", "0.69547755", "0.69547755", "0.69547755", "0.69547755", "0.69547755", "0.69547755", "0.69484156", "0.6935617", "0.69348365", "0.6876137", "0.68529433", "0.6845743", "0.6840468", "0.68378323", "0.6820469", "0.6815154", "0.6737537", "0.67136604", "0.66928923", "0.66840285", "0.6670564", "0.6665168", "0.6663175", "0.66450185", "0.6632749", "0.66296726", "0.66296107", "0.66291994", "0.65953964", "0.6588766", "0.6586498", "0.65669376", "0.65573025", "0.6552624", "0.65515757", "0.6549979", "0.6534968", "0.6534433", "0.65200806", "0.6502439", "0.6493665", "0.64855796", "0.6480519", "0.647962", "0.6476343", "0.6464086", "0.6444483", "0.6444019", "0.6442112", "0.6441729", "0.6438897", "0.6409581", "0.64091533", "0.64077044", "0.64030474", "0.6397097", "0.6391635", "0.63900334", "0.6382286", "0.6377687", "0.6370616", "0.6370616", "0.6370616", "0.6370616", "0.6362346", "0.63616246", "0.6360095", "0.6359324", "0.6356542", "0.635245", "0.635017", "0.63483876", "0.6336849", "0.6331387", "0.6329174" ]
0.8287533
1
Set a translatable settings.
Установите переводимые настройки.
public static function setTranslatableSettings($settings = []) { foreach ($settings as $key => $value) { static::updateOrCreate(['key' => $key], [ 'is_translatable' => true, 'value' => $value, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setTranslatableSettings($settings = [])\n {\n foreach ($settings as $key => $value) {\n static::updateOrCreate(['key' => $key], [\n 'is_translatable' => true,\n 'value' => $value,\n ]);\n }\n }", "public function set($settings) {}", "public function set(array $settings = array());", "public function set(array $settings = []);", "function set_settings(&$settings){\n $this->_settings = $settings;\n }", "private function setLocaleSettings()\n\t{\n\t\t$this->setDaysOfWeekNames();\n\t\t$this->setMonthNames();\n\t}", "public function setSettings(array $settings);", "public function setSettings(array $settings);", "public function setSettings($settings)\n {\n\n $this->settings = $settings;\n\n }", "public function setSettings($settings)\n {\n $this->attributes['settings'] = json_encode($settings);\n }", "public function setTranslation( $text ) {\n\t\t$this->translation = $text;\n\t}", "public function settingLanguage() {}", "private function setTranslatable(): void\n {\n // Flat dei translatable fields;\n $this->flattenTranslatableFields();\n\n // Considera solo i fields che hanno 'translatable' impostato a true.\n $translatableFields = Arr::where($this->fields, function($value, $key) {\n return $value['translatable'] == true;\n });\n $translatableFields = $this->buildFormattedArrayValues(array_keys($translatableFields));\n\n // Leggi gli stub.\n $translatableNamespaces = ($translatableFields === '') ? $this->dropLine : file_get_contents(__DIR__ . '/stubs/translatable/translatable_namespaces.stub');\n $translatableTraits = ($translatableFields === '') ? $this->dropLine : file_get_contents(__DIR__ . '/stubs/translatable/translatable_traits.stub');\n $translatableEagerLoading = ($translatableFields === '') ? $this->dropLine : file_get_contents(__DIR__ . '/stubs/translatable/translatable_eager.stub');\n $translatableAttributes = ($translatableFields == '') ? $this->dropLine : str_replace('##translatable_fields##', $translatableFields, file_get_contents(__DIR__ . '/stubs/translatable/translatable_attributes.stub'));\n\n // Aggiungi i namespaces.\n $this->modelStub = str_replace('##translatable_namespaces##', $translatableNamespaces, $this->modelStub);\n\n // Aggiungi le Traits.\n $this->modelStub = str_replace('##translatable_traits##', $translatableTraits, $this->modelStub);\n\n // Aggiungi eager loading.\n $this->modelStub = str_replace('##translatable_eager##', $translatableEagerLoading, $this->modelStub);\n\n // Aggiungi i translatable attributes.\n $this->modelStub = str_replace('##translatable_attributes##', $translatableAttributes, $this->modelStub);\n\n if ($translatableFields != '')\n $this->writeTranslationModel();\n }", "public static function setSettings(array $settings): void {}", "public function settings($settings)\n\t\t{\n\t\t\t\n\t\t\tforeach($settings as $k => $s){$this->_settings[$k] = $s;}\n\t\t}", "function setTranslated($translated) {\n\t\t$this->setData('translated', (boolean)$translated);\n\t}", "public function setTranslatable($translatable)\n {\n if ($translatable === true) {\n $this->setType('translatable');\n } else {\n $this->setType('string');\n }\n }", "protected static function updateSettingsText() {\n\n\t\t$filelist = UniteFunctionsRev::getFileList( self::$path_settings,'xml' );\n\t\tforeach ( $filelist as $file ) {\n\t\t\t$filepath = self::$path_settings . $file;\n\t\t\tUniteFunctionsWPRev::writeSettingLanguageFile( $filepath );\n\t\t}\n\n\t}", "protected function setLanguageKeys() {}", "public function setCurrentTranslations()\n {\n }", "public function setCurrentTranslations()\n {\n }", "public function registerTranslations() {\n Yii::$app->i18n->translations['settings'] = [\n 'class' => 'yii\\i18n\\PhpMessageSource',\n 'sourceLanguage' => 'en',\n 'basePath' => Yii::getAlias('@vendor/plathir/yii2-smart-settings/messages'),\n ];\n }", "protected static function setLanguageKeys() {}", "public function setSettings(Settings $settings)\n {\n $this->settings = $settings;\n }", "protected function set_options(){\n $settings_option = get_option( 'trp_settings', 'not_set' );\n\n // initialize default settings\n $default = get_locale();\n if ( empty( $default ) ){\n $default = 'en_US';\n }\n $default_settings = array(\n 'default-language' => $default,\n 'translation-languages' => array( $default ),\n 'publish-languages' => array( $default ),\n 'native_or_english_name' => 'english_name',\n 'add-subdirectory-to-default-language' => 'no',\n 'force-language-to-custom-links' => 'yes',\n 'trp-ls-floater' => 'yes',\n 'shortcode-options' => 'flags-full-names',\n 'menu-options' => 'flags-full-names',\n 'floater-options' => 'flags-full-names',\n 'floater-position' => 'bottom-right',\n 'url-slugs' => array( 'en_US' => 'en', '' ),\n );\n\n if ( 'not_set' == $settings_option ){\n update_option ( 'trp_settings', $default_settings );\n $settings_option = $default_settings;\n }else{\n // Add any missing default option for trp_setting\n foreach ( $default_settings as $key_default_setting => $value_default_setting ){\n if ( !isset ( $settings_option[$key_default_setting] ) ) {\n $settings_option[$key_default_setting] = $value_default_setting;\n }\n }\n }\n\n\n /**\n * These options (trp_advanced_settings,trp_machine_translation_settings) are not part of the actual trp_settings DB option.\n * But they are included in $settings variable across TP\n */\n $settings_option['trp_advanced_settings'] = get_option('trp_advanced_settings', array() );\n\n // Add any missing default option for trp_machine_translation_settings\n $default_trp_machine_translation_settings = $this->get_default_trp_machine_translation_settings();\n $settings_option['trp_machine_translation_settings'] = array_merge( $default_trp_machine_translation_settings, get_option( 'trp_machine_translation_settings', $default_trp_machine_translation_settings ) );\n\n\n /* @deprecated Setting only used for compatibility with Deepl Add-on 1.0.0 */\n if ( $settings_option['trp_machine_translation_settings']['translation-engine'] === 'deepl' && defined( 'TRP_DL_PLUGIN_VERSION' ) && TRP_DL_PLUGIN_VERSION === '1.0.0' ) {\n $trp_languages = new TRP_Languages();\n $settings_option['machine-translate-codes'] = $trp_languages->get_iso_codes($settings_option['translation-languages']);\n if ( isset( $settings_option['trp_machine_translation_settings']['deepl-api-key'] ) ) {\n $settings_option['deepl-api-key'] = $settings_option['trp_machine_translation_settings']['deepl-api-key'];\n }\n }\n\n $this->settings = $settings_option;\n }", "public function setTranslation($value)\n {\n $this->gleTranslation = trim((string) $value);\n }", "private function _set_lang() {\n\t\t$this->language = $this->config->item('language');\n\t\t$this->session->set_userdata('language', $this->language);\n\t\t$this->lang->load('template', $this->session->userdata('language'));\n\t}", "private function set_locale() {\n\n\t\t$plugin_i18n = new Plus_admin_i18n();\n\n\t\t$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "public function sanitize_settings( $settings ){\n if ( ! $this->trp_query ) {\n $trp = TRP_Translate_Press::get_trp_instance();\n $this->trp_query = $trp->get_component( 'query' );\n }\n if ( ! $this->trp_languages ){\n $trp = TRP_Translate_Press::get_trp_instance();\n $this->trp_languages = $trp->get_component( 'languages' );\n }\n if ( !isset ( $settings['default-language'] ) ) {\n $settings['default-language'] = 'en_US';\n }\n if ( !isset ( $settings['translation-languages'] ) ){\n $settings['translation-languages'] = array();\n }\n if ( !isset ( $settings['publish-languages'] ) ){\n $settings['publish-languages'] = array();\n }\n\n $settings['translation-languages'] = array_filter( array_unique( $settings['translation-languages'] ) );\n $settings['publish-languages'] = array_filter( array_unique( $settings['publish-languages'] ) );\n\n if ( ! in_array( $settings['default-language'], $settings['translation-languages'] ) ){\n array_unshift( $settings['translation-languages'], $settings['default-language'] );\n }\n if ( ! in_array( $settings['default-language'], $settings['publish-languages'] ) ){\n array_unshift( $settings['publish-languages'], $settings['default-language'] );\n }\n\n if( !empty( $settings['native_or_english_name'] ) )\n $settings['native_or_english_name'] = sanitize_text_field( $settings['native_or_english_name'] );\n else\n $settings['native_or_english_name'] = 'english_name';\n\n if( !empty( $settings['add-subdirectory-to-default-language'] ) )\n $settings['add-subdirectory-to-default-language'] = sanitize_text_field( $settings['add-subdirectory-to-default-language'] );\n else\n $settings['add-subdirectory-to-default-language'] = 'no';\n\n if( !empty( $settings['force-language-to-custom-links'] ) )\n $settings['force-language-to-custom-links'] = sanitize_text_field( $settings['force-language-to-custom-links'] );\n else\n $settings['force-language-to-custom-links'] = 'no';\n\n\n if ( !empty( $settings['trp-ls-floater'] ) ){\n $settings['trp-ls-floater'] = sanitize_text_field( $settings['trp-ls-floater'] );\n }else{\n $settings['trp-ls-floater'] = 'no';\n }\n\n $language_switcher_options = $this->get_language_switcher_options();\n if ( ! isset( $language_switcher_options[ $settings['shortcode-options'] ] ) ){\n $settings['shortcode-options'] = 'flags-full-names';\n }\n if ( ! isset( $language_switcher_options[ $settings['menu-options'] ] ) ){\n $settings['menu-options'] = 'flags-full-names';\n }\n if ( ! isset( $language_switcher_options[ $settings['floater-options'] ] ) ){\n $settings['floater-options'] = 'flags-full-names';\n }\n\n if ( ! isset( $settings['floater-position'] ) ){\n $settings['floater-position'] = 'bottom-right';\n }\n\n if ( ! isset( $settings['url-slugs'] ) ){\n $settings['url-slugs'] = $this->trp_languages->get_iso_codes( $settings['translation-languages'] );\n }\n\n foreach( $settings['translation-languages'] as $language_code ){\n if ( empty ( $settings['url-slugs'][$language_code] ) ){\n $settings['url-slugs'][$language_code] = $language_code;\n }else{\n $settings['url-slugs'][$language_code] = sanitize_title( strtolower( $settings['url-slugs'][$language_code] )) ;\n }\n }\n\n // check for duplicates in url slugs\n $duplicate_exists = false;\n foreach( $settings['url-slugs'] as $urlslug ) {\n if ( count ( array_keys( $settings['url-slugs'], $urlslug ) ) > 1 ){\n $duplicate_exists = true;\n break;\n }\n }\n if ( $duplicate_exists ){\n foreach( $settings['translation-languages'] as $language_code ) {\n $settings['url-slugs'][$language_code] = $language_code;\n }\n }\n\n $this->create_menu_entries( $settings['publish-languages'] );\n\n require_once( ABSPATH . 'wp-includes/load.php' );\n foreach ( $settings['translation-languages'] as $language_code ){\n if ( $settings['default-language'] != $language_code ) {\n $this->trp_query->check_table( $settings['default-language'], $language_code );\n }\n wp_download_language_pack( $language_code );\n $this->trp_query->check_gettext_table( $language_code );\n }\n\n //in version 1.6.6 we normalized the original strings and created new tables\n $this->trp_query->check_original_table();\n $this->trp_query->check_original_meta_table();\n\n // regenerate permalinks in case something changed\n flush_rewrite_rules();\n\n return apply_filters( 'trp_extra_sanitize_settings', $settings );\n }", "public function setTaggableLangStrings()\n {\n $this->taggableLang = $this->getDataFromFile(\n 'include/SugarObjects/implements/taggable/language/en_us.lang.php',\n 'mod_strings'\n );\n }", "public function setSettings($values)\n\t{\n\t\tif ($values)\n\t\t{\n\t\t\t$this->getSettings()->setAttributes($values);\n\t\t}\n\t}", "protected function setTranslation() {\n $application = $this->step->chain->page->application;\n $application_language = ApplicationLanguage::find()->where([\n 'application_id' => $application->id\n ])->one();\n\n if (empty($application_language)) {\n return;\n }\n\n $step_part_language = StepPartLanguage::find()->where([\n 'step_part_id' => $this->id,\n 'application_language_id' => $application_language->id\n ])->one();\n\n if (empty($step_part_language)) {\n $step_part_language = new StepPartLanguage();\n $step_part_language->step_part_id = $this->id;\n $step_part_language->application_language_id = $application_language->id;\n }\n\n $this->step_part_language = $step_part_language;\n }", "function setup(&$Model, $settings) {\n if (!isset($this->__settings[$Model->alias])) {\n $this->__settings[$Model->alias] = array(\n 'fields' => array(),\n 'except' => array(),\n 'locales' => array()\n );\n }\n if (!is_array($settings)) {\n $settings = array();\n }\n $this->__settings[$Model->alias] = array_merge($this->__settings[$Model->alias], $settings);\n //setup Translate behavior with translatable fields\n return parent::setup($Model, $this->__settings[$Model->alias]['fields']);\n }", "public function setOtherTranslation(string $key, string $value): Translatable;", "public function setLanguage();", "private function setLang( $valor )\n\t{\n\t\t$this->_lang = $valor;\n\t}", "function loadSettings(){\r\r\n if (!(list($settings) = $GLOBALS[\"core\"]->sqlSelect(\"mod_language_settings\")))\r\r\n exit(\"ERROR: Cannot load language settings.\");\r\r\n\r\r\n extract($settings);\r\r\n $this->langActive = $langActive;\r\r\n $this->dynActive = $dynActive;\r\r\n $this->ignoreDefault = $ignoreDefault;\r\r\n $this->mark = $mark;\r\r\n $this->auto_up = $auto_up;\r\r\n $this->default_language = $default_language;\r\r\n $this->current_language = $default_language;\r\r\n }", "public function setComponentSettings(array $settings);", "private function set_locale() {\n\n\t\t$plugin_i18n = new Conductor_i18n();\n\t\t$plugin_i18n->set_domain( $this->get_plugin_name() );\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "function settings($settings) {\n\t\tinclude \"settings.php\";\n\t\t\n\t\t# Creer het settings object\n\t\t$settings = SpotSettings::singleton($this->_db, $settings);\n\t\t$spotSettingsUpgrader = new SpotSettingsUpgrader($this->_db, $settings);\n\t\t$spotSettingsUpgrader->update();\n\t}", "private function set_locale() {\n\n\t\t$plugin_i18n = new Dsm_Supreme_Modules_Pro_For_Divi_i18n();\n\n\t\t$this->loader->add_action( 'init', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "function _set_translations($data = array()) {\n $translations = _get_translations($data);\n if (empty($translations)) {\n return FALSE;\n }\n // Set all translations of one context with recursive call.\n if (!isset($data['text_original']) && isset($data['context'])) {\n foreach (array_keys($translations) as $text_original) {\n _set_translations(array(\n 'text_original' => $text_original,\n 'context' => $data['context'],\n ));\n }\n return TRUE;\n }\n\n // Set one translation .\n $languages = language_list('enabled')[1];\n foreach ($languages as $lang_code => $language_object) {\n if ($lang_code == language_default('language')) {\n continue;\n }\n if (!empty($translations[$lang_code])) {\n // Built-in interface.\n $context = 'default';\n if ($data['context'] == 'menu_item') {\n if (!empty($data['mlid'])) {\n $context = 'menu:item:' . $data['mlid'] . ':title';\n i18n_string_translation_update($context, $translations[$lang_code], $lang_code, $data['text_original']);\n }\n }\n else {\n // Without context, have to use Local and not i18n.\n // Translate strings.\n $report = array(\n 'skips' => 0,\n 'updates' => 0,\n 'deletes' => 0,\n 'additions' => 0,\n );\n _locale_import_one_string_db($report, $lang_code, '', $data['text_original'], $translations[$lang_code], 'default', '', LOCALE_IMPORT_OVERWRITE);\n }\n }\n }\n}", "public function setAvailableTranslations()\n\t{\n\t\t$this->controller->set('availableTranslations', ClassRegistry::init('Translations.Translation')->getAvailableTranslations());\n\t}", "public function setTranslationPreferences($val)\n {\n $this->_propDict[\"translationPreferences\"] = $val;\n return $this;\n }", "function set($options){\n\t\tforeach($options as $option => $value)\n\t\t\tsettings::set($option, $value);\n\t}", "public function settings()\n {\n $this->Gui->set_title( store_title( __( 'Transfert Settings', 'stock-manager' ) ) );\n $this->load->module_view( 'stock-manager', 'settings.gui' );\n }", "public static function settings($settings) {\n if (!self::installed()) {\n return;\n }\n $choices = array(LOCAL_RECOMPLETION_NOTHING => new lang_string('donothing', 'local_recompletion'),\n LOCAL_RECOMPLETION_DELETE => new lang_string('delete', 'local_recompletion'),\n LOCAL_RECOMPLETION_EXTRAATTEMPT => new lang_string('extraattempt', 'local_recompletion'));\n\n $settings->add(new \\admin_setting_configselect('local_recompletion/questionnaireattempts',\n new lang_string('questionnaireattempts', 'local_recompletion'),\n new lang_string('questionnaireattempts_help', 'local_recompletion'), LOCAL_RECOMPLETION_NOTHING, $choices));\n\n $settings->add(new \\admin_setting_configcheckbox('local_recompletion/archivequestionnaire',\n new lang_string('archivequestionnaire', 'local_recompletion'), '', 1));\n }", "public function set_translations($domain, $path = \\null)\n {\n }", "public function settingLocale() {}", "public function set_translations($handle, $domain = 'default', $path = \\null)\n {\n }", "function setLang($lang)\n{\n}", "public static function setLang()\n {\n if (function_exists(\"pll_is_translated_post_type\") && isset($GLOBALS[\"post\"]->post_type) && pll_is_translated_post_type($GLOBALS[\"post\"]->post_type)) {\n Lang::switchTo(Lang::ofPost($GLOBALS[\"post\"]->ID));\n }\n }", "protected function set_locale() {\n\n\t\t$this->plugin_i18n = new WP_Masonry_Grid_i18n();\n\t\t$this->plugin_i18n->set_domain( $this->get_plugin_name() );\n\n\t\t$this->loader->add_action( 'plugins_loaded', $this->plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "public function setTranslate() {\n $params = array(\n 'scan' => Zend_Translate_Adapter::LOCALE_DIRECTORY,\n 'logUntranslated' => true\n );\n\n $log = new Zend_Log();\n $log->addWriter(new Zend_Log_Writer_Null());\n $params['log'] = $log;\n\n // Check Locale\n $locale = Zend_Locale::findLocale();\n // Make Sure Language Folder Exist\n $languageFolder = is_dir(APPLICATION_PATH . '/application/languages/' . $locale);\n if ($languageFolder === false) {\n $locale = substr($locale, 0, 2);\n $languageFolder = is_dir(APPLICATION_PATH . '/application/languages/' . $locale);\n if ($languageFolder == false) {\n $locale = 'en';\n }\n }\n\n // Check which Translation Adapter has been selected\n $db = Engine_Db_Table::getDefaultAdapter();\n $translationAdapter = $db->select()\n ->from('engine4_core_settings', 'value')\n ->where('`name` = ?', 'core.translate.adapter')\n ->query()\n ->fetchColumn();\n\n // Use Array Translation Adapter, Loop through all Availible Translations\n if ($translationAdapter == 'array') {\n // Find all Valid Language Arrays\n // Check For Array Files\n $languagePath = APPLICATION_PATH . '/application/languages';\n // Get List of Folders\n $languageFolders = array_filter(glob($languagePath . DIRECTORY_SEPARATOR . '*'), 'is_dir');\n // Look inside Folders for PHP array\n $locale_array = array();\n foreach ($languageFolders as $folder) {\n // Get Locale code\n $locale_code = str_replace($languagePath . DIRECTORY_SEPARATOR, \"\", $folder);\n $locale_array[] = $locale_code;\n if (count(glob($folder . DIRECTORY_SEPARATOR . $locale_code . 'php')) == 0) {\n // If Array files do not exist, switch to CSV\n $translationAdapter = 'csv';\n }\n }\n\n $language_count = count($locale_array);\n // Add the First One\n $translate = new Zend_Translate(\n array(\n 'adapter' => 'array',\n 'content' => $languagePath . DIRECTORY_SEPARATOR . $locale_array[0] . DIRECTORY_SEPARATOR . $locale_array[0] . '.php',\n 'locale' => $locale_array[0])\n );\n if ($language_count > 1) {\n for ($i = 1; $i < $language_count; $i++) {\n $translate->addTranslation(\n array(\n 'content' => $languagePath . DIRECTORY_SEPARATOR . $locale_array[$i] . DIRECTORY_SEPARATOR . $locale_array[$i] . '.php',\n 'locale' => $locale_array[$i])\n );\n }\n }\n }\n\n // Use CSV Translation Adapter\n else {\n $translate = new Zend_Translate(\n 'Csv', APPLICATION_PATH . '/application/languages', null, $params\n );\n }\n\n Zend_Registry::set('Zend_Translate', $translate);\n\n Zend_Validate_Abstract::setDefaultTranslator($translate);\n Zend_Form::setDefaultTranslator($translate);\n Zend_Controller_Router_Route::setDefaultTranslator($translate);\n\n return;\n }", "public function setSettings($userId, array $settings, $key = null): void;", "protected function setupMultilingual() {\n // Add a new language.\n ConfigurableLanguage::createFromLangcode('fr')->save();\n }", "protected function put_settings($settings)\n\t{\n\t\tif (is_array($settings)) {\n\t\t\t$this->_settings = array_merge($this->_settings, $settings);\n\t\t}\n\t}", "public function testSetSettings()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function localize_settings( $settings ) {\n\t\t$settings = array_replace_recursive( $settings, [\n\t\t\t'i18n' => [\n\t\t\t\t'fontsUploadEmptyNotice' => __( 'Choose a font to publish.', 'elementor-avator' ),\n\t\t\t\t'iconsUploadEmptyNotice' => __( 'Upload an icon set to publish.', 'elementor-avator' ),\n\t\t\t],\n\t\t] );\n\n\t\treturn $settings;\n\t}", "public function setTranslation(string $key, string $value): void\n {\n $this->translations[$key] = $value;\n }", "function Settings()\n\t{\n\t\t$this->LoadLanguageFile();\n\t\t$this->LoadLanguageFile('CharacterSets');\n\t\t$this->LoadLanguageFile('TimeZones');\n\t}", "function setLangParams()\n\t{\n\t}", "function setLangParams()\n\t{\n\t}", "private function set_settings() {\n\t\t// Sections config.\n\t\t$this->setting_sections = array(\n\t\t\t__( 'Free members and Visitors (0 or 1) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'Core subscribers (2, 3, 4, 6, or 7) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'Leaderboard subscribers (8 or 9) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'SwingTrader subscribers (10 or 11) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'MarketSmith subscribers (12 or 13) Promo Message:', 'investors-insert-content' ),\n\t\t);\n\n\t\t// Settings config.\n\t\t$this->setting_fields = array(\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'text',\n\t\t\t\t'title' => __( 'Copy for the promo message', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_text_cb',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'link',\n\t\t\t\t'title' => __( 'Link URL for promo', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_text_cb',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'class',\n\t\t\t\t'title' => __( 'Link Style Class', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_text_cb',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'cats',\n\t\t\t\t'title' => __( 'Categories To Exclude', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_cat_cb',\n\t\t\t),\n\t\t);\n\t}", "function setTranslation(&$obj,$field,$value,$lang){\n $info = $obj->_getPluginsDef();\n $info = $info['i18n'];\n if(!$obj->pk()) {\n return false;\n }\n $iname = $obj->tableName().'_i18n';\n $t = DB_DataObject::factory($iname);\n $t->i18n_record_id = $obj->pk();\n $t->i18n_lang = $lang;\n if(!$t->find(true)) {\n foreach($info as $afield) {\n $t->{$afield} = $obj->{$afield};\n }\n $action='insert';\n } else {\n $action='update';\n }\n $t->{$field} = $value;\n $t->$action();\n\t}", "public function setMultilingualParameters(array $parameters);", "public static function registerTranslations()\n {\n ///[i18n]\n ///if no setup the component i18n, use setup in this module.\n if (!isset(Yii::$app->i18n->translations['extensions/yongtiger/yii2-setting/*']) && !isset(Yii::$app->i18n->translations['extensions/yongtiger/yii2-setting'])) {\n Yii::$app->i18n->translations['extensions/yongtiger/yii2-setting/*'] = [\n 'class' => 'yii\\i18n\\PhpMessageSource',\n 'sourceLanguage' => 'en-US',\n 'basePath' => '@vendor/yongtiger/yii2-setting/src/messages', ///default base path is '@vendor/yongtiger/yii2-setting/src/messages'\n 'fileMap' => [\n 'extensions/yongtiger/yii2-setting/message' => 'message.php', ///category in Module::t() is message\n ],\n ];\n }\n }", "function set( $setting, $value ) {\n\t\tset_theme_mod( 'theme_settings_' . $setting, $value );\n\t}", "public function setTranslate()\r\r\r\n\t{ \r\r\r\n\t\tif(!$language = $this->getRequest()->getParam($this->getLanguageKey()))\r\r\r\n\t\t{\r\r\r\n\t\t\tif(!$language = $this->getSession()->getSession($this->getLanguageKey()))\r\r\r\n\t\t\t{\r\r\r\n\t\t\t\t$language = Ccc::getModel(\"config/system_config\")->getSystemConfig('general/locale/language');\t\r\r\r\n\t\t\t}\r\r\r\n\t\t}\t\t\r\r\r\n\t\t$this->getSession()->setSession($this->getLanguageKey(), $language);\r\r\r\n\t\t\r\r\r\n\t\t$locale = Ccc::getSingleton('core/locale');\r\r\r\n\t\t$translate = new Zend_Translate('csv', $this->getLocaleFilePath().\"/{$language}/{$language}.csv\", $language);\r\r\r\n\t\t\r\r\r\n\t\t$locale->setLocale($language);\r\r\r\n\t\t$translate->setLocale($locale);\r\r\r\n\t\t\r\r\r\n\t\tZend_Registry::set('Zend_Locale', $locale);\r\r\r\n\t\tZend_Registry::set('Zend_Translate', $translate);\r\r\r\n\t\t\t\t\r\r\r\n\t\treturn $translate;\r\r\r\n\t}", "function setLang ($lang);", "private function setSettings()\n {\n\n $dir = $this->settings->get('plugin_dir');\n $basename = $this->settings->get('plugin_file');\n $upload_dir_info = wp_upload_dir();\n\n $this->settings->set('template_dir', $dir . '/resources/views');\n $this->settings->set('plugin_basename', $basename);\n $this->settings->set('upload_dir', $upload_dir_info['basedir'] . '/avh-rps');\n $this->settings->set('javascript_dir', $dir . '/assets/js/');\n $this->settings->set('css_dir', $dir . '/assets/css/');\n $this->settings->set('images_dir', $dir . '/assets/images/');\n $this->settings->set('plugin_url', plugins_url('', Constants::PLUGIN_FILE));\n $this->settings->set('club_max_entries_per_member_per_date', 4);\n $this->settings->set('club_max_banquet_entries_per_member', 5);\n $this->settings->set('digital_chair_email', 'digitalchair@raritanphoto.com');\n\n $this->settings->set('siteurl', get_option('siteurl'));\n }", "protected function setLangCode()\n {\n $this->page->setVar('langCode', $this->text->getLanguage());\n }", "public function setSettings() {\n $this->setName(lang('Add New File'));\n $this->setDescription(lang('Add new file to specific project.'));\n $this->setTemplateName('incoming_mail_add_file_action');\n $this->setCanUse(true);\n $this->setModuleName(FILES_MODULE);\n $this->setPreSelected(false);\n }", "public function setTranslatable($translatable)\n {\n $this->translatable = $translatable;\n\n return $this;\n }", "public function injectSettings(array $settings) {\r\n\t\t$this->settings = $settings;\r\n\t\t// \\TYPO3\\Flow\\var_dump($this->settings);\r\n\t}", "public static function setTranslator($translator)\n {\n static::$translator = $translator;\n }", "public function setLanguage(/*...*/)\n {\n $translator = \\Zend_Registry::get('Zend_Translate');\n return $translator->setLocale(array_shift(func_get_args()));\n }", "public function setSetting($setting, $value);", "public static function setSettings($settings, $propogate=false)\n\t{\n\t\tself::initSettings();\n\t\tforeach($settings as $setting=>$value)\n\t\t{\n\t\t\tself::$settings[$setting]=$value;\n\t\t}\n\t\tif($propogate)\n\t\t\tself::propogateSettings();\n\t}", "private function set_locale()\n\t{\n\n\t\t$plugin_i18n = new JiangQie_API_i18n();\n\n\t\t$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');\n\t}", "function settings($settings) {\n \t$this->settings = (object) ( ((array) $settings) + ((array) $this->settings) );\n }", "private function setTranslation($param, $value)\n {\n $this->translation[$param] = $value;\n }", "private function setTranslation($param, $value)\n {\n $this->translation[$param] = $value;\n }", "private function setLocale()\n {\n $this->file->setLocale(\n session('statamic.cp.selected-site') ?\n Site::get(session('statamic.cp.selected-site'))->locale() :\n Site::current()->locale());\n }", "function changeSettings($key, $val) { global $SETTINGS_OPTIONS; $SETTINGS_OPTIONS[$key] = (bool)$val; }", "public function setTranslations($value)\n {\n return $this->set('Translations', $value);\n }", "function settings($settings = array()) { \n\t $this->Email->_set($this->defaults = array_filter(am($this->defaults, $settings))); \n\t }", "public function setSettings()\r\n {\r\n $module = Yii::$app->getModule('calendar_extension');\r\n $autopost_entries = $module->settings->get('autopost_entries');\r\n\r\n if ($autopost_entries) {\r\n // set back to autopost true\r\n $this->streamChannel = 'default';\r\n $this->silentContentCreation = false;\r\n }\r\n }", "protected function _setCache()\n {\n $options = $this->getOptions();\n\n // Disable cache? If not defined, cache will be active\n if (isset($options['cache']['active']) && !$options['cache']['active'])\n {\n // Explicitly remove cache, in case it was set before\n Zend_Translate::removeCache();\n return;\n }\n\n // Get the cache using the config settings as input\n $this->_bootstrap->bootstrap('CacheManager');\n $manager = $this->_bootstrap->getResource('CacheManager');\n $cache = $manager->getCache('translate');\n\n // Write caching errors to log file (if activated in the config)\n $this->_bootstrap->bootstrap('Log');\n $logger = $this->_bootstrap->getResource('Log');\n $cache->setOption('logger', $logger);\n\n Zend_Translate::setCache($cache);\n }", "public function setMultilingual(array $multilingual)\n {\n $this->multilingual = $multilingual;\n }", "function set_lang($newlang) {\n $this->lang = $newlang;\n }", "public static function setMany($settings)\n {\n foreach ($settings as $key => $value) {\n self::set($key, $value);\n }\n }", "function midtrans_add_settings($settings) {\n $sandbox_key_url = 'https://dashboard.sandbox.midtrans.com/settings/config_info';\n $production_key_url = 'https://dashboard.midtrans.com/settings/config_info';\n\n\t$midtrans_settings = array(\n\t\tarray(\n\t\t\t'id' => 'edd_midtrans_gateway_settings',\n\t\t\t'name' => '<strong>'.__('Midtrans Gateway Settings', 'midtrans').'</strong>',\n\t\t\t'desc' => __('Configure the gateway settings', 'midtrans'),\n\t\t\t'type' => 'header'\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_checkout_label',\n\t\t\t'name' => __('Checkout Label', 'midtrans'),\n\t\t\t'desc' => __('<br>Payment gateway text label that will be shown as payment options to your customers (Default = \"Online Payment via Midtrans\")'),\n\t\t\t'type' => 'text',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_production_api_key',\n\t\t\t'name' => __('Production Server Key', 'midtrans'),\n\t\t\t'desc' => sprintf(__('<br>Input your <b>Production</b> Midtrans Server Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'midtrans' ),$production_key_url),\n\t\t\t'type' => 'text',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_sandbox_api_key',\n\t\t\t'name' => __('Sandbox Server Key', 'midtrans'),\n\t\t\t'desc' => sprintf(__('<br>Input your <b>Sandbox</b> Midtrans Server Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'midtrans' ),$sandbox_key_url),\n\t\t\t'type' => 'text',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_3ds',\n\t\t\t'name' => __('Enable 3D Secure', 'midtrans'),\n\t\t\t'desc' => __('You must enable 3D Secure. Please contact us if you wish to disable this feature in the Production environment.'),\n\t\t\t'type' => 'checkbox',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_save_card',\n\t\t\t'name' => __('Enable Save Card', 'midtrans'),\n\t\t\t'desc' => __('This will allow your customer to save their card on the payment popup, for faster payment flow on the following purchase'),\n\t\t\t'type' => 'checkbox',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_enabled_payment',\n\t\t\t'name' => __('Allowed Payment Method', 'midtrans'),\n\t\t\t'desc' => __('<br>Customize allowed payment method, separate payment method code with coma. e.g: bank_transfer,credit_card.<br>Leave it default if you are not sure.'),\n\t\t\t'type' => 'text',\n\t\t),\t\t\t\t\t\n\t\tarray(\n\t\t\t'id' => 'mt_custom_expiry',\n\t\t\t'name' => __('Custom Expiry', 'midtrans'),\n\t\t\t'desc' => __('<br>This will allow you to set custom duration on how long the transaction available to be paid.<br> example: 45 minutes'),\n\t\t\t'type' => 'text',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'mt_custom_field',\n\t\t\t'name' => __('Custom fields', 'midtrans'),\n\t\t\t'desc' => __('<br>This will allow you to set custom fields that will be displayed on Midtrans dashboard. <br>Up to 3 fields are available, separate by coma (,) <br> Example: Order from web, Processed', 'midtrans'),\n\t\t\t'type' => 'text',\n\t\t),\t\t\t\t\n\t);\n if ( version_compare( EDD_VERSION, 2.5, '>=' ) ) {\n $midtrans_settings = array( 'midtrans' => $midtrans_settings );\n }\n\treturn array_merge($settings, $midtrans_settings);\t\n}", "public function save_settings($settings)\n {\n }", "function set_translator($translator)\n {\n $this->translator = $translator;\n\n $this->set_function(\n 'translator_service',\n function ()\n {\n return call_user_func_array(\n [$this->translator, 'translate'], func_get_args()\n );\n }\n );\n }", "public function setTranslation($from, $to)\n {\n $this->translationMap[$from] = $to;\n }", "public static function setMany($settings)\n {\n foreach($settings as $key => $value){\n self::set($key, $value);\n }\n }", "function wp_set_script_translations($handle, $domain = 'default', $path = \\null)\n{\n}", "public function setLanguage($value);", "protected function putLang()\n {\n /** @var Translator $trans */\n $trans = app('xe.translator');\n $trans->putFromLangDataSource('board', base_path('plugins/board/langs/lang.php'));\n }" ]
[ "0.7550523", "0.6898122", "0.66566694", "0.65755504", "0.64996827", "0.649314", "0.6465875", "0.6465875", "0.63470644", "0.63007957", "0.6273977", "0.623258", "0.6207181", "0.620041", "0.61765623", "0.60895663", "0.6081022", "0.60715836", "0.5990154", "0.5965973", "0.5965973", "0.5919816", "0.5918778", "0.5901868", "0.58894813", "0.5859536", "0.58563447", "0.5848891", "0.58465636", "0.58221054", "0.58170205", "0.58160186", "0.5811626", "0.5811213", "0.58093184", "0.57834685", "0.57767904", "0.5775388", "0.5770485", "0.5762186", "0.57486147", "0.5731563", "0.5730257", "0.57064533", "0.56826854", "0.56824744", "0.5679785", "0.5667878", "0.56498045", "0.5645696", "0.56455505", "0.56451124", "0.5641311", "0.5627945", "0.5618008", "0.56149477", "0.56087255", "0.5599707", "0.55977815", "0.55916715", "0.55741465", "0.5572487", "0.5572487", "0.55671585", "0.5561092", "0.55489177", "0.5531205", "0.55214095", "0.55186117", "0.55165786", "0.5515265", "0.5488446", "0.5486522", "0.54568094", "0.54492825", "0.5424401", "0.5418237", "0.5414993", "0.541171", "0.54103845", "0.5409654", "0.53995526", "0.53995526", "0.5398942", "0.53974336", "0.53906435", "0.53843796", "0.5382712", "0.53678983", "0.5358561", "0.53582627", "0.5357895", "0.5335617", "0.5333756", "0.5333022", "0.53316927", "0.5322369", "0.5315676", "0.53130007", "0.53041935" ]
0.7477678
1
/ Konstruktor string $documentURI: URI des Dokuments string $stringValue: StringWert des Dokuments string $typeName: Type des Dokuments string $typedValue: Getypter Wert des Dokuments
Конструктор string $documentURI: URI документа string $stringValue: строковое значение документа string $typeName: тип документа string $typedValue: типизованное значение документа
function Document($documentURI = null, $stringValue = "", $typeName = "xdt:untyped", $typedValue = "") { /* Variablen initialisieren */ $this->documentURI = $documentURI; $this->stringValue =$stringValue; $this->typeName = $typeName; $this->typedValue = $typedValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_document_type( $value ) {\n\t\t$this->set_mapped_property( 'document_type', $value );\n\t}", "public function __construct($value = '', $string_type, $line = -1, $docComment = null) {\n if ($string_type === \"'\") \n $value = preg_replace_callback(\"#[^\\\\\\][']+?#Uis\", \n 'phpparser_node_scalar_string_replace_single', $value);\n elseif ($string_type === '\"')\n $value = preg_replace_callback('#[^\\\\\\]\"+?#Uis', \n 'phpparser_node_scalar_string_replace_double', $value);\n else\n throw new Exception(\"Unsupported string type.\");\n parent::__construct(\n array(\n 'value' => $value,\n 'string_type' => $string_type,\n ),\n $line, $docComment\n );\n }", "function mugovalidatedstringType()\n {\n $this->eZDataType( self::DATA_TYPE_STRING, ezpI18n::tr( 'kernel/classes/datatypes', 'Text line (validated)', 'Datatype name' ),\n array( 'serialize_supported' => true,\n 'object_serialize_map' => array( 'data_text' => 'text' ) ) );\n $this->MaxLenValidator = new eZIntegerValidator();\n $this->DataTypeValidator = new MugoDatatypeValidator();\n }", "function PdfNameType($value = '') {\n parent::PdfType($value);\n }", "function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)\n\t{\n\t\t$this->debug(\"in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=\" . ($unqualified ? \"unqualified\" : \"qualified\"));\n\t\t$this->appendDebug(\"value=\" . $this->varDump($value));\n\t\tif($use == 'encoded' && $encodingStyle) {\n\t\t\t$encodingStyle = ' SOAP-ENV:encodingStyle=\"' . $encodingStyle . '\"';\n\t\t}\n\n\t\t// if a soapval has been supplied, let its type override the WSDL\n \tif (is_object($value) && get_class($value) == 'soapval') {\n \t\tif ($value->type_ns) {\n \t\t\t$type = $value->type_ns . ':' . $value->type;\n\t\t \t$forceType = true;\n\t\t \t$this->debug(\"in serializeType: soapval overrides type to $type\");\n \t\t} elseif ($value->type) {\n\t \t\t$type = $value->type;\n\t\t \t$forceType = true;\n\t\t \t$this->debug(\"in serializeType: soapval overrides type to $type\");\n\t \t} else {\n\t \t\t$forceType = false;\n\t\t \t$this->debug(\"in serializeType: soapval does not override type\");\n\t \t}\n\t \t$attrs = $value->attributes;\n\t \t$value = $value->value;\n\t \t$this->debug(\"in serializeType: soapval overrides value to $value\");\n\t \tif ($attrs) {\n\t \t\tif (!is_array($value)) {\n\t \t\t\t$value['!'] = $value;\n\t \t\t}\n\t \t\tforeach ($attrs as $n => $v) {\n\t \t\t\t$value['!' . $n] = $v;\n\t \t\t}\n\t\t \t$this->debug(\"in serializeType: soapval provides attributes\");\n\t\t }\n } else {\n \t$forceType = false;\n }\n\n\t\t$xml = '';\n\t\tif (strpos($type, ':')) {\n\t\t\t$uqType = substr($type, strrpos($type, ':') + 1);\n\t\t\t$ns = substr($type, 0, strrpos($type, ':'));\n\t\t\t$this->debug(\"in serializeType: got a prefixed type: $uqType, $ns\");\n\t\t\tif ($this->getNamespaceFromPrefix($ns)) {\n\t\t\t\t$ns = $this->getNamespaceFromPrefix($ns);\n\t\t\t\t$this->debug(\"in serializeType: expanded prefixed type: $uqType, $ns\");\n\t\t\t}\n\n\t\t\tif($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){\n\t\t\t\t$this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type');\n\t\t\t\tif ($unqualified && $use == 'literal') {\n\t\t\t\t\t$elementNS = \" xmlns=\\\"\\\"\";\n\t\t\t\t} else {\n\t\t\t\t\t$elementNS = '';\n\t\t\t\t}\n\t\t\t\tif (is_null($value)) {\n\t\t\t\t\tif ($use == 'literal') {\n\t\t\t\t\t\t// TODO: depends on minOccurs\n\t\t\t\t\t\t$xml = \"<$name$elementNS/>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// TODO: depends on nillable, which should be checked before calling this method\n\t\t\t\t\t\t$xml = \"<$name$elementNS xsi:nil=\\\"true\\\" xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\"/>\";\n\t\t\t\t\t}\n\t\t\t\t\t$this->debug(\"in serializeType: returning: $xml\");\n\t\t\t\t\treturn $xml;\n\t\t\t\t}\n\t\t\t\tif ($uqType == 'Array') {\n\t\t\t\t\t// JBoss/Axis does this sometimes\n\t\t\t\t\treturn $this->serialize_val($value, $name, false, false, false, false, $use);\n\t\t\t\t}\n\t\t \tif ($uqType == 'boolean') {\n\t\t \t\tif ((is_string($value) && $value == 'false') || (! $value)) {\n\t\t\t\t\t\t$value = 'false';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = 'true';\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tif ($uqType == 'string' && gettype($value) == 'string') {\n\t\t\t\t\t$value = $this->expandEntities($value);\n\t\t\t\t}\n\t\t\t\tif (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') {\n\t\t\t\t\t$value = sprintf(\"%.0lf\", $value);\n\t\t\t\t}\n\t\t\t\t// it's a scalar\n\t\t\t\t// TODO: what about null/nil values?\n\t\t\t\t// check type isn't a custom type extending xmlschema namespace\n\t\t\t\tif (!$this->getTypeDef($uqType, $ns)) {\n\t\t\t\t\tif ($use == 'literal') {\n\t\t\t\t\t\tif ($forceType) {\n\t\t\t\t\t\t\t$xml = \"<$name$elementNS xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\">$value</$name>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$xml = \"<$name$elementNS>$value</$name>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$xml = \"<$name$elementNS xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\"$encodingStyle>$value</$name>\";\n\t\t\t\t\t}\n\t\t\t\t\t$this->debug(\"in serializeType: returning: $xml\");\n\t\t\t\t\treturn $xml;\n\t\t\t\t}\n\t\t\t\t$this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)');\n\t\t\t} else if ($ns == 'http://xml.apache.org/xml-soap') {\n\t\t\t\t$this->debug('in serializeType: appears to be Apache SOAP type');\n\t\t\t\tif ($uqType == 'Map') {\n\t\t\t\t\t$tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');\n\t\t\t\t\tif (! $tt_prefix) {\n\t\t\t\t\t\t$this->debug('in serializeType: Add namespace for Apache SOAP type');\n\t\t\t\t\t\t$tt_prefix = 'ns' . rand(1000, 9999);\n\t\t\t\t\t\t$this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap';\n\t\t\t\t\t\t// force this to be added to usedNamespaces\n\t\t\t\t\t\t$tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');\n\t\t\t\t\t}\n\t\t\t\t\t$contents = '';\n\t\t\t\t\tforeach($value as $k => $v) {\n\t\t\t\t\t\t$this->debug(\"serializing map element: key $k, value $v\");\n\t\t\t\t\t\t$contents .= '<item>';\n\t\t\t\t\t\t$contents .= $this->serialize_val($k,'key',false,false,false,false,$use);\n\t\t\t\t\t\t$contents .= $this->serialize_val($v,'value',false,false,false,false,$use);\n\t\t\t\t\t\t$contents .= '</item>';\n\t\t\t\t\t}\n\t\t\t\t\tif ($use == 'literal') {\n\t\t\t\t\t\tif ($forceType) {\n\t\t\t\t\t\t\t$xml = \"<$name xsi:type=\\\"\" . $tt_prefix . \":$uqType\\\">$contents</$name>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$xml = \"<$name>$contents</$name>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$xml = \"<$name xsi:type=\\\"\" . $tt_prefix . \":$uqType\\\"$encodingStyle>$contents</$name>\";\n\t\t\t\t\t}\n\t\t\t\t\t$this->debug(\"in serializeType: returning: $xml\");\n\t\t\t\t\treturn $xml;\n\t\t\t\t}\n\t\t\t\t$this->debug('in serializeType: Apache SOAP type, but only support Map');\n\t\t\t}\n\t\t} else {\n\t\t\t// TODO: should the type be compared to types in XSD, and the namespace\n\t\t\t// set to XSD if the type matches?\n\t\t\t$this->debug(\"in serializeType: No namespace for type $type\");\n\t\t\t$ns = '';\n\t\t\t$uqType = $type;\n\t\t}\n\t\tif(!$typeDef = $this->getTypeDef($uqType, $ns)){\n\t\t\t$this->setError(\"$type ($uqType) is not a supported type.\");\n\t\t\t$this->debug(\"in serializeType: $type ($uqType) is not a supported type.\");\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$this->debug(\"in serializeType: found typeDef\");\n\t\t\t$this->appendDebug('typeDef=' . $this->varDump($typeDef));\n\t\t\tif (substr($uqType, -1) == '^') {\n\t\t\t\t$uqType = substr($uqType, 0, -1);\n\t\t\t}\n\t\t}\n\t\tif (!isset($typeDef['phpType'])) {\n\t\t\t$this->setError(\"$type ($uqType) has no phpType.\");\n\t\t\t$this->debug(\"in serializeType: $type ($uqType) has no phpType.\");\n\t\t\treturn false;\n\t\t}\n\t\t$phpType = $typeDef['phpType'];\n\t\t$this->debug(\"in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: \" . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); \n\t\t// if php type == struct, map value to the <all> element names\n\t\tif ($phpType == 'struct') {\n\t\t\tif (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') {\n\t\t\t\t$elementName = $uqType;\n\t\t\t\tif (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {\n\t\t\t\t\t$elementNS = \" xmlns=\\\"$ns\\\"\";\n\t\t\t\t} else {\n\t\t\t\t\t$elementNS = \" xmlns=\\\"\\\"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$elementName = $name;\n\t\t\t\tif ($unqualified) {\n\t\t\t\t\t$elementNS = \" xmlns=\\\"\\\"\";\n\t\t\t\t} else {\n\t\t\t\t\t$elementNS = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is_null($value)) {\n\t\t\t\tif ($use == 'literal') {\n\t\t\t\t\t// TODO: depends on minOccurs and nillable\n\t\t\t\t\t$xml = \"<$elementName$elementNS/>\";\n\t\t\t\t} else {\n\t\t\t\t\t$xml = \"<$elementName$elementNS xsi:nil=\\\"true\\\" xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\"/>\";\n\t\t\t\t}\n\t\t\t\t$this->debug(\"in serializeType: returning: $xml\");\n\t\t\t\treturn $xml;\n\t\t\t}\n\t\t\tif (is_object($value)) {\n\t\t\t\t$value = get_object_vars($value);\n\t\t\t}\n \n // override changes: fix error type for empty value\n if(!is_array($value)){\n $value = array($value);\n }\n // override changes end\n \n\t\t\tif (is_array($value)) {\n\t\t\t\t$elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType);\n\t\t\t\tif ($use == 'literal') {\n\t\t\t\t\tif ($forceType) {\n\t\t\t\t\t\t$xml = \"<$elementName$elementNS$elementAttrs xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\">\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$xml = \"<$elementName$elementNS$elementAttrs>\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$xml = \"<$elementName$elementNS$elementAttrs xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\"$encodingStyle>\";\n\t\t\t\t}\n\n\t\t\t\tif (isset($typeDef['simpleContent']) && $typeDef['simpleContent'] == 'true') {\n\t\t\t\t\tif (isset($value['!'])) {\n\t\t\t\t\t\t$xml .= $value['!'];\n\t\t\t\t\t\t$this->debug(\"in serializeType: serialized simpleContent for type $type\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->debug(\"in serializeType: no simpleContent to serialize for type $type\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// complexContent\n\t\t\t\t\t$xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle);\n\t\t\t\t}\n\t\t\t\t$xml .= \"</$elementName>\";\n\t\t\t} else {\n $this->debug(\"in serializeType: phpType is struct, but value is not an array\");\n\t\t\t\t$this->setError(\"phpType is struct, but value is not an array: see debug output for details\");\n\t\t\t\t$xml = '';\n\t\t\t}\n\t\t} elseif ($phpType == 'array') {\n\t\t\tif (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {\n\t\t\t\t$elementNS = \" xmlns=\\\"$ns\\\"\";\n\t\t\t} else {\n\t\t\t\tif ($unqualified) {\n\t\t\t\t\t$elementNS = \" xmlns=\\\"\\\"\";\n\t\t\t\t} else {\n\t\t\t\t\t$elementNS = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is_null($value)) {\n\t\t\t\tif ($use == 'literal') {\n\t\t\t\t\t// TODO: depends on minOccurs\n\t\t\t\t\t$xml = \"<$name$elementNS/>\";\n\t\t\t\t} else {\n\t\t\t\t\t$xml = \"<$name$elementNS xsi:nil=\\\"true\\\" xsi:type=\\\"\" .\n\t\t\t\t\t\t$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .\n\t\t\t\t\t\t\":Array\\\" \" .\n\t\t\t\t\t\t$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .\n\t\t\t\t\t\t':arrayType=\"' .\n\t\t\t\t\t\t$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) .\n\t\t\t\t\t\t':' .\n\t\t\t\t\t\t$this->getLocalPart($typeDef['arrayType']).\"[0]\\\"/>\";\n\t\t\t\t}\n\t\t\t\t$this->debug(\"in serializeType: returning: $xml\");\n\t\t\t\treturn $xml;\n\t\t\t}\n\t\t\tif (isset($typeDef['multidimensional'])) {\n\t\t\t\t$nv = array();\n\t\t\t\tforeach($value as $v) {\n\t\t\t\t\t$cols = ',' . sizeof($v);\n\t\t\t\t\t$nv = array_merge($nv, $v);\n\t\t\t\t} \n\t\t\t\t$value = $nv;\n\t\t\t} else {\n\t\t\t\t$cols = '';\n\t\t\t} \n\t\t\tif (is_array($value) && sizeof($value) >= 1) {\n\t\t\t\t$rows = sizeof($value);\n\t\t\t\t$contents = '';\n\t\t\t\tforeach($value as $k => $v) {\n\t\t\t\t\t$this->debug(\"serializing array element: $k, $v of type: $typeDef[arrayType]\");\n\t\t\t\t\t//if (strpos($typeDef['arrayType'], ':') ) {\n\t\t\t\t\tif (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) {\n\t\t\t\t\t $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);\n\t\t\t\t\t} else {\n\t\t\t\t\t $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$rows = 0;\n\t\t\t\t$contents = null;\n\t\t\t}\n\t\t\t// TODO: for now, an empty value will be serialized as a zero element\n\t\t\t// array. Revisit this when coding the handling of null/nil values.\n\t\t\tif ($use == 'literal') {\n\t\t\t\t$xml = \"<$name$elementNS>\"\n\t\t\t\t\t.$contents\n\t\t\t\t\t.\"</$name>\";\n\t\t\t} else {\n\t\t\t\t$xml = \"<$name$elementNS xsi:type=\\\"\".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array\" '.\n\t\t\t\t\t$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/')\n\t\t\t\t\t.':arrayType=\"'\n\t\t\t\t\t.$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType']))\n\t\t\t\t\t.\":\".$this->getLocalPart($typeDef['arrayType']).\"[$rows$cols]\\\">\"\n\t\t\t\t\t.$contents\n\t\t\t\t\t.\"</$name>\";\n\t\t\t}\n\t\t} elseif ($phpType == 'scalar') {\n\t\t\tif (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {\n\t\t\t\t$elementNS = \" xmlns=\\\"$ns\\\"\";\n\t\t\t} else {\n\t\t\t\tif ($unqualified) {\n\t\t\t\t\t$elementNS = \" xmlns=\\\"\\\"\";\n\t\t\t\t} else {\n\t\t\t\t\t$elementNS = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($use == 'literal') {\n\t\t\t\tif ($forceType) {\n\t\t\t\t\t$xml = \"<$name$elementNS xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\">$value</$name>\";\n\t\t\t\t} else {\n\t\t\t\t\t$xml = \"<$name$elementNS>$value</$name>\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$xml = \"<$name$elementNS xsi:type=\\\"\" . $this->getPrefixFromNamespace($ns) . \":$uqType\\\"$encodingStyle>$value</$name>\";\n\t\t\t}\n\t\t}\n\t\t$this->debug(\"in serializeType: returning: $xml\");\n\t\treturn $xml;\n\t}", "public function cast() {\n\t\t$type = $this->getDefinition()->getType();\n\t\tif ($type == 'multiple') {\n\t\t\t// TODO\n\t\t}\n\t\telseif ($type == 'text') {\n\t\t\tsettype($this->value, 'string');\n\t\t}\n\t\telse {\n\t\t\tsettype($this->value, $type);\n\t\t}\n\t}", "function types_documents_autoriser(){}", "#[@fromDia(xpath= 'dia:attribute[@name=\"type\"]/dia:string', value= 'string')]\n public function setType($type) {\n $this->setString('type', $type);\n }", "public function getTypeString($type){ }", "public function getTypeString($type){ }", "public static function getDocType(){ }", "public function documentTypeSaveAction()\n {\n $translator = $this->get('translator');\n\n $pk = $this->get('request')->request->get('pk');\n $name = $this->get('request')->request->get('name');\n $value = $this->get('request')->request->get('value');\n\n /** @var \\Lists\\DocumentBundle\\Entity\\Documents $object */\n $object = $this->getDoctrine()\n ->getRepository('ListsDocumentBundle:Documents')\n ->find($pk);\n\n $type = $this->getDoctrine()\n ->getRepository('ListsDocumentBundle:DocumentsType')\n ->find($value);\n\n $object->setDocumentsType($type);\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($object);\n\n try {\n $em->flush();\n } catch (\\ErrorException $e) {\n $return = array('msg' => $translator->trans('Wrong input data'));\n\n return new Response(json_encode($return));\n }\n\n $return = array('success' => 1);\n\n return new Response(json_encode($return));\n }", "function convertToSolrValue($value);", "#[Strval('String value')]\n public function stringValue() { }", "function SimpleType() {\n global $DB, $NodesA, $NumNodes, $NodeX, $SchemaId;\n $node = $NodesA[$NodeX];\n #DumpExport(\"Node $NodeX in SimpleType() \", $node);\n $set = '';\n if (isset($node['attributes'])) {\n if (!$name = $node['attributes']['name']) DieNow('No name for SimpleType with attributes');\n $set .= \",name='$name'\";\n }else\n $name = false;\n $depth = $node['depth']; # depth of the <simpleType node - need this as SimpleType() is not called just when at depth 1\n # Skip over any annotation & documentation nodes djh?? add doc\n while (($NodeX+1) < $NumNodes && strpos('annotation,documentation', $NodesA[$NodeX+1]['tag']) !== false) {\n $NodeX++;\n #DumpExport(\"Node $NodeX in SimpleType() skip loop \", $NodesA[$NodeX]);\n }\n // move to next node after the simpleType and annotation & documentation nodes\n if (++$NodeX == $NumNodes) DieNow('hit the buffers in SimpleType()');\n $node = $NodesA[$NodeX];\n #DumpExport(\"Node $NodeX in SimpleType() \", $node);\n switch (LessPrefix($node['tag'])) { # expect restriction or union\n case 'restriction':\n if (!$base = @$node['attributes']['base']) DieNow('simpleType restriction base not found as expected');\n $set .= \",base='$base'\";\n switch (LessPrefix($base)) {\n case 'anyURI': # expect minLength\n if (($NodeX+1) < $NumNodes && $NodesA[$NodeX+1]['depth'] == $depth+2) { # +2 for restriction then minLength\n $NodeX++;\n $set .= \",{$NodesA[$NodeX]['tag']}={$NodesA[$NodeX]['attributes']['value']}\";\n }\n break;\n case 'token': # /- expect a set of enumeration values\n case 'NMTOKEN': # |\n case 'string': # |\n $enums = '';\n while (($NodeX+1) < $NumNodes && LessPrefix($NodesA[$NodeX+1]['tag']) == 'enumeration') {\n $enums .= ',' . $NodesA[++$NodeX]['attributes']['value'];\n }\n if (!($enums = substr($enums, 1))) DieNow(\"no enum list for simpleType base=$base\");\n $set .= \",EnumList='$enums'\";\n break;\n case 'decimal': # expect nothing or minExclusive or maxExclusive. Put them straight it\n if (($NodeX+1) < $NumNodes && $NodesA[$NodeX+1]['depth'] == $depth+2) { # +2 for restriction then minExclusive or maxExclusive\n $NodeX++;\n $set .= \",{$NodesA[$NodeX]['tag']}={$NodesA[$NodeX]['attributes']['value']}\";\n }\n break;\n default: DieNow(\"SimpleType restriction base of $base not known\");\n }\n #echo \"set=$set<br>\";\n break;\n\n case 'union':\n $set .= (',unionId=' . Union());\n break;\n default: DieNow('restriction or unions not found after simpleType as expected');\n }\n if (($NodeX+1) < $NumNodes && $NodesA[$NodeX+1]['depth'] > $depth) {\n #DumpExport(\"Node \". ($NodeX+1) . \" next node after simpleType\", $NodesA[$NodeX+1]);\n DieNow('SimpleType end not back to parent depth');\n }\n # In the no name case use $set as a where clause with , => and to see if this simpleType has already been defined\n if (!$name) {\n if ($set[0] == ',') # $set may have a leading comma\n $set = substr($set, 1);\n if ($o = $DB->OptObjQuery('Select Id,SchemaId From SimpleTypes where ' . str_replace(',', ' and ', $set))) {\n $DB->StQuery(\"Update SimpleTypes Set SchemaId='\" . $o->SchemaId . ',' . $SchemaId . \"' Where Id=$o->Id\");\n return $o->Id;\n }\n }\n return InsertFromSchema('SimpleTypes', $set);\n}", "protected function ValueText() {\n\t$strType = $this->TypeID();\n\t$ar = self::$arTypeNames;\n\tif (isset($ar[$strType])) {\n\t $wtType = $ar[$strType];\n\t} else {\n\t $wtType = \"<b>?</b>$strType\";\n\t}\n\treturn $wtType;\n }", "public function value($string);", "private function setTypeDataAsString(\\Scrivo\\Str $str) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull,\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t), 1);\n\n\t\t$d = array();\n\t\t$parts = $str->split(new \\Scrivo\\Str(\"\\n\"));\n\t\tforeach($parts as $line) {\n\t\t\t$p = $line->split(new \\Scrivo\\Str(\"=\"), 2);\n\t\t\tif (count($p) == 2) {\n\t\t\t\t$d[(string)$p[0]->trim()] = $this->readStr($p[1]->trim());\n\t\t\t}\n\t\t}\n\t\t$this->typeData = (object)$d;\n\t}", "public function getTypeDocument(): ?string {\n return $this->typeDocument;\n }", "function setContentType($strValue)\n\t{\n\t\t$this->ContentType = $strValue;\n\t}", "function set_documentType(int $value ) : bool\n\t{\n\t\treturn( $this->setValue( \"documentType\", $value ));\n\t}", "function TypeDeclaration($base_uri, $string, $type = null, $subClassOf = null) {\n\tglobal $declarations;\n\t\n\tif($string && $string[0] == '\"') $string = substr($string,1,-1);\n\t$id = $base_uri.md5($string);\n\tif(!isset($declarations[$id])) {\n\t\t$declarations[$id]['label'] = $string;\n\t\tif(isset($type)) $declarations[$id]['type'] = $type;\n\t\tif(isset($subClassOf)) $declarations[$id]['subClassOf'] = $subClassOf;\n\t}\n\treturn $id;\n}", "function setType( $value )\n {\n $this->Type = $value;\n }", "public function toType(string $typeName):void;", "function getTypeConverter() ;", "public function valueType() {}", "function getDocumentsType(){\n return array(\"Bill\",\"Book\",\"Book Section\",\"Case\",\"Computer Program\",\"Conference Proceedings\",\"Encyclopedia Article\",\"Film\",\"Generic\",\"Hearing\",\"Journal Article\",\"Magazine Article\",\"Newspaper Article\",\"Patent\",\"Report\",\"Statute\",\"Television Broadcast\",\"Thesis\",\"Web Page\",\"Working Paper\");\n}", "public function setDocType($newDocType){\r\n $this->docType = $newDocType;\r\n }", "abstract protected function getType(&$value);", "public function getDocType() : string\n {\n return $this->docType;\n }", "public function testThatParseTypeCorrectlyTranslatesToQuotedString()\n {\n $value = uniqid();\n\n $fieldParser = new FieldParser();\n\n $actual = $fieldParser->parseType($value);\n\n $this->assertTrue(is_string($value));\n $this->assertEquals(\"'{$value}'\", $actual);\n }", "protected function get_type() {\n\t\treturn 'string';\n\t}", "public function setDocumentName( $string) ;", "function meta_from_storage($value, $type)\n{\n switch ($type) {\n case 'UserInput':\n return new ValueTypes\\UserInput($value);\n break;\n case 'FormField':\n return new ValueTypes\\FormField($value);\n break;\n case 'Status':\n return new ValueTypes\\Status($value);\n break;\n case 'boolean':\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n break;\n default:\n return $value;\n break;\n }\n}", "public function testWriteValueEdmString(){\n\t\t$writer = new JsonWriter(\"\");\n\t\t$result = $writer->writeValue(null, \"Edm.String\");\n\t\t$this->assertSame($result, $writer);\n\t\t$this->assertEquals('null', $writer->getJsonOutput());\n\n\n\t\t$writer = new JsonWriter(\"\");\n\t\t$result = $writer->writeValue('null', \"Edm.String\");\n\t\t$this->assertSame($result, $writer);\n\t\t$this->assertEquals('\"null\"', $writer->getJsonOutput());\n\n\n\t\t$writer = new JsonWriter(\"\");\n\t\t$val = \"http://yahoo.com/some/path\";\n\t\t$result = $writer->writeValue($val, \"Edm.String\");\n\t\t$this->assertSame($result, $writer);\n\t\t$this->assertEquals('\"http://yahoo.com/some/path\"', $writer->getJsonOutput());\n\n\t}", "function getDetailsPage($iDocTypeID) {\n global $default;\n $oDocType = null;\n if (isset($iDocTypeID)) {\n $oDocType = DocumentType::get($iDocTypeID);\n }\n\n $sToRender .= renderHeading(_(\"Edit Document Type\"));\n \n $sToRender .= \"<table border=0 width=100%>\\n\";\n \n $sToRender .= \"<tr>\\n\";\n $sToRender .= \"<td width=\\\"45%\\\">\" . _(\"Document Type Name:\") . \" </td><td>\" . $oDocType->getName() . \"</td>\\n\";\n $sToRender .= \"</tr>\\n\";\n $sToRender .= \"<tr><input type=hidden name=\\\"fDocTypeID\\\" value=\\\"\" . $iDocTypeID . \"\\\"></tr>\\n\";\n $sToRender .= \"<tr></tr>\\n\";\n $sToRender .= \"<tr><td valign=\\\"top\\\">\" . _(\"Generic Document Fields:\") . \" </td><td>\" . getGenericFieldsList() . \"</td></tr>\\n\";\n $sToRender .= \"<tr></tr>\\n\";\n $sToRender .= \"<tr><td valign=\\\"top\\\">\" . _(\"Document Type Specific Fields:\") . \" </td>\"; \n $sToRender .= \"<td>\" . getDocumentTypeFieldsList($iDocTypeID) . \"</td></tr>\\n\";\t\n $sToRender .= \"<tr><td >\" . generateControllerLink(\"addDocTypeFieldsLink\", \"fDocTypeID=$iDocTypeID\", _(\"Add new Type Specific Field\") . \" &nbsp; <img border=0 src=\\\"\" . KTHtml::getAddButton() . \"\\\"/>\");\n $sToRender .= generateControllerLink(\"listDocTypes\", \"\", \"<img border=0 src=\\\"\" . KTHtml::getBackButton() . \"\\\"/>\"). \"</td></tr>\\n\"; \n $sToRender .= \"</table>\\n\";\n\n return $sToRender;\n}", "private function setType()\n {\n if ( isset( $_GET['type'] ) ) {\n switch ( $_GET['type'] ) {\n case 'users':\n $this->type = 'users';\n break;\n case 'content':\n default:\n $this->type = 'content';\n break;\n }\n }\n }", "public function getDocType(){\r\n return $this->docType;\r\n }", "public static function typed($type, $string= null) {\n $self= new self($type);\n $self->string= $string;\n return $self;\n }", "public function setType($value)\n {\n $this->geType = trim((string) $value);\n }", "#[@fromDia(xpath= '@type', value= 'string')]\n public function setNodeType($type) {\n $this->type= $type;\n }", "public function getTypeString(){\r\n\t\treturn $this->type;\r\n\t}", "function fromStringDict( $name, $type, $str ) {\n if( $type->reqDictionary() ) {\n $dict = $type->dictionary() . '_local_dictionary';\n return 'FromString(' . $name . ', ' . $str . ', ' . $dict . ' )';\n }\n else {\n return 'FromString(' . $name . ', ' . $str . ')';\n }\n }", "function wp_document_revisions_register_type_ct() {\n\t\n\t\t\t$labels = array(\n\t\t\t 'name' => _x( 'Types', 'taxonomy general name' ),\n\t\t\t 'singular_name' => _x( 'Type', 'taxonomy singular name' ),\n\t\t\t 'search_items' => __( 'Search Types' ),\n\t\t\t 'all_items' => __( 'All Types' ),\n\t\t\t 'parent_item' => __( 'Parent Type' ),\n\t\t\t 'parent_item_colon' => __( 'Parent Type:' ),\n\t\t\t 'edit_item' => __( 'Edit Type' ), \n\t\t\t 'update_item' => __( 'Update Type' ),\n\t\t\t 'add_new_item' => __( 'Add New Type' ),\n\t\t\t 'new_item_name' => __( 'New Type Name' ),\n\t\t\t 'menu_name' => __( 'Type' ),\n\t\t\t); \t\n\t\t\t\n\t\t\tregister_taxonomy('document_type',array('document'), array(\n\t\t\t 'hierarchical' => true,\n\t\t\t 'labels' => $labels,\n\t\t\t 'show_ui' => true,\n\t\t\t 'public' => true,\n\t\t\t 'rewrite' => array( 'slug' => 'type' ),\n\t\t\t));\t\n\t\t \n\t\t}", "public function stringValue($value=null) { }", "public function set_docType($docType)\n\t{\n\t\tswitch ($docType) {\n\t\t\tcase 'Strict':\n\t\t\t\t$this->docType = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">';\n\t\t\t\tbreak;\n\n\t\t\tcase 'Transitional':\n\t\t\t\t$this->docType = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">';\n\t\t\t\tbreak;\n\n\t\t\tcase 'Frameset':\n\t\t\t\t$this->docType = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'None':\n\t\t\t\t$this->docType = null;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t$this->docType = $docType;\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t}", "public function getValueType(): string;", "Function display_from_type($input_type, $value){\n\tswitch (strtolower($input_type)){\t\t\n\t\t//display wysiwyg value\n\t\tCase strtolower(\"wysiwyg\"):\n\t\t\techo \"&lt;HTML&gt;\";\n\t\tbreak;\n\t\t\n\t\t//display image value\n\t\tCase strtolower(\"image\"):\n\t\t\tif (strlen($value) == 0){\n\t\t\t\t$value=\"images/no_image.gif\";\n\t\t\t}\n\t\t\techo \"<a target=\\\"_blank\\\" href=\\\"/\".$value.\"\\\" class=\\\"image_link\\\">\";\n\t\t\techo \"<img src=\\\"ThumbGenerate.php?Width=50&VFilePath=\".$value.\"\\\"></a>\";\t\n\t\tbreak;\n\t\t\n\t\t//display checkbox value\n\t\tCase strtolower(\"checkbox\"):\n\t\t\techo \"<input type=\\\"checkbox\\\" DISABLED \";\n\t\t\tif (intval($value) == 1){\n\t\t\t\techo \"CHECKED\";\n\t\t\t}\n\t\t\techo \">\";\t\n\t\tbreak;\n\t\t\n\t\t//display select value\n\t\tCase strtolower(\"select\"):\t\n\t\t\techo get_display_from_value($tempObj, $value);\n\t\tbreak;\n\t\t\n\t\t//display date value\n\t\tCase strtolower(\"datetime\"):\n\t\t\tif(strlen($value) > 0){\n\t\t\t\techo date(\"m/d/y h:i a\",strtotime( $value ));\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t//display date value\n\t\tCase strtolower(\"date\"):\n\t\t\tif(strlen($value) > 0){\n\t\t\t\techo date(\"m/d/y\",strtotime( $value ));\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t//display text value\n\t\tCase strtolower(\"text\"):\n\t\t\tif(strlen($value) > 20){\n\t\t\t\techo substr($value, 0, 20) . \"...\";\n\t\t\t}else{\n\t\t\t\techo $value;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\t//display value\n\t\t\techo $value; \n\t}\n}", "function type($new_value = null){\r\n\t /* 'string'(default),'date','datetime','text','int','real','boolean','reference','password','list' */\r\n /*\r\n\t\t\tif (!in_array($new_value,array(\r\n\t\t\t\t\t'string','date','datetime','text','readonly',\r\n\t\t\t\t\t'int','real','money','boolean','reference','reference_id','password','list',\r\n\t\t\t\t\t'daytime','daytime_total','image','radio','file'\r\n */\r\n\r\n\t\tif (is_null($new_value)){\r\n\t\t\treturn (empty($this->datatype))?'string':$this->datatype;\r\n } else {\r\n\t\t\t$this->datatype = $new_value;\r\n\t\t\treturn $this;\r\n\t\t}\r\n\t}", "public function valueType() { }", "public function typedValue($typeCast = null) {\n\t\t$value = $this->singleFieldValue();\n\t\tif (false == strpos($value, '://')) {\n\t\t\t$value = $this->typedValuePrefix() . $value;\n\t\t}\n\t\treturn $value;\n\t}", "function wp_document_revisions_save_type( $post_id ) {\n \t\t\t\n \t\t\t//verify this is not an autosave\n \t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n \t\t\treturn;\n \t\t\n \t\t//verify nonce\n \t\tif ( !isset( $_POST['document_type_nonce'] ) ||\n \t\t\t !wp_verify_nonce( $_POST['document_type_nonce'], 'document_type' ) )\n \t\t\treturn;\n \t\t\n \t\t//verify permissions\n \t\tif ( !current_user_can( 'edit_post', $post_id ) )\n \t\t\treturn;\n \t\t\n \t\t//associate taxonomy with parent, not revision\n\t\t\tif ( wp_is_post_revision( $post_id ) )\n\t\t\t\t$post_id = wp_is_post_revision( $post_id );\n \t\t\n \t\t//store the data \t\t\t\n \t\twp_set_post_terms( $post_id, $_POST['document_type'], 'document_type', false);\n \t\t\n \t\t}", "function sst_register_field_type(string $html_type,string $type,$function,$epithet=NULL,$description=NULL,$slug=NULL,$owner=NULL,$id=NULL){\n\treturn sst_add_to_table( $GLOBALS['sst_tables']['input_type'], array( 'id'=>$id, 'epithet'=>$epithet, 'slug'=>$slug, 'html_type'=>$html_type, 'type'=>$type, 'function'=>$function, 'description'=>$description, 'owner'=>$owner, 'created'=>date('Y-m-d H:i:s'), 'modified'=>date('Y-m-d H:i:s')));\n}", "function typed($value)\n {\n if (!is_string($value)) {\n return $value;\n }\n\n if (1 < $len = strlen($value)) {\n switch ($value[0] . $value[$len - 1]) {\n case \"''\":\n case '\"\"':\n return substr($value, 1, -1);\n }\n }\n\n if (false !== $int = filter_var($value, FILTER_VALIDATE_INT)) {\n return $int;\n }\n\n if (false !== $float = filter_var($value, FILTER_VALIDATE_FLOAT)) {\n return $float;\n }\n\n // because FILTER_VALIDATE_BOOLEAN sucks...\n switch (strtolower($value)) {\n case 'true':\n case 'on':\n case 'yes':\n return true;\n case 'false':\n case 'off':\n case 'no':\n return false;\n case 'null':\n return;\n }\n\n return $value;\n }", "function fdf_set_value($fdf_document, $fieldname, $value, $isName = NULL)\n{\n}", "protected function _introspectType($value) {\n\t\tswitch (true) {\n\t\t\tcase (is_bool($value)):\n\t\t\t\treturn 'boolean';\n\t\t\tcase (is_float($value) || preg_match('/^\\d+\\.\\d+$/', $value)):\n\t\t\t\treturn 'float';\n\t\t\tcase (is_int($value) || preg_match('/^\\d+$/', $value)):\n\t\t\t\treturn 'integer';\n\t\t\tcase (is_string($value) && strlen($value) <= $this->_columns['string']['length']):\n\t\t\t\treturn 'string';\n\t\t\tdefault:\n\t\t\t\treturn 'text';\n\t\t}\n\t}", "protected function parseType()\n {\n\n if ( $this->type ) {\n return 'type=\"' . $this->type . '\"';\n }\n\n }", "function GetHtmlForType($name,$type,$value) {\r\n\t$type = trim(preg_replace('/unsigned/iu','',$type));\r\n\tswitch(strtolower($type)) {\r\n\t\t//text\r\n\t\tcase 'hidden':\r\n\t\t\t$ret = '<INPUT TYPE=\"hidden\" NAME=\"field['.$name.']\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'disabled':\r\n\t\t\t$ret = '<INPUT DISABLED TYPE=\"text\" NAME=\"field['.$name.']\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'char':\r\n\t\tcase 'nchar':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:7%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'varchar':\r\n\t\tcase 'nvarchar':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:40%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tcase 'tinyblob':\r\n\t\tcase 'tinytext':\r\n\t\tcase 'blob':\r\n\t\tcase 'text':\r\n\t\t\t$ret = '<TEXTAREA NAME=\"field['.$name.']\" style=\"width:70%;\">'.$value.'</TEXTAREA>';\r\n\t\t\tbreak;\r\n\t\tcase 'mediumblob':\r\n\t\tcase 'mediumtext':\r\n\t\tcase 'longblob':\r\n\t\tcase 'longtext':\r\n\t\t\t$ret = '<TEXTAREA NAME=\"field['.$name.']\" style=\"width:70%;height:150px;\">'.$value.'</TEXTAREA>';\r\n\t\t\tbreak;\r\n\t\t//int\r\n\t\tcase 'bit':\r\n\t\tcase 'bool':\r\n\t\t\t$ret = '<INPUT TYPE=\"checkbox\" NAME=\"field['.$name.']\">';\r\n\t\t\tbreak;\r\n\t\tcase 'tinyint':\r\n\t\tcase 'smallint':\r\n\t\tcase 'mediumint':\r\n\t\tcase 'integer':\r\n\t\tcase 'int':\r\n\t\tcase 'bigint':\r\n\t\tcase 'datetime':\r\n\t\tcase 'time':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:15%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\t//real\r\n\t\tcase 'real':\r\n\t\tcase 'float':\r\n\t\tcase 'decimal':\r\n\t\tcase 'numeric':\r\n\t\tcase 'double':\r\n\t\tcase 'double precesion':\r\n\t\t\t$ret = '<INPUT TYPE=\"text\" NAME=\"field['.$name.']\" style=\"width:15%;\" value=\"'.$value.'\">';\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n\treturn $ret;\r\n}", "function str($name = null, $description = null)\n{\n if (is_null($name)) {\n return Type::string();\n }\n\n return field(Type::string(), $name, $description);\n}", "public function Type( $theValue = NULL, $getOld = FALSE )\n\t{\n\t\t//\n\t\t// Save node.\n\t\t//\n\t\t$node = $this->Node();\n\t\t\n\t\t//\n\t\t// Save value.\n\t\t//\n\t\t$save = ( $node !== NULL )\n\t\t\t ? $node->getType()\n\t\t\t : NULL;\n\t\t\n\t\t//\n\t\t// Retrieve value.\n\t\t//\n\t\tif( $theValue === NULL )\n\t\t\treturn $save;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\t//\n\t\t// Set new value.\n\t\t//\n\t\tif( $node !== NULL )\n\t\t{\n\t\t\t//\n\t\t\t// Set type.\n\t\t\t//\n\t\t\t$node->setType( (string) $theValue );\n\t\t\t\n\t\t\t//\n\t\t\t// Set dirty flag.\n\t\t\t//\n\t\t\t$this->_IsDirty( TRUE );\n\t\t\t\n\t\t\t//\n\t\t\t// Set inited flag.\n\t\t\t//\n\t\t\t$this->_IsInited( ($this->Node() !== NULL) &&\n\t\t\t\t\t\t\t ($this->Node()->getType() !== NULL) &&\n\t\t\t\t\t\t\t ($this->Node()->getEndNode() !== NULL) &&\n\t\t\t\t\t\t\t ($this->Node()->getStartNode() !== NULL) );\n\t\t\t\n\t\t} // Has node.\n\t\t\n\t\tif( $getOld )\n\t\t\treturn $save;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\treturn (string) $theValue;\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\n\t}", "public function getType($typeName);", "function type($locator, $value) {\r\n\t\t\techo $this->__getRow('type', $locator, $value);\r\n\t\t}", "function jsonkit_type($value = null, $convert = false)\n {\n if(is_string($value) && (bool)$convert)\n {\n if(is_numeric($value))\n {\n if((float)$value != (int)$value){\n $value = (float)$value;\n }else{\n $value = (int)$value;\n }\n }else{\n if($value === 'true' || $value === 'false')\n {\n $value = (bool)$value;\n }\n }\n }\n\n if(is_object($value)){\n return 'object';\n }\n if(is_array($value)){\n return 'array';\n }\n if(is_resource($value)){\n return 'resource';\n }\n if(is_callable($value)){\n return 'callable';\n }\n if(is_file($value)){\n return 'file';\n }\n if(is_int($value)){\n return 'integer';\n }\n if(is_float($value)){\n return 'float';\n }\n if(is_bool($value)){\n return 'boolean';\n }\n if(is_null($value)){\n return 'null';\n }\n if(is_string($value)){\n return 'string';\n }\n return null;\n }", "#[@fromDia(xpath= 'dia:attribute[@name=\"value\"]/dia:string', value= 'string')]\n public function setValue($value) {\n $this->setString('value', $value);\n }", "private function addRdfType($uri, $type)\n\t{\n\t\t$this->currentSubject = $uri;\n\t\t$this->currentDomain = $type;\n\t\tdispatcher($this)->onNewTriple($uri, 'rdf:type', $type);\n\t}", "protected function postTypeString() {\n\t\treturn 'page';\n\t}", "public function getTypeValue();", "function get_document_type() {\n\t\treturn $this->get_mapped_property( 'document_type' );\n\t}", "public function __construct($docType) {\n $tmp = $this->docData;\n foreach ($this->data as $key => $val) {\n $tmp[$key] = $val;\n }\n $this->data = $tmp;\n unset($this->docData, $tmp);\n \n $this->data['doc_type']['value'] = $docType;\n \n // Add all parameters to the doc scheme, each with a fetch function that fetches the specified parameter.\n $sql_query = mysql_query(\"SELECT param_name FROM sys_docs_types_params WHERE doc_type = '\" . $this->data['doc_type']['value'] . \"'\");\n while ($sql = mysql_fetch_assoc($sql_query)) {\n if (!isset($this->data[$sql['param_name']])) {\n $this->data[$sql['param_name']] = array(\n 'type' => 'param',\n 'value' => null,\n 'fetch' => 'fetchDocParameter'\n );\n \n $this->parameters[] = $sql['param_name'];\n }\n }\n \n/* TEMPORARY COMPATIBILITY MODE (WORKING):\n if ($_SESSION['user']['user_id'] == 500) {\n unset($this->data['parameters']);\n }\n*/\n }", "function dbFieldType()\n {\n return \"string\";\n }", "function dbFieldType()\n {\n return \"string\";\n }", "private function getTypeDataAsString() {\n\t\t$d = array();\n\t\tforeach($this->typeData as $k=>$v) {\n\t\t\t$d[] = $k.\"=\".$v;\n\t\t};\n\t\treturn new \\Scrivo\\Str(implode(\"\\n\", $d));\n\t}", "static function aString($dataType, $field, $obj) {\n if ('string' === $dataType) {\n $obj->setResult($field, 'my string');\n }\n }", "function makeDocumentTypeArray(){\n\t\n\t\t $typeParameter = \"\";\n\t\t $DocumentTypes = array();\n\t\t if($this->substance){\n\t\t\t $DocumentTypes[] = \"substance\";\n\t\t }\n\t\t if($this->spatial){\n\t\t\t $this->defaultSort = false; //sort by interest score\n\t\t\t $DocumentTypes[] = \"spatial\";\n\t\t }\n\t\t if($this->image){\n\t\t\t $DocumentTypes[] = \"image\";\n\t\t }\n\t\t if($this->video){\n\t\t\t $DocumentTypes[] = \"video\";\n\t\t }\n\t\t if($this->person){\n\t\t\t $DocumentTypes[] = \"person\";\n\t\t }\n\t\t if($this->project){\n\t\t\t $DocumentTypes[] = \"project\";\n\t\t }\n\t\t if($this->document){\n\t\t\t $DocumentTypes[] = \"document\";\n\t\t }\n\t\t if($this->table){\n\t\t\t $DocumentTypes[] = \"table\";\n\t\t }\n\t\t if($this->site){\n\t\t\t $DocumentTypes[] = \"site\";\n\t\t }\n\t\t if($this->media){\n\t\t\t $DocumentTypes[] = \"acrobat pdf\";\n\t\t\t $DocumentTypes[] = \"external\";\n\t\t\t $DocumentTypes[] = \"KML\";\n\t\t\t $DocumentTypes[] = \"GIS\";\n\t\t }\n\t \n\t\t return $DocumentTypes;\n }", "public static function string() : ScalarType\n {\n return self::scalar(IType::STRING);\n }", "protected function getFieldType(): string\n {\n return 'string';\n }", "public static function setDocType($doctype){ }", "public function formatType(array $doclet): string\n {\n $name = $doclet['names'][0];\n\n // Unwrap Promise\n if (preg_match('/Promise\\.<[\\!\\?]?(.+)>/', $name, $matches)) {\n $name = $matches[1];\n }\n\n // Unwrap Array and Sets\n $suffix = null;\n if (preg_match('/(?:Array|Set)\\.<[\\!\\?]?(.+)>/', $name, $matches)) {\n $name = $matches[1];\n $suffix = '[]';\n }\n\n // Maps Are Arrays\n if (preg_match('/(?:Map)\\.<[\\!\\?]?(.+)>/', $name)) {\n $name = 'array';\n }\n\n // Normalize Puppeteer namespace\n if (preg_match('/Puppeteer\\.(.+)/', $name, $matches)) {\n $name = $matches[1];\n }\n\n $name = $this->typeMap[$name] ?? $name;\n\n if (in_array($name, $this->classdefs) || in_array($name, $this->primitives)) {\n return $name.$suffix;\n }\n\n // Everything is an object (array) in JavaScript.\n return '\\Nesk\\Rialto\\Data\\BasicResource'.$suffix;\n }", "protected function writePdfType(PdfType $value)\n {\n if ($value instanceof PdfNumeric) {\n if (\\is_int($value->value)) {\n $this->_put($value->value . ' ', false);\n } else {\n $this->_put(\\rtrim(\\rtrim(\\sprintf('%.5F', $value->value), '0'), '.') . ' ', false);\n }\n } elseif ($value instanceof PdfName) {\n $this->_put('/' . $value->value . ' ', false);\n } elseif ($value instanceof PdfString) {\n $this->_put('(' . $value->value . ')', false);\n } elseif ($value instanceof PdfHexString) {\n $this->_put('<' . $value->value . '>');\n } elseif ($value instanceof PdfBoolean) {\n $this->_put($value->value ? 'true ' : 'false ', false);\n } elseif ($value instanceof PdfArray) {\n $this->_put('[', false);\n foreach ($value->value as $entry) {\n $this->writePdfType($entry);\n }\n $this->_put(']');\n } elseif ($value instanceof PdfDictionary) {\n $this->_put('<<', false);\n foreach ($value->value as $name => $entry) {\n $this->_put('/' . $name . ' ', false);\n $this->writePdfType($entry);\n }\n $this->_put('>>');\n } elseif ($value instanceof PdfToken) {\n $this->_put($value->value);\n } elseif ($value instanceof PdfNull) {\n $this->_put('null ');\n } elseif ($value instanceof PdfStream) {\n /**\n * @var $value PdfStream\n */\n $this->writePdfType($value->value);\n $this->_put('stream');\n $this->_put($value->getStream());\n $this->_put('endstream');\n } elseif ($value instanceof PdfIndirectObjectReference) {\n if (!isset($this->objectMap[$this->currentReaderId])) {\n $this->objectMap[$this->currentReaderId] = [];\n }\n\n if (!isset($this->objectMap[$this->currentReaderId][$value->value])) {\n $this->objectMap[$this->currentReaderId][$value->value] = ++$this->n;\n $this->objectsToCopy[$this->currentReaderId][] = $value->value;\n }\n\n $this->_put($this->objectMap[$this->currentReaderId][$value->value] . ' 0 R ', false);\n } elseif ($value instanceof PdfIndirectObject) {\n /**\n * @var PdfIndirectObject $value\n */\n $n = $this->objectMap[$this->currentReaderId][$value->objectNumber];\n $this->_newobj($n);\n $this->writePdfType($value->value);\n $this->_put('endobj');\n }\n }", "function get_documentType() :int\n\t{\n\t\treturn( $this->documentType );\n\t}", "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "public function addSimpleField($fieldName, $type = 'general', $format = '', $options = array())\n {\n $options = self::setRTLOptions($options);\n $class = get_class($this);\n $availableTypes = array('date' => '\\@', 'numeric' => '\\#', 'general' => '\\*');\n $fieldOptions = array();\n if (isset($options['doNotShadeFormData']) && $options['doNotShadeFormData']) {\n $fieldOptions['doNotShadeFormData'] = true;\n }\n if (isset($options['updateFields']) && $options['updateFields']) {\n $fieldOptions['updateFields'] = true;\n }\n if (count($fieldOptions) > 0) {\n $this->docxSettings($fieldOptions);\n }\n $simpleField = new WordFragment();\n $simpleField->addText($fieldName, $options);\n\n $data = $fieldName . ' ';\n if (!empty($format)) {\n $data .= $availableTypes[$type] . ' ' . $format . ' ';\n }\n $data .= '\\* MERGEFORMAT';\n $beguin = '<w:fldSimple w:instr=\" ' . $data . ' \">';\n\n $end = '</w:fldSimple>';\n $simpleField = str_replace('<w:r>', $beguin . '<w:r>', (string) $simpleField);\n $simpleField = str_replace('</w:r>', '</w:r>' . $end, (string) $simpleField);\n\n PhpdocxLogger::logger('Adding a simple field to the Word document.', 'info');\n // in order to preserve the run styles insert them within the <w:pPr> tag\n if ($class == 'WordFragment') {\n $this->wordML .= (string) $simpleField;\n } else {\n $this->_wordDocumentC .= (string) $simpleField;\n }\n }", "function type($str, $long=1) {\n $trans = array(\n \"form\" => \"multipart/form-data\",\n \"url\" => \"application/x-www-form-urlencoded\",\n \"php\" => \"application/vnd.php.serialized\",\n );\n $trans[\"multi\"] = &$trans[\"form\"];\n if ($long) {\n $new = $trans[$str];\n }\n else {\n $new = array_search($str, $trans);\n }\n return( $new ? $new : $str );\n }", "public function generateString(TypeString $type, $value = null) {\n }", "function _content_type_resource_retrieve($value) {\n $content_type = db_query(\"SELECT * FROM node_type WHERE type = '$value' \");\n return db_fetch_object($content_type);\n}", "public function testToString() : void\n {\n $typeTest = new Type\\Object_('java.lang.Object');\n $type = Type::getType($typeTest);\n\n $this->assertEquals('Ljava/lang/Object;', (string)$type);\n }", "protected static function GetTypeStr( $value ) : string\n {\n\n if ( \\is_null( $value ) )\n {\n return 'NULL';\n }\n\n if ( \\is_resource( $value ) )\n {\n return \\get_resource_type( $value ) . '-Resource';\n }\n\n if ( \\is_string( $value ) )\n {\n if ( \\strlen( $value ) > 128 )\n {\n return 'string with value (' . \\substr( $value, 0, 126 ) . '…)';\n }\n return 'string with value (' . $value . ')';\n }\n\n if ( \\is_bool( $value ) )\n {\n return 'boolean with value (' . ( $value ? 'true' : 'false' ) . ')';\n }\n\n if ( \\is_int( $value ) )\n {\n return 'integer with value (' . $value . ')';\n }\n\n if ( \\is_float( $value ) )\n {\n return 'float with value (' . $value . ')';\n }\n\n if ( \\is_double( $value ) )\n {\n return 'double with value (' . $value . ')';\n }\n\n if ( \\is_array( $value ) )\n {\n return 'Array: ' . \\json_encode( $value );\n }\n\n if ( \\is_object( $value ) )\n {\n return \\get_class( $value ) . ' object: ' . \\json_encode( $value );\n }\n\n return \\gettype( $value );\n\n }", "function getTypeString() { return $this->type_text[$this->token_type]; }", "public function testString()\n {\n $this->assertInternalType('string', \"texto\");\n }", "public function setSoureType($value)\n {\n return $this->set(self::SOURETYPE, $value);\n }", "public function saveObjectTypes($varValue, Contao\\DataContainer $dc): ?string\n {\n if(!$varValue || $dc->activeRecord->type !== 'system')\n {\n return $varValue;\n }\n\n $arrChoosedTypes = Contao\\StringUtil::deserialize($varValue);\n\n if($arrChoosedTypes === null)\n {\n return $varValue;\n }\n\n $arrColumns = array(\"id IN('\" . implode(\"','\", $arrChoosedTypes) . \"')\");\n\n $objObjectTypes = ContaoEstateManager\\ObjectTypeEntity\\ObjectTypeModel::findBy($arrColumns, array());\n\n if($objObjectTypes !== null)\n {\n $arrOptions = array();\n\n while($objObjectTypes->next())\n {\n $arrOptions[ $objObjectTypes->id ] = $objObjectTypes->title;\n }\n\n // Store the new object type data\n $this->Database->prepare(\"UPDATE tl_lead_matching SET objectTypesData=? WHERE id=?\")\n ->execute(serialize($arrOptions), $dc->id);\n }\n\n return $varValue;\n }", "function my_epl_change_type( $field ) {\n\t$field['type'] = 'text';\n\treturn $field;\n}", "function setType($type);", "function setType($type);", "function setType($type);", "private function AddLiOf( string $filtr_str, int $value , string $type )\r\n {\r\n $filtr_str .= \" \" . $type . \" \" . $value;\r\n return $filtr_str;\r\n }", "function mgallery2_filter_attr_value($text, $value_type = MG2_FILTER_WORD)\n{\n $first = substr($text, 0, 1);\n if ($first == '\"' || $first == ';') {\n if (substr($text, -1, 1) == $first) {\n $text = substr($text, 1, -1);\n }\n }\n switch($value_type) {\n case MG2_FILTER_WORD :\n return preg_replace(\"/\\W/\", '', $text);\n case MG2_FILTER_INTEGER :\n return preg_replace(\"/\\D/\", '', $text);\n case MG2_FILTER_PIPEDSTRING :\n return preg_replace(\"/[^\\w|]/\", '', $text);\n default :\n return check_plain($text);\n }\n}", "protected static function formatTypeParameter() {\n\t\t$tracks = explode( '+', self::$query['type'] );\n\t\t$string = \"\";\n\t\tfor ( $i=0, $c=count($tracks); $i<$c; $i++ ) {\n\t\t\tif ( $i != 0 ) {\n\t\t\t\t$string .= '&type=';\n\t\t\t}\n\t\t\t$string .= $tracks[$i];\n\t\t}\n\t\tself::$query['type'] = $string;\n\t\t\t\n\t}", "function getDocumentTypeSelector()\n{\n return new Selector_DocumentTypeSelector('document_type');\n}", "public function getTypeFromValue($value): string {\n if (\\is_array($value)) {\n if (empty($value) || \\array_keys($value) === \\range(0, \\count($value) - 1)) {\n return self::TYPE_ARRAY;\n }\n return self::TYPE_OBJECT;\n }\n if (\\is_object($value)) {\n return self::TYPE_OBJECT;\n }\n if (NULL === $value) {\n return self::TYPE_NULL;\n }\n if (\\is_bool($value)) {\n return self::TYPE_BOOLEAN;\n }\n if (\\is_int($value) || \\is_float($value)) {\n return self::TYPE_NUMBER;\n }\n return self::TYPE_STRING;\n }" ]
[ "0.60800356", "0.5669771", "0.55671334", "0.5534795", "0.5486757", "0.54433304", "0.5420358", "0.5377083", "0.5375083", "0.5375083", "0.5305819", "0.5273849", "0.5263391", "0.5253162", "0.52162606", "0.51693255", "0.51471204", "0.5131992", "0.51317877", "0.51233965", "0.5122323", "0.5108454", "0.50973165", "0.50658554", "0.5036884", "0.5031919", "0.50302976", "0.50272363", "0.5025557", "0.5015589", "0.5002301", "0.50002784", "0.5000093", "0.49811932", "0.49729997", "0.49710214", "0.49578655", "0.4933713", "0.49280885", "0.48931786", "0.48839688", "0.48827448", "0.4867146", "0.48618343", "0.48608595", "0.48589462", "0.4850753", "0.4846268", "0.48234135", "0.48176044", "0.48113647", "0.48102123", "0.4809634", "0.48042652", "0.48033458", "0.48001587", "0.47934824", "0.4793175", "0.47888827", "0.47865358", "0.47753924", "0.47729307", "0.4766063", "0.4764166", "0.47640592", "0.4763667", "0.47590113", "0.4746515", "0.4743484", "0.47401094", "0.47401094", "0.47383243", "0.4732411", "0.47295946", "0.47261053", "0.47236016", "0.47173467", "0.47159854", "0.471517", "0.47057915", "0.47026318", "0.4702021", "0.46955258", "0.46923742", "0.46875244", "0.46766004", "0.46743894", "0.46729764", "0.46720642", "0.46603677", "0.46597877", "0.46589443", "0.46583268", "0.46583268", "0.46583268", "0.46572116", "0.46507883", "0.46502477", "0.46440783", "0.46400225" ]
0.74505097
0
protected function _pull Pulls all settings data from the database
protected function _pull Извлекает все данные настроек из базы данных
protected function _pull( ) { $query = " SELECT * FROM `".self::SETTINGS_TABLE."` ORDER BY `sort` "; $results = $this->_mysql->fetch_array($query); if ( ! $results) { die('Settings were not pulled properly'); } foreach ((array) $results as $result) { $this->_settings[$result['setting']] = $result['value']; $this->_notes[$result['setting']] = $result['notes']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _pull( )\n\t{\n\t\tcall(__METHOD__);\n\n\t\tif ( ! $this->id) {\n\t\t\treturn;\n\t\t}\n\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM \".self::SETUP_TABLE.\"\n\t\t\tWHERE setup_id = '{$this->id}'\n\t\t\";\n\t\t$setup = Mysql::get_instance( )->fetch_assoc($query);\n\n\t\t$this->board = expandFEN($setup['board']);\n\t\t$this->creator = $setup['created_by'];\n\t\t$this->name = $setup['name'];\n\t}", "protected static function getSettings()\n {\n self::$got = true;\n\n $data = DB::table(config('user-settings.database.table'))\n ->select(config('user-settings.database.column'))\n ->where(config('user-settings.database.primary_key'), '=', Auth::id())\n ->get();\n\n $settings = json_decode($data[0]->settings);\n\n if(json_last_error() !== JSON_ERROR_NONE){\n self::$settings = (object) config('user-settings.settings');\n return;\n }\n\n self::$settings = $settings;\n }", "private function loadSettings()\n {\n $this->settings = new Settings($this->db);\n return $this->settings->loadSettings();\n }", "private function fetchSettings()\n {\n $model = $this->getModelClassName();\n\n if ($this->app['config']->get('laravel-settings.use_cache')) {\n $expireSeconds = $this->app['config']->get('laravel-settings.cache_expire');\n\n $this->settings = Cache::remember(\n 'settings',\n Carbon::now()->addSeconds($expireSeconds),\n function () use ($model) {\n return $model::get();\n }\n );\n } else {\n $this->settings = $model::get();\n }\n }", "public function getSettings() {\n if ($blogSettings = Cache::read($this->_cacheKey)) {\n return $blogSettings;\n }\n $blogSettings = $this->find('list', array(\n 'fields' => array('setting', 'value')\n ));\n Cache::write($this->_cacheKey, $blogSettings);\n return $blogSettings;\n }", "public function getsettingsData()\r\n\t{\r\n\t\t$results = $this->query(\"SELECT * FROM settings\");\t\t\t\r\n\t\tif(!defined('SITEURL')){define(\"SITEURL\",stripslashes($results[0]['site_url']));}\r\n\t\tif(!defined('ADMINMAIL')){define(\"ADMINMAIL\",stripslashes($results[0]['admin_email']));}\r\n\t\tif(!defined('RECORDPERPAGE')){define(\"RECORDPERPAGE\",stripslashes($results[0]['results']));}\r\n\t}", "private function getSettings()\n {\n try {\n $this->settings = Yii::$app->db\n ->createCommand(new Expression('SELECT * FROM `settings` WHERE `id` = 1'))\n ->queryOne();\n } catch (Throwable) {\n throw new Exception(Yii::t('app', 'Can\\'t get settings from database!'), 500);\n }\n }", "protected function loadSettings() {}", "public function loadSettings() {\n return $this->contrDao->loadSettings();\n }", "public function get_settingsdata()\n {//function for getting settings data starts\n $query = \"SELECT * FROM \" . $this->_videosettingstable .\" WHERE settings_id = 1\";\n return $this->_wpdb->get_row($query);\n }", "public function get_settings()\n {\n }", "public function get_settings()\n {\n }", "public function fetchConfigData();", "public function loadAll()\n {\n foreach ($this->all() AS $setting) {\n $this->settings[$setting->key] = $setting->value;\n }\n }", "private function getSetting() {\n\t\t$sql = '\n SELECT\n *\n\t\tFROM\n `' . DB_PREFIX . 'setting`\n\t\tWHERE\n `group` = \\'' . $this->db->escape( $this->_name ) . '\\'';\n\n $result = $this->db->query( $sql );\n\n\t\tforeach( $result->rows as $res ) {\n if( $this->isSerialized( $res['value'] ) ) {\n $data[$res['key']] = unserialize( $res['value'] );\n }else{\n $data[$res['key']] = $res['value'];\n }\n\t\t}\n\t}", "public function getSettings()\r\n {\r\n //query\r\n $result = $this->find('first', array('conditions' => array('Setting.id' => '1'), 'fields' => array('Setting.time_zone', 'Setting.title', 'Setting.title_text', 'Setting.title_logo', 'Setting.currency_symbol', 'Setting.date_format', 'Setting.time_format', 'Setting.pipeline', 'Setting.language')));\r\n return $result;\r\n }", "public static function getSettings() {\t\t\n\t\t$model = new SettingsModel('Settings',new Database());\n\t\t$settings = $model->fetchList(array('setting','value'));\n\t\treturn $settings;\n\t}", "public function db_load(){\r\n\t\t// get cached site config/info\r\n\t\t$site_config = $this->reg->db->Execute('SELECT \tconfig_name, config_value\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM config');\r\n\r\n\t\t// set site config\r\n\t\twhile($row = $site_config->fetchRow()){\r\n // prevent setting a blank value if the config option already exists // prevents overwriting defaults\r\n if(!$this->is_set($row['config_name']) || $row['config_value'] != '')\r\n\t\t\t $this->set($row['config_name'], $row['config_value']);\r\n\t\t}\r\n\t}", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function getSettings();", "public function actionReadSettings() {\n\t\t\n\t}", "function get_all_settings(){\n $ci =& get_instance();\n $ci->load->database();\n\n $sql = \"SELECT * FROM sys_settings\";\n\n $q = $ci->db->query($sql);\n\n return $q->result();\n}", "public function getAll()\n {\n return $this->_settings;\n }", "public static function loadDBSettings() {\n $site = $_SERVER[\"SERVER_NAME\"] == \"\" ? $_SERVER[\"argv\"][1] : $_SERVER[\"SERVER_NAME\"];\n\n $databaseSettings = Registry::get(\"DATABASE_SETTING\");\n\n if (is_array($databaseSettings)) {\n foreach ($databaseSettings as $table) {\n try {\n Registry::loadFromDB($table); \n }\n catch(Exception $ex) { }\n }\n }\n \n }", "public static function get_settings()\n {\n }", "public function pullAllSettings(AuthorizationHandler $auth): array\n {\n if ($auth->isSuperAdmin() || $auth->hasPermission('Edit Site Config')) {\n try {\n $sql = \"SELECT setting, value, description, type, category FROM \".$this->tbl_app_config.\" where type != 'hidden' order by -sortorder desc\";\n\n $stmt = $this->conn->prepare($sql);\n $stmt->execute();\n\n $result['settings'] = $stmt->fetchAll(\\PDO::FETCH_NUM);\n $result['status'] = true;\n } catch (\\PDOException $e) {\n http_response_code(500);\n $result['status'] = false;\n $result['message'] = \"Error: \" . $e->getMessage();\n }\n } else {\n http_response_code(401);\n $result['status'] = false;\n $result['message'] = \"You must be a superadmin to access all settings\";\n }\n\n return $result;\n }", "public function GetAllSettings()\r\n\t\t{\r\n\t\t\t$settings = $this->DB->GetAll(\"SELECT * FROM farm_settings WHERE farmid=?\", array($this->ID));\r\n\t\t\t\r\n\t\t\t$retval = array();\r\n\t\t\tforeach ($settings as $setting)\r\n\t\t\t\t$retval[$setting['name']] = $setting['value']; \r\n\t\t\t\r\n\t\t\t$this->SettingsCache = array_merge($this->SettingsCache, $retval);\r\n\t\t\t\t\r\n\t\t\treturn $retval;\r\n\t\t}", "public function get_all()\n\t{\n\t\tif (self::$cache)\n\t\t{\n\t\t\treturn self::$cache;\n\t\t}\n\n\t\t// FIXME: Put this back after 1.2.2 is released\n\t\t// $settings = ci()->settings_m->get_all();\n\t\t\n\t\t$settings = ci()->db\n\t\t\t->select('*, IF(`value` = \"\", `default`, `value`) as `value`', FALSE)\n\t\t\t->get('settings')\n\t\t\t->result();\n\n\t\tforeach ($settings as $setting)\n\t\t{\n\t\t\tself::$cache[$setting->slug] = $setting->value;\n\t\t}\n\n\t\treturn self::$cache;\n\t}", "public function get_settings()\n {\n }", "private function _fetchConfigurations() {\r\n $this->_appConfiguration->fetch();\r\n\r\n // Fetch the required routes settings\r\n $this->_routesConfiguration->fetch();\r\n $this->_router = Router::getInstanceForApp($this);\r\n\r\n // Fetch the optional loggers\r\n $this->_loggersConfiguration->fetch();\r\n\r\n // Fetch the optional database profiles\r\n $this->_dbConfiguration->fetch();\r\n }", "function getSettings(){\n\n\t\t$therecord = array();\n\n\t\t$querystatement = \"\n\t\t\tSELECT\n\t\t\t`name`,\n\t\t\t`value`\n\t\t\tFROM\n\t\t\t`settings`\";\n\n\t\t$queryresult = $this->db->query($querystatement);\n\n\t\twhile($setting = $this->db->fetchArray($queryresult))\n\t\t\t$therecord[$setting[\"name\"]] = $setting[\"value\"];\n\n\t\treturn $therecord;\n\n }", "static public function read_all( )\n\t{\n\t\tif (self::get_instance( )) {\n\t\t\treturn self::get_instance( )->get_settings( );\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "static public function populateSettings()\n {\n $cache = self::buildCache('settings_array');\n \n $settings = unserialize($cache->get('settings_array'));\n foreach ($settings as $key => $setting)\n {\n sfConfig::set($key, $setting);\n }\n }", "protected function _load_settings() {\r\n $this->load->library('cache');\r\n $data = $this->cache->get('settings');\r\n\r\n if (empty($data)) {\r\n $this->db->select('login_enabled, register_enabled, members_per_page, admin_email, home_page, previous_url_after_login\t, active_theme,\r\n adminpanel_theme, login_attempts, max_login_attempts, email_protocol, sendmail_path, smtp_host, smtp_port, smtp_user, smtp_pass, site_title, cookie_expires,\r\n password_link_expires, activation_link_expires, disable_all, site_disabled_text, remember_me_enabled, recaptchav2_enabled, recaptchav2_site_key,\r\n recaptchav2_secret, oauth2_enabled');\r\n $this->db->from(DB_PREFIX .'settings');\r\n $this->db->limit(1);\r\n $query = $this->db->get();\r\n\r\n if($query->num_rows() == 1) {\r\n $row = $query->row();\r\n self::$db_config['login_enabled'] = $row->login_enabled;\r\n self::$db_config['registration_enabled'] = $row->register_enabled;\r\n self::$db_config['members_per_page'] = $row->members_per_page;\r\n self::$db_config['admin_email_address'] = $row->admin_email;\r\n self::$db_config['home_page'] = $row->home_page;\r\n self::$db_config['previous_url_after_login'] = $row->previous_url_after_login;\r\n self::$db_config['active_theme'] = $row->active_theme;\r\n self::$db_config['adminpanel_theme'] = $row->adminpanel_theme;\r\n self::$db_config['login_attempts'] = $row->login_attempts;\r\n self::$db_config['max_login_attempts'] = $row->max_login_attempts;\r\n self::$db_config['email_protocol'] = $row->email_protocol;\r\n self::$db_config['sendmail_path'] = $row->sendmail_path;\r\n self::$db_config['smtp_host'] = $row->smtp_host;\r\n self::$db_config['smtp_port'] = $row->smtp_port;\r\n self::$db_config['smtp_user'] = $row->smtp_user;\r\n self::$db_config['smtp_pass'] = $row->smtp_pass;\r\n self::$db_config['site_title'] = $row->site_title;\r\n self::$db_config['cookie_expires'] = $row->cookie_expires;\r\n self::$db_config['password_link_expires'] = $row->password_link_expires;\r\n self::$db_config['activation_link_expires'] = $row->activation_link_expires;\r\n self::$db_config['disable_all'] = $row->disable_all;\r\n self::$db_config['site_disabled_text'] = $row->site_disabled_text;\r\n self::$db_config['remember_me_enabled'] = $row->remember_me_enabled;\r\n self::$db_config['recaptchav2_enabled'] = $row->recaptchav2_enabled;\r\n self::$db_config['recaptchav2_site_key'] = $row->recaptchav2_site_key;\r\n self::$db_config['recaptchav2_secret'] = $row->recaptchav2_secret;\r\n self::$db_config['oauth2_enabled'] = $row->oauth2_enabled;\r\n\r\n $this->cache->write(self::$db_config, 'settings');\r\n }\r\n }else{\r\n self::$db_config['login_enabled'] = $data['login_enabled'];\r\n self::$db_config['registration_enabled'] = $data['registration_enabled'];\r\n self::$db_config['members_per_page'] = $data['members_per_page'];\r\n self::$db_config['admin_email_address'] = $data['admin_email_address'];\r\n self::$db_config['home_page'] = $data['home_page'];\r\n self::$db_config['previous_url_after_login'] = $data['previous_url_after_login'];\r\n self::$db_config['active_theme'] = $data['active_theme'];\r\n self::$db_config['adminpanel_theme'] = $data['adminpanel_theme'];\r\n self::$db_config['login_attempts'] = $data['login_attempts'];\r\n self::$db_config['max_login_attempts'] = $data['max_login_attempts'];\r\n self::$db_config['email_protocol'] = $data['email_protocol'];\r\n self::$db_config['sendmail_path'] = $data['sendmail_path'];\r\n self::$db_config['smtp_host'] = $data['smtp_host'];\r\n self::$db_config['smtp_port'] = $data['smtp_port'];\r\n self::$db_config['smtp_user'] = $data['smtp_user'];\r\n self::$db_config['smtp_pass'] = $data['smtp_pass'];\r\n self::$db_config['site_title'] = $data['site_title'];\r\n self::$db_config['cookie_expires'] = $data['cookie_expires'];\r\n self::$db_config['password_link_expires'] = $data['password_link_expires'];\r\n self::$db_config['activation_link_expires'] = $data['activation_link_expires'];\r\n self::$db_config['disable_all'] = $data['disable_all'];\r\n self::$db_config['site_disabled_text'] = $data['site_disabled_text'];\r\n self::$db_config['remember_me_enabled'] = $data['remember_me_enabled'];\r\n self::$db_config['recaptchav2_enabled'] = $data['recaptchav2_enabled'];\r\n self::$db_config['recaptchav2_site_key'] = $data['recaptchav2_site_key'];\r\n self::$db_config['recaptchav2_secret'] = $data['recaptchav2_secret'];\r\n self::$db_config['oauth2_enabled'] = $data['oauth2_enabled'];\r\n }\r\n }", "public static function allSettings(){\n $value = DB::table('settings')\n ->where('sid', 1)\n ->first();\n\treturn $value;\n }", "function get_settings ()\n{\n global $db;\n\n $s = $db->prepare(\"SELECT * FROM `tbl_settings`\");\n if (!$s->execute()) {\n return false;\n }\n $rows = $s->fetchAll();\n\n $data = [];\n foreach ($rows as $row) {\n $data[$row['setting_name']] = $row['setting_value'];\n }\n return $data;\n}", "public function getSettings(){\n return $this->find('all')->where(['enabled' => true])->first();\n }", "public function getSettings($userId = NULL){\n // check for new settings first and update them.\n $this->setDefaultSettings();\n // Set query\n $this->db->query('SELECT name, value FROM settings WHERE userId = :userId');\n // Bind the value.\n if($userId) {\n $this->db->bind(':userId', $userId);\n } else {\n $this->db->bind(':userId', $_SESSION['userId']);\n }\n // Store the result in a variable.\n $settings = $this->db->fetchAll();\n // Check the variable.\n\n if($settings){\n // Get the descriptions of the settings.\n $i = 0;\n foreach ($settings as $setting){\n $setting->description = $this->getSettingDescription($setting->name)->description;\n $i++;\n }\n // Return the settings.\n return $settings;\n }\n }", "public function getSettingsAction() {\n $sql = \"\n SELECT A.id AS shopId,\n A.shop_name,\n A.type,\n IFNULL(B.name, A.name) AS name,\n IFNULL(B.value, A.value) AS value,\n IF(B.shop IS NULL, false, true) as updated_value\n FROM (SELECT scs.id,\n scs.name as shop_name,\n cs.type,\n cs.name,\n cs.value\n FROM s_core_shops scs\n CROSS JOIN `swp_cleverreach_settings` cs\n WHERE cs.shop = -1) AS A\n LEFT JOIN swp_cleverreach_settings AS B\n ON A.id = B.shop AND A.name = B.name AND A.type = B.type\n ORDER BY A.id, A.type DESC, A.name\n \";\n $rows = Shopware()->Db()->fetchAll($sql);\n\n $settings = array();\n $tmp = array();\n foreach($rows as $row) {\n if(!empty($tmp)) {\n if($tmp['shopId'] != $row['shopId']) {\n $settings[] = $tmp;\n $tmp = array();\n }\n }\n $tmp['shopId'] = $row['shopId'];\n $tmp['shop_name'] = $row['shop_name'];\n if($row['type'] == \"install\") {\n $tmp['updated_value'] = $row['updated_value'];\n }\n $tmp[$row[\"name\"]] = $row[\"value\"];\n }\n if(!empty($tmp)) {\n $settings[] = $tmp;\n }\n\n $this->View()->assign(array('data'=>$settings, 'success'=>true));\n }", "function model_admin_get_all_settings(){\n\t$result = db_query(\"SELECT * FROM `settings` ORDER BY `category` desc\");\n\treturn db_toarray($result);\n}", "function get_ssba_settings()\n {\n // get json array settings from DB\n $jsonSettings = get_option('ssba_settings');\n\n // decode and return settings\n return json_decode($jsonSettings, true);\n }", "public function getSettings($all = false){\n\n $arrSettings = array();\n $sql = \"SELECT * FROM \".$this->tableName();\n if(!$all)\n {\n $sql .= \" WHERE `editable`=1\";\n }\n\n $con = $this->dbConnection;\n $data=$con->createCommand($sql)->queryAll();\n\n foreach($data as $row){\n $arrSettings[$row['value_name']] = $row['setting'];\n }\n\n return $arrSettings;\n }", "private function getSettings() {\n\t\treturn $this->settings;\n\t}", "protected function loadSettings() : void {\n self::$config = Registry::retrieve('config');\n }", "function get_settings($setting_inf) { // Pimped\r\n\t$settings_arr = array();\r\n\t$set_result = dbquery(\"SELECT settings_name, settings_value FROM \".DB_SETTINGS_INF.\" WHERE settings_inf=\"._db($setting_inf).\"\");\r\n\tif (dbrows($set_result)) {\r\n\t\twhile ($set_data = dbarray($set_result)) {\r\n\t\t\t$settings_arr[$set_data['settings_name']] = $set_data['settings_value'];\r\n\t\t}\r\n\t\treturn $settings_arr;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}", "public function loadSettings() {\n $this->instances = $this->getSubSettings('instance');\n }", "private function readSettings()\n\t{\n\t\t$homeFile = \"$_SERVER[HOME]/settings.m23test\";\n\t\t\n\t\tif (file_exists($homeFile))\n\t\t\t$confFile = $homeFile;\n\t\telse\n\t\t\t$confFile = 'settings.m23test';\n\t\n\t\t$xmlO = $this->loadXMLFile($confFile);\n\t\t$this->internalValuesFromXML($xmlO);\n\t}", "private function getSettings() {\n\t\tif (!empty($this->settings)) {\n\t\t\treturn $this->settings;\n\t\t}\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `\" . (version_compare(VERSION, '2.0.1', '<') ? 'group' : 'code') . \"` = '\" . $this->db->escape($this->name) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($this->name . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\t$this->settings = $settings;\n\t\treturn $settings;\n\t}", "function get_all_user_settings()\n{\n}", "public static function settings() {\n\t\treturn self::get_instance()->settings->get_all();\n\t}", "public function get_settings()\n\t{\n\t\t$this->db->select('*');\n\t\t$query = $this->db->get('ems_settings');\n\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $query->result();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t}", "function settings()\n {\n $config = glob('*.json');\n if (isset($config[0]) && file_exists($config[0])) {\n $this->settings_file = $config[0];\n $this->settings = json_decode(file_get_contents($this->settings_file), true);\n }\n }", "function get_all_setting($sortby = 'id',$orderby = 'ASC')\n \t{\n\t\t//Ordering Data\n\t\t$this->db->order_by($sortby,$orderby);\n\t\t\n\t\t//Executing Query\n\t\t$query = $this->db->get('settings');\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $query->result_array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n \t}", "function get_settings($setting_name) {\n\t\t$CI = & get_instance();\n $CI->load->database();\n $settings = $CI->db->query(\"SELECT * FROM settings\");\n $data = [];\n if($settings->num_rows() != 0){\n foreach($settings->result() as $setting){\n $data = (array) json_decode($setting->data);\n }\n }\n\n if(!isset($data[$setting_name])){\n return '';\n }\n\n return $data[$setting_name];\n\t}", "public function get_all()\n {\n $items = $this->setting->get_all();\n $f_items = array();\n\n // restructure data\n foreach ($items as $item) {\n $f_items[$item->name] = $item->value;\n }\n\n $response = $f_items;\n\n http_response_code(200);\n $this->output->set_output(json_encode($response));\n }", "public function getAllSettings() {\n return $this->settings;\n }", "public function load()\n {\n $data = [];\n\n $setting = app()->settings();\n\n foreach ($this->getKeyList() as $group => $actions) {\n foreach ($actions as $name => $defaultValue) {\n $key = sprintf('%s__%s', $group, $name);\n $data[ $key ] = $setting->get($group, $name, $defaultValue);\n }\n }\n\n $this->setData($data);\n }", "public function GetAllSettings()\r\n\t\t{\r\n\t\t\t$settings = $this->DB->GetAll(\"SELECT * FROM farm_role_settings WHERE farm_roleid=?\", array($this->ID));\r\n\t\t\t$retval = array();\r\n\t\t\tforeach ($settings as $setting)\r\n\t\t\t\t$retval[$setting['name']] = $setting['value']; \r\n\t\t\t\r\n\t\t\t$this->SettingsCache = array_merge($this->SettingsCache, $retval);\r\n\t\t\t\t\r\n\t\t\treturn $retval;\r\n\t\t}", "public function all ()\n\t{\n\n\t\treturn $this->settings;\n\n\t}", "public function loadSettings();", "public static function cron_pull()\n\t{\n\t\tif ( ! defined( 'DOING_CRON' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tDebug2::debug( '[Img_Optm] cron_pull running' );\n\n\t\t$tag = self::get_option( self::DB_NEED_PULL );\n\n\t\tif ( ! $tag || $tag != self::STATUS_NOTIFIED ) {\n\t\t\tDebug2::debug( '[Img_Optm] ❌ no need pull [tag] ' . $tag );\n\t\t\treturn;\n\t\t}\n\n\t\tself::get_instance()->pull();\n\t}", "public function get()\n {\n $sql = 'SELECT * FROM settings';\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\n $stmt->execute();\n\n return $stmt->fetch();\n }", "function Loadsettings($conn){\n\t$getsettings=getAllRecord($conn,'screening_settings','id=1','','');\n\t$settingsarr=mysqli_fetch_array($getsettings);\n\treturn \t$settingsarr;\n\t//return array($styleclass,$header,$searchcriteria,$backgroundimg);\t\n}", "public function show_settings(){\n\t\t\n\t\t//Connection establishment, processing of data and response from REST API\n\t\t$path=base_url();\n\t\t$url = $path.'api/settings_api/all_settings';\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response=json_decode($response_json, true);\n\t\treturn $response;\t\t\n\t\t\n\t}", "public static function getAllSettings() {\n\t\treturn self::$collection;\n\t}", "function legacy_get_settings() {\n\n\tglobal $db;\n\n\t$settings = $db->query_return_array_id('SELECT name, value FROM settings', 'value', 'name');\n\n\treturn $settings;\n\n}", "private function getSettings() {\n\t\t//$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : 'payment_') . 'stripe';\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "function getconfig() {\n global $db;\n global $config;\n\n $sql = \"select * from config\";\n $settings = $db->query( $sql,false,true,'name' );\n foreach ($settings as $setting) {\n $name = $setting->name;\n $config->$name = $setting->value;\n }\n }", "public function getList()\n { \n $userId = $this->identity()->id;\n $settings = $this->getSettingsDao()->fetchOneBy('user_id',$userId);\n \n return $this->success($settings);\n \n }", "private function _getConfigs()\n {\n $key = KEY_COMMON_CACHE;\n\n if (($settingInfo = Cache::read($key)) === false) {\n $settingTbl = TableRegistry::getTableLocator()->get('Settings');\n $conditions = [\n 'OR' => [\n [\n 'name IN' => [\n 'site_name',\n ],\n ],\n ['name LIKE' => 'site_mail_%'],\n ['name LIKE' => 'me_%'],\n ['name LIKE' => 'meta_%'],\n ],\n ['status' => ENABLED],\n ];\n\n /* @var \\App\\Model\\Table\\SettingsTable $settingTbl */\n $settingInfo = $settingTbl->getListSetting([], $conditions);\n Cache::write($key, $settingInfo);\n }\n\n return $settingInfo;\n }", "function _get_settings($p_userID, $refresh=null) {\n\tstatic $settings; // In memory static storage, if any.\n\n\tif ($refresh) {\n\t\t$settings = null; // Nullify to pull from the database again.\n\t}\n\n\tif (!$settings && $p_userID) {\n\t\t// If the static var isn't present yet, so get it\n\t\tDatabaseConnection::getInstance();\n\t\t$statement = DatabaseConnection::$pdo->prepare(\"SELECT settings_store FROM settings WHERE player_id = :player\");\n\t\t$statement->bindValue(':player', $p_userID);\n\t\t$statement->execute();\n\n\t\t$serial_settings = $statement->fetchColumn();\n\n\t\tif ($serial_settings) {\n\t\t\t$settings = unserialize($serial_settings);\n\t\t}\n\n\t\tif (!$settings) {\n\t\t\t$settings = null;\n\t\t}\n\t}\n\n\treturn $settings;\n}", "function db_get_settings()\n{\n\tglobal $soa_use_active, $rr_use_active;\n\tglobal $soa_use_xfer;\n\tglobal $soa_table_name, $rr_table_name;\n\tglobal $soa_active_types, $rr_active_types;\n\tglobal $db_valid_types;\n\n\t$db_valid_types = db_get_known_types();\n\n $soa_use_active = db_column_exists($soa_table_name, \"active\");\n $soa_use_xfer = db_column_exists($soa_table_name, \"xfer\");\n $rr_use_active = db_column_exists($rr_table_name, \"active\");\n\n\t/* Get possible column values for 'active' column */\n\tif ($soa_use_active)\n\t\t$soa_active_types = db_get_active_types($soa_table_name);\n\tif ($rr_use_active)\n\t\t$rr_active_types = db_get_active_types($rr_table_name);\n}", "function getAll_settings()\n\t{\n\t\t$query=\"SELECT * FROM customize_settings\";\n\t\t$result = $this->db->query($query);\n\t\t//return $result['num'];\n\t\t\n\t\tif($result->num_rows() <= 0)\n\t\t{ \n\t\t\t$response=array(\n\t\t\t\t'status'\t=>\t0,\n\t\t\t\t'status_message' =>'No any Setting found !!!'\n\t\t\t);\n\t\t\treturn $response;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response=$result->result_array();\n\t\t\treturn $response;\n\t\t}\n\t}", "public static function get_setting_items()\n {\n }", "function _wordbb_get_mybb_settings()\r\n{\r\n\tglobal $wpdb, $wordbb;\r\n\r\n\t$results=$wordbb->mybbdb->get_results(\"SELECT name,value FROM {$wordbb->table_settings}\");\r\n\r\n\t$settings=array();\r\n\tforeach($results as $result)\r\n\t{\r\n\t\t$settings[$result->name]=$result->value;\r\n\t}\r\n\r\n\treturn $settings;\r\n}", "public function retrieve_setting_editdata()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('web_setting');\n\t\t$this->db->where('setting_id',1);\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "public function retrieve_setting_editdata()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('web_setting');\n\t\t$this->db->where('setting_id',1);\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "public function setting_data() {\n\t\tPresentation::presentation_type('application/json');\n\n\t\t// get setting data\n\t\t$setting_data = BlogModel::get_setting_data();\n\n\t\t// output setting data in json format\n\t\tPresentation::present_data($setting_data, 'application/json');\n\n\t}", "public function pull(){\n\t\t$query = $this->dbh->prepare(\"SELECT * FROM {$this->group} ORDER BY id DESC\");\n\t\t$query->execute();\n\n\t\treturn $query->fetchAll();\n\t}", "function configurations() {\n $sql = \"SELECT language_labels,applicationName,applicationDesc,forgot,newsfeedPerPage,friendsPerPage,photosPerPage,groupsPerPage,notificationPerPage, uploadImage,bannerWidth, profileWidth,gravatar,friendsWidgetPerPage,upload FROM configurations WHERE con_id='1' \";\n try {\n $db = getDB();\n $stmt = $db->query($sql);\n $configuration = $stmt->fetchAll(PDO::FETCH_OBJ);\n $db = null;\n return $configuration;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n}", "public function get_settings_info() {\n\t\t$result = $this->db->get_where($this->_settings);\n\t\treturn $result->row_array();\n\t}", "function getCommandSettings()\n{\n\t//db connection\n\t$conn = getDBConnection();\n\t\t\n\t//get all settings for each streamer apart from fromExt.Extension and aggregate rows which are identical (DISTINCT)\n\t$stmt = $conn->prepare(\"\n\t\tSELECT \n\t\t\tidcommand,\n\t\t\tcommand,\n\t\t\tdisplayName\n\t\tFROM Command\n\t\");\n\t$stmt->execute();\t\n\t\n\t$settings = new SettingGroup();\n\t$settings->setSchema(getSchema(\"retrieveCommandSettings\"));\n\t$settingsData = array();\n\t\n\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\tforeach($rows as $ft)\n\t{\t\t\n\t\t$settingsData[] = array(\t\t\n\t\t\t\"commandID\" => $ft[\"idcommand\"],\n\t\t\t\"command\" => $ft[\"command\"],\n\t\t\t\"displayName\" => $ft[\"displayName\"],\n\t\t);\n\t\t\n\t}\t\t\n\tcloseDBConnection($conn);\n\t\n\t$settings->setData($settingsData);\n\t\n\treturn $settings->getSettingsObject();\n}", "function pullAll() { return $this->op('$pullAll', func_get_args()); }", "function get_settings($refresh=null) {\n\treturn _get_settings(self_char_id(), $refresh);\n}", "public function get_all () {\n\t\t$settings = array();\n\t\t$fields = $this->get_fields();\n\n\t\tif ( 0 < count( $fields ) ) {\n\t\t\tforeach ( $fields as $k => $v ) {\n\t\t\t\tif ( 'multi_field' == $v['type'] && isset( $v['multi_fields'] ) && is_array( $v['multi_fields'] ) ) {\n\t\t\t\t\tif ( 0 < count( $v['multi_fields'] ) ) {\n\t\t\t\t\t\tforeach ( $v['multi_fields'] as $i => $j ) {\n\t\t\t\t\t\t\t$settings[$i] = $this->_process_single_field( $i, $j );\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$settings[$k] = $this->_process_single_field( $k, $v );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $settings;\n\t}", "public function loadAllConfigs()\n {\n $this->loadEnvironment();\n $this->loadDefaults();\n $this->loadSiteConfig();\n $this->loadAddonConfig();\n\n $this->config->hydrate(datastore()->getScope('settings'));\n\n // @todo Instead of adding everything to datastore up front, just add it to\n // the config class. Right now this was simpler than reinventing all the\n // merge/environment handling that the datastore class uses.\n datastore()->removeScope('settings');\n datastore()->createScope('settings', $this->config);\n\n $this->mergeIntoLaravel();\n }", "public function getSettings()\n {\n return $this->get(self::API_BASE_URL . '/ss3/subscriptions/' . $this->subscription->sid . '/settings/normal?forceUpdate=true');\n }", "public static function getAllSettings()\n {\n return Cache::rememberForever('settings.all', function () {\n return self::all();\n });\n }", "public function getSettings()\n {\n if ($this->configFileHandler->getSettingsFromFile('./config/settings.php')) {\n require './config/settings.php';\n\n return $settings;\n }\n }", "public function get_settings() {\n\t\tif ( 0 === count( $this->settings ) ) {\n\t\t\t$this->init_settings();\n\t\t}\n\t\treturn $this->settings;\n\t}", "public function populate(){\n $this->libraryRepository->populateDB();\n }", "function timelord_settings() {\n\t$sql = \"SELECT * FROM `timelord_settings` WHERE `key` = '1'\";\n\t$results = sql($sql,\"getAll\",DB_FETCHMODE_ASSOC);\n\treturn is_array($results)?$results:array();\n}", "public function Reload()\n {\n try {\n $this->Clear();\n $AppSettings = Application::$DBContext->GetDbSet('\\InfEra\\WAFP\\System\\Settings\\Setting')->Select();\n foreach ($AppSettings as $setting) {\n $this->Add($setting->Key, $setting->Value);\n }\n } catch (DbSetException $e) {\n }\n }" ]
[ "0.69537425", "0.65979844", "0.6384289", "0.63575834", "0.6347856", "0.63179475", "0.62937665", "0.6244098", "0.61846805", "0.6115954", "0.61101824", "0.61085105", "0.60998756", "0.60449857", "0.6034018", "0.600415", "0.59823", "0.5982081", "0.597073", "0.597073", "0.597073", "0.597073", "0.597073", "0.597073", "0.597073", "0.597073", "0.597073", "0.5964345", "0.5956568", "0.59347045", "0.5928228", "0.5900766", "0.5893153", "0.5874699", "0.5861216", "0.5853489", "0.58530855", "0.5851177", "0.58465177", "0.5845142", "0.5833504", "0.57895356", "0.57871217", "0.57680434", "0.57673305", "0.57575005", "0.5756594", "0.57369626", "0.57364345", "0.57178307", "0.57091194", "0.5697871", "0.56971717", "0.56875265", "0.56820756", "0.566871", "0.56666243", "0.5651607", "0.5649703", "0.5646762", "0.5645348", "0.5636998", "0.56199896", "0.56190896", "0.56188905", "0.5614578", "0.5611424", "0.5605285", "0.55958664", "0.55840117", "0.55765903", "0.5574071", "0.5571285", "0.55707335", "0.55698895", "0.5568083", "0.5565296", "0.5524234", "0.5523542", "0.55099696", "0.5509959", "0.55094725", "0.5496915", "0.5496915", "0.5493203", "0.5492881", "0.54918736", "0.5488162", "0.54879624", "0.5487838", "0.5486168", "0.5484538", "0.5478424", "0.54772526", "0.54722404", "0.5468869", "0.54634", "0.5458824", "0.54562587", "0.5453947" ]
0.83147585
0
public function save Saves all settings data to the database if the settings are different
public function save Сохраняет все данные настроек в базу данных, если настройки отличаются
public function save( ) { call(__METHOD__); $query = " SELECT * FROM `".self::SETTINGS_TABLE."` ORDER BY `sort` "; $results = $this->_mysql->fetch_array($query); $data = []; $settings = $this->_settings; foreach ($results as $result) { if (isset($settings[$result['setting']])) { if ($result['value'] != $settings[$result['setting']]) { $result['value'] = $settings[$result['setting']]; $data[] = $result; } unset($settings[$result['setting']]); } elseif ($this->_delete_missing) { $this->_mysql->delete(self::SETTINGS_TABLE, " WHERE setting = {$result['setting']} "); } } if ($this->_save_new) { foreach ($settings as $setting => $value) { $addition['setting'] = $setting; $addition['value'] = $value; $data[] = $addition; } } $this->_mysql->multi_insert(self::SETTINGS_TABLE, $data, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSettings()\n {\n static $booleans = array('site' => array('private', 'inviteonly', 'closed'));\n\n foreach ($booleans as $section => $parts) {\n foreach ($parts as $setting) {\n $values[$section][$setting] = ($this->boolean($setting)) ? 1 : 0;\n }\n }\n\n $config = new Config();\n\n $config->query('BEGIN');\n\n foreach ($booleans as $section => $parts) {\n foreach ($parts as $setting) {\n Config::save($section, $setting, $values[$section][$setting]);\n }\n }\n\n $config->query('COMMIT');\n\n return;\n }", "function saveData()\n\t{\n\t\t$userId = self::$USER->getId();\n\t\tforeach($this->_userSettings as $settingName => $value) {\n\t\t\t$setting = $this->getConstSetting($settingName);\n\t\t\t$fields = array('user_id'=>$userId, 'setting_id'=>$setting['setting_id'], 'value' => $value);\n\t\t\tself::$DB->replace(TABLE_USER_SETTINGS, $fields);\n\t\t}\n\t}", "public function save()\n\t\t{\n\t\t\t$database\t\t= new database();\n\t\t\tif ( isset($this->_properties['keys']) && $this->_properties['keys'] !='') \n\t\t\t{\n\t\t\t\t$sql\t= \"UPDATE settings SET `values` = '\". $database->real_escape_string($this->values) .\"' WHERE `keys` = '\" . $database->real_escape_string($this->keys) . \"'\";\n\t\t\t\t$result\t\t\t= $database->query($sql);\n\t\t\t\t\n\t\t\t\tif($database->affected_rows == 1)\n\t\t\t\t{\n\t\t\t\t\tif($this->settings_id == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->settings_id\t= $database->insert_id;\n\t\t\t\t\t}\n\t\t\t\t\t$this->initialize($this->settings_id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->message = cnst11;\n\t\t\t}\n\t\t}", "public function saveSettings();", "public function saveSettings();", "public function save_settings()\n {\n }", "protected static function save()\n {\n DB::table(config('user-settings.database.table'))\n ->where(config('user-settings.database.primary_key'), '=', Auth::id())\n ->update([config('user-settings.database.column') => json_encode(self::$settings)]);\n }", "public function save() {\n\t\t$this->get_options();\n\t\t$this->update_all();\n\t}", "function save_settings() {\n if (empty($this->settings)) {\n return TRUE;\n }\n\n // As db_merge will be supported multiple values in drupal 8,\n // we need to delete all old settings before inserting new values.\n // By using db_insert multiple values method, I don't sure if it\n // increase preformance or not. (May be this help when values to\n // save is more than 100)\n // TODO: revise the method again.\n $txn = db_transaction();\n try {\n // Clear all old values.\n db_delete('sf_settings')\n ->condition('feature', $this->name)\n ->execute();\n\n // Begin insertion.\n $query = db_insert('sf_settings')->fields(array('feature', 'name', 'value'));\n foreach ($this->settings as $name => $value) {\n $query->values(array(\n 'feature' => $this->name,\n 'name' => $name,\n 'value' => $value,\n ));\n }\n $query->execute();\n return TRUE;\n }\n catch (Exception $e) {\n $txn->rollback();\n return FALSE;\n }\n }", "public function save()\n\t{\n\t\t$settings = SBSetting::model()->findAll(array('index' => 'name'));\n\t\t\n\t\tforeach($this->_data as $name => $value)\n\t\t{\n\t\t\t$settings[$name]->value = trim($value);\n\t\t\t$settings[$name]->save();\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function saveSettingsAction() {\n $shopId = $this->Request()->getParam(\"shopId\");\n $params = array(\n \"export_limit\" => $this->Request()->getParam(\"export_limit\"),\n \"newsletter_extra_info\" => $this->Request()->getParam(\"newsletter_extra_info\")\n );\n foreach($params as $name => $value) {\n $sql = \"\n INSERT INTO swp_cleverreach_settings(shop, type, name, value) VALUES(?, 'install', ?, ?)\n ON DUPLICATE KEY UPDATE value=?;\n \";\n\n Shopware()->Db()->query($sql, array($shopId, $name, $value, $value));\n }\n\n $this->View()->assign(array('success'=>true));\n }", "public function saveSettings()\n\t{\n\t\tcheck_admin_referer( 'FM_save_settings' );\n\n\t\t$this->settings->setSetting( isset( $_POST['FM_facebook'] ) ? true : false, 'SocialNetwork', 'facebook', 'enabled' );\n\t\t$this->settings->setSetting( htmlspecialchars( $_POST['FM_fb_appid'] ), 'SocialNetwork', 'facebook', 'appId' );\n\t\t$this->settings->setSetting( htmlspecialchars( $_POST['FM_fb_appsecret'] ), 'SocialNetwork', 'facebook', 'appSecret' );\n\t\t$this->settings->setSetting( isset( $_POST['FM_logger'] ) ? true : false, 'Logger', 'enabled' );\n\n\t\t$vehicleInfo = (new Vehicle(0))->getArrayInfos();\n\n\t\tforeach( $vehicleInfo as $info )\n\t\t\t$this->settings->setSetting( isset( $_POST[$info['id']] ) ? true : false, 'VehiclePostType', 'display', $info['id'] );\n\n\t\twp_redirect( admin_url( \"options-general.php?page=fleetmanager_settings_page\" ) );\n\t}", "public function save() {\n foreach ( $this->changed as $key ) {\n update_option( $this->prefix . $key, $this->data[ $key ], false );\n }\n }", "function save() {\n\t\t\t//Log::debug( \"SUH saving settings: \" . print_r( self::$cache, true ) );\n\t\t\tupdate_site_option( self::SETTINGS_KEY, self::$cache );\n\t\t}", "public function set_save_settings(){\n\t\t\n\t\t// Check if sanity function exits, otherwise do nothing\n\t\tif ( method_exists( $this , 'get_clean_settings' ) ){\n\t\t\n\t\t\t$fields = $this->get_fields();\n\t\t\t\n\t\t\t$settings = array();\n\t\t\t\n\t\t\t// Loop through each field and check for value\n\t\t\tforeach( $fields as $key => $default_value ){\n\t\t\t\t\n\t\t\t\tif ( isset( $_POST[ $key ] ) ){\n\t\t\t\t\t\n\t\t\t\t\t$settings[ $key ] = $_POST[ $key ];\n\t\t\t\t\t\n\t\t\t\t} // end if\n\t\t\t\t\n\t\t\t} // end foreach\n\t\t\t\n\t\t\t$this->settings = $this->get_clean_settings( $settings ); \n\t\t\t\n\t\t} // end if\n\t\t\n\t}", "function saveSettings(){\r\n\t\t$upd['tx_x4epublication_displayselected'] = intval($this->piVars['displayselected']);\r\n\t\t$upd['tx_x4epublication_selectedpubls'] = $GLOBALS['TYPO3_DB']->quoteStr($this->piVars['selectedPublications'],$this->personTable);\r\n\t\tunset($this->piVars['displayselected']);\r\n\t\tunset($this->piVars['selectedPublications']);\r\n\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->personTable,'uid='.intval($this->person['uid']),$upd);\r\n\t\t$this->person['tx_x4epublication_displayselected'] = $upd['tx_x4epublication_displayselected'];\r\n\t\t$this->person['tx_x4epublication_selectedpubls'] = $upd['tx_x4epublication_selectedpubls'];\r\n\t\t$this->getPi1();\r\n\t\t$this->pi1->clearCache($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_x4epersdb_pi1.']['listView.']['detailPageUid']);\r\n\t}", "function model_admin_save_all_settings($data){\n\tforeach($data as $key => $value){\n\t\tdb_query(\"UPDATE `settings` SET `value`='$value' WHERE `setting`='$key'\");\n\t}\n}", "function save_settings()\n\t{\n\t\tglobal $DB, $REGX;\n\t\t\n\t\t// Initialise the settings array.\n\t\t$this->settings = array(\n\t\t\t'update_check'\t=> isset($_POST['update_check']) ? $_POST['update_check'] : ''\n\t\t\t);\n\t\t\n\t\t// Serialise the settings, and save them to the database.\n\t\t$sql = \"UPDATE exp_extensions SET settings = '\" . addslashes(serialize($this->settings)) . \"' WHERE class = '\" . get_class($this) . \"'\";\n\t\t$DB->query($sql);\n\t}", "public function save() {\r\n $oConfig = $this->getConfig();\r\n\r\n $aConfBools = oxConfig::getParameter( \"confbools\" );\r\n $aConfStrs = oxConfig::getParameter( \"confstrs\" );\r\n\r\n if ( is_array( $aConfBools ) ) {\r\n foreach ( $aConfBools as $sVarName => $sVarVal ) {\r\n $oConfig->saveShopConfVar( \"bool\", $sVarName, $sVarVal, $sOxId );\r\n }\r\n }\r\n\r\n if ( is_array( $aConfStrs ) ) {\r\n foreach ( $aConfStrs as $sVarName => $sVarVal ) {\r\n $oConfig->saveShopConfVar( \"str\", $sVarName, $sVarVal );\r\n }\r\n }\r\n }", "function save() {\n\n\t\t\tglobal $pagenow;\n\t\t\t\n\t\t\t// GET SAVED SETTINGS FROM DATABASE\n\t\t\t$settings = get_option('crystalCatalogHelperSettings');\n\t\t\t\n\t\t\t// MAKE SURE WE'RE ON THE SETTINGS PAGE & USER HAS PRIVILEGES TO EDIT OPTIONS TO SAVE SETTINGS\n\t\t\tif ($pagenow == 'admin.php' && $_GET['page'] == 'crystal-catalog-helper-settings' && $this->privilege()) {\n\t\n\t\t\t\t$settings['store_url'] \t= $_POST['store_url'];\n\t\t\t\t$settings['catalog_product_type_id'] \t= $_POST['catalog_product_type_id'];\n\t\t\t\t//$settings['show_price'] \t= $_POST['show_price'];\n\t\t\t\t//$settings['show_buy_button'] \t= $_POST['show_buy_button'];\n\t\t\t\t//$settings['fall_back'] \t= $_POST['fall_back'];\n\n\t\t\t}\n\t\t\t\n\t\t\t// UPDATE OUR SETTINGS IN THE DATABASE\n\t\t\t$updated = update_option('crystalCatalogHelperSettings', $settings);\n\t\t\n\t\t}", "public function save_settings($settings)\n {\n }", "public function saveSettings()\n {\n $req = _obj($_REQUEST);\n\n if (isset($req->action)){\n switch($req->page)\n {\n case $this->slug . '-settings':\n /** tab section, within settings page */\n switch($req->action){\n case 'mc-wallet-settings':\n $this->_saveGeneralOptions();\n break;\n case 'mc-wallet-bank':\n case '-1':\n $this->_saveBankOptions();\n break;\n }\n break;\n case $this->slug:\n default:\n /** tab section, within main page */\n switch ($req->action):\n case 'mc-wallet-penalty':\n $this->_processPenalty();\n break;\n case 'mc-wallet-deposit':\n $this->_saveDeposit();\n break;\n case 'mc-wallet-list':\n default:\n break;\n endswitch;\n break;\n }\n }\n }", "public function saveEverything() {\n unlink($this->getDataFolder().'auctions.json'); //Avoiding duplication glitches.\n $data = new Config($this->getDataFolder() . 'auctions.json', Config::JSON);\n foreach ($this->auctions as $aucId => $aucData) {\n $data->set($aucId, $aucData);\n }\n $data->save();\n }", "public function save() {\n $this->saveConfig($this);\n }", "public function save () {\n\t\t$lines = array();\n\t\t$values = array();\n\n\t\t$values['area'] = $this->area;\n\n\t\t$i = 1;\n\n\t\tforeach ($this->changed_prefs as $key=>$contains_key) {\n\t\t\t$lines[] = \"(:key\" . $i . \", :area, :value\" . $i . \")\";\n\t\t\t$values['key' . $i] = $key;\n\t\t\t$values['value' . $i] = serialize($this->prefs[$key]);\n\n\t\t\t$i++;\n\t\t}\n\n\t\t$lines_str = implode(\",\\r\\n\", $lines);\n\n\t\tDatabase::getInstance()->execute(\"INSERT INTO `{praefix}preferences` (\n\t\t\t`key`, `area`, `value`\n\t\t) VALUES \" . $lines_str . \" ON DUPLICATE KEY UPDATE `value` = VALUES(value); \", $values);\n\t}", "function saveSettings()\n {\n $nickPatterns = $this->splitPatterns($this->trimmed('blacklist-nicknames'));\n Nickname_blacklist::saveNew($nickPatterns);\n\n $urlPatterns = $this->splitPatterns($this->trimmed('blacklist-urls'));\n Homepage_blacklist::saveNew($urlPatterns);\n\n return;\n }", "public function save() {\n\t\tupdate_option( self::SAVE_KEY, $this->toArray(), false );\n\t}", "function save()\n\t{\n\t\t$model = $this->getModel('settings');\n\t \n\t\tif ($model->store($post)) {\n\t\t\t$msg = JText::_( 'Settings Saved!' );\n\t\t} else {\n\t\t\t$msg = JText::_( 'Error Saving Settings - ' );\n\t\t\t$msg .= $model->getError();\n\n\t\t}\n\t \n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$link = 'index.php?option=com_bigbluebuttonconferencing&act=settings';\n\t\t$this->setRedirect($link, $msg);\n\t}", "protected function save_settings() {\n return update_option( 'plugin_settings_' . static::className(), $this->settings );\n }", "public function save()\n {\n $data = $this->getLoadedData($this);\n $setData = [];\n foreach ($data as $key => $value) {\n if(!is_null($value)) {\n $setData[] = \"{$key} = '$value'\";\n }\n else{\n $setData[] = \"{$key} = NULL\";\n }\n }\n if($this->editable) {\n $this->sql = \"UPDATE {$this->table} SET \".implode(', ', $setData).\" WHERE {$this->pk} = {$this->{$this->pk}}\";\n }\n else {\n $this->sql = \"INSERT INTO {$this->table} SET \".implode(', ', $setData);\n }\n\n $this->db->query($this->sql);\n\n if(!$this->editable) {\n $this->{$this->pk} = $this->db->insert_id();\n $this->editable = true;\n }\n\n $this->resetVars();\n return true;\n }", "public function save()\n {\n $properties = $this->properties;\n if (!empty($properties)) {\n // update\n if ($this->id) {\n $updateSet = [];\n foreach ($properties as $name => $value) {\n if ($name == 'id') {\n continue;\n }\n $updateSet[] = \"$name = :$name\";\n }\n $this->db->prepare('UPDATE ' . $this->table . ' SET ' . implode(', ', $updateSet) . ' WHERE id = :id');\n $this->db->bindValues($properties);\n $this->db->execute();\n } else {\n // insert\n $fields = [];\n $values = [];\n foreach ($properties as $name => $value) {\n $fields[] = $name;\n $values[] = \":$name\";\n }\n $this->db->prepare('INSERT INTO ' . $this->table . ' ('. implode(', ', $fields) . ') values ('. implode(', ', $values) . ')');\n $this->db->bindValues($properties);\n $this->db->execute();\n // store\n $this->id = $this->db->lastInsertedId();\n }\n }\n }", "function save_settings( $data ) {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name = $this->make_table_name();\n\t\t\n\t\t// if data have values - save data\n\t\t// if data = false - clear table\n\t\tif ( $data ) {\n\t\t\t$wpdb->query(\"TRUNCATE TABLE {$table_name};\");\n\n\t\t\tforeach ( $data as $d ) { \n\n\t\t\t\t// transform arrays into string with words separated by comma\n\t\t\t\t$user_id = $d['user_id'];\n\n\t\t\t\t$primary_pages = isset($d['primary_pages']) ? implode(\", \", $d['primary_pages']) : null;\n\t\t\t\t$custom_pages = isset($d['custom_pages']) ? implode( \", \", $d['custom_pages']) : null;\n\t\t\t\t$tags = isset($d['tags']) ? implode( \", \", $d['tags']) : null;\n\t\t\t\t$categories = isset($d['categories']) ? implode( \", \", $d['categories']) : null;\n\n\t\t\t\t$status = $wpdb->insert(\n\t\t\t\t\t$table_name,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'user_id' \t\t=> $user_id,\n\t\t\t\t\t\t'primary_pages' => $primary_pages,\n\t\t\t\t\t\t'custom_pages'\t=> $custom_pages,\n\t\t\t\t\t\t'tags'\t\t\t=> $tags,\n\t\t\t\t\t\t'categories'\t=> $categories\n\t\t\t\t\t),\n\t\t\t\t\tarray('%s', '%s', '%s', '%s', '%s')\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t$wpdb->query(\"TRUNCATE TABLE {$table_name};\");\n\t\t\t$status = true;\n\t\t}\n\n\t\treturn $status;\n\t}", "function saveSettings() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\timport('classes.notification.form.NotificationSettingsForm');\n\n\t\t$notificationSettingsForm = new NotificationSettingsForm();\n\t\t$notificationSettingsForm->readInputData();\n\n\t\tif ($notificationSettingsForm->validate()) {\n\t\t\t$notificationSettingsForm->execute();\n\t\t\tPKPRequest::redirect(NotificationHandler::getContextDepthArray(), 'notification', 'settings');\n\t\t} else {\n\t\t\t$notificationSettingsForm->display();\n\t\t}\n\t}", "public function saveSettings( $values )\n\t{\n\t\tif ( $values['sitemap_configuration_info'] )\n\t\t{\n\t\t\t\\IPS\\Settings::i()->changeValues( array( 'sitemap_databases_count' => $this->recommendedSettings['sitemap_databases_count'], 'sitemap_databases_priority' => $this->recommendedSettings['sitemap_databases_priority'] ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Settings::i()->changeValues( array( 'sitemap_databases_count' => $values['sitemap_databases_count'], 'sitemap_databases_priority' => $values['sitemap_databases_priority'] ) );\n\t\t}\n\t}", "public function saveDatabase()\n\t{\n\t\t$this->save();\n\t}", "public function save()\n {\n $where = array($this->primary_key => $this->data[$this->primary_key]);\n\n $data = array();\n foreach ($this->dirty as $key => $true)\n {\n $data[$key] = $this->data[$key];\n }\n $data = $this->before_db($data);\n $data = $this->clear_others($data);\n if ($this->unset_primary)\n unset($data[$this->primary_key]);\n\n $this->db->query($this->sql->update('?a')->where($where)->limit(1)->generate(), $data);\n }", "public function save()\n {\n $fields = \"\";\n $values = array();\n $qmarks = \"\";\n\n $iterCnt = 0;\n\n foreach ($this->property as $key => $val)\n {\n $iterCnt++;\n\n if ($iterCnt == count($this->property))\n {\n $fields = $fields . $key;\n $values[] = $val;\n $qmarks = $qmarks . '?';\n break;\n }\n\n $fields = $fields . $key . ', ';\n $values[] = $val;\n $qmarks = $qmarks . '?, ';\n }\n\n $query = 'INSERT INTO ' . self::getTableName() . '(' . $fields . ') VALUES(' . $qmarks . ')';\n\n self::$connection->runQuery($query, $values);\n }", "public function saveAll() {\n\t\t$this->saveGeneralBets();\n\t\t$this->saveMatchBets();\n\t}", "function save() {\n\t\tupdate_option( 'wgobd_settings', $this );\n\t}", "public function save_settings(){\n\t\t$get_enable = Plugin::getSetting('enable', 'mobile_check');\n\n\t\t/* Set variables */\n\t\t$tablename = TABLE_PREFIX.'mobile_check';\n\n\t\t$newcss = '';\n\t\t//$settings = '';\n\n\n\n\t\t// TO DO: Move these tasks to new single function after the settings are saved to the database. This function can call values directly from database, so these tasks can be called from external scripts */\n\t\tif(function_exists('updateMobileCSS')){\n\t\t\t$settings = updateMobileCSS();\n\t\t}\n\n\t\t// Update javascript\n\t\tif(function_exists('writeJScripts')){\n\t\t\twriteJScripts();\n\t\t}\n\n\n\n\t\tif (Plugin::setAllSettings($settings, 'mobile_check')) {\n\n\n\t\t\t//if($enable != $get_enable){\n\t\t\t\tif(function_exists('funky_cache_delete_all')){\n\t\t\t\t\tfunky_cache_delete_all();\n\t\t\t\t}\n\t\t\t//}\n\n\t\t\tFlash::set('success', 'Mobile Check - '.__('plugin settings saved.'));\n\t\t\t//redirect(get_url('plugin/mobile_check/settings'));\n\t\t} else {\n\t\t\tFlash::set('error', 'Mobile Check - '.__('plugin settings not saved!').$enable);\n\t\t}\n\t\tredirect(get_url('plugin/mobile_check/settings'));\n\n\t}", "public static function save_all(Validation $settings)\n\t{\n\t\t\n\t\t// Get all the settings\n\t\t$all_settings = self::get_array();\n\n\t\t// Settings update query\n\t\t$query = sprintf(\"UPDATE `%ssmsreport` SET `value` = CASE `key` \", \n\t\t Kohana::config('database.default.table_prefix'));\n\n\t\t// Used for building the query clauses for the final query\n\t\t$values = array();\n\t\t$keys = array();\n\t\t\n\t\t// List of value to skip\n\t\t$skip = array();\n\n\t\t$value_expr = new Database_Expression(\"WHEN :key THEN :value \");\n\t\tforeach ($settings as $key => $value)\n\t\t{\n\t\t\t// If an item has been marked for skipping or is a \n\t\t\t// non-existent setting, skip current iteration\n\t\t\tif (in_array($key, $skip) OR empty($key) OR ! array_key_exists($key, $all_settings))\n\t\t\t\tcontinue;\n\n\t\t\t$value_expr->param(':key', $key);\n\t\t\t$value_expr->param(':value', $value);\n\n\t\t\t$keys[] = $key;\n\t\t\t$values[] = $value_expr->compile();\n\t\t}\n\t\t\n\t\t// Construct the final query\n\t\t$query .= implode(\" \", $values).\"END WHERE `key` IN :keys\";\n\n\t\t// Performa batch update\n\t\tDatabase::instance()->query($query, array(':keys' => $keys));\n\t}", "Public Function save();", "function save_settings()\n\t{\n\n\t\tif (empty($_POST))\n\t\t{\n\t\t\tshow_error($this->EE->lang->line('unauthorized_access'));\n\t\t}\n\n\t\tunset($_POST['submit']);\n\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->update('extensions', array('settings' => serialize($_POST)));\n\n\t\t$this->EE->session->set_flashdata(\n\t\t\t'message_success',\n\t\t\t$this->EE->lang->line('preferences_updated')\n\t\t);\n\n\t}", "function SaveSettings()\n {\n $q=\"select * from `\".TblModFeedbackSet.\"` where 1\";\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\n if( !$this->Right->result ) return false;\n $rows = $this->Right->db_GetNumRows();\n\n $uploaddir = SITE_PATH.$this->files_path;\n if ( !file_exists ($uploaddir) ) mkdir($uploaddir,0755);\n else @chmod($uploaddir,0755);\n\n if($rows>0)\n {\n $q=\"update `\".TblModFeedbackSet.\"` set\n `files_path`='$this->files_path',\n `is_send_ajax`='$this->is_send_ajax',\n `is_files`='$this->is_files',\n `is_captcha`='\".$this->is_captcha.\"',\n `is_phone`='\".$this->is_phone.\"',\n `is_email`='\".$this->is_email.\"',\n `is_fax`='\".$this->is_fax.\"',\n `is_surname`='\".$this->is_surname.\"',\n `is_place_label`='\".$this->is_place_label.\"' \";\n }\n else\n {\n\n $q=\"INSERT INTO `\".TblModFeedbackSet.\"` set\n `files_path`='$this->files_path',\n `is_send_ajax`='$this->is_send_ajax',\n `is_files`='$this->is_files',\n `is_captcha`='\".$this->is_captcha.\"',\n `is_phone`='\".$this->is_phone.\"',\n `is_email`='\".$this->is_email.\"',\n `is_fax`='\".$this->is_fax.\"',\n `is_surname`='\".$this->is_surname.\"',\n `is_place_label`='\".$this->is_place_label.\"' \";\n }\n $res = $this->Right->Query( $q, $this->user_id, $this->module );\n// echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if( !$res || !$this->Right->result ) return false;\n return true;\n }", "private function saveTime()\r\n {\r\n $prepTask = $this->request->getParam('prep_task_name');\r\n $wkgHDay = $this->request->getParam('wkg_hour_day');\r\n $wkgHWeek = $this->request->getParam('wkg_hour_week');\r\n $wkgHMonth = $this->request->getParam('wkg_hour_month');\r\n\r\n if ($prepTask && $wkgHDay && $wkgHWeek && $wkgHMonth) {\r\n $userId = $this->user->getAccountData('id');\r\n\r\n $connection = new \\mysqli($this->config->getDBHost(), $this->config->getDBUserName(), $this->config->getDBUserPassword(), $this->config->getDBName());\r\n\r\n $isSettingsExists = false;\r\n $sqlCommand = \"SELECT * FROM settings WHERE user_id='\" . $userId . \"';\";\r\n if ($result = $connection->query($sqlCommand)) {\r\n $userData = $result->fetch_object();\r\n if ($userData) {\r\n $isSettingsExists = true;\r\n }\r\n } else {\r\n $this->user->addMessage(\"Error while checking user settings\");\r\n }\r\n\r\n if ($isSettingsExists) {\r\n $sqlCommand = \"UPDATE settings SET prep_task_name='\" . $prepTask . \"', wkg_hour_day='\" . $wkgHDay . \"', wkg_hour_week='\" . $wkgHWeek . \"', wkg_hour_month= '\" . $wkgHMonth . \"';\";\r\n } else {\r\n $sqlCommand = \"INSERT INTO settings (id, user_id, prep_task_name, wkg_hour_day, wkg_hour_week, wkg_hour_month)\r\n VALUES (NULL, '\" . $userId . \"','\" . $prepTask . \"', '\" . $wkgHDay . \"', '\" . $wkgHWeek . \"', '\" . $wkgHMonth . \"');\";\r\n }\r\n if ($connection->query($sqlCommand) === TRUE) {\r\n $this->user->updateSession();\r\n } else {\r\n $this->user->addMessage(\"Error while saving data to data base\");\r\n }\r\n $connection->close();\r\n } else {\r\n $this->user->addMessage(\"Some of required fields are empty or not exists\");\r\n }\r\n }", "function save(){\n $this->data['last_change'] = db_Wrap::getTimestampTz();\n if(parent::save(\"sotf_programmes\",\"id\")) {\n return $this->saveMetadataFile();\n } else\n return false;\n }", "public function save() {\n\t\t$dbh = static::getInstance();\t\t\n\t\t$_cols = static::_columns();\n\t\t$values = array();\n\t\tforeach($_cols as $col) {\n\t\t\t$values[$col] = $this->{$col};\n\t\t}\n\t\t$this->update($values);\n\t}", "public static function save()\n {\n $model_configurations = Configuration::all();\n try {\n Redis::set(self::$badaso_configuration_redis_key, serialize($model_configurations));\n } catch (\\Exception $th) {\n //throw $th;\n }\n }", "public function save()\n {\n if ($this->inDatabase)\n {\n $where = [static::$primary => $this->data[static::$primary]]; // use old data\n self::db()->update(static::$table, $this->dataChanged, $where);\n foreach ($this->dataChanged as $key => $value) \n $this->data[$key] = $value;\n $this->dataChanged = [];\n }\n else\n {\n self::db()->insert(static::$table, $this->data);\n $id = self::db()->id();\n if (array_key_exists(static::$primary, $this->data))\n $id = $this->data[static::$primary]; // for non auto-increment primary key, it must be provided\n $data = self::db()->select(static::$table, \"*\", [static::$primary => $id])[0]; // update model\n $this->inDatabase = true;\n $this->data = $data;\n $this->dataChanged = [];\n }\n \n }", "public function save_settings_action()\n {\n // Alle Einträge resetten\n $deactivateAll = DBManager::get()->prepare(\"UPDATE resources_rooms_order SET checked = 0, priority = 99999 WHERE user_id = ?\");\n $deactivateAll->execute(array($GLOBALS['user']->id));\n\n // Update request\n $update = DBManager::get()->prepare(\"UPDATE resources_rooms_order SET checked = ?, priority = ? WHERE resource_id = ? AND user_id = ?\");\n\n $success = true;\n $i = 0;\n foreach (Request::getArray('resources') as $resource => $checked) {\n $success = $success && $update->execute(array($checked, ++$i, $resource, $GLOBALS['user']->id));\n }\n\n if ($success) {\n PageLayout::postSuccess(dgettext('roomplanplugin', 'Die Einstellungen wurden gespeichert.'));\n } else {\n PageLayout::postError(dgettext('roomplanplugin', 'Die Einstellungen konnten nicht gespeichert werden.'));\n }\n\n $this->relocate('index/settings');\n }", "public function save()\n {\n // Holds the changes/additions\n $changed = array();\n\n // Gets the current collection of configs from the config files\n $configs = $this->getConfigs();\n\n // All current configs as one large collection\n $all = array_merge($configs['config'], $configs['override']);\n\n // See if there are new values in the config array that need to be handled\n $newKeys = array_diff_key($this->config, $all);\n foreach ($newKeys as $key) {\n $changed[$key] = $this->config[$key];\n }\n\n // Now check and see if any of the current array are different from the\n // base and custom\n foreach ($configs as $config) {\n $changed = array_merge($changed, $this->getChangedValues($config));\n }\n\n if ($changed) {\n $write = '';\n foreach ($changed as $key => $value) {\n $write .= \"\\$config['$key'] = \" . var_export($value) . \";\\n\";\n }\n return file_put_contents('config_override.php', $write);\n }\n\n return true;\n }", "function save()\n {\n\n $query = '';\n global $db;\n\n if (isset($this->id)) {\n $updates = '';\n foreach ($this->_describe as $field) {\n if (isset($this->data[$field])) {\n $updates .= '`' . $field . '` = \\'' . mysql_real_escape_string($this->data[$field]) . '\\',';\n }\n }\n\n $updates = substr($updates, 0, -1);\n\n $query = 'UPDATE ' . $this->_table . ' SET ' . $updates . ' WHERE `id`=\\'' . mysql_real_escape_string($this->id) . '\\'';\n } else {\n\n $fields = '';\n $values = '';\n foreach ($this->_describe as $field) {\n if ($this->data[$field]) {\n $fields .= '`' . $field . '`,';\n $values .= '\\'' . mysql_real_escape_string($this->data[$field]) . '\\',';\n }\n }\n $values = substr($values, 0, -1);\n $fields = substr($fields, 0, -1);\n\n $query = 'INSERT INTO ' . $this->_table . ' (' . $fields . ') VALUES (' . $values . ')';\n }\n\n $this->_result = $db->query($query);\n $this->clear();\n if ($this->_result == 0) {\n /** Error Generation **/\n print_r($this->_result);\n return false;\n } else {\n $this->id = $db->insert_id;\n return true;\n }\n }", "function save_settings($settings) {\n\t$user_id = self_char_id();\n if($user_id){\n \tDatabaseConnection::getInstance();\n \t$statement = DatabaseConnection::$pdo->prepare(\"SELECT count(settings_store) FROM settings WHERE player_id = :player\");\n \t$statement->bindValue(':player', $user_id);\n \t$statement->execute();\n\n \t$settings_exist = $statement->fetchColumn();\n\n \tif ($settings_exist) {\n \t\t$statement = DatabaseConnection::$pdo->prepare(\"UPDATE settings SET settings_store = :settings WHERE player_id = :player\");\n \t\t$statement->bindValue(':settings', serialize($settings));\n \t\t$statement->bindValue(':player', $user_id);\n \t} else {\n \t\t$statement = DatabaseConnection::$pdo->prepare(\"INSERT INTO settings (settings_store, player_id) VALUES (:settings, :player)\");\n \t\t$statement->bindValue(':settings', serialize($settings));\n \t\t$statement->bindValue(':player', $user_id);\n \t}\n\n \t$statement->execute();\n }\n\treturn get_settings($refresh=true); // This refreshes the static, saved settings variable.\n}", "public function store()\n {\n $getAllInputFromRequest = Input::all();\n\n $validator = Validator::make($getAllInputFromRequest, $this->settingsService->loadRules());\n\n if($validator->fails()) {\n return Redirect::back()->with('message_danger', $this->getMessage('messages.ErrorSettingsStore'));\n }\n\n $writeConfig = new Rewrite;\n $writeConfig->toFile(base_path() . '/config/crm_settings.php', [\n 'pagination_size' => $getAllInputFromRequest['pagination_size'],\n 'currency' => $getAllInputFromRequest['currency'],\n 'priority_size' => $getAllInputFromRequest['priority_size'],\n 'invoice_tax' => $getAllInputFromRequest['invoice_tax'],\n 'invoice_logo_link' => $getAllInputFromRequest['invoice_logo_link'],\n 'rollbar_token' => $getAllInputFromRequest['rollbar_token'],\n 'loading_circle' => $getAllInputFromRequest['loading_circle'],\n 'stats' => $getAllInputFromRequest['stats']\n ]);\n\n $this->settingsService->saveEnvData($getAllInputFromRequest['rollbar_token']);\n\n $this->systemLogs->insertSystemLogs('SettingsModel has been changed.', $this->systemLogs::successCode);\n\n return Redirect::back()->with('message_success', $this->getMessage('messages.SuccessSettingsUpdate'));\n }", "public function save() {\n\t\tif(!$this->validate()) {\n\t\t\tYii::app()->console->addModel($this);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tforeach ($this->getAttributes() as $key => $value) {\n\t\t\t$this->_model->set($key, $value);\n\t\t}\n\t\tYii::app()->console->addSuccess(Yii::t('view', 'Configuration saved success'));\n\t\treturn true;\n\t}", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save()\n {\n $array = $this->getState();\n if (empty($array['id'])) {\n unset($array['id']);\n Db::getInstance()->insert($this->getTableName(), $array);\n } else {\n Db::getInstance()->update($this->getTableName(), $array, ['id' => $array['id']]);\n }\n }", "public function save()\n {\n BDb::connect($this->_writeConnectionName);\n $this->_dirty_fields = BDb::cleanForTable($this->_table_name, $this->_dirty_fields);\n if (true) {\n #if (array_diff_assoc($this->_old_values, $this->_dirty_fields)) {\n $result = parent::save();\n #}\n } else {\n echo $this->_class_name.'['.$this->id.']: ';\n print_r($this->_data);\n echo 'FROM: '; print_r($this->_old_values);\n echo 'TO: '; print_r($this->_dirty_fields); echo \"\\n\\n\";\n $result = true;\n }\n //$this->_old_values = array(); // commented out to make original loaded object old values available after save\n return $result;\n }", "public function persist(){\n\n\t\treturn $this->user->update(['settings' => $this->settings]);\n\t}", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function save () {\n // Create Obj to manipulated\n $db_obj = new stdClass();\n foreach (get_object_vars($this) as $key => $value) {\n if(substr($key, 0, 4) != 'SYN_')\n $db_obj->{$key} = $value;\n }\n\n // Update\n // If has a PK 'id_nameclass'\n if ( isset($this->{'id_'.$this->config()->class_name}) ) {\n $this->db->update(\n $this->config()->table_name, \n $db_obj, array('id_'.$this->config()->class_name => $this->{'id_'.$this->config()->class_name})\n );\n }\n\n // Save / Insert into database\n else {\n $this->db->insert($this->config()->table_name, $db_obj);\n }\n }", "public function saveSettings(Request $request)\n {\n $validatedData = $request->validate([\n 'siteTitle' => 'required'\n ]);\n \n $siteSettingsTable = array('siteTitle' => $request->input('siteTitle'), 'homePageMeta' => $request->input('homePageMeta'), 'aboutPageMeta' => $request->input('aboutPageMeta'), 'carsPageMeta' => $request->input('carsPageMeta'), 'contactPageMeta' => $request->input('contactPageMeta'), 'interestRate' => $request->input('interestRate'));\n \n $firstPostTest = DB::select('SELECT * FROM siteSettings');\n\n if(count($firstPostTest) == 0){\n DB::table('siteSettings')->insert($siteSettingsTable);\n }else{\n DB::table('siteSettings')->where('id', 1)->update($siteSettingsTable);\n }\n\n return redirect('/settings')->with('message', 'success');\n }", "public function SaveSettings() {\n $sSettings = base64_encode(serialize($this->Settings));\n file_put_contents(\"pae.conf\", $sSettings);\n }", "public function save(){\n\t\t$encoded = json_encode($this->config);\n\t\t// $query = \"REPLACE INTO PaperlessProfile VALUES(:User, :Config);\";\n\t\t$query = \"UPDATE PaperlessProfile SET Config = :Config WHERE User = :User\";\n\t\t$db = Database::getConnection();\n\t\t\n\t\ttry {\n\t\t\t$sth = $db->prepare($query);\n\t\t\t$rows = $sth->execute(array(':Config' => $encoded, \":User\" => $this->user->id));\n\t\t} catch(PDOException $e) {\n\n\t\t}\t\n\t}", "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'pollOptionId' => $this->pollOptionId,\n 'userId' => $this->userId\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function save_all_values() {\n\tglobal $DB_WE, $BROWSER, $SYSTEM;\n\n\t/*************************************************************************\n\t * SAVE METADATA FIELDS TO DB\n\t *************************************************************************/\n\tif (we_hasPerm(\"ADMINISTRATOR\")) {\n\t\t// save all fields\n\t\t$_definedFields = array();\n\t\tif (isset($_REQUEST[\"metadataTag\"]) && is_array($_REQUEST[\"metadataTag\"])) {\n\t\t\tforeach($_REQUEST[\"metadataTag\"] as $key => $value) {\n\t\t\t\t$_definedFields[] = array(\n\t\t\t\t\t\"id\" => \"\", // will be genereated by rdbms (autoincrement pk)\n\t\t\t\t\t\"tag\" => $value,\n\t\t\t\t\t\"type\" => (isset($_REQUEST[\"metadataType\"][$key])) ? $_REQUEST[\"metadataType\"][$key] : \"\",\n\t\t\t\t\t\"importFrom\" => (isset($_REQUEST[\"metadataImportFrom\"][$key])) ? $_REQUEST[\"metadataImportFrom\"][$key] : \"\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$truncateQuery = \"truncate table \".METADATA_TABLE.\";\";\n\t\t$_insertQuery = array();\n\t\tforeach($_definedFields as $key => $value) {\n\t\t\t$_insertQuery[] = \"insert into \".METADATA_TABLE.\" \tvalues('','\".mysql_real_escape_string($value['tag']).\"','\".mysql_real_escape_string($value['type']).\"','\".mysql_real_escape_string($value['importFrom']).\"');\";\n\t\t}\n\n\t\t$DB_WE->query($truncateQuery);\n\t\tforeach($_insertQuery as $value) {\n\t\t\t$DB_WE->query($value);\n\t\t}\n\t}\n\n}", "public function save(){}", "public function saveSiteSettings($data) {\n\t\t// Check for write access\n\t\tif($this->access < 2) { return array('result' => 'failure', 'message' => 'Access Denied!'); }\n\t\t\n\t\t//return array('result' => 'failure', 'message' => 'Access Denied!', 'data' => $data);\n\t\t\n\t\t// Set variables\n\t\t$Database = new \\Database();\n\t\t$validation = array();\n\t\t$updated = array();\n\t\t$create_log = true;\n\t\t$set_colors = false;\n\t\t$allowed = array(\n\t\t\t'access_groups' => array(),\n\t\t\t'time_zones' => array(),\n\t\t\t'databases' => array(),\n\t\t\t'attributes' => array()\n\t\t);\n\t\t\n\t\t// Grab all site settings\n\t\tif($Database->Q(array(\n 'assoc' => 'id',\n 'query' => 'SELECT * FROM fks_site_settings'\n ))) {\n // Set settings value\n\t\t\t$site_settings = $Database->r['rows'];\n } else {\n // Return error message with error code\n\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => $this->createError($Database->r));\n }\n\t\t\n\t\t// Get all allowed access groups\n\t\tforeach($this->getAccessGroups() as $k => $v) {\n\t\t\tif( !$v['disabled'] ) { array_push($allowed['access_groups'], $v['id']); }\n\t\t}\n\t\t\n\t\t// Get all allowed time zones\n\t\tforeach($this->timeZones('ALL')['list'] as $k => $v) {\n\t\t\tarray_push($allowed['time_zones'], $v);\n\t\t}\n\t\t\n\t\t// Get all allowed databases\n\t\tforeach($Database->db as $k => $v) {\n\t\t\tif( $k == 'persist' || $k == 'default' || $k == $Database->db['default'] ){ continue; }\n\t\t\tarray_push($allowed['databases'], $k);\n\t\t}\n\t\t\n\t\t// Get allowed member data types for LDAP\n\t\tforeach($this->getMemberDataTypes() as $k => $v) {\n\t\t\tarray_push($allowed['attributes'], $k);\n\t\t}\n\t\t\n\t\t// Loop through each setting and add to the validation array\n\t\tforeach($site_settings as $k => $v) {\n\t\t\t// Set initial validation array\n\t\t\t$validation[$k] = json_decode($v['validation'], true);\n\t\t\t\n\t\t\t// Add required option if missing\n\t\t\tif(!isset($validation[$k]['required'])) { $validation[$k]['required'] = true; }\n\t\t}\n\t\t\n\t\t// AD_PREFERRED - Can only choose LDAP if AD is enabled\n\t\t$validation['AD_PREFERRED']['values'] = ($data['ACTIVE_DIRECTORY'] ? array('LDAP', 'Local') : array('Local'));\n\t\t\n\t\t// AD_ATTRIBUTES - Can only choose LDAP if AD is enabled\n\t\t$data['AD_ATTRIBUTES'] = isset($data['AD_ATTRIBUTES']) ? $data['AD_ATTRIBUTES'] : array();\n\t\t$validation['AD_ATTRIBUTES']['values'] = $allowed['attributes'];\n\t\t$ad_attributes = $data['AD_ATTRIBUTES'];\n\t\tif(is_array($data['AD_ATTRIBUTES'])) {$data['AD_ATTRIBUTES'] = array_keys($data['AD_ATTRIBUTES']);}\n\t\t\n\t\t// Default access groups\n\t\t$validation['DEFAULT_ACCESS_GUEST']['values_csv'] = $allowed['access_groups'];\n\t\t$validation['DEFAULT_ACCESS_LDAP']['values_csv'] = $allowed['access_groups'];\n\t\t$validation['DEFAULT_ACCESS_LOCAL']['values_csv'] = $allowed['access_groups'];\n\t\t\n\t\t// Allowed time zones\n\t\t$validation['ALLOWED_TIME_ZONES']['values_csv'] = $allowed['time_zones'];\n\t\t\n\t\t// Remote database\n\t\t$validation['REMOTE_DATABASE']['values_csv'] = $allowed['databases'];\n\t\t\n\t\t// Remote admins\n\t\t$validation['REMOTE_ADMINS'] = array('required' => array('REMOTE_SITE' => 'Secondary'), 'not_empty' => true);\n\t\t\n\t\t// Validation\n\t\t$Validator = new \\Validator($data);\n\t\t@$Validator->validate($validation);\n\t\tif(!$Validator->getResult()) { return array('result' => 'validate', 'message' => 'There were issues with the form.', 'validation' => $Validator->getOutput(), 'data' => $data); }\t\n\t\t$form = $Validator->getForm();\n\t\t\n\t\t// Return failure if Remote Site AND Active Directory is enabled\n\t\tif($form['ACTIVE_DIRECTORY'] == 1 && $form['REMOTE_SITE'] != 'Disabled') {\n\t\t\treturn array('result' => 'validate', 'validation' => array(\n\t\t\t\t'ACTIVE_DIRECTORY' => array('set' => 'This can\\'t be enabled if Remote Site is enabled!'),\n\t\t\t\t'REMOTE_SITE' => array('set' => 'This can\\'t be enabled if Active Directory is enabled!')\n\t\t\t));\n\t\t}\n\t\t\n\t\t// JSON Encode AD Attributes\n\t\t$form['AD_ATTRIBUTES'] = json_encode($ad_attributes);\n\t\t\n\t\t// Set REMOTE_ID - TODO - set tables auto increment back to 1 ?????\n\t\tif($form['REMOTE_SITE'] == 'Primary'){$form['REMOTE_ID'] = 0;}\n\t\tif($form['REMOTE_SITE'] == 'Disabled'){$form['REMOTE_ID'] = null;}\n\t\t\n\t\t// If remote site was 'Disabled' or 'Primary' and we are changing to 'Secondary'\n\t\tif(($site_settings['REMOTE_SITE']['data'] == 'Disabled' || $site_settings['REMOTE_SITE']['data'] == 'Primary') && $form['REMOTE_SITE'] == 'Secondary') {\n\t\t\t// We do not want to create a member log since members will be removed\n\t\t\t$create_log = false;\n\t\t\t\n\t\t\t// Connect to Primary site to generate an ID\n\t\t\tif($Database->Q(array(\n\t\t\t\t'db' => $form['REMOTE_DATABASE'],\n\t\t\t\t'query' => 'SELECT data FROM fks_site_settings WHERE id = \"REMOTE_SITE_IDS\"'\n\t\t\t))){\n\t\t\t\t// Check for the record\n\t\t\t\tif($Database->r['found'] == 0) {\n\t\t\t\t\t// Return error message with error code\n\t\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => 'Remote database is missing data!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Explode ID's if not null\n\t\t\t\t$_ids = is_null($Database->r['row']['data']) ? array() : explode(',', $Database->r['row']['data']);\n\t\t\t\t\n\t\t\t\t// Loop through known ID's and generate a new one\n\t\t\t\twhile(true) {\n\t\t\t\t\t$_key = $this->makeKey(4);\n\t\t\t\t\tif(!in_array($_key, $_ids)){ break; }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Add key to the known list\n\t\t\t\tarray_push($_ids, $_key);\n\t\t\t} else {\n\t\t\t\t// Return error message with error code\n\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => $this->createError($Database->r));\n\t\t\t}\n\t\t\t\n\t\t\t// Update Primary site's list of ID's\n\t\t\tif(!$Database->Q(array(\n\t\t\t\t'db' => $form['REMOTE_DATABASE'],\n\t\t\t\t'params' => array(\n\t\t\t\t\t':data' => implode(',', $_ids)\n\t\t\t\t),\n\t\t\t\t'query' => 'UPDATE fks_site_settings SET data = :data WHERE id = \"REMOTE_SITE_IDS\"'\n\t\t\t))){\n\t\t\t\t// Return error message with error code\n\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => $this->createError($Database->r));\n\t\t\t}\n\t\t\t\n\t\t\t// Update local site's current ID\n\t\t\tif(!$Database->Q(array(\n\t\t\t\t'params' => array(\n\t\t\t\t\t':data' => $_key\n\t\t\t\t),\n\t\t\t\t'query' => 'UPDATE fks_site_settings SET data = :data WHERE id = \"REMOTE_ID\"'\n\t\t\t))){\n\t\t\t\t// Return error message with error code\n\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => $this->createError($Database->r));\n\t\t\t}\n\t\t\t\n\t\t\t// Reset tables\n\t\t\tif(!$this->resetLocalTables()) {\n\t\t\t\t// Return error message with error code\n\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => 'Failed to reset tables!');\n\t\t\t}\n\t\t\t\n\t\t\t// Add passed member access group\n\t\t\tforeach($form['REMOTE_ADMINS'] as $k => $v) {\n\t\t\t\tif(!$Database->Q(array(\n\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t':id' => 8,\n\t\t\t\t\t\t':member_id' => $v['id'],\n\t\t\t\t\t\t':data' => $v['access_id']\n\t\t\t\t\t),\n\t\t\t\t\t'query' => 'INSERT INTO fks_member_data SET id = :id, member_id = :member_id, data = :data'\n\t\t\t\t))){\n\t\t\t\t\t// Return error message with error code\n\t\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => $this->createError($Database->r));\n\t\t\t\t}\n\t\t\t} \n\t\t\t\n\t\t\t// Log out the current user\n\t\t\t$this->Session->destroy();\n\t\t}\n\t\t\n\t\t// Unset Remote Admins if set\n\t\tif(array_key_exists('REMOTE_ADMINS', $form)) { unset($form['REMOTE_ADMINS']); }\n\t\t\n\t\t// Set signature color if null\n\t\tif($form['SITE_COLORS_SIGNATURE'] == null) { $form['SITE_COLORS_SIGNATURE'] = '#36e3fd'; }\n\t\t\n\t\t// Setup DataHandler if we need to check seperate Diffs\n\t\t$DataHandler = new \\DataHandler(array(\n\t\t\t'fks_site_settings' => array(\n\t\t\t\t'base' => 'fks_site_settings',\n\t\t\t\t'log_actions' => array('modified' => \\Enums\\LogActions::SITE_SETTINGS_MODIFIED)\n\t\t\t)\n\t\t));\n\t\t\n\t\t// Loop through the data to figure out what was changed\n\t\tforeach($form as $k => $v) {\n\t\t\t// Skip if there is no change\n\t\t\tif($v === $site_settings[$k]['data']) { continue; }\n\t\t\t\n\t\t\t// Create log\n\t\t\t$log = array($site_settings[$k]['data'], $v);\n\t\t\t\n\t\t\t// If JSON diff\n\t\t\tif($site_settings[$k]['type'] == 'json') {\n\t\t\t\t$v = $v == '[]' ? '{}' : $v;\n\t\t\t\t\n\t\t\t\t$new_data = array(\n\t\t\t\t\t'columns' => array(\n\t\t\t\t\t\t'data' => $v\n\t\t\t\t\t),\n\t\t\t\t\t'data' => false\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$tst = $DataHandler->diff('local', 'fks_site_settings', $k, $new_data, array(), array('columns' => array('data')));\n\t\t\t\t\n\t\t\t\t// Skip if no change\n\t\t\t\tif(!$tst){ continue; }\n\t\t\t\t\n\t\t\t\t$tst['log_misc'] = json_decode($tst['log_misc'], true);\n\t\t\t\t$log = $tst['log_misc']['data'];\n\t\t\t}\n\n\t\t\t// Update the field\n\t\t\tif(!$Database->Q(array(\n\t\t\t\t'params' => array(\n\t\t\t\t\t':id' => $k,\n\t\t\t\t\t':data' => $v\n\t\t\t\t),\n\t\t\t\t'query' => 'UPDATE fks_site_settings SET data = :data WHERE id = :id'\n\t\t\t))) {\n\t\t\t\treturn array('result' => 'failure', 'title' => 'Database Error', 'message' => $this->createError($Database->r));\n\t\t\t}\n\t\t\t\n\t\t\t// Add member log\n\t\t\t$updated[$k] = $log;\n\t\t}\n\t\t\n\t\t// Set colors if changed\n\t\tif(array_key_exists('SITE_COLORS_SIGNATURE', $updated)) {\n\t\t\t$set_colors = true;\n\t\t\t$this->setColors();\n\t\t}\n\t\t\n\t\t// Create member log\n\t\tif(count($updated) > 0 && $create_log) {\n\t\t\t$MemberLog = new \\MemberLog(\\Enums\\LogActions::SITE_SETTINGS_MODIFIED, $_SESSION['id'], NULL, json_encode($updated));\n\t\t\treturn array('result' => 'success', 'message' => 'Settings have been updated!', 'updated' => $updated, 'do_log' => $create_log, 'set_colors' => $set_colors);\n\t\t}\n\t\t\n\t\t// Return no changes\n\t\treturn array('result' => 'info', 'message' => 'No changes detected!', 'do_log' => $create_log);\n\t}", "abstract function save();", "public function save()\n\t{\n // @TODO: Ensure there are attributes before attempting to save\n\t\tif(isset($this->attributes)) {\n // @TODO: Perform the proper action - if the `id` is set, this is an update, if not it is a insert\n // @TODO: Ensure that update is properly handled with the id key\n\t\t\tif (isset($this->attributes['id'])) {\n\t\t\t\t$this->update();\n\t\t\t} else {\n\t\t\t\t$this->insert();\n\t\t\t}\n\t\t}\n\t\t/*need for when add data, need new connection to save it*/\n\t\tself::dbConnect();\n\t}", "protected function _save() {\n\n\t}", "public function save_settings() {\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "public static function save() {\n\t\tThemexCore::updateOption(self::$id,self::$data);\n\t}", "function save_all() {\r\n\r\n\t // do not save another demo history if we already have one\r\n if (isset($this->td_demo_history['demo_settings_date'])) {\r\n return;\r\n }\r\n\r\n $local_td_demo_history = array();\r\n\r\n $local_td_demo_history['page_on_front'] = get_option('page_on_front');\r\n $local_td_demo_history['show_on_front'] = get_option('show_on_front');\r\n $local_td_demo_history['nav_menu_locations'] = get_theme_mod('nav_menu_locations');\r\n\r\n $sidebar_widgets = get_option('sidebars_widgets');\r\n $local_td_demo_history['sidebars_widgets'] = $sidebar_widgets;\r\n\r\n $used_widgets = $this->get_used_widgets($sidebar_widgets);\r\n\r\n\r\n if (is_array($used_widgets)) {\r\n foreach ($used_widgets as $used_widget) {\r\n $local_td_demo_history['used_widgets'][$used_widget] = get_option('widget_' . $used_widget);\r\n }\r\n }\r\n\r\n $local_td_demo_history['theme_options'] = get_option(TD_THEME_OPTIONS_NAME);\r\n $local_td_demo_history['td_social_networks'] = get_option('td_social_networks');\r\n $local_td_demo_history['demo_settings_date'] = time();\r\n update_option(TD_THEME_NAME . '_demo_history', $local_td_demo_history);\r\n }", "function save() {\n\n $record = new stdClass;\n $record->usersid = $this->usersid;\n $record->sectionsid = $this->sectionsid;\n $record->tt_sectionsid = $this->tt_sectionsid;\n $record->approval_flag = $this->approval_flag;\n $record->status = $this->status;\n\n if (!$this->id) {\n\n $this->id = insert_record('block_courseprefs_teamteach', $record, true);\n\n if (!$this->id) {\n throw new Exception('Unable to create new courseprefs team teach entry within database');\n }\n\n } else {\n\n $record->id = $this->id;\n\n if (!update_record('block_courseprefs_teamteach', $record)) {\n throw new Exception('Unable to update new courseprefs team teach entry within database');\n }\n }\n\n CoursePrefsLog::add_to_log($this->usersid, $this->sectionsid, time(), 'teamteach', $this->status);\n }", "function save_settings()\n\t{\n\t if (empty($_POST))\n\t {\n\t show_error($this->EE->lang->line('unauthorized_access'));\n\t }\n\n\t unset($_POST['submit']);\n\n\t $this->EE->lang->loadfile('bugherd');\n\n\t $len = $this->EE->input->post('api_key');\n\n\t $this->EE->db->where('class', __CLASS__);\n\t $this->EE->db->update('extensions', array('settings' => serialize($_POST)));\n\n\t $this->EE->session->set_flashdata(\n\t 'message_success',\n\t $this->EE->lang->line('preferences_updated')\n\t );\n\t}", "protected function save()\n\t{\n\t\tif(!current_user_can(\"administrator\"))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif(isset($_REQUEST))\n\t\t{\n\t\t\tif(isset($_REQUEST[\"save_nonce\"]))\n\t\t\t{\n\t\t\t\tif(wp_verify_nonce($_REQUEST[\"save_nonce\"],__FILE__))\n\t\t\t\t{\n\t\t\t\t\t/*\n\t\t\t\t\t\tLoop through all settings and check if they're present in $_REQUEST array, if so, update them\n\t\t\t\t\t*/\n\t\t\t\t\tforeach($this->settings as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$name = $field[\"name\"];\n\t\t\t\t\t\tif(isset($_REQUEST[$name]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(is_array($_REQUEST[$name]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_REQUEST[$name] = json_encode($_REQUEST[$name]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$setting = sanitize_text_field($_REQUEST[$name]);\n\t\t\t\t\t\t\tupdate_option($name,$setting);\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<br>\n\t\t\t\t\t<div class=\"notice notice-success is-dismissible\">\n\t\t\t\t <p> <strong><?php echo __(\"Success\").\"!\";?></strong>\n\t\t <?php echo __(\"Settings\") . \" \".__(\"saved\"). \".\";?>\n\t\t \t</p>\n\t\t\t\t </div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function save()\n {\n $myConfig = $this->getConfig();\n $sOxId = $this->getEditObjectId();\n\n // base parameters\n $aConfStrs = oxRegistry::getConfig()->getRequestParameter(\"confstrs\");\n $aConfAArs = oxRegistry::getConfig()->getRequestParameter(\"confaarrs\");\n $aConfBools = oxRegistry::getConfig()->getRequestParameter(\"confbools\");\n\n // validating language Ids\n if (is_array($aConfAArs['aTsLangIds'])) {\n\n $blActive = (isset($aConfBools[\"blTsWidget\"]) && $aConfBools[\"blTsWidget\"] == \"true\") ? true : false;\n $sPkg = \"OXID_ESALES\";\n\n $aActiveLangs = array();\n foreach ($aConfAArs['aTsLangIds'] as $sLangId => $sId) {\n $aActiveLangs[$sLangId] = false;\n if ($sId) {\n $sTsUser = $myConfig->getConfigParam('sTsUser');\n $sTsPass = $myConfig->getConfigParam('sTsPass');\n // validating and switching on/off\n $sResult = $this->_validateId($sId, (bool) $blActive, $sTsUser, $sTsPass, $sPkg);\n\n // keeping activation state\n $aActiveLangs[$sLangId] = $sResult == \"OK\" ? true : false;\n\n // error message\n if ($sResult && $sResult != \"OK\") {\n $this->_aViewData[\"errorsaving\"] = \"DYN_TRUSTED_RATINGS_ERR_{$sResult}\";\n }\n }\n }\n\n $myConfig->saveShopConfVar(\"arr\", \"aTsActiveLangIds\", $aActiveLangs, $sOxId);\n }\n\n parent::save();\n }" ]
[ "0.7692789", "0.76728", "0.7669477", "0.7663767", "0.7663767", "0.76179737", "0.74388057", "0.73614156", "0.72357774", "0.72167516", "0.705608", "0.7038783", "0.6971959", "0.6965207", "0.6954552", "0.6929036", "0.687074", "0.68635446", "0.6851993", "0.684465", "0.68342364", "0.6829889", "0.68140036", "0.681357", "0.68131244", "0.68032944", "0.67572427", "0.6751308", "0.67257667", "0.6718528", "0.67130095", "0.6705826", "0.66990924", "0.66950357", "0.6689348", "0.6688252", "0.667987", "0.6657928", "0.66387916", "0.66361284", "0.6624981", "0.6603076", "0.6597552", "0.65835524", "0.6570875", "0.6559027", "0.6550328", "0.65269053", "0.6522478", "0.65179867", "0.651657", "0.6501628", "0.65005934", "0.64771813", "0.64744526", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6473421", "0.6471762", "0.6468991", "0.64676476", "0.6461089", "0.6461089", "0.6461089", "0.6461089", "0.6461089", "0.64569217", "0.6451128", "0.6449632", "0.6447585", "0.6443655", "0.6433479", "0.64319324", "0.6415069", "0.6414277", "0.64130294", "0.6401849", "0.6396828", "0.63900214", "0.63851976", "0.63839674", "0.63807404", "0.6380072", "0.63726366" ]
0.7829387
0
protected function put_settings Merges the submitted settings into the settings array
защищённая функция put_settings Объединяет переданные настройки в массив настроек
protected function put_settings($settings) { if (is_array($settings)) { $this->_settings = array_merge($this->_settings, $settings); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mergeSettings( $settings = array() );", "public static function import_settings() {\n\t\tcheck_ajax_referer( SEARCHWP_PREFIX . 'settings' );\n\n\t\t$settings = isset( $_REQUEST['settings'] ) ? json_decode( stripslashes( $_REQUEST['settings'] ), true ) : false;\n\n\t\tif ( ! is_null( $settings['engines'] ) ) {\n\t\t\t// Run these Engines through the saving process which validates and persists.\n\t\t\t$engines_view = new \\SearchWP\\Admin\\Views\\EnginesView();\n\t\t\t$engines_view->update_engines( $settings['engines'] );\n\t\t}\n\n\t\tif ( ! is_null( $settings['settings'] ) && is_array( $settings['settings'] ) ) {\n\t\t\tforeach ( $settings['settings'] as $setting => $value ) {\n\t\t\t\tSettings::update( $setting, $value );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! is_null( $settings['stopwords'] ) && is_array( $settings['stopwords'] ) ) {\n\t\t\t$stopwords = new \\SearchWP\\Logic\\Stopwords();\n\t\t\t$stopwords->save( $settings['stopwords'] );\n\t\t}\n\n\t\tif ( ! is_null( $settings['synonyms'] ) && is_array( $settings['synonyms'] ) ) {\n\t\t\t$synonyms = new \\SearchWP\\Logic\\Synonyms();\n\t\t\t$synonyms->save( $settings['synonyms'] );\n\t\t}\n\n\t\twp_send_json_success();\n\t}", "public function save_settings() {\r\n\r\n\t\t\t// Verify the nonce\r\n\t\t\tif ( ! check_ajax_referer( 'cptpro_save_settings', 'nonce', false ) ) {\r\n\t\t\t \twp_send_json_error();\r\n\t\t\t}\r\n\r\n\t\t\t// Get our option\r\n\t\t\t$settings = get_option( 'cptpro_settings', array() );\r\n\r\n\t\t\t// Handle hide tab title\r\n\t\t\t$hide_tab_title = isset( $_POST['hide_tab_title'] ) && $_POST['hide_tab_title'] === 'true' ? true : false;\r\n\t\t\t$settings['hide_tab_title'] = $hide_tab_title;\r\n\r\n\t\t\t// Handle Add Tabs to Search\r\n\t\t\t$search_wordpress = isset( $_POST['search_wordpress'] ) && $_POST['search_wordpress'] === 'true' ? true : false;\r\n\t\t\t$settings['search_wordpress'] = $search_wordpress;\r\n\r\n\t\t\t// Handle Restricting the Search to Products/WooCommerce\r\n\t\t\t$search_woo = isset( $_POST['search_woo'] ) && $_POST['search_woo'] === 'true' ? true : false;\r\n\t\t\t$settings['search_woo'] = $search_woo;\r\n\r\n\t\t\tupdate_option( 'cptpro_settings', $settings );\r\n\r\n\t\t\twp_send_json_success();\r\n\t\t}", "public function save_settings() {\n\t\t$settings = isset( $_POST['settings'] ) ? wp_unslash( $_POST['settings'] ) : array();\n\t\t$filters = array(\n\t\t\t'queryLimit',\n\t\t\t'fileLimit',\n\t\t\t'batchSize',\n\t\t\t'cpuLoad',\n\t\t\t'delayRequests',\n\t\t\t'disableAdminLogin',\n\t\t\t'querySRLimit',\n\t\t\t'maxFileSize',\n\t\t\t'debugMode',\n\t\t\t'unInstallOnDelete',\n\t\t\t'checkDirectorySize',\n\t\t\t'optimizer',\n\t\t);\n\n\t\t$save_fields = array();\n\t\tforeach ( $filters as $field ) {\n\t\t\tif ( isset( $settings[ $field ] ) ) {\n\t\t\t\t$save_fields[ $field ] = $settings[ $field ];\n\t\t\t}\n\t\t}\n\t\tupdate_option( 'wpstg_settings', $save_fields );\n\t\treturn array( 'result' => 'success' );\n\t}", "function settings($settings) {\n \t$this->settings = (object) ( ((array) $settings) + ((array) $this->settings) );\n }", "private function process_settings() {\n\t\t\tif(!empty($this->settings)) {\n\t\t\t\tusort($this->settings, array($this, 'sort_array'));\n\t\t\t\tforeach($this->settings as $section) {\n\t\t\t\t\tif(isset($section['section_id']) && $section['section_id'] && isset($section['section_title'])) {\n\t\t\t\t\t\tadd_settings_section($section['section_id'], $section['section_title'], array($this, 'section_intro'), $this->option_group);\n\t\t\t\t\t\tif(isset($section['fields']) && is_array($section['fields']) && !empty($section['fields'])) {\n\t\t\t\t\t\t\tforeach($section['fields'] as $field) {\n\t\t\t\t\t\t\t\tif(isset($field['id']) && $field['id'] && isset($field['title'])) {\n\t\t\t\t\t\t\t\t\tadd_settings_field($field['id'], $field['title'], array(\n\t\t\t\t\t\t\t\t\t\t$this,\n\t\t\t\t\t\t\t\t\t\t'generate_setting'\n\t\t\t\t\t\t\t\t\t), $this->option_group, $section['section_id'], array(\n\t\t\t\t\t\t\t\t\t\t'section' => $section,\n\t\t\t\t\t\t\t\t\t\t'field' => $field\n\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function settings($settings)\n\t\t{\n\t\t\t\n\t\t\tforeach($settings as $k => $s){$this->_settings[$k] = $s;}\n\t\t}", "public function addSettings(array $settings): void {\n $this->settings = array_merge($settings, $this->settings);\n }", "public function addSettings(array $settings)\n {\n $this->settings = array_merge($this->settings, $settings);\n }", "private function process_settings()\n {\n global $g_comp_session, $g_comp_database_system, $index_includes;\n\n // Check rights\n isys_auth_system::instance()\n ->check(isys_auth::SUPERVISOR, 'SYSTEM');\n\n isys_component_template_navbar::getInstance()\n ->set_active(true, C__NAVBAR_BUTTON__SAVE)\n ->set_visible(false, C__NAVBAR_BUTTON__EDIT)\n ->set_save_mode('quick');\n\n $l_settings = isys_settings::get();\n $l_definition = isys_settings::get_definition();\n ksort($l_definition);\n\n $l_tenant_settings = isys_tenantsettings::get();\n $l_tenant_definition = isys_tenantsettings::get_definition();\n ksort($l_tenant_settings);\n\n $l_dao_mandator = new isys_component_dao_mandator($g_comp_database_system);\n $l_mandators = $l_dao_mandator->get_mandator();\n while ($l_row = $l_mandators->get_row())\n {\n $l_definition['Single Sign On']['session.sso.mandator-id']['options'][$l_row['isys_mandator__id']] = $l_row['isys_mandator__title'];\n }\n\n isys_component_template::instance()\n ->assign(\"bShowCommentary\", false)\n ->assign('tenantTab', _L('LC__SYSTEM_SETTINGS__TENANT', $g_comp_session->get_mandator_name()))\n ->assign('content_title', _L('LC__MODULE__SYSTEM_SETTINGS__TITLE'));\n\n if (isset($_GET['expert']))\n {\n $l_user_settings = isys_usersettings::get();\n\n $l_settingsCombined = [];\n foreach ($l_settings as $l_key => $l_value)\n {\n if (is_scalar($l_value))\n {\n $l_settingsCombined[self::SYSTEM_WIDE][$l_key] = $l_value;\n }\n }\n foreach ($l_tenant_settings as $l_key => $l_value)\n {\n if (is_scalar($l_value))\n {\n $l_settingsCombined[self::TENANT_WIDE][$l_key] = $l_value;\n }\n }\n foreach ($l_user_settings as $l_key => $l_value)\n {\n if (is_scalar($l_value))\n {\n $l_settingsCombined[self::USER][$l_key] = $l_value;\n }\n }\n\n isys_component_template::instance()\n ->assign('expertSettings', true)\n ->assign('content_title', _L('LC__SYSTEM_SETTINGS__EXPERT_SETTINGS'))\n ->assign('settings', $l_settingsCombined);\n\n $index_includes['contentbottomcontent'] = 'modules/system_settings/expert.tpl';\n }\n else\n {\n isys_component_template::instance()\n ->assign('systemWideKey', self::SYSTEM_WIDE)\n ->assign('tenantWideKey', self::TENANT_WIDE)\n ->assign('definition', $l_definition)\n ->assign('tenant_definition', $l_tenant_definition)\n ->assign('settings', $l_settings)\n ->assign('tenant_settings', $l_tenant_settings);\n\n $index_includes['contentbottomcontent'] = 'modules/system_settings/index.tpl';\n }\n\n return true;\n }", "public function save_settings($settings)\n {\n }", "protected function updateFormatterSettings($settings) {\n $edit = [];\n foreach ($settings as $key => $value) {\n $edit[\"fields[{$this->fieldName}][settings_edit_form][settings][$key]\"] = $value;\n }\n $this->drupalGet($this->manageDisplay);\n $this->find('input[name=\"' . $this->fieldName . '_settings_edit\"]')->click();\n $this->submitForm($edit, $this->fieldName . '_plugin_settings_update');\n $this->submitForm([], t('Save'));\n }", "function settings()\n\t{\n\t\tglobal $mybb, $db, $cache, $lang, $publisher;\n\n\t\t$this->settings = $publisher->settings[$this->service_name];\n\n\t\tif($mybb->request_method == 'post')\n\t\t{\n\t\t\tarray_walk($mybb->input['forums'], 'intval');\n\t\t\t$this->settings['enabled'] = $db->escape_string($mybb->input['enabled']);\n\t\t\t$this->settings['ckey'] = $db->escape_string($mybb->input['ckey']);\n\t\t\t$this->settings['csecret'] = $db->escape_string($mybb->input['csecret']);\n\t\t\t$this->settings['token'] = $db->escape_string($mybb->input['token']);\n\t\t\t$this->settings['tsecret'] = $db->escape_string($mybb->input['tsecret']);\n\t\t\t$this->settings['type'] = $db->escape_string($mybb->input['type']);\n\t\t\t$this->settings['icon'] = $db->escape_string(str_replace(\"\\\\\", \"/\", $mybb->input['icon']));\n\t\t\t$this->settings['tags'] = $db->escape_string($mybb->input['tags']);\n\t\t\t$this->settings['forums'] = $mybb->input['forums'];\n\n\t\t\t$publisher->save_settings($this->service_name, $this->settings);\n\n\t\t\tflash_message($this->lang['setting_success'], 'success');\n\t\t\tadmin_redirect(\"index.php?module=tools-mybbpublisher&service=\".$this->service_name);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//be sure form has params 4, 5 and 6 and the sixth is TRUE. this makes the form output to a capturable variable\n\t\t\t//then capture $form_container->end() and all the $form->function() lines into a variable\n\t\t\t$form = new Form(\"index.php?module=tools-mybbpublisher&amp;service=\".$this->service_name.\"&amp;action=settings\", \"post\", \"settings\", 0, \"\", true);\n\n\t\t\t$form_container = new FormContainer($this->lang['service_name'].\" \".$lang->mybbpublisher_settings);\n\n\t\t\t$row_options = array();\n\t\t\t$row_options[] = $form->generate_check_box(\"enabled\", 1, $this->lang['setting_enable_desc'], array(\"checked\" => $this->settings['enabled']));\n\t\t\t$form_container->output_row($this->lang['setting_enable'], '', '<div class=\"group_settings_bit\">'.implode('</div><div class=\"group_settings_bit\">', $row_options).'</div>');\n\n\t\t\t$posttypes['link'] = $this->lang['setting_type_link'];\n\t\t\t$posttypes['photo'] = $this->lang['setting_type_photo'];\n\n\t\t\t$form_container->output_row($this->lang['setting_type'], $this->lang['setting_type_desc'], $form->generate_select_box('type', $posttypes, $this->settings['type'], array('id' => 'type')), 'type');\n\n\t\t\t$form_container->output_row($this->lang['setting_tags'], $this->lang['setting_tags_desc'], $form->generate_text_box('tags', $this->settings['tags'], array('id' => 'tags')), 'tags');\n\n\t\t\t$form_container->output_row($this->lang['setting_ckey'], $this->lang['setting_ckey_desc'], $form->generate_text_box('ckey', $this->settings['ckey'], array('id' => 'ckey')), 'ckey');\n\t\t\t$form_container->output_row($this->lang['setting_csecret'], $this->lang['setting_csecret_desc'], $form->generate_text_box('csecret', $this->settings['csecret'], array('id' => 'csecret')), 'csecret');\n\t\t\t$form_container->output_row($this->lang['setting_token'], $this->lang['setting_token_desc'], $form->generate_text_box('token', $this->settings['token'], array('id' => 'token')), 'token');\n\t\t\t$form_container->output_row($this->lang['setting_tsecret'], $this->lang['setting_tsecret_desc'], $form->generate_text_box('tsecret', $this->settings['tsecret'], array('id' => 'tsecret')), 'tsecret');\n\t\t\t$form_container->output_row($this->lang['setting_icon'], $this->lang['setting_icon_desc'], $form->generate_text_box('icon', $this->settings['icon'], array('id' => 'icon')), 'icon');\n\t\t\t$form_container->output_row($this->lang['setting_forums'], $this->lang['setting_forums_desc'], $form->generate_forum_select('forums[]', $this->settings['forums'], array('multiple'=>1, 'size'=>'15')));\n\n\t\t\t//make sure you pass $returnable as TRUE\n\t\t\t$output .= $form_container->end(true);\n\n\t\t\t$buttons[] = $form->generate_submit_button($lang->mybbpublisher_save);\n\t\t\t$output .= $form->output_submit_wrapper($buttons);\n\n\t\t\t$output .= $form->end();\n\n\t\t\t//return the initial form opening tag and then the rest of the form\n\t\t\treturn $form->construct_return.$output;\n\t\t}\n\t}", "function putSettings($user_id, $settings) {\r\n\r\n // Loop through and collect data\r\n foreach ($settings as $key => $value) {\r\n\r\n $keys .= '\"' . $key . '\",';\r\n\r\n\t\t\t$pairs = Array(\r\n\t\t\t\t'user_id' => $user_id,\r\n\t\t\t\t'key' => $key,\r\n\t\t\t\t'value' => $value\r\n\t\t\t);\r\n\r\n $inserts[] = $this->formatInsert($this->config['Users']['Table_Settings'], $pairs);\r\n\r\n }\r\n\r\n // Kill the previous settings\r\n $keys = substr($keys, 0, -1);\r\n\r\n\t\t$where = sprintf('\r\n\t\t\t(user_id = %s)\r\n\t\t\tAND (key IN (%s))\r\n\t\t\t',\r\n\t\t\t$user_id,\r\n\t\t\t$keys\r\n\t\t);\r\n\r\n\t\t$this->deleteRows($this->config['Users']['Table_Settings'], $where, null);\r\n\r\n // Loop through and insert the new settings\r\n foreach ($inserts as $qry) {\r\n $this->query($qry);\r\n }\r\n\r\n }", "protected function mergeSettings($settings){\n\t\t\t$merged = array_shift($settings);\n\t\t\tforeach($settings as $setting){\n\t\t\t\tforeach($setting as $key => $value){\n\t\t\t\t\tif(isset($merged[$key], $merged[$key]['validates'])){\n\t\t\t\t\t\t$merged[$key]['value'] = Validator::{$merged[$key]['validates']}($value, $merged[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $merged;\n\t\t}", "static public function wpp_settings_save( $settings ) {\n global $wp_properties;\n\n if( !empty( $wp_properties['configuration']['feature_settings']['facebook_tabs']['canvases'] ) ) {\n $settings['configuration']['feature_settings']['facebook_tabs']['canvases'] = $wp_properties['configuration']['feature_settings']['facebook_tabs']['canvases'];\n } else {\n $settings['configuration']['feature_settings']['facebook_tabs']['canvases'] = array();\n }\n\n return $settings;\n }", "private function maybe_update_settings() {\n\t\tif ( isset( $_POST['searchwp_related_nonce'] ) && ! wp_verify_nonce( $_POST['searchwp_related_nonce'], 'searchwp_related_settings' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $_POST['searchwp_related'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$settings = $_POST['searchwp_related'];\n\n\t\t$this->settings = $this->validate( $settings );\n\n\t\tupdate_option( 'searchwp_related', $settings );\n\t}", "public function set(array $settings = []);", "public function store_settings() {\n\n\t\t// make sure we have our settings item\n\t\tif ( empty( $_POST['rafco-options'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// verify our nonce\n\t\tif ( ! isset( $_POST['rafco_settings_save'] ) || ! wp_verify_nonce( $_POST['rafco_settings_save'], 'rafco_settings_save_nonce' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// cast our options as a variable\n\t\t$data = (array) $_POST['rafco-options'];\n\n\t\t// set an empty\n\t\t$store = array();\n\n\t\t// check and sanitize the URL\n\t\tif ( ! empty( $data['url'] ) ) {\n\t\t\t$store['url'] = esc_url( RAFCOCreator_Helper::strip_trailing_slash( $data['url'] ) );\n\t\t}\n\n\t\t// check and sanitize the API key\n\t\tif ( ! empty( $data['api'] ) ) {\n\t\t\t$store['api'] = sanitize_text_field( $data['api'] );\n\t\t}\n\n\t\t// check the boolean for autosave\n\t\tif ( ! empty( $data['sav'] ) ) {\n\t\t\t$store['sav'] = true;\n\t\t}\n\n\t\t// check the boolean for scheduled\n\t\tif ( ! empty( $data['sch'] ) ) {\n\t\t\t$store['sch'] = true;\n\t\t}\n\n\t\t// check the boolean for shortlink\n\t\tif ( ! empty( $data['sht'] ) ) {\n\t\t\t$store['sht'] = true;\n\t\t}\n\n\t\t// check the boolean for using CPTs\n\t\tif ( ! empty( $data['cpt'] ) ) {\n\t\t\t$store['cpt'] = true;\n\t\t}\n\n\t\t// check the each possible CPT\n\t\tif ( ! empty( $data['cpt'] ) && ! empty( $data['typ'] ) ) {\n\t\t\t$store['typ'] = RAFCOCreator_Helper::sanitize_array_text( $data['typ'] );\n\t\t}\n\n\t\t// filter it\n\t\t$store = array_filter( $store );\n\n\t\t// pass it\n\t\tself::save_redirect_settings( $store );\n\t}", "public function setSettings(array $settings);", "public function setSettings(array $settings);", "public function a2020_save_settings(){\n\t\t\n\t\tif (defined('DOING_AJAX') && DOING_AJAX && check_ajax_referer('admin2020-settings-security-nonce', 'security') > 0) {\n\t\t\t\n\t\t\t$options = $this->utils->clean_ajax_input($_POST['options']);\n\t\t\t$network = $this->utils->clean_ajax_input($_POST['network']);\n\t\t\t\n\t\t\tif($network === 'true'){\n\t\t\t\t$a2020_options = get_option( 'admin2020_settings_network');\n\t\t\t} else {\n\t\t\t\t$a2020_options = get_option( 'admin2020_settings');\n\t\t\t}\n\t\t\t\n\t\t\tif($options == \"\" || !is_array($options)){\n\t\t\t\t$message = __(\"No options supplied to save\",'admin2020');\n\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\tforeach($options as $option){\n\t\t\t\tif(!is_array($option)){\n\t\t\t\t\t$option = $this->utils->clean_ajax_input($option);\n\t\t\t\t}\n\t\t\t\t$module_name = $option[0];\n\t\t\t\t$option_name = $option[1];\n\t\t\t\t$value = $option[2];\n\t\t\t\t$a2020_options['modules'][$module_name][$option_name] = $value;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($a2020_options)){\n\t\t\t\tif($network === 'true'){\n\t\t\t\t\tupdate_option( 'admin2020_settings_network', $a2020_options);\n\t\t\t\t} else {\n\t\t\t\t\tupdate_option( 'admin2020_settings', $a2020_options);\n\t\t\t\t}\n\t\t\t\t$returndata = array();\n\t\t\t\t$returndata['success'] = true;\n\t\t\t\t$returndata['message'] = __('Settings saved. You may need to refresh for changes to take effect.','admin2020');\n\t\t\t\techo json_encode($returndata);\n\t\t\t} else {\n\t\t\t\t$message = __(\"Something went wrong\",'admin2020');\n\t\t\t\techo $this->utils->ajax_error_message($message);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tdie();\n\t\t\t\n\t\t\t\n\t\t}\n\t\tdie();\t\n\t\t\n\t}", "function settings($settings) {\n\t\tinclude \"settings.php\";\n\t\t\n\t\t# Creer het settings object\n\t\t$settings = SpotSettings::singleton($this->_db, $settings);\n\t\t$spotSettingsUpgrader = new SpotSettingsUpgrader($this->_db, $settings);\n\t\t$spotSettingsUpgrader->update();\n\t}", "protected function saveSettings(array $settings) {\n\t\t$data = file_put_contents($this->filePath, serialize($settings));\n\t}", "public function set_save_settings(){\n\t\t\n\t\t// Check if sanity function exits, otherwise do nothing\n\t\tif ( method_exists( $this , 'get_clean_settings' ) ){\n\t\t\n\t\t\t$fields = $this->get_fields();\n\t\t\t\n\t\t\t$settings = array();\n\t\t\t\n\t\t\t// Loop through each field and check for value\n\t\t\tforeach( $fields as $key => $default_value ){\n\t\t\t\t\n\t\t\t\tif ( isset( $_POST[ $key ] ) ){\n\t\t\t\t\t\n\t\t\t\t\t$settings[ $key ] = $_POST[ $key ];\n\t\t\t\t\t\n\t\t\t\t} // end if\n\t\t\t\t\n\t\t\t} // end foreach\n\t\t\t\n\t\t\t$this->settings = $this->get_clean_settings( $settings ); \n\t\t\t\n\t\t} // end if\n\t\t\n\t}", "function bb2_write_settings($settings) {\n\t$query = \"REPLACE INTO \".$GLOBALS['prefix'].\"lb_settings (name,value) VALUES ('bb2_display_stats', '\".$settings['display_stats'].\"')\";\n\t$GLOBALS['lbdata']->Execute($query);\n\t\n\t$query = \"REPLACE INTO \".$GLOBALS['prefix'].\"lb_settings (name,value) VALUES ('bb2_verbose', '\".$settings['verbose'].\"')\";\n\t$GLOBALS['lbdata']->Execute($query);\n\n\t$query = \"REPLACE INTO \".$GLOBALS['prefix'].\"lb_settings (name,value) VALUES ('bb2_strict', '\".$settings['strict'].\"')\";\n\t$GLOBALS['lbdata']->Execute($query);\n\t\n\t$query = \"REPLACE INTO \".$GLOBALS['prefix'].\"lb_settings (name,value) VALUES ('bb2_installed', '\".$settings['is_installed'].\"')\";\n\t$GLOBALS['lbdata']->Execute($query);\n}", "function save_settings()\n\t{\n\t if (empty($_POST))\n\t {\n\t show_error($this->EE->lang->line('unauthorized_access'));\n\t }\n\n\t unset($_POST['submit']);\n\n\t $this->EE->lang->loadfile('bugherd');\n\n\t $len = $this->EE->input->post('api_key');\n\n\t $this->EE->db->where('class', __CLASS__);\n\t $this->EE->db->update('extensions', array('settings' => serialize($_POST)));\n\n\t $this->EE->session->set_flashdata(\n\t 'message_success',\n\t $this->EE->lang->line('preferences_updated')\n\t );\n\t}", "public function update_plugin_settings( $settings ) {\r\n\t\t$modes = array( 'live', 'test' );\r\n\t\tforeach ( $modes as $mode ) {\r\n\t\t\tif ( rgempty( \"{$mode}_auth_token\", $settings ) ) {\r\n\t\t\t\t$auth_token = $this->get_plugin_setting( \"{$mode}_auth_token\" );\r\n\r\n\t\t\t\tif ( ! empty( $auth_token ) ) {\r\n\t\t\t\t\t$settings[ \"{$mode}_auth_token\" ] = $auth_token;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tparent::update_plugin_settings( $settings );\r\n\t}", "public function settings_screen_logic () {\n\t\tif ( ! empty( $_POST ) && check_admin_referer( $this->_field_obj->__get( 'token' ) . '_nonce', $this->_field_obj->__get( 'token' ) . '_nonce' ) ) {\n\t\t\t$data = $_POST;\n\n\t\t\t$data = array_map( 'stripslashes_deep', $data );\n\n\t\t\t$page = 'woothemes';\n\t\t\tif ( isset( $data['page'] ) ) {\n\t\t\t\t$page = $data['page'];\n\t\t\t\tunset( $data['page'] );\n\t\t\t}\n\n\t\t\t$tab = '';\n\t\t\tif ( isset( $data['tab'] ) ) {\n\t\t\t\t$tab = $data['tab'];\n\t\t\t\tunset( $data['tab'] );\n\t\t\t}\n\n\t\t\t$data = $this->_field_obj->validate_fields( $data, $tab );\n\n\t\t\tdo_action_ref_array( 'wf_settings_save_before', $data, $this );\n\n\t\t\t$options_collection = (array)get_option( 'woo_options', array() );\n\n\t\t\t$update_tracker = array();\n\n\t\t\tif ( 0 < count( $data ) ) {\n\t\t\t\tforeach ( $data as $k => $v ) {\n\t\t\t\t\t// Skip over the theme option if it's one of a selection of fields allowing unfiltered HTML, and the user can't edit it.\n\t\t\t\t\tif ( ! current_user_can( 'unfiltered_html' ) && in_array( $k, woo_disabled_if_not_unfiltered_html_option_keys() ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Handle the saving of the setting.\n\t\t\t\t\tif ( true == apply_filters( 'wf_use_theme_mods', false ) ) {\n\t\t\t\t\t\t$update_tracker[$k] = set_theme_mod( esc_attr( $k ), $v );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$update_tracker[$k] = update_option( esc_attr( $k ), $v );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the options collection, in case any products still use it.\n\t\t\t\t\t$options_collection[$k] = $v;\n\t\t\t\t}\n\n\t\t\t\t// Update the options collection in the database.\n\t\t\t\tupdate_option( 'woo_options', $options_collection );\n\t\t\t}\n\n\t\t\tdo_action_ref_array( 'wf_settings_save_after', $data, $this );\n\n\t\t\t// Store the status of the updates, so we can report back.\n\t\t\tset_transient( $this->_field_obj->__get( 'token' ) . 'update_tracker', $update_tracker, 5 );\n\n\t\t\t$update_status = true;\n\t\t\tif ( 0 < count( $update_tracker ) ) {\n\t\t\t\tforeach ( $update_tracker as $k => $v ) {\n\t\t\t\t\tif ( false === $v ) {\n\t\t\t\t\t\t$update_status = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Redirect on settings save, and exit.\n\t\t\t$url = add_query_arg( 'page', $page );\n\t\t\tif ( '' != $tab ) {\n\t\t\t\t$url = add_query_arg( 'tab', $tab, $url );\n\t\t\t}\n\t\t\t$url = add_query_arg( 'updated', 'true', $url );\n\n\t\t\t/*if ( false === $update_status ) {\n\t\t\t\t$url = add_query_arg( 'some_didnt_update', 'true', $url );\n\t\t\t}*/\n\n\t\t\twp_safe_redirect( esc_url_raw( $url ) );\n\t\t\texit;\n\t\t}\n\t}", "public function ajaxProcessSaveSettings()\n {\n header('Content-Type: application/json; charset=utf-8');\n $settings = json_decode(file_get_contents('php://input'), true);\n\n // Figure out which setting keys are available (constants from the main class)\n /** @var ReflectionClass $reflect */\n $reflect = new ReflectionClass($this);\n $consts = $reflect->getConstants();\n foreach ($settings as $setting => $value) {\n if (in_array($setting, $consts)) {\n if ($setting === static::METAS) {\n Meta::saveMetas($value);\n continue;\n } elseif ($setting == static::STOP_WORDS) {\n try {\n Configuration::updateValue($setting, $value);\n } catch (\\PrestaShopException $e) {\n \\Logger::addLog(\"Elasticsearch module error: {$e->getMessage()}\");\n }\n\n continue;\n } elseif ($setting == static::SERVERS) {\n if ($settings[static::PROXY]) {\n foreach ($value as &$server) {\n $server['read'] = 1;\n $server['write'] = 1;\n }\n }\n $value = json_encode($value);\n } elseif (is_array($value)) {\n $value = json_encode($value);\n }\n\n try {\n Configuration::updateValue($setting, $value);\n } catch (\\PrestaShopException $e) {\n \\Logger::addLog(\"Elasticsearch module error: {$e->getMessage()}\");\n }\n }\n }\n\n try {\n Configuration::updateValue(Tb2vuestorefront::CONFIG_UPDATED, true);\n } catch (\\PrestaShopException $e) {\n \\Logger::addLog(\"Elasticsearch module error: {$e->getMessage()}\");\n }\n\n // Response status\n die(json_encode([\n 'success' => true,\n 'indexed' => 0,\n 'total' => (int) IndexStatus::countObjects(null, $this->context->shop->id),\n ]));\n }", "protected function storeSettings(SettingRequest $request)\n {\n\n try {\n\n $settings = Setting::get();\n if ($settings->isEmpty()) {\n\n if ($request->hasFile('site_icon')) {\n $site_icon = $request->file('site_icon')->store('settings');\n }\n if ($request->hasFile('site_logo')) {\n $site_logo = $request->file('site_logo')->store('settings');\n }\n\n\n Setting::create([\n 'site_name_ar' => $request->site_name_ar,\n 'site_name_en' => $request->site_name_en,\n 'site_email' => $request->site_email,\n 'site_gmail' => $request->site_gmail,\n 'site_facebook' => $request->site_facebook,\n 'site_twitter' => $request->site_twitter,\n 'site_youtube' => $request->site_youtube,\n 'site_instagram' => $request->site_instagram,\n 'site_linkedin' => $request->site_linkedin,\n 'site_phone' => $request->site_phone,\n 'site_mobile' => $request->site_mobile,\n 'site_status' => $request->site_status,\n 'site_language' => $request->site_language,\n 'site_description_ar' => $request->site_description_ar,\n 'site_description_en' => $request->site_description_en,\n 'site_keywords_ar' => $request->site_keywords_ar,\n 'site_keywords_en' => $request->site_keywords_en,\n 'site_address_ar' => $request->site_address_ar,\n 'site_address_en' => $request->site_address_en,\n 'site_icon' => $site_icon,\n 'site_logo' => '',\n ]);\n return $this->returnSuccessMessage(trans('general.add_success_message'));\n\n\n /////////////////////////////////////////////////////////////////////////////////////\n /// Update Settings\n } else {\n\n $settings = Setting::orderBy('id', 'desc')->first();\n //////////////////////////////////////////////////////\n /// check and upload icon and logo\n\n /// Icon\n if ($request->hasFile('site_icon')) {\n if (!empty($settings->site_icon)) {\n Storage::delete($settings->site_icon);\n $site_icon = $request->file('site_icon')->store('settings');\n } else {\n $site_icon = $request->file('site_icon')->store('settings');\n }\n } else {\n $site_icon = $settings->site_icon;\n }\n\n /// logo\n if ($request->has('site_logo')) {\n if (!empty($settings->site_logo)) {\n Storage::delete($settings->site_logo);\n $site_logo = $request->file('site_logo')->store('settings');\n } else {\n $site_logo = $request->file('site_logo')->store('settings');\n }\n } else {\n $site_logo = $settings->site_logo;\n }\n\n\n $settings->update([\n 'site_name_ar' => $request->site_name_ar,\n 'site_name_en' => $request->site_name_en,\n 'site_email' => $request->site_email,\n 'site_gmail' => $request->site_gmail,\n 'site_facebook' => $request->site_facebook,\n 'site_twitter' => $request->site_twitter,\n 'site_youtube' => $request->site_youtube,\n 'site_instagram' => $request->site_instagram,\n 'site_linkedin' => $request->site_linkedin,\n 'site_phone' => $request->site_phone,\n 'site_mobile' => $request->site_mobile,\n 'site_status' => $request->site_status,\n 'site_language' => $request->site_language,\n 'site_description_ar' => $request->site_description_ar,\n 'site_description_en' => $request->site_description_en,\n 'site_keywords_ar' => $request->site_keywords_ar,\n 'site_keywords_en' => $request->site_keywords_en,\n 'site_address_ar' => $request->site_address_ar,\n 'site_address_en' => $request->site_address_en,\n 'site_icon' => $site_icon,\n 'site_logo' => $site_logo,\n ]);\n\n return $this->returnSuccessMessage(trans('general.update_success_message'));\n }\n\n\n } catch (\\Exception $exception) {\n\n return $this->returnError(trans('general.try_catch_error_message'), '500');\n }\n\n\n }", "public function saveGlobalSettings($settings)\n {\n if (!$settings['accessToken']) {\n $integrationSettings = [\n 'accessToken' => '',\n 'status' => false\n ];\n // Update the details with access token\n update_option($this->optionKey, $integrationSettings, 'no');\n wp_send_json_success([\n 'message' => __('Your settings has been updated', 'fluentformpro'),\n 'status' => false,\n 'require_load' => true\n ], 200);\n }\n\n try {\n $settings['status'] = false;\n update_option($this->optionKey, $settings, 'no');\n $api = new API($settings['accessToken']);\n $auth = $api->auth_test();\n \n if (!$auth[0]['error_key']) {\n $settings['status'] = true;\n update_option($this->optionKey, $settings, 'no');\n return wp_send_json_success([\n 'status' => true,\n 'message' => __('Your settings has been updated!', 'fluentformpro')\n ], 200);\n }\n throw new \\Exception('Invalid Credentials', 400);\n\n } catch (\\Exception $e) { \n wp_send_json_error([\n 'status' => false,\n 'message' => $e->getMessage()\n ], $e->getCode());\n }\n }", "function save_settings()\n\t{\n\t\tglobal $DB, $REGX;\n\t\t\n\t\t// Initialise the settings array.\n\t\t$this->settings = array(\n\t\t\t'update_check'\t=> isset($_POST['update_check']) ? $_POST['update_check'] : ''\n\t\t\t);\n\t\t\n\t\t// Serialise the settings, and save them to the database.\n\t\t$sql = \"UPDATE exp_extensions SET settings = '\" . addslashes(serialize($this->settings)) . \"' WHERE class = '\" . get_class($this) . \"'\";\n\t\t$DB->query($sql);\n\t}", "function fn_mobile_app_update_settings($setting_id, array $settings)\n{\n $setting_id = (int) $setting_id;\n \n // Get addon settings before its updated\n $current_colors = fn_mobile_app_get_mobile_app_settings();\n $current_colors = $current_colors['app_appearance']['colors'];\n\n // Merge structure from setting with structure from form\n foreach ($current_colors as $category => $variables) {\n $category_colors = &$settings['app_appearance']['colors'][$category];\n\n foreach ($variables as $variable_name => $values) {\n $values['value'] = $category_colors[$variable_name];\n $category_colors[$variable_name] = $values;\n }\n }\n\n if ($setting_id) {\n $settings = json_encode((array) $settings);\n Settings::instance()->updateValueById((int) $setting_id, $settings);\n }\n}", "function save_settings()\n\t{\n\n\t\tif (empty($_POST))\n\t\t{\n\t\t\tshow_error($this->EE->lang->line('unauthorized_access'));\n\t\t}\n\n\t\tunset($_POST['submit']);\n\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->update('extensions', array('settings' => serialize($_POST)));\n\n\t\t$this->EE->session->set_flashdata(\n\t\t\t'message_success',\n\t\t\t$this->EE->lang->line('preferences_updated')\n\t\t);\n\n\t}", "protected function update_settings( $settings ) {\n foreach ( $this->settings as $name => &$value ) {\n // Obtain the list of enumerable options.\n $enumerable = $this->enumerable( $name );\n $setting = array_key_exists( $name, $settings )\n // Extra validation when value needs to be a select dropdown.\n && ( ! $enumerable || array_key_exists( $value, $enumerable ) )\n ? $settings[ $name ] : $value; // Keep default value\n switch ( gettype( $value ) ) {\n case 'bool' :\n case 'boolean':\n $value = (bool) $setting;\n break;\n case 'string' :\n $value = (string)$setting;\n break;\n case 'integer':\n $value = (int) $setting;\n break;\n case 'double' :\n case 'float' :\n $value = (float) $setting;\n break;\n case 'array' :\n $value = (array) $setting;\n break;\n case 'null' :\n case 'object' :\n $value = $setting;\n default:\n // Ignore Resources, and other unknown types.\n }\n }\n }", "public function import($settings)\n\t{\n\t\t$this->settings = array_merge($this->settings, $settings);\n\t}", "function save_settings() {\n if (empty($this->settings)) {\n return TRUE;\n }\n\n // As db_merge will be supported multiple values in drupal 8,\n // we need to delete all old settings before inserting new values.\n // By using db_insert multiple values method, I don't sure if it\n // increase preformance or not. (May be this help when values to\n // save is more than 100)\n // TODO: revise the method again.\n $txn = db_transaction();\n try {\n // Clear all old values.\n db_delete('sf_settings')\n ->condition('feature', $this->name)\n ->execute();\n\n // Begin insertion.\n $query = db_insert('sf_settings')->fields(array('feature', 'name', 'value'));\n foreach ($this->settings as $name => $value) {\n $query->values(array(\n 'feature' => $this->name,\n 'name' => $name,\n 'value' => $value,\n ));\n }\n $query->execute();\n return TRUE;\n }\n catch (Exception $e) {\n $txn->rollback();\n return FALSE;\n }\n }", "public function update_settings() {\n\n $this->system_settings_model->save( $_POST, 1 );\n\n // Send back a simple JSON response to confirm.\n $array[] = array( 'type' => 'System settings updated' );\n $this->json_library->print_array_json( $array );\n }", "public function setAll(array $settings)\n {\n foreach ($settings as $name => $value) {\n if (is_string($name) && $this->exists($name)) { // avoid the logic exception\n $this->set($name, $value);\n }\n }\n }", "protected function save_settings() {\n return update_option( 'plugin_settings_' . static::className(), $this->settings );\n }", "public function saveSettings()\n\t{\n\t\tcheck_admin_referer( 'FM_save_settings' );\n\n\t\t$this->settings->setSetting( isset( $_POST['FM_facebook'] ) ? true : false, 'SocialNetwork', 'facebook', 'enabled' );\n\t\t$this->settings->setSetting( htmlspecialchars( $_POST['FM_fb_appid'] ), 'SocialNetwork', 'facebook', 'appId' );\n\t\t$this->settings->setSetting( htmlspecialchars( $_POST['FM_fb_appsecret'] ), 'SocialNetwork', 'facebook', 'appSecret' );\n\t\t$this->settings->setSetting( isset( $_POST['FM_logger'] ) ? true : false, 'Logger', 'enabled' );\n\n\t\t$vehicleInfo = (new Vehicle(0))->getArrayInfos();\n\n\t\tforeach( $vehicleInfo as $info )\n\t\t\t$this->settings->setSetting( isset( $_POST[$info['id']] ) ? true : false, 'VehiclePostType', 'display', $info['id'] );\n\n\t\twp_redirect( admin_url( \"options-general.php?page=fleetmanager_settings_page\" ) );\n\t}", "public function set(array $settings = array());", "public function save_settings($settings) {\n\t\n\t\tif (false === ($updraftplus_admin = $this->_load_ud_admin()) || false === ($updraftplus = $this->_load_ud())) return new WP_Error('no_updraftplus');// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable\n\t\t\n\t\tif (!UpdraftPlus_Options::user_can_manage()) return new WP_Error('updraftplus_permission_denied');\n\n\t\tif (!empty($settings)) {\n\n\t\t\tif (is_string($settings)) {\n\t\t\t\tparse_str($settings, $settings_as_array);\n\t\t\t} elseif (is_array($settings)) {\n\t\t\t\t$settings_as_array = $settings;\n\t\t\t} else {\n\t\t\t\treturn new WP_Error('invalid_settings');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$results = $updraftplus_admin->save_settings($settings_as_array);\n\n\t\treturn $results;\n\t\n\t}", "public function save_settings() {\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "static public function populateSettings()\n {\n $cache = self::buildCache('settings_array');\n \n $settings = unserialize($cache->get('settings_array'));\n foreach ($settings as $key => $setting)\n {\n sfConfig::set($key, $setting);\n }\n }", "public function saveSettings()\n {\n $req = _obj($_REQUEST);\n\n if (isset($req->action)){\n switch($req->page)\n {\n case $this->slug . '-settings':\n /** tab section, within settings page */\n switch($req->action){\n case 'mc-wallet-settings':\n $this->_saveGeneralOptions();\n break;\n case 'mc-wallet-bank':\n case '-1':\n $this->_saveBankOptions();\n break;\n }\n break;\n case $this->slug:\n default:\n /** tab section, within main page */\n switch ($req->action):\n case 'mc-wallet-penalty':\n $this->_processPenalty();\n break;\n case 'mc-wallet-deposit':\n $this->_saveDeposit();\n break;\n case 'mc-wallet-list':\n default:\n break;\n endswitch;\n break;\n }\n }\n }", "public function sendexAdminSettingsSave()\n {\n register_setting(\n $this->pluginName,\n $this->pluginName,\n [$this, \"pluginOptionsValidate\"]\n );\n add_settings_section(\n \"sendex_main\",\n \"Main Settings\",\n [$this, \"sendexSectionText\"],\n \"sendex-settings-page\"\n );\n add_settings_field(\n \"api_sid\",\n \"API SID\",\n [$this, \"sendexSettingSid\"],\n \"sendex-settings-page\",\n \"sendex_main\"\n );\n add_settings_field(\n \"api_auth_token\",\n \"API AUTH TOKEN\",\n [$this, \"sendexSettingToken\"],\n \"sendex-settings-page\",\n \"sendex_main\"\n );\n }", "public function save( )\n\t{\n\t\tcall(__METHOD__);\n\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM `\".self::SETTINGS_TABLE.\"`\n\t\t\tORDER BY `sort`\n\t\t\";\n\t\t$results = $this->_mysql->fetch_array($query);\n\n\t\t$data = [];\n\t\t$settings = $this->_settings;\n\t\tforeach ($results as $result) {\n\t\t\tif (isset($settings[$result['setting']])) {\n\t\t\t\tif ($result['value'] != $settings[$result['setting']]) {\n\t\t\t\t\t$result['value'] = $settings[$result['setting']];\n\t\t\t\t\t$data[] = $result;\n\t\t\t\t}\n\n\t\t\t\tunset($settings[$result['setting']]);\n\t\t\t}\n\t\t\telseif ($this->_delete_missing) {\n\t\t\t\t$this->_mysql->delete(self::SETTINGS_TABLE, \" WHERE setting = {$result['setting']} \");\n\t\t\t}\n\t\t}\n\n\t\tif ($this->_save_new) {\n\t\t\tforeach ($settings as $setting => $value) {\n\t\t\t\t$addition['setting'] = $setting;\n\t\t\t\t$addition['value'] = $value;\n\t\t\t\t$data[] = $addition;\n\t\t\t}\n\t\t}\n\n\t\t$this->_mysql->multi_insert(self::SETTINGS_TABLE, $data, true);\n\t}", "public function addSettings(array $settings)\n {\n foreach ($settings as $key => $value) {\n $this->addSetting($key, $value);\n }\n }", "public function merge($settings) {\r\n\t foreach($settings as $k => $v) {\r\n\t if(is_array($v)) {\r\n\t if(!isset($this->contents[$k])) {\r\n\t $this->contents[$k] = $v;\r\n\t } else {\r\n\t $this->contents[$k] = $this->merge($this->contents[$k], $v);\r\n\t }\r\n\t } else {\r\n\t $this->contents[$k] = $v;\r\n\t }\r\n\t }\r\n\t return $this;\r\n\t}", "protected function save()\n\t{\n\t\tif(!current_user_can(\"administrator\"))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif(isset($_REQUEST))\n\t\t{\n\t\t\tif(isset($_REQUEST[\"save_nonce\"]))\n\t\t\t{\n\t\t\t\tif(wp_verify_nonce($_REQUEST[\"save_nonce\"],__FILE__))\n\t\t\t\t{\n\t\t\t\t\t/*\n\t\t\t\t\t\tLoop through all settings and check if they're present in $_REQUEST array, if so, update them\n\t\t\t\t\t*/\n\t\t\t\t\tforeach($this->settings as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$name = $field[\"name\"];\n\t\t\t\t\t\tif(isset($_REQUEST[$name]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(is_array($_REQUEST[$name]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_REQUEST[$name] = json_encode($_REQUEST[$name]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$setting = sanitize_text_field($_REQUEST[$name]);\n\t\t\t\t\t\t\tupdate_option($name,$setting);\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<br>\n\t\t\t\t\t<div class=\"notice notice-success is-dismissible\">\n\t\t\t\t <p> <strong><?php echo __(\"Success\").\"!\";?></strong>\n\t\t <?php echo __(\"Settings\") . \" \".__(\"saved\"). \".\";?>\n\t\t \t</p>\n\t\t\t\t </div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function setSettings(array $settings): void {}", "function save_settings()\n\t{\n\t if (empty($_POST))\n\t {\n\t show_error($this->EE->lang->line('unauthorized_access'));\n\t }\n\n\t unset($_POST['submit']);\n\n\t $this->EE->lang->loadfile('sh_member_variables');\n\n\t /*\n\t $len = $this->EE->input->post('max_link_length');\n\n\t if ( ! is_numeric($len) OR $len <= 0)\n\t {\n\t $this->EE->session->set_flashdata(\n\t 'message_failure',\n\t sprintf($this->EE->lang->line('max_link_length_range'),\n\t $len)\n\t );\n\t $this->EE->functions->redirect(\n\t BASE.AMP.'C=addons_extensions'.AMP.'M=extension_settings'.AMP.'file=sh_member_variables'\n\t );\n\t }\n\t */\n\n\t $this->EE->db->where('class', __CLASS__);\n\t $this->EE->db->update('extensions', array('settings' => serialize($_POST)));\n\n\t $this->EE->session->set_flashdata(\n\t 'message_success',\n\t $this->EE->lang->line('preferences_updated')\n\t );\n\n\t // back to the settings page\n\t $this->EE->functions->redirect(BASE.AMP.'C=addons_extensions'.AMP.'M=extension_settings'.AMP.'file=sh_member_variables');\n\t}", "function SaveSettings($settings) {\n\t$set2 = array();\n\tforeach ($settings as $key => $sopt)\n\t{\n\t\tif (count($settings[$key]) > 1)\n\t\t{\n\t\t\t$multi = '';\n\t\t\tforeach ($settings[$key] as $name => $check)\n\t\t\t$multi .= \"$name:$check:\";\n\n\t\t\t$multi = substr($multi, 0, -1); //rip the last : off\n\t\t\t$set2[] = \"$key:LIST:$multi\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$set2[] = \"$key:$sopt\";\n\t\t}\n\t}\n\tfile_put_contents($_SESSION['base_path'] . F('settings.txt'),implode(';', $set2));\n}", "function settings()\n {\n if($this->input->input_stream('data')){\n if ($this->session->userdata['group']==1) {\n $data = $this->input->post('data');\n if(isset($data[\"options\"])){\n foreach($data[\"options\"] as $key=>$value){\n if($this->Nodcms_admin_model->check_setting_options($key)){\n $this->Nodcms_admin_model->edit_setting_options($key,$value);\n }else{\n $this->Nodcms_admin_model->insert_setting_options($key,$value);\n }\n }\n unset($data[\"options\"]);\n }\n $this->Nodcms_admin_model->edit_setting($data);\n $this->session->set_flashdata('success', _l(\"Your Setting has been updated successfully!\",$this));\n }else{\n $this->session->set_flashdata('error', _l(\"Unfortunately you do not have permission to this part of system.\",$this));\n }\n redirect(APPOINTMENT_ADMIN_URL.'settings');\n }\n $data_options = array();\n $setting_options = $this->Nodcms_admin_model->get_all_setting_options();\n foreach($setting_options as $value){\n $data_options[$value[\"language_id\"]] = $value;\n }\n $this->data[\"currency_format\"] = array(\n array(\"code\"=>\"1.234,56\"),\n array(\"code\"=>\"1.234\"),\n array(\"code\"=>\"1,234.56\"),\n array(\"code\"=>\"1,234\"),\n );\n $this->data['options'] = $data_options;\n $this->data['languages'] = $this->Nodcms_admin_model->get_all_language();\n $this->data['title'] = _l('Settings',$this);\n $this->data['sub_title'] = _l('Appointments settings',$this);\n $this->data['breadcrumb'] = array(array('title'=>$this->data['title']),array('title'=>$this->data['sub_title']));\n $this->data['content']=$this->load->view($this->mainTemplate.'/appointment/settings',$this->data,TRUE);\n $this->data['page'] = \"appointment_setting\";\n $this->loadView();\n }", "public function updateSettings(){\n $settings = $_POST;\n // Process all settings.\n foreach ($settings as $key => $value) {\n // Set query\n $this->db->query('UPDATE settings SET value = :value WHERE name = :name AND userId = :userId');\n // Bind values.\n $this->db->bind(':value', $value);\n $this->db->bind(':name', $key);\n $this->db->bind(':userId', $_SESSION['userId']);\n\n $this->db->execute();\n }\n return TRUE;\n }", "public function sanitize_settings( $settings ){\n if ( ! $this->trp_query ) {\n $trp = TRP_Translate_Press::get_trp_instance();\n $this->trp_query = $trp->get_component( 'query' );\n }\n if ( ! $this->trp_languages ){\n $trp = TRP_Translate_Press::get_trp_instance();\n $this->trp_languages = $trp->get_component( 'languages' );\n }\n if ( !isset ( $settings['default-language'] ) ) {\n $settings['default-language'] = 'en_US';\n }\n if ( !isset ( $settings['translation-languages'] ) ){\n $settings['translation-languages'] = array();\n }\n if ( !isset ( $settings['publish-languages'] ) ){\n $settings['publish-languages'] = array();\n }\n\n $settings['translation-languages'] = array_filter( array_unique( $settings['translation-languages'] ) );\n $settings['publish-languages'] = array_filter( array_unique( $settings['publish-languages'] ) );\n\n if ( ! in_array( $settings['default-language'], $settings['translation-languages'] ) ){\n array_unshift( $settings['translation-languages'], $settings['default-language'] );\n }\n if ( ! in_array( $settings['default-language'], $settings['publish-languages'] ) ){\n array_unshift( $settings['publish-languages'], $settings['default-language'] );\n }\n\n if( !empty( $settings['native_or_english_name'] ) )\n $settings['native_or_english_name'] = sanitize_text_field( $settings['native_or_english_name'] );\n else\n $settings['native_or_english_name'] = 'english_name';\n\n if( !empty( $settings['add-subdirectory-to-default-language'] ) )\n $settings['add-subdirectory-to-default-language'] = sanitize_text_field( $settings['add-subdirectory-to-default-language'] );\n else\n $settings['add-subdirectory-to-default-language'] = 'no';\n\n if( !empty( $settings['force-language-to-custom-links'] ) )\n $settings['force-language-to-custom-links'] = sanitize_text_field( $settings['force-language-to-custom-links'] );\n else\n $settings['force-language-to-custom-links'] = 'no';\n\n\n if ( !empty( $settings['trp-ls-floater'] ) ){\n $settings['trp-ls-floater'] = sanitize_text_field( $settings['trp-ls-floater'] );\n }else{\n $settings['trp-ls-floater'] = 'no';\n }\n\n $language_switcher_options = $this->get_language_switcher_options();\n if ( ! isset( $language_switcher_options[ $settings['shortcode-options'] ] ) ){\n $settings['shortcode-options'] = 'flags-full-names';\n }\n if ( ! isset( $language_switcher_options[ $settings['menu-options'] ] ) ){\n $settings['menu-options'] = 'flags-full-names';\n }\n if ( ! isset( $language_switcher_options[ $settings['floater-options'] ] ) ){\n $settings['floater-options'] = 'flags-full-names';\n }\n\n if ( ! isset( $settings['floater-position'] ) ){\n $settings['floater-position'] = 'bottom-right';\n }\n\n if ( ! isset( $settings['url-slugs'] ) ){\n $settings['url-slugs'] = $this->trp_languages->get_iso_codes( $settings['translation-languages'] );\n }\n\n foreach( $settings['translation-languages'] as $language_code ){\n if ( empty ( $settings['url-slugs'][$language_code] ) ){\n $settings['url-slugs'][$language_code] = $language_code;\n }else{\n $settings['url-slugs'][$language_code] = sanitize_title( strtolower( $settings['url-slugs'][$language_code] )) ;\n }\n }\n\n // check for duplicates in url slugs\n $duplicate_exists = false;\n foreach( $settings['url-slugs'] as $urlslug ) {\n if ( count ( array_keys( $settings['url-slugs'], $urlslug ) ) > 1 ){\n $duplicate_exists = true;\n break;\n }\n }\n if ( $duplicate_exists ){\n foreach( $settings['translation-languages'] as $language_code ) {\n $settings['url-slugs'][$language_code] = $language_code;\n }\n }\n\n $this->create_menu_entries( $settings['publish-languages'] );\n\n require_once( ABSPATH . 'wp-includes/load.php' );\n foreach ( $settings['translation-languages'] as $language_code ){\n if ( $settings['default-language'] != $language_code ) {\n $this->trp_query->check_table( $settings['default-language'], $language_code );\n }\n wp_download_language_pack( $language_code );\n $this->trp_query->check_gettext_table( $language_code );\n }\n\n //in version 1.6.6 we normalized the original strings and created new tables\n $this->trp_query->check_original_table();\n $this->trp_query->check_original_meta_table();\n\n // regenerate permalinks in case something changed\n flush_rewrite_rules();\n\n return apply_filters( 'trp_extra_sanitize_settings', $settings );\n }", "public function saveSettingsAction() {\n $shopId = $this->Request()->getParam(\"shopId\");\n $params = array(\n \"export_limit\" => $this->Request()->getParam(\"export_limit\"),\n \"newsletter_extra_info\" => $this->Request()->getParam(\"newsletter_extra_info\")\n );\n foreach($params as $name => $value) {\n $sql = \"\n INSERT INTO swp_cleverreach_settings(shop, type, name, value) VALUES(?, 'install', ?, ?)\n ON DUPLICATE KEY UPDATE value=?;\n \";\n\n Shopware()->Db()->query($sql, array($shopId, $name, $value, $value));\n }\n\n $this->View()->assign(array('success'=>true));\n }", "public function site_setting() \n\t{\t\t\t\t\n\t\tif ($this->request->is('post') || $this->request->is('put')) \n\t\t{\n\t\t\t$data = $this->request->data;\n\t\t\t$value = json_encode($this->request->data);\n\t\t\t$data_arr['value'] = $value;\n\t\t\t$data_arr['id'] = $data['Settings']['id'];\n\t\t\t\n\t\t\tif ($this->Settings->save($data_arr)) \n\t\t\t{\n\t\t\t\tif(isset($this->request->data['Settings']['image']['name']) && !empty($this->request->data['Settings']['image']['name']))\n\t\t\t\t{\n\t\t\t\t\t$image_array = $this->request->data['Settings']['image'];\n\t\t\t\t\t$image_info = pathinfo($image_array['name']);\n\t\t\t\t\t$image_new_name = $image_info['filename'].time();\n\t\t\t\t\t$thumbnails = false;\n\t\t\t\t\t\n\t\t\t\t\t$this->Uploader->upload($image_array, SETTINGS, $thumbnails, $image_new_name );\n\t\t\t\t\n\t\t\t\t\tif ( $this->Uploader->error )\n\t\t\t\t\t{\n\t\t\t\t\t\t$file_error = $this->Uploader->errorMessage;\n\t\t\t\t\t\t$this->flash_new( $file_error, 'error-messages' ); \n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t$this->Settings->id = $data['Settings']['id'];\n\t\t\t\t\t\t$this->Settings->saveField('image', $this->Uploader->filename);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash(__('Settings page is saved'));\n\t\t\t\t$this->redirect(array('action' => 'site_setting'));\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->Session->setFlash(__('Error saving page, please check again.'));\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$settings = $this->Settings->findByKey('site_setting');\t\n\t\t\t$setting_data = json_decode($settings['Settings']['value'],true);\t\t\t\n\t\t\t$setting_data['Settings']['image'] = $settings['Settings']['image'];\n\t \n\t\t\t$this->request->data = $setting_data;\n\t\t}\n\t\t$this->set('page', 'edit');\n\t\t$this->render('add');\n\t}", "function _store()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// @task: Check for acl rules.\n\t\t$this->checkAccess( 'setting' );\n\n\t\t$mainframe\t= JFactory::getApplication();\n\t\t\n\t\t$message\t= '';\n\t\t$type\t\t= 'message';\n\t\t\n\t\tif( JRequest::getMethod() == 'POST' )\n\t\t{\n\t\t\t$model\t\t= $this->getModel( 'Settings' );\n\t\t\t//$model->save( $key , $values );\n\n\t\t\t$postArray\t= JRequest::get( 'post' );\n\t\t\t$saveData\t= array();\n\t\t\t\n\t\t\t// Unset unecessary data.\n\t\t\tunset( $postArray['task'] );\n\t\t\tunset( $postArray['option'] );\n\t\t\tunset( $postArray['c'] );\n\t\t\t\n\t\t\tforeach( $postArray as $index => $temp )\n\t\t\t{\n\t\t\t\tif(is_array($temp))\n\t\t\t\t{\n\t\t\t\t\t$value = implode('|', $temp);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$value = $temp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $index == 'integration_google_adsense_code' )\n\t\t\t\t{\n\t\t\t\t\t$value\t= str_ireplace( ';\"' , '' , $value );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $index != 'task' );\n\t\t\t\t{\n\t\t\t\t\t$saveData[ $index ]\t= $value;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t$db\t\t= JFactory::getDBO();\n\n\t\t\t// @rule: If the privacy integrations with jomsocial is enabled, we need to ensure all blog posts are up to date with the\n\t\t\t// correct privacy values.\n\t\t\tif( $saveData['main_jomsocial_privacy'] )\n\t\t\t{\n\t\t\t\t$query\t= 'UPDATE ' . $db->nameQuote( '#__easyblog_post' ) . ' '\n\t\t\t\t\t\t. 'SET ' . $db->nameQuote( 'private' ) . ' = ' . $db->Quote( 20 ) . ' '\n\t\t\t\t\t\t. 'WHERE ' . $db->nameQuote( 'private' ) . ' = ' . $db->Quote( 1 );\n\t\t\t\t$db->setQuery( $query );\n\t\t\t\t$db->query();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query\t= 'UPDATE ' . $db->nameQuote( '#__easyblog_post' ) . ' '\n\t\t\t\t\t\t. 'SET ' . $db->nameQuote( 'private' ) . ' = ' . $db->Quote( 1 ) . ' '\n\t\t\t\t\t\t. 'WHERE ' . $db->nameQuote( 'private' ) . ' >= ' . $db->Quote( 20 );\n\t\t\t\t$db->setQuery( $query );\n\t\t\t\t$db->query();\t\t\t\t\n\t\t\t}\n\t\t\t//overwrite the main blog description value by using getVar to preserve the html tag\n\t\t\t$saveData['main_description']\t= JRequest::getVar( 'main_description', '', 'post', 'string', JREQUEST_ALLOWRAW );\n\t\t\t\n\t\t\t//overwrite the addthis custom code value by using getVar to preserve the html tag\n\t\t\t$saveData['social_addthis_customcode']\t= JRequest::getVar( 'social_addthis_customcode', '', 'post', 'string', JREQUEST_ALLOWRAW );\n\n\t\t\tif( $model->save( $saveData ) )\n\t\t\t{\n\t\t\t\t$message\t= JText::_( 'COM_EASYBLOG_SETTINGS_STORE_SUCCESS' );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message\t= JText::_( 'COM_EASYBLOG_SETTINGS_STORE_ERROR' );\n\t\t\t\t$type\t\t= 'error';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message\t= JText::_('COM_EASYBLOG_SETTINGS_STORE_INVALID_REQUEST');\n\t\t\t$type\t\t= 'error';\n\t\t}\n\n\t\t// Clear the component's cache\n\t\t$cache = JFactory::getCache('com_easyblog');\n\t\t$cache->clean();\n\t\t\n\t\treturn array( 'message' => $message , 'type' => $type);\n\t}", "private function set_settings() {\n\t\t// Sections config.\n\t\t$this->setting_sections = array(\n\t\t\t__( 'Free members and Visitors (0 or 1) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'Core subscribers (2, 3, 4, 6, or 7) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'Leaderboard subscribers (8 or 9) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'SwingTrader subscribers (10 or 11) Promo Message:', 'investors-insert-content' ),\n\t\t\t__( 'MarketSmith subscribers (12 or 13) Promo Message:', 'investors-insert-content' ),\n\t\t);\n\n\t\t// Settings config.\n\t\t$this->setting_fields = array(\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'text',\n\t\t\t\t'title' => __( 'Copy for the promo message', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_text_cb',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'link',\n\t\t\t\t'title' => __( 'Link URL for promo', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_text_cb',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'class',\n\t\t\t\t'title' => __( 'Link Style Class', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_text_cb',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id_suffix' => 'cats',\n\t\t\t\t'title' => __( 'Categories To Exclude', 'investors-insert-content' ),\n\t\t\t\t'callback' => 'ic_cat_cb',\n\t\t\t),\n\t\t);\n\t}", "function model_admin_save_all_settings($data){\n\tforeach($data as $key => $value){\n\t\tdb_query(\"UPDATE `settings` SET `value`='$value' WHERE `setting`='$key'\");\n\t}\n}", "private function _saveSettingsToDB( $settings ) {\n\t\t$this->EE->db->where( 'class', __CLASS__ )\n\t\t->update( 'extensions', array( 'settings' => serialize( $settings ) ) );\n\t}", "public function store(\\App\\Http\\Requests\\admin\\SettingsRequest $request)\n {\n //доступ на добавление\n $this->authorize('add', new Setting());\n\n $data = $request->input();\n if($request->input('type') == 'array') {\n $data['value'] = json_encode(array_combine($request->input('keys'), $request->input('values')));\n }\n Setting::create($data);\n return redirect()->route('admin.settings.index')->withMessage('Настройка добавлена');\n }", "public function set($settings) {}", "static public function write_all($settings)\n\t{\n\t\tif (self::get_instance( )) {\n\t\t\tself::get_instance( )->put_settings($settings);\n\t\t\tself::get_instance( )->save( );\n\t\t\treturn self::get_instance( )->get_settings( );\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function admin_save_settings () {\n\t\t\t$settings = $this->get_option ();\n\n\t\t\tif (!empty ($_POST['geopress_option_submitted'])) {\n\t\t\t\tif (strstr ($_GET['page'], \"geopress\") &&\n\t\t\t\t \t\tcheck_admin_referer ('geopress-update-options')) {\n\t\t\t\t\t$tab = $this->admin_validate_tab ();\n\t\t\t\t\t$update_options = true;\n\t\t\t\t\t$reset_options = false;\n\t\t\t\t\t$update_msg = self::$tab_names[$tab];\n\t\t\t\t\t$action_msg = __('Updated', 'wp-biographia');\n\n\t\t\t\t\tswitch ($tab) {\n\t\t\t\t\t\tcase 'locations':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'geocoding':\n\t\t\t\t\t\t\t$settings['geocoder'] = $this->admin_option ('geopress_geocoder_type');\n\t\t\t\t\t\t\t$settings['cloudmade_key'] = $this->admin_option ('geopress_cloudmade_key');\n\t\t\t\t\t\t\t$settings['google_key'] = $this->admin_option ('geopress_google_key');\n\t\t\t\t\t\t\t$settings['microsoft7_key'] = $this->admin_option ('geopress_bing_key');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'feeds':\n\t\t\t\t\t\t\t$settings['rss_enable'] = $this->admin_option ('geopress_rss_enable');\n\t\t\t\t\t\t\t$settings['rss_format'] = $this->admin_option ('geopress_rss_format');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'defaults':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'help':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'colophon':\n\t\t\t\t\t\t\t$update_options = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'maps':\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$settings['map_width'] = $this->admin_option ('geopress_map_width');\n\t\t\t\t\t\t\t$settings['map_height'] = $this->admin_option ('geopress_map_height');\n\t\t\t\t\t\t\t$settings['default_zoom_level'] = $this->admin_option ('geopress_zoom_level');\n\t\t\t\t\t\t\t$settings['map_type'] = $this->admin_option ('geopress_view_type');\n\t\t\t\t\t\t\t$settings['map_format'] = $this->admin_option ('geopress_map_format');\n\t\t\t\t\t\t\t$settings['controls_zoom'] = $this->admin_option ('geopress_control_size');\n\t\t\t\t\t\t\t$settings['controls_pan'] = $this->admin_option ('geopress_control_pan');\n\t\t\t\t\t\t\t$settings['controls_type'] = $this->admin_option ('geopress_control_type');\n\t\t\t\t\t\t\t$settings['controls_overview'] = $this->admin_option ('geopress_control_overview');\n\t\t\t\t\t\t\t$settings['controls_scale'] = $this->admin_option ('geopress_control_scale');\n\t\t\t\t\t\t\t$settings['nokia_app_id'] = html_entity_decode ($this->admin_option ('geopress_nokia_app_id'));\n\t\t\t\t\t\t\t$settings['nokia_app_token'] = html_entity_decode ($this->admin_option ('geopress_nokia_app_token'));\n\t\t\t\t\t\t\t$settings['google_key'] = html_entity_decode ($this->admin_option ('geopress_google_key'));\n\t\t\t\t\t\t\t$settings['cloudmade_key'] = html_entity_decode ($this->admin_option ('geopress_cloudmade_key'));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t// end-switch\n\t\t\t\t\t\n\t\t\t\t\tif ($update_options) {\n\t\t\t\t\t\tupdate_option (self::OPTIONS, $settings);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($update_options || $reset_options) {\n\t\t\t\t\t\techo \"<div id=\\\"updatemessage\\\" class=\\\"updated fade\\\"><p>\";\n\t\t\t\t\t\techo sprintf (__('%s Settings And Options %s', 'geopress'),\n\t\t\t\t\t\t\t$update_msg, $action_msg);\n\t\t\t\t\t\techo \"</p></div>\\n\";\n\t\t\t\t\t\techo \"<script \ttype=\\\"text/javascript\\\">setTimeout(function(){jQuery('#updatemessage').hide('slow');}, 3000);</script>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$settings = $this->get_option ();\n\t\t\treturn $settings;\n\t\t}", "public function settings_post()\n\t{\n\t\t$uid = $this->input->post('uid');\n\t\t$notify_send = $this->input->post('notify_send');\n\t\t$notify_receive = $this->input->post('notify_receive');\n\t\t$notify_deliver = $this->input->post('notify_deliver');\n\n\t\tif (!isset($uid) || !isset($notify_send) || !isset($notify_receive) || !isset($notify_deliver))\n\t\t{\n\t\t\t$this->response(array('success' => 0, 'message' => 'Not all required fields present'), 400);\n\t\t}\n\n\t\t// Check if settings already exist\n\t\t$settings = $this->Model_account->get_settings($uid);\n\t\tif (!empty($settings))\n\t\t{\n\t\t\t$this->response(array('success' => 0, 'message' => 'Settings already exist for user'), 400);\n\t\t}\n\n\t\t$data = array(\n\t\t\t'uid'\t\t\t\t=>\t\t$uid,\n\t\t\t'notify_send'\t\t=>\t\t$notify_send,\n\t\t\t'notify_receive'\t=>\t\t$notify_receive,\n\t\t\t'notify_deliver'\t=>\t\t$notify_deliver,\n\t\t);\n\n\t\t$saved = $this->Model_account->save_settings($data);\n\t\tif (!$saved)\n\t\t{\n\t\t\t$this->response(array('success' => 0, 'message' => 'Account settings could not be saved'), 400);\n\t\t}\n\n\t\t// Add to memcached/redis\n\t\t$map = $notify_send.$notify_receive.$notify_deliver;\n\t\t$map_set = $this->set_user_map($uid, $map);\n\t\tif (!$map_set)\n\t\t{\n\t\t\t// We do not want to return a hard error here, but the user must be notified\n\t\t\t$this->response(array('success' => 1, 'message' => 'Settings successfully saved, could not set user map'), 200);\n\t\t}\n\n\t\t$this->response(array('success' => 1, 'message' => 'Settings successfully saved'), 200);\n\t}", "function save_settings($settings) {\n\t$user_id = self_char_id();\n if($user_id){\n \tDatabaseConnection::getInstance();\n \t$statement = DatabaseConnection::$pdo->prepare(\"SELECT count(settings_store) FROM settings WHERE player_id = :player\");\n \t$statement->bindValue(':player', $user_id);\n \t$statement->execute();\n\n \t$settings_exist = $statement->fetchColumn();\n\n \tif ($settings_exist) {\n \t\t$statement = DatabaseConnection::$pdo->prepare(\"UPDATE settings SET settings_store = :settings WHERE player_id = :player\");\n \t\t$statement->bindValue(':settings', serialize($settings));\n \t\t$statement->bindValue(':player', $user_id);\n \t} else {\n \t\t$statement = DatabaseConnection::$pdo->prepare(\"INSERT INTO settings (settings_store, player_id) VALUES (:settings, :player)\");\n \t\t$statement->bindValue(':settings', serialize($settings));\n \t\t$statement->bindValue(':player', $user_id);\n \t}\n\n \t$statement->execute();\n }\n\treturn get_settings($refresh=true); // This refreshes the static, saved settings variable.\n}", "public function add_settings() {\n\n\t\tSettingsManager::get_instance()->add(\n\t\t\t[\n\t\t\t\t'id' => self::PLACEHOLDER_ID,\n\t\t\t\t'group' => self::COMPONENT_ID,\n\t\t\t\t'tab' => SettingsManager::TAB_GENERAL,\n\t\t\t\t'transport' => 'post' . self::COMPONENT_ID,\n\t\t\t\t'sanitize_callback' => 'wp_filter_nohtml_kses',\n\t\t\t\t'default' => __( 'Search for...', 'neve' ),\n\t\t\t\t'label' => __( 'Placeholder', 'neve' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'section' => $this->section,\n\t\t\t]\n\t\t);\n\n\n\t\tSettingsManager::get_instance()->add(\n\t\t\t[\n\t\t\t\t'id' => self::SIZE_ID,\n\t\t\t\t'group' => $this->get_id(),\n\t\t\t\t'tab' => SettingsManager::TAB_STYLE,\n\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t'default' => 15,\n\t\t\t\t'label' => __( 'Icon Size', 'neve' ),\n\t\t\t\t'type' => 'neve_range_control',\n\t\t\t\t'live_refresh_selector' => $this->default_selector . ' .nv-search > svg',\n\t\t\t\t'live_refresh_css_prop' => array(\n\t\t\t\t\t'type' => 'svg-icon-size',\n\t\t\t\t),\n\t\t\t\t'section' => $this->section,\n\t\t\t]\n\t\t);\n\n\n\t\tSettingsManager::get_instance()->add(\n\t\t\t[\n\t\t\t\t'id' => self::COLOR_ID,\n\t\t\t\t'group' => self::COMPONENT_ID,\n\t\t\t\t'tab' => SettingsManager::TAB_STYLE,\n\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t\t'label' => __( 'Color', 'neve' ),\n\t\t\t\t'type' => '\\Neve\\Customizer\\Controls\\React\\Color',\n\t\t\t\t'section' => $this->section,\n\t\t\t\t'live_refresh_selector' => $this->default_selector . ' .nv-search svg',\n\t\t\t\t'live_refresh_css_prop' => array(\n\t\t\t\t\t'prop' => 'fill',\n\t\t\t\t\t'fallback' => '',\n\t\t\t\t),\n\t\t\t]\n\t\t);\n\n\t\tSettingsManager::get_instance()->add(\n\t\t\t[\n\t\t\t\t'id' => self::HOVER_COLOR_ID,\n\t\t\t\t'group' => self::COMPONENT_ID,\n\t\t\t\t'tab' => SettingsManager::TAB_STYLE,\n\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t\t'label' => __( 'Hover Color', 'neve' ),\n\t\t\t\t'type' => '\\Neve\\Customizer\\Controls\\React\\Color',\n\t\t\t\t'section' => $this->section,\n\t\t\t\t'live_refresh_selector' => $this->default_selector . ' .nv-search:hover svg',\n\t\t\t\t'live_refresh_css_prop' => array(\n\t\t\t\t\t'prop' => 'fill',\n\t\t\t\t),\n\t\t\t]\n\t\t);\n\t}", "public static function setMany($settings)\n {\n foreach ($settings as $key => $value) {\n self::set($key, $value);\n }\n }", "public function register_settings(): void\n {\n foreach ( $this->sections as $section )\n {\n add_settings_section(\n $section['id'],\n $section['title'],\n array(\n Page::class,\n 'settings_section'\n ),\n $section['page']\n );\n \n foreach ( $section['settings'] as $setting_id => $setting_title )\n {\n register_setting(\n $section['page'],\n $setting_id\n );\n \n add_settings_field(\n $setting_id,\n $setting_title,\n array(\n Callback::class,\n 'input_field'\n ),\n $section['page'],\n $section['id'],\n [\n 'name' => $setting_id,\n ]\n );\n }\n }\n }", "public static function setMany($settings)\n {\n foreach($settings as $key => $value){\n self::set($key, $value);\n }\n }", "public function setSettings($settings)\n {\n $this->attributes['settings'] = json_encode($settings);\n }", "public static function insert_settings($settings) {\n global $db;\n $settings = self::escape_settings($settings);\n $db->insert_query_multiple(\"settings\", $settings);\n rebuild_settings();\n }", "function updateSettings($ar, $roo)\n {\n //DB_DataObject::debugLevel(1);\n $old = array();\n foreach($this->settings(true) as $o) {\n $old[$o->scope] = $o;\n }\n foreach($ar as $k=>$v) {\n if (isset($old[$k])) {\n $oo = clone($old[$k]);\n $old[$k]->data = $v;\n $old[$k]->update($oo);\n continue;\n }\n $cs = DB_DataObject::Factory('core_person_settings');\n $cs->setFrom(array(\n 'person_id' =>$this->id,\n 'scope' => $k,\n 'data' => $v\n ));\n $cs->insert();\n }\n // we dont delete old stuff....\n }", "function tas_plugin_options() {\n if (!current_user_can('manage_options'))\n {\n wp_die( __('You do not have sufficient permissions to access this page.') );\n }\n // variables for the field and option names\n $opt_tas_app_id = 'tas_app_id';\n $opt_tas_api_key = 'tas_api_key';\n $hidden_field_name = 'tas_submit_hidden';\n $data_tas_app_id = 'tas_app_id';\n $data_tas_api_key = 'tas_api_key';\n\n // Read in existing option value from database\n $opt_tas_app_id_val = get_option( $opt_tas_app_id );\n $opt_tas_api_key_val = get_option( $opt_tas_api_key );\n\n // See if the user has posted us some information\n // If they did, this hidden field will be set to 'Y'\n if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' )\n {\n // Read their posted value\n $opt_tas_app_id_val = $_POST[ $data_tas_app_id ];\n $opt_tas_api_key_val = $_POST[ $data_tas_api_key ];\n\n // Save the posted value in the database\n update_option( $opt_tas_app_id, $opt_tas_app_id_val );\n update_option( $data_tas_api_key, $opt_tas_api_key_val);\n\n // Put a \"settings saved\" message on the screen\n\n?>\n <div class=\"updated\"><p><strong><?php _e('Settings saved.', 'tas-plugin' ); ?></strong></p></div>\n<?php\n\n }\n // Now display the settings editing screen\n echo '<div class=\"wrap\">';\n // header\n echo \"<h2>\" . __( 'Titan Algolia Search Settings', 'tas-plugin' ) . \"</h2>\";\n // settings form\n ?>\n <form name=\"form1\" method=\"post\" action=\"\">\n <input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n\n <p><?php _e(\"Application ID:\", 'tas-plugin' ); ?>\n <input type=\"text\" name=\"<?php echo $data_tas_app_id; ?>\" value=\"<?php echo $opt_tas_app_id_val; ?>\" size=\"40\">\n </p><hr />\n\n <p><?php _e(\"Admin API Key:\", 'tas-plugin' ); ?>\n <input type=\"text\" name=\"<?php echo $data_tas_api_key; ?>\" value=\"<?php echo $opt_tas_api_key_val; ?>\" size=\"40\">\n </p><hr />\n\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\n </p>\n\n </form>\n </div>\n\n<?php\n\n}", "private function updateSettings($input)\n {\n foreach($input as $key => $value) {\n Settings::set($key, $value);\n if ($key == 'language_default') {\n Config::set('app.locale', $value);\n App::setLocale($value);\n }\n if ($key == 'timezone') {\n Config::set('app.timezone', $value);\n } \n }\n\n $this->logAction('setting', trans('log.updated_settings'), Auth::User());\n }", "public function saveSettings();", "public function saveSettings();", "public function injectSettings(array $settings) {\r\n\t\t$this->settings = $settings;\r\n\t\t// \\TYPO3\\Flow\\var_dump($this->settings);\r\n\t}", "private function completeConfigurationSettings( array $settings ) {\r\n\t\t$cObj = $this->configurationManager->getContentObject();\r\n\t\t$currentRecord = array();\r\n\t\tif ( !empty($cObj->currentRecord) ) {\r\n\t\t\t$currentRecord = explode(':', $cObj->currentRecord);\t//build array [0=>cObj tablename, 1=> cObj uid] - initialize with content information (usage as normal content)\r\n\t\t} else {\r\n\t\t\t$currentRecord = array('pages',$GLOBALS['TSFE']->page['uid']);\t//build array [0=>cObj tablename, 1=> cObj uid] - initialize with page info if used by typoscript\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($settings['ratetable'])) {\r\n\t\t\t$settings['ratetable'] = $currentRecord[0];\r\n\t\t}\r\n\t\tif (empty($settings['ratefield'])) {\r\n\t\t\t$settings['ratefield'] = 'uid';\r\n\t\t}\t\t\r\n\t\tif (empty($settings['ratedobjectuid'])) {\r\n\t\t\t$settings['ratedobjectuid'] = $currentRecord[1];\r\n\t\t}\r\n\t\treturn $settings;\r\n\t}", "function update_settings()\n {\n }", "public static function add_settings( $settings ) {\n\t\t$settings = array_merge( $settings, static::get_settings() );\n\n\t\treturn $settings;\n\t}", "public function a2020_import_settings(){\n\t\t\n\t\tif (defined('DOING_AJAX') && DOING_AJAX && check_ajax_referer('admin2020-settings-security-nonce', 'security') > 0) {\n\t\t\t\n\t\t\t$new_options = $this->utils->clean_ajax_input($_POST['settings']); \n\t\t\t\n\t\t\tif(is_array($new_options)){\n\t\t\t\tupdate_option( 'admin2020_settings', $new_options);\n\t\t\t}\n\t\t\t\n\t\t\techo __(\"Settings Imported\",\"admin2020\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tdie();\t\n\t\t\n\t}", "public function media_settings( $settings ) {\n\n\t\t// Define setting medias collection\n\t\tif ( ! isset( $settings['settingMedias'] ) || ! is_array( $settings['settingMedias'] ) ) {\n\t\t\t$settings['settingMedias'] = array();\n\t\t}\n\n\t\t$attachment_id = $this->get_setting();\n\t\t$settings['settingMedias'][ $this->setting_key ] = array(\n\t\t\t'media' => $attachment_id ? $attachment_id : -1,\n\t\t\t'nonce' => wp_create_nonce( \"update-setting_{$this->setting_key}\" )\n\t\t);\n\n\t\treturn $settings;\n\t}", "function save_settings() {\n if( isset( $_POST['apsl_save_settings'] ) && $_POST['apsl_settings_action'] && wp_verify_nonce( $_POST['apsl_settings_action'], 'apsl_nonce_save_settings' ) ) {\n include( 'inc/backend/save-settings.php' );\n }\n else {\n die( 'No script kiddies please!' );\n }\n }", "public function settings(&$settings) {\n\n $label = get_string($this->name.'paymodeparams', 'shoppaymodes_paypal', $this->name);\n $info = get_string('paypaltest_desc', 'shoppaymodes_paypal');\n $settings->add(new admin_setting_heading('local_shop_'.$this->name, $label, $info));\n\n $label = get_string('paypalsellertestname', 'shoppaymodes_paypal');\n $settings->add(new admin_setting_configtext('local_shop/paypalsellertestname', $label,\n get_string('configpaypalsellername', 'shoppaymodes_paypal'), '', PARAM_TEXT));\n\n $label = get_string('sellertestitemname', 'shoppaymodes_paypal');\n $settings->add(new admin_setting_configtext('local_shop/paypalsellertestitemname', $label,\n get_string('configselleritemname', 'shoppaymodes_paypal'), '', PARAM_TEXT));\n\n $label = get_string('paypalsellername', 'shoppaymodes_paypal');\n $settings->add(new admin_setting_configtext('local_shop/paypalsellername', $label,\n get_string('configpaypalsellername', 'shoppaymodes_paypal'), '', PARAM_TEXT));\n\n $label = get_string('selleritemname', 'shoppaymodes_paypal');\n $settings->add(new admin_setting_configtext('local_shop/paypalselleritemname', $label,\n get_string('configselleritemname', 'shoppaymodes_paypal'), '', PARAM_TEXT));\n }", "private function setSettings()\n {\n\n $dir = $this->settings->get('plugin_dir');\n $basename = $this->settings->get('plugin_file');\n $upload_dir_info = wp_upload_dir();\n\n $this->settings->set('template_dir', $dir . '/resources/views');\n $this->settings->set('plugin_basename', $basename);\n $this->settings->set('upload_dir', $upload_dir_info['basedir'] . '/avh-rps');\n $this->settings->set('javascript_dir', $dir . '/assets/js/');\n $this->settings->set('css_dir', $dir . '/assets/css/');\n $this->settings->set('images_dir', $dir . '/assets/images/');\n $this->settings->set('plugin_url', plugins_url('', Constants::PLUGIN_FILE));\n $this->settings->set('club_max_entries_per_member_per_date', 4);\n $this->settings->set('club_max_banquet_entries_per_member', 5);\n $this->settings->set('digital_chair_email', 'digitalchair@raritanphoto.com');\n\n $this->settings->set('siteurl', get_option('siteurl'));\n }", "function saveSettings()\n {\n static $booleans = array('site' => array('private', 'inviteonly', 'closed'));\n\n foreach ($booleans as $section => $parts) {\n foreach ($parts as $setting) {\n $values[$section][$setting] = ($this->boolean($setting)) ? 1 : 0;\n }\n }\n\n $config = new Config();\n\n $config->query('BEGIN');\n\n foreach ($booleans as $section => $parts) {\n foreach ($parts as $setting) {\n Config::save($section, $setting, $values[$section][$setting]);\n }\n }\n\n $config->query('COMMIT');\n\n return;\n }", "public function processSettingsUpdate()\n\t{\n\t\t\n\t}", "protected function dUpdateSettings()\n\t{\n\t\tglobal $ilCtrl;\n\n\t\t$form = $this->initFormDSettings();\n\t\tif($form->checkInput())\n\t\t{\n\t\t\tinclude_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';\n\t\t\tilECSNodeMappingSettings::getInstance()->enable((bool) $form->getInput('active'));\n\t\t\tilECSNodeMappingSettings::getInstance()->enableEmptyContainerCreation(!$form->getInput('empty'));\n\t\t\tilECSNodeMappingSettings::getInstance()->update();\n\t\t\tilUtil::sendSuccess($this->lng->txt('saved_settings'),true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendFailure($this->lng->txt('err_check_input'),true);\n\t\t\t$form->setValuesByPost();\n\t\t}\n\t\t$ilCtrl->redirect($this,'dSettings');\n\t}", "public static function save_settings(){\r\t\tif(!is_array(dev::$post) || count(dev::$post) == 0){\n\t\t\tself::set_message(\"Error: The input is invalid.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Make sure its the right data\n\t\tif(!isset(dev::$post['form_action']) || dev::$post['form_action'] != 'save_settings'){\n\t\t\tself::set_message(\"Error: The input is not meant for this system.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Open Config File\n\t\tself::open_file();\n\t\t\n\t\t//Main Settings\n\t\tself::save_setting('main','license_user');\n\t\tif(dev::$post['license_pass'] != ''){\n\t\t\tself::save_setting('main','license_pass');\n\t\t}\n\t\t\n\t\t//UI Settings\n\t\tself::save_setting('ui_config','site_name');\n\t\tself::save_setting('ui_config','logo_url');\n\t\tself::save_setting('ui_config','head_title');\n\t\tself::save_setting('ui_config','url');\n\t\tself::save_setting('ui_config','ssl_url');\n\t\tself::save_setting('ui_config','login_url');\n\t\tself::save_setting('ui_config','ssl_login_url');\n\t\t\n\t\tif(isset(dev::$post['forgot_password'])){\n\t\t\t$forgot_password = 'true';\n\t\t} else {\n\t\t\t$forgot_password = 'false';\n\t\t}\n\t\tself::save_setting('ui_config','forgot_password',$forgot_password);\n\t\t\n\t\tself::save_setting('ui_config','max_failed_login_attempts');\n\t\tself::save_setting('ui_config','failed_login_lockout');\n\t\t\n\t\t//API Settings\n\t\tself::save_setting('api_config','api_user');\n\t\tif(dev::$post['api_pass'] != ''){\n\t\t\tself::save_setting('api_config','api_pass');\n\t\t}\n\t\t\n\t\t//Mail Settings\n\t\tself::save_setting('mail','default_from');\n\t\tself::save_setting('mail','default_replyto');\n\t\t\n\t\tif(isset(dev::$post['smtp_enable'])){\n\t\t\t$smtp_enable = 'true';\n\t\t} else {\n\t\t\t$smtp_enable = 'false';\n\t\t}\n\t\tself::save_setting('mail','smtp_enable',$smtp_enable);\n\t\t\n\t\tself::save_setting('mail','smtp_host');\n\t\tself::save_setting('mail','smtp_port');\n\t\t\n\t\tif(isset(dev::$post['smtp_auth'])){\n\t\t\t$smtp_auth = 'true';\n\t\t} else {\n\t\t\t$smtp_auth = 'false';\n\t\t}\n\t\tself::save_setting('mail','smtp_auth',$smtp_auth);\n\t\t\n\t\tself::save_setting('mail','smtp_user');\n\t\t\n\t\tif(dev::$post['smtp_pass'] != ''){\n\t\t\tself::save_setting('mail','smtp_pass');\n\t\t}\n\t\t\n\t\tif(self::$continue){\n\t\t\t\n\t\t\t//Write File\n\t\t\tself::write_file();\n\t\t\t\n\t\t\t//Success\n\t\t\tself::set_message(\"Settings have been saved successfully!\");\n\t\t\t\n\t\t}\n\t\r\n\t}", "public function save_settings()\n {\n }", "function ewsp_add_inventory_settings( $settings ) {\n\t$settings = array_merge( $settings, ewsp_get_inventory_settings() );\n\treturn $settings;\n}", "private function _saveSettings()\r\n\t{\r\n\t\t$db\t\t= dunloader( 'database', true );\r\n\t\t$input\t=\tdunloader( 'input', true );\r\n\t\t$task\t= $input->getVar( 'themer', '1' );\r\n\t\t\r\n\t\tswitch ( $task ) {\r\n\t\t\tcase '2' :\r\n\t\t\t\tif ( $tid = $input->getVar( 'tid', false ) ) {\r\n\t\t\t\t\t$db->setQuery( \"SELECT '\" . $tid . \"' AS `value`, `params` FROM `mod_themer_themes` t WHERE t.id = '\" . $tid . \"'\" );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$db->setQuery( \"SELECT `value`, `params` FROM `mod_themer_settings` s INNER JOIN `mod_themer_themes` t ON s.value = t.id WHERE `key` = 'usetheme'\" );\r\n\t\t\t\t}\r\n\t\t\t\t//$db->setQuery( \"SELECT `value`, `params` FROM `mod_themer_settings` s INNER JOIN `mod_themer_themes` t ON s.value = t.id WHERE `key` = 'usetheme'\" );\r\n\t\t\t\t$theme\t= $db->loadObject();\r\n\t\t\t\t$params = json_decode( $theme->params, false );\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $params as $k => $v ) {\r\n\t\t\t\t\t$params->$k = $input->getVar( $k, $v );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$theme->params = json_encode( $params );\r\n\t\t\t\t\r\n\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_themes` SET `params` = '{$theme->params}' WHERE `id` = '{$theme->value}'\" );\r\n\t\t\t\t$db->query();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tcase '1' :\r\n\t\t\t\t\r\n\t\t\t\t$tid\t= $input->getVar( 'preset' );\r\n\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = '\" . $tid . \"' WHERE `key` = 'usetheme'\" );\r\n\t\t\t\t$db->query();\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function injectSettings(array $settings) {\n\t\t$this->settings = $settings;\n\t}", "public function injectSettings(array $settings) {\n\t\t$this->settings = $settings;\n\t}", "public static function setMany($settings)\n {\n foreach ($settings as $key => $value) {\n self::set($key, $value);\n }\n }" ]
[ "0.6960649", "0.6933709", "0.68555903", "0.67833257", "0.67679137", "0.67455447", "0.67092484", "0.6662847", "0.6575437", "0.64918953", "0.6489591", "0.6463942", "0.64381206", "0.6424835", "0.6419955", "0.63965183", "0.6394232", "0.63867396", "0.63804895", "0.6372832", "0.6372832", "0.6334248", "0.6333851", "0.632673", "0.6326188", "0.6317175", "0.63102275", "0.6305554", "0.6293093", "0.62846583", "0.6274796", "0.6270089", "0.6268093", "0.6264233", "0.6249386", "0.6244945", "0.62404126", "0.62397945", "0.6214554", "0.62026834", "0.6201752", "0.6189853", "0.61718655", "0.6167883", "0.61653215", "0.6162643", "0.61581427", "0.6150923", "0.6144368", "0.6125572", "0.61220956", "0.6116604", "0.6101748", "0.60985136", "0.60932374", "0.6081609", "0.6078709", "0.6069066", "0.6048051", "0.60413104", "0.6040541", "0.6035958", "0.6034463", "0.6032389", "0.6025316", "0.60216886", "0.6019837", "0.60035944", "0.59976965", "0.59922516", "0.5974379", "0.59682834", "0.5960934", "0.5949903", "0.59495914", "0.5937536", "0.5927311", "0.59218204", "0.5911812", "0.59084976", "0.59084976", "0.5896532", "0.58950233", "0.5893819", "0.5892578", "0.5892098", "0.58908385", "0.58819157", "0.5874782", "0.5872179", "0.5870833", "0.5858474", "0.58577627", "0.58576876", "0.58557826", "0.5848275", "0.584699", "0.5846354", "0.5846354", "0.5843355" ]
0.80018485
0
static public function get_instance Returns the singleton instance of the Settings Object as a reference
static public function get_instance Возвращает экземпляр объекта Settings в виде ссылки
static public function get_instance( ) { if (is_null(self::$_instance) && self::test( )) { self::$_instance = new Settings( ); } return self::$_instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function get_instance()\n \t{\n\t\tif( self::$_instance === NULL ) {\n\t\t\t// get the settings from the database\n\t\t\tself::$_instance = get_option( 'wgobd_settings' );\n\n\t\t\t// if there are no settings in the database\n\t\t\t// save default values for the settings\n\t\t\tif( ! self::$_instance ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t\tdelete_option( 'wgobd_settings' );\n\t\t\t\tadd_option( 'wgobd_settings', self::$_instance );\n\t\t\t} else {\n\t\t\t\tself::$_instance->set_defaults(); // set default settings\n\t\t\t}\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "protected static function instance() {\n\t\tif (static::$_instance == null) {\n\t\t\tstatic::$_instance = static::forge ( static::$_config );\n\t\t}\n\t\treturn static::$_instance;\n\t}", "public static function getInstance()\n {\n if (!is_object(self::$_instance)) //or if( is_null(self::$_instance) ) or if( self::$_instance == null )\n self::$_instance = new SettingsVariant();\n return self::$_instance;\n }", "public static function get_instance() {\n\n\t\tif ( \\is_null( static::$instance ) ) {\n\t\t\tstatic::_set_instance();\n\t\t}\n\n\t\treturn static::$instance;\n\t}", "public static function get_instance() {\n\t\n\t\treturn self::$instance;\n\t\n\t}", "public static function getInstance()\n {\n return static::$instance;\n }", "public static function getInstance()\n {\n return static::$instance;\n }", "public static function getInstance()\r\n {\r\n return static::$instance;\r\n }", "public static function get_instance() {\n\n\t\treturn self::$instance;\n\n\t}", "public static function get_instance() {\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance()\n\t{\n\t\tif ( ! self::$instance ) {\n\t\t\tself::new_instance();\n\t\t}\n\n\t\treturn self::$instance;\t\n\t}", "public static function getInstance()\n {\n return self::$instance;\n }", "public static function getInstance()\n {\n return self::$instance;\n }", "public static function get_instance() {\n\t\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n\t\treturn self::$instance;\n\t}", "static public function getInstance()\n {\n return self::$instance;\n }", "protected static function getInstance(){\r\n\t\treturn self::$instance;\r\n\t}", "public static function getInstance() {\n return self::$instance;\n }", "public static function getInstance() {\n return self::$instance;\n }", "public static function getInstance()\n {\n return static::$instance ?? (static::$instance = new static());\n }", "public static function getInstance() {\n return self::$instance;\n }", "public static function getInstance()\n {\n return isset(static::$instance) ? static::$instance : static::$instance = new static();\n }", "public static function getInstance(){\n if(!(self::$instance instanceof self)){\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t\t// If the single instance hasn't been set, set it now.\n\t\t\tif ( null == self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\r\n\r\n\r\n\t\t// If the single instance hasn't been set, set it now.\r\n\t\tif ( null == self::$instance ) {\r\n\t\t\tself::$instance = new self;\r\n\t\t}\r\n\r\n\t\treturn self::$instance;\r\n\t}", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance() {\n // If the single instance hasn't been set, set it now.\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance()\n {\n return self::$_instance;\n }", "public static function getInstance()\n {\n return self::$_instance;\n }", "public static function getInstance()\n {\n return self::$_instance;\n }", "public static function getInstance(){\n return self::$instance;\n }", "static public function getinstance() {\n if (!self::$instance)\n self::$instance = new self();\n\n return self::$instance;\n }", "public static function get_instance() {\r\n\r\n\t\t// If the single instance hasn't been set, set it now.\r\n\t\tif ( null == self::$instance ) {\r\n\t\t\tself::$instance = new self;\r\n\t\t}\r\n\r\n\t\treturn self::$instance;\r\n\t}", "public static function get_instance() {\n\t\t\t// If the single instance hasn't been set, set it now.\n\t\t\tif( null === self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\t\t\treturn self::$instance;\n\t\t}", "public static function getInstance()\n {\n if (empty(static::$instance)) {\n static::$instance = static::createFromGlobals();\n }\n\n return static::$instance;\n }", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if (null == self::$instance) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if (null == self::$instance) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function getInstance(){\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function getInstance(){\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n \n return self::$instance;\n }", "public static function get_instance() {\n if (static::$instance == null) {\n static::$instance = new static::$class;\n }\n return static::$instance;\n }", "public static function get_instance() {\n\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance() {\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if (null == self::$instance) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n\t\t\tif ( null == self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function get_instance() {\n\t\t\tif ( null === self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\t\t\tif ( ! self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function getInstance() {\n if (NULL === self::$instance) {\n self::$instance= new self();\n }\n \n return self::$instance;\n }", "public static function getInstance()\n\t\t{\n\t\t\tif ( ! self::$_instance )\n\t\t\t{\n\t\t\t\tself::$_instance = new cnSettingsAPI();\n\t\t\t\tself::$_instance->init();\n\t\t\t}\n\t\t\t\n\t\t\treturn self::$_instance;\n\t\t}", "static public function get_instance() {\r\n\t\t\tif ( null === self::$instance ) {\r\n\t\t\t\tself::$instance = new self();\r\n\t\t\t}\r\n\t\t\treturn self::$instance;\r\n\t\t}", "public static function get_instance() {\n\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function getInstance() {\r\n if (!self::$instance instanceof self) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function getInstance() {\r\n if (!self::$instance instanceof self) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function get_instance()\n\t\t{\n\t\t\tif( !self::$instance )\n\t\t\t\tself::$instance = new self;\n\t\t\t\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance(){\n if( is_null( self::$instance ) ){\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n // If the single instance hasn't been set, set it now.\n if (null === self::$instance) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n\t\t\tif ( null === self::$instance ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n \n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n \n return self::$instance;\n \n }", "public static function get_instance() {\n \n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n \n return self::$instance;\n \n }", "public static function get_instance() {\n if ( !self::$instance ) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function getInstance() {\n if(null=== static::$instance){\n static::$instance=new static();\n }\n return static::$instance;\n }", "public static function get_instance() {\n\t\t\t\tif ( null === self::$instance ) {\n\t\t\t\t\tself::$instance = new self();\n\t\t\t\t}\n\t\t\t\treturn self::$instance;\n\t\t\t}", "public static function getInstance()\n {\n if (!(self::$instance instanceof self)) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function get_instance() {\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function get_instance()\r\n {\r\n if (null === static::$instance) \r\n {\r\n static::$instance = new static();\r\n }\r\n return static::$instance;\r\n }", "public static function getInstance() {\n\t\t\tif ( ! self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\t\t\treturn self::$instance;\n\t\t}", "public function getInstance() {\n\tif (is_null(self::$instance))\n\t self::$instance = new self();\n\n\treturn self::$instance;\n }", "public static function getInstance(){\r\n if(!self::$instance) self::$instance = new self();\r\n return self::$instance;\r\n }" ]
[ "0.8520589", "0.82903796", "0.8280836", "0.80722505", "0.8035968", "0.80247766", "0.80247766", "0.8006231", "0.79958284", "0.7980812", "0.7924295", "0.7920061", "0.7920061", "0.7918104", "0.7914695", "0.7905592", "0.7891555", "0.788849", "0.788849", "0.78861666", "0.7885806", "0.7884542", "0.7879683", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.78769684", "0.7874606", "0.7872311", "0.7872311", "0.7870965", "0.7869661", "0.7865497", "0.78639853", "0.78639853", "0.78639853", "0.7855951", "0.7849824", "0.78477776", "0.78461224", "0.78457135", "0.7845018", "0.7845018", "0.78385967", "0.78371423", "0.7835211", "0.7833197", "0.7829019", "0.78266186", "0.78264636", "0.78264636", "0.78264636", "0.7813219", "0.78130037", "0.78129244", "0.78129244", "0.78129244", "0.78129244", "0.7811067", "0.7811067", "0.7811067", "0.7811067", "0.7811067", "0.7811067", "0.7811067", "0.7811067", "0.7811067", "0.78104496", "0.7809857", "0.7807601", "0.7807215", "0.7802848", "0.7797152", "0.7796105", "0.7796105", "0.77928257", "0.7792743", "0.7785884", "0.77850133", "0.7783091", "0.7783091", "0.778031", "0.7778648", "0.77772707", "0.77744293", "0.7774255", "0.7773632", "0.77710074", "0.7770205", "0.77671987" ]
0.90437275
0